diff --git a/Composer/packages/client/__tests__/constants.json b/Composer/packages/client/__tests__/constants.json index 8dc3e644dd..7d40a44320 100644 --- a/Composer/packages/client/__tests__/constants.json +++ b/Composer/packages/client/__tests__/constants.json @@ -4,13 +4,13 @@ "isRoot": false, "displayName": "addtodo", "content": { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "808722" }, "rules": [ { - "$type": "Microsoft.OnEvent", + "$kind": "Microsoft.OnEvent", "$designer": { "id": "335456" }, @@ -32,13 +32,13 @@ "isRoot": false, "displayName": "cleartodo", "content": { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "316336" }, "rules": [ { - "$type": "Microsoft.OnEvent", + "$kind": "Microsoft.OnEvent", "$designer": { "id": "480162" }, @@ -63,7 +63,7 @@ "isRoot": false, "displayName": "deletetodo", "content": { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "114909" }, @@ -71,7 +71,7 @@ "$schema": "../../app.schema", "rules": [ { - "$type": "Microsoft.OnEvent", + "$kind": "Microsoft.OnEvent", "$designer": { "id": "768658" }, @@ -93,21 +93,21 @@ "isRoot": true, "displayName": "ToDoBot.Main", "content": { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "288769", "description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions." }, "rules": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720" }, "steps": [] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "064505" }, @@ -115,7 +115,7 @@ "intent": "AddIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "114961" }, @@ -123,7 +123,7 @@ "intent": "DeleteIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "088050" }, @@ -131,7 +131,7 @@ "intent": "ClearIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "633942" }, @@ -139,7 +139,7 @@ "intent": "HelpIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "794124" }, @@ -147,7 +147,7 @@ "intent": "ShowIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "179728" }, @@ -155,7 +155,7 @@ "intent": "CancelIntent" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "677447" }, @@ -220,13 +220,13 @@ "isRoot": false, "displayName": "showtodos", "content": { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "709692" }, "rules": [ { - "$type": "Microsoft.OnEvent", + "$kind": "Microsoft.OnEvent", "$designer": { "id": "783343" }, diff --git a/Composer/packages/client/__tests__/utils/dialogUtil.test.js b/Composer/packages/client/__tests__/utils/dialogUtil.test.js index e6e90d863f..e6681c5291 100644 --- a/Composer/packages/client/__tests__/utils/dialogUtil.test.js +++ b/Composer/packages/client/__tests__/utils/dialogUtil.test.js @@ -7,20 +7,20 @@ const dialogsMap = { Dialog1: { steps: [ { - $type: 'Step1', + $kind: 'Step1', }, { - $type: 'Step2', + $kind: 'Step2', }, ], }, 'Dialog2.main': { steps: [ { - $type: 'Step3', + $kind: 'Step3', }, { - $type: 'Step4', + $kind: 'Step4', }, ], }, @@ -56,6 +56,6 @@ describe('setDialogData', () => { it('returns updated dialog data at a path', () => { const result = setDialogData(dialogsMap, 'Dialog2.main', 'steps[1]', { new: 'data' }); - expect(result).toEqual({ steps: [{ $type: 'Step3' }, { new: 'data' }] }); + expect(result).toEqual({ steps: [{ $kind: 'Step3' }, { new: 'data' }] }); }); }); diff --git a/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx b/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx index a269e0a18f..6321eb6c8e 100644 --- a/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx +++ b/Composer/packages/client/src/components/ProjectTree/TriggerCreationModal.tsx @@ -43,39 +43,39 @@ const validateForm = ( regExIntents: [{ intent: string; pattern: string }] ): TriggerFormDataErrors => { const errors: TriggerFormDataErrors = {}; - const { $type, specifiedType, intent, triggerPhrases, regexEx } = data; + const { $kind, specifiedType, intent, triggerPhrases, regexEx } = data; - if ($type === eventTypeKey && !specifiedType) { + if ($kind === eventTypeKey && !specifiedType) { errors.specifiedType = formatMessage('Please select a event type'); } - if ($type === activityTypeKey && !specifiedType) { + if ($kind === activityTypeKey && !specifiedType) { errors.specifiedType = formatMessage('Please select an activity type'); } - if ($type === messageTypeKey && !specifiedType) { + if ($kind === messageTypeKey && !specifiedType) { errors.specifiedType = formatMessage('Please select a message type'); } - if (!$type) { - errors.$type = formatMessage('Please select a trigger type'); + if (!$kind) { + errors.$kind = formatMessage('Please select a trigger type'); } - if ($type === intentTypeKey && (!intent || !nameRegex.test(intent))) { + if ($kind === intentTypeKey && (!intent || !nameRegex.test(intent))) { errors.intent = formatMessage( 'Spaces and special characters are not allowed. Use letters, numbers, -, or _., numbers, -, and _' ); } - if ($type === intentTypeKey && isRegEx && regExIntents.find(ri => ri.intent === intent)) { + if ($kind === intentTypeKey && isRegEx && regExIntents.find(ri => ri.intent === intent)) { errors.intent = `regEx ${intent} is already defined`; } - if ($type === intentTypeKey && isRegEx && !regexEx) { + if ($kind === intentTypeKey && isRegEx && !regexEx) { errors.regexEx = formatMessage('Please input regEx pattern'); } - if ($type === intentTypeKey && !isRegEx && !triggerPhrases) { + if ($kind === intentTypeKey && !isRegEx && !triggerPhrases) { errors.triggerPhrases = formatMessage('Please input trigger phrases'); } if (data.errors.triggerPhrases) { @@ -102,12 +102,12 @@ export const TriggerCreationModal: React.FC = props = const { dialogs, luFiles, locale, projectId, schemas } = state; const luFile = luFiles.find(({ id }) => id === `${dialogId}.${locale}`); const dialogFile = dialogs.find(dialog => dialog.id === dialogId); - const isRegEx = get(dialogFile, 'content.recognizer.$type', '') === regexRecognizerKey; + const isRegEx = get(dialogFile, 'content.recognizer.$kind', '') === regexRecognizerKey; const regexIntents = get(dialogFile, 'content.recognizer.intents', []); const isNone = !get(dialogFile, 'content.recognizer'); const initialFormData: TriggerFormData = { errors: {}, - $type: isNone ? '' : intentTypeKey, + $kind: isNone ? '' : intentTypeKey, specifiedType: '', intent: '', triggerPhrases: '', @@ -130,7 +130,7 @@ export const TriggerCreationModal: React.FC = props = const content = get(luFile, 'content', ''); const luFileId = luFile?.id || `${dialogId}.${locale}`; const newDialog = generateNewDialog(dialogs, dialogId, formData, schemas.sdk?.content); - if (formData.$type === intentTypeKey && !isRegEx) { + if (formData.$kind === intentTypeKey && !isRegEx) { const newContent = addIntent(content, { Name: formData.intent, Body: formData.triggerPhrases }); const updateLuFile = { id: luFileId, @@ -144,7 +144,7 @@ export const TriggerCreationModal: React.FC = props = }; const onSelectTriggerType = (e, option) => { - setFormData({ ...initialFormData, $type: option.key }); + setFormData({ ...initialFormData, $kind: option.key }); }; const onSelectSpecifiedTypeType = (e, option) => { @@ -174,12 +174,12 @@ export const TriggerCreationModal: React.FC = props = if (isNone) { triggerTypeOptions = triggerTypeOptions.filter(t => t.key !== intentTypeKey); } - const showIntentName = formData.$type === intentTypeKey; - const showRegExDropDown = formData.$type === intentTypeKey && isRegEx; - const showTriggerPhrase = formData.$type === intentTypeKey && !isRegEx; - const showEventDropDown = formData.$type === eventTypeKey; - const showActivityDropDown = formData.$type === activityTypeKey; - const showMessageDropDown = formData.$type === messageTypeKey; + const showIntentName = formData.$kind === intentTypeKey; + const showRegExDropDown = formData.$kind === intentTypeKey && isRegEx; + const showTriggerPhrase = formData.$kind === intentTypeKey && !isRegEx; + const showEventDropDown = formData.$kind === eventTypeKey; + const showActivityDropDown = formData.$kind === activityTypeKey; + const showMessageDropDown = formData.$kind === messageTypeKey; return ( = props = options={triggerTypeOptions} styles={dropdownStyles} onChange={onSelectTriggerType} - errorMessage={formData.errors.$type} + errorMessage={formData.errors.$kind} data-testid={'triggerTypeDropDown'} - defaultSelectedKey={formData.$type} + defaultSelectedKey={formData.$kind} /> {showEventDropDown && ( { diff --git a/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/FormTitle.tsx b/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/FormTitle.tsx index 5c7259b51a..4cc0c8a208 100644 --- a/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/FormTitle.tsx +++ b/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/FormTitle.tsx @@ -46,7 +46,7 @@ const FormTitle: React.FC = props => { }; const getSubTitle = (): string => { - return uiSubtitle || uiLabel || formData.$type; + return uiSubtitle || uiLabel || formData.$kind; }; const getDescription = (): string => { diff --git a/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/index.tsx b/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/index.tsx index 238cb4f25a..98404d1f45 100644 --- a/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/index.tsx +++ b/Composer/packages/extensions/adaptive-form/src/components/AdaptiveForm/index.tsx @@ -65,7 +65,7 @@ export const AdaptiveForm: React.FC = function AdaptiveForm(p const [dPath, dType, dProp] = d.path?.split('#') || []; const dParts = dProp ? dProp.split(/[[\].]+/).filter(Boolean) : []; - if (dPath === currentPath && dType === localData?.$type) { + if (dPath === currentPath && dType === localData?.$kind) { const propErr = dParts.reverse().reduce((err, prop, idx) => { if (idx === 0) { return { [prop]: d.message }; diff --git a/Composer/packages/extensions/adaptive-form/src/components/fields/IntentField.tsx b/Composer/packages/extensions/adaptive-form/src/components/fields/IntentField.tsx index ef72aa8f53..994e19126b 100644 --- a/Composer/packages/extensions/adaptive-form/src/components/fields/IntentField.tsx +++ b/Composer/packages/extensions/adaptive-form/src/components/fields/IntentField.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { FieldProps, useShellApi } from '@bfc/extension'; -import { DialogInfo, SDKTypes } from '@bfc/shared'; +import { DialogInfo, SDKKinds } from '@bfc/shared'; import formatMessage from 'format-message'; import { usePluginConfig } from '../../hooks'; @@ -14,10 +14,10 @@ export function recognizerType({ content }: DialogInfo): string | null { const { recognizer } = content; if (recognizer) { - if (typeof recognizer === 'object' && recognizer.$type === SDKTypes.RegexRecognizer) { - return SDKTypes.RegexRecognizer; + if (typeof recognizer === 'object' && recognizer.$kind === SDKKinds.RegexRecognizer) { + return SDKKinds.RegexRecognizer; } else if (typeof recognizer === 'string') { - return SDKTypes.LuisRecognizer; + return SDKKinds.LuisRecognizer; } } diff --git a/Composer/packages/extensions/adaptive-form/src/defaultRecognizers.ts b/Composer/packages/extensions/adaptive-form/src/defaultRecognizers.ts index 9ae43ba33d..e5caa7a2cf 100644 --- a/Composer/packages/extensions/adaptive-form/src/defaultRecognizers.ts +++ b/Composer/packages/extensions/adaptive-form/src/defaultRecognizers.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { RecognizerSchema } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import formatMessage from 'format-message'; import { RegexIntentField } from './components/fields/RegexIntentField'; @@ -15,14 +15,14 @@ const DefaultRecognizers: RecognizerSchema[] = [ handleRecognizerChange: props => props.onChange(undefined), }, { - id: SDKTypes.RegexRecognizer, + id: SDKKinds.RegexRecognizer, displayName: () => formatMessage('Regular Expression'), editor: RegexIntentField, isSelected: data => { - return typeof data === 'object' && data.$type === SDKTypes.RegexRecognizer; + return typeof data === 'object' && data.$kind === SDKKinds.RegexRecognizer; }, handleRecognizerChange: props => { - props.onChange({ $type: SDKTypes.RegexRecognizer, intents: [] }); + props.onChange({ $kind: SDKKinds.RegexRecognizer, intents: [] }); }, }, ]; diff --git a/Composer/packages/extensions/adaptive-form/src/defaultUiSchema.ts b/Composer/packages/extensions/adaptive-form/src/defaultUiSchema.ts index 5383455d08..367faf9cdb 100644 --- a/Composer/packages/extensions/adaptive-form/src/defaultUiSchema.ts +++ b/Composer/packages/extensions/adaptive-form/src/defaultUiSchema.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { UISchema } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import formatMessage from 'format-message'; import { RecognizerField, IntentField } from './components/fields'; @@ -12,7 +12,7 @@ const triggerUiSchema = { }; const DefaultUISchema: UISchema = { - [SDKTypes.AdaptiveDialog]: { + [SDKKinds.AdaptiveDialog]: { label: 'Adaptive dialog', description: () => formatMessage('This configures a data driven dialog via a collection of events and actions.'), helpLink: 'https://aka.ms/botframework', @@ -28,118 +28,118 @@ const DefaultUISchema: UISchema = { }, }, }, - [SDKTypes.AttachmentInput]: { + [SDKKinds.AttachmentInput]: { label: 'Prompt for Attachment', helpLink: 'https://aka.ms/bfc-ask-for-user-input', }, - [SDKTypes.BeginDialog]: { + [SDKKinds.BeginDialog]: { label: 'Begin a Dialog', helpLink: 'https://aka.ms/bfc-understanding-dialogs', order: ['dialog', 'options', 'resultProperty', 'includeActivity', '*'], }, - [SDKTypes.OnCancelDialog]: { + [SDKKinds.OnCancelDialog]: { label: () => formatMessage('Dialog cancelled'), subtitle: () => formatMessage('Cancel dialog event'), }, - [SDKTypes.CancelAllDialogs]: { + [SDKKinds.CancelAllDialogs]: { label: () => formatMessage('Cancel All Dialogs'), helpLink: 'https://aka.ms/bfc-understanding-dialogs', order: ['dialog', 'property', '*'], }, - [SDKTypes.ChoiceInput]: { + [SDKKinds.ChoiceInput]: { label: () => formatMessage('Prompt with multi-choice'), helpLink: 'https://aka.ms/bfc-ask-for-user-input', }, - [SDKTypes.ConfirmInput]: { + [SDKKinds.ConfirmInput]: { label: () => formatMessage('Prompt for confirmation'), helpLink: 'https://aka.ms/bfc-ask-for-user-input', }, - [SDKTypes.DateTimeInput]: { + [SDKKinds.DateTimeInput]: { label: () => formatMessage('Prompt for a date'), helpLink: 'https://aka.ms/bfc-ask-for-user-input', }, - [SDKTypes.DebugBreak]: { label: () => formatMessage('Debug Break') }, - [SDKTypes.DeleteProperties]: { + [SDKKinds.DebugBreak]: { label: () => formatMessage('Debug Break') }, + [SDKKinds.DeleteProperties]: { label: () => formatMessage('Delete Properties'), helpLink: 'https://aka.ms/bfc-using-memory', }, - [SDKTypes.DeleteProperty]: { + [SDKKinds.DeleteProperty]: { label: () => formatMessage('Delete a Property'), helpLink: 'https://aka.ms/bfc-using-memory', }, - [SDKTypes.DeleteProperties]: { + [SDKKinds.DeleteProperties]: { label: () => formatMessage('Delete Properties'), helpLink: 'https://aka.ms/bfc-using-memory', }, - [SDKTypes.EditActions]: { label: () => formatMessage('Modify active dialog') }, - [SDKTypes.EditArray]: { + [SDKKinds.EditActions]: { label: () => formatMessage('Modify active dialog') }, + [SDKKinds.EditArray]: { label: () => formatMessage('Edit an Array Property'), helpLink: 'https://aka.ms/bfc-using-memory', }, - [SDKTypes.EmitEvent]: { + [SDKKinds.EmitEvent]: { label: () => formatMessage('Emit a custom event'), helpLink: 'https://aka.ms/bfc-custom-events', }, - [SDKTypes.EndDialog]: { + [SDKKinds.EndDialog]: { label: () => formatMessage('End Dialog'), helpLink: 'https://aka.ms/bfc-understanding-dialogs', }, - [SDKTypes.EndTurn]: { + [SDKKinds.EndTurn]: { label: () => formatMessage('End Turn'), helpLink: 'https://aka.ms/bfc-understanding-dialogs', }, - [SDKTypes.Foreach]: { + [SDKKinds.Foreach]: { label: () => formatMessage('Loop: For Each'), order: ['itemsProperty', '*'], hidden: ['actions'], helpLink: 'https://aka.ms/bfc-controlling-conversation-flow', }, - [SDKTypes.ForeachPage]: { + [SDKKinds.ForeachPage]: { label: () => formatMessage('Loop: For Each Page'), order: ['itemsProperty', 'pageSize', '*'], hidden: ['actions'], helpLink: 'https://aka.ms/bfc-controlling-conversation-flow', }, - [SDKTypes.HttpRequest]: { + [SDKKinds.HttpRequest]: { label: () => formatMessage('HTTP Request'), order: ['method', 'url', 'body', 'headers', '*'], helpLink: 'https://aka.ms/bfc-using-http', }, - [SDKTypes.IfCondition]: { + [SDKKinds.IfCondition]: { label: () => formatMessage('Branch: If/Else'), hidden: ['actions', 'elseActions'], helpLink: 'https://aka.ms/bfc-controlling-conversation-flow', }, - [SDKTypes.LogAction]: { + [SDKKinds.LogAction]: { label: () => formatMessage('Log to console'), helpLink: 'https://aka.ms/bfc-debugging-bots', }, - [SDKTypes.NumberInput]: { + [SDKKinds.NumberInput]: { label: () => formatMessage('Prompt for a number'), helpLink: 'https://aka.ms/bfc-ask-for-user-input', }, - [SDKTypes.OAuthInput]: { + [SDKKinds.OAuthInput]: { label: () => formatMessage('OAuth Login'), helpLink: 'https://aka.ms/bfc-using-oauth', order: ['connectionName', '*'], }, - [SDKTypes.OnActivity]: { + [SDKKinds.OnActivity]: { ...triggerUiSchema, label: () => formatMessage('Activities'), subtitle: () => formatMessage('Activity recieved'), }, - [SDKTypes.OnBeginDialog]: { + [SDKKinds.OnBeginDialog]: { ...triggerUiSchema, label: () => formatMessage('Dialog started'), subtitle: () => formatMessage('Begin dialog event'), }, - [SDKTypes.OnCancelDialog]: { ...triggerUiSchema }, - [SDKTypes.OnCondition]: { + [SDKKinds.OnCancelDialog]: { ...triggerUiSchema }, + [SDKKinds.OnCondition]: { ...triggerUiSchema, label: () => formatMessage('Handle a condition'), subtitle: () => formatMessage('Condition'), }, - [SDKTypes.OnConversationUpdateActivity]: { + [SDKKinds.OnConversationUpdateActivity]: { ...triggerUiSchema, label: () => formatMessage('Greeting'), subtitle: () => formatMessage('ConversationUpdate activity'), @@ -147,37 +147,37 @@ const DefaultUISchema: UISchema = { helpLink: 'https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-conversations?view=azure-bot-service-4.0#conversation-lifetime', }, - [SDKTypes.OnCustomEvent]: { + [SDKKinds.OnCustomEvent]: { ...triggerUiSchema, label: () => formatMessage('Handle an Event'), subtitle: () => formatMessage('Custom event'), }, - [SDKTypes.OnDialogEvent]: { + [SDKKinds.OnDialogEvent]: { ...triggerUiSchema, label: () => formatMessage('Dialog events'), subtitle: () => formatMessage('Dialog event'), }, - [SDKTypes.OnEndOfConversationActivity]: { + [SDKKinds.OnEndOfConversationActivity]: { ...triggerUiSchema, label: () => formatMessage('Conversation ended'), subtitle: () => formatMessage('EndOfConversation activity'), }, - [SDKTypes.OnError]: { + [SDKKinds.OnError]: { ...triggerUiSchema, label: () => formatMessage('Error occurred'), subtitle: () => formatMessage('Error event'), }, - [SDKTypes.OnEventActivity]: { + [SDKKinds.OnEventActivity]: { ...triggerUiSchema, label: () => formatMessage('Event received'), subtitle: () => formatMessage('Event activity'), }, - [SDKTypes.OnHandoffActivity]: { + [SDKKinds.OnHandoffActivity]: { ...triggerUiSchema, label: () => formatMessage('Handover to human'), subtitle: () => formatMessage('Handoff activity'), }, - [SDKTypes.OnIntent]: { + [SDKKinds.OnIntent]: { label: () => formatMessage('Intent recognized'), subtitle: () => formatMessage('Intent recognized'), order: ['intent', 'condition', 'entities', '*'], @@ -188,95 +188,95 @@ const DefaultUISchema: UISchema = { }, }, }, - [SDKTypes.OnInvokeActivity]: { + [SDKKinds.OnInvokeActivity]: { ...triggerUiSchema, label: () => formatMessage('Conversation invoked'), subtitle: () => formatMessage('Invoke activity'), }, - [SDKTypes.OnMessageActivity]: { + [SDKKinds.OnMessageActivity]: { ...triggerUiSchema, label: () => formatMessage('Message recieved'), subtitle: () => formatMessage('Message recieved activity'), }, - [SDKTypes.OnMessageDeleteActivity]: { + [SDKKinds.OnMessageDeleteActivity]: { ...triggerUiSchema, label: () => formatMessage('Message deleted'), subtitle: () => formatMessage('Message deleted activity'), }, - [SDKTypes.OnMessageReactionActivity]: { + [SDKKinds.OnMessageReactionActivity]: { ...triggerUiSchema, label: () => formatMessage('Message reaction'), subtitle: () => formatMessage('Message reaction activity'), }, - [SDKTypes.OnMessageUpdateActivity]: { + [SDKKinds.OnMessageUpdateActivity]: { ...triggerUiSchema, label: () => formatMessage('Message updated'), subtitle: () => formatMessage('Message updated activity'), }, - [SDKTypes.OnRepromptDialog]: { + [SDKKinds.OnRepromptDialog]: { ...triggerUiSchema, label: () => formatMessage('Re-prompt for input'), subtitle: () => formatMessage('Reprompt dialog event'), }, - [SDKTypes.OnTypingActivity]: { + [SDKKinds.OnTypingActivity]: { ...triggerUiSchema, label: () => formatMessage('User is typing'), subtitle: () => formatMessage('Typing activity'), }, - [SDKTypes.OnUnknownIntent]: { + [SDKKinds.OnUnknownIntent]: { ...triggerUiSchema, label: () => formatMessage('Unknown intent'), subtitle: () => formatMessage('Unknown intent recognized'), }, - [SDKTypes.QnAMakerDialog]: { + [SDKKinds.QnAMakerDialog]: { label: () => formatMessage('QnAMakerDialog'), helpLink: 'https://aka.ms/bfc-using-QnA', }, - [SDKTypes.Recognizer]: { + [SDKKinds.Recognizer]: { field: RecognizerField, helpLink: 'https://aka.ms/BFC-Using-LU', }, - [SDKTypes.RegexRecognizer]: { + [SDKKinds.RegexRecognizer]: { hidden: ['entities'], }, - [SDKTypes.RepeatDialog]: { + [SDKKinds.RepeatDialog]: { label: () => formatMessage('Repeat this Dialog'), helpLink: 'https://aka.ms/bfc-understanding-dialogs', order: ['options', 'includeActivity', '*'], }, - [SDKTypes.ReplaceDialog]: { + [SDKKinds.ReplaceDialog]: { label: () => formatMessage('Replace this Dialog'), helpLink: 'https://aka.ms/bfc-understanding-dialogs', order: ['dialog', 'options', 'includeActivity', '*'], }, - [SDKTypes.SendActivity]: { + [SDKKinds.SendActivity]: { label: () => formatMessage('Send an Activity'), helpLink: 'https://aka.ms/bfc-send-activity', order: ['activity', '*'], }, - [SDKTypes.SetProperty]: { + [SDKKinds.SetProperty]: { label: () => formatMessage('Set a Property'), helpLink: 'https://aka.ms/bfc-using-memory', }, - [SDKTypes.SetProperties]: { + [SDKKinds.SetProperties]: { label: () => formatMessage('Set Properties'), helpLink: 'https://aka.ms/bfc-using-memory', }, - [SDKTypes.SkillDialog]: { + [SDKKinds.SkillDialog]: { label: () => formatMessage('Call a remote skill'), helpLink: 'https://aka.ms/bfc-call-skill', }, - [SDKTypes.SwitchCondition]: { + [SDKKinds.SwitchCondition]: { label: () => formatMessage('Branch: Switch'), helpLink: 'https://aka.ms/bfc-controlling-conversation-flow', hidden: ['default'], properties: { cases: { hidden: ['actions'] } }, }, - [SDKTypes.TextInput]: { + [SDKKinds.TextInput]: { label: () => formatMessage('Prompt for text'), helpLink: 'https://aka.ms/bfc-ask-for-user-input', }, - [SDKTypes.TraceActivity]: { + [SDKKinds.TraceActivity]: { label: () => formatMessage('Emit a trace event'), helpLink: 'https://aka.ms/bfc-debugging-bots', }, diff --git a/Composer/packages/extensions/adaptive-form/src/utils/__tests__/getUISchema.test.ts b/Composer/packages/extensions/adaptive-form/src/utils/__tests__/getUISchema.test.ts index 663fe7669b..6e4be3ade8 100644 --- a/Composer/packages/extensions/adaptive-form/src/utils/__tests__/getUISchema.test.ts +++ b/Composer/packages/extensions/adaptive-form/src/utils/__tests__/getUISchema.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { UISchema, JSONSchema7 } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import { getUISchema } from '../getUISchema'; @@ -11,11 +11,11 @@ describe('getUISchema', () => { expect(getUISchema('SomeDialog')).toEqual({}); }); - it('returns UI schema for $type', () => { + it('returns UI schema for $kind', () => { const schema: JSONSchema7 = { properties: { $kind: { - const: SDKTypes.AdaptiveDialog, + const: SDKKinds.AdaptiveDialog, }, }, }; @@ -26,13 +26,13 @@ describe('getUISchema', () => { const schema: JSONSchema7 = { properties: { $kind: { - const: SDKTypes.AdaptiveDialog, + const: SDKKinds.AdaptiveDialog, }, }, }; const uiSchema: UISchema = { - [SDKTypes.AdaptiveDialog]: { + [SDKKinds.AdaptiveDialog]: { order: ['*', 'recognizer'], label: 'First Label', }, diff --git a/Composer/packages/extensions/adaptive-form/src/utils/__tests__/mergePluginConfigs.test.ts b/Composer/packages/extensions/adaptive-form/src/utils/__tests__/mergePluginConfigs.test.ts index 39bade9134..61eedd1fee 100644 --- a/Composer/packages/extensions/adaptive-form/src/utils/__tests__/mergePluginConfigs.test.ts +++ b/Composer/packages/extensions/adaptive-form/src/utils/__tests__/mergePluginConfigs.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SDKTypes, SDKRoles, SDKKinds } from '@bfc/shared'; +import { SDKKinds, SDKRoles } from '@bfc/shared'; import { mergePluginConfigs } from '../mergePluginConfigs'; import DefaultUISchema from '../../defaultUiSchema'; @@ -20,7 +20,7 @@ describe('mergePluginConfigs', () => { it('merges overrides into the defaults', () => { const overrides = { uiSchema: { - [SDKTypes.AdaptiveDialog]: { + [SDKKinds.AdaptiveDialog]: { hidden: ['recognizer'], properties: { triggers: { @@ -34,22 +34,10 @@ describe('mergePluginConfigs', () => { label: 'expression label', }, }, - kindSchema: { - [SDKKinds.IDialog]: { - hidden: ['foo'], - }, - }, }; expect(mergePluginConfigs(overrides)).toMatchInlineSnapshot(` Object { - "kindSchema": Object { - "Microsoft.IDialog": Object { - "hidden": Array [ - "foo", - ], - }, - }, "recognizers": Array [ Object { "displayName": [Function], diff --git a/Composer/packages/extensions/adaptive-form/src/utils/getAdaptiveType.ts b/Composer/packages/extensions/adaptive-form/src/utils/getAdaptiveType.ts index d1c727c09b..177deb0d66 100644 --- a/Composer/packages/extensions/adaptive-form/src/utils/getAdaptiveType.ts +++ b/Composer/packages/extensions/adaptive-form/src/utils/getAdaptiveType.ts @@ -3,5 +3,5 @@ import get from 'lodash/get'; export function getAdaptiveType(data: any) { - return get(data, '$type'); + return get(data, '$kind'); } diff --git a/Composer/packages/extensions/adaptive-form/src/utils/getOrderedProperties.ts b/Composer/packages/extensions/adaptive-form/src/utils/getOrderedProperties.ts index 1b08c90a9a..8ce2ca2847 100644 --- a/Composer/packages/extensions/adaptive-form/src/utils/getOrderedProperties.ts +++ b/Composer/packages/extensions/adaptive-form/src/utils/getOrderedProperties.ts @@ -3,7 +3,7 @@ import { UIOptions, JSONSchema7 } from '@bfc/extension'; import cloneDeep from 'lodash/cloneDeep'; -const globalHiddenProperties = ['$type', '$id', '$copy', '$designer', 'id']; +const globalHiddenProperties = ['$kind', '$id', '$copy', '$designer', 'id']; type OrderConfig = (string | [string, string])[]; diff --git a/Composer/packages/extensions/adaptive-form/src/utils/resolveBaseSchema.ts b/Composer/packages/extensions/adaptive-form/src/utils/resolveBaseSchema.ts index b7789a95de..46d3800427 100644 --- a/Composer/packages/extensions/adaptive-form/src/utils/resolveBaseSchema.ts +++ b/Composer/packages/extensions/adaptive-form/src/utils/resolveBaseSchema.ts @@ -6,7 +6,7 @@ import { MicrosoftAdaptiveDialog } from '@bfc/shared'; import { resolveRef } from './resolveRef'; export function resolveBaseSchema(schema: JSONSchema7, data: MicrosoftAdaptiveDialog): JSONSchema7 | undefined { - if (schema.definitions && schema.definitions?.[data.$type] && schema.definitions?.[data.$type] !== true) { - return resolveRef(schema.definitions?.[data.$type], schema.definitions); + if (schema.definitions && schema.definitions?.[data.$kind] && schema.definitions?.[data.$kind] !== true) { + return resolveRef(schema.definitions?.[data.$kind], schema.definitions); } } diff --git a/Composer/packages/extensions/extension/src/types/form.ts b/Composer/packages/extensions/extension/src/types/form.ts index 5c9a4863d2..0691454038 100644 --- a/Composer/packages/extensions/extension/src/types/form.ts +++ b/Composer/packages/extensions/extension/src/types/form.ts @@ -11,8 +11,6 @@ declare module 'json-schema' { $id?: string; $kind?: string; $role?: string; - /** @deprecated */ - $type?: string; $designer?: { id: string; [key: string]: any; diff --git a/Composer/packages/extensions/extension/src/types/uiSchema.ts b/Composer/packages/extensions/extension/src/types/uiSchema.ts index 615ddc502b..973350fc86 100644 --- a/Composer/packages/extensions/extension/src/types/uiSchema.ts +++ b/Composer/packages/extensions/extension/src/types/uiSchema.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SDKTypes, SDKRoles, ShellApi, ShellData } from '@bfc/shared'; +import { SDKKinds, SDKRoles, ShellApi, ShellData } from '@bfc/shared'; import { FieldWidget, FieldProps } from './form'; @@ -48,7 +48,7 @@ export interface UIOptions { } export type RoleSchema = { [key in SDKRoles]?: Omit }; -export type UISchema = { [key in SDKTypes]?: UIOptions }; +export type UISchema = { [key in SDKKinds]?: UIOptions }; export type RecognizerSchema = { /** Unique id to identify recognizer (SDK $kind) */ id: string; diff --git a/Composer/packages/extensions/visual-designer/__tests__/components/nodes/RuleCard.test.tsx b/Composer/packages/extensions/visual-designer/__tests__/components/nodes/RuleCard.test.tsx index f013bc762e..251633c701 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/components/nodes/RuleCard.test.tsx +++ b/Composer/packages/extensions/visual-designer/__tests__/components/nodes/RuleCard.test.tsx @@ -53,7 +53,7 @@ describe('', () => { data = { actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', dialog: 'CalleeDialog', }, ], @@ -128,7 +128,7 @@ describe('', () => { data = { actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', dialog: 'CalleeDialog', }, ], diff --git a/Composer/packages/extensions/visual-designer/__tests__/layouters/measureJsonBoundary.test.ts b/Composer/packages/extensions/visual-designer/__tests__/layouters/measureJsonBoundary.test.ts index 8e1cb2310d..417d5f618c 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/layouters/measureJsonBoundary.test.ts +++ b/Composer/packages/extensions/visual-designer/__tests__/layouters/measureJsonBoundary.test.ts @@ -18,30 +18,30 @@ import { describe('measureJsonBoundary', () => { const boundary = new Boundary(); - it('should return an empty boundary when json is null or json.$type is null', () => { + it('should return an empty boundary when json is null or json.$kind is null', () => { expect(measureJsonBoundary(null)).toEqual(boundary); expect(measureJsonBoundary({ a: 1 })).toEqual(boundary); }); - it('should return boundary whose size is determined by the json.$type', () => { - expect(measureJsonBoundary({ $type: ObiTypes.ChoiceDiamond })).toEqual( + it('should return boundary whose size is determined by the json.$kind', () => { + expect(measureJsonBoundary({ $kind: ObiTypes.ChoiceDiamond })).toEqual( new Boundary(DiamondSize.width, DiamondSize.height) ); - expect(measureJsonBoundary({ $type: ObiTypes.ConditionNode })).toEqual( + expect(measureJsonBoundary({ $kind: ObiTypes.ConditionNode })).toEqual( new Boundary(InitNodeSize.width, InitNodeSize.height) ); - expect(measureJsonBoundary({ $type: ObiTypes.LoopIndicator })).toEqual( + expect(measureJsonBoundary({ $kind: ObiTypes.LoopIndicator })).toEqual( new Boundary(LoopIconSize.width, LoopIconSize.height) ); - expect(measureJsonBoundary({ $type: ObiTypes.LogAction })).toEqual(new Boundary(StandardNodeWidth, HeaderHeight)); + expect(measureJsonBoundary({ $kind: ObiTypes.LogAction })).toEqual(new Boundary(StandardNodeWidth, HeaderHeight)); }); - it("should return boundary whose size is determined by the data's choices when json.$type is choiceInput", () => { + it("should return boundary whose size is determined by the data's choices when json.$kind is choiceInput", () => { const data1: { [key: string]: any } = { - $type: ObiTypes.ChoiceInputDetail, + $kind: ObiTypes.ChoiceInputDetail, choices: [{ value: '1' }], }; const data2: { [key: string]: any } = { - $type: ObiTypes.ChoiceInputDetail, + $kind: ObiTypes.ChoiceInputDetail, choices: [{ value: '1' }, { value: '2' }, { value: '3' }, { value: '4' }, { value: '5' }], }; expect(measureJsonBoundary(data1)).toEqual( diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/jsonTracker.test.ts b/Composer/packages/extensions/visual-designer/__tests__/transformers/jsonTracker.test.ts index fc30d840ae..f48fd68f31 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/jsonTracker.test.ts +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/jsonTracker.test.ts @@ -9,17 +9,17 @@ const factory = new DialogFactory({}); describe('queryNode', () => { describe('can query correct result', () => { - const dialog = { foo: { bar: [{ $type: 'firstOne' }, { $type: 'secondOne' }] } }; + const dialog = { foo: { bar: [{ $kind: 'firstOne' }, { $kind: 'secondOne' }] } }; it('when data not exists.', () => { expect(queryNode({}, 'foo.bar[0]')).toEqual(null); }); it('when data locates in an object.', () => { - expect(queryNode(dialog, 'foo.bar')).toEqual([{ $type: 'firstOne' }, { $type: 'secondOne' }]); + expect(queryNode(dialog, 'foo.bar')).toEqual([{ $kind: 'firstOne' }, { $kind: 'secondOne' }]); }); it('when data locates in an array.', () => { - expect(queryNode(dialog, 'foo.bar[0]')).toEqual({ $type: 'firstOne' }); + expect(queryNode(dialog, 'foo.bar[0]')).toEqual({ $kind: 'firstOne' }); }); }); @@ -44,21 +44,21 @@ describe('insert', () => { describe('when data already exists', () => { beforeEach(() => { - dialog.foo.bar = [{ $type: 'firstOne' }, { $type: 'secondOne' }]; + dialog.foo.bar = [{ $kind: 'firstOne' }, { $kind: 'secondOne' }]; }); it('inserts into the correct position', () => { const updated = insert(dialog, path, 1, 'newOne', factory); expect(updated.foo.bar).toEqual([ { - $type: 'firstOne', + $kind: 'firstOne', }, { - $type: 'newOne', + $kind: 'newOne', $designer: { id: expect.any(String) }, }, { - $type: 'secondOne', + $kind: 'secondOne', }, ]); }); @@ -67,14 +67,14 @@ describe('insert', () => { const updated = insert(dialog, path, -2, 'newOne', factory); expect(updated.foo.bar).toEqual([ { - $type: 'newOne', + $kind: 'newOne', $designer: { id: expect.any(String) }, }, { - $type: 'firstOne', + $kind: 'firstOne', }, { - $type: 'secondOne', + $kind: 'secondOne', }, ]); }); @@ -83,13 +83,13 @@ describe('insert', () => { const updated = insert(dialog, path, 10, 'newOne', factory); expect(updated.foo.bar).toEqual([ { - $type: 'firstOne', + $kind: 'firstOne', }, { - $type: 'secondOne', + $kind: 'secondOne', }, { - $type: 'newOne', + $kind: 'newOne', $designer: { id: expect.any(String) }, }, ]); @@ -99,13 +99,13 @@ describe('insert', () => { const updated = insert(dialog, path, undefined, 'newOne', factory); expect(updated.foo.bar).toEqual([ { - $type: 'firstOne', + $kind: 'firstOne', }, { - $type: 'secondOne', + $kind: 'secondOne', }, { - $type: 'newOne', + $kind: 'newOne', $designer: { id: expect.any(String) }, }, ]); @@ -118,7 +118,7 @@ describe('insert', () => { const updated = insert(dialog, path, 0, 'newOne', factory); - expect(updated.foo.bar).toEqual([{ $type: 'newOne', $designer: { id: expect.any(String) } }]); + expect(updated.foo.bar).toEqual([{ $kind: 'newOne', $designer: { id: expect.any(String) } }]); }); }); }); @@ -126,7 +126,7 @@ describe('insert', () => { describe('delete node flow', () => { let dialog, path, removedDataFn; beforeEach(() => { - dialog = { foo: { bar: [{ $type: 'firstOne' }, { $type: 'secondOne' }] } }; + dialog = { foo: { bar: [{ $kind: 'firstOne' }, { $kind: 'secondOne' }] } }; removedDataFn = jest.fn(); }); @@ -145,7 +145,7 @@ describe('delete node flow', () => { path = 'foo.bar[0]'; const result = deleteNode(dialog, path, removedDataFn); - expect(result).toEqual({ foo: { bar: [{ $type: 'secondOne' }] } }); + expect(result).toEqual({ foo: { bar: [{ $kind: 'secondOne' }] } }); expect(removedDataFn).toBeCalledWith(dialog.foo.bar[0]); }); it("should delete node successfully when targetNode's currentKey type is string", () => { @@ -155,13 +155,13 @@ describe('delete node flow', () => { expect(result).toEqual({ foo: {} }); expect(removedDataFn).toBeCalledWith(dialog.foo.bar); }); - it("removeLgTemplate function should be called when targetNode's $type is 'Microsoft.SendActivity' && activity includes '[bfdactivity-'", () => { - dialog.foo.activityNode = { $type: 'Microsoft.SendActivity', activity: '[bfdactivity-a]' }; + it("removeLgTemplate function should be called when targetNode's $kind is 'Microsoft.SendActivity' && activity includes '[bfdactivity-'", () => { + dialog.foo.activityNode = { $kind: 'Microsoft.SendActivity', activity: '[bfdactivity-a]' }; path = 'foo.activityNode'; const result = deleteNode(dialog, path, removedDataFn); expect(removedDataFn).toBeCalledWith(dialog.foo.activityNode); - expect(result).toEqual({ foo: { bar: [{ $type: 'firstOne' }, { $type: 'secondOne' }] } }); + expect(result).toEqual({ foo: { bar: [{ $kind: 'firstOne' }, { $kind: 'secondOne' }] } }); }); }); }); diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/todoBot.main.json b/Composer/packages/extensions/visual-designer/__tests__/transformers/todoBot.main.json index 267161028b..3dddaa8b84 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/todoBot.main.json +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/todoBot.main.json @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "createdAt": "2019-07-04T08:14:01.139Z", "updatedAt": "2019-08-01T23:45:38.308Z", @@ -8,41 +8,41 @@ }, "autoEndDialog": false, "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "AddIntent", "pattern": "(?i)(?:add|create) .*(?:to-do|todo|task)(?: )?(?:named (?.*))?" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "ClearIntent", "pattern": "(?i)(?:delete|remove|clear) (?:all|every) (?:to-dos|todos|tasks)" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "DeleteIntent", "pattern": "(?i)(?:delete|remove|clear) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "ShowIntent", "pattern": "(?i)(?:show|see|view) .*(?:to-do|todo|task)" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "HelpIntent", "pattern": "(?i)help" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "CancelIntent", "pattern": "(?i)cancel|never mind" } @@ -51,7 +51,7 @@ "generator": "common.lg", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "createdAt": "2019-07-01T22:02:14.960Z", "updatedAt": "2019-07-16T20:00:24.788Z", @@ -60,7 +60,7 @@ "constraint": "toLower(turn.Activity.membersAdded[0].name) != 'bot'", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-08-02T22:18:56.943Z", "updatedAt": "2019-08-02T22:36:20.947Z", @@ -71,7 +71,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:32.772Z", "updatedAt": "2019-07-16T19:59:36.277Z", @@ -79,14 +79,14 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "AddToDo" } ], "intent": "AddIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:37.184Z", "updatedAt": "2019-08-01T23:46:50.759Z", @@ -94,7 +94,7 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "DeleteToDo", "$designer": { "createdAt": "2019-08-01T23:47:15.255Z", @@ -106,7 +106,7 @@ "intent": "DeleteIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:41.352Z", "updatedAt": "2019-07-16T19:59:44.427Z", @@ -114,14 +114,14 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "ClearToDos" } ], "intent": "ClearIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:50.315Z", "updatedAt": "2019-07-16T19:59:54.774Z", @@ -129,7 +129,7 @@ }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-08-01T23:44:56.704Z", "updatedAt": "2019-08-01T23:44:57.629Z", @@ -141,7 +141,7 @@ "intent": "HelpIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T20:00:00.082Z", "updatedAt": "2019-07-16T20:00:03.344Z", @@ -149,14 +149,14 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "ShowToDos" } ], "intent": "ShowIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T20:00:08.499Z", "updatedAt": "2019-07-16T20:00:12.504Z", @@ -164,17 +164,17 @@ }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "ok." }, { - "$type": "Microsoft.EndDialog" + "$kind": "Microsoft.EndDialog" } ], "intent": "CancelIntent" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "createdAt": "2019-07-16T20:00:13.577Z", "updatedAt": "2019-07-16T20:00:19.435Z", @@ -182,7 +182,7 @@ }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "Hi! I'm a ToDo bot. Say \"add a todo named first\" to get started." } ] diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformForeach.test.ts b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformForeach.test.ts index 495699f253..1ee5326b71 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformForeach.test.ts +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformForeach.test.ts @@ -7,12 +7,12 @@ import { ObiTypes } from '../../src/constants/ObiTypes'; test('should return NULL when input is invalid', () => { expect(transformForeach(null, '')).toBeNull(); expect(transformForeach({}, '')).toBeNull(); - expect(transformForeach({ $type: 'wrong' }, '')).toBeNull(); + expect(transformForeach({ $kind: 'wrong' }, '')).toBeNull(); }); test('should return correct schema when input a Foreach schema', () => { const json = { - $type: 'Microsoft.Foreach', + $kind: 'Microsoft.Foreach', listProperty: 'users.todo', steps: [], }; @@ -26,26 +26,26 @@ test('should return correct schema when input a Foreach schema', () => { expect(foreachDetail).toBeDefined(); expect(foreachDetail.id).toEqual('actions[0]'); - expect(foreachDetail.json.$type).toEqual(ObiTypes.ForeachDetail); + expect(foreachDetail.json.$kind).toEqual(ObiTypes.ForeachDetail); expect(foreachDetail.json.listProperty).toEqual(json.listProperty); expect(stepGroup).toBeDefined(); expect(stepGroup.id).toEqual('actions[0].actions'); - expect(stepGroup.json.$type).toEqual(ObiTypes.StepGroup); + expect(stepGroup.json.$kind).toEqual(ObiTypes.StepGroup); expect(stepGroup.json.children.length).toEqual(0); expect(loopBegin).toBeDefined(); expect(loopBegin.id).toEqual('actions[0]'); - expect(loopBegin.json.$type).toEqual(ObiTypes.LoopIndicator); + expect(loopBegin.json.$kind).toEqual(ObiTypes.LoopIndicator); expect(loopEnd).toBeDefined(); expect(loopEnd.id).toEqual('actions[0]'); - expect(loopEnd.json.$type).toEqual(ObiTypes.LoopIndicator); + expect(loopEnd.json.$kind).toEqual(ObiTypes.LoopIndicator); }); test('should return correct schema when input a ForeachPage schema', () => { const json = { - $type: 'Microsoft.ForeachPage', + $kind: 'Microsoft.ForeachPage', listProperty: 'users.todo', pageSize: 2, actions: [], @@ -60,19 +60,19 @@ test('should return correct schema when input a ForeachPage schema', () => { expect(foreachDetail).toBeDefined(); expect(foreachDetail.id).toEqual('actions[0]'); - expect(foreachDetail.json.$type).toEqual(ObiTypes.ForeachPageDetail); + expect(foreachDetail.json.$kind).toEqual(ObiTypes.ForeachPageDetail); expect(foreachDetail.json.listProperty).toEqual(json.listProperty); expect(stepGroup).toBeDefined(); expect(stepGroup.id).toEqual('actions[0].actions'); - expect(stepGroup.json.$type).toEqual(ObiTypes.StepGroup); + expect(stepGroup.json.$kind).toEqual(ObiTypes.StepGroup); expect(stepGroup.json.children.length).toEqual(0); expect(loopBegin).toBeDefined(); expect(loopBegin.id).toEqual('actions[0]'); - expect(loopBegin.json.$type).toEqual(ObiTypes.LoopIndicator); + expect(loopBegin.json.$kind).toEqual(ObiTypes.LoopIndicator); expect(loopEnd).toBeDefined(); expect(loopEnd.id).toEqual('actions[0]'); - expect(loopEnd.json.$type).toEqual(ObiTypes.LoopIndicator); + expect(loopEnd.json.$kind).toEqual(ObiTypes.LoopIndicator); }); diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformIfCondition.test.tsx b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformIfCondition.test.tsx index 21ccaca74d..ea74494d0e 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformIfCondition.test.tsx +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformIfCondition.test.tsx @@ -5,53 +5,53 @@ import { transformIfCondtion } from '../../src/transformers/transformIfCondition import { ObiTypes } from '../../src/constants/ObiTypes'; test('should return {} when input is not IfCondition', () => { - const json = { $type: '' }; + const json = { $kind: '' }; const result = transformIfCondtion(json, ''); expect(result).toBeNull(); }); test('should return correct schema when input choice and empty branches', () => { - const json = { $type: ObiTypes.IfCondition, conditon: 'a==b', actions: [], elseActions: [] }; + const json = { $kind: ObiTypes.IfCondition, conditon: 'a==b', actions: [], elseActions: [] }; const result = transformIfCondtion(json, ''); if (!result) throw new Error('IfCondition got a wrong result'); expect(result.choice).toBeTruthy(); expect(result.ifGroup).toBeTruthy(); expect(result.ifGroup.json).toEqual({ - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: [], }); expect(result.elseGroup.json).toBeTruthy(); expect(result.elseGroup.json).toEqual({ - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: [], }); }); test('should return correct schema when input choice only json', () => { - const json = { $type: ObiTypes.IfCondition, conditon: 'a==b' }; + const json = { $kind: ObiTypes.IfCondition, conditon: 'a==b' }; const result = transformIfCondtion(json, ''); if (!result) throw new Error('IfCondition got a wrong result'); expect(result.choice).toBeTruthy(); expect(result.ifGroup).toBeTruthy(); expect(result.ifGroup.json).toEqual({ - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: [], }); expect(result.elseGroup.json).toBeTruthy(); expect(result.elseGroup.json).toEqual({ - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: [], }); }); test('should return correct schema when input complete json', () => { const json = { - $type: ObiTypes.IfCondition, + $kind: ObiTypes.IfCondition, conditon: 'a==b', - actions: [{ $type: 'any' }], - elseActions: [{ $type: 'any' }, { $type: 'any' }], + actions: [{ $kind: 'any' }], + elseActions: [{ $kind: 'any' }, { $kind: 'any' }], }; const result = transformIfCondtion(json, ''); if (!result) throw new Error('IfCondition got a wrong result'); @@ -59,20 +59,20 @@ test('should return correct schema when input complete json', () => { expect(result.choice).toBeTruthy(); expect(result.ifGroup).toBeTruthy(); - expect(result.ifGroup.json.$type).toEqual(ObiTypes.StepGroup); + expect(result.ifGroup.json.$kind).toEqual(ObiTypes.StepGroup); expect(result.ifGroup.json.children.length).toEqual(1); expect(result.elseGroup).toBeTruthy(); - expect(result.elseGroup.json.$type).toEqual(ObiTypes.StepGroup); + expect(result.elseGroup.json.$kind).toEqual(ObiTypes.StepGroup); expect(result.elseGroup.json.children.length).toEqual(2); }); test('should jsonpath be passed down to children', () => { const json = { - $type: ObiTypes.IfCondition, + $kind: ObiTypes.IfCondition, conditon: 'a==b', - actions: [{ $type: 'any' }], - elseActions: [{ $type: 'any' }, { $type: 'any' }], + actions: [{ $kind: 'any' }], + elseActions: [{ $kind: 'any' }, { $kind: 'any' }], }; const currentPath = 'current'; const result = transformIfCondtion(json, currentPath); diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformObiRules.test.tsx b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformObiRules.test.tsx index 91f34549bc..cac6f35517 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformObiRules.test.tsx +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformObiRules.test.tsx @@ -10,8 +10,8 @@ test('should return safely when input null value', () => { test('should parse single rule correctly with empty parentPath', () => { const json = { - $type: 'Microsoft.IntentRule', - actions: [{ $type: 'any' }], + $kind: 'Microsoft.IntentRule', + actions: [{ $kind: 'any' }], }; const result = transformObiRules(json, ''); if (!result) throw new Error('transformObiRules got a wrong result'); @@ -23,8 +23,8 @@ test('should parse single rule correctly with empty parentPath', () => { test('should parse single rule correctly with real parentPath', () => { const json = { - $type: 'Microsoft.IntentRule', - actions: [{ $type: 'any' }], + $kind: 'Microsoft.IntentRule', + actions: [{ $kind: 'any' }], }; const result = transformObiRules(json, 'events[0]'); if (!result) throw new Error('transformObiRules got a wrong result'); diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformRootDialog.test.tsx b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformRootDialog.test.tsx index 5d923003d6..f34b8d7dd0 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformRootDialog.test.tsx +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformRootDialog.test.tsx @@ -13,7 +13,7 @@ test('should return safely when input null value', () => { test('should parse stepGroup when input TodoBotMain with steps', () => { const jsonWithSteps = { ...TodoBotMain, - actions: [{ $type: 'any' }], + actions: [{ $kind: 'any' }], }; const result = transformRootDialog(jsonWithSteps); if (!result) throw new Error('transformRootDialog got null result.'); diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformStepGroup.ts b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformStepGroup.ts index 43d3b5ed84..eb5567c5e9 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformStepGroup.ts +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformStepGroup.ts @@ -12,21 +12,21 @@ test('should return safely when input null value', () => { test('should transform string as BeginDialog', () => { const result = transformStepGroup( { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: ['CalleeDialog'], }, '' ); expect(result[0].json).toEqual({ - $type: ObiTypes.BeginDialog, + $kind: ObiTypes.BeginDialog, dialog: 'CalleeDialog', }); }); test('should parse child step correctly with parentPath', () => { const json = { - $type: ObiTypes.StepGroup, - children: [{ $type: 'any' }, { $type: 'any' }], + $kind: ObiTypes.StepGroup, + children: [{ $kind: 'any' }, { $kind: 'any' }], }; const result = transformStepGroup(json, 'steps'); expect(result).toBeTruthy(); diff --git a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformSwitchCondition.test.tsx b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformSwitchCondition.test.tsx index c17ba0a5a8..f6e74ebc60 100644 --- a/Composer/packages/extensions/visual-designer/__tests__/transformers/transformSwitchCondition.test.tsx +++ b/Composer/packages/extensions/visual-designer/__tests__/transformers/transformSwitchCondition.test.tsx @@ -7,12 +7,12 @@ import { ObiTypes } from '../../src/constants/ObiTypes'; test('should return NULL when input is not SwitchCondition', () => { expect(transformSwitchCondition(null, '')).toBeNull(); expect(transformSwitchCondition({}, '')).toBeNull(); - expect(transformSwitchCondition({ $type: 'wrong' }, '')).toBeNull(); + expect(transformSwitchCondition({ $kind: 'wrong' }, '')).toBeNull(); }); test('should return correct schema when input empty cases', () => { const json = { - $type: ObiTypes.SwitchCondition, + $kind: ObiTypes.SwitchCondition, condition: 'a==b', cases: [], default: [], @@ -35,15 +35,15 @@ test('should return correct schema when input empty cases', () => { test('should return correct schema when input empty cases', () => { const json = { - $type: ObiTypes.SwitchCondition, + $kind: ObiTypes.SwitchCondition, condition: 'a==b', cases: [ { value: '1', - actions: [{ $type: ObiTypes.SendActivity }], + actions: [{ $kind: ObiTypes.SendActivity }], }, ], - default: [{ $type: ObiTypes.SendActivity }], + default: [{ $kind: ObiTypes.SendActivity }], }; const result: any = transformSwitchCondition(json, 'actions[0]'); diff --git a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/AddToDo.json b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/AddToDo.json index 390fa63365..24794fcf8e 100644 --- a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/AddToDo.json +++ b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/AddToDo.json @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "createdAt": "2019-07-03T06:51:37.526Z", "updatedAt": "2019-07-16T20:00:39.131Z", @@ -9,14 +9,14 @@ "$schema": "../../app.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "335456", "updatedAt": "2019-07-22T08:10:44.402Z" }, "actions": [ { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "createdAt": "2019-07-16T20:00:51.769Z", "updatedAt": "2019-08-02T22:30:32.704Z", @@ -26,7 +26,7 @@ "value": "@title" }, { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "createdAt": "2019-07-16T20:00:55.825Z", "updatedAt": "2019-07-16T20:00:59.346Z", @@ -40,7 +40,7 @@ "outputFormat": "none" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "createdAt": "2019-07-16T20:01:05.970Z", "updatedAt": "2019-07-16T20:01:13.866Z", @@ -49,7 +49,7 @@ "condition": "user.todos == null", "actions": [ { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "createdAt": "2019-07-16T20:01:05.970Z", "updatedAt": "2019-07-16T20:01:13.866Z", @@ -61,7 +61,7 @@ ] }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "createdAt": "2019-07-01T22:02:54.672Z", "updatedAt": "2019-08-02T22:32:37.062Z", @@ -72,7 +72,7 @@ "value": "dialog.todo" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-07-01T22:02:53.545Z", "updatedAt": "2019-07-16T20:01:26.980Z", diff --git a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ClearToDos.json b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ClearToDos.json index d176fe4cc8..ef85e02469 100644 --- a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ClearToDos.json +++ b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ClearToDos.json @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "createdAt": "2019-07-03T06:51:38.784Z", "updatedAt": "2019-07-16T20:00:42.988Z", @@ -9,7 +9,7 @@ "$schema": "../../app.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "480162", "updatedAt": "2019-07-22T08:10:50.068Z" @@ -17,7 +17,7 @@ "actions": [ { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "createdAt": "2019-07-01T22:03:18.901Z", "updatedAt": "2019-07-16T20:01:43.249Z", @@ -28,7 +28,7 @@ "resultProperty": "dialog.cleared" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "createdAt": "2019-07-01T22:03:36.091Z", "updatedAt": "2019-07-16T20:01:47.803Z", @@ -37,7 +37,7 @@ "condition": "dialog.cleared", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-07-01T22:03:18.901Z", "updatedAt": "2019-07-16T20:01:43.249Z", @@ -48,7 +48,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-07-01T22:03:36.091Z", "updatedAt": "2019-07-16T20:01:47.803Z", diff --git a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/DeleteToDo.json b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/DeleteToDo.json index 1d85694a58..553440438b 100644 --- a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/DeleteToDo.json +++ b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/DeleteToDo.json @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "createdAt": "2019-07-03T06:51:41.186Z", "updatedAt": "2019-07-16T20:00:46.804Z", @@ -9,7 +9,7 @@ "$schema": "../../app.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "768658", "updatedAt": "2019-07-22T08:10:54.685Z" @@ -17,7 +17,7 @@ "actions": [ { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "createdAt": "2019-07-01T22:04:05.322Z", "updatedAt": "2019-07-16T20:02:14.365Z", @@ -27,7 +27,7 @@ "value": "@title" }, { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "createdAt": "2019-07-16T20:01:55.761Z", "updatedAt": "2019-07-16T20:01:59.761Z", @@ -41,7 +41,7 @@ "outputFormat": "none" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "createdAt": "2019-07-16T20:02:01.004Z", "updatedAt": "2019-07-16T20:02:06.091Z", @@ -53,7 +53,7 @@ "value": "dialog.todo" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "createdAt": "2019-07-01T22:04:45.788Z", "updatedAt": "2019-07-16T20:02:19.199Z", @@ -62,7 +62,7 @@ "condition": "dialog.removed", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-07-01T22:04:05.322Z", "updatedAt": "2019-07-16T20:02:14.365Z", @@ -73,7 +73,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-07-01T22:04:45.788Z", "updatedAt": "2019-07-16T20:02:19.199Z", diff --git a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ShowToDos.json b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ShowToDos.json index 4d02220aff..fef19a56c8 100644 --- a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ShowToDos.json +++ b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ShowToDos.json @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "createdAt": "2019-07-03T06:51:43.763Z", "updatedAt": "2019-07-16T20:00:49.889Z", @@ -9,7 +9,7 @@ "$schema": "../../app.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "783343", "updatedAt": "2019-07-22T08:11:00.380Z" @@ -17,7 +17,7 @@ "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "createdAt": "2019-07-01T22:05:03.290Z", "updatedAt": "2019-07-16T20:02:34.141Z", @@ -26,7 +26,7 @@ "condition": "user.todos == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-07-01T22:04:54.741Z", "updatedAt": "2019-07-16T20:02:29.357Z", @@ -38,7 +38,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-07-01T22:05:03.290Z", "updatedAt": "2019-07-16T20:02:34.141Z", diff --git a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ToDoBot.main.json b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ToDoBot.main.json index 25e43edee5..f26d28df63 100644 --- a/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ToDoBot.main.json +++ b/Composer/packages/extensions/visual-designer/demo/src/samples/todo/ToDoBot.main.json @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "createdAt": "2019-07-04T08:14:01.139Z", "updatedAt": "2019-08-01T23:45:38.308Z", @@ -8,41 +8,41 @@ }, "autoEndDialog": false, "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "AddIntent", "pattern": "(?i)(?:add|create) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "ClearIntent", "pattern": "(?i)(?:delete|remove|clear) (?:all|every) (?:to-dos|todos|tasks)" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "DeleteIntent", "pattern": "(?i)(?:delete|remove|clear) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "ShowIntent", "pattern": "(?i)(?:show|see|view) .*(?:to-do|todo|task)" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "HelpIntent", "pattern": "(?i)help" }, { - "$type": "Microsoft.IntentPattern", + "$kind": "Microsoft.IntentPattern", "intent": "CancelIntent", "pattern": "(?i)cancel|never mind" } @@ -51,7 +51,7 @@ "generator": "common.lg", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "createdAt": "2019-07-01T22:02:14.960Z", "updatedAt": "2019-07-16T20:00:24.788Z", @@ -60,7 +60,7 @@ "constraint": "toLower(turn.Activity.membersAdded[0].name) != 'bot'", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-08-02T22:18:56.943Z", "updatedAt": "2019-08-02T22:36:20.947Z", @@ -71,7 +71,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:32.772Z", "updatedAt": "2019-07-16T19:59:36.277Z", @@ -79,14 +79,14 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "AddToDo" } ], "intent": "AddIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:37.184Z", "updatedAt": "2019-08-01T23:46:50.759Z", @@ -94,7 +94,7 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "DeleteToDo", "$designer": { "createdAt": "2019-08-01T23:47:15.255Z", @@ -106,7 +106,7 @@ "intent": "DeleteIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:41.352Z", "updatedAt": "2019-07-16T19:59:44.427Z", @@ -114,14 +114,14 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "ClearToDos" } ], "intent": "ClearIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T19:59:50.315Z", "updatedAt": "2019-07-16T19:59:54.774Z", @@ -129,7 +129,7 @@ }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "createdAt": "2019-08-01T23:44:56.704Z", "updatedAt": "2019-08-01T23:44:57.629Z", @@ -141,7 +141,7 @@ "intent": "HelpIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T20:00:00.082Z", "updatedAt": "2019-07-16T20:00:03.344Z", @@ -149,14 +149,14 @@ }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "ShowToDos" } ], "intent": "ShowIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "createdAt": "2019-07-16T20:00:08.499Z", "updatedAt": "2019-07-16T20:00:12.504Z", @@ -164,17 +164,17 @@ }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "ok." }, { - "$type": "Microsoft.EndDialog" + "$kind": "Microsoft.EndDialog" } ], "intent": "CancelIntent" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "createdAt": "2019-07-16T20:00:13.577Z", "updatedAt": "2019-07-16T20:00:19.435Z", @@ -182,7 +182,7 @@ }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "Hi! I'm a ToDo bot. Say \"add a todo named first\" to get started." } ] diff --git a/Composer/packages/extensions/visual-designer/demo/src/stories/VisualSDKDemo.js b/Composer/packages/extensions/visual-designer/demo/src/stories/VisualSDKDemo.js index d8c29c1e68..236f8b9f41 100644 --- a/Composer/packages/extensions/visual-designer/demo/src/stories/VisualSDKDemo.js +++ b/Composer/packages/extensions/visual-designer/demo/src/stories/VisualSDKDemo.js @@ -31,9 +31,9 @@ export class VisualSDKDemo extends Component { return initalActions; } - insertActionPreview($type) { + insertActionPreview($kind) { this.setState({ - actions: [this.factory.create($type), ...this.state.actions], + actions: [this.factory.create($kind), ...this.state.actions], }); } @@ -62,7 +62,7 @@ export class VisualSDKDemo extends Component { /> </div> <div className="action-preview--visual" style={{ marginLeft: 20 }}> - {renderUIWidget(uiSchemaPrivider.get(action.$type), { + {renderUIWidget(uiSchemaPrivider.get(action.$kind), { id: `actions[${index}]`, data: action, onEvent: () => null, @@ -75,8 +75,8 @@ export class VisualSDKDemo extends Component { renderActionFactory() { return ( <div style={{ width: '100%', height: 100, margin: 20 }}> - <h3>Create action by $type</h3> - <EdgeMenu id="visual-sdk-demo" onClick={$type => this.insertActionPreview($type)} /> + <h3>Create action by $kind</h3> + <EdgeMenu id="visual-sdk-demo" onClick={$kind => this.insertActionPreview($kind)} /> </div> ); } diff --git a/Composer/packages/extensions/visual-designer/src/components/groups/StepGroup.tsx b/Composer/packages/extensions/visual-designer/src/components/groups/StepGroup.tsx index 7d7fdbb1eb..ebaed320be 100644 --- a/Composer/packages/extensions/visual-designer/src/components/groups/StepGroup.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/groups/StepGroup.tsx @@ -73,7 +73,7 @@ export const StepGroup: FunctionComponent<NodeProps> = ({ id, data, onEvent, onR css={{ zIndex: 100 }} > <EdgeMenu - onClick={$type => onEvent(NodeEventTypes.Insert, { id, $type, position: 0 })} + onClick={$kind => onEvent(NodeEventTypes.Insert, { id, $kind, position: 0 })} data-testid="StepGroupAdd" id={`${id}[0]`} /> @@ -89,7 +89,7 @@ export const StepGroup: FunctionComponent<NodeProps> = ({ id, data, onEvent, onR css={{ zIndex: 100 }} > <EdgeMenu - onClick={$type => onEvent(NodeEventTypes.Insert, { id, $type, position: idx + 1 })} + onClick={$kind => onEvent(NodeEventTypes.Insert, { id, $kind, position: idx + 1 })} data-testid="StepGroupAdd" id={`${id}[${idx + 1}]`} /> diff --git a/Composer/packages/extensions/visual-designer/src/components/menus/EdgeMenu.tsx b/Composer/packages/extensions/visual-designer/src/components/menus/EdgeMenu.tsx index 3a98e3fe8f..32a6905654 100644 --- a/Composer/packages/extensions/visual-designer/src/components/menus/EdgeMenu.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/menus/EdgeMenu.tsx @@ -6,7 +6,7 @@ import { jsx, css } from '@emotion/core'; import { useContext } from 'react'; import classnames from 'classnames'; import formatMessage from 'format-message'; -import { createStepMenu, DialogGroup, SDKTypes } from '@bfc/shared'; +import { createStepMenu, DialogGroup, SDKKinds } from '@bfc/shared'; import { IContextualMenu, ContextualMenuItemType } from 'office-ui-fabric-react/lib/ContextualMenu'; import { FontIcon } from 'office-ui-fabric-react/lib/Icon'; @@ -27,7 +27,7 @@ interface EdgeMenuProps { const buildEdgeMenuItemsFromClipboardContext = ( context, onClick, - filter?: (t: SDKTypes) => boolean + filter?: (t: SDKKinds) => boolean ): IContextualMenu[] => { const { clipboardActions } = context; const menuItems = createStepMenu( @@ -41,7 +41,7 @@ const buildEdgeMenuItemsFromClipboardContext = ( DialogGroup.LOG, ], true, - (e, item) => onClick(item ? item.data.$type : null), + (e, item) => onClick(item ? item.data.$kind : null), context.dialogFactory, filter ); @@ -149,7 +149,7 @@ export const EdgeMenu: React.FC<EdgeMenuProps> = ({ id, onClick, ...rest }) => { menuItems={buildEdgeMenuItemsFromClipboardContext( nodeContext, onClick, - selfHosted ? x => x !== SDKTypes.LogAction : undefined + selfHosted ? x => x !== SDKKinds.LogAction : undefined )} label={formatMessage('Add')} {...rest} diff --git a/Composer/packages/extensions/visual-designer/src/components/menus/EventMenu.tsx b/Composer/packages/extensions/visual-designer/src/components/menus/EventMenu.tsx index e0990bada2..7067aebeb2 100644 --- a/Composer/packages/extensions/visual-designer/src/components/menus/EventMenu.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/menus/EventMenu.tsx @@ -18,7 +18,7 @@ export const EventMenu: React.FC<EventMenuProps> = ({ label, onClick, ...rest }) const eventMenuItems = createStepMenu( [DialogGroup.EVENTS], false, - (e, item): any => onClick(item ? item.data.$type : null), + (e, item): any => onClick(item ? item.data.$kind : null), dialogFactory ); diff --git a/Composer/packages/extensions/visual-designer/src/components/nodes/Trigger.tsx b/Composer/packages/extensions/visual-designer/src/components/nodes/Trigger.tsx index e60735a17b..bb9d7272b1 100644 --- a/Composer/packages/extensions/visual-designer/src/components/nodes/Trigger.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/nodes/Trigger.tsx @@ -18,16 +18,16 @@ import { } from './triggerStyles'; function getLabel(data: any): string { - const labelOverrides = ConceptLabels[data.$type]; + const labelOverrides = ConceptLabels[data.$kind]; if (labelOverrides) { return labelOverrides.subtitle || labelOverrides.title; } - return data.$type; + return data.$kind; } function getName(data: any): string { return ( - data.intent || get(data, '$designer.name', ConceptLabels[data.$type] ? ConceptLabels[data.$type].title : data.$type) + data.intent || get(data, '$designer.name', ConceptLabels[data.$kind] ? ConceptLabels[data.$kind].title : data.$kind) ); } diff --git a/Composer/packages/extensions/visual-designer/src/components/nodes/events/UnknownIntentRule.tsx b/Composer/packages/extensions/visual-designer/src/components/nodes/events/UnknownIntentRule.tsx index 655d5a6a61..2f88f93259 100644 --- a/Composer/packages/extensions/visual-designer/src/components/nodes/events/UnknownIntentRule.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/nodes/events/UnknownIntentRule.tsx @@ -14,7 +14,7 @@ function renderTitle(data): string { if (data.$designer && data.$designer.name) { return data.$designer.name; } else { - // data.$type.split('.')[1] + // data.$kind.split('.')[1] return formatMessage('Handle Unknown Intent'); } } 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 b0b9fc39e5..91daa37445 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 @@ -25,7 +25,7 @@ const getDirectJumpDialog = data => { return null; } const step = normalizeObiStep(steps[0]); - return step.$type === ObiTypes.BeginDialog ? step.dialog : null; + return step.$kind === ObiTypes.BeginDialog ? step.dialog : null; }; export const RuleCard: React.FC<CardProps> = ({ id, data, label, onEvent }): JSX.Element => { @@ -48,7 +48,7 @@ export const RuleCard: React.FC<CardProps> = ({ id, data, label, onEvent }): JSX let trigger = ''; let dialog = null; - switch (data.$type) { + switch (data.$kind) { case ObiTypes.OnIntent: if (data.intent) { trigger = data.intent; @@ -88,11 +88,11 @@ export const RuleCard: React.FC<CardProps> = ({ id, data, label, onEvent }): JSX summary = formatMessage('No actions'); } else if (data[StepsKey].length == 1) { const step = normalizeObiStep(data[StepsKey][0]); - if (step.$type === ObiTypes.BeginDialog) { + if (step.$kind === ObiTypes.BeginDialog) { dialog = step.dialog; - summary = ConceptLabels[step.$type].title || step.$type; + summary = ConceptLabels[step.$kind].title || step.$kind; } else { - summary = formatMessage('1 action: {step}', { step: (ConceptLabels[step.$type] || {}).title || step.$type }); + summary = formatMessage('1 action: {step}', { step: (ConceptLabels[step.$kind] || {}).title || step.$kind }); } } else { summary = formatMessage('{count} actions', { count: data[StepsKey].length }); diff --git a/Composer/packages/extensions/visual-designer/src/components/nodes/utils.ts b/Composer/packages/extensions/visual-designer/src/components/nodes/utils.ts index df0dadebf8..6388a0c508 100644 --- a/Composer/packages/extensions/visual-designer/src/components/nodes/utils.ts +++ b/Composer/packages/extensions/visual-designer/src/components/nodes/utils.ts @@ -3,15 +3,15 @@ import { ObiTypes } from '../../constants/ObiTypes'; -export function getUserAnswersTitle($type: string): string { - if (!$type) return ''; +export function getUserAnswersTitle($kind: string): string { + if (!$kind) return ''; - if ($type === ObiTypes.ChoiceInput) { + if ($kind === ObiTypes.ChoiceInput) { return 'ChoiceInput'; } - if ($type.includes('Input')) { - return `User Answers (${$type.replace(/Microsoft.(.*)Input/, '$1')})`; + if ($kind.includes('Input')) { + return `User Answers (${$kind.replace(/Microsoft.(.*)Input/, '$1')})`; } return ''; 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 c03ddb7c76..a20a57c382 100644 --- a/Composer/packages/extensions/visual-designer/src/components/renderers/EventRenderer.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/renderers/EventRenderer.tsx @@ -19,8 +19,8 @@ const rendererByObiType = { }; const DEFAULT_RENDERER = UnknownIntentRule; -function chooseRendererByType($type): FC<NodeProps> | ComponentClass<NodeProps> { - const renderer = rendererByObiType[$type] || DEFAULT_RENDERER; +function chooseRendererByType($kind): FC<NodeProps> | ComponentClass<NodeProps> { + const renderer = rendererByObiType[$kind] || DEFAULT_RENDERER; return renderer; } @@ -29,7 +29,7 @@ const nodeBorderStyle = css` `; export const EventRenderer: FC<NodeProps> = ({ id, data, onEvent, onResize }): JSX.Element => { - const ChosenRenderer = chooseRendererByType(data.$type); + const ChosenRenderer = chooseRendererByType(data.$kind); const { focusedId, focusedEvent } = useContext(NodeRendererContext); const nodeFocused = focusedId === id || focusedEvent === id; diff --git a/Composer/packages/extensions/visual-designer/src/components/renderers/StepRenderer.tsx b/Composer/packages/extensions/visual-designer/src/components/renderers/StepRenderer.tsx index 6674904de7..30b98c8ac5 100644 --- a/Composer/packages/extensions/visual-designer/src/components/renderers/StepRenderer.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/renderers/StepRenderer.tsx @@ -4,7 +4,7 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; import { FC, useContext } from 'react'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import get from 'lodash/get'; import { NodeProps, defaultNodeProps } from '../nodes/nodeProps'; @@ -16,26 +16,26 @@ import { ElementMeasurer } from './ElementMeasurer'; /** TODO: (zeye) integrate this array into UISchema */ const TypesWithoutWrapper = [ - SDKTypes.IfCondition, - SDKTypes.SwitchCondition, - SDKTypes.Foreach, - SDKTypes.ForeachPage, - SDKTypes.AttachmentInput, - SDKTypes.ConfirmInput, - SDKTypes.DateTimeInput, - SDKTypes.NumberInput, - SDKTypes.TextInput, - SDKTypes.ChoiceInput, + SDKKinds.IfCondition, + SDKKinds.SwitchCondition, + SDKKinds.Foreach, + SDKKinds.ForeachPage, + SDKKinds.AttachmentInput, + SDKKinds.ConfirmInput, + SDKKinds.DateTimeInput, + SDKKinds.NumberInput, + SDKKinds.TextInput, + SDKKinds.ChoiceInput, ]; export const StepRenderer: FC<NodeProps> = ({ id, data, onEvent, onResize }): JSX.Element => { const schemaProvider = useContext(UISchemaContext); - const $type = get(data, '$type', ''); - const widgetSchema = schemaProvider.get($type); + const $kind = get(data, '$kind', ''); + const widgetSchema = schemaProvider.get($kind); const content = renderUIWidget(widgetSchema, { id, data, onEvent, onResize }); - if (TypesWithoutWrapper.some(x => $type === x)) { + if (TypesWithoutWrapper.some(x => $kind === x)) { return content; } return ( diff --git a/Composer/packages/extensions/visual-designer/src/constants/ObiTypes.ts b/Composer/packages/extensions/visual-designer/src/constants/ObiTypes.ts index c40f544e9c..10902c3436 100644 --- a/Composer/packages/extensions/visual-designer/src/constants/ObiTypes.ts +++ b/Composer/packages/extensions/visual-designer/src/constants/ObiTypes.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; enum VirtualElementTypes { RuleGroup = 'VisualSDK.RuleGroup', @@ -18,6 +18,6 @@ enum VirtualElementTypes { } export const ObiTypes = { - ...SDKTypes, + ...SDKKinds, ...VirtualElementTypes, }; diff --git a/Composer/packages/extensions/visual-designer/src/editors/EventsEditor.tsx b/Composer/packages/extensions/visual-designer/src/editors/EventsEditor.tsx index 32fa5d77d1..380553aa20 100644 --- a/Composer/packages/extensions/visual-designer/src/editors/EventsEditor.tsx +++ b/Composer/packages/extensions/visual-designer/src/editors/EventsEditor.tsx @@ -14,7 +14,7 @@ export const EventsEditor: FC<EditorProps> = ({ id, data, onEvent }): JSX.Elemen const ruleCount = data.children.length; const title = `Events (${ruleCount})`; - const onClick = $type => onEvent(NodeEventTypes.Insert, { id, $type, position: ruleCount }); + const onClick = $kind => onEvent(NodeEventTypes.Insert, { id, $kind, position: ruleCount }); return ( <Panel diff --git a/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx b/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx index 25d31ff387..23f614d843 100644 --- a/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx +++ b/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx @@ -6,7 +6,7 @@ import { jsx } from '@emotion/core'; import { useContext, FC, useEffect, useState, useRef } from 'react'; import { MarqueeSelection, Selection } from 'office-ui-fabric-react/lib/MarqueeSelection'; import { - SDKTypes, + SDKKinds, deleteAction, deleteActions, LgTemplateRef, @@ -150,7 +150,7 @@ export const ObiEditor: FC<ObiEditorProps> = ({ break; case NodeEventTypes.Insert: trackActionChange(eventData.id); - if (eventData.$type === 'PASTE') { + if (eventData.$kind === 'PASTE') { handler = e => { pasteNodes(data, e.id, e.position, clipboardActions, buildLgReference).then(dialog => { onChange(dialog); @@ -158,7 +158,7 @@ export const ObiEditor: FC<ObiEditorProps> = ({ }; } else { handler = e => { - const dialog = insert(data, e.id, e.position, e.$type, dialogFactory); + const dialog = insert(data, e.id, e.position, e.$kind, dialogFactory); onChange(dialog); onFocusSteps([`${e.id}[${e.position || 0}]`]); }; @@ -166,7 +166,7 @@ export const ObiEditor: FC<ObiEditorProps> = ({ break; case NodeEventTypes.InsertEvent: handler = e => { - const dialog = insert(data, e.id, e.position, e.$type, dialogFactory); + const dialog = insert(data, e.id, e.position, e.$kind, dialogFactory); onChange(dialog); onFocusEvent(`${e.id}[${e.position || 0}]`); }; @@ -232,7 +232,7 @@ export const ObiEditor: FC<ObiEditorProps> = ({ const [, arrayPath, actionIndexStr] = indexes; const startIndex = parseInt(actionIndexStr); - const placeholderAction = dialogFactory.create(SDKTypes.BeginDialog, { dialog: newDialog }); + const placeholderAction = dialogFactory.create(SDKKinds.BeginDialog, { dialog: newDialog }); const insertResult = insertAction(deleteResult, arrayPath, startIndex, placeholderAction); onChange(insertResult); }); diff --git a/Composer/packages/extensions/visual-designer/src/editors/StepEditor.tsx b/Composer/packages/extensions/visual-designer/src/editors/StepEditor.tsx index 1306fe1a1d..e850748985 100644 --- a/Composer/packages/extensions/visual-designer/src/editors/StepEditor.tsx +++ b/Composer/packages/extensions/visual-designer/src/editors/StepEditor.tsx @@ -33,7 +33,7 @@ export const StepEditor = ({ id, data, onEvent, trigger, addCoachMarkRef }): JSX const hasNoSteps = !data || !Array.isArray(data.children) || data.children.length === 0; const content = hasNoSteps ? ( <EdgeMenu - onClick={$type => onEvent(NodeEventTypes.Insert, { id, $type, position: 0 })} + onClick={$kind => onEvent(NodeEventTypes.Insert, { id, $kind, position: 0 })} data-testid="StepGroupAdd" id={`${id}[0]`} /> diff --git a/Composer/packages/extensions/visual-designer/src/index.tsx b/Composer/packages/extensions/visual-designer/src/index.tsx index 1a3be8fd73..79f30f61d5 100644 --- a/Composer/packages/extensions/visual-designer/src/index.tsx +++ b/Composer/packages/extensions/visual-designer/src/index.tsx @@ -129,7 +129,7 @@ VisualDesigner.defaultProps = { dialogId: '', focusedEvent: '', focusedSteps: [], - data: { $type: '' }, + data: { $kind: '' }, shellApi: ({ navTo: () => {}, onFocusEvent: () => {}, diff --git a/Composer/packages/extensions/visual-designer/src/layouters/measureJsonBoundary.ts b/Composer/packages/extensions/visual-designer/src/layouters/measureJsonBoundary.ts index 17c9f34b51..fa1d0fc22b 100644 --- a/Composer/packages/extensions/visual-designer/src/layouters/measureJsonBoundary.ts +++ b/Composer/packages/extensions/visual-designer/src/layouters/measureJsonBoundary.ts @@ -99,14 +99,14 @@ function measureBaseInputBoundary(data): Boundary { export function measureJsonBoundary(json): Boundary { let boundary = new Boundary(); - if (!json || !json.$type) return boundary; + if (!json || !json.$kind) return boundary; const cachedBoundary = designerCache.loadBounary(json); if (cachedBoundary) { return cachedBoundary; } - switch (json.$type) { + switch (json.$kind) { case ObiTypes.ChoiceDiamond: boundary = new Boundary(DiamondSize.width, DiamondSize.height); break; diff --git a/Composer/packages/extensions/visual-designer/src/schema/uischema.tsx b/Composer/packages/extensions/visual-designer/src/schema/uischema.tsx index 748e0733bf..7133389861 100644 --- a/Composer/packages/extensions/visual-designer/src/schema/uischema.tsx +++ b/Composer/packages/extensions/visual-designer/src/schema/uischema.tsx @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SDKTypes, getInputType } from '@bfc/shared'; +import { SDKKinds, getInputType } from '@bfc/shared'; import formatMessage from 'format-message'; import React from 'react'; import get from 'lodash/get'; @@ -28,7 +28,7 @@ const BaseInputSchema: UIWidget = { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, - title: data => `Bot Asks (${getInputType(data.$type)})`, + title: data => `Bot Asks (${getInputType(data.$kind)})`, icon: ElementIcon.MessageBot, colors: { theme: ObiColors.BlueMagenta20, @@ -45,7 +45,7 @@ const BaseInputSchema: UIWidget = { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, - title: data => `User Input (${getInputType(data.$type)})`, + title: data => `User Input (${getInputType(data.$kind)})`, disableSDKTitle: true, icon: ElementIcon.User, menu: 'none', @@ -55,7 +55,7 @@ const BaseInputSchema: UIWidget = { }, }, body: data => - data.$type === SDKTypes.ChoiceInput && Array.isArray(data.choices) && data.choices.length ? ( + data.$kind === SDKKinds.ChoiceInput && Array.isArray(data.choices) && data.choices.length ? ( <ListOverview items={data.choices} renderItem={item => { @@ -73,7 +73,7 @@ const BaseInputSchema: UIWidget = { footer: data => data.property ? ( <> - {data.property} <FixedInfo>= Input({getInputType(data.$type)})</FixedInfo> + {data.property} <FixedInfo>= Input({getInputType(data.$kind)})</FixedInfo> </> ) : null, }, @@ -83,28 +83,28 @@ export const uiSchema: UISchema = { default: { 'ui:widget': ActionCard, }, - [SDKTypes.IfCondition]: { + [SDKKinds.IfCondition]: { 'ui:widget': IfConditionWidget, judgement: { 'ui:widget': ActionCard, content: data => data.condition, }, }, - [SDKTypes.SwitchCondition]: { + [SDKKinds.SwitchCondition]: { 'ui:widget': SwitchConditionWidget, judgement: { 'ui:widget': ActionCard, content: data => data.condition, }, }, - [SDKTypes.Foreach]: { + [SDKKinds.Foreach]: { 'ui:widget': ForeachWidget, loop: { 'ui:widget': ActionCard, content: data => `${formatMessage('Each value in')} {${data.itemsProperty || '?'}}`, }, }, - [SDKTypes.ForeachPage]: { + [SDKKinds.ForeachPage]: { 'ui:widget': ForeachWidget, loop: { 'ui:widget': ActionCard, @@ -115,7 +115,7 @@ export const uiSchema: UISchema = { }, }, }, - [SDKTypes.SendActivity]: { + [SDKKinds.SendActivity]: { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, @@ -130,13 +130,13 @@ export const uiSchema: UISchema = { field: 'activity', }, }, - [SDKTypes.AttachmentInput]: BaseInputSchema, - [SDKTypes.ConfirmInput]: BaseInputSchema, - [SDKTypes.DateTimeInput]: BaseInputSchema, - [SDKTypes.NumberInput]: BaseInputSchema, - [SDKTypes.TextInput]: BaseInputSchema, - [SDKTypes.ChoiceInput]: BaseInputSchema, - [SDKTypes.BeginDialog]: { + [SDKKinds.AttachmentInput]: BaseInputSchema, + [SDKKinds.ConfirmInput]: BaseInputSchema, + [SDKKinds.DateTimeInput]: BaseInputSchema, + [SDKKinds.NumberInput]: BaseInputSchema, + [SDKKinds.TextInput]: BaseInputSchema, + [SDKKinds.ChoiceInput]: BaseInputSchema, + [SDKKinds.BeginDialog]: { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, @@ -157,7 +157,7 @@ export const uiSchema: UISchema = { </> ) : null, }, - [SDKTypes.SkillDialog]: { + [SDKKinds.SkillDialog]: { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, @@ -176,7 +176,7 @@ export const uiSchema: UISchema = { </> ) : null, }, - [SDKTypes.ReplaceDialog]: { + [SDKKinds.ReplaceDialog]: { 'ui:widget': ActionCard, content: { 'ui:widget': DialogRef, @@ -188,7 +188,7 @@ export const uiSchema: UISchema = { ), }, }, - [SDKTypes.EditArray]: { + [SDKKinds.EditArray]: { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, @@ -206,11 +206,11 @@ export const uiSchema: UISchema = { </> ) : null, }, - [SDKTypes.SetProperty]: { + [SDKKinds.SetProperty]: { 'ui:widget': ActionCard, content: data => `${data.property || '?'} : ${data.value || '?'}`, }, - [SDKTypes.SetProperties]: { + [SDKKinds.SetProperties]: { 'ui:widget': ActionCard, content: data => ( <ListOverview @@ -228,11 +228,11 @@ export const uiSchema: UISchema = { /> ), }, - [SDKTypes.DeleteProperty]: { + [SDKKinds.DeleteProperty]: { 'ui:widget': ActionCard, content: data => data.property, }, - [SDKTypes.DeleteProperties]: { + [SDKKinds.DeleteProperties]: { 'ui:widget': ActionCard, content: data => ( <ListOverview @@ -246,13 +246,13 @@ export const uiSchema: UISchema = { /> ), }, - [SDKTypes.EndDialog]: { + [SDKKinds.EndDialog]: { 'ui:widget': ActionHeader, }, - [SDKTypes.RepeatDialog]: { + [SDKKinds.RepeatDialog]: { 'ui:widget': ActionHeader, }, - [SDKTypes.CancelAllDialogs]: { + [SDKKinds.CancelAllDialogs]: { 'ui:widget': ActionCard, content: data => data.eventName ? ( @@ -262,10 +262,10 @@ export const uiSchema: UISchema = { </> ) : null, }, - [SDKTypes.EndTurn]: { + [SDKKinds.EndTurn]: { 'ui:widget': ActionHeader, }, - [SDKTypes.EmitEvent]: { + [SDKKinds.EmitEvent]: { 'ui:widget': ActionCard, content: data => ( <> @@ -274,7 +274,7 @@ export const uiSchema: UISchema = { </> ), }, - [SDKTypes.HttpRequest]: { + [SDKKinds.HttpRequest]: { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, @@ -293,21 +293,21 @@ export const uiSchema: UISchema = { </> ) : null, }, - [SDKTypes.TraceActivity]: { + [SDKKinds.TraceActivity]: { 'ui:widget': ActionHeader, }, - [SDKTypes.LogAction]: { + [SDKKinds.LogAction]: { 'ui:widget': ActionHeader, }, - [SDKTypes.EditActions]: { + [SDKKinds.EditActions]: { 'ui:widget': ActionCard, content: data => data.changeType, }, - [SDKTypes.QnAMakerDialog]: { + [SDKKinds.QnAMakerDialog]: { 'ui:widget': ActionCard, content: data => data.hostname, }, - [SDKTypes.OAuthInput]: { + [SDKKinds.OAuthInput]: { 'ui:widget': CardTemplate, header: { 'ui:widget': ActionHeader, diff --git a/Composer/packages/extensions/visual-designer/src/schema/uischema.types.ts b/Composer/packages/extensions/visual-designer/src/schema/uischema.types.ts index 6fb2a37d7e..222c368b04 100644 --- a/Composer/packages/extensions/visual-designer/src/schema/uischema.types.ts +++ b/Composer/packages/extensions/visual-designer/src/schema/uischema.types.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { FC, ComponentClass } from 'react'; -import { BaseSchema, SDKTypes } from '@bfc/shared'; +import { BaseSchema, SDKKinds } from '@bfc/shared'; import { NodeEventTypes } from '../constants/NodeEventTypes'; @@ -12,7 +12,7 @@ export enum UISchemaBuiltinKeys { /** schema */ export type UISchema = { - [key in SDKTypes | UISchemaBuiltinKeys]?: UIWidget; + [key in SDKKinds | UISchemaBuiltinKeys]?: UIWidget; }; /** widget */ diff --git a/Composer/packages/extensions/visual-designer/src/schema/uischemaProvider.ts b/Composer/packages/extensions/visual-designer/src/schema/uischemaProvider.ts index bdcebfbc5d..b8aae566bc 100644 --- a/Composer/packages/extensions/visual-designer/src/schema/uischemaProvider.ts +++ b/Composer/packages/extensions/visual-designer/src/schema/uischemaProvider.ts @@ -12,7 +12,7 @@ export class UISchemaProvider { this.schema = uiSchema; } - get = ($type: string): UIWidget => { - return get(this.schema, $type, this.schema.default); + get = ($kind: string): UIWidget => { + return get(this.schema, $kind, this.schema.default); }; } diff --git a/Composer/packages/extensions/visual-designer/src/schema/uischemaRenderer.tsx b/Composer/packages/extensions/visual-designer/src/schema/uischemaRenderer.tsx index 8e5841aecc..c6140d94d4 100644 --- a/Composer/packages/extensions/visual-designer/src/schema/uischemaRenderer.tsx +++ b/Composer/packages/extensions/visual-designer/src/schema/uischemaRenderer.tsx @@ -12,7 +12,7 @@ export interface UIWidgetContext { /** The uniq id of current schema data. Usually a json path. */ id: string; - /** Declarative json with a $type field. */ + /** Declarative json with a $kind field. */ data: BaseSchema; /** Handle UI events */ diff --git a/Composer/packages/extensions/visual-designer/src/store/DesignerCache.ts b/Composer/packages/extensions/visual-designer/src/store/DesignerCache.ts index b4a52ff7f8..a1f6532641 100644 --- a/Composer/packages/extensions/visual-designer/src/store/DesignerCache.ts +++ b/Composer/packages/extensions/visual-designer/src/store/DesignerCache.ts @@ -16,8 +16,8 @@ export class DesignerCache { const designerId = get(actionData, '$designer.id', ''); if (!designerId) return null; - const $type = get(actionData, '$type'); - return `${$type}-${designerId}`; + const $kind = get(actionData, '$kind'); + return `${$kind}-${designerId}`; } cacheBoundary(actionData: BaseSchema, boundary: Boundary): boolean { diff --git a/Composer/packages/extensions/visual-designer/src/transformers/transformBaseInput.ts b/Composer/packages/extensions/visual-designer/src/transformers/transformBaseInput.ts index 248b44da84..962b3c22c6 100644 --- a/Composer/packages/extensions/visual-designer/src/transformers/transformBaseInput.ts +++ b/Composer/packages/extensions/visual-designer/src/transformers/transformBaseInput.ts @@ -11,18 +11,18 @@ export function transformBaseInput( return { botAsks: new IndexedNode(jsonpath, { ...input, - _type: input.$type, - $type: ObiTypes.BotAsks, + _type: input.$kind, + $kind: ObiTypes.BotAsks, }), userAnswers: new IndexedNode(jsonpath, { ...input, - _type: input.$type, - $type: input.$type === ObiTypes.ChoiceInput ? ObiTypes.ChoiceInputDetail : ObiTypes.UserAnswers, + _type: input.$kind, + $kind: input.$kind === ObiTypes.ChoiceInput ? ObiTypes.ChoiceInputDetail : ObiTypes.UserAnswers, }), invalidPrompt: new IndexedNode(jsonpath, { ...input, - _type: input.$type, - $type: ObiTypes.InvalidPromptBrick, + _type: input.$kind, + $kind: ObiTypes.InvalidPromptBrick, }), }; } diff --git a/Composer/packages/extensions/visual-designer/src/transformers/transformForeach.ts b/Composer/packages/extensions/visual-designer/src/transformers/transformForeach.ts index c9df80d61f..c2001aee6f 100644 --- a/Composer/packages/extensions/visual-designer/src/transformers/transformForeach.ts +++ b/Composer/packages/extensions/visual-designer/src/transformers/transformForeach.ts @@ -11,23 +11,23 @@ export function transformForeach( input: any, jsonpath: string ): { foreachDetail: IndexedNode; stepGroup: IndexedNode; loopBegin: IndexedNode; loopEnd: IndexedNode } | null { - if (!input || (input.$type !== ObiTypes.Foreach && input.$type !== ObiTypes.ForeachPage)) return null; + if (!input || (input.$kind !== ObiTypes.Foreach && input.$kind !== ObiTypes.ForeachPage)) return null; const foreachDetailNode = new IndexedNode(jsonpath, { ...input, - $type: input.$type === ObiTypes.ForeachPage ? ObiTypes.ForeachPageDetail : ObiTypes.ForeachDetail, + $kind: input.$kind === ObiTypes.ForeachPage ? ObiTypes.ForeachPageDetail : ObiTypes.ForeachDetail, }); const steps = input[StepsKey] || []; const stepsNode = new IndexedNode(`${jsonpath}.${StepsKey}`, { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: steps, }); return { foreachDetail: foreachDetailNode, stepGroup: stepsNode, - loopBegin: new IndexedNode(jsonpath, { $type: ObiTypes.LoopIndicator }), - loopEnd: new IndexedNode(jsonpath, { $type: ObiTypes.LoopIndicator }), + loopBegin: new IndexedNode(jsonpath, { $kind: ObiTypes.LoopIndicator }), + loopEnd: new IndexedNode(jsonpath, { $kind: ObiTypes.LoopIndicator }), }; } diff --git a/Composer/packages/extensions/visual-designer/src/transformers/transformIfCondition.ts b/Composer/packages/extensions/visual-designer/src/transformers/transformIfCondition.ts index 4bb35f323b..15e75af64d 100644 --- a/Composer/packages/extensions/visual-designer/src/transformers/transformIfCondition.ts +++ b/Composer/packages/extensions/visual-designer/src/transformers/transformIfCondition.ts @@ -12,23 +12,23 @@ export function transformIfCondtion( input, jsonpath: string ): { condition: IndexedNode; choice: IndexedNode; ifGroup: IndexedNode; elseGroup: IndexedNode } | null { - if (!input || input.$type !== ObiTypes.IfCondition) return null; + if (!input || input.$kind !== ObiTypes.IfCondition) return null; const result = { condition: new IndexedNode(`${jsonpath}`, { ...input, - $type: ObiTypes.ConditionNode, + $kind: ObiTypes.ConditionNode, }), choice: new IndexedNode(`${jsonpath}`, { - $type: ObiTypes.ChoiceDiamond, + $kind: ObiTypes.ChoiceDiamond, text: input.condition, }), ifGroup: new IndexedNode(`${jsonpath}.${IfBranchKey}`, { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: input[IfBranchKey] || [], }), elseGroup: new IndexedNode(`${jsonpath}.${ElseBranchKey}`, { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: input[ElseBranchKey] || [], }), }; diff --git a/Composer/packages/extensions/visual-designer/src/transformers/transformObiRules.ts b/Composer/packages/extensions/visual-designer/src/transformers/transformObiRules.ts index 12b5ddeca5..6b0f72956f 100644 --- a/Composer/packages/extensions/visual-designer/src/transformers/transformObiRules.ts +++ b/Composer/packages/extensions/visual-designer/src/transformers/transformObiRules.ts @@ -12,7 +12,7 @@ export function transformObiRules(input, parentPath = ''): { stepGroup: IndexedN const prefix = parentPath ? parentPath + '.' : ''; const steps = input[ObiFieldNames.Actions] || []; const stepGroup = new IndexedNode(`${prefix}${ObiFieldNames.Actions}`, { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: steps.map(x => normalizeObiStep(x)), }); return { diff --git a/Composer/packages/extensions/visual-designer/src/transformers/transformRootDialog.ts b/Composer/packages/extensions/visual-designer/src/transformers/transformRootDialog.ts index 24a0c350dc..a972c049b4 100644 --- a/Composer/packages/extensions/visual-designer/src/transformers/transformRootDialog.ts +++ b/Composer/packages/extensions/visual-designer/src/transformers/transformRootDialog.ts @@ -15,12 +15,12 @@ function transformSimpleDialog(input): { ruleGroup: IndexedNode; stepGroup: Inde const steps = input[Actions] || []; const ruleGroup = new IndexedNode(Events, { - $type: ObiTypes.RuleGroup, + $kind: ObiTypes.RuleGroup, children: [...rules], }); const stepGroup = new IndexedNode(Actions, { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, children: steps.map(x => normalizeObiStep(x)), }); return { diff --git a/Composer/packages/extensions/visual-designer/src/transformers/transformStepGroup.ts b/Composer/packages/extensions/visual-designer/src/transformers/transformStepGroup.ts index ee957fa9d8..fde62ac021 100644 --- a/Composer/packages/extensions/visual-designer/src/transformers/transformStepGroup.ts +++ b/Composer/packages/extensions/visual-designer/src/transformers/transformStepGroup.ts @@ -6,7 +6,7 @@ import { IndexedNode } from '../models/IndexedNode'; import { normalizeObiStep } from '../utils/stepBuilder'; export function transformStepGroup(input, groupId): IndexedNode[] { - if (!input || input.$type !== ObiTypes.StepGroup) return []; + if (!input || input.$kind !== ObiTypes.StepGroup) return []; if (!input.children || !Array.isArray(input.children)) return []; return input.children.map((step, index) => new IndexedNode(`${groupId}[${index}]`, normalizeObiStep(step))); diff --git a/Composer/packages/extensions/visual-designer/src/transformers/transformSwitchCondition.ts b/Composer/packages/extensions/visual-designer/src/transformers/transformSwitchCondition.ts index 42dcfbc4c6..3f3a704672 100644 --- a/Composer/packages/extensions/visual-designer/src/transformers/transformSwitchCondition.ts +++ b/Composer/packages/extensions/visual-designer/src/transformers/transformSwitchCondition.ts @@ -14,7 +14,7 @@ export function transformSwitchCondition( input, jsonpath: string ): { condition: IndexedNode; choice: IndexedNode; branches: IndexedNode[] } | null { - if (!input || input.$type !== ObiTypes.SwitchCondition) return null; + if (!input || input.$kind !== ObiTypes.SwitchCondition) return null; const condition = input[ConditionKey] || ''; const defaultSteps = input[DefaultBranchKey] || []; @@ -23,10 +23,10 @@ export function transformSwitchCondition( const result = { condition: new IndexedNode(`${jsonpath}`, { ...input, - $type: ObiTypes.ConditionNode, + $kind: ObiTypes.ConditionNode, }), choice: new IndexedNode(`${jsonpath}`, { - $type: ObiTypes.ChoiceDiamond, + $kind: ObiTypes.ChoiceDiamond, text: condition, }), branches: [] as IndexedNode[], @@ -34,7 +34,7 @@ export function transformSwitchCondition( result.branches.push( new IndexedNode(`${jsonpath}.${DefaultBranchKey}`, { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, label: DefaultBranchKey, children: defaultSteps, }) @@ -46,7 +46,7 @@ export function transformSwitchCondition( ...cases.map(({ value, actions }, index) => { const prefix = `${jsonpath}.${CasesKey}[${index}]`; return new IndexedNode(`${prefix}.${CaseStepKey}`, { - $type: ObiTypes.StepGroup, + $kind: ObiTypes.StepGroup, label: value, children: actions || [], }); diff --git a/Composer/packages/extensions/visual-designer/src/utils/jsonTracker.ts b/Composer/packages/extensions/visual-designer/src/utils/jsonTracker.ts index 45cbfe7305..4b4e84e6a0 100644 --- a/Composer/packages/extensions/visual-designer/src/utils/jsonTracker.ts +++ b/Composer/packages/extensions/visual-designer/src/utils/jsonTracker.ts @@ -151,8 +151,8 @@ export function deleteNodes(inputDialog, nodeIds: string[], callbackOnRemovedNod return dialog; } -export function insert(inputDialog, path, position, $type, factory: DialogFactory) { - const newStep = factory.create($type); +export function insert(inputDialog, path, position, $kind, factory: DialogFactory) { + const newStep = factory.create($kind); return insertAction(inputDialog, path, position, newStep); } diff --git a/Composer/packages/extensions/visual-designer/src/utils/obiPropertyResolver.ts b/Composer/packages/extensions/visual-designer/src/utils/obiPropertyResolver.ts index 2f3d383a3e..615ff2e705 100644 --- a/Composer/packages/extensions/visual-designer/src/utils/obiPropertyResolver.ts +++ b/Composer/packages/extensions/visual-designer/src/utils/obiPropertyResolver.ts @@ -5,8 +5,8 @@ import { DialogGroup, getDialogGroupByType } from '@bfc/shared'; import { NodeColors } from '../constants/ElementColors'; -export function getElementColor($type) { - const nodeGroup = getDialogGroupByType($type); +export function getElementColor($kind) { + const nodeGroup = getDialogGroupByType($kind); if (NodeColors[nodeGroup]) { return NodeColors[nodeGroup]; @@ -24,7 +24,7 @@ export enum ElementIcon { None = 'None', } -export function getElementIcon($type): ElementIcon { - const dialgGroup = getDialogGroupByType($type) as string; +export function getElementIcon($kind): ElementIcon { + const dialgGroup = getDialogGroupByType($kind) as string; return dialgGroup === 'Response' ? ElementIcon.MessageBot : ElementIcon.None; } diff --git a/Composer/packages/extensions/visual-designer/src/utils/outlineObiJson.ts b/Composer/packages/extensions/visual-designer/src/utils/outlineObiJson.ts index 1f98c53457..b7fe9b2c25 100644 --- a/Composer/packages/extensions/visual-designer/src/utils/outlineObiJson.ts +++ b/Composer/packages/extensions/visual-designer/src/utils/outlineObiJson.ts @@ -16,11 +16,11 @@ export function outlineObiJson(input: any) { const outline: any = {}; let childrenKeys = DEFAULT_CHILDREN_KEYS; - if (input.$type && childrenMap[input.$type]) { - childrenKeys = childrenMap[input.$type]; + if (input.$kind && childrenMap[input.$kind]) { + childrenKeys = childrenMap[input.$kind]; } - outline.$type = input.$type; + outline.$kind = input.$kind; for (const childrenKey of childrenKeys) { const children = input[childrenKey]; diff --git a/Composer/packages/extensions/visual-designer/src/utils/stepBuilder.ts b/Composer/packages/extensions/visual-designer/src/utils/stepBuilder.ts index cb3876ba09..af8b657b7c 100644 --- a/Composer/packages/extensions/visual-designer/src/utils/stepBuilder.ts +++ b/Composer/packages/extensions/visual-designer/src/utils/stepBuilder.ts @@ -8,7 +8,7 @@ export function normalizeObiStep(data) { // Grammar sugar provide by OBI runtime. if (typeof data === 'string') { step = { - $type: ObiTypes.BeginDialog, + $kind: ObiTypes.BeginDialog, dialog: step, }; } diff --git a/Composer/packages/lib/indexers/__tests__/utils/extractProperties.test.ts b/Composer/packages/lib/indexers/__tests__/utils/extractProperties.test.ts index 7c58b7be62..4e033efc21 100644 --- a/Composer/packages/lib/indexers/__tests__/utils/extractProperties.test.ts +++ b/Composer/packages/lib/indexers/__tests__/utils/extractProperties.test.ts @@ -5,23 +5,23 @@ import { checkProperty, getProperties } from '../../src/dialogUtils/extractMemor const data = [ { - $type: 'Microsoft.NumberInput', + $kind: 'Microsoft.NumberInput', property: 'user.a', }, { - $type: 'Microsoft.SetProperty', + $kind: 'Microsoft.SetProperty', property: 'user.b', }, { - $type: 'Microsoft.OAuthInput', + $kind: 'Microsoft.OAuthInput', tokenProperty: 'user.c', }, { - $type: 'Microsoft.HttpRequest', + $kind: 'Microsoft.HttpRequest', resultProperty: 'user.d', }, { - $type: 'Microsoft.SetProperties', + $kind: 'Microsoft.SetProperties', assignments: [{ property: 'user.e' }, { property: 'user.f' }], }, ]; diff --git a/Composer/packages/lib/indexers/src/dialogIndexer.ts b/Composer/packages/lib/indexers/src/dialogIndexer.ts index 90df04290d..ae7b15623a 100644 --- a/Composer/packages/lib/indexers/src/dialogIndexer.ts +++ b/Composer/packages/lib/indexers/src/dialogIndexer.ts @@ -5,7 +5,7 @@ import has from 'lodash/has'; import uniq from 'lodash/uniq'; import { extractLgTemplateRefs, - SDKTypes, + SDKKinds, ITrigger, DialogInfo, FileInfo, @@ -30,29 +30,29 @@ function ExtractLgTemplates(id, dialog): LgTemplateJsonPath[] { * @return boolean, true to stop walk */ const visitor: VisitorFunc = (path: string, value: any): boolean => { // it's a valid schema dialog node. - if (has(value, '$type')) { + if (has(value, '$kind')) { const targets: any[] = []; // look for prompt field if (has(value, 'prompt')) { - targets.push({ value: value.prompt, path: `${path}#${value.$type}#prompt` }); + targets.push({ value: value.prompt, path: `${path}#${value.$kind}#prompt` }); } // look for unrecognizedPrompt field if (has(value, 'unrecognizedPrompt')) { - targets.push({ value: value.unrecognizedPrompt, path: `${path}#${value.$type}#unrecognizedPrompt` }); + targets.push({ value: value.unrecognizedPrompt, path: `${path}#${value.$kind}#unrecognizedPrompt` }); } if (has(value, 'invalidPrompt')) { - targets.push({ value: value.invalidPrompt, path: `${path}#${value.$type}#invalidPrompt` }); + targets.push({ value: value.invalidPrompt, path: `${path}#${value.$kind}#invalidPrompt` }); } if (has(value, 'defaultValueResponse')) { - targets.push({ value: value.defaultValueResponse, path: `${path}#${value.$type}#defaultValueResponse` }); + targets.push({ value: value.defaultValueResponse, path: `${path}#${value.$kind}#defaultValueResponse` }); } - // look for other $type - switch (value.$type) { - case SDKTypes.SendActivity: + // look for other $kind + switch (value.$kind) { + case SDKKinds.SendActivity: targets.push({ value: value.activity, path: path }); - break; // if we want stop at some $type, do here + break; // if we want stop at some $kind, do here case 'location': return true; } @@ -87,11 +87,11 @@ function ExtractLuIntents(dialog, id: string): ReferredLuIntents[] { * */ const visitor: VisitorFunc = (path: string, value: any): boolean => { // it's a valid schema dialog node. - if (has(value, '$type') && value.$type === SDKTypes.OnIntent) { + if (has(value, '$kind') && value.$kind === SDKKinds.OnIntent) { const intentName = value.intent; intents.push({ name: intentName, - path: createPath(path, value.$type), + path: createPath(path, value.$kind), }); } return false; @@ -113,12 +113,12 @@ function ExtractTriggers(dialog): ITrigger[] { if (has(value, 'triggers') && Array.isArray(value.triggers)) { value.triggers.forEach((rule: any, index: number) => { // make sure event is actualy an event type, not OnDialogEvent.events array - if (rule && typeof rule === 'object' && rule.$type) { + if (rule && typeof rule === 'object' && rule.$kind) { const trigger: ITrigger = { id: `triggers[${index}]`, displayName: '', - type: rule.$type, - isIntent: rule.$type === SDKTypes.OnIntent, + type: rule.$kind, + isIntent: rule.$kind === SDKKinds.OnIntent, }; if (has(rule, '$designer.name')) { trigger.displayName = rule.$designer.name; @@ -146,7 +146,7 @@ function ExtractReferredDialogs(dialog): string[] { * */ const visitor: VisitorFunc = (path: string, value: any): boolean => { // it's a valid schema dialog node. - if (has(value, '$type') && value.$type === SDKTypes.BeginDialog) { + if (has(value, '$kind') && value.$kind === SDKKinds.BeginDialog) { const dialogName = value.dialog; dialogs.push(dialogName); } @@ -166,15 +166,15 @@ function CheckFields(dialog, id: string, schema: any): Diagnostic[] { * @return boolean, true to stop walk * */ const visitor: VisitorFunc = (path: string, value: any): boolean => { - if (has(value, '$type')) { + if (has(value, '$kind')) { const allChecks = [...checkerFuncs['.']]; - const checkerFunc = checkerFuncs[value.$type]; + const checkerFunc = checkerFuncs[value.$kind]; if (checkerFunc) { allChecks.splice(0, 0, ...checkerFunc); } allChecks.forEach(func => { - const result = func(path, value, value.$type, schema.definitions[value.$type]); + const result = func(path, value, value.$kind, schema.definitions[value.$kind]); if (result) { diagnostics.splice(0, 0, ...result); } diff --git a/Composer/packages/lib/indexers/src/dialogUtils/extractIntentTriggers.ts b/Composer/packages/lib/indexers/src/dialogUtils/extractIntentTriggers.ts index d9d52bd499..10273e7d33 100644 --- a/Composer/packages/lib/indexers/src/dialogUtils/extractIntentTriggers.ts +++ b/Composer/packages/lib/indexers/src/dialogUtils/extractIntentTriggers.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SDKTypes, IIntentTrigger } from '@bfc/shared'; +import { SDKKinds, IIntentTrigger } from '@bfc/shared'; import { VisitorFunc, JsonWalk } from '../utils/jsonWalk'; @@ -9,12 +9,12 @@ function ExtractIntentTriggers(value: any): IIntentTrigger[] { const triggers: IIntentTrigger[] = []; const visitor: VisitorFunc = (path: string, value: any): boolean => { - if (value?.$type === SDKTypes.OnIntent) { + if (value?.$kind === SDKKinds.OnIntent) { if (value.intent) { const dialogs: string[] = []; const visitor: VisitorFunc = (path: string, value: any): boolean => { - if (value?.$type === SDKTypes.BeginDialog) { + if (value?.$kind === SDKKinds.BeginDialog) { if (value.dialog) { dialogs.push(value.dialog); } diff --git a/Composer/packages/lib/indexers/src/dialogUtils/extractMemoryPaths.ts b/Composer/packages/lib/indexers/src/dialogUtils/extractMemoryPaths.ts index c011fe2ffa..bdcb2f3e50 100644 --- a/Composer/packages/lib/indexers/src/dialogUtils/extractMemoryPaths.ts +++ b/Composer/packages/lib/indexers/src/dialogUtils/extractMemoryPaths.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import has from 'lodash/has'; import { VisitorFunc, JsonWalk } from '../utils/jsonWalk'; @@ -15,23 +15,23 @@ export function checkProperty(property: string): boolean { // find all properties from specific type export function getProperties(value: any): string[] { let properties: string[] = []; - switch (value.$type) { - case SDKTypes.NumberInput: - case SDKTypes.TextInput: - case SDKTypes.ConfirmInput: - case SDKTypes.ChoiceInput: - case SDKTypes.AttachmentInput: - case SDKTypes.DateTimeInput: - case SDKTypes.SetProperty: + switch (value.$kind) { + case SDKKinds.NumberInput: + case SDKKinds.TextInput: + case SDKKinds.ConfirmInput: + case SDKKinds.ChoiceInput: + case SDKKinds.AttachmentInput: + case SDKKinds.DateTimeInput: + case SDKKinds.SetProperty: properties = [value.property]; break; - case SDKTypes.OAuthInput: + case SDKKinds.OAuthInput: properties = [value.tokenProperty]; break; - case SDKTypes.SetProperties: + case SDKKinds.SetProperties: properties = value.assignments?.map(assignment => assignment.property); break; - case SDKTypes.HttpRequest: + case SDKKinds.HttpRequest: properties = [value.resultProperty]; break; } @@ -48,7 +48,7 @@ function ExtractMemoryPaths(dialog): string[] { let properties: string[] = []; const visitor: VisitorFunc = (path: string, value: any): boolean => { - if (has(value, '$type')) { + if (has(value, '$kind')) { properties = [...properties, ...getProperties(value)]; } return false; diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/copyAdaptiveAction.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/copyAdaptiveAction.test.ts index 8e459f54b7..0f56b60ec9 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/copyAdaptiveAction.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/copyAdaptiveAction.test.ts @@ -2,11 +2,11 @@ // Licensed under the MIT License. import { externalApiStub as externalApi } from '../jestMocks/externalApiStub'; -import { SDKTypes } from '../../src'; +import { SDKKinds } from '../../src'; import CopyConstructorMap from '../../src/copyUtils/CopyConstructorMap'; import { copyAdaptiveAction } from '../../src/copyUtils'; -// NOTES: Cannot use SDKTypes here. `jest.mock` has to have zero dependency. +// NOTES: Cannot use SDKKinds here. `jest.mock` has to have zero dependency. jest.mock('../../src/copyUtils/CopyConstructorMap', () => ({ 'Microsoft.SendActivity': jest.fn(), 'Microsoft.IfCondition': jest.fn(), @@ -27,25 +27,25 @@ describe('copyAdaptiveAction', () => { }); const registeredTypes = [ - SDKTypes.SendActivity, - SDKTypes.IfCondition, - SDKTypes.SwitchCondition, - SDKTypes.EditActions, - SDKTypes.ChoiceInput, - SDKTypes.Foreach, + SDKKinds.SendActivity, + SDKKinds.IfCondition, + SDKKinds.SwitchCondition, + SDKKinds.EditActions, + SDKKinds.ChoiceInput, + SDKKinds.Foreach, ]; - for (const $type of registeredTypes) { - it(`should invoke registered handler for ${$type}`, async () => { - await copyAdaptiveAction({ $type }, externalApi); - expect(CopyConstructorMap[$type]).toHaveReturnedTimes(1); + for (const $kind of registeredTypes) { + it(`should invoke registered handler for ${$kind}`, async () => { + await copyAdaptiveAction({ $kind }, externalApi); + expect(CopyConstructorMap[$kind]).toHaveReturnedTimes(1); }); } it('should invoke default handler for other types', async () => { - await copyAdaptiveAction({ $type: SDKTypes.BeginDialog }, externalApi); + await copyAdaptiveAction({ $kind: SDKKinds.BeginDialog }, externalApi); expect(CopyConstructorMap.default).toHaveReturnedTimes(1); - await copyAdaptiveAction({ $type: SDKTypes.HttpRequest }, externalApi); + await copyAdaptiveAction({ $kind: SDKKinds.HttpRequest }, externalApi); expect(CopyConstructorMap.default).toHaveReturnedTimes(2); }); }); diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/copyEditActions.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/copyEditActions.test.ts index 25a47516e2..5196cfecbb 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/copyEditActions.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/copyEditActions.test.ts @@ -7,25 +7,25 @@ import { externalApiStub as externalApi } from '../jestMocks/externalApiStub'; describe('#copyEditActions', () => { it('can copy EditActions', async () => { const editActions = { - $type: 'Microsoft.EditActions', + $kind: 'Microsoft.EditActions', changeType: 'InsertActions', actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', dialog: 'addtodo', }, ], }; expect(await copyEditActions(editActions, externalApi)).toEqual({ - $type: 'Microsoft.EditActions', + $kind: 'Microsoft.EditActions', $designer: { id: '5678', }, changeType: 'InsertActions', actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', $designer: { id: '5678', }, diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/copyForeach.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/copyForeach.test.ts index bdf2a8fca6..f8d5a8e663 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/copyForeach.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/copyForeach.test.ts @@ -7,25 +7,25 @@ import { externalApiStub as externalApi } from '../jestMocks/externalApiStub'; describe('#copyForeach', () => { it('can copy Foreach action', async () => { const foreachInstance = { - $type: 'Microsoft.Foreach', + $kind: 'Microsoft.Foreach', itemsProperty: 'name', actions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', activity: 'hello', }, ], }; expect(await copyForeach(foreachInstance, externalApi)).toEqual({ - $type: 'Microsoft.Foreach', + $kind: 'Microsoft.Foreach', itemsProperty: 'name', $designer: { id: '5678', }, actions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', $designer: { id: '5678', }, @@ -37,19 +37,19 @@ describe('#copyForeach', () => { it('can copy ForeachPage action', async () => { const foreachPageInstance = { - $type: 'Microsoft.Foreach', + $kind: 'Microsoft.Foreach', itemsProperty: 'name', pageSize: 10, actions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', activity: 'hello', }, ], }; expect(await copyForeach(foreachPageInstance, externalApi)).toEqual({ - $type: 'Microsoft.Foreach', + $kind: 'Microsoft.Foreach', itemsProperty: 'name', pageSize: 10, $designer: { @@ -57,7 +57,7 @@ describe('#copyForeach', () => { }, actions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', $designer: { id: '5678', }, diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/copyIfCondition.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/copyIfCondition.test.ts index 4b64514a85..8aa1e081d3 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/copyIfCondition.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/copyIfCondition.test.ts @@ -7,31 +7,31 @@ import { externalApiStub as externalApi } from '../jestMocks/externalApiStub'; describe('#copyIfCondition', () => { it('can copy normal input', async () => { const ifCondition = { - $type: 'Microsoft.IfCondition', + $kind: 'Microsoft.IfCondition', condition: 'a == b', actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', dialog: 'addtodo', }, ], elseActions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', activity: '[bfdactivity-1234]', }, ], }; expect(await copyIfCondition(ifCondition, externalApi)).toEqual({ - $type: 'Microsoft.IfCondition', + $kind: 'Microsoft.IfCondition', $designer: { id: '5678', }, condition: 'a == b', actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', $designer: { id: '5678', }, @@ -40,7 +40,7 @@ describe('#copyIfCondition', () => { ], elseActions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', $designer: { id: '5678', }, diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/copyInputDialog.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/copyInputDialog.test.ts index fd4bd5193a..f220dc5465 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/copyInputDialog.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/copyInputDialog.test.ts @@ -13,7 +13,7 @@ describe('shallowCopyAdaptiveAction', () => { it('can copy TextInput', async () => { const promptText = { - $type: 'Microsoft.TextInput', + $kind: 'Microsoft.TextInput', $designer: { id: '844184', name: 'Prompt for text', @@ -29,7 +29,7 @@ describe('shallowCopyAdaptiveAction', () => { }; expect(await copyInputDialog(promptText as any, externalApiWithLgCopy)).toEqual({ - $type: 'Microsoft.TextInput', + $kind: 'Microsoft.TextInput', $designer: { id: '5678', }, diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/copySendActivity.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/copySendActivity.test.ts index 60ff581e56..5d9ac16a0b 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/copySendActivity.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/copySendActivity.test.ts @@ -13,12 +13,12 @@ describe('copySendActivity', () => { it('can copy SendActivity', async () => { const sendActivity = { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', activity: '[bfdactivity-1234]', }; expect(await copySendActivity(sendActivity, externalApiWithLgCopy)).toEqual({ - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', $designer: { id: '5678' }, activity: '[bfdactivity-1234](copy)', }); diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/copySwitchCondition.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/copySwitchCondition.test.ts index d48b5105e8..9fc09af566 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/copySwitchCondition.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/copySwitchCondition.test.ts @@ -7,18 +7,18 @@ import { externalApiStub as externalApi } from '../jestMocks/externalApiStub'; describe('#copySwitchCondition', () => { it('can copy cases and default in input', async () => { const switchCondition = { - $type: 'Microsoft.SwitchCondition', + $kind: 'Microsoft.SwitchCondition', condition: 'dialog.x', default: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', dialog: 'addtodo', }, { - $type: 'Microsoft.IfCondition', + $kind: 'Microsoft.IfCondition', actions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', activity: '[bfdactivity-1234]', }, ], @@ -29,7 +29,7 @@ describe('#copySwitchCondition', () => { value: '0', actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', dialog: 'addtodo', }, ], @@ -38,7 +38,7 @@ describe('#copySwitchCondition', () => { value: '1', actions: [ { - $type: 'Microsoft.SwitchCondition', + $kind: 'Microsoft.SwitchCondition', condition: 'a.b', default: [], cases: [], @@ -49,27 +49,27 @@ describe('#copySwitchCondition', () => { }; expect(await copySwitchCondition(switchCondition, externalApi)).toEqual({ - $type: 'Microsoft.SwitchCondition', + $kind: 'Microsoft.SwitchCondition', $designer: { id: '5678', }, condition: 'dialog.x', default: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', $designer: { id: '5678', }, dialog: 'addtodo', }, { - $type: 'Microsoft.IfCondition', + $kind: 'Microsoft.IfCondition', $designer: { id: '5678', }, actions: [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', $designer: { id: '5678', }, @@ -83,7 +83,7 @@ describe('#copySwitchCondition', () => { value: '0', actions: [ { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', $designer: { id: '5678', }, @@ -95,7 +95,7 @@ describe('#copySwitchCondition', () => { value: '1', actions: [ { - $type: 'Microsoft.SwitchCondition', + $kind: 'Microsoft.SwitchCondition', $designer: { id: '5678', }, diff --git a/Composer/packages/lib/shared/__tests__/copyUtils/shallowCopyAdaptiveAction.test.ts b/Composer/packages/lib/shared/__tests__/copyUtils/shallowCopyAdaptiveAction.test.ts index bd01a1ddf3..766213f240 100644 --- a/Composer/packages/lib/shared/__tests__/copyUtils/shallowCopyAdaptiveAction.test.ts +++ b/Composer/packages/lib/shared/__tests__/copyUtils/shallowCopyAdaptiveAction.test.ts @@ -7,12 +7,12 @@ import { externalApiStub as externalApi } from '../jestMocks/externalApiStub'; describe('shallowCopyAdaptiveAction', () => { it('can copy BeginDialog', () => { const beginDialog = { - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', dialog: 'addtodo', }; expect(shallowCopyAdaptiveAction(beginDialog, externalApi)).toEqual({ - $type: 'Microsoft.BeginDialog', + $kind: 'Microsoft.BeginDialog', $designer: { id: '5678' }, dialog: 'addtodo', }); diff --git a/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveAction.test.ts b/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveAction.test.ts index f293d13356..64afc7b77f 100644 --- a/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveAction.test.ts +++ b/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveAction.test.ts @@ -6,7 +6,7 @@ import { walkAdaptiveAction } from '../../src/deleteUtils/walkAdaptiveAction'; describe('walkAdaptiveAction', () => { it('can walk single action', () => { const action = { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', activity: 'hello', }; const spy = jest.fn(); diff --git a/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveActionList.test.ts b/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveActionList.test.ts index 6852722d4d..2a35c48abe 100644 --- a/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveActionList.test.ts +++ b/Composer/packages/lib/shared/__tests__/deleteUtils/walkAdaptiveActionList.test.ts @@ -7,11 +7,11 @@ describe('walkAdaptiveAction', () => { it('can walk action list', () => { const actions = [ { - $type: 'Microsoft.SendActivity', + $kind: 'Microsoft.SendActivity', prompt: 'hello', }, { - $type: 'Microsoft.ChoiceInput', + $kind: 'Microsoft.ChoiceInput', prompt: 'hello', }, ]; diff --git a/Composer/packages/lib/shared/src/copyUtils/CopyConstructorMap.ts b/Composer/packages/lib/shared/src/copyUtils/CopyConstructorMap.ts index a8b34fc420..e796e4a260 100644 --- a/Composer/packages/lib/shared/src/copyUtils/CopyConstructorMap.ts +++ b/Composer/packages/lib/shared/src/copyUtils/CopyConstructorMap.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SDKTypes } from '../types/schema'; +import { SDKKinds } from '../types/schema'; import { copySendActivity } from './copySendActivity'; import { copyInputDialog } from './copyInputDialog'; @@ -12,19 +12,19 @@ import { copyForeach } from './copyForeach'; import { copyEditActions } from './copyEditActions'; const CopyConstructorMap = { - [SDKTypes.SendActivity]: copySendActivity, - [SDKTypes.SkillDialog]: copySendActivity, - [SDKTypes.AttachmentInput]: copyInputDialog, - [SDKTypes.ChoiceInput]: copyInputDialog, - [SDKTypes.ConfirmInput]: copyInputDialog, - [SDKTypes.DateTimeInput]: copyInputDialog, - [SDKTypes.NumberInput]: copyInputDialog, - [SDKTypes.TextInput]: copyInputDialog, - [SDKTypes.IfCondition]: copyIfCondition, - [SDKTypes.SwitchCondition]: copySwitchCondition, - [SDKTypes.Foreach]: copyForeach, - [SDKTypes.ForeachPage]: copyForeach, - [SDKTypes.EditActions]: copyEditActions, + [SDKKinds.SendActivity]: copySendActivity, + [SDKKinds.SkillDialog]: copySendActivity, + [SDKKinds.AttachmentInput]: copyInputDialog, + [SDKKinds.ChoiceInput]: copyInputDialog, + [SDKKinds.ConfirmInput]: copyInputDialog, + [SDKKinds.DateTimeInput]: copyInputDialog, + [SDKKinds.NumberInput]: copyInputDialog, + [SDKKinds.TextInput]: copyInputDialog, + [SDKKinds.IfCondition]: copyIfCondition, + [SDKKinds.SwitchCondition]: copySwitchCondition, + [SDKKinds.Foreach]: copyForeach, + [SDKKinds.ForeachPage]: copyForeach, + [SDKKinds.EditActions]: copyEditActions, default: shallowCopyAdaptiveAction, }; diff --git a/Composer/packages/lib/shared/src/copyUtils/copyAdaptiveAction.ts b/Composer/packages/lib/shared/src/copyUtils/copyAdaptiveAction.ts index b2cd61a68d..c544d52d87 100644 --- a/Composer/packages/lib/shared/src/copyUtils/copyAdaptiveAction.ts +++ b/Composer/packages/lib/shared/src/copyUtils/copyAdaptiveAction.ts @@ -11,9 +11,9 @@ export async function copyAdaptiveAction(data: MicrosoftIDialog, externalApi: Ex return data; } - if (!data || !data.$type) return {}; + if (!data || !data.$kind) return {}; - const copier = CopyConstructorMap[data.$type] || CopyConstructorMap.default; + const copier = CopyConstructorMap[data.$kind] || CopyConstructorMap.default; return await copier(data, externalApi); } diff --git a/Composer/packages/lib/shared/src/deleteUtils/index.ts b/Composer/packages/lib/shared/src/deleteUtils/index.ts index 4dab42120c..b0f52c67ca 100644 --- a/Composer/packages/lib/shared/src/deleteUtils/index.ts +++ b/Composer/packages/lib/shared/src/deleteUtils/index.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License -import { MicrosoftIDialog, SDKTypes } from '../types'; +import { MicrosoftIDialog, SDKKinds } from '../types'; import { walkAdaptiveAction } from './walkAdaptiveAction'; import { walkAdaptiveActionList } from './walkAdaptiveActionList'; @@ -9,19 +9,19 @@ import { walkAdaptiveActionList } from './walkAdaptiveActionList'; // TODO: (ze) considering refactoring it with the `walkLgResources` util const collectLgTemplates = (action: any, outputTemplates: string[]) => { if (typeof action === 'string') return; - if (!action || !action.$type) return; + if (!action || !action.$kind) return; - switch (action.$type) { - case SDKTypes.SendActivity: - case SDKTypes.SkillDialog: + switch (action.$kind) { + case SDKKinds.SendActivity: + case SDKKinds.SkillDialog: outputTemplates.push(action.activity); break; - case SDKTypes.AttachmentInput: - case SDKTypes.ChoiceInput: - case SDKTypes.ConfirmInput: - case SDKTypes.DateTimeInput: - case SDKTypes.NumberInput: - case SDKTypes.TextInput: + case SDKKinds.AttachmentInput: + case SDKKinds.ChoiceInput: + case SDKKinds.ConfirmInput: + case SDKKinds.DateTimeInput: + case SDKKinds.NumberInput: + case SDKKinds.TextInput: outputTemplates.push(action.prompt, action.unrecognizedPrompt, action.invalidPrompt, action.defaultValueResponse); break; } @@ -30,16 +30,16 @@ const collectLgTemplates = (action: any, outputTemplates: string[]) => { // TODO: (ze) considering refactoring it by implementing a new `walkLuResources` util const collectLuIntents = (action: any, outputTemplates: string[]) => { if (typeof action === 'string') return; - if (!action || !action.$type) return; + if (!action || !action.$kind) return; - switch (action.$type) { - case SDKTypes.AttachmentInput: - case SDKTypes.ChoiceInput: - case SDKTypes.ConfirmInput: - case SDKTypes.DateTimeInput: - case SDKTypes.NumberInput: - case SDKTypes.TextInput: { - const [, promptType] = action.$type.split('.'); + switch (action.$kind) { + case SDKKinds.AttachmentInput: + case SDKKinds.ChoiceInput: + case SDKKinds.ConfirmInput: + case SDKKinds.DateTimeInput: + case SDKKinds.NumberInput: + case SDKKinds.TextInput: { + const [, promptType] = action.$kind.split('.'); const intentName = `${promptType}.response-${action?.$designer?.id}`; promptType && intentName && outputTemplates.push(intentName); break; diff --git a/Composer/packages/lib/shared/src/deleteUtils/walkAdaptiveAction.ts b/Composer/packages/lib/shared/src/deleteUtils/walkAdaptiveAction.ts index cd032f7fde..751830a569 100644 --- a/Composer/packages/lib/shared/src/deleteUtils/walkAdaptiveAction.ts +++ b/Composer/packages/lib/shared/src/deleteUtils/walkAdaptiveAction.ts @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License -import { MicrosoftIDialog, SDKTypes } from '../types'; +import { MicrosoftIDialog, SDKKinds } from '../types'; import { walkIfCondition } from './walkIfCondition'; import { walkSwitchCondition } from './walkSwitchCondition'; import { walkActionWithChildren } from './walkActionWithChildren'; import { AdaptiveActionVisitor } from './AdaptiveActionVisitor'; -const WalkerMap: { [$type: string]: (input, visitor: AdaptiveActionVisitor) => void } = { - [SDKTypes.IfCondition]: walkIfCondition, - [SDKTypes.SwitchCondition]: walkSwitchCondition, - [SDKTypes.Foreach]: walkActionWithChildren, - [SDKTypes.ForeachPage]: walkActionWithChildren, - [SDKTypes.EditActions]: walkActionWithChildren, +const WalkerMap: { [$kind: string]: (input, visitor: AdaptiveActionVisitor) => void } = { + [SDKKinds.IfCondition]: walkIfCondition, + [SDKKinds.SwitchCondition]: walkSwitchCondition, + [SDKKinds.Foreach]: walkActionWithChildren, + [SDKKinds.ForeachPage]: walkActionWithChildren, + [SDKKinds.EditActions]: walkActionWithChildren, }; export const walkAdaptiveAction = (input, visit: (action: MicrosoftIDialog) => void): void => { @@ -22,12 +22,12 @@ export const walkAdaptiveAction = (input, visit: (action: MicrosoftIDialog) => v return; } - if (!input || !input.$type) { + if (!input || !input.$kind) { return; } - if (WalkerMap[input.$type]) { - WalkerMap[input.$type](input, visit); + if (WalkerMap[input.$kind]) { + WalkerMap[input.$kind](input, visit); } else { visit(input); } diff --git a/Composer/packages/lib/shared/src/dialogFactory.ts b/Composer/packages/lib/shared/src/dialogFactory.ts index 4cede5fad4..473ab86675 100644 --- a/Composer/packages/lib/shared/src/dialogFactory.ts +++ b/Composer/packages/lib/shared/src/dialogFactory.ts @@ -8,7 +8,7 @@ import { DesignerData } from './types/sdk'; import { copyAdaptiveAction } from './copyUtils'; import { deleteAdaptiveAction, deleteAdaptiveActionList } from './deleteUtils'; import { MicrosoftIDialog } from './types'; -import { SDKTypes } from './types'; +import { SDKKinds } from './types'; import { ExternalResourceHandlerAsync } from './copyUtils/ExternalApi'; import { generateUniqueId } from './generateUniqueId'; @@ -36,30 +36,30 @@ export function getNewDesigner(name: string, description: string) { } const initialDialogShape = () => ({ - [SDKTypes.AdaptiveDialog]: { - $type: SDKTypes.AdaptiveDialog, + [SDKKinds.AdaptiveDialog]: { + $kind: SDKKinds.AdaptiveDialog, triggers: [ { - $type: SDKTypes.OnBeginDialog, + $kind: SDKKinds.OnBeginDialog, ...getNewDesigner('BeginDialog', ''), }, ], }, - [SDKTypes.OnConversationUpdateActivity]: { - $type: SDKTypes.OnConversationUpdateActivity, + [SDKKinds.OnConversationUpdateActivity]: { + $kind: SDKKinds.OnConversationUpdateActivity, actions: [ { - $type: SDKTypes.Foreach, + $kind: SDKKinds.Foreach, ...getNewDesigner('Loop: for each item', ''), itemsProperty: 'turn.Activity.membersAdded', actions: [ { - $type: SDKTypes.IfCondition, + $kind: SDKKinds.IfCondition, ...getNewDesigner('Branch: if/else', ''), condition: 'string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)', actions: [ { - $type: SDKTypes.SendActivity, + $kind: SDKKinds.SendActivity, ...getNewDesigner('Send a response', ''), activity: '', }, @@ -69,15 +69,15 @@ const initialDialogShape = () => ({ }, ], }, - [SDKTypes.SendActivity]: { + [SDKKinds.SendActivity]: { activity: '', }, - [SDKTypes.AttachmentInput]: initialInputDialog, - [SDKTypes.ChoiceInput]: initialInputDialog, - [SDKTypes.ConfirmInput]: initialInputDialog, - [SDKTypes.DateTimeInput]: initialInputDialog, - [SDKTypes.NumberInput]: initialInputDialog, - [SDKTypes.TextInput]: initialInputDialog, + [SDKKinds.AttachmentInput]: initialInputDialog, + [SDKKinds.ChoiceInput]: initialInputDialog, + [SDKKinds.ConfirmInput]: initialInputDialog, + [SDKKinds.DateTimeInput]: initialInputDialog, + [SDKKinds.NumberInput]: initialInputDialog, + [SDKKinds.TextInput]: initialInputDialog, }); export const getDesignerId = (data?: DesignerData) => { @@ -149,7 +149,7 @@ class DialogFactory { } public create( - $type: SDKTypes, + $kind: SDKKinds, overrides: { $designer?: Partial<DesignerAttributes>; [key: string]: any; @@ -160,19 +160,19 @@ class DialogFactory { } const { $designer, ...propertyOverrides } = overrides; - const defaultProperties = initialDialogShape()[$type] || {}; + const defaultProperties = initialDialogShape()[$kind] || {}; return merge( - { $type, $designer: merge({ id: generateUniqueId(6) }, $designer) }, - this.seedDefaults($type), + { $kind, $designer: merge({ id: generateUniqueId(6) }, $designer) }, + this.seedDefaults($kind), defaultProperties, propertyOverrides ); } - private seedDefaults($type: SDKTypes) { - if (!this.schema?.definitions?.[$type]) return {}; - const def = this.schema.definitions[$type]; + private seedDefaults($kind: SDKKinds) { + if (!this.schema?.definitions?.[$kind]) return {}; + const def = this.schema.definitions[$kind]; if (def && typeof def === 'object' && def.properties) { return assignDefaults(def.properties); diff --git a/Composer/packages/lib/shared/src/labelMap.ts b/Composer/packages/lib/shared/src/labelMap.ts index 6a8ddc9f99..4ccf1dc6e2 100644 --- a/Composer/packages/lib/shared/src/labelMap.ts +++ b/Composer/packages/lib/shared/src/labelMap.ts @@ -3,7 +3,7 @@ import formatMessage from 'format-message'; -import { SDKTypes } from './types'; +import { SDKKinds } from './types'; formatMessage.setup({ missingTranslation: 'ignore', @@ -15,7 +15,7 @@ interface LabelOverride { description?: string | false; } -type ConceptLabelKey = SDKTypes | 'Activity'; +type ConceptLabelKey = SDKKinds | 'Activity'; /** * These labels will be used when rendering the EdgeMenu @@ -28,220 +28,220 @@ export const ConceptLabels: { [key in ConceptLabelKey]?: LabelOverride } = { ), title: formatMessage('Language Generation'), }, - [SDKTypes.AdaptiveDialog]: { + [SDKKinds.AdaptiveDialog]: { title: formatMessage('Adaptive dialog'), }, - [SDKTypes.AttachmentInput]: { + [SDKKinds.AttachmentInput]: { title: formatMessage('File or attachment'), }, - [SDKTypes.BeginDialog]: { + [SDKKinds.BeginDialog]: { title: formatMessage('Begin a new dialog'), }, - [SDKTypes.CancelAllDialogs]: { + [SDKKinds.CancelAllDialogs]: { title: formatMessage('Cancel all dialogs'), }, - [SDKTypes.ChoiceInput]: { + [SDKKinds.ChoiceInput]: { title: formatMessage('Multiple choice'), }, - [SDKTypes.ConditionalSelector]: { + [SDKKinds.ConditionalSelector]: { title: formatMessage('ConditionalSelector'), }, - [SDKTypes.ConfirmInput]: { + [SDKKinds.ConfirmInput]: { title: formatMessage('Confirmation'), }, - [SDKTypes.DateTimeInput]: { + [SDKKinds.DateTimeInput]: { title: formatMessage('Date or time'), }, - [SDKTypes.DebugBreak]: { + [SDKKinds.DebugBreak]: { title: formatMessage('Debug Break'), }, - [SDKTypes.DeleteProperty]: { + [SDKKinds.DeleteProperty]: { title: formatMessage('Delete a property'), }, - [SDKTypes.DeleteProperties]: { + [SDKKinds.DeleteProperties]: { title: formatMessage('Delete properties'), }, - [SDKTypes.EditActions]: { + [SDKKinds.EditActions]: { title: formatMessage('Modify this dialog'), }, - [SDKTypes.EditArray]: { + [SDKKinds.EditArray]: { title: formatMessage('Edit an Array property'), }, - [SDKTypes.EmitEvent]: { + [SDKKinds.EmitEvent]: { title: formatMessage('Emit a custom event'), }, - [SDKTypes.EndDialog]: { + [SDKKinds.EndDialog]: { title: formatMessage('End this dialog'), }, - [SDKTypes.EndTurn]: { + [SDKKinds.EndTurn]: { title: formatMessage('End dialog turn'), }, - [SDKTypes.FirstSelector]: { + [SDKKinds.FirstSelector]: { title: formatMessage('FirstSelector'), }, - [SDKTypes.Foreach]: { + [SDKKinds.Foreach]: { title: formatMessage('Loop: for each item'), }, - [SDKTypes.ForeachPage]: { + [SDKKinds.ForeachPage]: { title: formatMessage('Loop: for each page (multiple items)'), }, - [SDKTypes.HttpRequest]: { + [SDKKinds.HttpRequest]: { title: formatMessage('Send an HTTP request'), }, - [SDKTypes.IfCondition]: { + [SDKKinds.IfCondition]: { title: formatMessage('Branch: if/else'), }, - [SDKTypes.LanguagePolicy]: { + [SDKKinds.LanguagePolicy]: { title: formatMessage('LanguagePolicy'), }, - [SDKTypes.LogAction]: { + [SDKKinds.LogAction]: { title: formatMessage('Log to console'), }, - [SDKTypes.LuisRecognizer]: { + [SDKKinds.LuisRecognizer]: { description: formatMessage( "To understand what the user says, your dialog needs a 'Recognizer', that includes example words and sentences that users may use." ), title: formatMessage('Language Understanding'), }, - [SDKTypes.MostSpecificSelector]: { + [SDKKinds.MostSpecificSelector]: { title: formatMessage('MostSpecificSelector'), }, - [SDKTypes.MultiLanguageRecognizer]: { + [SDKKinds.MultiLanguageRecognizer]: { description: formatMessage( "To understand what the user says, your dialog needs a 'Recognizer', that includes example words and sentences that users may use." ), title: formatMessage('Language Understanding'), }, - [SDKTypes.NumberInput]: { + [SDKKinds.NumberInput]: { title: formatMessage('Number input'), }, - [SDKTypes.OAuthInput]: { + [SDKKinds.OAuthInput]: { title: formatMessage('OAuth login'), }, - [SDKTypes.OnActivity]: { + [SDKKinds.OnActivity]: { title: formatMessage('Activities'), subtitle: formatMessage('Activity recieved'), }, - [SDKTypes.OnBeginDialog]: { + [SDKKinds.OnBeginDialog]: { title: formatMessage('Dialog started'), subtitle: formatMessage('Begin dialog event'), }, - [SDKTypes.OnCancelDialog]: { + [SDKKinds.OnCancelDialog]: { title: formatMessage('Dialog cancelled'), subtitle: formatMessage('Cancel dialog event'), }, - [SDKTypes.OnCondition]: { + [SDKKinds.OnCondition]: { title: formatMessage('Handle a Condition'), }, - [SDKTypes.OnConversationUpdateActivity]: { + [SDKKinds.OnConversationUpdateActivity]: { title: formatMessage('Greeting'), subtitle: formatMessage('ConversationUpdate activity'), description: 'Handle the events fired when a user begins a new conversation with the bot. <a href="https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-conversations?view=azure-bot-service-4.0#conversation-lifetime" target="_blank">Learn more</a>', }, - [SDKTypes.OnCustomEvent]: { + [SDKKinds.OnCustomEvent]: { title: formatMessage('Custom event'), subtitle: formatMessage('Custom event'), }, - [SDKTypes.OnDialogEvent]: { + [SDKKinds.OnDialogEvent]: { title: formatMessage('Dialog events'), subtitle: formatMessage('Dialog events'), }, - [SDKTypes.OnEndOfConversationActivity]: { + [SDKKinds.OnEndOfConversationActivity]: { title: formatMessage('Conversation ended'), subtitle: formatMessage('EndOfConversation activity'), }, - [SDKTypes.OnError]: { + [SDKKinds.OnError]: { title: formatMessage('Error occurred'), subtitle: formatMessage('Error event'), }, - [SDKTypes.OnEventActivity]: { + [SDKKinds.OnEventActivity]: { title: formatMessage('Event received'), subtitle: formatMessage('Event activity'), }, - [SDKTypes.OnHandoffActivity]: { + [SDKKinds.OnHandoffActivity]: { title: formatMessage('Handover to human'), subtitle: formatMessage('Handoff activity'), }, - [SDKTypes.OnIntent]: { + [SDKKinds.OnIntent]: { title: formatMessage('Intent recognized'), subtitle: formatMessage('Intent recognized'), }, - [SDKTypes.OnInvokeActivity]: { + [SDKKinds.OnInvokeActivity]: { title: formatMessage('Conversation invoked'), subtitle: formatMessage('Invoke activity'), }, - [SDKTypes.OnMessageEventActivity]: { + [SDKKinds.OnMessageEventActivity]: { title: formatMessage('Message events'), subtitle: formatMessage('Message activity'), }, - [SDKTypes.OnMessageActivity]: { + [SDKKinds.OnMessageActivity]: { title: formatMessage('Message received'), subtitle: formatMessage('Message recieved activity'), }, - [SDKTypes.OnMessageDeleteActivity]: { + [SDKKinds.OnMessageDeleteActivity]: { title: formatMessage('Message deleted'), subtitle: formatMessage('Message deleted activity'), }, - [SDKTypes.OnMessageReactionActivity]: { + [SDKKinds.OnMessageReactionActivity]: { title: formatMessage('Message reaction'), subtitle: formatMessage('Message reaction activity'), }, - [SDKTypes.OnMessageUpdateActivity]: { + [SDKKinds.OnMessageUpdateActivity]: { title: formatMessage('Message updated'), subtitle: formatMessage('Message updated activity'), }, - [SDKTypes.OnRepromptDialog]: { + [SDKKinds.OnRepromptDialog]: { title: formatMessage('Re-prompt for input'), subtitle: formatMessage('Reprompt dialog event'), }, - [SDKTypes.OnTypingActivity]: { + [SDKKinds.OnTypingActivity]: { title: formatMessage('User is typing'), subtitle: formatMessage('Typing activity'), }, - [SDKTypes.OnUnknownIntent]: { + [SDKKinds.OnUnknownIntent]: { title: formatMessage('Unknown intent'), subtitle: formatMessage('Unknown intent recognized'), }, - [SDKTypes.QnAMakerDialog]: { + [SDKKinds.QnAMakerDialog]: { title: formatMessage('Connect to QnA Knowledgebase'), }, - [SDKTypes.RandomSelector]: { + [SDKKinds.RandomSelector]: { title: formatMessage('RandomSelector'), }, - [SDKTypes.RegexRecognizer]: { + [SDKKinds.RegexRecognizer]: { description: false, title: false, }, - [SDKTypes.RepeatDialog]: { + [SDKKinds.RepeatDialog]: { title: formatMessage('Repeat this dialog'), }, - [SDKTypes.ReplaceDialog]: { + [SDKKinds.ReplaceDialog]: { title: formatMessage('Replace this dialog'), }, - [SDKTypes.SendActivity]: { + [SDKKinds.SendActivity]: { title: formatMessage('Send a response'), }, - [SDKTypes.SetProperty]: { + [SDKKinds.SetProperty]: { title: formatMessage('Set a property'), }, - [SDKTypes.SetProperties]: { + [SDKKinds.SetProperties]: { title: formatMessage('Set properties'), }, - [SDKTypes.SkillDialog]: { + [SDKKinds.SkillDialog]: { title: formatMessage('Begin a skill dialog'), description: formatMessage('Begin a remote skill dialog.'), }, - [SDKTypes.SwitchCondition]: { + [SDKKinds.SwitchCondition]: { title: formatMessage('Branch: switch (multiple options)'), }, - [SDKTypes.TextInput]: { + [SDKKinds.TextInput]: { title: formatMessage('Text input'), }, - [SDKTypes.TraceActivity]: { + [SDKKinds.TraceActivity]: { title: formatMessage('Emit a trace event'), }, - [SDKTypes.TrueSelector]: { + [SDKKinds.TrueSelector]: { title: formatMessage('TrueSelector'), }, }; diff --git a/Composer/packages/lib/shared/src/types/schema.ts b/Composer/packages/lib/shared/src/types/schema.ts index 940697515e..9825c9a5c1 100644 --- a/Composer/packages/lib/shared/src/types/schema.ts +++ b/Composer/packages/lib/shared/src/types/schema.ts @@ -8,7 +8,7 @@ import { JSONSchema6 } from 'json-schema'; // 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'; +// let uType = 'export enum SDKKinds {\n'; // uType += types.map(t => ` ${t.replace('Microsoft.', '')} = '${t}',`).join('\n'); // uType += '\n}'; // console.log(uType); @@ -18,7 +18,7 @@ import { JSONSchema6 } from 'json-schema'; * All references of the type should be accessed through this enum. * */ -export enum SDKTypes { +export enum SDKKinds { ActivityTemplate = 'Microsoft.ActivityTemplate', AdaptiveDialog = 'Microsoft.AdaptiveDialog', AgeEntityRecognizer = 'Microsoft.AgeEntityRecognizer', @@ -112,15 +112,6 @@ export enum SDKTypes { LanguagePolicy = 'Microsoft.LanguagePolicy', } -export enum SDKKinds { - IActivityTemplate = 'Microsoft.IActivityTemplate', - Recognizer = 'Microsoft.Recognizer', - ILanguageGenerator = 'Microsoft.ILanguageGenerator', - ITriggerSelector = 'Microsoft.ITriggerSelector', - IDialog = 'Microsoft.IDialog', - LanguagePolicy = 'Microsoft.LanguagePolicy', -} - export enum SDKRoles { expression = 'expression', // TODO @@ -131,7 +122,7 @@ export enum SDKRoles { export interface OBISchema extends JSONSchema6 { $schema?: string; $role?: string; - $type?: SDKTypes; + $kind?: SDKKinds; $copy?: string; $id?: string; $designer?: { diff --git a/Composer/packages/lib/shared/src/types/sdk.ts b/Composer/packages/lib/shared/src/types/sdk.ts index 71e33f0ee2..bd79db2d60 100644 --- a/Composer/packages/lib/shared/src/types/sdk.ts +++ b/Composer/packages/lib/shared/src/types/sdk.ts @@ -11,7 +11,7 @@ export interface DesignerData { export interface BaseSchema { /** Defines the valid properties for the component you are configuring (from a dialog .schema file) */ - $type: string; + $kind: string; /** Inline id for reuse of an inline definition */ $id?: string; /** Copy the definition by id from a .dialog file. */ @@ -177,7 +177,7 @@ export interface LuisRecognizer extends BaseSchema { } interface IntentPattern { - $type: 'Microsoft.IntentPattern'; + $kind: 'Microsoft.IntentPattern'; intent: string; pattern: string; } diff --git a/Composer/packages/lib/shared/src/types/shell.ts b/Composer/packages/lib/shared/src/types/shell.ts index 0a863cd4fe..79d75f44d5 100644 --- a/Composer/packages/lib/shared/src/types/shell.ts +++ b/Composer/packages/lib/shared/src/types/shell.ts @@ -22,7 +22,7 @@ export interface ShellData { currentDialog: DialogInfo; projectId: string; data: { - $type: string; + $kind: string; [key: string]: any; }; designerId: string; diff --git a/Composer/packages/lib/shared/src/viewUtils.ts b/Composer/packages/lib/shared/src/viewUtils.ts index 63da47db36..4165903adf 100644 --- a/Composer/packages/lib/shared/src/viewUtils.ts +++ b/Composer/packages/lib/shared/src/viewUtils.ts @@ -7,17 +7,17 @@ import { } from 'office-ui-fabric-react/lib/components/ContextualMenu/ContextualMenu.types'; import get from 'lodash/get'; -import { SDKTypes } from './types'; +import { SDKKinds } from './types'; import { ConceptLabels } from './labelMap'; import { DialogFactory } from './dialogFactory'; export const PROMPT_TYPES = [ - SDKTypes.AttachmentInput, - SDKTypes.ChoiceInput, - SDKTypes.ConfirmInput, - SDKTypes.DateTimeInput, - SDKTypes.NumberInput, - SDKTypes.TextInput, + SDKKinds.AttachmentInput, + SDKKinds.ChoiceInput, + SDKKinds.ConfirmInput, + SDKKinds.DateTimeInput, + SDKKinds.NumberInput, + SDKKinds.TextInput, ]; export enum DialogGroup { @@ -39,120 +39,120 @@ export enum DialogGroup { export interface DialogGroupItem { label: string; - types: SDKTypes[]; + types: SDKKinds[]; } export type DialogGroupsMap = { [key in DialogGroup]: DialogGroupItem }; export const dialogGroups: DialogGroupsMap = { [DialogGroup.RESPONSE]: { label: 'Send Messages', - types: [SDKTypes.SendActivity], + types: [SDKKinds.SendActivity], }, [DialogGroup.INPUT]: { label: 'Ask a question', types: [ - SDKTypes.TextInput, - SDKTypes.NumberInput, - SDKTypes.ConfirmInput, - SDKTypes.ChoiceInput, - SDKTypes.AttachmentInput, - SDKTypes.DateTimeInput, - SDKTypes.OAuthInput, + SDKKinds.TextInput, + SDKKinds.NumberInput, + SDKKinds.ConfirmInput, + SDKKinds.ChoiceInput, + SDKKinds.AttachmentInput, + SDKKinds.DateTimeInput, + SDKKinds.OAuthInput, ], }, [DialogGroup.BRANCHING]: { label: 'Create a condition', - types: [SDKTypes.IfCondition, SDKTypes.SwitchCondition, SDKTypes.Foreach, SDKTypes.ForeachPage], + types: [SDKKinds.IfCondition, SDKKinds.SwitchCondition, SDKKinds.Foreach, SDKKinds.ForeachPage], }, [DialogGroup.MEMORY]: { label: 'Manage properties', types: [ - SDKTypes.SetProperty, - SDKTypes.SetProperties, - SDKTypes.DeleteProperty, - SDKTypes.DeleteProperties, - SDKTypes.EditArray, + SDKKinds.SetProperty, + SDKKinds.SetProperties, + SDKKinds.DeleteProperty, + SDKKinds.DeleteProperties, + SDKKinds.EditArray, ], }, [DialogGroup.STEP]: { label: 'Dialog management', types: [ - SDKTypes.BeginDialog, - SDKTypes.EndDialog, - SDKTypes.CancelAllDialogs, - SDKTypes.EndTurn, - SDKTypes.RepeatDialog, - SDKTypes.ReplaceDialog, + SDKKinds.BeginDialog, + SDKKinds.EndDialog, + SDKKinds.CancelAllDialogs, + SDKKinds.EndTurn, + SDKKinds.RepeatDialog, + SDKKinds.ReplaceDialog, ], }, [DialogGroup.CODE]: { label: 'Access external resources', types: [ - SDKTypes.SkillDialog, - SDKTypes.HttpRequest, - SDKTypes.EmitEvent, - SDKTypes.OAuthInput, - SDKTypes.QnAMakerDialog, - // SDKTypes.CodeStep + SDKKinds.SkillDialog, + SDKKinds.HttpRequest, + SDKKinds.EmitEvent, + SDKKinds.OAuthInput, + SDKKinds.QnAMakerDialog, + // SDKKinds.CodeStep ], }, [DialogGroup.LOG]: { label: 'Debugging options', - types: [/* SDKTypes.DebugBreak, */ SDKTypes.LogAction, SDKTypes.TraceActivity], + types: [/* SDKKinds.DebugBreak, */ SDKKinds.LogAction, SDKKinds.TraceActivity], }, [DialogGroup.EVENTS]: { label: 'Events', types: [ - SDKTypes.OnIntent, - SDKTypes.OnUnknownIntent, - SDKTypes.OnDialogEvent, - SDKTypes.OnActivity, - SDKTypes.OnMessageEventActivity, - SDKTypes.OnCustomEvent, + SDKKinds.OnIntent, + SDKKinds.OnUnknownIntent, + SDKKinds.OnDialogEvent, + SDKKinds.OnActivity, + SDKKinds.OnMessageEventActivity, + SDKKinds.OnCustomEvent, ], }, [DialogGroup.DIALOG_EVENT_TYPES]: { label: 'OnDialogEvents Types', - types: [SDKTypes.OnBeginDialog, SDKTypes.OnCancelDialog, SDKTypes.OnError, SDKTypes.OnRepromptDialog], + types: [SDKKinds.OnBeginDialog, SDKKinds.OnCancelDialog, SDKKinds.OnError, SDKKinds.OnRepromptDialog], }, [DialogGroup.ADVANCED_EVENTS]: { label: 'Advanced Events', types: [ - SDKTypes.OnActivity, - SDKTypes.OnConversationUpdateActivity, - SDKTypes.OnEndOfConversationActivity, - SDKTypes.OnEventActivity, - SDKTypes.OnHandoffActivity, - SDKTypes.OnInvokeActivity, - SDKTypes.OnTypingActivity, + SDKKinds.OnActivity, + SDKKinds.OnConversationUpdateActivity, + SDKKinds.OnEndOfConversationActivity, + SDKKinds.OnEventActivity, + SDKKinds.OnHandoffActivity, + SDKKinds.OnInvokeActivity, + SDKKinds.OnTypingActivity, ], }, [DialogGroup.MESSAGE_EVENTS]: { label: 'Message events', types: [ - SDKTypes.OnMessageActivity, - SDKTypes.OnMessageDeleteActivity, - SDKTypes.OnMessageReactionActivity, - SDKTypes.OnMessageUpdateActivity, + SDKKinds.OnMessageActivity, + SDKKinds.OnMessageDeleteActivity, + SDKKinds.OnMessageReactionActivity, + SDKKinds.OnMessageUpdateActivity, ], }, [DialogGroup.RECOGNIZER]: { label: 'Recognizers', - types: [SDKTypes.LuisRecognizer, /* SDKTypes.MultiLanguageRecognizers, */ SDKTypes.RegexRecognizer], + types: [SDKKinds.LuisRecognizer, /* SDKKinds.MultiLanguageRecognizers, */ SDKKinds.RegexRecognizer], }, [DialogGroup.SELECTOR]: { label: 'Selectors', types: [ - SDKTypes.ConditionalSelector, - SDKTypes.FirstSelector, - SDKTypes.MostSpecificSelector, - SDKTypes.RandomSelector, - SDKTypes.TrueSelector, + SDKKinds.ConditionalSelector, + SDKKinds.FirstSelector, + SDKKinds.MostSpecificSelector, + SDKKinds.RandomSelector, + SDKKinds.TrueSelector, ], }, [DialogGroup.OTHER]: { label: 'Other', - types: [SDKTypes.AdaptiveDialog, SDKTypes.LanguagePolicy, SDKTypes.QnAMakerDialog], + types: [SDKKinds.AdaptiveDialog, SDKKinds.LanguagePolicy, SDKKinds.QnAMakerDialog], }, }; @@ -168,11 +168,11 @@ const menuItemHandler = ( ) => { if (item) { const name = - ConceptLabels[item.$type] && ConceptLabels[item.$type].title ? ConceptLabels[item.$type].title : item.$type; + ConceptLabels[item.$kind] && ConceptLabels[item.$kind].title ? ConceptLabels[item.$kind].title : item.$kind; item = { ...item, data: { - ...factory.create(item.$type, { + ...factory.create(item.$kind, { $designer: { name }, }), }, @@ -189,7 +189,7 @@ export const createStepMenu = ( item: IContextualMenuItem ) => void, factory: DialogFactory, - filter?: (x: SDKTypes) => boolean + filter?: (x: SDKKinds) => boolean ): IContextualMenuItem[] => { if (subMenu) { const stepMenuItems = stepLabels.map(x => { @@ -199,18 +199,18 @@ export const createStepMenu = ( return { key: item.types[0], name: conceptLabel && conceptLabel.title ? conceptLabel.title : item.types[0], - $type: item.types[0], + $kind: item.types[0], onClick: menuItemHandler(factory, handleType), }; } const subMenu: IContextualMenuProps = { - items: item.types.filter(filter || (() => true)).map($type => { - const conceptLabel = ConceptLabels[$type]; + items: item.types.filter(filter || (() => true)).map($kind => { + const conceptLabel = ConceptLabels[$kind]; return { - key: $type, - name: conceptLabel && conceptLabel.title ? conceptLabel.title : $type, - $type: $type, + key: $kind, + name: conceptLabel && conceptLabel.title ? conceptLabel.title : $kind, + $kind: $kind, }; }), onItemClick: menuItemHandler(factory, handleType), @@ -234,12 +234,12 @@ export const createStepMenu = ( key: item, text: name, name: name, - $type: item, + $kind: item, ...factory.create(item, { $designer: { name }, }), data: { - $type: item, + $kind: item, ...factory.create(item, { $designer: { name }, }), @@ -284,21 +284,21 @@ export function getDialogGroupByType(type) { return dialogType; } -const truncateSDKType = $type => (typeof $type === 'string' ? $type.split('Microsoft.')[1] : ''); +const truncateSDKType = $kind => (typeof $kind === 'string' ? $kind.split('Microsoft.')[1] : ''); /** - * Title priority: $designer.name > title from sdk schema > customize title > $type suffix + * Title priority: $designer.name > title from sdk schema > customize title > $kind suffix * @param customizedTitile customized title */ export function generateSDKTitle(data, customizedTitle?: string) { - const $type = get(data, '$type'); + const $kind = get(data, '$kind'); const titleFrom$designer = get(data, '$designer.name'); - const titleFromShared = get(ConceptLabels, [$type, 'title']); - const titleFrom$type = truncateSDKType($type); - return titleFrom$designer || customizedTitle || titleFromShared || titleFrom$type; + const titleFromShared = get(ConceptLabels, [$kind, 'title']); + const titleFrom$kind = truncateSDKType($kind); + return titleFrom$designer || customizedTitle || titleFromShared || titleFrom$kind; } -export function getInputType($type: string): string { - if (!$type) return ''; - return $type.replace(/Microsoft.(.*)Input/, '$1'); +export function getInputType($kind: string): string { + if (!$kind) return ''; + return $kind.replace(/Microsoft.(.*)Input/, '$1'); } diff --git a/Composer/packages/lib/shared/src/walkerUtils/walkLgResources.ts b/Composer/packages/lib/shared/src/walkerUtils/walkLgResources.ts index 5f459a0e99..a36a082b5a 100644 --- a/Composer/packages/lib/shared/src/walkerUtils/walkLgResources.ts +++ b/Composer/packages/lib/shared/src/walkerUtils/walkLgResources.ts @@ -5,29 +5,29 @@ import get from 'lodash/get'; import { ExternalResourceHandler } from '../copyUtils/ExternalApi'; import { walkAdaptiveAction } from '../deleteUtils/walkAdaptiveAction'; import { walkAdaptiveActionList } from '../deleteUtils/walkAdaptiveActionList'; -import { SDKTypes } from '../types'; +import { SDKKinds } from '../types'; type LgFieldHandler = ExternalResourceHandler<string>; const findLgFields = (action: any, handleLgField: LgFieldHandler) => { if (typeof action === 'string') return; - if (!action || !action.$type) return; + if (!action || !action.$kind) return; const onFound = (fieldName: string) => { action[fieldName] && handleLgField(get(action, '$designer.id'), action, fieldName, action[fieldName]); }; - switch (action.$type) { - case SDKTypes.SendActivity: - case SDKTypes.SkillDialog: + switch (action.$kind) { + case SDKKinds.SendActivity: + case SDKKinds.SkillDialog: onFound('activity'); break; - case SDKTypes.AttachmentInput: - case SDKTypes.ChoiceInput: - case SDKTypes.ConfirmInput: - case SDKTypes.DateTimeInput: - case SDKTypes.NumberInput: - case SDKTypes.TextInput: + case SDKKinds.AttachmentInput: + case SDKKinds.ChoiceInput: + case SDKKinds.ConfirmInput: + case SDKKinds.DateTimeInput: + case SDKKinds.NumberInput: + case SDKKinds.TextInput: onFound('prompt'); onFound('unrecognizedPrompt'); onFound('invalidPrompt'); diff --git a/Composer/packages/server/__tests__/mocks/asset/projects/SampleBot/bot1.dialog b/Composer/packages/server/__tests__/mocks/asset/projects/SampleBot/bot1.dialog index 6acb978bd2..1c7084afda 100644 --- a/Composer/packages/server/__tests__/mocks/asset/projects/SampleBot/bot1.dialog +++ b/Composer/packages/server/__tests__/mocks/asset/projects/SampleBot/bot1.dialog @@ -2,39 +2,39 @@ "old": "value", "steps": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "prompt": "${hello()} I'm a ToDo bot" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${bye()} See you again" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${bye()} bye bye again" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${ShowImage(dialog.attachments[0].contentUrl, dialog.attachments[0].contentType)}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "You entered: ${user.date[0].value}" }, { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "activity": "${bye3()} See you again" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "intent": "ShowIntent", "steps": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "a" } ] } ], "generator": "bot1.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/__tests__/mocks/samplebots/bot1/bot1.dialog b/Composer/packages/server/__tests__/mocks/samplebots/bot1/bot1.dialog index 6acb978bd2..1c7084afda 100644 --- a/Composer/packages/server/__tests__/mocks/samplebots/bot1/bot1.dialog +++ b/Composer/packages/server/__tests__/mocks/samplebots/bot1/bot1.dialog @@ -2,39 +2,39 @@ "old": "value", "steps": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "prompt": "${hello()} I'm a ToDo bot" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${bye()} See you again" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${bye()} bye bye again" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${ShowImage(dialog.attachments[0].contentUrl, dialog.attachments[0].contentType)}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "You entered: ${user.date[0].value}" }, { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "activity": "${bye3()} See you again" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "intent": "ShowIntent", "steps": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "a" } ] } ], "generator": "bot1.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/__tests__/models/bot/botProject.test.ts b/Composer/packages/server/__tests__/models/bot/botProject.test.ts index 99bb38b27c..f36a88b605 100644 --- a/Composer/packages/server/__tests__/models/bot/botProject.test.ts +++ b/Composer/packages/server/__tests__/models/bot/botProject.test.ts @@ -4,7 +4,7 @@ import fs from 'fs'; import rimraf from 'rimraf'; -import { DialogFactory, DialogInfo, SDKTypes } from '@bfc/shared'; +import { DialogFactory, DialogInfo, SDKKinds } from '@bfc/shared'; import { Path } from '../../../src/utility/path'; import { BotProject } from '../../../src/models/bot/botProject'; @@ -66,7 +66,7 @@ describe('updateDialog', () => { describe('createFromTemplate', () => { const dialogName = 'mytestdialog'; - const content = JSON.stringify(new DialogFactory({}).create(SDKTypes.AdaptiveDialog), null, 2) + '\n'; + const content = JSON.stringify(new DialogFactory({}).create(SDKKinds.AdaptiveDialog), null, 2) + '\n'; afterEach(() => { try { @@ -82,7 +82,7 @@ describe('createFromTemplate', () => { expect(newFile).not.toBeUndefined(); const fileContent = ((newFile as unknown) as DialogInfo).content; - expect(fileContent.$type).toEqual(SDKTypes.AdaptiveDialog); + expect(fileContent.$kind).toEqual(SDKKinds.AdaptiveDialog); }); }); diff --git a/Composer/packages/server/assets/projects/ActionsSample/actionssample.dialog b/Composer/packages/server/assets/projects/ActionsSample/actionssample.dialog index 93d5dfc413..f3576eaa45 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/actionssample.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/actionssample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "892616", "name": "Actions" @@ -7,7 +7,7 @@ "autoEndDialog": false, "defaultResultProperty": "dialog.result", "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { "intent": "Actions", @@ -69,13 +69,13 @@ }, "triggers": [ { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "764307" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "actions", "$designer": { "id": "124654" @@ -85,168 +85,168 @@ "intent": "Actions" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "691722" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "endturn" } ], "intent": "EndTurn" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "343907" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "ifcondition" } ], "intent": "IfCondition" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "608729" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "enddialog" } ], "intent": "EndDialog" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "818726" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "editarray" } ], "intent": "EditArray" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "894760" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "httprequest" } ], "intent": "HttpRequest" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "273555" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "switchcondition" } ], "intent": "SwitchCondition" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "277723" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "repeatdialog" } ], "intent": "RepeatDialog" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "226996" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "traceandlog" } ], "intent": "TraceAndLog" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "602168" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "editactions" } ], "intent": "EditActions" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "413376" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "replacedialog" } ], "intent": "ReplaceDialog" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "173056" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "emitevent" } ], "intent": "EmitEvent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "242117" }, "actions": [ { - "$type": "Microsoft.EndDialog" + "$kind": "Microsoft.EndDialog" } ], "intent": "CancelIntent" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "560915" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "640616" }, @@ -255,14 +255,14 @@ ] }, { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "name": "Greeting (ConversationUpdate)", "id": "954390" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -270,7 +270,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -278,7 +278,7 @@ "condition": "=string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "640617", "name": "Send a response" @@ -294,4 +294,4 @@ ], "generator": "actionssample.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/actions/actions.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/actions/actions.dialog index 2d8a18a824..89be998d4c 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/actions/actions.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/actions/actions.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "126960" }, @@ -8,34 +8,34 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "218388" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "522200" }, "activity": "${bfdactivity-522200()}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "350559" }, "activity": "${bfdactivity-350559()}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "309397" }, "activity": "${bfdactivity-309397()}" }, { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "id": "026341" }, @@ -43,28 +43,28 @@ "value": "18" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "797905" }, "activity": "${bfdactivity-797905()}" }, { - "$type": "Microsoft.DeleteProperty", + "$kind": "Microsoft.DeleteProperty", "$designer": { "id": "948500" }, "property": "user.age" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "634904" }, "condition": "user.age != null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "166131" }, @@ -73,7 +73,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "643043" }, @@ -84,4 +84,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog index 367b57b696..18a301bd72 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "519891" }, @@ -7,20 +7,20 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "250234" }, "actions": [ { - "$type": "Microsoft.EditActions", + "$kind": "Microsoft.EditActions", "$designer": { "id": "250235" }, "changeType": "insertActions", "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "prompt": "Hello, I'm Zoidberg. What is your name?", "property": "user.name", "alwaysPrompt": "true" @@ -28,20 +28,20 @@ ] }, { - "$type": "Microsoft.EditActions", + "$kind": "Microsoft.EditActions", "$designer": { "id": "443878" }, "changeType": "appendActions", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "Goodbye!" } ] }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "644042" }, @@ -51,4 +51,4 @@ } ], "generator": "editactions.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog index 181bc01555..4b5bbc804d 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "395991" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "356862" }, "actions": [ { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "076427" }, @@ -22,7 +22,7 @@ "value": "=10000+1000+100+10+1" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "162360" }, @@ -31,7 +31,7 @@ "value": "=200*200" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "changeType": "Push", "itemsProperty": "user.ids", "value": "=888888/4", @@ -40,34 +40,34 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "666135" }, "activity": "${bfdactivity-666135()}" }, { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "995811" }, "itemsProperty": "user.ids", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${dialog.foreach.index}: ${dialog.foreach.value}" } ] }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "763672" }, "activity": "${bfdactivity-763672()}" }, { - "$type": "Microsoft.ForeachPage", + "$kind": "Microsoft.ForeachPage", "$designer": { "id": "087387" }, @@ -75,11 +75,11 @@ "itemsProperty": "user.ids", "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "itemsProperty": "dialog.foreach.page", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${dialog.foreach.index}: ${dialog.foreach.value}" } ], @@ -93,4 +93,4 @@ } ], "generator": "editarray.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog index f45106e01c..51137eb2f5 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "$designer": { "name": "EmitAnEvent", @@ -9,7 +9,7 @@ "autoEndDialog": false, "defaultResultProperty": "dialog.result", "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { "intent": "EmitEvent", @@ -23,34 +23,34 @@ }, "triggers": [ { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "intent": "EmitEvent", "actions": [ { - "$type": "Microsoft.EmitEvent", + "$kind": "Microsoft.EmitEvent", "eventName": "CustomEvent", "bubbleEvent": true } ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "intent": "CowboyIntent", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "Yippee ki-yay!" } ] }, { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "140685" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "576334", "name": "Send a response" @@ -61,4 +61,4 @@ } ], "generator": "emitanevent.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog index e12776b81c..67e9dd9b24 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "701087" }, @@ -7,10 +7,10 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnCustomEvent", + "$kind": "Microsoft.OnCustomEvent", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "CustomEvent Fired." } ], @@ -20,13 +20,13 @@ } }, { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "360314" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "293316" }, @@ -37,4 +37,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "emitevent.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog index 6e86b90ee5..69c41c8bda 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog @@ -1,11 +1,11 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "323744" }, "autoEndDialog": true, "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { "intent": "CancelIntent", @@ -15,38 +15,38 @@ }, "triggers": [ { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "241317" }, "actions": [ { - "$type": "Microsoft.CancelAllDialogs" + "$kind": "Microsoft.CancelAllDialogs" } ], "intent": "CancelIntent" }, { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "120822" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "150220" }, "activity": "${bfdactivity-150220()}" }, { - "$type": "Microsoft.EndTurn", + "$kind": "Microsoft.EndTurn", "$designer": { "id": "889445" } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "451180" }, @@ -57,4 +57,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "telljoke.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog index 73f6f287d3..6880f7c3fd 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog @@ -1,11 +1,11 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "727878" }, "autoEndDialog": false, "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { "intent": "JokeIntent", @@ -19,43 +19,43 @@ }, "triggers": [ { - "$type": "Microsoft.OnCustomEvent", + "$kind": "Microsoft.OnCustomEvent", "event": "cancelDialog", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "ok." }, { - "$type": "Microsoft.EndDialog" + "$kind": "Microsoft.EndDialog" } ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "intent": "JokeIntent", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "telljoke" } ] }, { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "917307" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "964165" }, "condition": "user.name == null", "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "543141" }, @@ -68,14 +68,14 @@ ] }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "604381" }, "activity": "${bfdactivity-604381()}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "338063" }, @@ -86,4 +86,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "enddialog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog index 6d79436af9..7c36b37519 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "570040" }, @@ -7,26 +7,26 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "064818" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "423305" }, "activity": "${bfdactivity-423305()}" }, { - "$type": "Microsoft.EndTurn", + "$kind": "Microsoft.EndTurn", "$designer": { "id": "280288" } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "448895" }, @@ -36,4 +36,4 @@ } ], "generator": "endturn.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog index 1c813f2a15..b596073011 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "351884" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "898827" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "738240" }, @@ -24,14 +24,14 @@ "allowInterruptions": "true" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "229784" }, "activity": "${bfdactivity-229784()}" }, { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "665408" }, @@ -42,7 +42,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.HttpRequest", + "$kind": "Microsoft.HttpRequest", "$designer": { "id": "845107" }, @@ -73,14 +73,14 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "200761" }, "activity": "${bfdactivity-200761()}" }, { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "797897" }, @@ -91,7 +91,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.HttpRequest", + "$kind": "Microsoft.HttpRequest", "$designer": { "id": "705959" }, @@ -100,7 +100,7 @@ "resultProperty": "user.getResponse" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "212615" }, @@ -110,4 +110,4 @@ } ], "generator": "httprequest.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog index 80f42f4706..3c01e1f2fc 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "708197" }, @@ -7,20 +7,20 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "475044" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "719500" }, "condition": "user.name == null", "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "719594" }, @@ -33,7 +33,7 @@ ] }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "485963" }, @@ -43,4 +43,4 @@ } ], "generator": "ifcondition.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog index b3d2d3b88d..40bd12ca34 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "$designer": { "name": "QnAMakerAction", @@ -10,13 +10,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog" }, "actions": [ { - "$type": "Microsoft.QnAMakerDialog", + "$kind": "Microsoft.QnAMakerDialog", "$designer": { "id": "878804", "name": "Connect to QnA Knowledgebase" diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog index 2c963ecbdd..facccb7bfe 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "869987" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "099628" }, "actions": [ { - "$type": "Microsoft.ConfirmInput", + "$kind": "Microsoft.ConfirmInput", "$designer": { "id": "841600" }, @@ -33,14 +33,14 @@ } }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "365292" }, "condition": "user.confirmed", "actions": [ { - "$type": "Microsoft.RepeatDialog", + "$kind": "Microsoft.RepeatDialog", "$designer": { "id": "221664" } @@ -48,7 +48,7 @@ ], "elseActions": [ { - "$type": "Microsoft.EndDialog", + "$kind": "Microsoft.EndDialog", "$designer": { "id": "573415" } @@ -59,4 +59,4 @@ } ], "generator": "repeatdialog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog index ff1e71c5b8..4d76e41ad3 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "682472" }, @@ -7,27 +7,27 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "777661" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "554030" }, "activity": "${bfdactivity-554030()}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "302405" }, "activity": "${bfdactivity-302405()}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "322106" }, @@ -37,4 +37,4 @@ } ], "generator": "fortunetellerdialog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog index a9612768d4..91b5166e64 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "873848" }, @@ -7,26 +7,26 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "513313" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "577618" }, "activity": "${bfdactivity-577618()}" }, { - "$type": "Microsoft.EndTurn", + "$kind": "Microsoft.EndTurn", "$designer": { "id": "735689" } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "286023" }, @@ -36,4 +36,4 @@ } ], "generator": "telljokedialog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog index 14f81e6181..2a4bed004f 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog @@ -1,11 +1,11 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "714288" }, "autoEndDialog": false, "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { "intent": "JokeIntent", @@ -19,46 +19,46 @@ }, "triggers": [ { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "563828" }, "actions": [ { - "$type": "Microsoft.ReplaceDialog", + "$kind": "Microsoft.ReplaceDialog", "dialog": "telljokedialog" } ], "intent": "JokeIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "473201" }, "actions": [ { - "$type": "Microsoft.ReplaceDialog", + "$kind": "Microsoft.ReplaceDialog", "dialog": "fortunetellerdialog" } ], "intent": "FortuneTellerIntent" }, { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "644475" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "646692" }, "condition": "user.name == null", "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "823146" }, @@ -71,7 +71,7 @@ ] }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "120128" }, @@ -82,4 +82,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "replacedialog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog index f5fe5d96d8..4b83f8da99 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "039096" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "851391" }, "actions": [ { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "property": "user.style", "prompt": "Please select a value from below:", "maxTurnCount": 3, @@ -48,14 +48,14 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "160914" }, "activity": "${bfdactivity-160914()}" }, { - "$type": "Microsoft.SwitchCondition", + "$kind": "Microsoft.SwitchCondition", "$designer": { "id": "448444" }, @@ -65,7 +65,7 @@ "value": "Test1", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "576002" }, @@ -77,7 +77,7 @@ "value": "Test2", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "677412" }, @@ -89,7 +89,7 @@ "value": "Test3", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "700082" }, @@ -103,4 +103,4 @@ } ], "generator": "switchcondition.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog b/Composer/packages/server/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog index 1c56075a3d..6b475e765e 100644 --- a/Composer/packages/server/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog +++ b/Composer/packages/server/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "714773", "description": "This is a bot that demonstrates use of the TraceActivity & LogAction concepts in Adaptive Dialogs." @@ -8,13 +8,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "044028" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "107670" }, @@ -25,7 +25,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.TraceActivity", + "$kind": "Microsoft.TraceActivity", "$designer": { "id": "774586" }, @@ -33,7 +33,7 @@ "valueType": "memory" }, { - "$type": "Microsoft.LogAction", + "$kind": "Microsoft.LogAction", "$designer": { "id": "219510" }, @@ -44,4 +44,4 @@ } ], "generator": "traceandlog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/askingquestionssample.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/askingquestionssample.dialog index 6e084c69d2..5c19a7e3c9 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/askingquestionssample.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/askingquestionssample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "400830", "description": "This is a bot that demonstrates the different options to collect input from a user using Adaptive Dialogs." @@ -7,7 +7,7 @@ "autoEndDialog": false, "defaultResultProperty": "dialog.result", "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { "intent": "TextInput", @@ -45,10 +45,10 @@ }, "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -56,7 +56,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -64,7 +64,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "${help()}" } ] @@ -74,104 +74,104 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "872701" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "textinput" } ], "intent": "TextInput" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "454567" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "numberinput" } ], "intent": "NumberInput" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "543817" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "datetimeinput" } ], "intent": "DateTimeInput" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "034901" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "confirminput" } ], "intent": "ConfirmInput" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "374825" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "choiceinput" } ], "intent": "ChoiceInput" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "832993" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "attachmentinput" } ], "intent": "AttachmentInput" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "268314" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "oauthinput" } ], "intent": "OAuthInput" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "566255" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "068558" }, @@ -181,13 +181,13 @@ "intent": "CancelIntent" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "487768" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "581197" }, @@ -198,4 +198,4 @@ ], "generator": "askingquestionssample.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog index 379066c23d..6150d3d3f5 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "042284" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "883342" }, "actions": [ { - "$type": "Microsoft.AttachmentInput", + "$kind": "Microsoft.AttachmentInput", "$designer": { "id": "452587" }, @@ -25,7 +25,7 @@ "outputFormat": "all" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "365176" }, @@ -35,4 +35,4 @@ } ], "generator": "attachmentinput.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog index 79c3cda8e1..a537261001 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "952602" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "865027" }, "actions": [ { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "673028", "name": "Prompt with multi-choice" @@ -50,7 +50,7 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "004212" }, @@ -60,4 +60,4 @@ } ], "generator": "choiceinput.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog index d93cf905d4..07e508a000 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog @@ -1,18 +1,18 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "556076" }, "autoEndDialog": true, "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "030235" }, "actions": [ { - "$type": "Microsoft.ConfirmInput", + "$kind": "Microsoft.ConfirmInput", "$designer": { "id": "647929" }, @@ -32,7 +32,7 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "458458" }, @@ -43,4 +43,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "confirminput.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog index 7afcec25b4..d99c73c3df 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "031360" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "309212" }, "actions": [ { - "$type": "Microsoft.DateTimeInput", + "$kind": "Microsoft.DateTimeInput", "$designer": { "id": "996821" }, @@ -26,7 +26,7 @@ "defaultLocale": "en-us" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "828009" }, @@ -36,4 +36,4 @@ } ], "generator": "datetimeinput.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog index 60040d0246..a895b13b73 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "183119" }, @@ -7,13 +7,13 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "272503" }, "actions": [ { - "$type": "Microsoft.NumberInput", + "$kind": "Microsoft.NumberInput", "$designer": { "id": "416094" }, @@ -26,14 +26,14 @@ "defaultLocale": "en-us" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "303304" }, "activity": "${bfdactivity-303304()}" }, { - "$type": "Microsoft.NumberInput", + "$kind": "Microsoft.NumberInput", "$designer": { "id": "890316" }, @@ -45,14 +45,14 @@ "defaultLocale": "en-us" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "622462" }, "condition": "(user.result - 4.4) < 0.0000001", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "284482" }, @@ -61,7 +61,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "172233" }, @@ -73,4 +73,4 @@ } ], "generator": "numberinput.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog index c98cf2d491..52a57e1eb7 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "295682" }, @@ -7,20 +7,20 @@ "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "823674" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "245482" }, "condition": "user.token == null", "actions": [ { - "$type": "Microsoft.OAuthInput", + "$kind": "Microsoft.OAuthInput", "$designer": { "id": "199270" }, @@ -32,7 +32,7 @@ ] }, { - "$type": "Microsoft.HttpRequest", + "$kind": "Microsoft.HttpRequest", "$designer": { "id": "518974" }, @@ -44,7 +44,7 @@ "resultProperty": "user.getGraphEmails" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "991558" }, @@ -54,4 +54,4 @@ } ], "generator": "oauthinput.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog index 121e8ef2bd..4bfb9f10e9 100644 --- a/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog +++ b/Composer/packages/server/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "359753" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "235447" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "077848" }, @@ -24,7 +24,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "538962" }, @@ -35,4 +35,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "textinput.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog index 97361fd735..78ef2432c0 100644 --- a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog +++ b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "864790", "description": "This is a bot that demonstrated the ability to control conversation flow using Adaptive Dialogs." @@ -7,7 +7,7 @@ "autoEndDialog": false, "defaultResultProperty": "dialog.result", "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "intents": [ { "intent": "IfCondition", @@ -41,118 +41,118 @@ }, "triggers": [ { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "139291" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "ifcondition" } ], "intent": "IfCondition" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "606805" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "switchcondition" } ], "intent": "SwitchCondition" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "175644" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "foreachstep" } ], "intent": "ForeachStep" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "973338" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "foreachpagestep" } ], "intent": "ForeachPageStep" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "329460" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "canceldialog" } ], "intent": "Cancel" }, { - "$type": "Microsoft.OnCancelDialog", + "$kind": "Microsoft.OnCancelDialog", "$designer": { "id": "132038" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "activity": "Canceled." }, { - "$type": "Microsoft.EndDialog" + "$kind": "Microsoft.EndDialog" } ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "043417" }, "actions": [ { - "$type": "Microsoft.EndTurn" + "$kind": "Microsoft.EndTurn" } ], "intent": "EndTurn" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "294228" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "repeatdialog" } ], "intent": "RepeatDialog" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "094908" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "953339" }, @@ -161,14 +161,14 @@ ] }, { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "name": "Greeting (ConversationUpdate)", "id": "791275" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -176,7 +176,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -184,7 +184,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "859266", "name": "Send a response" @@ -200,4 +200,4 @@ ], "generator": "controllingconversationflowsample.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog index 538034adb8..4c3cdca959 100644 --- a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog +++ b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "122121" }, @@ -7,17 +7,17 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "050101" }, "actions": [ { - "$type": "Microsoft.CancelAllDialogs" + "$kind": "Microsoft.CancelAllDialogs" } ] } ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "canceldialog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog index e687c4b443..11979ffc3a 100644 --- a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog +++ b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "847208" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "455902" }, "actions": [ { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "834603" }, @@ -22,7 +22,7 @@ "value": "=10000+1000+100+10+1" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "048190" }, @@ -31,7 +31,7 @@ "value": "=200*200" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "434590" }, @@ -40,14 +40,14 @@ "value": "=888888/4" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "623448" }, "activity": "${bfdactivity-623448()}" }, { - "$type": "Microsoft.ForeachPage", + "$kind": "Microsoft.ForeachPage", "$designer": { "id": "993283" }, @@ -55,11 +55,11 @@ "itemsProperty": "dialog.ids", "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "itemsProperty": "dialog.foreach.page", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "636747", "name": "Send a response" @@ -75,4 +75,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "foreachpagestep.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog index 178a40f92a..8880fc30e3 100644 --- a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog +++ b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "178401" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "614429" }, "actions": [ { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "077820" }, @@ -22,7 +22,7 @@ "value": "=10000+1000+100+10+1" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "453517" }, @@ -31,7 +31,7 @@ "value": "=200*200" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "889145" }, @@ -40,21 +40,21 @@ "value": "=888888/4" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "638869" }, "activity": "${bfdactivity-638869()}" }, { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "299926" }, "itemsProperty": "dialog.ids", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "006441", "name": "Send a response" @@ -68,4 +68,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "foreachstep.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog index cd71bcbbd2..e8089fc3ac 100644 --- a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog +++ b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "501534" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "057973" }, "actions": [ { - "$type": "Microsoft.NumberInput", + "$kind": "Microsoft.NumberInput", "$designer": { "id": "260985" }, @@ -25,14 +25,14 @@ "defaultLocale": "en-us" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "463418" }, "condition": "user.age >= 18", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "164444" }, @@ -41,7 +41,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "619321" }, @@ -54,4 +54,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "ifcondition.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog index d022e98c5f..8ef7f75636 100644 --- a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog +++ b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "607738" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "695225" }, "actions": [ { - "$type": "Microsoft.ConfirmInput", + "$kind": "Microsoft.ConfirmInput", "$designer": { "id": "841600" }, @@ -33,14 +33,14 @@ } }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "365292" }, "condition": "user.confirmed", "actions": [ { - "$type": "Microsoft.RepeatDialog", + "$kind": "Microsoft.RepeatDialog", "$designer": { "id": "221664" } @@ -48,7 +48,7 @@ ], "elseActions": [ { - "$type": "Microsoft.EndDialog", + "$kind": "Microsoft.EndDialog", "$designer": { "id": "573415" } @@ -60,4 +60,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "repeatdialog.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog index c2462fdaaa..0765ae272c 100644 --- a/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog +++ b/Composer/packages/server/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "122121" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "050101" }, "actions": [ { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "699003" }, @@ -49,14 +49,14 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "097130" }, "activity": "${bfdactivity-097130()}" }, { - "$type": "Microsoft.SwitchCondition", + "$kind": "Microsoft.SwitchCondition", "$designer": { "id": "088447" }, @@ -66,7 +66,7 @@ "value": "Susan", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "040464" }, @@ -78,7 +78,7 @@ "value": "Nick", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "230206" }, @@ -90,7 +90,7 @@ "value": "Tom", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "604251" }, @@ -105,4 +105,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "switchcondition.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/EchoBot/echobot.dialog b/Composer/packages/server/assets/projects/EchoBot/echobot.dialog index 831fef17b8..e9f2f98e0a 100644 --- a/Composer/packages/server/assets/projects/EchoBot/echobot.dialog +++ b/Composer/packages/server/assets/projects/EchoBot/echobot.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "433224", "description": "This bot accepts input from the user and echoes it back." @@ -8,13 +8,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "821845" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "003038" }, @@ -23,13 +23,13 @@ ] }, { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -37,7 +37,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -51,4 +51,4 @@ ], "generator": "echobot.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/EmptyBot/emptybot.dialog b/Composer/packages/server/assets/projects/EmptyBot/emptybot.dialog index 1bf3549ab6..99391f9f36 100644 --- a/Composer/packages/server/assets/projects/EmptyBot/emptybot.dialog +++ b/Composer/packages/server/assets/projects/EmptyBot/emptybot.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "description": "<Fill in the description of your bot here>" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -21,7 +21,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -35,4 +35,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "emptybot.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog b/Composer/packages/server/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog index f26fa893e5..0f8307d225 100644 --- a/Composer/packages/server/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog +++ b/Composer/packages/server/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "622543", "name": "GetProfile" @@ -8,14 +8,14 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "OnBeginDialog", "id": "151697" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "name": "Prompt for text", "id": "362298" @@ -35,7 +35,7 @@ "outputFormat": "=trim(this.value)" }, { - "$type": "Microsoft.NumberInput", + "$kind": "Microsoft.NumberInput", "$designer": { "name": "Prompt for a number", "id": "005947" @@ -56,7 +56,7 @@ "defaultLocale": "en-us" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "296924" @@ -66,14 +66,14 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "name": "Why", "id": "661298" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "name": "Branch: If/Else", "id": "567494" @@ -81,7 +81,7 @@ "condition": "exists(user.profile.name)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "907674" @@ -91,7 +91,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "558329" @@ -104,14 +104,14 @@ "intent": "Why" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "name": "NoValue", "id": "449648" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "name": "Branch: If/Else", "id": "015423" @@ -119,7 +119,7 @@ "condition": "exists(user.profile.name)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "074631" @@ -127,7 +127,7 @@ "activity": "${bfdactivity-074631()}" }, { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "name": "Set a Property", "id": "960926" @@ -138,7 +138,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "758791" @@ -146,7 +146,7 @@ "activity": "${bfdactivity-758791()}" }, { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "name": "Set a Property", "id": "142109" @@ -160,7 +160,7 @@ "intent": "NoValue" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "372804", "name": "GetProfileInputs" @@ -170,4 +170,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "getprofile.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/InterruptionSample/interruptionsample.dialog b/Composer/packages/server/assets/projects/InterruptionSample/interruptionsample.dialog index be0f401e57..86405cf0da 100644 --- a/Composer/packages/server/assets/projects/InterruptionSample/interruptionsample.dialog +++ b/Composer/packages/server/assets/projects/InterruptionSample/interruptionsample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "179150", "name": "Interrupt" @@ -10,14 +10,14 @@ "generator": "interruptionsample.lg", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720", "name": "Welcome user" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -25,7 +25,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -33,7 +33,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "753396", "name": "Send a response" @@ -47,7 +47,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "name": "GetStarted", "id": "629539" @@ -55,7 +55,7 @@ "condition": "turn.recognized.score > 0.7", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "name": "Begin a Dialog", "id": "190862" @@ -66,14 +66,14 @@ "intent": "GetStarted" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "name": "ResetProfile", "id": "921175" }, "actions": [ { - "$type": "Microsoft.EditActions", + "$kind": "Microsoft.EditActions", "$designer": { "name": "Modify active dialog", "id": "216094" @@ -81,7 +81,7 @@ "changeType": "ReplaceSequence", "actions": [ { - "$type": "Microsoft.DeleteProperty", + "$kind": "Microsoft.DeleteProperty", "$designer": { "name": "Delete a Property", "id": "924743" @@ -89,7 +89,7 @@ "property": "user.profile" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "032735" @@ -102,14 +102,14 @@ "intent": "ResetProfile" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "name": "Cancel", "id": "870441" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "650736" @@ -117,7 +117,7 @@ "activity": "${bfdactivity-650736()}" }, { - "$type": "Microsoft.CancelAllDialogs", + "$kind": "Microsoft.CancelAllDialogs", "$designer": { "name": "Cancel All Dialogs", "id": "362033" @@ -127,14 +127,14 @@ "intent": "Cancel" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "name": "ShowProfile", "id": "171791" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "031899" @@ -142,7 +142,7 @@ "activity": "${bfdactivity-031899()}" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "name": "Branch: If/Else", "id": "848138" @@ -150,7 +150,7 @@ "condition": "user.profile != null && (user.profile.name != null || user.profile.age != null)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "309274" @@ -160,7 +160,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "912837" @@ -173,14 +173,14 @@ "intent": "ShowProfile" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "name": "Help", "id": "160085" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "924700" @@ -192,4 +192,4 @@ } ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog b/Composer/packages/server/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog index 07fe5d03ae..83832fb7ca 100644 --- a/Composer/packages/server/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog +++ b/Composer/packages/server/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "name": "QnALUISBot" }, @@ -8,14 +8,14 @@ "recognizer": "qnamakerluissample.lu", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720", "name": "Welcome message" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -23,7 +23,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -31,7 +31,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "266608", "name": "Send a response" @@ -45,14 +45,14 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "242409" }, "condition": "#Help.Score >= 0.8", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "771838", "name": "Send a response" @@ -63,13 +63,13 @@ "intent": "Help" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "777383" }, "actions": [ { - "$type": "Microsoft.QnAMakerDialog", + "$kind": "Microsoft.QnAMakerDialog", "$designer": { "id": "284337", "name": "Connect to QnA Knowledgebase" @@ -86,14 +86,14 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "872754" }, "condition": "#BuySurface.Score >= 0.8", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "313066", "name": "Send a response" @@ -106,4 +106,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "qnamakerluissample.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog b/Composer/packages/server/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog index 269bf46984..528c760937 100644 --- a/Composer/packages/server/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "937757", "description": "This is a bot that demonstrates the ability to send different Cards to users." @@ -8,10 +8,10 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "actions": [ { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "359223" }, @@ -65,7 +65,7 @@ } }, { - "$type": "Microsoft.SwitchCondition", + "$kind": "Microsoft.SwitchCondition", "$designer": { "id": "304837" }, @@ -75,7 +75,7 @@ "value": "HeroCard", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "159442" @@ -88,7 +88,7 @@ "value": "HeroCardWithMemory", "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "735465", "name": "Text input" @@ -100,7 +100,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "167246", "name": "Send an Activity" @@ -113,7 +113,7 @@ "value": "ThumbnailCard", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "762914" @@ -126,7 +126,7 @@ "value": "SigninCard", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "241579" @@ -139,7 +139,7 @@ "value": "AnimationCard", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "901582" @@ -152,7 +152,7 @@ "value": "VideoCard", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "553859" @@ -165,7 +165,7 @@ "value": "AudioCard", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "190928" @@ -178,7 +178,7 @@ "value": "AdaptiveCard", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "806895" @@ -191,7 +191,7 @@ "value": "AllCards", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "name": "Send an Activity", "id": "997450" @@ -203,7 +203,7 @@ ] }, { - "$type": "Microsoft.RepeatDialog", + "$kind": "Microsoft.RepeatDialog", "$designer": { "id": "831626" } @@ -214,10 +214,10 @@ } }, { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -225,7 +225,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -233,7 +233,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "729500", "name": "Send a response" @@ -249,4 +249,4 @@ ], "generator": "respondingwithcardssample.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog index 8028c91135..4817201671 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "$designer": { "name": "IfElseCondition", @@ -9,13 +9,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog" }, "actions": [ { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "383595", "name": "Multiple choice" @@ -51,7 +51,7 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "749181", "name": "Send a response" @@ -62,4 +62,4 @@ } ], "generator": "ifelsecondition.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog index a3723b3ad1..248e0d8e53 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "662682" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "432892" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "823530" }, @@ -24,7 +24,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "823322" }, @@ -35,4 +35,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "lgcomposition.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog index 2aa98cb865..297768e263 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "519863" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "514780" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "085232" }, @@ -24,7 +24,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "176070" }, @@ -35,4 +35,4 @@ ], "generator": "lgwithparam.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog index 562573640b..44e28d1346 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "$designer": { "name": "MultiLineText", @@ -9,13 +9,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "458516", "name": "Send a response" @@ -26,4 +26,4 @@ } ], "generator": "multilinetext.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog index 1f1180e767..aac765ea0d 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "897725" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "265236" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "219943" }, @@ -24,4 +24,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "simpletext.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog index 81bba30c64..fada98cea2 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "$designer": { "name": "StructuredLG", @@ -9,13 +9,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "862531", "name": "Send a response" @@ -26,4 +26,4 @@ } ], "generator": "structuredlg.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog index 9f31ab9ae6..99e9ac901d 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "$designer": { "name": "SwitchCondition", @@ -9,13 +9,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "958316", "name": "Send a response" @@ -26,4 +26,4 @@ } ], "generator": "switchcondition.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog index 65b7ed7266..78ffa140ca 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "593555" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "822789" }, "actions": [ { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "id": "765039" }, @@ -21,7 +21,7 @@ "value": "This is a text saved in memory." }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "822060" }, @@ -32,4 +32,4 @@ ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema", "generator": "textwithmemory.lg" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog b/Composer/packages/server/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog index 97d7ab4c59..7e7449de86 100644 --- a/Composer/packages/server/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog +++ b/Composer/packages/server/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "937757" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "807187" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "551445" }, @@ -22,14 +22,14 @@ ] }, { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "name": "Greeting (ConversationUpdate)", "id": "452701" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -37,7 +37,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -45,7 +45,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "576166", "name": "Send a response" @@ -59,10 +59,10 @@ ] }, { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "actions": [ { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "289770" }, @@ -112,7 +112,7 @@ } }, { - "$type": "Microsoft.SwitchCondition", + "$kind": "Microsoft.SwitchCondition", "$designer": { "id": "981997" }, @@ -122,7 +122,7 @@ "value": "Simple Text", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "256544" }, @@ -134,7 +134,7 @@ "value": "Text With Memory", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "598449" }, @@ -146,7 +146,7 @@ "value": "LGWithParam", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "078497" }, @@ -158,7 +158,7 @@ "value": "LGComposition", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "349641" }, @@ -170,7 +170,7 @@ "value": "Structured LG", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "302012", "name": "Begin a new dialog" @@ -183,7 +183,7 @@ "value": "MultiLineText", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "053737", "name": "Begin a new dialog" @@ -196,7 +196,7 @@ "value": "IfElseCondition", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "542800", "name": "Begin a new dialog" @@ -209,7 +209,7 @@ "value": "SwitchCondition", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "469376", "name": "Begin a new dialog" @@ -221,7 +221,7 @@ ] }, { - "$type": "Microsoft.RepeatDialog", + "$kind": "Microsoft.RepeatDialog", "$designer": { "id": "938048" } @@ -231,4 +231,4 @@ ], "generator": "respondingwithtextsample.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/AddItem.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/AddItem.dialog index b3e3f277ca..6310cfb60f 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/AddItem.dialog +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/AddItem/AddItem.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "name": "AddItem", "id": "225905" @@ -8,14 +8,14 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog", "id": "479346" }, "actions": [ { - "$type": "Microsoft.SetProperties", + "$kind": "Microsoft.SetProperties", "$designer": { "id": "811190", "name": "Set properties" @@ -32,7 +32,7 @@ ] }, { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "282825", "name": "AskForTitle" @@ -44,7 +44,7 @@ "allowInterruptions": "!@itemTitle && #_Interruption.Score >= 0.9" }, { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "878594", "name": "AskForListType" @@ -89,7 +89,7 @@ } }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "733511", "name": "Edit an Array property" @@ -99,7 +99,7 @@ "value": "=$itemTitle" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "139532", "name": "Send a response" diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/DeleteItem.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/DeleteItem.dialog index 42e483b6c0..0cde124b24 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/DeleteItem.dialog +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/DeleteItem/DeleteItem.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "name": "DeleteItem", "id": "715675" @@ -8,14 +8,14 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog", "id": "479346" }, "actions": [ { - "$type": "Microsoft.SetProperties", + "$kind": "Microsoft.SetProperties", "$designer": { "id": "419199", "name": "Set properties" @@ -32,7 +32,7 @@ ] }, { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "461607", "name": "AskForListType" @@ -77,7 +77,7 @@ } }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "074106", "name": "Branch: if/else" @@ -85,7 +85,7 @@ "condition": "count(user.lists[dialog.listType]) == 0", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "555579", "name": "Send a response" @@ -93,7 +93,7 @@ "activity": "${bfdactivity-555579()}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "121384", "name": "Send a response" @@ -103,7 +103,7 @@ ], "elseActions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "803801", "name": "Branch: if/else" @@ -111,7 +111,7 @@ "condition": "$itemTitle == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "534454", "name": "Send a response" @@ -121,7 +121,7 @@ ] }, { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "702637", "name": "Multiple choice" @@ -147,7 +147,7 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "728630", "name": "Send a response" @@ -155,7 +155,7 @@ "activity": "${bfdactivity-728630()}" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "747071", "name": "Edit an Array property" @@ -165,7 +165,7 @@ "value": "=dialog.itemTitle" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "015149", "name": "Send a response" diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/Help.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/Help.dialog index da570b1187..cbad9bcbad 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/Help.dialog +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/Help/Help.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "name": "Help", "id": "429319" @@ -8,14 +8,14 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog", "id": "911430" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "641395", "name": "Send a response" diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/UserProfile.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/UserProfile.dialog index 7e5fb35dd8..1b491ed320 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/UserProfile.dialog +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/UserProfile/UserProfile.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "name": "UserProfile", "id": "732608" @@ -8,14 +8,14 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog", "id": "479346" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "267073", "name": "AskForName" @@ -28,7 +28,7 @@ "allowInterruptions": "!@userName && !@personName" }, { - "$type": "Microsoft.NumberInput", + "$kind": "Microsoft.NumberInput", "$designer": { "id": "826115", "name": "Number input" @@ -49,7 +49,7 @@ "defaultValueResponse": "${bfddefaultValueResponse-826115()}" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "744717", "name": "Send a response" @@ -59,14 +59,14 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "993953" }, "intent": "Cancel", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "210613", "name": "Send a response" @@ -74,7 +74,7 @@ "activity": "${bfdactivity-210613()}" }, { - "$type": "Microsoft.EndDialog", + "$kind": "Microsoft.EndDialog", "$designer": { "id": "632724", "name": "End this dialog" @@ -83,14 +83,14 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "660586" }, "intent": "Why", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "796427", "name": "Branch: if/else" @@ -98,7 +98,7 @@ "condition": "user.name == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "351007", "name": "Send a response" @@ -108,7 +108,7 @@ ], "elseActions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "090448", "name": "Branch: if/else" @@ -116,7 +116,7 @@ "condition": "user.age == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "977137", "name": "Send a response" @@ -128,7 +128,7 @@ ] }, { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "id": "957864", "name": "Set a property" @@ -139,14 +139,14 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "887328" }, "intent": "NoValue", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "914072", "name": "Branch: if/else" @@ -154,7 +154,7 @@ "condition": "user.name == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "304840", "name": "Send a response" @@ -162,7 +162,7 @@ "activity": "${bfdactivity-304840()}" }, { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "id": "023051", "name": "Set a property" @@ -173,7 +173,7 @@ ], "elseActions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "524800", "name": "Branch: if/else" @@ -181,7 +181,7 @@ "condition": "user.age == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "991655", "name": "Send a response" @@ -189,7 +189,7 @@ "activity": "${bfdactivity-991655()}" }, { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "id": "874049", "name": "Set a property" @@ -202,7 +202,7 @@ ] }, { - "$type": "Microsoft.SetProperty", + "$kind": "Microsoft.SetProperty", "$designer": { "id": "376791", "name": "Set a property" diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/ViewItem.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/ViewItem.dialog index 130ffa3504..b93d5c9252 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/ViewItem.dialog +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/dialogs/ViewItem/ViewItem.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "name": "ViewItem", "id": "944085" @@ -8,14 +8,14 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog", "id": "479346" }, "actions": [ { - "$type": "Microsoft.ChoiceInput", + "$kind": "Microsoft.ChoiceInput", "$designer": { "id": "308464", "name": "AskForListType" @@ -67,7 +67,7 @@ } }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "996807", "name": "Send a response" diff --git a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog index 6f6674c89d..368254c522 100644 --- a/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog +++ b/Composer/packages/server/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "$designer": { "name": "ToDoBotWithLuisSample-17", @@ -11,14 +11,14 @@ "recognizer": "todobotwithluissample.lu", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720", "name": "WelcomeUser" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -26,7 +26,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -34,7 +34,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "202664", "name": "Send a response" @@ -46,7 +46,7 @@ ] }, { - "$type": "Microsoft.SetProperties", + "$kind": "Microsoft.SetProperties", "$designer": { "id": "987914", "name": "Set properties" @@ -73,7 +73,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "263959" }, @@ -81,7 +81,7 @@ "condition": "#Add.Score > 0.8", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "361215", "name": "Begin a new dialog" @@ -92,7 +92,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "100671" }, @@ -100,7 +100,7 @@ "condition": "#Delete.Score > 0.8", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "901183", "name": "Begin a new dialog" @@ -111,7 +111,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "660567" }, @@ -119,7 +119,7 @@ "condition": "#View.Score > 0.8", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "994400", "name": "Begin a new dialog" @@ -130,7 +130,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "802923" }, @@ -138,7 +138,7 @@ "condition": "#UserProfile.Score > 0.8", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "187925", "name": "Begin a new dialog" @@ -149,7 +149,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "732966" }, @@ -157,7 +157,7 @@ "condition": "#whatCanYouDo.Score > 0.8", "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "$designer": { "id": "623941", "name": "Begin a new dialog" @@ -168,7 +168,7 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "683937" }, @@ -176,7 +176,7 @@ "condition": "#cancel.Score > 0.8", "actions": [ { - "$type": "Microsoft.ConfirmInput", + "$kind": "Microsoft.ConfirmInput", "$designer": { "id": "107784", "name": "Confirmation" @@ -196,7 +196,7 @@ } }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "487483", "name": "Branch: if/else" @@ -204,7 +204,7 @@ "condition": "turn.cancelOutcome == true || turn.cancelOutcome == \"yes\"", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "140076", "name": "Send a response" @@ -212,7 +212,7 @@ "activity": "${bfdactivity-140076()}" }, { - "$type": "Microsoft.CancelAllDialogs", + "$kind": "Microsoft.CancelAllDialogs", "$designer": { "id": "803782", "name": "Cancel all dialogs" @@ -221,7 +221,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "272233", "name": "Send a response" @@ -233,13 +233,13 @@ ] }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "303881" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "037398", "name": "Send a response" diff --git a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/addtodo/addtodo.dialog b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/addtodo/addtodo.dialog index eefa69a225..59afc45a64 100644 --- a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/addtodo/addtodo.dialog +++ b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/addtodo/addtodo.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "808722" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "335456" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "298897" }, @@ -25,7 +25,7 @@ "allowInterruptions": "true" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "567087" }, @@ -34,7 +34,7 @@ "value": "=dialog.todo" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "116673" }, @@ -45,4 +45,4 @@ ], "generator": "addtodo.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/cleartodos/cleartodos.dialog b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/cleartodos/cleartodos.dialog index ef59812c0b..e342a1cd3d 100644 --- a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/cleartodos/cleartodos.dialog +++ b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/cleartodos/cleartodos.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "316336" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "480162" }, "actions": [ { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "832300" }, @@ -22,14 +22,14 @@ "resultProperty": "dialog.cleared" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "983700" }, "condition": "dialog.cleared", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "832307" }, @@ -38,7 +38,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "983761" }, @@ -51,4 +51,4 @@ ], "generator": "cleartodos.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/deletetodo/deletetodo.dialog b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/deletetodo/deletetodo.dialog index f6d1646737..079d42e22f 100644 --- a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/deletetodo/deletetodo.dialog +++ b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/deletetodo/deletetodo.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "114909" }, @@ -7,13 +7,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "768658" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "870620" }, @@ -25,7 +25,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "492096" }, @@ -35,14 +35,14 @@ "value": "=dialog.todo" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "549615" }, "condition": "dialog.removed", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "725469" }, @@ -51,7 +51,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "549610" }, @@ -64,4 +64,4 @@ ], "generator": "deletetodo.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/showtodos/showtodos.dialog b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/showtodos/showtodos.dialog index cd07789209..365ba19e59 100644 --- a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/showtodos/showtodos.dialog +++ b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/dialogs/showtodos/showtodos.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "709692" }, @@ -7,20 +7,20 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "783343" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "662084" }, "condition": "user.todos == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "339580", "name": "Send an Activity" @@ -30,7 +30,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "662004", "name": "Send an Activity" @@ -44,4 +44,4 @@ ], "generator": "showtodos.lg", "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/todorecognizersetsample.dialog b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/todorecognizersetsample.dialog index 88b2e0f42b..2ac494251f 100644 --- a/Composer/packages/server/assets/projects/TodoRecognizerSetSample/todorecognizersetsample.dialog +++ b/Composer/packages/server/assets/projects/TodoRecognizerSetSample/todorecognizersetsample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "288769", "description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions." @@ -10,13 +10,13 @@ "generator": "todorecognizersetsample.lg", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -24,7 +24,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -32,7 +32,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "157674", "name": "Send a response" @@ -46,26 +46,26 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "064505" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "addtodo" } ], "intent": "AddIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "114961" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "deletetodo", "$designer": { "id": "978613" @@ -75,26 +75,26 @@ "intent": "DeleteIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "088050" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "cleartodos" } ], "intent": "ClearIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "633942" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "696707" }, @@ -104,45 +104,45 @@ "intent": "HelpIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "794124" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "showtodos" } ], "intent": "ShowIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "179728" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "677440" }, "activity": "ok." }, { - "$type": "Microsoft.EndDialog" + "$kind": "Microsoft.EndDialog" } ], "intent": "CancelIntent" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "677447" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "677448" }, @@ -152,4 +152,4 @@ } ], "$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema" -} \ No newline at end of file +} diff --git a/Composer/packages/server/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog b/Composer/packages/server/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog index f27dd209f5..1f03b3af85 100644 --- a/Composer/packages/server/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog +++ b/Composer/packages/server/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "808722", "name": "addtodo" @@ -8,13 +8,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "335456" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "298897" }, @@ -26,7 +26,7 @@ "allowInterruptions": "true" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "567087" }, @@ -35,7 +35,7 @@ "value": "=dialog.todo" }, { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "116673" }, diff --git a/Composer/packages/server/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog b/Composer/packages/server/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog index 7e443dbd2e..67f57baefd 100644 --- a/Composer/packages/server/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog +++ b/Composer/packages/server/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "316336", "name": "cleartodos" @@ -8,13 +8,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "480162" }, "actions": [ { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "832307" }, @@ -23,14 +23,14 @@ "resultProperty": "dialog.cleared" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "983761" }, "condition": "dialog.cleared", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "832300" }, @@ -39,7 +39,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "983700" }, diff --git a/Composer/packages/server/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog b/Composer/packages/server/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog index bca12c33b0..5cf3511e0b 100644 --- a/Composer/packages/server/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog +++ b/Composer/packages/server/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "114909", "name": "deletetodo" @@ -8,13 +8,13 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "768658" }, "actions": [ { - "$type": "Microsoft.TextInput", + "$kind": "Microsoft.TextInput", "$designer": { "id": "870620" }, @@ -26,7 +26,7 @@ "allowInterruptions": "false" }, { - "$type": "Microsoft.EditArray", + "$kind": "Microsoft.EditArray", "$designer": { "id": "492096" }, @@ -36,14 +36,14 @@ "value": "=dialog.todo" }, { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "549615" }, "condition": "dialog.removed", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "725469" }, @@ -52,7 +52,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "549600" }, diff --git a/Composer/packages/server/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog b/Composer/packages/server/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog index 9384caf1b2..3bdb771067 100644 --- a/Composer/packages/server/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog +++ b/Composer/packages/server/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "709692", "name": "showtodos" @@ -8,20 +8,20 @@ "defaultResultProperty": "dialog.result", "triggers": [ { - "$type": "Microsoft.OnBeginDialog", + "$kind": "Microsoft.OnBeginDialog", "$designer": { "id": "783343" }, "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "662084" }, "condition": "user.todos == null", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "339580", "name": "Send an Activity" @@ -31,7 +31,7 @@ ], "elseActions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "662084", "name": "Send an Activity" diff --git a/Composer/packages/server/assets/projects/TodoSample/todosample.dialog b/Composer/packages/server/assets/projects/TodoSample/todosample.dialog index e6ff009cbd..0479d620c0 100644 --- a/Composer/packages/server/assets/projects/TodoSample/todosample.dialog +++ b/Composer/packages/server/assets/projects/TodoSample/todosample.dialog @@ -1,5 +1,5 @@ { - "$type": "Microsoft.AdaptiveDialog", + "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "288769", "description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions." @@ -7,7 +7,7 @@ "autoEndDialog": false, "defaultResultProperty": "dialog.result", "recognizer": { - "$type": "Microsoft.RegexRecognizer", + "$kind": "Microsoft.RegexRecognizer", "id": "regex", "intents": [ { @@ -39,13 +39,13 @@ "generator": "todosample.lg", "triggers": [ { - "$type": "Microsoft.OnConversationUpdateActivity", + "$kind": "Microsoft.OnConversationUpdateActivity", "$designer": { "id": "376720" }, "actions": [ { - "$type": "Microsoft.Foreach", + "$kind": "Microsoft.Foreach", "$designer": { "id": "518944", "name": "Loop: for each item" @@ -53,7 +53,7 @@ "itemsProperty": "turn.Activity.membersAdded", "actions": [ { - "$type": "Microsoft.IfCondition", + "$kind": "Microsoft.IfCondition", "$designer": { "id": "641773", "name": "Branch: if/else" @@ -61,7 +61,7 @@ "condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)", "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "157674", "name": "Send a response" @@ -75,26 +75,26 @@ ] }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "064505" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "addtodo" } ], "intent": "AddIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "114961" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "deletetodo", "$designer": { "id": "978613" @@ -104,26 +104,26 @@ "intent": "DeleteIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "088050" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "cleartodos" } ], "intent": "ClearIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "633942" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "696707" }, @@ -133,45 +133,45 @@ "intent": "HelpIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "794124" }, "actions": [ { - "$type": "Microsoft.BeginDialog", + "$kind": "Microsoft.BeginDialog", "dialog": "showtodos" } ], "intent": "ShowIntent" }, { - "$type": "Microsoft.OnIntent", + "$kind": "Microsoft.OnIntent", "$designer": { "id": "179728" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "677440" }, "activity": "ok." }, { - "$type": "Microsoft.EndDialog" + "$kind": "Microsoft.EndDialog" } ], "intent": "CancelIntent" }, { - "$type": "Microsoft.OnUnknownIntent", + "$kind": "Microsoft.OnUnknownIntent", "$designer": { "id": "677447" }, "actions": [ { - "$type": "Microsoft.SendActivity", + "$kind": "Microsoft.SendActivity", "$designer": { "id": "677448" }, diff --git a/Composer/packages/server/src/models/bot/botProject.ts b/Composer/packages/server/src/models/bot/botProject.ts index 56fc5846a1..cd86e652e7 100644 --- a/Composer/packages/server/src/models/bot/botProject.ts +++ b/Composer/packages/server/src/models/bot/botProject.ts @@ -4,7 +4,7 @@ import fs from 'fs'; import has from 'lodash/has'; -import { getNewDesigner, importResolverGenerator, FileInfo, DialogInfo, LgFile, LuFile } from '@bfc/shared'; +import { getNewDesigner, importResolverGenerator, FileInfo, DialogInfo, LgFile, LuFile, SDKKinds } from '@bfc/shared'; import { dialogIndexer, lgIndexer, luIndexer, createSingleMessage, JsonWalk, VisitorFunc } from '@bfc/indexers'; import { Path } from '../../utility/path'; @@ -878,7 +878,7 @@ export class BotProject { // fix dialog referrence const visitor: VisitorFunc = (_path: string, value: any) => { - if (has(value, '$type') && value.$type === 'Microsoft.BeginDialog') { + if (has(value, '$kind') && value.$kind === SDKKinds.BeginDialog) { const dialogName = value.dialog; value.dialog = dialogName.toLowerCase(); } diff --git a/Composer/packages/ui-plugins/emit-event/src/index.ts b/Composer/packages/ui-plugins/emit-event/src/index.ts index e24bc58115..cb650e3f7f 100644 --- a/Composer/packages/ui-plugins/emit-event/src/index.ts +++ b/Composer/packages/ui-plugins/emit-event/src/index.ts @@ -2,13 +2,13 @@ // Licensed under the MIT License. import { PluginConfig } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import { EventNameField } from './EventNameField'; const config: PluginConfig = { uiSchema: { - [SDKTypes.EmitEvent]: { + [SDKKinds.EmitEvent]: { properties: { eventName: { field: EventNameField, diff --git a/Composer/packages/ui-plugins/json/src/uiSchema.ts b/Composer/packages/ui-plugins/json/src/uiSchema.ts index 8b322381ba..46cbaedf2d 100644 --- a/Composer/packages/ui-plugins/json/src/uiSchema.ts +++ b/Composer/packages/ui-plugins/json/src/uiSchema.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { UISchema } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import { JsonField } from './JsonField'; const uiSchema: UISchema = { - [SDKTypes.HttpRequest]: { + [SDKKinds.HttpRequest]: { properties: { body: { field: JsonField, diff --git a/Composer/packages/ui-plugins/lg/src/index.ts b/Composer/packages/ui-plugins/lg/src/index.ts index 317f8787a5..a1345a8073 100644 --- a/Composer/packages/ui-plugins/lg/src/index.ts +++ b/Composer/packages/ui-plugins/lg/src/index.ts @@ -2,13 +2,13 @@ // Licensed under the MIT License. import { PluginConfig } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import { LgField } from './LgField'; const config: PluginConfig = { uiSchema: { - [SDKTypes.SendActivity]: { + [SDKKinds.SendActivity]: { properties: { activity: { label: 'Language Generation', @@ -18,7 +18,7 @@ const config: PluginConfig = { }, }, }, - [SDKTypes.IActivityTemplate]: { + [SDKKinds.IActivityTemplate]: { field: LgField, }, }, diff --git a/Composer/packages/ui-plugins/luis/src/index.ts b/Composer/packages/ui-plugins/luis/src/index.ts index 3e1c945e24..5dcb9dce63 100644 --- a/Composer/packages/ui-plugins/luis/src/index.ts +++ b/Composer/packages/ui-plugins/luis/src/index.ts @@ -2,14 +2,14 @@ // Licensed under the MIT License. import { PluginConfig } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import { LuisIntentEditor } from './LuisIntentEditor'; const config: PluginConfig = { recognizers: [ { - id: SDKTypes.LuisRecognizer, + id: SDKKinds.LuisRecognizer, displayName: 'LUIS', editor: LuisIntentEditor, isSelected: data => { diff --git a/Composer/packages/ui-plugins/prompts/src/PromptField/UserInput.tsx b/Composer/packages/ui-plugins/prompts/src/PromptField/UserInput.tsx index c255fdd2e2..adc5255e4e 100644 --- a/Composer/packages/ui-plugins/prompts/src/PromptField/UserInput.tsx +++ b/Composer/packages/ui-plugins/prompts/src/PromptField/UserInput.tsx @@ -4,7 +4,7 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; import React, { Fragment } from 'react'; -import { SDKTypes, MicrosoftInputDialog, ChoiceInput, ConfirmInput } from '@bfc/shared'; +import { SDKKinds, MicrosoftInputDialog, ChoiceInput, ConfirmInput } from '@bfc/shared'; import { FieldLabel, recognizerType, SchemaField, usePluginConfig } from '@bfc/adaptive-form'; import { JSONSchema7, useShellApi } from '@bfc/extension'; import formatMessage from 'format-message'; @@ -30,7 +30,7 @@ const UserInput: React.FC<PromptFieldProps<MicrosoftInputDialog>> = props => { const intentName = `${promptType}.response-${designerId}`; const type = recognizerType(currentDialog); - const Editor: any = type === SDKTypes.LuisRecognizer && recognizers.find(r => r.id === type)?.editor; + const Editor: any = type === SDKKinds.LuisRecognizer && recognizers.find(r => r.id === type)?.editor; const intentLabel = formatMessage('Expected responses (intent: #{intentName})', { intentName }); return ( @@ -70,7 +70,7 @@ const UserInput: React.FC<PromptFieldProps<MicrosoftInputDialog>> = props => { onChange={onChange('value')} rawErrors={getError('value')} /> - {Editor && kind !== SDKTypes.AttachmentInput && ( + {Editor && kind !== SDKKinds.AttachmentInput && ( <React.Fragment> <FieldLabel id={`${id}.intent`} label={intentLabel} /> <Editor {...props} onChange={() => {}} /> @@ -103,10 +103,10 @@ const UserInput: React.FC<PromptFieldProps<MicrosoftInputDialog>> = props => { rawErrors={getError('style')} /> )} - {value?.$type === SDKTypes.ChoiceInput && ( + {value?.$kind === SDKKinds.ChoiceInput && ( <ChoiceInputSettings {...props} value={(value as unknown) as ChoiceInput} choiceProperty="choices" /> )} - {value?.$type === SDKTypes.ConfirmInput && ( + {value?.$kind === SDKKinds.ConfirmInput && ( <ChoiceInputSettings {...props} value={(value as unknown) as ConfirmInput} choiceProperty="confirmChoices" /> )} </Fragment> diff --git a/Composer/packages/ui-plugins/prompts/src/uiSchema.ts b/Composer/packages/ui-plugins/prompts/src/uiSchema.ts index c1c2c8a130..9373ced782 100644 --- a/Composer/packages/ui-plugins/prompts/src/uiSchema.ts +++ b/Composer/packages/ui-plugins/prompts/src/uiSchema.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { UISchema } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import { EditableField } from '@bfc/adaptive-form'; import formatMessage from 'format-message'; @@ -28,7 +28,7 @@ const choiceSchema = { }; const uiSchema: UISchema = { - [SDKTypes.AttachmentInput]: { + [SDKKinds.AttachmentInput]: { field: PromptField, helpLink: 'https://aka.ms/bfc-ask-for-user-input', properties: { @@ -41,7 +41,7 @@ const uiSchema: UISchema = { }, }, }, - [SDKTypes.ChoiceInput]: { + [SDKKinds.ChoiceInput]: { field: PromptField, helpLink: 'https://aka.ms/bfc-ask-for-user-input', properties: { @@ -58,7 +58,7 @@ const uiSchema: UISchema = { }, }, }, - [SDKTypes.ConfirmInput]: { + [SDKKinds.ConfirmInput]: { field: PromptField, helpLink: 'https://aka.ms/bfc-ask-for-user-input', properties: { @@ -75,7 +75,7 @@ const uiSchema: UISchema = { }, }, }, - [SDKTypes.DateTimeInput]: { + [SDKKinds.DateTimeInput]: { field: PromptField, helpLink: 'https://aka.ms/bfc-ask-for-user-input', properties: { @@ -88,7 +88,7 @@ const uiSchema: UISchema = { }, }, }, - [SDKTypes.NumberInput]: { + [SDKKinds.NumberInput]: { field: PromptField, helpLink: 'https://aka.ms/bfc-ask-for-user-input', properties: { @@ -101,7 +101,7 @@ const uiSchema: UISchema = { }, }, }, - [SDKTypes.TextInput]: { + [SDKKinds.TextInput]: { field: PromptField, helpLink: 'https://aka.ms/bfc-ask-for-user-input', properties: { diff --git a/Composer/packages/ui-plugins/select-dialog/src/uiSchema.ts b/Composer/packages/ui-plugins/select-dialog/src/uiSchema.ts index 41fe2b16b5..91db028c8b 100644 --- a/Composer/packages/ui-plugins/select-dialog/src/uiSchema.ts +++ b/Composer/packages/ui-plugins/select-dialog/src/uiSchema.ts @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { UISchema } from '@bfc/extension'; -import { SDKTypes } from '@bfc/shared'; +import { SDKKinds } from '@bfc/shared'; import { SelectDialog } from './SelectDialog'; const uiSchema: UISchema = { - [SDKTypes.BeginDialog]: { + [SDKKinds.BeginDialog]: { properties: { dialog: { field: SelectDialog, }, }, }, - [SDKTypes.ReplaceDialog]: { + [SDKKinds.ReplaceDialog]: { properties: { dialog: { field: SelectDialog,