From c36875360dd57f307512b0eacf4645ea62eb1e41 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 10:10:15 -0700 Subject: [PATCH 01/63] add ActivityTemplate --- Composer/packages/lib/shared/src/appschema.ts | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 208ec9c542..8d9331e586 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -29,6 +29,49 @@ export const appschema: JSONSchema6 = { title: 'Component types', description: 'These are all the types of components that the loader can create.', definitions: { + 'Microsoft.ActivityTemplate': { + $role: 'unionType(Microsoft.IActivityTemplate)', + title: 'Microsoft ActivityTemplate', + type: 'object', + properties: { + $type: { + title: '$type', + description: + 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', + type: 'string', + pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', + const: 'Microsoft.ActivityTemplate', + }, + $copy: { + title: '$copy', + description: 'Copy the definition by id from a .dialog file.', + type: 'string', + pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', + }, + $id: { + title: '$id', + description: 'Inline id for reuse of an inline definition', + type: 'string', + pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', + }, + $designer: { + title: '$designer', + type: 'object', + description: 'Extra information for the Bot Framework Designer.', + }, + template: { + title: 'Template', + Description: 'Language Generator template to use to create the activity', + type: 'string', + }, + }, + additionalProperties: false, + patternProperties: { + '^\\$': { + type: 'string', + }, + }, + }, 'Microsoft.AdaptiveDialog': { $role: 'unionType(Microsoft.IDialog)', title: 'Adaptive Dialog', From ceea25be14a1aeeb5cf3cc020639cd95437ffdd5 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 10:11:08 -0700 Subject: [PATCH 02/63] update adaptive dialog --- Composer/packages/lib/shared/src/appschema.ts | 69 ++++++------------- 1 file changed, 21 insertions(+), 48 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 8d9331e586..6a02a5678b 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -75,7 +75,7 @@ export const appschema: JSONSchema6 = { 'Microsoft.AdaptiveDialog': { $role: 'unionType(Microsoft.IDialog)', title: 'Adaptive Dialog', - description: 'Configures a data driven dialog via a collection of actions/dialogs.', + description: 'Flexible, data driven dialog that can adapt to the conversation.', type: 'object', properties: { $type: { @@ -106,73 +106,46 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], - }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, - inputBindings: { - type: 'object', - title: 'Input Bindings', - description: 'This defines properties which be passed as arguments to this dialog', - examples: ['value.birthday'], - additionalProperties: { - type: 'string', - }, - }, - outputBinding: { - $role: 'memoryPath', - title: 'Output Property binding', - description: 'This is the property which the EndDialog(result) will be set to when EndDialog() is called', - examples: ['value.birthday'], - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', + description: 'Optional dialog ID.', }, autoEndDialog: { type: 'boolean', - title: 'Auto End Dialog', + title: 'Auto end dialog', description: - 'If this is true the dialog will automatically end when there are no more actions to run. If this is false it is the responsbility of the author to call EndDialog at an appropriate time.', + 'If set to true the dialog will automatically end when there are no further actions. If set to false, remember to manually end the dialog using EndDialog action.', default: 'true', }, defaultResultProperty: { type: 'string', - title: 'Default Result Property', - description: - 'Property path to the memory to return as the result of this dialog ending because AutoEndDialog is true and there are no more actions to execute.', + title: 'Default result property', + description: 'Value that will be passed back to the parent dialog.', default: 'dialog.result', }, recognizer: { $type: 'Microsoft.IRecognizer', title: 'Recognizer', - description: 'Configured recognizer to generate intent and entites from user utterance', + description: 'Language Understanding recognizer that interprets user input into intent and entities.', $ref: '#/definitions/Microsoft.IRecognizer', }, - generator: { - $type: 'Microsoft.ILanguageGenerator', - title: 'Language Generator', - description: 'Language generator to use for this dialog. (aka: LG file)', - $ref: '#/definitions/Microsoft.ILanguageGenerator', - }, + // generator: { + // $type: 'Microsoft.ILanguageGenerator', + // title: 'Language Generator', + // description: 'Language generator that generates bot responses.', + // $ref: '#/definitions/Microsoft.ILanguageGenerator', + // }, // selector: { - // $type: 'Microsoft.IEventSelector', + // $type: 'Microsoft.ITriggerSelector', // title: 'Selector', - // description: 'Policy for how to select rule to execute next', - // $ref: '#/definitions/Microsoft.IEventSelector', + // description: "Policy to determine which trigger is executed. Defaults to a 'best match' selector (optional).", + // $ref: '#/definitions/Microsoft.ITriggerSelector', // }, - events: { + triggers: { type: 'array', - description: 'Events to use to evaluate conversation', + description: 'List of triggers defined for this dialog.', + title: 'Triggers', items: { - $type: 'Microsoft.IOnEvent', - $ref: '#/definitions/Microsoft.IOnEvent', + $type: 'Microsoft.ITriggerCondition', + $ref: '#/definitions/Microsoft.ITriggerCondition', }, }, }, From 8a3502dfa83683bd7892e61327c5d78af0f8fdda Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 10:14:57 -0700 Subject: [PATCH 03/63] EntityRecognizer -> EntityRecognizers --- Composer/packages/lib/shared/src/appschema.ts | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 6a02a5678b..6644dfbe25 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -157,7 +157,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.AgeEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Age Entity Recognizer', description: 'Recognizer which recognizes age.', type: 'object', @@ -983,7 +983,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.ConfirmationEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Confirmation Entity Recognizer', description: 'Recognizer which recognizes confirmation choices (yes/no).', type: 'object', @@ -1022,7 +1022,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.CurrencyEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Currency Entity Recognizer', description: 'Recognizer which recognizes currency.', type: 'object', @@ -1061,7 +1061,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.DateTimeEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'DateTime Entity Recognizer', description: 'Recognizer which recognizes dates and time fragments.', type: 'object', @@ -1358,7 +1358,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.DimensionEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Dimension Entity Recognizer', description: 'Recognizer which recognizes dimension.', type: 'object', @@ -1545,7 +1545,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.EmailEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Email Entity Recognizer', description: 'Recognizer which recognizes email.', type: 'object', @@ -1788,9 +1788,9 @@ export const appschema: JSONSchema6 = { }, }, }, - 'Microsoft.EntityRecognizer': { + 'Microsoft.EntityRecognizers': { $role: 'unionType', - title: 'Entity Recognizer', + title: 'Entity Recognizers', description: 'Union of components which derive from EntityRecognizer abstract class.', type: 'object', oneOf: [ @@ -1870,9 +1870,9 @@ export const appschema: JSONSchema6 = { $ref: '#/definitions/Microsoft.PhoneNumberEntityRecognizer', }, { - title: 'Microsoft.RegexEntityRecognizer', + title: 'Microsoft.RegExEntityRecognizer', description: 'Recognizer which recognizes patterns of input based on regex.', - $ref: '#/definitions/Microsoft.RegexEntityRecognizer', + $ref: '#/definitions/Microsoft.RegExEntityRecognizer', }, { title: 'Microsoft.TemperatureEntityRecognizer', @@ -1886,7 +1886,6 @@ export const appschema: JSONSchema6 = { }, ], }, - 'Microsoft.Foreach': { $role: 'unionType(Microsoft.IDialog)', title: 'Foreach Action', @@ -2055,7 +2054,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.GuidEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Guid Entity Recognizer', description: 'Recognizer which recognizes guids.', type: 'object', @@ -2094,7 +2093,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.HashtagEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Hashtag Entity Recognizer', description: 'Recognizer which recognizes Hashtags.', type: 'object', @@ -2736,7 +2735,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.IpEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Ip Entity Recognizer', description: 'Recognizer which recognizes internet IP patterns (like 192.1.1.1).', type: 'object', @@ -2928,7 +2927,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.MentionEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Mentions Entity Recognizer', description: 'Recognizer which recognizes @Mentions', type: 'object', @@ -3023,7 +3022,7 @@ export const appschema: JSONSchema6 = { // }, // }, 'Microsoft.NumberEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Number Entity Recognizer', description: 'Recognizer which recognizes numbers.', type: 'object', @@ -3214,7 +3213,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.NumberRangeEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'NumberRange Entity Recognizer', description: 'Recognizer which recognizes ranges of numbers (Example:2 to 5).', type: 'object', @@ -4315,7 +4314,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OrdinalEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Ordinal Entity Recognizer', description: 'Recognizer which recognizes ordinals (example: first, second, 3rd).', type: 'object', @@ -4354,7 +4353,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.PercentageEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Percentage Entity Recognizer', description: 'Recognizer which recognizes percentages.', type: 'object', @@ -4393,7 +4392,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.PhoneNumberEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Phone Number Entity Recognizer', description: 'Recognizer which recognizes phone numbers.', type: 'object', @@ -4507,7 +4506,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.RegexEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Regex Entity Recognizer', description: 'Recognizer which recognizes patterns of input based on regex.', type: 'object', @@ -4977,7 +4976,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.TemperatureEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Temperature Entity Recognizer', description: 'Recognizer which recognizes temperatures.', type: 'object', @@ -5218,7 +5217,7 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.UrlEntityRecognizer': { - $role: 'unionType(Microsoft.EntityRecognizer)', + $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Url Entity Recognizer', description: 'Recognizer which recognizes urls (example: http://bing.com)', type: 'object', From 3267a73db3bd93592cb07ce05dfe89af35534b56 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 11:06:48 -0700 Subject: [PATCH 04/63] extract $ fields to sharable function --- Composer/packages/lib/shared/src/appschema.ts | 1844 +---------------- 1 file changed, 103 insertions(+), 1741 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 6644dfbe25..847f75e6d3 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1,5 +1,7 @@ import { JSONSchema6 } from 'json-schema'; +import { SDKTypes } from './viewUtils'; + export const FIELDS_TO_HIDE = [ '$id', '$type', @@ -21,6 +23,35 @@ export const COMPOUND_TYPES = [ 'Microsoft.OnConversationUpdateActivity', ]; +const $properties = ($type: SDKTypes) => { + return { + $type: { + title: '$type', + description: 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', + type: 'string', + pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', + const: $type, + }, + $copy: { + title: '$copy', + description: 'Copy the definition by id from a .dialog file.', + type: 'string', + pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', + }, + $id: { + title: '$id', + description: 'Inline id for reuse of an inline definition', + type: 'string', + pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', + }, + $designer: { + title: '$designer', + type: 'object', + description: 'Extra information for the Bot Framework Composer.', + }, + }; +}; + export const appschema: JSONSchema6 = { $schema: 'https://raw.githubusercontent.com/Microsoft/botbuilder-tools/SchemaGen/packages/DialogSchema/src/dialogSchema.schema', @@ -34,31 +65,7 @@ export const appschema: JSONSchema6 = { title: 'Microsoft ActivityTemplate', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.ActivityTemplate', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Designer.', - }, + ...$properties(SDKTypes.ActivityTemplate), template: { title: 'Template', Description: 'Language Generator template to use to create the activity', @@ -78,31 +85,7 @@ export const appschema: JSONSchema6 = { description: 'Flexible, data driven dialog that can adapt to the conversation.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.AdaptiveDialog', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.AdaptiveDialog), id: { type: 'string', title: 'Id', @@ -162,31 +145,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes age.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.AgeEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Designer.', - }, + ...$properties(SDKTypes.AgeEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -201,31 +160,7 @@ export const appschema: JSONSchema6 = { description: 'This represents a dialog which gathers an attachment such as image or music', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.AttachmentInput', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.AttachmentInput), id: { type: 'string', title: 'Id', @@ -346,31 +281,7 @@ export const appschema: JSONSchema6 = { description: 'Action which begins another dialog (and when that dialog is done, it will return the caller).', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.BeginDialog', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.BeginDialog), id: { type: 'string', title: 'Id', @@ -423,31 +334,7 @@ export const appschema: JSONSchema6 = { 'Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.CancelAllDialogs', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.CancelAllDialogs), id: { type: 'string', title: 'Id', @@ -517,31 +404,7 @@ export const appschema: JSONSchema6 = { }, }, properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.ChoiceInput', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.ChoiceInput), id: { type: 'string', title: 'Id', @@ -782,31 +645,7 @@ export const appschema: JSONSchema6 = { }, }, properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.ConfirmInput', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.ConfirmInput), id: { type: 'string', title: 'Id', @@ -988,31 +827,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes confirmation choices (yes/no).', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.ConfirmationEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.ConfirmationEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -1027,31 +842,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes currency.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.CurrencyEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.CurrencyEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -1066,31 +857,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes dates and time fragments.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.DateTimeEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.DateTimeEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -1105,31 +872,7 @@ export const appschema: JSONSchema6 = { description: 'This represents a dialog which gathers Date or Time or DateTime from the user', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.DateTimeInput', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.DateTimeInput), id: { type: 'string', title: 'Id', @@ -1249,31 +992,7 @@ export const appschema: JSONSchema6 = { description: 'If debugger is attached, do a debugger break at this point', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.DebugBreak', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.DebugBreak), id: { type: 'string', title: 'Id', @@ -1303,31 +1022,7 @@ export const appschema: JSONSchema6 = { description: 'This is a action which allows you to remove a property from memory', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.DeleteProperty', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.DeleteProperty), id: { type: 'string', title: 'Id', @@ -1363,31 +1058,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes dimension.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.DimensionEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.DimensionEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -1402,31 +1073,7 @@ export const appschema: JSONSchema6 = { description: 'Edit current dialog with changeType and Actions', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.EditActions', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.EditActions), id: { type: 'string', title: 'Id', @@ -1471,31 +1118,7 @@ export const appschema: JSONSchema6 = { description: 'This is a action which allows you to modify an array in memory', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.EditArray', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.EditArray), id: { type: 'string', title: 'Id', @@ -1550,31 +1173,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes email.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.EmailEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.EmailEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -1589,31 +1188,7 @@ export const appschema: JSONSchema6 = { description: 'This is a action which allows you to emit an event', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.EmitEvent', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.EmitEvent), id: { type: 'string', title: 'Id', @@ -1680,31 +1255,7 @@ export const appschema: JSONSchema6 = { description: 'Command which ends the current dialog, returning the resultProperty as the result of the dialog.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.EndDialog', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.EndDialog), id: { type: 'string', title: 'Id', @@ -1740,31 +1291,7 @@ export const appschema: JSONSchema6 = { description: 'End the current turn without ending the dialog.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.EndTurn', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.EndTurn), id: { type: 'string', title: 'Id', @@ -1892,31 +1419,7 @@ export const appschema: JSONSchema6 = { description: 'Action which executes actions per item in a collection.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.Foreach', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.Foreach), id: { type: 'string', title: 'Id', @@ -1976,31 +1479,7 @@ export const appschema: JSONSchema6 = { description: 'Action which execute actions per item page in a collection.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.ForeachPage', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.ForeachPage), id: { type: 'string', title: 'Id', @@ -2059,31 +1538,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes guids.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.GuidEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.GuidEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -2098,35 +1553,11 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes Hashtags.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.HashtagEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, - }, - additionalProperties: false, - patternProperties: { - '^\\$': { + ...$properties(SDKTypes.HashtagEntityRecognizer), + }, + additionalProperties: false, + patternProperties: { + '^\\$': { type: 'string', }, }, @@ -2137,31 +1568,7 @@ export const appschema: JSONSchema6 = { title: 'Http Request', description: 'This is a action which replaces the current dialog with the target dialog', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.HttpRequest', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.HttpRequest), id: { type: 'string', title: 'Id', @@ -2594,31 +2001,7 @@ export const appschema: JSONSchema6 = { description: 'Action which conditionally decides which action to execute next.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.IfCondition', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.IfCondition), id: { type: 'string', title: 'Id', @@ -2673,31 +2056,7 @@ export const appschema: JSONSchema6 = { description: 'This action allows you to innitial a property to either an object or array', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.InitProperty', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.InitProperty), id: { type: 'string', title: 'Id', @@ -2740,31 +2099,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes internet IP patterns (like 192.1.1.1).', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.IpEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.IpEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -2780,31 +2115,7 @@ export const appschema: JSONSchema6 = { type: 'object', additionalProperties: false, properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.LanguagePolicy', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.LanguagePolicy), }, patternProperties: { '^\\$': { @@ -2819,31 +2130,7 @@ export const appschema: JSONSchema6 = { 'This is a action which writes to console.log and optional creates a TraceActivity around a text binding', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.LogAction', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.LogAction), id: { type: 'string', title: 'Id', @@ -2885,31 +2172,7 @@ export const appschema: JSONSchema6 = { type: 'object', additionalProperties: false, properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.LuisRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.LuisRecognizer), applicationId: { type: 'string', }, @@ -2932,31 +2195,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes @Mentions', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.MentionEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.MentionEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -2972,14 +2211,7 @@ export const appschema: JSONSchema6 = { // 'Recognizer which allows you to configure the recognizer per language, and to define the policy for using them', // type: 'object', // properties: { - // $type: { - // title: '$type', - // description: - // 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - // type: 'string', - // pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - // const: 'Microsoft.MultiLanguageRecognizer', - // }, + // ...$properties(SDKTypes.MultiLanguageRecognizer), // $copy: { // title: '$copy', // description: 'Copy the definition by id from a .dialog file.', @@ -3027,31 +2259,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes numbers.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.NumberEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.NumberEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -3066,31 +2274,7 @@ export const appschema: JSONSchema6 = { description: 'This represents a dialog which gathers a decimal number in a specified range', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.NumberInput', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.NumberInput), id: { type: 'string', title: 'Id', @@ -3218,31 +2402,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes ranges of numbers (Example:2 to 5).', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.NumberRangeEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.NumberRangeEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -3257,31 +2417,7 @@ export const appschema: JSONSchema6 = { description: 'This represents a dialog which gathers an OAuth token from user', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OAuthInput', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OAuthInput), id: { type: 'string', title: 'Id', @@ -3416,31 +2552,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an custom activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -3475,31 +2587,7 @@ export const appschema: JSONSchema6 = { $role: 'unionType(Microsoft.IOnEvent)', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnBeginDialog', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnBeginDialog), constraint: { $role: 'expression', title: 'Constraint', @@ -3529,31 +2617,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an ConversationUpdate activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnConversationUpdateActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnConversationUpdateActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -3583,31 +2647,7 @@ export const appschema: JSONSchema6 = { type: 'object', $role: 'unionType(Microsoft.IOnEvent)', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnDialogEvent', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnDialogEvent), constraint: { $role: 'expression', title: 'Constraint', @@ -3656,85 +2696,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an EndOfConversation Activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnEndOfConversationActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, - constraint: { - $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', - examples: ['user.vip == true'], - type: 'string', - }, - actions: { - type: 'array', - description: 'Sequence of actions or dialogs to execute', - items: { - $type: 'Microsoft.IDialog', - $ref: '#/definitions/Microsoft.IDialog', - }, - }, - }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, - }, - 'Microsoft.OnEvent': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'Event Event', - description: 'Defines a rule for an event which is triggered by some source', - type: 'object', - properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnEvent', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnEndOfConversationActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -3764,31 +2726,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an Event activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnEventActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnEventActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -3818,31 +2756,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an Handoff activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnHandoffActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnHandoffActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -3872,31 +2786,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an Intent is recognized (and optionally entities)', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnIntent', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnIntent), constraint: { $role: 'expression', title: 'Constraint', @@ -3939,31 +2829,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an Invoke activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnInvokeActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnInvokeActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -3994,31 +2860,7 @@ export const appschema: JSONSchema6 = { 'This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnMessageActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnMessageActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -4048,31 +2890,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an MessageDelete activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnMessageDeleteActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnMessageDeleteActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -4102,31 +2920,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when a MessageReaction activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnMessageReactionActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnMessageReactionActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -4156,31 +2950,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when an MessageUpdate ctivity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnMessageUpdateActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnMessageUpdateActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -4210,31 +2980,7 @@ export const appschema: JSONSchema6 = { description: 'This defines the actions to take when a Typing activity is received', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnTypingActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnTypingActivity), constraint: { $role: 'expression', title: 'Constraint', @@ -4265,31 +3011,7 @@ export const appschema: JSONSchema6 = { $role: 'unionType(Microsoft.IOnEvent)', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OnUnknownIntent', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OnUnknownIntent), constraint: { $role: 'expression', title: 'Constraint', @@ -4319,31 +3041,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes ordinals (example: first, second, 3rd).', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.OrdinalEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.OrdinalEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -4358,31 +3056,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes percentages.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.PercentageEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.PercentageEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -4397,31 +3071,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes phone numbers.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.PhoneNumberEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.PhoneNumberEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -4437,31 +3087,7 @@ export const appschema: JSONSchema6 = { type: 'object', additionalProperties: false, properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.QnAMakerDialog', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.QnAMakerDialog), endpoint: { type: 'object', title: 'Endpoint', @@ -4511,31 +3137,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes patterns of input based on regex.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.RegexEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.RegExEntityRecognizer), name: { type: 'string', title: 'Name', @@ -4560,31 +3162,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which uses regex expressions to generate intents and entities.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.RegexRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.RegexRecognizer), intents: { type: 'array', title: 'RegEx patterns to intents', @@ -4628,31 +3206,7 @@ export const appschema: JSONSchema6 = { title: 'Repeat Dialog', description: 'This is a action which repeats the current dialog with the same dialog.', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.RepeatDialog', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.RepeatDialog), id: { type: 'string', title: 'Id', @@ -4682,31 +3236,7 @@ export const appschema: JSONSchema6 = { title: 'Replace Dialog', description: 'This is a action which replaces the current dialog with the target dialog', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.ReplaceDialog', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.ReplaceDialog), id: { type: 'string', title: 'Id', @@ -4757,31 +3287,7 @@ export const appschema: JSONSchema6 = { description: 'This is a action which sends an activity to the user', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.SendActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.SendActivity), id: { type: 'string', title: 'Id', @@ -4817,31 +3323,7 @@ export const appschema: JSONSchema6 = { description: 'This action allows you to set memory to the value of an expression', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.SetProperty', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.SetProperty), id: { type: 'string', title: 'Id', @@ -4885,31 +3367,7 @@ export const appschema: JSONSchema6 = { description: 'Action which conditionally decides which action to execute next.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.SwitchCondition', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.SwitchCondition), id: { type: 'string', title: 'Id', @@ -4981,31 +3439,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes temperatures.', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.TemperatureEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.TemperatureEntityRecognizer), }, additionalProperties: false, patternProperties: { @@ -5020,31 +3454,7 @@ export const appschema: JSONSchema6 = { description: 'This represents a dialog which gathers a text from the user', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.TextInput', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.TextInput), id: { type: 'string', title: 'Id', @@ -5166,31 +3576,7 @@ export const appschema: JSONSchema6 = { "This is a debugging message that's used to track progress through the code by emitting events visible in the emulator.", type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.TraceActivity', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.TraceActivity), name: { type: 'string', title: 'Name', @@ -5222,31 +3608,7 @@ export const appschema: JSONSchema6 = { description: 'Recognizer which recognizes urls (example: http://bing.com)', type: 'object', properties: { - $type: { - title: '$type', - description: - 'Defines the valid properties for the component you are configuring (from a dialog .schema file)', - type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', - const: 'Microsoft.UrlEntityRecognizer', - }, - $copy: { - title: '$copy', - description: 'Copy the definition by id from a .dialog file.', - type: 'string', - pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - }, - $id: { - title: '$id', - description: 'Inline id for reuse of an inline definition', - type: 'string', - pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - }, - $designer: { - title: '$designer', - type: 'object', - description: 'Extra information for the Bot Framework Composer.', - }, + ...$properties(SDKTypes.UrlEntityRecognizer), }, additionalProperties: false, patternProperties: { From 69d5e5ea8c095a1e1cca35474eb627928208e9aa Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 11:10:13 -0700 Subject: [PATCH 05/63] update id property --- Composer/packages/lib/shared/src/appschema.ts | 81 +++++++------------ 1 file changed, 27 insertions(+), 54 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 847f75e6d3..b0bdde58b4 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -164,8 +164,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -285,8 +284,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -338,8 +336,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -408,8 +405,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -649,8 +645,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -876,8 +871,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -996,8 +990,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1026,8 +1019,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1077,8 +1069,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1122,8 +1113,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1192,8 +1182,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1259,8 +1248,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1295,8 +1283,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1423,8 +1410,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1483,8 +1469,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -1572,8 +1557,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -2005,8 +1989,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -2060,8 +2043,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -2134,8 +2116,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -2278,8 +2259,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -2421,8 +2401,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -3210,8 +3189,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -3240,8 +3218,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -3291,8 +3268,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -3327,8 +3303,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -3371,8 +3346,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', @@ -3458,8 +3432,7 @@ export const appschema: JSONSchema6 = { id: { type: 'string', title: 'Id', - description: '(Optional) id for the dialog', - examples: ['Dialog2'], + description: 'Optional dialog ID.', }, tags: { type: 'array', From 7e36e94ce96e8b09eb2d4cb7efc1a207c60eeee9 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 11:24:10 -0700 Subject: [PATCH 06/63] input updates --- Composer/packages/lib/shared/src/appschema.ts | 677 +++++------------- 1 file changed, 199 insertions(+), 478 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index b0bdde58b4..95e946f3ab 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -166,104 +166,90 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, prompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Initial Prompt', - description: 'The message to send to as prompt for this input.', + title: 'Initial prompt', + description: 'Message to send to collect information.', examples: ['What is your birth date?'], $ref: '#/definitions/Microsoft.IActivityTemplate', }, unrecognizedPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized Prompt', - description: 'The message to send if the last input is not recognized.', - examples: ["Let's try again. What is your birth date?"], + title: 'Unrecognized prompt', + description: 'Message to send if user response is not recognized.', + examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, invalidPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Invalid Prompt', - description: 'The message to send to when then input was not valid for the input type.', - examples: ['No date was recognized'], + title: 'Invalid prompt', + description: 'Message to send if user response is invalid. Relies on specified validation expressions.', + examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, defaultValueResponse: { $type: 'Microsoft.IActivityTemplate', - title: 'Default Value Response', + title: 'Default value response', description: - 'The message to send to when max turn count has been exceeded and the default value is selected as the value.', + 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', examples: [ - "I didn't understand your responses, so I will just use the default value of 10. Let me know if you want to change it.", + "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", ], $ref: '#/definitions/Microsoft.IActivityTemplate', }, maxTurnCount: { type: 'integer', - title: 'Max Turn Count', - description: 'The max retry count for this prompt.', + title: 'Max turn count', + description: 'Maximum number of re-prompt attempts to collect information.', default: 3, examples: [3], }, validations: { type: 'array', - title: 'Validation Expressions', - description: 'Expressions to validate an input.', + title: 'Validation expressions', + description: 'Expression to validate user input.', + examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], items: { $role: 'expression', type: 'string', description: 'String must contain an expression.', }, }, - value: { - $role: 'expression', - title: 'Value', - description: 'The expression that you evaluated for input.', - type: 'string', - }, property: { $role: 'expression', title: 'Property', - description: 'Property that this input dialog is bound to', - examples: ['$birthday'], + description: + "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", + examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], type: 'string', }, defaultValue: { $role: 'expression', - title: 'Default Value', - description: "Value to return if the value expression can't be evaluated.", + title: 'Default value', + description: 'Expression to examine on each turn of the conversation as possible value to the property.', + examples: ['@userName', 'coalesce(@number, @partySize)'], type: 'string', }, alwaysPrompt: { type: 'boolean', - title: 'Always Prompt', - description: - 'If set to true this will always prompt the user regardless if you already have the value or not.', + title: 'Always prompt', + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, allowInterruptions: { type: 'string', - enum: ['always', 'never', 'notRecognized'], title: 'Allow Interruptions', description: - "Always will always consult parent dialogs first, never will not consult parent dialogs, notRecognized will consult parent only when it's not recognized", - default: 'notRecognized', - examples: ['notRecognized'], + 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', + default: 'true', + examples: ['true'], }, outputFormat: { type: 'string', enum: ['all', 'first'], - title: 'Output Format', - description: 'The attachment output format.', + title: 'Output format', + description: 'Attachment output format.', default: 'first', }, }, @@ -286,15 +272,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, dialog: { $type: 'Microsoft.IDialog', title: 'Dialog', @@ -338,15 +315,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, eventName: { title: 'Event Name', description: 'The name of event to emit', @@ -407,104 +375,90 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, prompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Initial Prompt', - description: 'The message to send to as prompt for this input.', + title: 'Initial prompt', + description: 'Message to send to collect information.', examples: ['What is your birth date?'], $ref: '#/definitions/Microsoft.IActivityTemplate', }, unrecognizedPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized Prompt', - description: 'The message to send if the last input is not recognized.', - examples: ["Let's try again. What is your birth date?"], + title: 'Unrecognized prompt', + description: 'Message to send if user response is not recognized.', + examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, invalidPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Invalid Prompt', - description: 'The message to send to when then input was not valid for the input type.', - examples: ['No date was recognized'], + title: 'Invalid prompt', + description: 'Message to send if user response is invalid. Relies on specified validation expressions.', + examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, defaultValueResponse: { $type: 'Microsoft.IActivityTemplate', - title: 'Default Value Response', + title: 'Default value response', description: - 'The message to send to when max turn count has been exceeded and the default value is selected as the value.', + 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', examples: [ - "I didn't understand your responses, so I will just use the default value of 10. Let me know if you want to change it.", + "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", ], $ref: '#/definitions/Microsoft.IActivityTemplate', }, maxTurnCount: { type: 'integer', - title: 'Max Turn Count', - description: 'The max retry count for this prompt.', + title: 'Max turn count', + description: 'Maximum number of re-prompt attempts to collect information.', default: 3, examples: [3], }, validations: { type: 'array', - title: 'Validation Expressions', - description: 'Expressions to validate an input.', + title: 'Validation expressions', + description: 'Expression to validate user input.', + examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], items: { $role: 'expression', type: 'string', description: 'String must contain an expression.', }, }, - value: { - $role: 'expression', - title: 'Value', - description: 'The expression that you evaluated for input.', - type: 'string', - }, property: { $role: 'expression', title: 'Property', - description: 'Property that this input dialog is bound to', - examples: ['$birthday'], + description: + "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", + examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], type: 'string', }, defaultValue: { $role: 'expression', - title: 'Default Value', - description: "Value to return if the value expression can't be evaluated.", + title: 'Default value', + description: 'Expression to examine on each turn of the conversation as possible value to the property.', + examples: ['@userName', 'coalesce(@number, @partySize)'], type: 'string', }, alwaysPrompt: { type: 'boolean', - title: 'Always Prompt', - description: - 'If set to true this will always prompt the user regardless if you already have the value or not.', + title: 'Always prompt', + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, allowInterruptions: { type: 'string', - enum: ['always', 'never', 'notRecognized'], title: 'Allow Interruptions', description: - "Always will always consult parent dialogs first, never will not consult parent dialogs, notRecognized will consult parent only when it's not recognized", - default: 'notRecognized', - examples: ['notRecognized'], + 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', + default: 'true', + examples: ['true'], }, outputFormat: { type: 'string', enum: ['value', 'index'], - title: 'Output Format', - description: 'The output format.', + title: 'Output format', + description: 'Choice output format.', default: 'value', }, choices: { @@ -647,98 +601,84 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, prompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Initial Prompt', - description: 'The message to send to as prompt for this input.', + title: 'Initial prompt', + description: 'Message to send to collect information.', examples: ['What is your birth date?'], $ref: '#/definitions/Microsoft.IActivityTemplate', }, unrecognizedPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized Prompt', - description: 'The message to send if the last input is not recognized.', - examples: ["Let's try again. What is your birth date?"], + title: 'Unrecognized prompt', + description: 'Message to send if user response is not recognized.', + examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, invalidPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Invalid Prompt', - description: 'The message to send to when then input was not valid for the input type.', - examples: ['No date was recognized'], + title: 'Invalid prompt', + description: 'Message to send if user response is invalid. Relies on specified validation expressions.', + examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, defaultValueResponse: { $type: 'Microsoft.IActivityTemplate', - title: 'Default Value Response', + title: 'Default value response', description: - 'The message to send to when max turn count has been exceeded and the default value is selected as the value.', + 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', examples: [ - "I didn't understand your responses, so I will just use the default value of 10. Let me know if you want to change it.", + "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", ], $ref: '#/definitions/Microsoft.IActivityTemplate', }, maxTurnCount: { type: 'integer', - title: 'Max Turn Count', - description: 'The max retry count for this prompt.', + title: 'Max turn count', + description: 'Maximum number of re-prompt attempts to collect information.', default: 3, examples: [3], }, validations: { type: 'array', - title: 'Validation Expressions', - description: 'Expressions to validate an input.', + title: 'Validation expressions', + description: 'Expression to validate user input.', + examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], items: { $role: 'expression', type: 'string', description: 'String must contain an expression.', }, }, - value: { - $role: 'expression', - title: 'Value', - description: 'The expression that you evaluated for input.', - type: 'string', - }, property: { $role: 'expression', title: 'Property', - description: 'Property that this input dialog is bound to', - examples: ['$birthday'], + description: + "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", + examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], type: 'string', }, defaultValue: { $role: 'expression', - title: 'Default Value', - description: "Value to return if the value expression can't be evaluated.", + title: 'Default value', + description: 'Expression to examine on each turn of the conversation as possible value to the property.', + examples: ['@userName', 'coalesce(@number, @partySize)'], type: 'string', }, alwaysPrompt: { type: 'boolean', - title: 'Always Prompt', - description: - 'If set to true this will always prompt the user regardless if you already have the value or not.', + title: 'Always prompt', + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, allowInterruptions: { type: 'string', - enum: ['always', 'never', 'notRecognized'], title: 'Allow Interruptions', description: - "Always will always consult parent dialogs first, never will not consult parent dialogs, notRecognized will consult parent only when it's not recognized", - default: 'notRecognized', - examples: ['notRecognized'], + 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', + default: 'true', + examples: ['true'], }, defaultLocale: { type: 'string', @@ -873,98 +813,84 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, prompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Initial Prompt', - description: 'The message to send to as prompt for this input.', + title: 'Initial prompt', + description: 'Message to send to collect information.', examples: ['What is your birth date?'], $ref: '#/definitions/Microsoft.IActivityTemplate', }, unrecognizedPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized Prompt', - description: 'The message to send if the last input is not recognized.', - examples: ["Let's try again. What is your birth date?"], + title: 'Unrecognized prompt', + description: 'Message to send if user response is not recognized.', + examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, invalidPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Invalid Prompt', - description: 'The message to send to when then input was not valid for the input type.', - examples: ['No date was recognized'], + title: 'Invalid prompt', + description: 'Message to send if user response is invalid. Relies on specified validation expressions.', + examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, defaultValueResponse: { $type: 'Microsoft.IActivityTemplate', - title: 'Default Value Response', + title: 'Default value response', description: - 'The message to send to when max turn count has been exceeded and the default value is selected as the value.', + 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', examples: [ - "I didn't understand your responses, so I will just use the default value of 10. Let me know if you want to change it.", + "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", ], $ref: '#/definitions/Microsoft.IActivityTemplate', }, maxTurnCount: { type: 'integer', - title: 'Max Turn Count', - description: 'The max retry count for this prompt.', + title: 'Max turn count', + description: 'Maximum number of re-prompt attempts to collect information.', default: 3, examples: [3], }, validations: { type: 'array', - title: 'Validation Expressions', - description: 'Expressions to validate an input.', + title: 'Validation expressions', + description: 'Expression to validate user input.', + examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], items: { $role: 'expression', type: 'string', description: 'String must contain an expression.', }, }, - value: { - $role: 'expression', - title: 'Value', - description: 'The expression that you evaluated for input.', - type: 'string', - }, property: { $role: 'expression', title: 'Property', - description: 'Property that this input dialog is bound to', - examples: ['$birthday'], + description: + "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", + examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], type: 'string', }, defaultValue: { $role: 'expression', - title: 'Default Value', - description: "Value to return if the value expression can't be evaluated.", + title: 'Default value', + description: 'Expression to examine on each turn of the conversation as possible value to the property.', + examples: ['@userName', 'coalesce(@number, @partySize)'], type: 'string', }, alwaysPrompt: { type: 'boolean', - title: 'Always Prompt', - description: - 'If set to true this will always prompt the user regardless if you already have the value or not.', + title: 'Always prompt', + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, allowInterruptions: { type: 'string', - enum: ['always', 'never', 'notRecognized'], title: 'Allow Interruptions', description: - "Always will always consult parent dialogs first, never will not consult parent dialogs, notRecognized will consult parent only when it's not recognized", - default: 'notRecognized', - examples: ['notRecognized'], + 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', + default: 'true', + examples: ['true'], }, defaultLocale: { type: 'string', @@ -992,15 +918,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, }, additionalProperties: false, patternProperties: { @@ -1021,15 +938,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, property: { $role: 'expression', title: 'Property', @@ -1071,15 +979,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, changeType: { type: 'string', title: 'Change Type', @@ -1115,15 +1014,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, changeType: { type: 'string', title: 'Change Type', @@ -1184,15 +1074,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, eventName: { title: 'Event Name', description: 'The name of event to emit', @@ -1250,15 +1131,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, property: { $role: 'expression', description: 'Specifies a path to memory should be returned as the result to the calling dialog.', @@ -1285,15 +1157,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, }, additionalProperties: false, patternProperties: { @@ -1412,15 +1275,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, listProperty: { $role: 'expression', title: 'List Property', @@ -1471,15 +1325,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, listProperty: { $role: 'expression', title: 'List Property', @@ -1559,15 +1404,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, method: { type: 'string', title: 'Method', @@ -1991,15 +1827,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, condition: { $role: 'expression', title: 'Condition', @@ -2045,15 +1872,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, property: { $role: 'expression', title: 'Property', @@ -2118,15 +1936,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, text: { type: 'string', title: 'Text', @@ -2261,111 +2070,96 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, prompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Initial Prompt', - description: 'The message to send to as prompt for this input.', + title: 'Initial prompt', + description: 'Message to send to collect information.', examples: ['What is your birth date?'], $ref: '#/definitions/Microsoft.IActivityTemplate', }, unrecognizedPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized Prompt', - description: 'The message to send if the last input is not recognized.', - examples: ["Let's try again. What is your birth date?"], + title: 'Unrecognized prompt', + description: 'Message to send if user response is not recognized.', + examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, invalidPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Invalid Prompt', - description: 'The message to send to when then input was not valid for the input type.', - examples: ['No date was recognized'], + title: 'Invalid prompt', + description: 'Message to send if user response is invalid. Relies on specified validation expressions.', + examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, defaultValueResponse: { $type: 'Microsoft.IActivityTemplate', - title: 'Default Value Response', + title: 'Default value response', description: - 'The message to send to when max turn count has been exceeded and the default value is selected as the value.', + 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', examples: [ - "I didn't understand your responses, so I will just use the default value of 10. Let me know if you want to change it.", + "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", ], $ref: '#/definitions/Microsoft.IActivityTemplate', }, maxTurnCount: { type: 'integer', - title: 'Max Turn Count', - description: 'The max retry count for this prompt.', + title: 'Max turn count', + description: 'Maximum number of re-prompt attempts to collect information.', default: 3, examples: [3], }, validations: { type: 'array', - title: 'Validation Expressions', - description: - 'These are expressions used to validate the customer response. The response is considered invalid if any of these evaluate to false.', + title: 'Validation expressions', + description: 'Expression to validate user input.', + examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], items: { $role: 'expression', type: 'string', description: 'String must contain an expression.', }, }, - value: { - $role: 'expression', - title: 'Value', - description: 'The expression that you evaluated for input.', - type: 'string', - }, property: { $role: 'expression', title: 'Property', - description: 'Property that this input dialog is bound to', - examples: ['$birthday'], + description: + "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", + examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], type: 'string', }, defaultValue: { $role: 'expression', - title: 'Default Value', - description: "Value to return if the value expression can't be evaluated.", + title: 'Default value', + description: 'Expression to examine on each turn of the conversation as possible value to the property.', + examples: ['@userName', 'coalesce(@number, @partySize)'], type: 'string', }, alwaysPrompt: { type: 'boolean', - title: 'Always Prompt', - description: - 'If set to true this will always prompt the user regardless if you already have the value or not.', + title: 'Always prompt', + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, allowInterruptions: { type: 'string', - enum: ['always', 'never', 'notRecognized'], title: 'Allow Interruptions', description: - "Always will always consult parent dialogs first, never will not consult parent dialogs, notRecognized will consult parent only when it's not recognized", - default: 'notRecognized', - examples: ['notRecognized'], + 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', + default: 'true', + examples: ['true'], }, outputFormat: { type: 'string', enum: ['float', 'integer'], - title: 'Output Format', - description: 'The NumberInput output format.', + title: 'Output format', + description: 'Number output format.', default: 'float', }, defaultLocale: { type: 'string', - title: 'Default Locale', - description: 'The prompts default locale that should be recognized.', + title: 'Default locale', + description: 'Default locale.', default: 'en-us', }, }, @@ -2403,98 +2197,84 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, prompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Initial Prompt', - description: 'The message to send to as prompt for this input.', + title: 'Initial prompt', + description: 'Message to send to collect information.', examples: ['What is your birth date?'], $ref: '#/definitions/Microsoft.IActivityTemplate', }, unrecognizedPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized Prompt', - description: 'The message to send if the last input is not recognized.', - examples: ["Let's try again. What is your birth date?"], + title: 'Unrecognized prompt', + description: 'Message to send if user response is not recognized.', + examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, invalidPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Invalid Prompt', - description: 'The message to send to when then input was not valid for the input type.', - examples: ['No date was recognized'], + title: 'Invalid prompt', + description: 'Message to send if user response is invalid. Relies on specified validation expressions.', + examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, defaultValueResponse: { $type: 'Microsoft.IActivityTemplate', - title: 'Default Value Response', + title: 'Default value response', description: - 'The message to send to when max turn count has been exceeded and the default value is selected as the value.', + 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', examples: [ - "I didn't understand your responses, so I will just use the default value of 10. Let me know if you want to change it.", + "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", ], $ref: '#/definitions/Microsoft.IActivityTemplate', }, maxTurnCount: { type: 'integer', - title: 'Max Turn Count', - description: 'The max retry count for this prompt.', + title: 'Max turn count', + description: 'Maximum number of re-prompt attempts to collect information.', default: 3, examples: [3], }, validations: { type: 'array', - title: 'Validation Expressions', - description: 'Expressions to validate an input.', + title: 'Validation expressions', + description: 'Expression to validate user input.', + examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], items: { $role: 'expression', type: 'string', description: 'String must contain an expression.', }, }, - value: { - $role: 'expression', - title: 'Value', - description: 'The expression that you evaluated for input.', - type: 'string', - }, property: { $role: 'expression', title: 'Property', - description: 'Property that this input dialog is bound to', - examples: ['$birthday'], + description: + "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", + examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], type: 'string', }, defaultValue: { $role: 'expression', - title: 'Default Value', - description: "Value to return if the value expression can't be evaluated.", + title: 'Default value', + description: 'Expression to examine on each turn of the conversation as possible value to the property.', + examples: ['@userName', 'coalesce(@number, @partySize)'], type: 'string', }, alwaysPrompt: { type: 'boolean', - title: 'Always Prompt', - description: - 'If set to true this will always prompt the user regardless if you already have the value or not.', + title: 'Always prompt', + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, allowInterruptions: { type: 'string', - enum: ['always', 'never', 'notRecognized'], title: 'Allow Interruptions', description: - "Always will always consult parent dialogs first, never will not consult parent dialogs, notRecognized will consult parent only when it's not recognized", - default: 'notRecognized', - examples: ['notRecognized'], + 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', + default: 'true', + examples: ['true'], }, connectionName: { type: 'string', @@ -3191,15 +2971,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, }, additionalProperties: false, patternProperties: { @@ -3220,15 +2991,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, dialog: { $type: 'Microsoft.IDialog', title: 'Dialog', @@ -3270,15 +3032,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, activity: { $type: 'Microsoft.IActivityTemplate', title: 'Activity', @@ -3305,15 +3058,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, property: { $role: 'expression', title: 'Property', @@ -3348,15 +3092,6 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, condition: { $role: 'expression', title: 'Condition', @@ -3434,104 +3169,90 @@ export const appschema: JSONSchema6 = { title: 'Id', description: 'Optional dialog ID.', }, - tags: { - type: 'array', - title: 'Tags', - description: 'Tags are optional strings that you can use to organize components', - examples: ['input', 'confirmation'], - items: { - type: 'string', - }, - }, prompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Initial Prompt', - description: 'The message to send to as prompt for this input.', + title: 'Initial prompt', + description: 'Message to send to collect information.', examples: ['What is your birth date?'], $ref: '#/definitions/Microsoft.IActivityTemplate', }, unrecognizedPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized Prompt', - description: 'The message to send if the last input is not recognized.', - examples: ["Let's try again. What is your birth date?"], + title: 'Unrecognized prompt', + description: 'Message to send if user response is not recognized.', + examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, invalidPrompt: { $type: 'Microsoft.IActivityTemplate', - title: 'Invalid Prompt', - description: 'The message to send to when then input was not valid for the input type.', - examples: ['No date was recognized'], + title: 'Invalid prompt', + description: 'Message to send if user response is invalid. Relies on specified validation expressions.', + examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], $ref: '#/definitions/Microsoft.IActivityTemplate', }, defaultValueResponse: { $type: 'Microsoft.IActivityTemplate', - title: 'Default Value Response', + title: 'Default value response', description: - 'The message to send to when max turn count has been exceeded and the default value is selected as the value.', + 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', examples: [ - "I didn't understand your responses, so I will just use the default value of 10. Let me know if you want to change it.", + "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", ], $ref: '#/definitions/Microsoft.IActivityTemplate', }, maxTurnCount: { type: 'integer', - title: 'Max Turn Count', - description: 'The max retry count for this prompt.', + title: 'Max turn count', + description: 'Maximum number of re-prompt attempts to collect information.', default: 3, examples: [3], }, validations: { type: 'array', - title: 'Validation Expressions', - description: 'Expressions to validate an input.', + title: 'Validation expressions', + description: 'Expression to validate user input.', + examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], items: { $role: 'expression', type: 'string', description: 'String must contain an expression.', }, }, - value: { - $role: 'expression', - title: 'Value', - description: 'The expression that you evaluated for input.', - type: 'string', - }, property: { $role: 'expression', title: 'Property', - description: 'Property that this input dialog is bound to', - examples: ['$birthday'], + description: + "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", + examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], type: 'string', }, defaultValue: { $role: 'expression', - title: 'Default Value', - description: "Value to return if the value expression can't be evaluated.", + title: 'Default value', + description: 'Expression to examine on each turn of the conversation as possible value to the property.', + examples: ['@userName', 'coalesce(@number, @partySize)'], type: 'string', }, alwaysPrompt: { type: 'boolean', - title: 'Always Prompt', - description: - 'If set to true this will always prompt the user regardless if you already have the value or not.', + title: 'Always prompt', + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, allowInterruptions: { type: 'string', - enum: ['always', 'never', 'notRecognized'], title: 'Allow Interruptions', description: - "Always will always consult parent dialogs first, never will not consult parent dialogs, notRecognized will consult parent only when it's not recognized", - default: 'notRecognized', - examples: ['notRecognized'], + 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', + default: 'true', + examples: ['true'], }, outputFormat: { type: 'string', enum: ['none', 'trim', 'lowercase', 'uppercase'], - title: 'Output Format', - description: 'The TextInput output format.', + title: 'Output format', + description: 'Format of output.', default: 'none', }, }, From 885d03ff9e4648f16c41ef77df9c183961eece38 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 13:46:08 -0700 Subject: [PATCH 07/63] update BeginDialog --- Composer/packages/lib/shared/src/appschema.ts | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 95e946f3ab..b0e6ece21d 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -263,35 +263,32 @@ export const appschema: JSONSchema6 = { 'Microsoft.BeginDialog': { $role: 'unionType(Microsoft.IDialog)', title: 'Begin Dialog', - description: 'Action which begins another dialog (and when that dialog is done, it will return the caller).', + description: 'Begin another dialog.', type: 'object', properties: { ...$properties(SDKTypes.BeginDialog), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, dialog: { $type: 'Microsoft.IDialog', - title: 'Dialog', - description: 'This is the dialog to call.', + title: 'Dialog name', + description: 'Name of the dialog to call.', + examples: ['AddToDoDialog'], + // Composer override type: 'string', }, options: { type: 'object', - title: 'Options binding', - description: 'Bindings to configure the options object to pass to the dialog.', + title: 'Options', + description: 'One or more options that are passed to the dialog that is called.', additionalProperties: { type: 'string', title: 'Options', }, }, - property: { + resultProperty: { $role: 'expression', title: 'Property', - description: 'The property to bind to the dialog and store the result in', - examples: ['user.name'], + description: 'Property to store any value returned by the dialog that is called.', + examples: ['dialog.userName'], type: 'string', }, }, From 401418f34e7bd008702e7b7b7ed12f4c27f8d525 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 13:47:53 -0700 Subject: [PATCH 08/63] update CancelAllDialogs --- Composer/packages/lib/shared/src/appschema.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index b0e6ece21d..0d841a3241 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -301,26 +301,21 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.CancelAllDialogs': { $role: 'unionType(Microsoft.IDialog)', - title: 'Cancel All Dialogs', + title: 'Cancel all dialogs', description: - 'Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.', + 'Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.', type: 'object', properties: { ...$properties(SDKTypes.CancelAllDialogs), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, eventName: { - title: 'Event Name', - description: 'The name of event to emit', + title: 'Event name', + description: 'Name of the event to emit.', type: 'string', }, eventValue: { type: 'object', - title: 'Event Value', - description: 'Optional value to emit along with the event', + title: 'Event value', + description: 'Value to emit with the event (optional).', additionalProperties: true, }, }, From 28da894ed2374a9f87794a657f99e145180ab061 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 13:55:55 -0700 Subject: [PATCH 09/63] update ChoiceInput --- Composer/packages/lib/shared/src/appschema.ts | 64 ++++++------------- 1 file changed, 18 insertions(+), 46 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 0d841a3241..090d216927 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -328,38 +328,9 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.ChoiceInput': { $role: 'unionType(Microsoft.IDialog)', - title: 'ChoiceInput Dialog', - description: 'This represents a dialog which gathers a choice responses', + title: 'Choice input dialog', + description: 'Collect information - Pick from a list of choices', type: 'object', - definitions: { - choice: { - type: 'object', - properties: { - value: { - type: 'string', - title: 'Value', - description: 'the value to return when selected.', - }, - action: { - title: 'Action', - description: 'Card action for the choice', - type: 'object', - additionalProperties: true, - }, - synonyms: { - type: 'array', - title: 'Synonyms', - description: 'the list of synonyms to recognize in addition to the value. This is optional.', - items: { - type: 'string', - }, - }, - }, - }, - cardAction: { - type: 'object', - }, - }, properties: { ...$properties(SDKTypes.ChoiceInput), id: { @@ -453,6 +424,7 @@ export const appschema: JSONSchema6 = { description: 'Choice output format.', default: 'value', }, + // TODO: support oneOf choices: { type: 'array', items: { @@ -461,7 +433,7 @@ export const appschema: JSONSchema6 = { value: { type: 'string', title: 'Value', - description: 'the value to return when selected.', + description: 'Value to return when this choice is selected.', }, // action: { // title: 'Action', @@ -471,7 +443,7 @@ export const appschema: JSONSchema6 = { synonyms: { type: 'array', title: 'Synonyms', - description: 'the list of synonyms to recognize in addition to the value. This is optional.', + description: 'List of synonyms to recognize in addition to the value (optional).', items: { type: 'string', }, @@ -487,15 +459,15 @@ export const appschema: JSONSchema6 = { }, defaultLocale: { type: 'string', - title: 'Default Locale', - description: 'The prompts default locale that should be recognized.', + title: 'Default locale', + description: 'Default locale.', default: 'en-us', }, style: { type: 'string', enum: ['None', 'Auto', 'Inline', 'List', 'SuggestedAction', 'HeroCard'], - title: 'List Style', - description: 'The kind of choice list style to generate', + title: 'List style', + description: 'Style to render choices.', default: 'Auto', }, choiceOptions: { @@ -503,26 +475,26 @@ export const appschema: JSONSchema6 = { properties: { inlineSeparator: { type: 'string', - title: 'Inline Seperator', + title: 'Inline seperator', description: 'Character used to separate individual choices when there are more than 2 choices', default: ', ', }, inlineOr: { type: 'string', - title: 'Inline Or', - description: 'Separator inserted between the choices when their are only 2 choices', + title: 'Inline or', + description: 'Separator inserted between the choices when there are only 2 choices', default: ' or ', }, inlineOrMore: { type: 'string', - title: 'Inline OrMore', - description: 'Separator inserted between the last 2 choices when their are more than 2 choices.', + title: 'Inline or more', + description: 'Separator inserted between the last 2 choices when there are more than 2 choices.', default: ', or ', }, includeNumbers: { type: 'boolean', - title: 'Include Numbers', - description: 'If true, inline and list style choices will be prefixed with the index of the choice.', + title: 'Include numbers', + description: "If true, 'inline' and 'list' list style will be prefixed with the index of the choice.", default: true, }, }, @@ -533,13 +505,13 @@ export const appschema: JSONSchema6 = { properties: { noValue: { type: 'boolean', - title: 'No Value', + title: 'No value', description: 'If true, the choices value field will NOT be search over', default: false, }, // noAction: { // type: 'boolean', - // title: 'No Action', + // title: 'No vction', // description: 'If true, the the choices action.title field will NOT be searched over', // default: false, // }, From a766b4a0e04260a89fe5e9b972b88effed868572 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 13:56:55 -0700 Subject: [PATCH 10/63] add ConditionalSelector --- Composer/packages/lib/shared/src/appschema.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 090d216927..0295e29ed0 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -525,6 +525,34 @@ export const appschema: JSONSchema6 = { }, }, }, + 'Microsoft.ConditionalSelector': { + $role: 'unionType(Microsoft.ITriggerSelector)', + title: 'Condtional Trigger Selector', + description: 'Use a rule selector based on a condition', + type: 'object', + properties: { + ...$properties(SDKTypes.ConditionalSelector), + condition: { + $role: 'expression', + type: 'string', + description: 'String must contain an expression.', + }, + ifTrue: { + $type: 'Microsoft.ITriggerSelector', + $ref: '#/definitions/Microsoft.ITriggerSelector', + }, + ifFalse: { + $type: 'Microsoft.ITriggerSelector', + $ref: '#/definitions/Microsoft.ITriggerSelector', + }, + }, + additionalProperties: false, + patternProperties: { + '^\\$': { + type: 'string', + }, + }, + }, 'Microsoft.ConfirmInput': { $role: 'unionType(Microsoft.IDialog)', title: 'ConfirmInput Dialog', From 171cec2cb4d2e31ddba0817c38ea7b692db0ceca Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:00:04 -0700 Subject: [PATCH 11/63] update ConfirmInput --- Composer/packages/lib/shared/src/appschema.ts | 64 ++++++------------- 1 file changed, 18 insertions(+), 46 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 0295e29ed0..d660626d69 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -233,7 +233,7 @@ export const appschema: JSONSchema6 = { alwaysPrompt: { type: 'boolean', title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, @@ -405,7 +405,7 @@ export const appschema: JSONSchema6 = { alwaysPrompt: { type: 'boolean', title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, @@ -555,37 +555,9 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.ConfirmInput': { $role: 'unionType(Microsoft.IDialog)', - title: 'ConfirmInput Dialog', - description: 'This represents a dialog which gathers a yes/no style responses', + title: 'Confirm input dialog', + description: 'Collect information - Ask for confirmation (yes or no).', type: 'object', - definitions: { - choice: { - type: 'object', - properties: { - value: { - type: 'string', - title: 'Value', - description: 'the value to return when selected.', - }, - action: { - title: 'Action', - description: 'Card action for the choice', - type: 'object', - }, - synonyms: { - type: 'array', - title: 'Synonyms', - description: 'The list of synonyms to recognize in addition to the value. This is optional.', - items: { - type: 'string', - }, - }, - }, - }, - CardAction: { - type: 'object', - }, - }, properties: { ...$properties(SDKTypes.ConfirmInput), id: { @@ -660,7 +632,7 @@ export const appschema: JSONSchema6 = { alwaysPrompt: { type: 'boolean', title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, @@ -681,8 +653,8 @@ export const appschema: JSONSchema6 = { style: { type: 'string', enum: ['None', 'Auto', 'Inline', 'List', 'SuggestedAction', 'HeroCard'], - title: 'List Style', - description: 'The kind of choice list style to generate', + title: 'List style', + description: 'Style to render choices.', default: 'Auto', }, choiceOptions: { @@ -690,25 +662,25 @@ export const appschema: JSONSchema6 = { properties: { inlineSeparator: { type: 'string', - title: 'Inline Seperator', + title: 'Inline separator', description: 'Character used to separate individual choices when there are more than 2 choices', default: ', ', }, inlineOr: { type: 'string', - title: 'Inline Or', + title: 'Inline or', description: 'Separator inserted between the choices when their are only 2 choices', default: ' or ', }, inlineOrMore: { type: 'string', - title: 'Inline OrMore', + title: 'Inline or more', description: 'Separator inserted between the last 2 choices when their are more than 2 choices.', default: ', or ', }, includeNumbers: { type: 'boolean', - title: 'Include Numbers', + title: 'Include numbers', description: 'If true, inline and list style choices will be prefixed with the index of the choice.', default: true, }, @@ -722,17 +694,17 @@ export const appschema: JSONSchema6 = { value: { type: 'string', title: 'Value', - description: 'the value to return when selected.', + description: 'Value to return when this choice is selected.', }, // action: { + // type: 'object', // title: 'Action', // description: 'Card action for the choice', - // type: 'object', // }, synonyms: { type: 'array', title: 'Synonyms', - description: 'The list of synonyms to recognize in addition to the value. This is optional.', + description: 'List of synonyms to recognize in addition to the value (optional)', items: { type: 'string', }, @@ -872,7 +844,7 @@ export const appschema: JSONSchema6 = { alwaysPrompt: { type: 'boolean', title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, @@ -2129,7 +2101,7 @@ export const appschema: JSONSchema6 = { alwaysPrompt: { type: 'boolean', title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, @@ -2256,7 +2228,7 @@ export const appschema: JSONSchema6 = { alwaysPrompt: { type: 'boolean', title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, @@ -3228,7 +3200,7 @@ export const appschema: JSONSchema6 = { alwaysPrompt: { type: 'boolean', title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", + description: "Collect information even if the specified 'property' is not empty.", default: false, examples: [false], }, From 29e2afe76b28d594f06bce44335bb58c3fc4ee7f Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:02:05 -0700 Subject: [PATCH 12/63] update DateTimeInput --- Composer/packages/lib/shared/src/appschema.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index d660626d69..36601ae3d8 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -767,8 +767,8 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.DateTimeInput': { $role: 'unionType(Microsoft.IDialog)', - title: 'DateTimeInput Dialog', - description: 'This represents a dialog which gathers Date or Time or DateTime from the user', + title: 'Date/time input dialog', + description: 'Collect information - Ask for date and/ or time', type: 'object', properties: { ...$properties(SDKTypes.DateTimeInput), @@ -858,8 +858,8 @@ export const appschema: JSONSchema6 = { }, defaultLocale: { type: 'string', - title: 'Default Locale', - description: 'The prompts default locale that should be recognized.', + title: 'Default locale', + description: 'Default locale.', default: 'en-us', }, }, From b0ed108af18f421f36841694d7c8c4b1d621e569 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:02:50 -0700 Subject: [PATCH 13/63] update DebugBreak --- Composer/packages/lib/shared/src/appschema.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 36601ae3d8..731ac261f4 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -872,16 +872,11 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.DebugBreak': { $role: 'unionType(Microsoft.IDialog)', - title: 'Debugger Break Action', - description: 'If debugger is attached, do a debugger break at this point', + title: 'Debugger break', + description: 'If debugger is attached, stop the execution at this point in the conversation.', type: 'object', properties: { ...$properties(SDKTypes.DebugBreak), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, }, additionalProperties: false, patternProperties: { From 93f1334857b5b6dc3d2a4836b84efd874c298413 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:03:20 -0700 Subject: [PATCH 14/63] remove extraneous fields --- Composer/packages/lib/shared/src/appschema.ts | 390 ------------------ 1 file changed, 390 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 731ac261f4..08e1ca1095 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -72,12 +72,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.AdaptiveDialog': { $role: 'unionType(Microsoft.IDialog)', @@ -132,12 +126,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.AgeEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -147,12 +135,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.AgeEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.AttachmentInput': { $role: 'unionType(Microsoft.IDialog)', @@ -253,12 +235,6 @@ export const appschema: JSONSchema6 = { default: 'first', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.BeginDialog': { $role: 'unionType(Microsoft.IDialog)', @@ -292,12 +268,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.CancelAllDialogs': { $role: 'unionType(Microsoft.IDialog)', @@ -319,12 +289,6 @@ export const appschema: JSONSchema6 = { additionalProperties: true, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.ChoiceInput': { $role: 'unionType(Microsoft.IDialog)', @@ -518,12 +482,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.ConditionalSelector': { $role: 'unionType(Microsoft.ITriggerSelector)', @@ -546,12 +504,6 @@ export const appschema: JSONSchema6 = { $ref: '#/definitions/Microsoft.ITriggerSelector', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.ConfirmInput': { $role: 'unionType(Microsoft.IDialog)', @@ -713,12 +665,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.ConfirmationEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -728,12 +674,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.ConfirmationEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.CurrencyEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -743,12 +683,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.CurrencyEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.DateTimeEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -758,12 +692,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.DateTimeEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.DateTimeInput': { $role: 'unionType(Microsoft.IDialog)', @@ -863,12 +791,6 @@ export const appschema: JSONSchema6 = { default: 'en-us', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.DebugBreak': { $role: 'unionType(Microsoft.IDialog)', @@ -878,12 +800,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.DebugBreak), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.DeleteProperty': { $role: 'unionType(Microsoft.IDialog)', @@ -904,12 +820,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.DimensionEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -919,12 +829,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.DimensionEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.EditActions': { $role: 'unionType(Microsoft.IDialog)', @@ -954,12 +858,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.EditArray': { $role: 'unionType(Microsoft.IDialog)', @@ -999,12 +897,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.EmailEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -1014,12 +906,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.EmailEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.EmitEvent': { $role: 'unionType(Microsoft.IDialog)', @@ -1071,12 +957,6 @@ export const appschema: JSONSchema6 = { description: 'If true this event should propagate to parent dialogs', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.EndDialog': { $role: 'unionType(Microsoft.IDialog)', @@ -1097,12 +977,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.EndTurn': { $role: 'unionType(Microsoft.IDialog)', @@ -1117,12 +991,6 @@ export const appschema: JSONSchema6 = { description: 'Optional dialog ID.', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.EntityRecognizers': { $role: 'unionType', @@ -1265,12 +1133,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.ForeachPage': { $role: 'unionType(Microsoft.IDialog)', @@ -1314,12 +1176,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.GuidEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -1329,12 +1185,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.GuidEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.HashtagEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -1344,12 +1194,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.HashtagEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.HttpRequest': { $role: 'unionType(Microsoft.IDialog)', @@ -1406,12 +1250,6 @@ export const appschema: JSONSchema6 = { default: 'Json', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.IActivityTemplate': { title: 'Microsoft ActivityTemplate', @@ -1812,12 +1650,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.InitProperty': { $role: 'unionType(Microsoft.IDialog)', @@ -1845,12 +1677,6 @@ export const appschema: JSONSchema6 = { enum: ['object', 'array'], }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.IpEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -1860,12 +1686,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.IpEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.LanguagePolicy': { $role: 'unionType(Microsoft.ILanguagePolicy)', @@ -1907,12 +1727,6 @@ export const appschema: JSONSchema6 = { default: false, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.LuisRecognizer': { $role: 'unionType(Microsoft.IRecognizer)', @@ -1946,12 +1760,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.MentionEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, // 'Microsoft.MultiLanguageRecognizer': { // $role: 'unionType(Microsoft.IRecognizer)', @@ -2010,12 +1818,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.NumberEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.NumberInput': { $role: 'unionType(Microsoft.IDialog)', @@ -2122,12 +1924,6 @@ export const appschema: JSONSchema6 = { default: 'en-us', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.NumberRangeEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -2137,12 +1933,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.NumberRangeEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OAuthInput': { $role: 'unionType(Microsoft.IDialog)', @@ -2257,12 +2047,6 @@ export const appschema: JSONSchema6 = { default: '900000', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2292,12 +2076,6 @@ export const appschema: JSONSchema6 = { description: 'Activity type', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnBeginDialog': { title: 'OnBeginDialog', @@ -2322,12 +2100,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnConversationUpdateActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2352,12 +2124,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnDialogEvent': { title: 'Event Event', @@ -2401,12 +2167,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnEndOfConversationActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2431,12 +2191,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnEventActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2461,12 +2215,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnHandoffActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2491,12 +2239,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnIntent': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2534,12 +2276,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnInvokeActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2564,12 +2300,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnMessageActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2595,12 +2325,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnMessageDeleteActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2625,12 +2349,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnMessageReactionActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2655,12 +2373,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnMessageUpdateActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2685,12 +2397,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnTypingActivity': { $role: 'unionType(Microsoft.IOnEvent)', @@ -2715,12 +2421,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OnUnknownIntent': { title: 'OnUnknownIntent', @@ -2746,12 +2446,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.OrdinalEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -2761,12 +2455,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.OrdinalEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.PercentageEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -2776,12 +2464,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.PercentageEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.PhoneNumberEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -2791,12 +2473,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.PhoneNumberEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.QnAMakerDialog': { $role: 'unionType(Microsoft.IDialog)', @@ -2867,12 +2543,6 @@ export const appschema: JSONSchema6 = { description: 'Pattern expressed as regular expression.', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.RegexRecognizer': { $role: 'unionType(Microsoft.IRecognizer)', @@ -2911,12 +2581,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.RepeatDialog': { $role: 'unionType(Microsoft.IDialog)', @@ -2931,12 +2595,6 @@ export const appschema: JSONSchema6 = { description: 'Optional dialog ID.', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.ReplaceDialog': { $role: 'unionType(Microsoft.IDialog)', @@ -2972,12 +2630,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.SendActivity': { $role: 'unionType(Microsoft.IDialog)', @@ -2998,12 +2650,6 @@ export const appschema: JSONSchema6 = { $ref: '#/definitions/Microsoft.IActivityTemplate', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.SetProperty': { $role: 'unionType(Microsoft.IDialog)', @@ -3032,12 +2678,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.SwitchCondition': { $role: 'unionType(Microsoft.IDialog)', @@ -3094,12 +2734,6 @@ export const appschema: JSONSchema6 = { }, }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.TemperatureEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -3109,12 +2743,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.TemperatureEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.TextInput': { $role: 'unionType(Microsoft.IDialog)', @@ -3215,12 +2843,6 @@ export const appschema: JSONSchema6 = { default: 'none', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.TraceActivity': { $role: 'unionType(Microsoft.IDialog)', @@ -3248,12 +2870,6 @@ export const appschema: JSONSchema6 = { pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', }, }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.UrlEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', @@ -3263,12 +2879,6 @@ export const appschema: JSONSchema6 = { properties: { ...$properties(SDKTypes.UrlEntityRecognizer), }, - additionalProperties: false, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, }, }; From f7d4a45623e3356ab7a1b853ec99ebfa08bf8a85 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:04:17 -0700 Subject: [PATCH 15/63] update DeleteProperty --- Composer/packages/lib/shared/src/appschema.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 08e1ca1095..738a3d699e 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -804,19 +804,14 @@ export const appschema: JSONSchema6 = { 'Microsoft.DeleteProperty': { $role: 'unionType(Microsoft.IDialog)', title: 'Delete Property', - description: 'This is a action which allows you to remove a property from memory', + description: 'Delete a property and any value it holds.', type: 'object', properties: { ...$properties(SDKTypes.DeleteProperty), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, property: { $role: 'expression', title: 'Property', - description: 'The Memory property path to delete', + description: 'Property to delete.', type: 'string', }, }, From 1448d99d84cd5bdc41093a43514b8d5c609aa991 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:05:32 -0700 Subject: [PATCH 16/63] update EditActions --- Composer/packages/lib/shared/src/appschema.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 738a3d699e..5232fea9cb 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -827,26 +827,21 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.EditActions': { $role: 'unionType(Microsoft.IDialog)', - title: 'EditActions Action', - description: 'Edit current dialog with changeType and Actions', + title: 'Edit actions.', + description: 'Edit the current list of actions.', type: 'object', properties: { ...$properties(SDKTypes.EditActions), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, changeType: { type: 'string', - title: 'Change Type', - description: 'The change type to apply to current dialog', + title: 'Type of change', + description: 'Type of change to apply to the current actions.', enum: ['InsertActions', 'InsertActionsBeforeTags', 'AppendActions', 'EndSequence', 'ReplaceSequence'], }, actions: { type: 'array', title: 'Actions', - description: 'Actions to execute', + description: 'Actions to apply.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', From 520dca3df25b1847a94bee8a002b714b6523f0fb Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:07:16 -0700 Subject: [PATCH 17/63] update EditArray --- Composer/packages/lib/shared/src/appschema.ts | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 5232fea9cb..1c5a098f16 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -851,39 +851,34 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.EditArray': { $role: 'unionType(Microsoft.IDialog)', - title: 'Edit Array Action', - description: 'This is a action which allows you to modify an array in memory', + title: 'Edit array', + description: 'Modify an array in memory', type: 'object', properties: { ...$properties(SDKTypes.EditArray), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, changeType: { type: 'string', - title: 'Change Type', - description: 'The array operation to perform', + title: 'Type of change', + description: 'Type of change to the array in memory.', enum: ['Push', 'Pop', 'Take', 'Remove', 'Clear'], }, - arrayProperty: { + itemsProperty: { $role: 'expression', - title: 'Array Property', - description: 'Memory expression of the array to manipulate.', + title: 'Items property', + description: 'Property that holds the array to update.', type: 'string', }, resultProperty: { $role: 'expression', title: 'Result Property', - description: 'Memory expression of the result of this action.', + description: 'Property to store the result of this action.', type: 'string', }, value: { $role: 'expression', - title: 'Value of the Item', - description: 'Expression to evaluate.', - examples: ['dialog.todo'], + title: 'Value', + description: 'New value or expression.', + examples: ["'milk'", 'dialog.favColor', "dialog.favColor == 'red'"], type: 'string', }, }, From ce93da7e471c1faa9f71b7b7aa2fcfdd03e95ba8 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:10:39 -0700 Subject: [PATCH 18/63] update EmitEvent --- Composer/packages/lib/shared/src/appschema.ts | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 1c5a098f16..3d0e6927ff 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -894,20 +894,16 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.EmitEvent': { $role: 'unionType(Microsoft.IDialog)', - title: 'Emit Event Action', - description: 'This is a action which allows you to emit an event', + title: 'Emit a custom event', + description: 'Emit an event. Capture this event with a trigger.', type: 'object', properties: { ...$properties(SDKTypes.EmitEvent), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, eventName: { title: 'Event Name', description: 'The name of event to emit', type: 'string', + // TODO support anyOf // anyOf: [ // { // enum: [ @@ -932,14 +928,14 @@ export const appschema: JSONSchema6 = { }, eventValue: { type: 'object', - title: 'Event Value', - description: 'Optional value to emit along with the event', + title: 'Event value', + description: 'Value to emit with the event (optional).', additionalProperties: true, }, bubbleEvent: { type: 'boolean', - title: 'Bubble Event', - description: 'If true this event should propagate to parent dialogs', + title: 'Bubble event', + description: 'If true this event is passed on to parent dialogs.', }, }, }, From 2c43f5324af2defe9fa7ed46d006cac87bec4cb2 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:11:33 -0700 Subject: [PATCH 19/63] update EndDialog --- Composer/packages/lib/shared/src/appschema.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 3d0e6927ff..eedff9dd43 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -941,20 +941,16 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.EndDialog': { $role: 'unionType(Microsoft.IDialog)', - title: 'End Dialog', - description: 'Command which ends the current dialog, returning the resultProperty as the result of the dialog.', + title: 'End dialog', + description: 'End this dialog.', type: 'object', properties: { ...$properties(SDKTypes.EndDialog), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, - property: { + value: { $role: 'expression', - description: 'Specifies a path to memory should be returned as the result to the calling dialog.', - examples: ['dialog.name'], + title: 'Value', + description: 'Result value returned to the parent dialog.', + examples: ['dialog.userName', "'tomato'"], type: 'string', }, }, From 6997331cd3cae511c9166ef27ab4b951b846edb3 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:12:02 -0700 Subject: [PATCH 20/63] update EndTurn --- Composer/packages/lib/shared/src/appschema.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index eedff9dd43..36aaf48d80 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -957,16 +957,11 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.EndTurn': { $role: 'unionType(Microsoft.IDialog)', - title: 'End Turn', + title: 'End turn', description: 'End the current turn without ending the dialog.', type: 'object', properties: { ...$properties(SDKTypes.EndTurn), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, }, }, 'Microsoft.EntityRecognizers': { From f11e666d553ede0a517f8bed38410afa5a4ee56d Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:13:58 -0700 Subject: [PATCH 21/63] add FirstSelector --- Composer/packages/lib/shared/src/appschema.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 36aaf48d80..df4608a2b6 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1062,6 +1062,15 @@ export const appschema: JSONSchema6 = { }, ], }, + 'Microsoft.FirstSelector': { + $role: 'unionType(Microsoft.ITriggerSelector)', + title: 'First Trigger Selector', + description: 'Selector for first true rule', + type: 'object', + properties: { + ...$properties(SDKTypes.FirstSelector), + }, + }, 'Microsoft.Foreach': { $role: 'unionType(Microsoft.IDialog)', title: 'Foreach Action', From 93bd00e1fbc28c383ec59b31f4bf13c54b48c7bb Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:14:16 -0700 Subject: [PATCH 22/63] update Foreach --- Composer/packages/lib/shared/src/appschema.ts | 32 ++++--------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index df4608a2b6..7958c5b0f1 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1073,46 +1073,28 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.Foreach': { $role: 'unionType(Microsoft.IDialog)', - title: 'Foreach Action', - description: 'Action which executes actions per item in a collection.', + title: 'For each item', + description: 'Execute actions on each item in an a collection.', type: 'object', properties: { ...$properties(SDKTypes.Foreach), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, - listProperty: { + itemsProperty: { $role: 'expression', - title: 'List Property', - description: 'Expression to evaluate.', + title: 'Items property', + description: 'Property that holds the array.', examples: ['user.todoList'], type: 'string', }, actions: { type: 'array', title: 'Actions', - description: 'Actions to execute', + description: + "Actions to execute for each item. Use '$foreach.value' to access the value of each item. Use '$foreach.index' to access the index of each item.", items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', }, }, - indexProperty: { - $role: 'expression', - title: 'Index Property', - description: 'The memory path which refers to the index of the item', - default: 'dialog.index', - type: 'string', - }, - valueProperty: { - $role: 'expression', - title: 'Value Property', - description: 'The memory path which refers to the value of the item', - default: 'dialog.value', - type: 'string', - }, }, }, 'Microsoft.ForeachPage': { From 5f1414fb70451a4f6b529897dcc2915cc1d2760f Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:15:09 -0700 Subject: [PATCH 23/63] update ForeachPage --- Composer/packages/lib/shared/src/appschema.ts | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 7958c5b0f1..f709814f02 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1099,27 +1099,22 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.ForeachPage': { $role: 'unionType(Microsoft.IDialog)', - title: 'Foreach Page Action', - description: 'Action which execute actions per item page in a collection.', + title: 'For each page', + description: 'Execute actions on each page (collection of items) in an array.', type: 'object', properties: { ...$properties(SDKTypes.ForeachPage), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, - listProperty: { + itemsProperty: { $role: 'expression', - title: 'List Property', - description: 'Expression to evaluate.', + title: 'Items property', + description: 'Property that holds the array.', examples: ['user.todoList'], type: 'string', }, actions: { type: 'array', title: 'Actions', - description: 'Actions to execute', + description: "Actions to execute for each page. Use '$foreach.page' to access each page.", items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -1127,17 +1122,10 @@ export const appschema: JSONSchema6 = { }, pageSize: { type: 'integer', - title: 'Page Size', - description: 'The page size', + title: 'Page size', + description: 'Number of items in each page.', default: 10, }, - valueProperty: { - $role: 'expression', - title: 'Value Property', - description: 'The memory path which refers to the value of the item', - default: 'dialog.value', - type: 'string', - }, }, }, 'Microsoft.GuidEntityRecognizer': { From f26d8e0b0a393bdc44c756e664bcf2d3c60249f7 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:17:29 -0700 Subject: [PATCH 24/63] update HTTPRequest --- Composer/packages/lib/shared/src/appschema.ts | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index f709814f02..367496e3e7 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1149,54 +1149,48 @@ export const appschema: JSONSchema6 = { 'Microsoft.HttpRequest': { $role: 'unionType(Microsoft.IDialog)', type: 'object', - title: 'Http Request', - description: 'This is a action which replaces the current dialog with the target dialog', + title: 'HTTP request', + description: 'Make a HTTP request.', properties: { ...$properties(SDKTypes.HttpRequest), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, method: { type: 'string', - title: 'Method', - description: 'The HTTP method to use', - enum: ['GET', 'POST'], + title: 'HTTP method', + description: 'HTTP method to use.', + enum: ['GET', 'POST', 'PATCH', 'PUT', 'DELETE'], examples: ['GET', 'POST'], }, url: { type: 'string', title: 'Url', - description: 'The url to call. This may reference properties in memory as {property.name}.', + description: 'URL to call (supports data binding).', examples: ['https://contoso.com'], }, body: { type: 'object', title: 'Body', - description: 'The body of the HTTP request. This may reference properties in memory as {property.name}.', + description: 'Body to include in the HTTP call (supports data binding).', additionalProperties: true, }, - property: { + resultProperty: { $role: 'expression', - title: 'Property', + title: 'Result property', description: - 'The property to store the result of the HTTP call in. The result will have 4 properties from the http response: statusCode|reasonPhrase|content|headers. If the content is json it will be an deserialized object, otherwise it will be a string', + 'Property to store the result of this action. The result includes 4 properties from the http response: statusCode, reasonPhrase, content and headers. If the content is json it will be a deserialized object.', examples: ['dialog.contosodata'], type: 'string', }, headers: { type: 'object', - additionalProperties: true, - title: 'Http headers', - description: - 'Additional headers to include with the HTTP request. This may reference properties in memory as {property.name}.', + additionProperties: true, + title: 'Headers', + description: 'One or more headers to include in the request (supports data binding).', }, responseType: { type: 'string', - title: 'Response Type', + title: 'Response type', description: - 'Describes how to parse the response from the http request. If Activity or Activities, then the they will be sent to the user.', + "Defines the type of HTTP response. Automatically calls the 'Send a response' action if set to 'Activity' or 'Activities'.", enum: ['None', 'Json', 'Activity', 'Activities'], default: 'Json', }, From 9649b37f0ac7f72f2c76c090c145a98de8c74258 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:20:13 -0700 Subject: [PATCH 25/63] update IActivityTemplate --- Composer/packages/lib/shared/src/appschema.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 367496e3e7..1342223aab 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1198,10 +1198,25 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.IActivityTemplate': { title: 'Microsoft ActivityTemplate', - // description: 'Union of components which implement the IActivityTemplate interface', + description: 'String used for language generation', $role: 'unionType', type: 'string', - description: 'String used for language generation', + // oneOf: [ + // { + // title: 'Microsoft.ActivityTemplate', + // description: '', + // $ref: '#/definitions/Microsoft.ActivityTemplate', + // }, + // { + // title: 'Microsoft.StaticActivityTemplate', + // description: 'This allows you to define a static Activity object', + // $ref: '#/definitions/Microsoft.StaticActivityTemplate', + // }, + // { + // type: 'string', + // title: 'string', + // }, + // ], }, 'Microsoft.IDialog': { title: 'Microsoft IDialog', From 42a11bba1f5cf57feab23f926d8dd331d349ffd4 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:20:34 -0700 Subject: [PATCH 26/63] update IDialog --- Composer/packages/lib/shared/src/appschema.ts | 63 +++++++++---------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 1342223aab..292a13daf2 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1219,75 +1219,74 @@ export const appschema: JSONSchema6 = { // ], }, 'Microsoft.IDialog': { - title: 'Microsoft IDialog', - description: 'Union of components which implement the IDialog interface', + title: 'Microsoft Dialogs', + description: 'Union of components which implement the Dialog contract', $role: 'unionType', oneOf: [ { title: 'Microsoft.AdaptiveDialog', - description: 'Configures a data driven dialog via a collection of actions/dialogs.', + description: 'Flexible, data driven dialog that can adapt to the conversation.', $ref: '#/definitions/Microsoft.AdaptiveDialog', }, { title: 'Microsoft.AttachmentInput', - description: 'This represents a dialog which gathers an attachment such as image or music', + description: 'Collect information - Ask for a file or image.', $ref: '#/definitions/Microsoft.AttachmentInput', }, { title: 'Microsoft.BeginDialog', - description: 'Action which begins another dialog (and when that dialog is done, it will return the caller).', + description: 'Begin another dialog.', $ref: '#/definitions/Microsoft.BeginDialog', }, { title: 'Microsoft.CancelAllDialogs', description: - 'Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.', + 'Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.', $ref: '#/definitions/Microsoft.CancelAllDialogs', }, { title: 'Microsoft.ChoiceInput', - description: 'This represents a dialog which gathers a choice responses', + description: 'Collect information - Pick from a list of choices', $ref: '#/definitions/Microsoft.ChoiceInput', }, { title: 'Microsoft.ConfirmInput', - description: 'This represents a dialog which gathers a yes/no style responses', + description: 'Collect information - Ask for confirmation (yes or no).', $ref: '#/definitions/Microsoft.ConfirmInput', }, { title: 'Microsoft.DateTimeInput', - description: 'This represents a dialog which gathers Date or Time or DateTime from the user', + description: 'Collect information - Ask for date and/ or time', $ref: '#/definitions/Microsoft.DateTimeInput', }, { title: 'Microsoft.DebugBreak', - description: 'If debugger is attached, do a debugger break at this point', + description: 'If debugger is attached, stop the execution at this point in the conversation.', $ref: '#/definitions/Microsoft.DebugBreak', }, { title: 'Microsoft.DeleteProperty', - description: 'This is a action which allows you to remove a property from memory', + description: 'Delete a property and any value it holds.', $ref: '#/definitions/Microsoft.DeleteProperty', }, { title: 'Microsoft.EditActions', - description: 'Edit current dialog with changeType and Actions', + description: 'Edit the current list of actions.', $ref: '#/definitions/Microsoft.EditActions', }, { title: 'Microsoft.EditArray', - description: 'This is a action which allows you to modify an array in memory', + description: 'Modify an array in memory', $ref: '#/definitions/Microsoft.EditArray', }, { title: 'Microsoft.EmitEvent', - description: 'This is a action which allows you to emit an event', + description: 'Emit an event. Capture this event with a trigger.', $ref: '#/definitions/Microsoft.EmitEvent', }, { title: 'Microsoft.EndDialog', - description: - 'Command which ends the current dialog, returning the resultProperty as the result of the dialog.', + description: 'End this dialog.', $ref: '#/definitions/Microsoft.EndDialog', }, { @@ -1297,83 +1296,83 @@ export const appschema: JSONSchema6 = { }, { title: 'Microsoft.Foreach', - description: 'Action which executes actions per item in a collection.', + description: 'Execute actions on each item in an a collection.', $ref: '#/definitions/Microsoft.Foreach', }, { title: 'Microsoft.ForeachPage', - description: 'Action which execute actions per item page in a collection.', + description: 'Execute actions on each page (collection of items) in an array.', $ref: '#/definitions/Microsoft.ForeachPage', }, { title: 'Microsoft.HttpRequest', - description: 'This is a action which replaces the current dialog with the target dialog', + description: 'Make a HTTP request.', $ref: '#/definitions/Microsoft.HttpRequest', }, { title: 'Microsoft.IfCondition', - description: 'Action which conditionally decides which action to execute next.', + description: 'Two-way branch the conversation flow based on a condition.', $ref: '#/definitions/Microsoft.IfCondition', }, { title: 'Microsoft.InitProperty', - description: 'This action allows you to innitial a property to either an object or array', + description: 'Define and initialize a property to be an array or object.', $ref: '#/definitions/Microsoft.InitProperty', }, { title: 'Microsoft.LogAction', description: - 'This is a action which writes to console.log and optional creates a TraceActivity around a text binding', + 'Log a message to the host application. Send a TraceActivity to Bot Framework Emulator (optional).', $ref: '#/definitions/Microsoft.LogAction', }, { title: 'Microsoft.NumberInput', - description: 'This represents a dialog which gathers a decimal number in a specified range', + description: 'Collect information - Ask for a number.', $ref: '#/definitions/Microsoft.NumberInput', }, { title: 'Microsoft.OAuthInput', - description: 'This represents a dialog which gathers an OAuth token from user', + description: 'Collect login information.', $ref: '#/definitions/Microsoft.OAuthInput', }, { title: 'Microsoft.QnAMakerDialog', - description: 'This represents a dialog which is driven by a call to QnAMaker.ai knowledge base', + description: 'Dialog which uses QnAMAker knowledge base to answer questions.', $ref: '#/definitions/Microsoft.QnAMakerDialog', }, { title: 'Microsoft.RepeatDialog', - description: 'This is a action which repeats the current dialog with the same dialog.', + description: 'Repeat current dialog.', $ref: '#/definitions/Microsoft.RepeatDialog', }, { title: 'Microsoft.ReplaceDialog', - description: 'This is a action which replaces the current dialog with the target dialog', + description: 'Replace current dialog with another dialog.', $ref: '#/definitions/Microsoft.ReplaceDialog', }, { title: 'Microsoft.SendActivity', - description: 'This is a action which sends an activity to the user', + description: 'Respond with an activity.', $ref: '#/definitions/Microsoft.SendActivity', }, { title: 'Microsoft.SetProperty', - description: 'This action allows you to set memory to the value of an expression', + description: 'Set property to a value.', $ref: '#/definitions/Microsoft.SetProperty', }, { title: 'Microsoft.SwitchCondition', - description: 'Action which conditionally decides which action to execute next.', + description: 'Execute different actions based on the value of a property.', $ref: '#/definitions/Microsoft.SwitchCondition', }, { title: 'Microsoft.TextInput', - description: 'This represents a dialog which gathers a text from the user', + description: 'Collection information - Ask for a word or sentence.', $ref: '#/definitions/Microsoft.TextInput', }, { title: 'Microsoft.TraceActivity', - description: 'This is a action which sends an TraceActivity to the transcript', + description: 'Send a trace activity to the transcript logger and/ or Bot Framework Emulator.', $ref: '#/definitions/Microsoft.TraceActivity', }, { From fc3a4af1bc1119ae6ebec34dc62108b5770d6e49 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:23:42 -0700 Subject: [PATCH 27/63] update interfaces --- Composer/packages/lib/shared/src/appschema.ts | 180 +++++++++--------- 1 file changed, 92 insertions(+), 88 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 292a13daf2..926c4f6083 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1392,185 +1392,189 @@ export const appschema: JSONSchema6 = { }, ], }, - 'Microsoft.ILanguagePolicy': { - title: 'Microsoft Language Policy', - description: 'Union of components which implement the ILanguagePolicy interface', + 'Microsoft.IRecognizer': { + title: 'Microsoft IRecognizer', + description: 'Union of components which implement the IRecognizer interface', + $role: 'unionType', + oneOf: [ + { + title: 'Microsoft.LuisRecognizer', + description: 'LUIS recognizer.', + $ref: '#/definitions/Microsoft.LuisRecognizer', + }, + { + title: 'Microsoft.MultiLanguageRecognizer', + description: 'Configure one recognizer per language and the specify the language fallback policy.', + $ref: '#/definitions/Microsoft.MultiLanguageRecognizer', + }, + { + title: 'Microsoft.RegexRecognizer', + description: 'Use regular expressions to recognize intents and entities from user input.', + $ref: '#/definitions/Microsoft.RegexRecognizer', + }, + { + type: 'string', + title: 'string', + }, + ], + }, + 'Microsoft.ITextTemplate': { + title: 'Microsoft TextTemplate', + description: 'Union of components which implement the TextTemplate', $role: 'unionType', oneOf: [ { - title: 'Microsoft.LanguagePolicy', - description: 'This represents a dialog which gathers a DateTime in a specified range', - $ref: '#/definitions/Microsoft.LanguagePolicy', + title: 'Microsoft.TextTemplate', + description: 'Lg tempalte to evaluate to create text', + $ref: '#/definitions/Microsoft.TextTemplate', }, { type: 'string', - // TODO -- what is a better title for this? title: 'string', }, ], }, - 'Microsoft.IOnEvent': { - title: 'Microsoft IOnEvent', - description: 'Union of components which implement the IOnEvent interface', + 'Microsoft.ITriggerCondition': { $role: 'unionType', + title: 'Microsoft Triggers', + description: 'Union of components which implement the OnCondition', oneOf: [ { title: 'Microsoft.OnActivity', - description: 'This defines the actions to take when an custom activity is received', + description: 'Actions to perform on receipt of a generic activity.', $ref: '#/definitions/Microsoft.OnActivity', }, { title: 'Microsoft.OnBeginDialog', - description: 'This defines the actions to take when a dialog is started via BeginDialog()', + description: 'Actions to perform when this dialog begins.', $ref: '#/definitions/Microsoft.OnBeginDialog', }, + { + title: 'Microsoft.OnCancelDialog', + description: 'Actions to perform on cancel dialog event.', + $ref: '#/definitions/Microsoft.OnCancelDialog', + }, + { + title: 'Microsoft.OnCondition', + description: 'Actions to perform when specified condition is true.', + $ref: '#/definitions/Microsoft.OnCondition', + }, { title: 'Microsoft.OnConversationUpdateActivity', - description: 'This defines the actions to take when an ConversationUpdate activity is received', + description: "Actions to perform on receipt of an activity with type 'ConversationUpdate'.", $ref: '#/definitions/Microsoft.OnConversationUpdateActivity', }, + { + title: 'Microsoft.OnCustomEvent', + description: + "Actions to perform when a custom event is detected. Use 'Emit a custom event' action to raise a custom event.", + $ref: '#/definitions/Microsoft.OnCustomEvent', + }, { title: 'Microsoft.OnDialogEvent', - description: 'Defines a rule for an event which is triggered by some source', + description: 'Actions to perform when a specific dialog event occurs.', $ref: '#/definitions/Microsoft.OnDialogEvent', }, { title: 'Microsoft.OnEndOfConversationActivity', - description: 'This defines the actions to take when an EndOfConversation Activity is received', + description: "Actions to perform on receipt of an activity with type 'EndOfConversation'.", $ref: '#/definitions/Microsoft.OnEndOfConversationActivity', }, { - title: 'Microsoft.OnEvent', - description: 'Defines a rule for an event which is triggered by some source', - $ref: '#/definitions/Microsoft.OnEvent', + title: 'Microsoft.OnError', + description: "Action to perform when an 'Error' dialog event occurs.", + $ref: '#/definitions/Microsoft.OnError', }, { title: 'Microsoft.OnEventActivity', - description: 'This defines the actions to take when an Event activity is received', + description: "Actions to perform on receipt of an activity with type 'Event'.", $ref: '#/definitions/Microsoft.OnEventActivity', }, { title: 'Microsoft.OnHandoffActivity', - description: 'This defines the actions to take when an Handoff activity is received', + description: "Actions to perform on receipt of an activity with type 'HandOff'.", $ref: '#/definitions/Microsoft.OnHandoffActivity', }, { title: 'Microsoft.OnIntent', - description: 'This defines the actions to take when an Intent is recognized (and optionally entities)', + description: 'Actions to perform when specified intent is recognized.', $ref: '#/definitions/Microsoft.OnIntent', }, { title: 'Microsoft.OnInvokeActivity', - description: 'This defines the actions to take when an Invoke activity is received', + description: "Actions to perform on receipt of an activity with type 'Invoke'.", $ref: '#/definitions/Microsoft.OnInvokeActivity', }, { title: 'Microsoft.OnMessageActivity', - description: - 'This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation', + description: "Actions to perform on receipt of an activity with type 'Message'. Overrides Intent trigger.", $ref: '#/definitions/Microsoft.OnMessageActivity', }, { title: 'Microsoft.OnMessageDeleteActivity', - description: 'This defines the actions to take when an MessageDelete activity is received', + description: "Actions to perform on receipt of an activity with type 'MessageDelete'.", $ref: '#/definitions/Microsoft.OnMessageDeleteActivity', }, { title: 'Microsoft.OnMessageReactionActivity', - description: 'This defines the actions to take when a MessageReaction activity is received', + description: "Actions to perform on receipt of an activity with type 'MessageReaction'.", $ref: '#/definitions/Microsoft.OnMessageReactionActivity', }, { title: 'Microsoft.OnMessageUpdateActivity', - description: 'This defines the actions to take when an MessageUpdate ctivity is received', + description: "Actions to perform on receipt of an activity with type 'MessageUpdate'.", $ref: '#/definitions/Microsoft.OnMessageUpdateActivity', }, + { + title: 'Microsoft.OnRepromptDialog', + description: "Actions to perform when 'RepromptDialog' event occurs.", + $ref: '#/definitions/Microsoft.OnRepromptDialog', + }, { title: 'Microsoft.OnTypingActivity', - description: 'This defines the actions to take when a Typing activity is received', + description: "Actions to perform on receipt of an activity with type 'Typing'.", $ref: '#/definitions/Microsoft.OnTypingActivity', }, { title: 'Microsoft.OnUnknownIntent', description: - 'This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog', + "Action to perform when user input is unrecognized and if none of the 'on intent recognition' triggers match recognized intent.", $ref: '#/definitions/Microsoft.OnUnknownIntent', }, ], }, - 'Microsoft.IRecognizer': { - title: 'Microsoft IRecognizer', - description: 'Union of components which implement the IRecognizer interface', + 'Microsoft.ITriggerSelector': { $role: 'unionType', + title: 'Selectors', + description: 'Union of components which are trigger selectors', oneOf: [ { - type: 'string', + title: 'Microsoft.ConditionalSelector', + description: 'Use a rule selector based on a condition', + $ref: '#/definitions/Microsoft.ConditionalSelector', }, { - title: 'Microsoft.LuisRecognizer', - description: 'LUIS recognizer.', - $ref: '#/definitions/Microsoft.LuisRecognizer', - }, - // { - // title: 'Microsoft.MultiLanguageRecognizer', - // description: - // 'Recognizer which allows you to configure the recognizer per language, and to define the policy for using them', - // $ref: '#/definitions/Microsoft.MultiLanguageRecognizer', - // }, - { - title: 'Microsoft.RegexRecognizer', - description: 'A Recognizer that uses regex expressions to generate intents and entities.', - $ref: '#/definitions/Microsoft.RegexRecognizer', + title: 'Microsoft.FirstSelector', + description: 'Selector for first true rule', + $ref: '#/definitions/Microsoft.FirstSelector', }, { - type: 'string', - title: 'string', + title: 'Microsoft.MostSpecificSelector', + description: 'Select most specific true events with optional additional selector', + $ref: '#/definitions/Microsoft.MostSpecificSelector', }, - ], - }, - 'Microsoft.IRule': { - title: 'Microsoft IRule', - description: 'Union of components which implement the IRule interface', - $role: 'unionType', - oneOf: [ { - title: 'Microsoft.OnConversationUpdateActivity', - description: 'This defines the steps to take when a ConversationUpdate Activity is recieved', - $ref: '#/definitions/Microsoft.OnConversationUpdateActivity', + title: 'Microsoft.RandomSelector', + description: 'Select most specific true rule', + $ref: '#/definitions/Microsoft.RandomSelector', }, { - title: 'Microsoft.OnEvent', - description: 'This defines a rule for an event that is triggered by some source', - $ref: '#/definitions/Microsoft.OnEvent', - }, - { - title: 'Microsoft.OnIntent', - description: 'This defines the actions to take when an Intent is recognized (and optionally entities)', - $ref: '#/definitions/Microsoft.OnIntent', - }, - { - title: 'Microsoft.Rule', - description: 'Defines a rule for an event which is triggered by some source', - $ref: '#/definitions/Microsoft.Rule', - }, - { - title: 'Microsoft.OnUnknownIntent', - description: 'Defines a sequence of actions to take if there is no other trigger or plan operating', - $ref: '#/definitions/Microsoft.OnUnknownIntent', + title: 'Microsoft.TrueSelector', + description: 'Selector for all true events', + $ref: '#/definitions/Microsoft.TrueSelector', }, ], }, - 'Microsoft.IRuleSelector': { - title: 'Microsoft IRuleSelector', - description: 'Union of components which implement the IRuleSelector interface', - $role: 'unionType', - }, - 'Microsoft.ITextTemplate': { - title: 'Microsoft TextTemplate', - description: 'Union of components which implement the ITextTemplate interface', - $role: 'unionType', - type: 'string', - }, 'Microsoft.IfCondition': { $role: 'unionType(Microsoft.IDialog)', title: 'If Condition Action', From 23dd2bb5992caf7a575258bdeda3742c79513dd5 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:26:14 -0700 Subject: [PATCH 28/63] update IfCondition --- Composer/packages/lib/shared/src/appschema.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 926c4f6083..70e369bd08 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1577,16 +1577,11 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.IfCondition': { $role: 'unionType(Microsoft.IDialog)', - title: 'If Condition Action', - description: 'Action which conditionally decides which action to execute next.', + title: 'If condition', + description: 'Two-way branch the conversation flow based on a condition.', type: 'object', properties: { ...$properties(SDKTypes.IfCondition), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, condition: { $role: 'expression', title: 'Condition', @@ -1596,8 +1591,8 @@ export const appschema: JSONSchema6 = { }, actions: { type: 'array', - title: 'Actions: True Branch', - description: 'Action to execute if condition is true.', + title: 'Actions', + description: 'Actions to execute if condition is true.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -1605,8 +1600,8 @@ export const appschema: JSONSchema6 = { }, elseActions: { type: 'array', - title: 'Actions: False Branch', - description: 'Action to execute if condition is false.', + title: 'Else', + description: 'Actions to execute if condition is false.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', From 7b2d59a643a2f9e4263ec42aceeb0cec99d27ed2 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:26:46 -0700 Subject: [PATCH 29/63] update InitProperty --- Composer/packages/lib/shared/src/appschema.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 70e369bd08..0077348db5 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1611,27 +1611,22 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.InitProperty': { $role: 'unionType(Microsoft.IDialog)', - title: 'Init Property Action', - description: 'This action allows you to innitial a property to either an object or array', + title: 'Initialize property', + description: 'Define and initialize a property to be an array or object.', type: 'object', properties: { ...$properties(SDKTypes.InitProperty), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, property: { $role: 'expression', title: 'Property', - description: 'The property to set the value of', + description: 'Property (named location to store information).', examples: ['user.age'], type: 'string', }, type: { type: 'string', title: 'Type', - description: 'type of value to set the property to, object or array.', + description: 'Type of value.', enum: ['object', 'array'], }, }, From f57fd750b1d57adac965045f09c9a30e280b30fb Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:27:31 -0700 Subject: [PATCH 30/63] update LanguagePolicy --- Composer/packages/lib/shared/src/appschema.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 0077348db5..ef14ba50d6 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1643,17 +1643,11 @@ export const appschema: JSONSchema6 = { 'Microsoft.LanguagePolicy': { $role: 'unionType(Microsoft.ILanguagePolicy)', title: 'Language Policy', - description: 'This represents a dialog which gathers a DateTime in a specified range', + description: 'This represents a policy map for locales lookups to use for language', type: 'object', - additionalProperties: false, properties: { ...$properties(SDKTypes.LanguagePolicy), }, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.LogAction': { $role: 'unionType(Microsoft.IDialog)', From fc5b8961399223e4fc513c3d30e5591a003726a7 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:28:18 -0700 Subject: [PATCH 31/63] update LogAction --- Composer/packages/lib/shared/src/appschema.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index ef14ba50d6..ae353a3676 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1651,26 +1651,20 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.LogAction': { $role: 'unionType(Microsoft.IDialog)', - title: 'Log Action', - description: - 'This is a action which writes to console.log and optional creates a TraceActivity around a text binding', + title: 'Log to console', + description: 'Log a message to the host application. Send a TraceActivity to Bot Framework Emulator (optional).', type: 'object', properties: { ...$properties(SDKTypes.LogAction), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, text: { type: 'string', title: 'Text', - description: 'LG Expression to write to the log', + description: 'Information to log.', }, traceActivity: { type: 'boolean', title: 'Send Trace Activity', - description: 'Set to true to also create a TraceActivity with the log text', + description: 'If true, automatically sends a TraceActivity (view in Bot Framework Emulator).', default: false, }, }, From 76d183a712df6696e9825ac44a4658eaf6c4fc5d Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:28:50 -0700 Subject: [PATCH 32/63] Update LuisRecognizer --- Composer/packages/lib/shared/src/appschema.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index ae353a3676..8a0cbd84f6 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1674,7 +1674,6 @@ export const appschema: JSONSchema6 = { title: 'LUIS Recognizer', description: 'LUIS recognizer.', type: 'object', - additionalProperties: false, properties: { ...$properties(SDKTypes.LuisRecognizer), applicationId: { @@ -1687,11 +1686,6 @@ export const appschema: JSONSchema6 = { type: 'string', }, }, - patternProperties: { - '^\\$': { - type: 'string', - }, - }, }, 'Microsoft.MentionEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', From aecac8f3ab82c182def44403c547e9a907bcc3ec Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:30:37 -0700 Subject: [PATCH 33/63] add MostSpecificSelector MultiLanguageRecognizer --- Composer/packages/lib/shared/src/appschema.ts | 87 ++++++++----------- 1 file changed, 38 insertions(+), 49 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 8a0cbd84f6..e8b6a567ce 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1696,55 +1696,44 @@ export const appschema: JSONSchema6 = { ...$properties(SDKTypes.MentionEntityRecognizer), }, }, - // 'Microsoft.MultiLanguageRecognizer': { - // $role: 'unionType(Microsoft.IRecognizer)', - // title: 'Multi Language Recognizer', - // description: - // 'Recognizer which allows you to configure the recognizer per language, and to define the policy for using them', - // type: 'object', - // properties: { - // ...$properties(SDKTypes.MultiLanguageRecognizer), - // $copy: { - // title: '$copy', - // description: 'Copy the definition by id from a .dialog file.', - // type: 'string', - // pattern: '^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$', - // }, - // $id: { - // title: '$id', - // description: 'Inline id for reuse of an inline definition', - // type: 'string', - // pattern: '^([a-zA-Z][a-zA-Z0-9.]*)$', - // }, - // $designer: { - // title: '$designer', - // type: 'object', - // description: 'Extra information for the Bot Framework Composer.', - // }, - // languagePolicy: { - // $type: 'Microsoft.ILanguagePolicy', - // type: 'object', - // title: 'Language Policy', - // description: 'Defines languages to try per language.', - // $ref: '#/definitions/Microsoft.ILanguagePolicy', - // }, - // recognizers: { - // type: 'object', - // title: 'Recognizers', - // description: 'Map of language -> IRecognizer', - // additionalProperties: { - // $type: 'Microsoft.IRecognizer', - // $ref: '#/definitions/Microsoft.IRecognizer', - // }, - // }, - // }, - // additionalProperties: false, - // patternProperties: { - // '^\\$': { - // type: 'string', - // }, - // }, - // }, + 'Microsoft.MostSpecificSelector': { + $role: 'unionType(Microsoft.ITriggerSelector)', + title: 'Most Specific Trigger Selector', + description: 'Select most specific true events with optional additional selector', + type: 'object', + properties: { + ...$properties(SDKTypes.MostSpecificSelector), + selector: { + $type: 'Microsoft.ITriggerSelector', + $ref: '#/definitions/Microsoft.ITriggerSelector', + }, + }, + }, + 'Microsoft.MultiLanguageRecognizer': { + $role: 'unionType(Microsoft.IRecognizer)', + title: 'Multi-language recognizer', + description: 'Configure one recognizer per language and the specify the language fallback policy.', + type: 'object', + properties: { + ...$properties(SDKTypes.MultiLanguageRecognizer), + languagePolicy: { + $type: 'Microsoft.LanguagePolicy', + type: 'object', + title: 'Language policy', + description: 'Defines fall back languages to try per user input language.', + $ref: '#/definitions/Microsoft.LanguagePolicy', + }, + recognizers: { + type: 'object', + title: 'Recognizers', + description: 'Map of language -> IRecognizer', + additionalProperties: { + $type: 'Microsoft.IRecognizer', + $ref: '#/definitions/Microsoft.IRecognizer', + }, + }, + }, + }, 'Microsoft.NumberEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Number Entity Recognizer', From 9eba03ff4041a9a3b43034a0b8cc38a3ffc3374f Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:31:43 -0700 Subject: [PATCH 34/63] update NumberInput --- Composer/packages/lib/shared/src/appschema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index e8b6a567ce..6719ba0a9c 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1745,8 +1745,8 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.NumberInput': { $role: 'unionType(Microsoft.IDialog)', - title: 'NumberInput Dialog', - description: 'This represents a dialog which gathers a decimal number in a specified range', + title: 'Number input dialog', + description: 'Collect information - Ask for a number.', type: 'object', properties: { ...$properties(SDKTypes.NumberInput), From 6d6912ae20146549a94597dd74aa74c6a164939e Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:32:57 -0700 Subject: [PATCH 35/63] update OAuthInput --- Composer/packages/lib/shared/src/appschema.ts | 98 +++---------------- 1 file changed, 12 insertions(+), 86 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 6719ba0a9c..71b14e4451 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1861,108 +1861,27 @@ export const appschema: JSONSchema6 = { 'Microsoft.OAuthInput': { $role: 'unionType(Microsoft.IDialog)', title: 'OAuthInput Dialog', - description: 'This represents a dialog which gathers an OAuth token from user', + description: 'Collect login information.', type: 'object', properties: { ...$properties(SDKTypes.OAuthInput), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, - prompt: { - $type: 'Microsoft.IActivityTemplate', - title: 'Initial prompt', - description: 'Message to send to collect information.', - examples: ['What is your birth date?'], - $ref: '#/definitions/Microsoft.IActivityTemplate', - }, - unrecognizedPrompt: { - $type: 'Microsoft.IActivityTemplate', - title: 'Unrecognized prompt', - description: 'Message to send if user response is not recognized.', - examples: ["Sorry, I do not understand '{turn.activity.text'}. Let's try again. What is your birth date?"], - $ref: '#/definitions/Microsoft.IActivityTemplate', - }, - invalidPrompt: { - $type: 'Microsoft.IActivityTemplate', - title: 'Invalid prompt', - description: 'Message to send if user response is invalid. Relies on specified validation expressions.', - examples: ["Sorry, '{this.value}' does not work. I need a number between 1-150. What is your age?"], - $ref: '#/definitions/Microsoft.IActivityTemplate', - }, - defaultValueResponse: { - $type: 'Microsoft.IActivityTemplate', - title: 'Default value response', - description: - 'Message to send when max turn count (if specified) has been exceeded and the default value is selected as the value.', - examples: [ - "Sorry, I'm having trouble understanding you. I will just use {this.options.defaultValue} for now. You can say 'I'm 36 years old' to change it.", - ], - $ref: '#/definitions/Microsoft.IActivityTemplate', - }, - maxTurnCount: { - type: 'integer', - title: 'Max turn count', - description: 'Maximum number of re-prompt attempts to collect information.', - default: 3, - examples: [3], - }, - validations: { - type: 'array', - title: 'Validation expressions', - description: 'Expression to validate user input.', - examples: ['int(this.value) > 1 && int(this.value) <= 150', 'count(this.value) < 300'], - items: { - $role: 'expression', - type: 'string', - description: 'String must contain an expression.', - }, - }, - property: { - $role: 'expression', - title: 'Property', - description: - "Property to store collected information. Input will be skipped if property has value (unless 'Always prompt' is true).", - examples: ['$birthday', 'user.name', 'conversation.issueTitle', 'dialog.favColor'], - type: 'string', - }, - defaultValue: { - $role: 'expression', - title: 'Default value', - description: 'Expression to examine on each turn of the conversation as possible value to the property.', - examples: ['@userName', 'coalesce(@number, @partySize)'], - type: 'string', - }, - alwaysPrompt: { - type: 'boolean', - title: 'Always prompt', - description: "Collect information even if the specified 'property' is not empty.", - default: false, - examples: [false], - }, - allowInterruptions: { - type: 'string', - title: 'Allow Interruptions', - description: - 'A boolean expression that determines whether the parent should be allowed to interrupt the input.', - default: 'true', - examples: ['true'], - }, connectionName: { type: 'string', - title: 'Connection Name', + title: 'Connection name', description: 'The connection name configured in Azure Web App Bot OAuth settings.', + examples: ['msgraphOAuthConnection'], }, text: { type: 'string', title: 'Text', description: 'Text shown in the OAuth signin card.', + examples: ['Please sign in.'], }, title: { type: 'string', title: 'Title', description: 'Title shown in the OAuth signin card.', + examples: ['Login'], }, timeout: { type: 'integer', @@ -1970,6 +1889,13 @@ export const appschema: JSONSchema6 = { description: 'Time out setting for the OAuth signin card.', default: '900000', }, + tokenProperty: { + $role: 'expression', + title: 'Token property', + description: 'Property to store the OAuth token result.', + examples: ['dialog.token'], + type: 'string', + }, }, }, 'Microsoft.OnActivity': { From cf81cd1cf0c880cbf5a128e6d350666dc9aae2ce Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:36:58 -0700 Subject: [PATCH 36/63] update Trigger Conditions --- Composer/packages/lib/shared/src/appschema.ts | 395 ++++++++++++------ 1 file changed, 268 insertions(+), 127 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 71b14e4451..5aeddeeff4 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1899,22 +1899,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'OnActivity', - description: 'This defines the actions to take when an custom activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On activity', + description: 'Actions to perform on receipt of a generic activity.', type: 'object', properties: { ...$properties(SDKTypes.OnActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -1922,28 +1922,76 @@ export const appschema: JSONSchema6 = { }, type: { type: 'string', - title: 'Type', - description: 'Activity type', + title: 'Activity type', + description: 'The Activity.Type to match', }, }, }, 'Microsoft.OnBeginDialog': { - title: 'OnBeginDialog', - description: 'This defines the actions to take when a dialog is started via BeginDialog()', - $role: 'unionType(Microsoft.IOnEvent)', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On begin dialog', + description: 'Actions to perform when this dialog begins.', type: 'object', properties: { ...$properties(SDKTypes.OnBeginDialog), - constraint: { + condition: { + $role: 'expression', + title: 'Condition', + description: 'Condition (expression).', + examples: ['user.vip == true'], + type: 'string', + }, + actions: { + type: 'array', + description: 'Sequence of actions to execute.', + items: { + $type: 'Microsoft.IDialog', + $ref: '#/definitions/Microsoft.IDialog', + }, + }, + }, + }, + 'Microsoft.OnCancelDialog': { + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On cancel dialog', + description: 'Actions to perform on cancel dialog event.', + type: 'object', + properties: { + ...$properties(SDKTypes.OnCancelDialog), + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', + items: { + $type: 'Microsoft.IDialog', + $ref: '#/definitions/Microsoft.IDialog', + }, + }, + }, + }, + 'Microsoft.OnCondition': { + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On condition', + description: 'Actions to perform when specified condition is true.', + type: 'object', + properties: { + ...$properties(SDKTypes.OnCondition), + condition: { + $role: 'expression', + title: 'Condition', + description: 'Condition (expression).', + examples: ['user.vip == true'], + type: 'string', + }, + actions: { + type: 'array', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -1952,22 +2000,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnConversationUpdateActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'OnConversationUpdateActivity', - description: 'This defines the actions to take when an ConversationUpdate activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On ConversationUpdate activity', + description: "Actions to perform on receipt of an activity with type 'ConversationUpdate'.", type: 'object', properties: { ...$properties(SDKTypes.OnConversationUpdateActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -1975,66 +2023,126 @@ export const appschema: JSONSchema6 = { }, }, }, - 'Microsoft.OnDialogEvent': { - title: 'Event Event', - description: 'Defines a rule for an event which is triggered by some source', + 'Microsoft.OnCustomEvent': { + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On custom event', + description: + "Actions to perform when a custom event is detected. Use 'Emit a custom event' action to raise a custom event.", type: 'object', - $role: 'unionType(Microsoft.IOnEvent)', properties: { - ...$properties(SDKTypes.OnDialogEvent), - constraint: { + ...$properties(SDKTypes.OnCustomEvent), + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', }, }, - events: { + event: { + type: 'string', + title: 'Custom event name', + description: 'Name of the custom event.', + }, + }, + anyOf: [ + { + title: 'Reference', + required: ['$copy'], + }, + { + title: 'Type', + required: ['actions', 'event', '$type'], + }, + ], + }, + 'Microsoft.OnDialogEvent': { + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On dialog event', + description: 'Actions to perform when a specific dialog event occurs.', + type: 'object', + properties: { + ...$properties(SDKTypes.OnDialogEvent), + condition: { + $role: 'expression', + title: 'Condition', + description: 'Condition (expression).', + examples: ['user.vip == true'], + type: 'string', + }, + actions: { type: 'array', - description: 'Events to trigger this rule for', + description: 'Sequence of actions to execute.', items: { - type: 'string', - enum: [ - 'beginDialog', - 'consultDialog', - 'cancelDialog', - 'activityReceived', - 'recognizedIntent', - 'unknownIntent', - 'actionsStarted', - 'actionsSaved', - 'actionsEnded', - 'actionsResumed', - ], + $type: 'Microsoft.IDialog', + $ref: '#/definitions/Microsoft.IDialog', }, }, + event: { + type: 'string', + title: 'Dialog event name', + description: 'Name of dialog event.', + }, }, + anyOf: [ + { + title: 'Reference', + required: ['$copy'], + }, + { + title: 'Type', + required: ['actions', 'event', '$type'], + }, + ], }, 'Microsoft.OnEndOfConversationActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'OnEndOfConversationActivity', - description: 'This defines the actions to take when an EndOfConversation Activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On EndOfConversation activity', + description: "Actions to perform on receipt of an activity with type 'EndOfConversation'.", type: 'object', properties: { ...$properties(SDKTypes.OnEndOfConversationActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', + items: { + $type: 'Microsoft.IDialog', + $ref: '#/definitions/Microsoft.IDialog', + }, + }, + }, + }, + 'Microsoft.OnError': { + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On Error', + description: "Action to perform when an 'Error' dialog event occurs.", + type: 'object', + properties: { + ...$properties(SDKTypes.OnError), + condition: { + $role: 'expression', + title: 'Condition', + description: 'Condition (expression).', + examples: ['user.vip == true'], + type: 'string', + }, + actions: { + type: 'array', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2043,22 +2151,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnEventActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'OnEventActivity', - description: 'This defines the actions to take when an Event activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On Event activity', + description: "Actions to perform on receipt of an activity with type 'Event'.", type: 'object', properties: { ...$properties(SDKTypes.OnEventActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2067,22 +2175,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnHandoffActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'OnHandoffActivity', - description: 'This defines the actions to take when an Handoff activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On Handoff activity', + description: "Actions to perform on receipt of an activity with type 'HandOff'.", type: 'object', properties: { ...$properties(SDKTypes.OnHandoffActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2091,22 +2199,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnIntent': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'Intent Event', - description: 'This defines the actions to take when an Intent is recognized (and optionally entities)', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On intent recognition', + description: 'Actions to perform when specified intent is recognized.', type: 'object', properties: { ...$properties(SDKTypes.OnIntent), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2115,35 +2223,45 @@ export const appschema: JSONSchema6 = { intent: { type: 'string', title: 'Intent', - description: 'Intent name to trigger on', + description: 'Name of intent.', }, entities: { type: 'array', title: 'Entities', - description: 'The entities required to trigger this rule', + description: 'Required entities.', items: { type: 'string', }, }, }, + anyOf: [ + { + title: 'Reference', + required: ['$copy'], + }, + { + title: 'Type', + required: ['actions', 'intent', '$type'], + }, + ], }, 'Microsoft.OnInvokeActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'OnInvokeActivity', - description: 'This defines the actions to take when an Invoke activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On Invoke activity', + description: "Actions to perform on receipt of an activity with type 'Invoke'.", type: 'object', properties: { ...$properties(SDKTypes.OnInvokeActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2152,23 +2270,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnMessageActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'OnMessageActivity', - description: - 'This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On Message activity', + description: "Actions to perform on receipt of an activity with type 'Message'. Overrides Intent trigger.", type: 'object', properties: { ...$properties(SDKTypes.OnMessageActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2177,22 +2294,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnMessageDeleteActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'MessageDeleteActivity', - description: 'This defines the actions to take when an MessageDelete activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On MessageDelete activity', + description: "Actions to perform on receipt of an activity with type 'MessageDelete'.", type: 'object', properties: { ...$properties(SDKTypes.OnMessageDeleteActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2201,22 +2318,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnMessageReactionActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'MessageReactionActivity', - description: 'This defines the actions to take when a MessageReaction activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On MessageReaction activity', + description: "Actions to perform on receipt of an activity with type 'MessageReaction'.", type: 'object', properties: { ...$properties(SDKTypes.OnMessageReactionActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2225,22 +2342,46 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnMessageUpdateActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'MessageUpdateActivity', - description: 'This defines the actions to take when an MessageUpdate ctivity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On MessageUpdate activity', + description: "Actions to perform on receipt of an activity with type 'MessageUpdate'.", type: 'object', properties: { ...$properties(SDKTypes.OnMessageUpdateActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', + items: { + $type: 'Microsoft.IDialog', + $ref: '#/definitions/Microsoft.IDialog', + }, + }, + }, + }, + 'Microsoft.OnRepromptDialog': { + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On RepromptDialog', + description: "Actions to perform when 'RepromptDialog' event occurs.", + type: 'object', + properties: { + ...$properties(SDKTypes.OnRepromptDialog), + condition: { + $role: 'expression', + title: 'Condition', + description: 'Condition (expression).', + examples: ['user.vip == true'], + type: 'string', + }, + actions: { + type: 'array', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2249,22 +2390,22 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnTypingActivity': { - $role: 'unionType(Microsoft.IOnEvent)', - title: 'TypingActivity', - description: 'This defines the actions to take when a Typing activity is received', + $role: 'unionType(Microsoft.ITriggerCondition)', + title: 'On Typing activity', + description: "Actions to perform on receipt of an activity with type 'Typing'.", type: 'object', properties: { ...$properties(SDKTypes.OnTypingActivity), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2273,23 +2414,23 @@ export const appschema: JSONSchema6 = { }, }, 'Microsoft.OnUnknownIntent': { - title: 'OnUnknownIntent', + title: 'On unknown intent', description: - 'This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog', - $role: 'unionType(Microsoft.IOnEvent)', + "Action to perform when user input is unrecognized and if none of the 'on intent recognition' triggers match recognized intent.", type: 'object', + $role: 'unionType(Microsoft.ITriggerCondition)', properties: { ...$properties(SDKTypes.OnUnknownIntent), - constraint: { + condition: { $role: 'expression', - title: 'Constraint', - description: 'Optional constraint to which must be met for this rule to fire', + title: 'Condition', + description: 'Condition (expression).', examples: ['user.vip == true'], type: 'string', }, actions: { type: 'array', - description: 'Sequence of actions or dialogs to execute', + description: 'Sequence of actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', From af19e4a15e5b1d6cd56b3b9d0bd398d452a79bb8 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:40:02 -0700 Subject: [PATCH 37/63] update QnAMakerDialog --- Composer/packages/lib/shared/src/appschema.ts | 97 +++++++++++-------- 1 file changed, 59 insertions(+), 38 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 5aeddeeff4..20953a6b15 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2468,51 +2468,72 @@ export const appschema: JSONSchema6 = { 'Microsoft.QnAMakerDialog': { $role: 'unionType(Microsoft.IDialog)', title: 'QnAMaker Dialog', - description: 'This represents a dialog which is driven by a call to QnAMaker.ai knowledge base', + description: 'Dialog which uses QnAMAker knowledge base to answer questions.', type: 'object', additionalProperties: false, properties: { ...$properties(SDKTypes.QnAMakerDialog), - endpoint: { - type: 'object', - title: 'Endpoint', - description: 'This is the QnAMaker endpoint to use', - required: ['knowledgeBaseId', 'endpointKey', 'host'], - properties: { - knowledgeBaseId: { - type: 'string', - title: 'Knowledgebase Id', - description: 'the knowledge base ID.', - }, - endpointKey: { - type: 'string', - title: 'Endpoint Key', - description: 'sets the endpoint key for the knowledge base', - }, - host: { - type: 'string', - title: 'Host', - description: 'sets the host path', - examples: ['https://yourserver.azurewebsites.net/qnamaker'], - }, - }, + knowledgeBaseId: { + $role: 'expression', + title: 'KnowledgeBase Id', + description: 'KnowledgeBase Id of your QnA Maker KnowledgeBase.', + default: 'settings.qna.knowledgebaseid', + type: 'string', }, - options: { - type: 'object', - title: 'Options', - properties: { - scoreThreshold: { - type: 'number', - title: 'Score Threshold', - description: - 'sets the minimum score threshold, used to filter returned results. Scores are normalized to the range of 0.0 to 1.0', - }, - }, + endpointKey: { + $role: 'expression', + title: 'Endpoint Key', + description: 'Endpoint key for the QnA Maker KB.', + default: 'settings.qna.endpointkey', + type: 'string', }, - }, - patternProperties: { - '^\\$': { + hostname: { + $role: 'expression', + title: 'Hostname', + description: 'Hostname for your QnA Maker service.', + default: 'settings.qna.hostname', + examples: ['https://yourserver.azurewebsites.net/qnamaker'], + type: 'string', + }, + noAnswer: { + $type: 'Microsoft.IActivityTemplate', + title: 'Fallback answer', + description: 'Default answer to return when none found in KB.', + default: 'Sorry, I did not find an answer.', + $ref: '#/definitions/Microsoft.IActivityTemplate', + }, + threshold: { + type: 'number', + title: 'Threshold', + description: 'Threshold score to filter results.', + default: 0.3, + }, + activeLearningCardTitle: { type: 'string', + title: 'Active learning card title', + description: 'Title for active learning suggestions card.', + default: 'Did you mean:', + }, + cardNoMatchText: { + type: 'string', + title: 'Card no match text', + description: 'Text for no match option.', + default: 'None of the above.', + }, + cardNoMatchResponse: { + $type: 'Microsoft.IActivityTemplate', + title: 'Card no match response', + description: 'Custom response when no match option was selected.', + default: 'Thanks for the feedback.', + $ref: '#/definitions/Microsoft.IActivityTemplate', + }, + strictFilters: { + type: 'array', + title: 'Strict Filter Property', + description: 'Memory property that holds strict filters to use when calling the QnA Maker KB.', + items: { + type: 'object', + }, }, }, }, From d882a545cc9ad876b944aed9b5699601c20f3a71 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:42:18 -0700 Subject: [PATCH 38/63] update regex types --- Composer/packages/lib/shared/src/appschema.ts | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 20953a6b15..02768b7ed0 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2537,7 +2537,19 @@ export const appschema: JSONSchema6 = { }, }, }, - 'Microsoft.RegexEntityRecognizer': { + 'Microsoft.RandomSelector': { + $role: 'unionType(Microsoft.ITriggerSelector)', + title: 'Random rule selector', + description: 'Select most specific true rule', + type: 'object', + properties: { + ...$properties(SDKTypes.RandomSelector), + seed: { + type: 'integer', + }, + }, + }, + 'Microsoft.RegExEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Regex Entity Recognizer', description: 'Recognizer which recognizes patterns of input based on regex.', @@ -2558,38 +2570,38 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.RegexRecognizer': { $role: 'unionType(Microsoft.IRecognizer)', - title: 'Regex Recognizer', - description: 'Recognizer which uses regex expressions to generate intents and entities.', + title: 'Regex recognizer', + description: 'Use regular expressions to recognize intents and entities from user input.', type: 'object', properties: { ...$properties(SDKTypes.RegexRecognizer), intents: { type: 'array', title: 'RegEx patterns to intents', - description: 'Collection of patterns to match intents', + description: 'Collection of patterns to match for an intent.', items: { type: 'object', properties: { intent: { type: 'string', title: 'Intent', - description: 'The intent name', + description: 'The intent name.', }, pattern: { type: 'string', title: 'Pattern', - description: 'The regular expression pattern for matching', + description: 'The regular expression pattern.', }, }, }, }, entities: { type: 'array', - title: 'Entity Recognizers', - description: 'Entity Recognizers to use', + title: 'Entity recognizers', + description: 'Collection of entity recognizers to use.', items: { - $type: 'Microsoft.EntityRecognizer', - $ref: '#/definitions/Microsoft.EntityRecognizer', + $type: 'Microsoft.EntityRecognizers', + $ref: '#/definitions/Microsoft.EntityRecognizers', }, }, }, From b2ddf4dd244eeb66348d21a5a54cefd2f078be3f Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:42:52 -0700 Subject: [PATCH 39/63] update RepeatDialog --- Composer/packages/lib/shared/src/appschema.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 02768b7ed0..e8d3f2ce69 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2609,15 +2609,10 @@ export const appschema: JSONSchema6 = { 'Microsoft.RepeatDialog': { $role: 'unionType(Microsoft.IDialog)', type: 'object', - title: 'Repeat Dialog', - description: 'This is a action which repeats the current dialog with the same dialog.', + title: 'Repeat dialog', + description: 'Repeat current dialog.', properties: { ...$properties(SDKTypes.RepeatDialog), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, }, }, 'Microsoft.ReplaceDialog': { From 1b1093c3e77941969f3c4f1782bcf8179f37467c Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:43:46 -0700 Subject: [PATCH 40/63] update ReplaceDialog --- Composer/packages/lib/shared/src/appschema.ts | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index e8d3f2ce69..6fa418b852 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2618,36 +2618,25 @@ export const appschema: JSONSchema6 = { 'Microsoft.ReplaceDialog': { $role: 'unionType(Microsoft.IDialog)', type: 'object', - title: 'Replace Dialog', - description: 'This is a action which replaces the current dialog with the target dialog', + title: 'Replace dialog', + description: 'Replace current dialog with another dialog.', properties: { ...$properties(SDKTypes.ReplaceDialog), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, dialog: { $type: 'Microsoft.IDialog', title: 'Dialog', - description: 'This is the dialog to switch to.', + description: 'Current dialog will be replaced by this dialog.', type: 'string', }, options: { type: 'object', - title: 'Options binding', - description: 'Bindings to configure the options object to pass to the dialog.', + title: 'Options', + description: 'One or more options that are passed to the dialog that is called.', additionalProperties: { type: 'string', title: 'Options', }, }, - property: { - $role: 'expression', - description: 'The property to bind to the dialog and store the result in', - examples: ['user.name'], - type: 'string', - }, }, }, 'Microsoft.SendActivity': { From c1a05f73f73c2dc86bddafd30bc56b749e546cda Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:44:27 -0700 Subject: [PATCH 41/63] update SendActivity --- Composer/packages/lib/shared/src/appschema.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 6fa418b852..49388417c0 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2641,20 +2641,15 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.SendActivity': { $role: 'unionType(Microsoft.IDialog)', - title: 'Send Activity Action', - description: 'This is a action which sends an activity to the user', + title: 'Send an activity', + description: 'Respond with an activity.', type: 'object', properties: { ...$properties(SDKTypes.SendActivity), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, activity: { $type: 'Microsoft.IActivityTemplate', title: 'Activity', - description: 'Activity to send to the user', + description: 'Activity to send.', $ref: '#/definitions/Microsoft.IActivityTemplate', }, }, From b98415e87460a9907ea0f9ef43b233b85f09eb34 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:45:10 -0700 Subject: [PATCH 42/63] update SetProperty --- Composer/packages/lib/shared/src/appschema.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 49388417c0..4b4659e8b6 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2656,28 +2656,23 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.SetProperty': { $role: 'unionType(Microsoft.IDialog)', - title: 'Set Property Action', - description: 'This action allows you to set memory to the value of an expression', + title: 'Set property', + description: 'Set property to a value.', type: 'object', properties: { ...$properties(SDKTypes.SetProperty), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, property: { $role: 'expression', title: 'Property', - description: 'The property to set the value of', + description: 'Property (named location to store information).', examples: ['user.age'], type: 'string', }, value: { $role: 'expression', title: 'Value', - description: 'Expression against memory to use to get the value.', - examples: ['dialog.result'], + description: 'New value or expression.', + examples: ["'milk'", 'dialog.favColor', "dialog.favColor == 'red'"], type: 'string', }, }, From 832498cad1c784b4786deffc6fbda33773dd9e84 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:46:08 -0700 Subject: [PATCH 43/63] add StaticActivityTemplate --- Composer/packages/lib/shared/src/appschema.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 4b4659e8b6..6cfed7f2ea 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2677,6 +2677,21 @@ export const appschema: JSONSchema6 = { }, }, }, + 'Microsoft.StaticActivityTemplate': { + $role: 'unionType(Microsoft.IActivityTemplate)', + title: 'Microsoft Static Activity Template', + description: 'This allows you to define a static Activity object', + type: 'object', + properties: { + ...$properties(SDKTypes.StaticActivityTemplate), + activity: { + type: 'object', + title: 'Activity', + description: 'A static Activity to used', + additionalProperties: true, + }, + }, + }, 'Microsoft.SwitchCondition': { $role: 'unionType(Microsoft.IDialog)', title: 'Switch Action', From b37df05748798810fc8744106ffda3761a3deca6 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:47:47 -0700 Subject: [PATCH 44/63] update SwitchCondition --- Composer/packages/lib/shared/src/appschema.ts | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 6cfed7f2ea..ce143e0031 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2694,27 +2694,22 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.SwitchCondition': { $role: 'unionType(Microsoft.IDialog)', - title: 'Switch Action', - description: 'Action which conditionally decides which action to execute next.', + title: 'Switch condition', + description: 'Execute different actions based on the value of a property.', type: 'object', properties: { ...$properties(SDKTypes.SwitchCondition), - id: { - type: 'string', - title: 'Id', - description: 'Optional dialog ID.', - }, condition: { $role: 'expression', title: 'Condition', - description: 'Expression to evaluate to switch on.', - examples: ['user.age > 3'], + description: 'Property to evaluate.', + examples: ['user.favColor'], type: 'string', }, cases: { type: 'array', title: 'Cases', - description: 'Cases to evaluate against condition', + description: 'Actions for each possible condition.', items: { type: 'object', required: ['value', 'case'], @@ -2722,13 +2717,14 @@ export const appschema: JSONSchema6 = { value: { $role: 'expression', title: 'Value', - description: 'Value which must match the condition property', + description: 'Value.', + examples: ["'red'", 'dialog.colors.red'], type: 'string', }, actions: { type: 'array', title: 'Actions', - description: 'Actions to execute if case is equal to condition', + description: 'Actions to execute.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', @@ -2740,7 +2736,7 @@ export const appschema: JSONSchema6 = { default: { type: 'array', title: 'Default', - description: 'Action to execute if no case is equal to condition', + description: 'Actions to execute if none of the cases meet the condition.', items: { $type: 'Microsoft.IDialog', $ref: '#/definitions/Microsoft.IDialog', From aeffc55c80b44c8baf60b2f943bee721b224533e Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:48:49 -0700 Subject: [PATCH 45/63] update TextInput --- Composer/packages/lib/shared/src/appschema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index ce143e0031..e0c49bf2e7 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2755,8 +2755,8 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.TextInput': { $role: 'unionType(Microsoft.IDialog)', - title: 'TextInput Dialog', - description: 'This represents a dialog which gathers a text from the user', + title: 'Text input dialog', + description: 'Collection information - Ask for a word or sentence.', type: 'object', properties: { ...$properties(SDKTypes.TextInput), From 75276f7e057785096c83ca8b0a87219a75a36594 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:49:23 -0700 Subject: [PATCH 46/63] add TextTemplate --- Composer/packages/lib/shared/src/appschema.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index e0c49bf2e7..5ef5ff208f 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2853,6 +2853,20 @@ export const appschema: JSONSchema6 = { }, }, }, + 'Microsoft.TextTemplate': { + $role: 'unionType(Microsoft.ITextTemplate)', + title: 'Microsoft TextTemplate', + description: 'Lg tempalte to evaluate to create text', + type: 'object', + properties: { + ...$properties(SDKTypes.TextTemplate), + template: { + title: 'Template', + Description: 'Language Generator template to evaluate to create the text', + type: 'string', + }, + }, + }, 'Microsoft.TraceActivity': { $role: 'unionType(Microsoft.IDialog)', title: 'Trace Activity Step', From 511f848741a6db2592329abfd3eee522e9db9769 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:50:02 -0700 Subject: [PATCH 47/63] update TraceActivity --- Composer/packages/lib/shared/src/appschema.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 5ef5ff208f..af8a84e5f4 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2869,28 +2869,26 @@ export const appschema: JSONSchema6 = { }, 'Microsoft.TraceActivity': { $role: 'unionType(Microsoft.IDialog)', - title: 'Trace Activity Step', - description: - "This is a debugging message that's used to track progress through the code by emitting events visible in the emulator.", + title: 'Send a TraceActivity', + description: 'Send a trace activity to the transcript logger and/ or Bot Framework Emulator.', type: 'object', properties: { ...$properties(SDKTypes.TraceActivity), name: { type: 'string', title: 'Name', - description: 'Name of the trace activity.', + description: 'Name of the trace activity', }, valueType: { type: 'string', - title: 'Value Type', - description: 'Value type of the trace activity.', + title: 'Value type', + description: 'Type of value', }, value: { - $role: 'memoryPath', + $role: 'expression', title: 'Value', - description: 'This is the property in memory that contains the value of the trace activity.', + description: 'Property that holds the value to send as trace activity.', type: 'string', - pattern: '^[a-zA-Z][a-zA-Z0-9.]*$', }, }, }, From e8df77e27fd51ccd1e43e2beced33f7e450eb3e7 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 14:50:51 -0700 Subject: [PATCH 48/63] add TrueSelector --- Composer/packages/lib/shared/src/appschema.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index af8a84e5f4..4f0370d924 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2892,6 +2892,15 @@ export const appschema: JSONSchema6 = { }, }, }, + 'Microsoft.TrueSelector': { + $role: 'unionType(Microsoft.ITriggerSelector)', + title: 'True Trigger Selector', + description: 'Selector for all true events', + type: 'object', + properties: { + ...$properties(SDKTypes.TrueSelector), + }, + }, 'Microsoft.UrlEntityRecognizer': { $role: 'unionType(Microsoft.EntityRecognizers)', title: 'Url Entity Recognizer', From e927c0b4b5e3c1ef10b9c01a1a245e5b84984d77 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 15:05:58 -0700 Subject: [PATCH 49/63] update events -> triggers --- .../obiformeditor/demo/src/index.tsx | 4 +-- .../src/Form/fields/RulesField.tsx | 6 ++--- .../obiformeditor/src/schema/types.d.ts | 25 +++++++------------ .../obiformeditor/src/schema/uischema.ts | 13 +++------- 4 files changed, 17 insertions(+), 31 deletions(-) diff --git a/Composer/packages/extensions/obiformeditor/demo/src/index.tsx b/Composer/packages/extensions/obiformeditor/demo/src/index.tsx index 4fa51dd768..462bf181e6 100644 --- a/Composer/packages/extensions/obiformeditor/demo/src/index.tsx +++ b/Composer/packages/extensions/obiformeditor/demo/src/index.tsx @@ -57,7 +57,7 @@ function createDialogInfo(id: string, content: Partial isRoot: id === 'Main', content: { $type: 'Microsoft.AdaptiveDialog', - events: [], + triggers: [], ...content, }, lgFile: '', @@ -367,7 +367,7 @@ const Demo: React.FC = () => { memory={memoryFormData} onChange={debouncedOnChange} schemas={{ editor: editorSchemaFormData }} - shellApi={mockShellApi as ShellApi} + shellApi={mockShellApi} luFiles={luFiles} lgFiles={lgFiles} currentDialog={dialogFiles[0]} diff --git a/Composer/packages/extensions/obiformeditor/src/Form/fields/RulesField.tsx b/Composer/packages/extensions/obiformeditor/src/Form/fields/RulesField.tsx index 8a998b98a6..b1e5c6f46a 100644 --- a/Composer/packages/extensions/obiformeditor/src/Form/fields/RulesField.tsx +++ b/Composer/packages/extensions/obiformeditor/src/Form/fields/RulesField.tsx @@ -9,7 +9,7 @@ import { setOverridesOnField } from '../utils'; import { TableField } from './TableField'; -const renderTitle = (item: MicrosoftIRule) => { +const renderTitle = (item: ITriggerCondition) => { const friendlyName = get(item, '$designer.name'); if (friendlyName) { @@ -28,12 +28,12 @@ export function RulesField(props: FieldProps) { const overrides = setOverridesOnField(props.formContext, 'RulesField'); return ( - + {...props} {...overrides} dialogOptionsOpts={{ include: [DialogGroup.EVENTS], subMenu: false }} label={formatMessage('Add New Rule')} - navPrefix="events" + navPrefix="triggers" renderTitle={renderTitle} > {({ createNewItemAtIndex }) => ( diff --git a/Composer/packages/extensions/obiformeditor/src/schema/types.d.ts b/Composer/packages/extensions/obiformeditor/src/schema/types.d.ts index 752c893caf..8918267567 100644 --- a/Composer/packages/extensions/obiformeditor/src/schema/types.d.ts +++ b/Composer/packages/extensions/obiformeditor/src/schema/types.d.ts @@ -193,13 +193,7 @@ interface RuleBase extends BaseSchema { /** Optional constraint to which must be met for this rule to fire */ constraint?: string; /** Sequence of steps or dialogs to execute */ - steps: MicrosoftIDialog[]; -} - -/** Defines a rule for an event which is triggered by some source */ -interface OnEvent extends RuleBase { - /** Events to trigger this rule for */ - events: DialogEvent[]; + actions: MicrosoftIDialog[]; } /** This defines the steps to take when an Intent is recognized (and optionally entities) */ @@ -210,13 +204,10 @@ interface OnIntent extends RuleBase { entities: string[]; } -/** Defines a rule for an event which is triggered by some source */ -interface Rule extends RuleBase {} - /** Defines a sequence of steps to take if there is no other trigger or plan operating */ interface OnUnknownIntent extends RuleBase {} -type MicrosoftIRule = OnEvent | OnIntent | Rule | OnUnknownIntent; +type ITriggerCondition = OnIntent | OnUnknownIntent; /** * Conversational Flow and Dialog Management @@ -239,16 +230,18 @@ interface SwitchCondition extends BaseSchema { default?: MicrosoftIDialog[]; } -/** This configures a data driven dialog via a collection of steps/dialogs. */ +/** Flexible, data driven dialog that can adapt to the conversation. */ interface MicrosoftAdaptiveDialog extends BaseSchema { + /** Optional dialog ID. */ + id?: string; /** If this is true the dialog will automatically end when there are no more steps to run. If this is false it is the responsbility of the author to call EndDialog at an appropriate time. */ autoEndDialog?: boolean; + /** Value that will be passed back to the parent dialog. */ + defaultResultProperty?: string; /** Configured recognizer to generate intent and entites from user utterance. */ recognizer?: MicrosoftIRecognizer; - /** Language generator to use for this dialog. (aka: LG file) */ - generator?: string; /** This is the array of rules to use to evaluate conversation */ - events: MicrosoftIRule[]; + triggers: ITriggerCondition[]; } /* Union of components which implement the IDialog interface */ @@ -256,6 +249,6 @@ type MicrosoftIDialog = | ChoiceInput | ConfirmInput | MicrosoftIRecognizer - | MicrosoftIRule + | ITriggerCondition | SwitchCondition | TextInput; diff --git a/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts b/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts index 83284de9aa..0ab69964c4 100644 --- a/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts +++ b/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts @@ -15,13 +15,13 @@ export const uiSchema: { [key in SDKTypes]?: UiSchema } = { recognizer: { 'ui:field': 'RecognizerField', }, - events: { + triggers: { 'ui:field': 'RulesField', }, actions: { 'ui:field': 'StepsField', }, - 'ui:order': ['property', 'outputBinding', 'recognizer', 'events', '*'], + 'ui:order': ['property', 'outputBinding', 'recognizer', 'triggers', '*'], 'ui:hidden': ['autoEndDialog', 'generator', ...globalHidden], }, [SDKTypes.BeginDialog]: { @@ -93,20 +93,13 @@ export const uiSchema: { [key in SDKTypes]?: UiSchema } = { 'ui:hidden': [...globalHidden], }, [SDKTypes.OnDialogEvent]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['events', 'constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], - }, - [SDKTypes.OnEndOfConversationActivity]: { actions: { 'ui:field': 'StepsField', }, 'ui:order': ['constraint', '*', 'actions'], 'ui:hidden': [...globalHidden], }, - [SDKTypes.OnEvent]: { + [SDKTypes.OnEndOfConversationActivity]: { actions: { 'ui:field': 'StepsField', }, From 3b6152cbd43df992aee0c8f1fcf5f7bbed1fb24b Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Tue, 15 Oct 2019 16:44:53 -0700 Subject: [PATCH 50/63] move SDKTypes to own file avoids circular reference runtime errors --- Composer/packages/lib/shared/src/appschema.ts | 30 ++--- Composer/packages/lib/shared/src/index.ts | 1 + Composer/packages/lib/shared/src/labelMap.ts | 2 +- Composer/packages/lib/shared/src/types.d.ts | 20 --- Composer/packages/lib/shared/src/types.ts | 114 ++++++++++++++++++ Composer/packages/lib/shared/src/viewUtils.ts | 99 +-------------- 6 files changed, 127 insertions(+), 139 deletions(-) delete mode 100644 Composer/packages/lib/shared/src/types.d.ts create mode 100644 Composer/packages/lib/shared/src/types.ts diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 4f0370d924..c07e7a49be 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1,26 +1,16 @@ -import { JSONSchema6 } from 'json-schema'; +import { SDKTypes, OBISchema } from './types'; -import { SDKTypes } from './viewUtils'; - -export const FIELDS_TO_HIDE = [ - '$id', - '$type', - '$copy', - '$designer', - 'inputBindings', - 'outputBinding', - 'selector', - 'id', - 'tags', -]; +export const FIELDS_TO_HIDE = ['$id', '$type', '$copy', '$designer', 'selector', 'id', 'tags']; /** Types that can be represented by a sub tree in the graph */ export const COMPOUND_TYPES = [ - 'Microsoft.AdaptiveDialog', - 'Microsoft.OnEvent', - 'Microsoft.OnIntent', - 'Microsoft.OnUnknownIntent', - 'Microsoft.OnConversationUpdateActivity', + SDKTypes.AdaptiveDialog, + SDKTypes.OnCondition, + SDKTypes.OnDialogEvent, + SDKTypes.OnCustomEvent, + SDKTypes.OnIntent, + SDKTypes.OnUnknownIntent, + SDKTypes.OnConversationUpdateActivity, ]; const $properties = ($type: SDKTypes) => { @@ -52,7 +42,7 @@ const $properties = ($type: SDKTypes) => { }; }; -export const appschema: JSONSchema6 = { +export const appschema: OBISchema = { $schema: 'https://raw.githubusercontent.com/Microsoft/botbuilder-tools/SchemaGen/packages/DialogSchema/src/dialogSchema.schema', $id: 'app.schema', diff --git a/Composer/packages/lib/shared/src/index.ts b/Composer/packages/lib/shared/src/index.ts index 8e9fb5297e..88af54b1de 100644 --- a/Composer/packages/lib/shared/src/index.ts +++ b/Composer/packages/lib/shared/src/index.ts @@ -9,3 +9,4 @@ export * from './viewUtils'; export * from './dialogFactory'; export * from './promptTabs'; export * from './appschema'; +export * from './types'; diff --git a/Composer/packages/lib/shared/src/labelMap.ts b/Composer/packages/lib/shared/src/labelMap.ts index 9fbe0d8638..61050cb278 100644 --- a/Composer/packages/lib/shared/src/labelMap.ts +++ b/Composer/packages/lib/shared/src/labelMap.ts @@ -1,6 +1,6 @@ import formatMessage from 'format-message'; -import { SDKTypes } from './viewUtils'; +import { SDKTypes } from './types'; formatMessage.setup({ missingTranslation: 'ignore', diff --git a/Composer/packages/lib/shared/src/types.d.ts b/Composer/packages/lib/shared/src/types.d.ts deleted file mode 100644 index dcc0b9ceb6..0000000000 --- a/Composer/packages/lib/shared/src/types.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -declare module 'json-schema' { - interface OBISchema { - $schema?: string; - $role?: string; - $type?: string; - type?: string; - $copy?: string; - description?: string; - definitions?: any; - $id?: string; - $designer?: { - [key: string]: any; - }; - } - - interface JSONSchema6 extends OBISchema { - title?: string; - __additional_property?: boolean; - } -} diff --git a/Composer/packages/lib/shared/src/types.ts b/Composer/packages/lib/shared/src/types.ts new file mode 100644 index 0000000000..86d05daa0e --- /dev/null +++ b/Composer/packages/lib/shared/src/types.ts @@ -0,0 +1,114 @@ +import { JSONSchema6 } from 'json-schema'; + +export interface OBISchema extends JSONSchema6 { + $schema?: string; + $role?: string; + $type?: string; + $copy?: string; + description?: string; + definitions?: any; + $id?: string; + $designer?: { + [key: string]: any; + }; + title?: string; + __additional_property?: boolean; +} + +// All of the known SDK types. Update this list when we take a schema update. +// To get this list copy the output of the following commands in a node repl from the project root: + +// const schema = JSON.parse(fs.readFileSync('./BotProject/CSharp/Schemas/sdk.schema', 'utf-8')); +// const types = schema.oneOf.map(t => t.title); +// let uType = 'export enum SDKTypes {\n'; +// uType += types.map(t => ` ${t.replace('Microsoft.', '')} = '${t}',`).join('\n'); +// uType += '\n}'; +// console.log(uType); + +/** + * All SDK Types defined by the schema. + * All references of the type should be accessed through this enum. + * */ + +export enum SDKTypes { + ActivityTemplate = 'Microsoft.ActivityTemplate', + AdaptiveDialog = 'Microsoft.AdaptiveDialog', + AgeEntityRecognizer = 'Microsoft.AgeEntityRecognizer', + AttachmentInput = 'Microsoft.AttachmentInput', + BeginDialog = 'Microsoft.BeginDialog', + CancelAllDialogs = 'Microsoft.CancelAllDialogs', + ChoiceInput = 'Microsoft.ChoiceInput', + ConditionalSelector = 'Microsoft.ConditionalSelector', + ConfirmInput = 'Microsoft.ConfirmInput', + ConfirmationEntityRecognizer = 'Microsoft.ConfirmationEntityRecognizer', + CurrencyEntityRecognizer = 'Microsoft.CurrencyEntityRecognizer', + DateTimeEntityRecognizer = 'Microsoft.DateTimeEntityRecognizer', + DateTimeInput = 'Microsoft.DateTimeInput', + DebugBreak = 'Microsoft.DebugBreak', + DeleteProperty = 'Microsoft.DeleteProperty', + DimensionEntityRecognizer = 'Microsoft.DimensionEntityRecognizer', + EditActions = 'Microsoft.EditActions', + EditArray = 'Microsoft.EditArray', + EmailEntityRecognizer = 'Microsoft.EmailEntityRecognizer', + EmitEvent = 'Microsoft.EmitEvent', + EndDialog = 'Microsoft.EndDialog', + EndTurn = 'Microsoft.EndTurn', + FirstSelector = 'Microsoft.FirstSelector', + Foreach = 'Microsoft.Foreach', + ForeachPage = 'Microsoft.ForeachPage', + GuidEntityRecognizer = 'Microsoft.GuidEntityRecognizer', + HashtagEntityRecognizer = 'Microsoft.HashtagEntityRecognizer', + HttpRequest = 'Microsoft.HttpRequest', + IfCondition = 'Microsoft.IfCondition', + InitProperty = 'Microsoft.InitProperty', + IpEntityRecognizer = 'Microsoft.IpEntityRecognizer', + LanguagePolicy = 'Microsoft.LanguagePolicy', + LogAction = 'Microsoft.LogAction', + LuisRecognizer = 'Microsoft.LuisRecognizer', + MentionEntityRecognizer = 'Microsoft.MentionEntityRecognizer', + MostSpecificSelector = 'Microsoft.MostSpecificSelector', + MultiLanguageRecognizer = 'Microsoft.MultiLanguageRecognizer', + NumberEntityRecognizer = 'Microsoft.NumberEntityRecognizer', + NumberInput = 'Microsoft.NumberInput', + NumberRangeEntityRecognizer = 'Microsoft.NumberRangeEntityRecognizer', + OAuthInput = 'Microsoft.OAuthInput', + OnActivity = 'Microsoft.OnActivity', + OnBeginDialog = 'Microsoft.OnBeginDialog', + OnCancelDialog = 'Microsoft.OnCancelDialog', + OnCondition = 'Microsoft.OnCondition', + OnConversationUpdateActivity = 'Microsoft.OnConversationUpdateActivity', + OnCustomEvent = 'Microsoft.OnCustomEvent', + OnDialogEvent = 'Microsoft.OnDialogEvent', + OnEndOfConversationActivity = 'Microsoft.OnEndOfConversationActivity', + OnError = 'Microsoft.OnError', + OnEventActivity = 'Microsoft.OnEventActivity', + OnHandoffActivity = 'Microsoft.OnHandoffActivity', + OnIntent = 'Microsoft.OnIntent', + OnInvokeActivity = 'Microsoft.OnInvokeActivity', + OnMessageActivity = 'Microsoft.OnMessageActivity', + OnMessageDeleteActivity = 'Microsoft.OnMessageDeleteActivity', + OnMessageReactionActivity = 'Microsoft.OnMessageReactionActivity', + OnMessageUpdateActivity = 'Microsoft.OnMessageUpdateActivity', + OnRepromptDialog = 'Microsoft.OnRepromptDialog', + OnTypingActivity = 'Microsoft.OnTypingActivity', + OnUnknownIntent = 'Microsoft.OnUnknownIntent', + OrdinalEntityRecognizer = 'Microsoft.OrdinalEntityRecognizer', + PercentageEntityRecognizer = 'Microsoft.PercentageEntityRecognizer', + PhoneNumberEntityRecognizer = 'Microsoft.PhoneNumberEntityRecognizer', + QnAMakerDialog = 'Microsoft.QnAMakerDialog', + RandomSelector = 'Microsoft.RandomSelector', + RegExEntityRecognizer = 'Microsoft.RegExEntityRecognizer', + RegexRecognizer = 'Microsoft.RegexRecognizer', + RepeatDialog = 'Microsoft.RepeatDialog', + ReplaceDialog = 'Microsoft.ReplaceDialog', + SendActivity = 'Microsoft.SendActivity', + SetProperty = 'Microsoft.SetProperty', + StaticActivityTemplate = 'Microsoft.StaticActivityTemplate', + SwitchCondition = 'Microsoft.SwitchCondition', + TemperatureEntityRecognizer = 'Microsoft.TemperatureEntityRecognizer', + TextInput = 'Microsoft.TextInput', + TextTemplate = 'Microsoft.TextTemplate', + TraceActivity = 'Microsoft.TraceActivity', + TrueSelector = 'Microsoft.TrueSelector', + UrlEntityRecognizer = 'Microsoft.UrlEntityRecognizer', +} diff --git a/Composer/packages/lib/shared/src/viewUtils.ts b/Composer/packages/lib/shared/src/viewUtils.ts index 0905c7d18d..f42ec1a136 100644 --- a/Composer/packages/lib/shared/src/viewUtils.ts +++ b/Composer/packages/lib/shared/src/viewUtils.ts @@ -1,106 +1,9 @@ import { IContextualMenuItem, IContextualMenuProps } from 'office-ui-fabric-react'; +import { SDKTypes } from './types'; import { ConceptLabels } from './labelMap'; import { seedNewDialog } from './dialogFactory'; -// All of the known SDK types. Update this list when we take a schema update. -// To get this list copy the output of the following commands in a node repl from the project root: - -// const schema = JSON.parse(fs.readFileSync('./BotProject/CSharp/Schemas/sdk.schema', 'utf-8')); -// const types = schema.oneOf.map(t => t.title); -// let uType = 'export enum SDKTypes {\n'; -// uType += types.map(t => ` ${t.replace('Microsoft.', '')} = '${t}',`).join('\n'); -// uType += '\n}'; -// console.log(uType); - -/** - * All SDK Types defined by the schema. - * All references of the type should be accessed through this enum. - * */ - -export enum SDKTypes { - ActivityTemplate = 'Microsoft.ActivityTemplate', - AdaptiveDialog = 'Microsoft.AdaptiveDialog', - AgeEntityRecognizer = 'Microsoft.AgeEntityRecognizer', - AttachmentInput = 'Microsoft.AttachmentInput', - BeginDialog = 'Microsoft.BeginDialog', - CancelAllDialogs = 'Microsoft.CancelAllDialogs', - ChoiceInput = 'Microsoft.ChoiceInput', - ConditionalSelector = 'Microsoft.ConditionalSelector', - ConfirmInput = 'Microsoft.ConfirmInput', - ConfirmationEntityRecognizer = 'Microsoft.ConfirmationEntityRecognizer', - CurrencyEntityRecognizer = 'Microsoft.CurrencyEntityRecognizer', - DateTimeEntityRecognizer = 'Microsoft.DateTimeEntityRecognizer', - DateTimeInput = 'Microsoft.DateTimeInput', - DebugBreak = 'Microsoft.DebugBreak', - DeleteProperty = 'Microsoft.DeleteProperty', - DimensionEntityRecognizer = 'Microsoft.DimensionEntityRecognizer', - EditActions = 'Microsoft.EditActions', - EditArray = 'Microsoft.EditArray', - EmailEntityRecognizer = 'Microsoft.EmailEntityRecognizer', - EmitEvent = 'Microsoft.EmitEvent', - EndDialog = 'Microsoft.EndDialog', - EndTurn = 'Microsoft.EndTurn', - FirstSelector = 'Microsoft.FirstSelector', - Foreach = 'Microsoft.Foreach', - ForeachPage = 'Microsoft.ForeachPage', - GuidEntityRecognizer = 'Microsoft.GuidEntityRecognizer', - HashtagEntityRecognizer = 'Microsoft.HashtagEntityRecognizer', - HttpRequest = 'Microsoft.HttpRequest', - IfCondition = 'Microsoft.IfCondition', - InitProperty = 'Microsoft.InitProperty', - IpEntityRecognizer = 'Microsoft.IpEntityRecognizer', - LanguagePolicy = 'Microsoft.LanguagePolicy', - LogAction = 'Microsoft.LogAction', - LuisRecognizer = 'Microsoft.LuisRecognizer', - MentionEntityRecognizer = 'Microsoft.MentionEntityRecognizer', - MostSpecificSelector = 'Microsoft.MostSpecificSelector', - MultiLanguageRecognizer = 'Microsoft.MultiLanguageRecognizer', - NumberEntityRecognizer = 'Microsoft.NumberEntityRecognizer', - NumberInput = 'Microsoft.NumberInput', - NumberRangeEntityRecognizer = 'Microsoft.NumberRangeEntityRecognizer', - OAuthInput = 'Microsoft.OAuthInput', - OnActivity = 'Microsoft.OnActivity', - OnBeginDialog = 'Microsoft.OnBeginDialog', - OnCancelDialog = 'Microsoft.OnCancelDialog', - OnCondition = 'Microsoft.OnCondition', - OnConversationUpdateActivity = 'Microsoft.OnConversationUpdateActivity', - OnCustomEvent = 'Microsoft.OnCustomEvent', - OnDialogEvent = 'Microsoft.OnDialogEvent', - OnEndOfConversationActivity = 'Microsoft.OnEndOfConversationActivity', - OnError = 'Microsoft.OnError', - OnEventActivity = 'Microsoft.OnEventActivity', - OnHandoffActivity = 'Microsoft.OnHandoffActivity', - OnIntent = 'Microsoft.OnIntent', - OnInvokeActivity = 'Microsoft.OnInvokeActivity', - OnMessageActivity = 'Microsoft.OnMessageActivity', - OnMessageDeleteActivity = 'Microsoft.OnMessageDeleteActivity', - OnMessageReactionActivity = 'Microsoft.OnMessageReactionActivity', - OnMessageUpdateActivity = 'Microsoft.OnMessageUpdateActivity', - OnRepromptDialog = 'Microsoft.OnRepromptDialog', - OnTypingActivity = 'Microsoft.OnTypingActivity', - OnUnknownIntent = 'Microsoft.OnUnknownIntent', - OrdinalEntityRecognizer = 'Microsoft.OrdinalEntityRecognizer', - PercentageEntityRecognizer = 'Microsoft.PercentageEntityRecognizer', - PhoneNumberEntityRecognizer = 'Microsoft.PhoneNumberEntityRecognizer', - QnAMakerDialog = 'Microsoft.QnAMakerDialog', - RandomSelector = 'Microsoft.RandomSelector', - RegExEntityRecognizer = 'Microsoft.RegExEntityRecognizer', - RegexRecognizer = 'Microsoft.RegexRecognizer', - RepeatDialog = 'Microsoft.RepeatDialog', - ReplaceDialog = 'Microsoft.ReplaceDialog', - SendActivity = 'Microsoft.SendActivity', - SetProperty = 'Microsoft.SetProperty', - StaticActivityTemplate = 'Microsoft.StaticActivityTemplate', - SwitchCondition = 'Microsoft.SwitchCondition', - TemperatureEntityRecognizer = 'Microsoft.TemperatureEntityRecognizer', - TextInput = 'Microsoft.TextInput', - TextTemplate = 'Microsoft.TextTemplate', - TraceActivity = 'Microsoft.TraceActivity', - TrueSelector = 'Microsoft.TrueSelector', - UrlEntityRecognizer = 'Microsoft.UrlEntityRecognizer', -} - export const PROMPT_TYPES = [ SDKTypes.AttachmentInput, SDKTypes.ChoiceInput, From ed009b643846aa5a79a552c53a18f20ee8f640e9 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 08:53:30 -0700 Subject: [PATCH 51/63] add to triggers instead of events when creating new trigger --- Composer/packages/client/src/utils/dialogUtil.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Composer/packages/client/src/utils/dialogUtil.ts b/Composer/packages/client/src/utils/dialogUtil.ts index 3620e3c3f7..b3460e47d5 100644 --- a/Composer/packages/client/src/utils/dialogUtil.ts +++ b/Composer/packages/client/src/utils/dialogUtil.ts @@ -53,9 +53,10 @@ export function getFriendlyName(data) { export function insert(content, path: string, position: number | undefined, data: TriggerFormData) { const current = get(content, path, []); - const optionalAttributes: { intent?: string; events?: string[] } = {}; + const optionalAttributes: { intent?: string; triggers?: string[] } = {}; + if (data.eventType) { - optionalAttributes.events = [data.eventType]; + optionalAttributes.triggers = [data.eventType]; } if (data.intent) { From de01b8bd7223bb3882fb4f437346ccf3cc5a4a99 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 08:54:43 -0700 Subject: [PATCH 52/63] update visual editor to reference triggers and OnCustomEvent --- .../visual-designer/src/components/nodes/templates/RuleCard.tsx | 2 +- .../visual-designer/src/components/renderers/EventRenderer.tsx | 2 +- .../extensions/visual-designer/src/constants/ObiFieldNames.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Composer/packages/extensions/visual-designer/src/components/nodes/templates/RuleCard.tsx b/Composer/packages/extensions/visual-designer/src/components/nodes/templates/RuleCard.tsx index f9d7634800..1dc5095b89 100644 --- a/Composer/packages/extensions/visual-designer/src/components/nodes/templates/RuleCard.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/nodes/templates/RuleCard.tsx @@ -54,7 +54,7 @@ export const RuleCard: React.FC = ({ id, data, label, onEvent }): JSX } break; - case ObiTypes.OnEvent: + case ObiTypes.OnCondition: if (data.events && data.events.length) { trigger = formatMessage( `{event} { diff --git a/Composer/packages/extensions/visual-designer/src/components/renderers/EventRenderer.tsx b/Composer/packages/extensions/visual-designer/src/components/renderers/EventRenderer.tsx index 84fee7c98f..f5319b9d02 100644 --- a/Composer/packages/extensions/visual-designer/src/components/renderers/EventRenderer.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/renderers/EventRenderer.tsx @@ -9,7 +9,7 @@ import { IntentRule, ConversationUpdateActivityRule, EventRule, UnknownIntentRul import { NodeProps, defaultNodeProps } from '../nodes/nodeProps'; const rendererByObiType = { - [ObiTypes.OnEvent]: EventRule, + [ObiTypes.OnCondition]: EventRule, [ObiTypes.OnIntent]: IntentRule, [ObiTypes.OnUnknownIntent]: UnknownIntentRule, [ObiTypes.OnConversationUpdateActivity]: ConversationUpdateActivityRule, diff --git a/Composer/packages/extensions/visual-designer/src/constants/ObiFieldNames.ts b/Composer/packages/extensions/visual-designer/src/constants/ObiFieldNames.ts index 224a79de5a..ae00cdbf79 100644 --- a/Composer/packages/extensions/visual-designer/src/constants/ObiFieldNames.ts +++ b/Composer/packages/extensions/visual-designer/src/constants/ObiFieldNames.ts @@ -1,5 +1,5 @@ export const ObiFieldNames = { - Events: 'events', + Events: 'triggers', Actions: 'actions', ElseActions: 'elseActions', Condition: 'condition', From 62cc1484b2f1788d67e24f1404b7eb96572bab47 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 08:55:17 -0700 Subject: [PATCH 53/63] remove value from prompt form --- .../src/Form/fields/PromptField/UserAnswers.tsx | 11 ----------- .../extensions/obiformeditor/src/schema/types.d.ts | 2 -- 2 files changed, 13 deletions(-) diff --git a/Composer/packages/extensions/obiformeditor/src/Form/fields/PromptField/UserAnswers.tsx b/Composer/packages/extensions/obiformeditor/src/Form/fields/PromptField/UserAnswers.tsx index 2f72050bf7..84348a6528 100644 --- a/Composer/packages/extensions/obiformeditor/src/Form/fields/PromptField/UserAnswers.tsx +++ b/Composer/packages/extensions/obiformeditor/src/Form/fields/PromptField/UserAnswers.tsx @@ -54,17 +54,6 @@ export const UserAnswers: React.FC = props => { /> )} -
- -
{getSchema('defaultLocale') && (
Date: Wed, 16 Oct 2019 08:56:10 -0700 Subject: [PATCH 54/63] update editor schema --- Composer/packages/server/schemas/editor.schema | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Composer/packages/server/schemas/editor.schema b/Composer/packages/server/schemas/editor.schema index fb2c5b69aa..f3088aa6dc 100644 --- a/Composer/packages/server/schemas/editor.schema +++ b/Composer/packages/server/schemas/editor.schema @@ -125,7 +125,10 @@ "Microsoft.OnEndOfConversationActivity": { "title": "Handle an Event: EndOfConversationActivity" }, - "Microsoft.OnEvent": { + "Microsoft.OnCondition": { + "title": "Handle an condition" + }, + "Microsoft.OnCustomEvent": { "title": "Handle an Event" }, "Microsoft.OnEventActivity": { From 9a842c5ffbf8e07c297194fd6557f84d8d47140f Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 09:31:57 -0700 Subject: [PATCH 55/63] fix navigating to actions from form --- Composer/packages/client/src/ShellApi.ts | 11 +++++++++-- .../obiformeditor/src/Form/fields/StepsField.tsx | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Composer/packages/client/src/ShellApi.ts b/Composer/packages/client/src/ShellApi.ts index 4aaea0eb43..45cd42ad89 100644 --- a/Composer/packages/client/src/ShellApi.ts +++ b/Composer/packages/client/src/ShellApi.ts @@ -311,9 +311,16 @@ export const ShellApi: React.FC = () => { function focusSteps({ subPaths = [], fragment }, event) { cleanData(); let dataPath: string = subPaths[0]; - if (event.source.name === FORM_EDITOR && focused && dataPath !== focused) { - dataPath = `${focused}.${dataPath}`; + + if (event.source.name === FORM_EDITOR) { + // nothing focused yet, prepend the selected path + if (!focused && selected) { + dataPath = `${selected}.${dataPath}`; + } else if (focused !== dataPath) { + dataPath = `${focused}.${dataPath}`; + } } + actions.focusTo(dataPath, fragment); } diff --git a/Composer/packages/extensions/obiformeditor/src/Form/fields/StepsField.tsx b/Composer/packages/extensions/obiformeditor/src/Form/fields/StepsField.tsx index 39432c394c..bc7125f0d2 100644 --- a/Composer/packages/extensions/obiformeditor/src/Form/fields/StepsField.tsx +++ b/Composer/packages/extensions/obiformeditor/src/Form/fields/StepsField.tsx @@ -23,7 +23,7 @@ export const StepsField: React.FC = props => { dialogOptionsOpts={{ exclude: [DialogGroup.EVENTS, DialogGroup.ADVANCED_EVENTS, DialogGroup.SELECTOR, DialogGroup.OTHER], }} - navPrefix={`${formContext.focusedEvent}.${props.name}`} + navPrefix={props.name} > {({ createNewItemAtIndex }) => ( Date: Wed, 16 Oct 2019 09:32:43 -0700 Subject: [PATCH 56/63] memoize form change handler --- .../packages/extensions/obiformeditor/src/ObiFormEditor.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Composer/packages/extensions/obiformeditor/src/ObiFormEditor.tsx b/Composer/packages/extensions/obiformeditor/src/ObiFormEditor.tsx index 032fdaf9af..b54f1da203 100644 --- a/Composer/packages/extensions/obiformeditor/src/ObiFormEditor.tsx +++ b/Composer/packages/extensions/obiformeditor/src/ObiFormEditor.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import ErrorBoundary, { FallbackProps } from 'react-error-boundary'; import { MessageBar, MessageBarType } from 'office-ui-fabric-react'; import debounce from 'lodash.debounce'; @@ -32,7 +32,8 @@ const ObiFormEditor: React.FC = props => { props.onChange(data, props.focusedSteps[0]); }; - const debouncedOnChange = debounce(onChange, 750); + // only need to debounce the change handler when focusedSteps change + const debouncedOnChange = useMemo(() => debounce(onChange, 750), [props.focusedSteps[0]]); const key = get(props.data, '$designer.id', props.focusPath); return ( From a85353e0800b0e2fa9f2e40b825a541ae4e81992 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 09:57:10 -0700 Subject: [PATCH 57/63] show dialog events in trigger creation --- .../ProjectTree/TriggerCreationModal.tsx | 12 +++++----- Composer/packages/lib/shared/src/appschema.ts | 24 +++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx b/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx index da5342f120..5cba01ef68 100644 --- a/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx +++ b/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx @@ -4,6 +4,7 @@ import formatMessage from 'format-message'; import { DialogFooter, PrimaryButton, DefaultButton, Stack, TextField, IDropdownOption } from 'office-ui-fabric-react'; import { Dropdown } from 'office-ui-fabric-react/lib/Dropdown'; import { get } from 'lodash'; +import { appschema } from 'shared'; import { addNewTrigger, @@ -56,7 +57,7 @@ export const TriggerCreationModal: React.FC = props = const { isOpen, onDismiss, onSubmit, dialogId } = props; const [formData, setFormData] = useState(initialFormData); const { state } = useContext(StoreContext); - const { dialogs, schemas, luFiles } = state; + const { dialogs, luFiles } = state; const luFile = luFiles.find(lu => lu.id === dialogId); const onClickSubmitButton = e => { e.preventDefault(); @@ -93,17 +94,16 @@ export const TriggerCreationModal: React.FC = props = [field]: newValue, }); }; - const eventTypes = get(schemas, `sdk.content.definitions.['${eventTypeKey}'].properties.events.items.enum`, []).map( - t => { - return { key: t, text: t }; - } - ); + const eventTypes = get(appschema, `definitions.['${eventTypeKey}'].properties.event.enum`, []).map(t => { + return { key: t, text: t }; + }); const intents = get(luFile, 'parsedContent.LUISJsonStructure.intents', []); const intentOptions = intents.map(t => { return { key: t.name, text: t.name }; }); + const showEventDropDown = formData.$type === eventTypeKey; const showIntentDropDown = formData.$type === intentTypeKey; return ( diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index c07e7a49be..a7898da0be 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2079,18 +2079,22 @@ export const appschema: OBISchema = { type: 'string', title: 'Dialog event name', description: 'Name of dialog event.', + enum: [ + 'beginDialog', + 'resumeDialog', + 'repromptDialog', + 'cancelDialog', + 'endDialog', + 'activityReceived', + 'recognizedIntent', + 'unknownIntent', + 'actionsStarted', + 'actionsSaved', + 'actionsEnded', + 'actionsResumed', + ], }, }, - anyOf: [ - { - title: 'Reference', - required: ['$copy'], - }, - { - title: 'Type', - required: ['actions', 'event', '$type'], - }, - ], }, 'Microsoft.OnEndOfConversationActivity': { $role: 'unionType(Microsoft.ITriggerCondition)', From 1b69a3caea7bc206c8e64bc84d3ca57510b05f2e Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 09:58:17 -0700 Subject: [PATCH 58/63] remove leftover anyOf --- Composer/packages/lib/shared/src/appschema.ts | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index a7898da0be..4fb5e0de0e 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -2042,16 +2042,6 @@ export const appschema: OBISchema = { description: 'Name of the custom event.', }, }, - anyOf: [ - { - title: 'Reference', - required: ['$copy'], - }, - { - title: 'Type', - required: ['actions', 'event', '$type'], - }, - ], }, 'Microsoft.OnDialogEvent': { $role: 'unionType(Microsoft.ITriggerCondition)', @@ -2228,16 +2218,6 @@ export const appschema: OBISchema = { }, }, }, - anyOf: [ - { - title: 'Reference', - required: ['$copy'], - }, - { - title: 'Type', - required: ['actions', 'intent', '$type'], - }, - ], }, 'Microsoft.OnInvokeActivity': { $role: 'unionType(Microsoft.ITriggerCondition)', From 131c23915ce067487d52aac34b732fe81febcb18 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 10:10:40 -0700 Subject: [PATCH 59/63] fix trigger event creation --- Composer/packages/client/src/utils/dialogUtil.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composer/packages/client/src/utils/dialogUtil.ts b/Composer/packages/client/src/utils/dialogUtil.ts index b3460e47d5..17cb9f6ecc 100644 --- a/Composer/packages/client/src/utils/dialogUtil.ts +++ b/Composer/packages/client/src/utils/dialogUtil.ts @@ -53,10 +53,10 @@ export function getFriendlyName(data) { export function insert(content, path: string, position: number | undefined, data: TriggerFormData) { const current = get(content, path, []); - const optionalAttributes: { intent?: string; triggers?: string[] } = {}; + const optionalAttributes: { intent?: string; event?: string } = {}; if (data.eventType) { - optionalAttributes.triggers = [data.eventType]; + optionalAttributes.event = data.eventType; } if (data.intent) { From b485b9ded922379991f1f11cc0d69ea6f091e54a Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 10:16:50 -0700 Subject: [PATCH 60/63] update uiSchema --- .../obiformeditor/src/schema/uischema.ts | 110 ++++++------------ 1 file changed, 34 insertions(+), 76 deletions(-) diff --git a/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts b/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts index 0ab69964c4..6547910d85 100644 --- a/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts +++ b/Composer/packages/extensions/obiformeditor/src/schema/uischema.ts @@ -1,7 +1,7 @@ import { SDKTypes, PROMPT_TYPES } from 'shared'; import { UiSchema } from '@bfcomposer/react-jsonschema-form'; -const globalHidden = ['property', 'inputBindings', 'outputBinding', 'id', 'tags']; +const globalHidden = ['property', 'id']; const promptFieldsSchemas = PROMPT_TYPES.reduce((schemas, type) => { schemas[type] = { @@ -10,6 +10,14 @@ const promptFieldsSchemas = PROMPT_TYPES.reduce((schemas, type) => { return schemas; }, {}); +const triggerUiSchema = { + actions: { + 'ui:field': 'StepsField', + }, + 'ui:order': ['condition', '*', 'actions'], + 'ui:hidden': [...globalHidden], +}; + export const uiSchema: { [key in SDKTypes]?: UiSchema } = { [SDKTypes.AdaptiveDialog]: { recognizer: { @@ -21,14 +29,14 @@ export const uiSchema: { [key in SDKTypes]?: UiSchema } = { actions: { 'ui:field': 'StepsField', }, - 'ui:order': ['property', 'outputBinding', 'recognizer', 'triggers', '*'], + 'ui:order': ['recognizer', 'triggers', '*'], 'ui:hidden': ['autoEndDialog', 'generator', ...globalHidden], }, [SDKTypes.BeginDialog]: { dialog: { 'ui:widget': 'DialogSelectWidget', }, - 'ui:hidden': ['inputBindings', 'outputBinding'], + 'ui:order': ['dialog', 'property', '*'], }, [SDKTypes.ConditionalSelector]: { ifFalse: { @@ -48,13 +56,13 @@ export const uiSchema: { [key in SDKTypes]?: UiSchema } = { actions: { 'ui:field': 'StepsField', }, - 'ui:order': ['listProperty', 'valueProperty', 'indexProperty', 'actions', '*'], + 'ui:order': ['itemsProperty', 'actions', '*'], }, [SDKTypes.ForeachPage]: { actions: { 'ui:field': 'StepsField', }, - 'ui:order': ['listProperty', 'pageSize', 'valueProperty', 'actions', '*'], + 'ui:order': ['itemsProperty', 'pageSize', 'actions', '*'], }, [SDKTypes.HttpRequest]: { body: { @@ -72,53 +80,31 @@ export const uiSchema: { [key in SDKTypes]?: UiSchema } = { 'ui:hidden': [...globalHidden], }, [SDKTypes.OnActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnBeginDialog]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, + }, + [SDKTypes.OnCondition]: { + ...triggerUiSchema, }, [SDKTypes.OnConversationUpdateActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, + }, + [SDKTypes.OnCustomEvent]: { + ...triggerUiSchema, }, [SDKTypes.OnDialogEvent]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnEndOfConversationActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnEventActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnHandoffActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnIntent]: { intent: { @@ -127,57 +113,29 @@ export const uiSchema: { [key in SDKTypes]?: UiSchema } = { actions: { 'ui:field': 'StepsField', }, - 'ui:order': ['intent', 'constraint', 'entities', '*'], + 'ui:order': ['intent', 'condition', 'entities', '*'], 'ui:hidden': [...globalHidden], }, [SDKTypes.OnInvokeActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnMessageActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnMessageDeleteActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnMessageReactionActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnMessageUpdateActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnTypingActivity]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.OnUnknownIntent]: { - actions: { - 'ui:field': 'StepsField', - }, - 'ui:order': ['constraint', '*', 'actions'], - 'ui:hidden': [...globalHidden], + ...triggerUiSchema, }, [SDKTypes.MostSpecificSelector]: { selector: { From eb67da74e9af5cb047a9c2894b7a95a057dfd2ac Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 10:17:13 -0700 Subject: [PATCH 61/63] fix HttpRequest headers schema --- Composer/packages/lib/shared/src/appschema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 4fb5e0de0e..a3e0a5b7ea 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -1172,7 +1172,7 @@ export const appschema: OBISchema = { }, headers: { type: 'object', - additionProperties: true, + additionalProperties: true, title: 'Headers', description: 'One or more headers to include in the request (supports data binding).', }, From c15809bf6cb928ace9e262dcd02df69cee6745c3 Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 10:29:14 -0700 Subject: [PATCH 62/63] improve obischema type --- Composer/packages/lib/shared/src/types.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Composer/packages/lib/shared/src/types.ts b/Composer/packages/lib/shared/src/types.ts index 86d05daa0e..c2c25ba691 100644 --- a/Composer/packages/lib/shared/src/types.ts +++ b/Composer/packages/lib/shared/src/types.ts @@ -3,14 +3,15 @@ import { JSONSchema6 } from 'json-schema'; export interface OBISchema extends JSONSchema6 { $schema?: string; $role?: string; - $type?: string; + $type?: SDKTypes; $copy?: string; - description?: string; - definitions?: any; $id?: string; $designer?: { + id: string; [key: string]: any; }; + description?: string; + definitions?: any; title?: string; __additional_property?: boolean; } From 8372bcfecaf855c20ee800d1a8fd5f1bf7cb39af Mon Sep 17 00:00:00 2001 From: Andy Brown Date: Wed, 16 Oct 2019 10:30:58 -0700 Subject: [PATCH 63/63] fix dialog options name fixes #1053 --- Composer/packages/lib/shared/src/appschema.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index a3e0a5b7ea..2a788ebe5a 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -245,10 +245,7 @@ export const appschema: OBISchema = { type: 'object', title: 'Options', description: 'One or more options that are passed to the dialog that is called.', - additionalProperties: { - type: 'string', - title: 'Options', - }, + additionalProperties: true, }, resultProperty: { $role: 'expression', @@ -2606,10 +2603,7 @@ export const appschema: OBISchema = { type: 'object', title: 'Options', description: 'One or more options that are passed to the dialog that is called.', - additionalProperties: { - type: 'string', - title: 'Options', - }, + additionalProperties: true, }, }, },