From 0879e8b8001194a9b1b7007f370f2d5d83164705 Mon Sep 17 00:00:00 2001 From: Tom Laird-McConnell Date: Tue, 16 Jul 2019 18:10:43 -0700 Subject: [PATCH] Move Rules folder => Events folder Move Steps Folder => Actions Folder Switch to OnXXX naming pattern for events --- .../AttachmentInput.main.dialog | 4 +- bot.png | Bin 0 -> 8605 bytes bot_icon.png | Bin 0 -> 1899 bytes .../{Steps => Actions}/BaseInvokeDialog.cs | 0 .../{Steps => Actions}/BeginDialog.cs | 0 .../{Steps => Actions}/CancelAllDialogs.cs | 0 .../CodeStep.cs => Actions/CodeAction.cs} | 0 .../{Steps => Actions}/DebugBreak.cs | 0 .../{Steps => Actions}/DeleteProperty.cs | 0 .../{Steps => Actions}/EditActions.cs | 0 .../{Steps => Actions}/EditArray.cs | 0 .../{Steps => Actions}/EmitEvent.cs | 0 .../{Steps => Actions}/EndDialog.cs | 0 .../{Steps => Actions}/EndTurn.cs | 0 .../{Steps => Actions}/ForEach.cs | 0 .../{Steps => Actions}/ForEachPage.cs | 0 .../{Steps => Actions}/HttpRequest.cs | 0 .../{Steps => Actions}/IfCondition.cs | 0 .../{Steps => Actions}/InitProperty.cs | 0 .../LogStep.cs => Actions/LogAction.cs} | 4 +- .../{Steps => Actions}/RepeatDialog.cs | 0 .../{Steps => Actions}/ReplaceDialog.cs | 0 .../{Steps => Actions}/SendActivity.cs | 0 .../{Steps => Actions}/SetProperty.cs | 0 .../{Steps => Actions}/SwitchCondition.cs | 0 .../{Steps => Actions}/TraceActivity.cs | 0 .../AdaptiveDialog.cs | 40 +- .../{Rules => Events}/Extensions.cs | 4 +- .../Events/OnActivity.cs | 66 + .../OnBeginDialog.cs} | 6 +- .../Events/OnConversationUpdateActivity.cs | 21 + .../EventRule.cs => Events/OnDialogEvent.cs} | 8 +- .../Events/OnEndOfConversationActivity.cs | 21 + .../{Rules/Rule.cs => Events/OnEvent.cs} | 8 +- .../Events/OnEventActivity.cs | 21 + .../Events/OnHandoffActivity.cs | 21 + .../IntentRule.cs => Events/OnIntent.cs} | 6 +- .../Events/OnInvokeActivity.cs | 21 + .../Events/OnMessageActivity.cs | 21 + .../Events/OnMessageDeleteActivity.cs | 21 + .../Events/OnMessageReactionActivity.cs | 21 + .../Events/OnMessageUpdateActivity.cs | 21 + .../Events/OnTypingActivity.cs | 21 + .../OnUnknownIntent.cs} | 6 +- .../{IRuleSelector.cs => IEventSelector.cs} | 6 +- .../{IRule.cs => IOnEvent.cs} | 2 +- ...rosoft.Bot.Builder.Dialogs.Adaptive.csproj | 166 +- .../Rules/ActivityRule.cs | 169 - .../Microsoft.BeginDialog.schema | 0 .../Microsoft.CancelAllDialogs.schema | 0 .../Microsoft.DebugBreak.schema | 0 .../Microsoft.DeleteProperty.schema | 0 .../Microsoft.EditActions.schema | 0 .../Microsoft.EditArray.schema | 0 .../Microsoft.EmitEvent.schema | 0 .../Microsoft.EndDialog.schema | 0 .../Microsoft.EndTurn.schema | 0 .../Microsoft.Foreach.schema | 0 .../Microsoft.ForeachPage.schema | 0 .../Microsoft.HttpRequest.schema | 0 .../Microsoft.IfCondition.schema | 0 .../Microsoft.InitProperty.schema | 0 .../Microsoft.LogAction.schema} | 0 .../Microsoft.RepeatDialog.schema | 0 .../Microsoft.ReplaceDialog.schema | 0 .../Microsoft.SendActivity.schema | 0 .../Microsoft.SetProperty.schema | 0 .../Microsoft.SwitchCondition.schema | 0 .../Microsoft.TraceActivity.schema | 0 .../Dialogs/Microsoft.AdaptiveDialog.schema | 4 +- .../Microsoft.OnActivity.schema} | 8 +- .../Microsoft.OnBeginDialog.schema} | 4 +- ...osoft.OnConversationUpdateActivity.schema} | 8 +- .../Microsoft.OnDialogEvent.schema} | 6 +- ...rosoft.OnEndOfConversationActivity.schema} | 8 +- .../Microsoft.OnEvent.schema} | 4 +- .../Microsoft.OnEventActivity.schema} | 8 +- .../Microsoft.OnHandoffActivity.schema} | 8 +- .../Microsoft.OnIntent.schema} | 8 +- .../Microsoft.OnInvokeActivity.schema} | 8 +- .../Microsoft.OnMessageActivity.schema} | 8 +- .../Microsoft.OnMessageDeleteActivity.schema} | 8 +- ...icrosoft.OnMessageReactionActivity.schema} | 8 +- .../Microsoft.OnMessageUpdateActivity.schema} | 8 +- .../Microsoft.OnTypingActivity.schema} | 8 +- .../Microsoft.OnUnknownIntent.schema} | 16 +- ...schema => Microsoft.IEventSelector.schema} | 4 +- ...IRule.schema => Microsoft.IOnEvent.schema} | 4 +- .../Microsoft.ConditionalSelector.schema | 8 +- .../Selectors/Microsoft.FirstSelector.schema | 4 +- .../Microsoft.MostSpecificSelector.schema | 6 +- .../Selectors/Microsoft.RandomSelector.schema | 2 +- .../Selectors/Microsoft.TrueSelector.schema | 4 +- .../Selectors/ConditionalSelector.cs | 12 +- .../Selectors/FirstSelector.cs | 8 +- .../Selectors/MostSpecificSelector.cs | 14 +- .../Selectors/RandomSelector.cs | 6 +- .../Selectors/TrueSelector.cs | 6 +- .../DeclarativeTypeLoader.cs | 2 +- .../Types/Factory.cs | 36 +- .../Samples/01 - Steps/Actions.main.dialog | 4 +- .../Samples/02 - EndTurn/EndTurn.main.dialog | 4 +- .../03 - IfCondition/IfCondition.main.dialog | 4 +- .../SwitchCondition.main.dialog | 4 +- .../04 - TextInput/NumberInput.main.dialog | 4 +- .../TextInput.WithoutProperty.main.dialog | 4 +- .../04 - TextInput/TextInput.main.dialog | 4 +- .../05 - WelcomeRule/WelcomeRule.main.dialog | 4 +- .../06 - DoSteps/DoActions.main.dialog | 12 +- .../BeginDialog.FortuneTellerDialog.dialog | 4 +- .../BeginDialog.TellJokeDialog.dialog | 4 +- .../07 - BeginDialog/BeginDialog.main.dialog | 12 +- .../ExternalLanguage.FortuneTeller.dialog | 4 +- .../ExternalLanguage.Greeting.dialog | 4 +- .../ExternalLanguage.TellJoke.dialog | 4 +- .../ExternalLanguage.main.dialog | 16 +- .../09 - EndDialog/EndDialog.TellJoke.dialog | 6 +- .../09 - EndDialog/EndDialog.main.dialog | 8 +- .../10 - ChoiceInput/ChoiceInput.main.dialog | 4 +- .../11 - HttpRequest/HttpRequest.main.dialog | 4 +- .../GithubIssueBot.main.dialog | 4 +- .../13 - CustomStep/CustomStep.main.dialog | 4 +- .../JavascriptStep.main.dialog | 4 +- .../RepeatDialog.main.dialog | 6 +- .../15 - TraceAndLog/TraceAndLog.main.dialog | 4 +- .../16 - EditSteps/EditActions.main.dialog | 4 +- .../Samples/BugRepo/AskForName.dialog | 4 +- .../Samples/BugRepo/BugRepo.main.dialog | 6 +- .../Controller/CalendarClearUserData.dialog | 4 +- .../Controller/CalendarNextPage.dialog | 4 +- .../Controller/GetDisplayMeetings.dialog | 4 +- .../Controller/GetNewEndDateTime.dialog | 4 +- .../Dialog/AcceptMeeting/AcceptMeeting.dialog | 4 +- .../Dialog/CalendarBot.main.dialog | 20 +- .../Dialog/CreateMeeting/CreateMeeting.dialog | 4 +- .../DeclineMeeting/DeclineMeeting.dialog | 4 +- .../FindContact/CalendarFindContact.dialog | 4 +- .../CalendarFindSingleContact.dialog | 4 +- .../Dialog/ShowMeeting/ShowMeeting.dialog | 10 +- .../Dialog/UpdateMeeting/UpdateMeeting.dialog | 4 +- .../MSGraph/AcceptMeetingService.dialog | 4 +- .../MSGraph/CreateMeetingService.dialog | 4 +- .../MSGraph/DeclineMeetingService.dialog | 4 +- .../Service/MSGraph/GetContactService.dialog | 4 +- .../EmailBot/Dialogs/EmailBot.main.dialog | 20 +- .../Dialogs/ShowEmail/ShowEmail.dialog | 10 +- .../Samples/Sandwich/sandwich.main.dialog | 58 +- .../Samples/ToDoBot/AddToDo.dialog | 4 +- .../Samples/ToDoBot/ClearToDos.dialog | 4 +- .../Samples/ToDoBot/DeleteToDo.dialog | 4 +- .../Samples/ToDoBot/ShowToDos.dialog | 4 +- .../Samples/ToDoBot/ToDoBot.main.dialog | 18 +- .../ToDoLuisBot/ToDoLuisBot.AddItem.dialog | 4 +- .../ToDoLuisBot/ToDoLuisBot.DeleteItem.dialog | 4 +- .../ToDoLuisBot/ToDoLuisBot.ShowItems.dialog | 4 +- .../ToDoLuisBot/ToDoLuisBot.main.dialog | 12 +- .../VARootDialog/VARootDialog.main.dialog | 14 +- .../TestBot.cs | 4 +- .../app.schema | 2741 +++++++++-------- .../QnAMakerTests.cs | 14 +- .../ActionTests.cs | 132 +- .../AdaptiveDialogTests.cs | 168 +- .../DialogContextStateTests.cs | 54 +- .../MiscTests.cs | 14 +- .../RecognizerTests.cs | 10 +- .../SelectorTests.cs | 22 +- .../SettingsStateTests.cs | 6 +- .../DialogManagerTests.cs | 6 +- .../Fallback/test.dialog | 8 +- .../LGGeneratorTests.cs | 6 +- 170 files changed, 2328 insertions(+), 2204 deletions(-) create mode 100644 bot.png create mode 100644 bot_icon.png rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/BaseInvokeDialog.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/BeginDialog.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/CancelAllDialogs.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps/CodeStep.cs => Actions/CodeAction.cs} (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/DebugBreak.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/DeleteProperty.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/EditActions.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/EditArray.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/EmitEvent.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/EndDialog.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/EndTurn.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/ForEach.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/ForEachPage.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/HttpRequest.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/IfCondition.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/InitProperty.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps/LogStep.cs => Actions/LogAction.cs} (91%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/RepeatDialog.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/ReplaceDialog.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/SendActivity.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/SetProperty.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/SwitchCondition.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Steps => Actions}/TraceActivity.cs (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Rules => Events}/Extensions.cs (79%) create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnActivity.cs rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Rules/BeginDialogRule.cs => Events/OnBeginDialog.cs} (70%) create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnConversationUpdateActivity.cs rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Rules/EventRule.cs => Events/OnDialogEvent.cs} (84%) create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEndOfConversationActivity.cs rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Rules/Rule.cs => Events/OnEvent.cs} (95%) create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEventActivity.cs create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnHandoffActivity.cs rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Rules/IntentRule.cs => Events/OnIntent.cs} (92%) create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnInvokeActivity.cs create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageActivity.cs create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageDeleteActivity.cs create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageReactionActivity.cs create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageUpdateActivity.cs create mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnTypingActivity.cs rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{Rules/UnknownIntentRule.cs => Events/OnUnknownIntent.cs} (80%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{IRuleSelector.cs => IEventSelector.cs} (84%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/{IRule.cs => IOnEvent.cs} (96%) delete mode 100644 libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/ActivityRule.cs rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.BeginDialog.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.CancelAllDialogs.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.DebugBreak.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.DeleteProperty.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.EditActions.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.EditArray.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.EmitEvent.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.EndDialog.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.EndTurn.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.Foreach.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.ForeachPage.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.HttpRequest.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.IfCondition.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.InitProperty.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps/Microsoft.LogStep.schema => Actions/Microsoft.LogAction.schema} (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.RepeatDialog.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.ReplaceDialog.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.SendActivity.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.SetProperty.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.SwitchCondition.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Steps => Actions}/Microsoft.TraceActivity.schema (100%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.ActivityRule.schema => Events/Microsoft.OnActivity.schema} (78%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.BeginDialogRule.schema => Events/Microsoft.OnBeginDialog.schema} (79%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.ConversationUpdateActivityRule.schema => Events/Microsoft.OnConversationUpdateActivity.schema} (67%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.EventRule.schema => Events/Microsoft.OnDialogEvent.schema} (90%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.EndOfConversationActivityRule.schema => Events/Microsoft.OnEndOfConversationActivity.schema} (67%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.Rule.schema => Events/Microsoft.OnEvent.schema} (91%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.EventActivityRule.schema => Events/Microsoft.OnEventActivity.schema} (68%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.HandoffActivityRule.schema => Events/Microsoft.OnHandoffActivity.schema} (68%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.IntentRule.schema => Events/Microsoft.OnIntent.schema} (85%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.InvokeActivityRule.schema => Events/Microsoft.OnInvokeActivity.schema} (68%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.MessageActivityRule.schema => Events/Microsoft.OnMessageActivity.schema} (72%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.MessageDeleteActivityRule.schema => Events/Microsoft.OnMessageDeleteActivity.schema} (68%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.MessageReactionActivityRule.schema => Events/Microsoft.OnMessageReactionActivity.schema} (68%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.MessageUpdateActivityRule.schema => Events/Microsoft.OnMessageUpdateActivity.schema} (68%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.TypingActivityRule.schema => Events/Microsoft.OnTypingActivity.schema} (68%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Rules/Microsoft.UnknownIntentRule.schema => Events/Microsoft.OnUnknownIntent.schema} (55%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Microsoft.IRuleSelector.schema => Microsoft.IEventSelector.schema} (56%) rename libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/{Microsoft.IRule.schema => Microsoft.IOnEvent.schema} (57%) diff --git a/Samples/Microsoft.Bot.Builder.TestBot.Json/Samples/17 - AttachmentInput/AttachmentInput.main.dialog b/Samples/Microsoft.Bot.Builder.TestBot.Json/Samples/17 - AttachmentInput/AttachmentInput.main.dialog index 45e03c42d4..82740949e6 100644 --- a/Samples/Microsoft.Bot.Builder.TestBot.Json/Samples/17 - AttachmentInput/AttachmentInput.main.dialog +++ b/Samples/Microsoft.Bot.Builder.TestBot.Json/Samples/17 - AttachmentInput/AttachmentInput.main.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "showimage.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.AttachmentInput", diff --git a/bot.png b/bot.png new file mode 100644 index 0000000000000000000000000000000000000000..ace66f9b5af2cc512c53ad88c334fbb5aa2e6279 GIT binary patch literal 8605 zcmeHtX*ksH+cy;zKdEe4GK9pC7HgJ4WD7+z%-FIFjXjbjL#hdtP-YMrLVlT<8e`v! zVvx1QzGoO~mJtRs&$s(N?&E&mKX0BF{}*%2am;aE=XEZh>pIW#b4}t68#4hu2|g|^ zE&&U36FV+0Zk4~EBfP*bk?5CUz}F!kBWoiru99T_J$D{1F47^PJ_}! zo@#|L0t|UGG6!pok~9)axF6m06#n)|ME#=gi^PlXvwWYm2qz^z%e{GsKS5u)<)oj7 zgZYc2?f*3Q5SXv_C#Dv->|LvOJ4d$m9;gmXrfqcXu+a_SZnc$I=ZolkviZY9=AXIa z`j5?0m0ocjO))fi*yJIX!gaJt*3i8=@tKeU_sLxH;6ZuA1A#|wI0n9(HnDhk=$y(Q zK=z^J0byL$zuGrX%5d{N*Ec*MKlzjkLqDr*lXl1)P$T#sHUEjt{}XPCcM|XWk650~ z8Fu5vVbwVuN^AjQY?IPHkDlZFnI27-j-%lkr|*T@=#)D1{{9JnIcmhIjeK8sv-XO% zObYF1FV=3jI*GaP^V-W=5&}jVIVBZec0R+*QOR8M6-_*h(iB35m!Pid_7$svgCEuv zofBJiFMJGuSg-Y!Cdq4^%6-Xet}BZquZ{{(BAnu_dMKz}vL}>Fmhw5(w(x@c(!KQa z0w2!^qcqMEPVsGDhuNgTu7CaQz}JDgzdVv~y-zOQJ&CI93L7q@WfMJ)O&)TcY+1K@ z*c6g+T63(vD7~Y%Rx{eGoc^j$nRFc~vcaVmoL}Z~hTUN2*mbGdyLOJr9r8UevrXC6 zb+`aa`m2IB=IGRBsRk6h4@c3#gp7mQj}!|Pmy5mA~x-@e#B`6E(Xd#!Q;GD5=o8rSRF0 zxXkAREgYvbw~LVPKPaEY>y%Wj+INzz-Ra#I)=sP{y&ADyQBxG}SQruq&oD}$>r=zi z?BENt@sS=4IG*vzF55LnyRIOAJ}@LEkrO6QII)lXYB(ZCm>YM1CxK(&-yX`L=A$nL zbsX3l!9og=7CKucO2pA21$O$NeC69wTbqkG+6IW2;_gX6?!1{cpbVe9F#9~xla1qH zQ{(z51=%Bm!mz;6lN>_7GQr7qL9u9gOnWYfX;M?oj&z7EbU= zFz~k|5T_aBhA+yh!~sf*SV(@EijtPTCWfYt{~G(uyYXgL%ujX&B?_wbd-CFCL6*7sxypV!;AJu|T^kIWaEIGUdZ!7C+j+!WlL0+kX5 zggy6hn7tG^z|ra{z|p7G@@yCNErHf8?1ms&pAvPN(&u;b=~;p{*&I<56HHc_NznTX z8z%rZ0iE(|zjHr);uyQ_^u_55foj1v+gu!Ei5swZWDG=0bta(LiMK0}O;OXA@@HpzV+h3S`HKw!5kn-=oKU@3D;7D*Gnv-+j^>MBKL2E9B77}+9> z;~ty1^TX9cg@8(-S*JnYuXRFEabi{Q{sDs#s}x8FP3*|@yXL4za)J6k8)d-yb{VDFl;Jlv8x!1G zs|U?Gj6t~|$2OqspPb(5$V1Oix&aVOY`{9EYKDB32z7P`AyRpdijaAr9x>t!fR>}= zx`lrYLU!_i?1zs_v@6FEr)9m>oIq=b96F5Mav_dw$8*W+Gux%I_4H@W{>V-I4siFL z^;9sE!HI4oL|F&XP3?HVhr`YIV=Jl?I-?aQCPw55Z;*@Y8A_b8iw7p3#ScyT!x=(M zelP?$Sugiu^!}}k-a0bEyZ8H1jT`}Pr9_bOY-eS+b;$CGDg% z94T(=+IVby@)#S3VH<%;{^l3?Wog$etsVQ=-)${2_5>1ZDxb*lRZ*R}4QI$Pg}}Oi zbx-RW9z=ZD`wJ5T$1=^Dczl~2;UD{w9gWr2RMB;^3R8&n466gA;~;FpfSA5_&)nT> z^NWYUKi_3eZnzm8!=#9^`1ZfGzu>~q{wV?!hk9~n`JbaQAanjmxF|~i-RheS?9P=H#F#gV zL6?z;-T|*@u}TEqljjnniT$pm6bSuaY`;VFi+)kZ#XpI|LoO+&$ z&c<(j+l`SY4P8@2*GpBHAXZAb1~(r;`n46aZnROS<&VdKR3cL$w7pn5!i=+*Y{~yg z8ezqcPKfaeuzA=t{Ph=MSgKK@VZCk18pJXDQMz~1Fh;x2I0uJ`F>#|90KO`G83HuV4f?W=Ul@Qs;Xm2ac(2nDVA2BKYVO3F8fBYCC zL~_GDL&0h`Ke`Y~fO+d*2;Zq;j86Sf0$*m+75|k>{aLe`ettereDn zy9$dM@6>ug3?ag!vYt7{R+)n@CX6*c=9OJS6g8t1zjE-4@WTE{dezP90X=TLb(Hn3 zSVonp%QEQ1TDrg0Bxj9Ay;@F%st_E!NtU6p!2w547~+ME5sU}SSOnqkP~-VVG`wB0 zwtZQSWhL1>N5m1Enm;S=n3Y4|<+R#=Pg{*xaXtnVT3IYInrnYAq8`pkG`zzG#RmMS zPVyfqeVaC)o&ITDrmAl5K@@g2Omh8n^=fQmY~M<^44k+vE znPqlz#Mgfolz%~C0V9L;5>>a7iBCuE6x5(QLo(>vvQ$V+-gTS7(nVNSLtfBizJi0^ z72Ci_q{UUpdFoadZA*0D;|^&4M`6IVO0D^2{tQ=L=;Q^-Y zFW_CB<;5TuigE>OSA#bNqu51iptOC9#b9XGuRy~6&Hj^8n`~$yt=wx-Zk%|~Z$?mt zWUu&>s;|7Mp0=wvW;>W~W#py7#Q8cfl6{KKBI!s|1as@9o zJ;q%5!ebcVQE`Nb^xerWsa<&iI>NDaW!Us=_La{}cbS}-)0!2C9DH@3^|-=tfi`7< zrquXgMQuLRb#B=$BmCyC`@s)({=3U?@b^;9~T+p^Co)2VVKI2+Y=Gz)0-qJLVa||lzj0mb68aJ*3xdnOCr|{_4F0`{*7QO zvf`o>zY2eli#cVr=eSgz2y1zxrLU>s3wsT59;4wr(R3RMW=gMQ+@-C*xC)PJ>#ddN z=zYsUD%cI_msXzg%HnVNwr!El6JIbl*b`yf?I^wpV)YcOY$emOf8BNATTBTESkVV= z8HB2Br{jr@yIW!Lc3BQ>6~B=iqw%yVm=s^{aYmzOnINeESsu&xrKOO}3b$g9$Iyob zLWr7e6YMz$*qw|R)|$xkg#p#-xr~MGZeQo<7pWOpGs zr&sZ;YOx7K@{&a%eFvI0;QNY`{mWNhwW+LHb8fGx>J((YDZaX1lqHD1BMZJzG7P~? zF55YV&%=3$e0^`CTex(574c?>t@={EyXv;=aEywZ=f(}8Umkk}e(hy5I)GD8TO^Aq z#+*DslJ9iZ{oPjIuC=QBx2BygY_q;T0MEdi9oBnPwopI*8ETuQnIDt~2_%9m>YTAl zCm7ahYV14F&tv8F*;cH(V#yBYjT^1|<-k^O_lfHoRgcMx=TBSiDXFM<{j4vww$&NQ zbMeazxmNwpcrU)}e5_aCRrnmUUW|Eq@O4r$?1Dj{;s;iLej5q$K}SRD80(+?rwygb z*$QI2Eullb7vHbrdHm=FYo*t7I0;447FLk!y41|F)!F9795-P#xw%i;oB@Uf1{FMd zEKqHtsiq{x7Q=q?4(+W3*0W96e}w*3J<7-5v(~fvJhlW2GplcH7Uz07I6jctUntm_ z+Srh_yP@sZKi@XN)U*7-TwlbT12hR%X8F0-J60AMyX7_Z_`rDJ?)ck{5o)@YJZCnj zwV?K+mEG-x-mEO;H}i3&?et)?z9#;lh+k7lI(nQZr7xvF4E%V&m;hnIwj1RmwS9eW#JkT*>AQLE|OH4e_$Wi3H3MRx~!i{U@d z>jX>8&TUrXwl`J9I< zR@PUT)G&0$wpIr6hWspTeu#-*8*>5=?4k2+*Sju|m#?&4^+~ruX?$W3X3 zBI7HP9lqPAOJ}(2n=S1NEgg@{YS%0OQ-F;0fSB_uI&Va+&f?(i?bRWX^Ax34>VSEMTGM{?bIv~Xsyzg1QO ziJ7reR8d(lK)ZDx@kC8c39l$YuA;bg2;v9+Ht4LDVi_<~p9LWy%|2lgr#cgg7GAeT zoEa)!D1e^FYwGQOppEJTP94dGNb3}h-h%bg>&hlb6EjZQz5)|=z8DOBe7B3jc;k=j zYto=g>sLA->*M#NnBTTKz~E<^$$r#Nh_QW8h;Te2D3yzDvGJoP2^w`5l4&kd3x=FDMV<%zUaA^T-$7eUln0 z>-FD#q7fgzJBMCg81k~DEb5vW0!vAbSD?q}) zU_NMP^?15#HqEJmRIk*H`BXlvo5KEa#huU_XU z`6jYhb5l`?bZc1)n3GkJmE0#OHcLFwg#FJfZ(xrui{q72&w{0kUbvG>k%Az~OA4&mvVf09R z6l2IcH8=>E(+s?2wfsV(cN%ow3km|1O>=^NMPAuLUigOX%%6hUfzctS4ft^{jDZP+ zq6v&)0bO!eOjmhY`ix5IhHk*F+A@6MT^eIg~t0XE}}`6^3HtmE63*fm5gb2b$wbhB(Q zImOD|3kqgv!F~XP+4~)8n3@XCN}7z0NFaQvFktDw*GcD^f;m#uLs^V~P_Z zfyr^>#mrXJ&W07J3=4zQ7l>%K+7zb2cvCYtd?AL?)Nhm?2ZkEV8&LXPyDbRsB<}`9 zmlGJ48LyRc^4hO7US(*{ERZIKL4s(^3Q|A<6vkJ;d zYu>&wXXp0>f-%I;LzEsxh8QdcaC~pOts9S!nRxIWhQNP5@p(sNJyE(stz<5-X$=3^ z=PPadi0FQtfjiw6uoa)Tw-m%bb2xd#(r+YZnXZI3uA=A`Vhz1cn63Wb?8K|7bCAf8 zIOiP`_X4O9ijI}o7BPk~4l{YcI)H&8Ds(e@F=}#727WTZNwD1IQ;i%c*yJ5Ja6KFZ!vSfE9=-j;23-*#9Rh4o^e0+4k!`r>x*3T43V^Oc_pO-Rt&flg zeHHHE=SaHGKXXZ=kZCg7Q#8Y1fW3RU2iF9+CdrTM^{sOq&=%W@m8$uliu+03XKz3G z_jdCmK`$Ox9HuT+x8o%j2H6U0$XD~>G;PzD-fCJ9+#G5Nm8Z^J0!cW_fP(=N=|vs9 z0#N7FupWSJp8S+kfnE=rv-bI_vS^H=B@5}vfLBXYW}aum{{T`CTGmNsb8WQlK})}M z1BKq%g0h7JNl2dm<-mwd!MGrUOST^)`(cRMK>L#}w8EfCGlV1LW8gt)97Zn{Ob7&5tRKeUkP-12m)`oXTHaf&gMh3t6Ij z)Ytt0xsmlhZMh;(zw2}!R(gBW(ENJGd@82`a??b*B#A#9ro#|E^vh>RhTu{6QwfyvQK0#{na}@b} zhw*vpVVx30j^UM>O1jRh#zFt5{3}^RP&%3&lx2k!zb=~8CqK96SW&TC)fi;}WG zr+bW~bt{dd?yZVI{+G?B{1=PBa%z7J{d9ikMEzGY{@Xbz zBC`Q-fbvSiD$qw;|MZfoKXudHJW5~mTVGxg0gQ0V>yv=Wo*t=C_O;0X%_ai$NyKB_ zzlJmdhU{%;?r-vrY2>evup_Q69`_|rZD)#uz34U5 zS$8(FL%aQVo~M=t`wFZ1NLD#_KU?+7w`V?7)3%41)`@FcCp9UrzaS@e^>^ND^=p$x zMZSVcrDDo}X9y)iM#$aRLh>_R{GI!Q*L}wHomv`mUXc%ob{|4|`COj(%oOMMY?hQ|OjW(?(-<^VNONSLIF zP1X&$Ew6JVb-)N!$-g{p9H>JPpnQD-d*ACqwI&KG(>1Cesdp&5Mx5jy>1wRFGQtw<3a z_nN0$=UJHcq?CQ;iT<2O2RKwZr1{R}9Aefw8x>}TND8kl6&+hTTiNht44j|@XM1;O`%MIf6g8mTJ6W9#ot(P>0~aDKQ)GKU_Qd4X zrj))}gvDoov+Rg`m~C+M3Gh(NrxfrJdng;I-r0w#^RErfffM*2vHt|*|2u@R1u@CF X{q~XnVuAl#a9Nnzn0z$8{pkMyTep3k literal 0 HcmV?d00001 diff --git a/bot_icon.png b/bot_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..37c81be7d6b7ee7f51bdcd5770d6992b104e3b9e GIT binary patch literal 1899 zcmV-x2bB1UP)002t}1^@s6I8J)%00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru;S3rQE*E_6!-xO?2KY%t zK~#9!?b~^9Q$-vH@NZs2Dbf}SX=&OtDWx1O3Iz&+#d1RtsRfa%$Wf46#*1TAJW-mq zfCwJoeLI38qa!jXqXUBnIyn9z0!?~wPNf%ZlaS4O>mQ+I%5L>FeJ>2m{$~2m?ly1V zC;Q&+Z@V>M-Ej&LszMS30!v^CEP*Ak1ePEWSOQC62`qsnumpj?5?BIDUr^vV4vT_0(g^43 zq*jCVGKJ#Aqe%dOZx&dP)w^R*!GeQDD7H+A#i~1^nu-!Sw}W$a5+d5G>q442tO=?y z_AN-j_+G&SlY#-YDW@AA%ILyW)p-?oh`Kwi^~mtbY}@^L2^iZmIAD_AP=(pu@W^l$ z>hFKN=)1WDL{WE_CDjDo3mhOEumcMdFedpH-N7V1q3n}m@K`1bb>gBIDVv-?E8p?w zF8PpD=zxy{{M{leM)lAaOwtQ#GomX~b@HMYeTrHS)fi`LeMl;BLgs)Se87qk zN&10lkL9D-FewJ>MzT<+D!u5vDR8L9I9*GSRLBSWVX+mNI)O=ALp?V!8c&R3p&XT7 z^eS>{cB%3jf*yrV@LqX8F1BKL_YRtaNm@cZlNF8iqfJbevx=anhER=BRzuLE(7^>e zw8VytL~X$&t)QNo5RIqDn7Ff8a-l=F_ikx5L2{7;lyiZ@OKlit(+*710_w@}COkXV z#J>?8p_;ysDuSLx4sP9%Wj5Sy)doyzE7ap-O?ZA>bPMkk{v)DCII8?3j2AyIw_%7i ztj%CjTcFmCG2w*?EY#^5f~11rL0z3hNQ;xmFUu1#I3eshVEHK4jP8p3tZ2?U=*qNy zosP&gEl)V{>xx7SiVq7SmQ3;JsIIV2jA5$I))I6taB^4JJaAC|Zp8mS9y0a+_$bs2 z*OM2$NZHH>`)y?+2F8U20ZXQMctjTz-4(-4Mbtuth8S>oMIvZ^AJC#y{{q(6!tW^* zd*)j}3sOJ}Q?NZJw&k|h{j;-pBm~f*`SU%cp zKdLdR-7+j2i@Dn;Eq%^p4ops8&dw)MFgb;7o1Gc~wJ*iLD!fQ-;gQTs@1zr!dwOel-97HQ&vsboKZ6P%Xw|p?y?e!O_O3;m_5CEVHvP=&jnP}%gg}S zmfa1@GrFh)3zaZ`*ZF2e74<$89;#y78Vy+b<%MQNUYTO;w-xG=aYFI+q6Ghb{WY=g zL_KyLyVNQyLu=2$hZzkhUz-e5cnH(qWnW&v>qn}A|NH9=1bk4%C5D4H&<(95A-Ne*rB@-9Cy$doe0q>?65jN-P!)?TqWT zDkT(q^7v5S7Y7d2rgXY$?mV|N4&)#gOn zMHE==#i(|(U~k=P#{40j5wrx6Q0$s#!PHwLn5rL~E{u7-ZBUwQ(KLAdBdmr4_Rcgj z<_-!17*X)qJPW4X#zOsA;=-uc%GwO2+2&upSAos$KrILCz3FDm8PrKXFrwg-xfa~V zfjU&`#>iK-fzk{M0O~F)u-YBCkSHLc_V4uv4!;CZy zz=(qPbK{Yl#^!cEm%EX%U3(~9u&#nRxL}{oio<>VBLfE`6z|TC$Nd9Xs9#RIF-#{Y z-LNQtTDJ_Fy%_ag7VNXx@wm5NB%rh&>g`!^m^YAxI(o)~q1#Gz%^Y+)>p%h2xD{CQ z9cbWy?aqzIl-t79gAs~1XPU8K5DWF&Sr3N1T%vo5rRymgKbQ=g-2oTpXwesQEQknG z*M)ofM_^%kXQur3vmOlIS`w68RQK~)6hNg*hAqDsF4BA$W$q~BzSnrM_s=?PI9S=N z?ASRE(t`vQ6s*Rmbje7xJK(-D!ZLT1;ZTWN{UH&f0qgfwG=cqb{xSvz5h~ywm9#qch8qZapPXhu=U /// Write log activity to console log /// - public class LogStep : DialogAction + public class LogAction : DialogAction { /// /// LG expression to log @@ -28,7 +28,7 @@ public class LogStep : DialogAction public bool TraceActivity { get; set; } = false; [JsonConstructor] - public LogStep(string text = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + public LogAction(string text = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) { this.RegisterSourceLocation(callerPath, callerLine); if (text != null) diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/RepeatDialog.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/RepeatDialog.cs similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/RepeatDialog.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/RepeatDialog.cs diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/ReplaceDialog.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/ReplaceDialog.cs similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/ReplaceDialog.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/ReplaceDialog.cs diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/SendActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SendActivity.cs similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/SendActivity.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SendActivity.cs diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/SetProperty.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SetProperty.cs similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/SetProperty.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SetProperty.cs diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/SwitchCondition.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SwitchCondition.cs similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/SwitchCondition.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SwitchCondition.cs diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/TraceActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/TraceActivity.cs similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Steps/TraceActivity.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/TraceActivity.cs diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/AdaptiveDialog.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/AdaptiveDialog.cs index 146df968f5..77502a365b 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/AdaptiveDialog.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/AdaptiveDialog.cs @@ -8,7 +8,7 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Selectors; using Microsoft.Bot.Builder.Dialogs.Debugging; using Microsoft.Bot.Builder.Expressions; @@ -20,7 +20,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive { /// - /// The Adaptive Dialog models conversation using events and rules to adapt dynamicaly to changing conversation flow + /// The Adaptive Dialog models conversation using events and events to adapt dynamicaly to changing conversation flow /// public class AdaptiveDialog : DialogContainer { @@ -47,7 +47,7 @@ public class AdaptiveDialog : DialogContainer /// /// Rules for handling events to dynamic modifying the executing plan /// - public virtual List Rules { get; set; } = new List(); + public virtual List Events { get; set; } = new List(); /// /// Gets or sets the policty to Automatically end the dialog when there are no actions to execute @@ -59,9 +59,9 @@ public class AdaptiveDialog : DialogContainer public bool AutoEndDialog { get; set; } = true; /// - /// Gets or sets the selector for picking the possible rules to execute. + /// Gets or sets the selector for picking the possible events to execute. /// - public IRuleSelector Selector { get; set; } + public IEventSelector Selector { get; set; } /// /// Gets or sets the property to return as the result when the dialog ends when there are no more Actions and AutoEndDialog = true. @@ -110,7 +110,7 @@ public AdaptiveDialog(string dialogId = null, [CallerFilePath] string callerPath state.Result = state.Options["value"]; } - // Evaluate rules and queue up step changes + // Evaluate events and queue up step changes var dialogEvent = new DialogEvent() { Name = AdaptiveEvents.BeginDialog, @@ -153,7 +153,7 @@ public AdaptiveDialog(string dialogId = null, [CallerFilePath] string callerPath // Save into turn sequenceContext.State.SetValue(DialogContextState.TURN_DIALOGEVENT, dialogEvent); - // Look for triggered rule + // Look for triggered evt var handled = await this.QueueFirstMatchAsync(sequenceContext, dialogEvent, preBubble, cancellationToken).ConfigureAwait(false); if (handled) @@ -265,17 +265,17 @@ public AdaptiveDialog(string dialogId = null, [CallerFilePath] string callerPath } } - public void AddRule(IRule rule) + public void AddEvent(IOnEvent evt) { - rule.Actions.ForEach(s => _dialogs.Add(s)); - this.Rules.Add(rule); + evt.Actions.ForEach(s => _dialogs.Add(s)); + this.Events.Add(evt); } - public void AddRules(IEnumerable rules) + public void AddEvents(IEnumerable events) { - foreach (var rule in rules) + foreach (var evt in events) { - this.AddRule(rule); + this.AddEvent(evt); } } @@ -452,10 +452,10 @@ private async Task QueueFirstMatchAsync(SequenceContext sequenceContext, D var selection = await Selector.Select(sequenceContext, cancellationToken).ConfigureAwait(false); if (selection.Any()) { - var rule = Rules[selection.First()]; - await sequenceContext.DebuggerStepAsync(rule, dialogEvent, cancellationToken).ConfigureAwait(false); - System.Diagnostics.Trace.TraceInformation($"Executing Dialog: {this.Id} Rule[{selection}]: {rule.GetType().Name}: {rule.GetExpression(null)}"); - var changes = await rule.ExecuteAsync(sequenceContext).ConfigureAwait(false); + var evt = Events[selection.First()]; + await sequenceContext.DebuggerStepAsync(evt, dialogEvent, cancellationToken).ConfigureAwait(false); + System.Diagnostics.Trace.TraceInformation($"Executing Dialog: {this.Id} Rule[{selection}]: {evt.GetType().Name}: {evt.GetExpression(null)}"); + var changes = await evt.ExecuteAsync(sequenceContext).ConfigureAwait(false); if (changes != null && changes.Count > 0) { @@ -474,9 +474,9 @@ private void EnsureDependenciesInstalled() { installedDependencies = true; - foreach (var rule in this.Rules) + foreach (var evt in this.Events) { - AddDialog(rule.Actions.ToArray()); + AddDialog(evt.Actions.ToArray()); } // Wire up selector @@ -488,7 +488,7 @@ private void EnsureDependenciesInstalled() Selector = new FirstSelector() }; } - this.Selector.Initialize(this.Rules, true); + this.Selector.Initialize(this.Events, true); } } } diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/Extensions.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/Extensions.cs similarity index 79% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/Extensions.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/Extensions.cs index 54013fe1da..59eb64d2d4 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/Extensions.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/Extensions.cs @@ -8,11 +8,11 @@ using System.Threading.Tasks; using Microsoft.Bot.Builder.Dialogs.Debugging; -namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events { public static partial class Extensions { - public static async Task DebuggerStepAsync(this DialogContext context, IRule rule, DialogEvent dialogEvent, CancellationToken cancellationToken) + public static async Task DebuggerStepAsync(this DialogContext context, IOnEvent rule, DialogEvent dialogEvent, CancellationToken cancellationToken) { var more = dialogEvent.Name; await context.GetDebugger().StepAsync(context, rule, more, cancellationToken).ConfigureAwait(false); diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnActivity.cs new file mode 100644 index 0000000000..fe397d226d --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnActivity.cs @@ -0,0 +1,66 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Builder.Expressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + + /// + /// Event triggered when a Activity of a given type is received + /// + public class OnActivity : OnDialogEvent + { + [JsonConstructor] + public OnActivity(string type=null, List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(events: new List() + { + AdaptiveEvents.ActivityReceived + }, + actions: actions, + constraint: constraint, + callerPath: callerPath, callerLine: callerLine) + { + Type = type; + } + + /// + /// ActivityType + /// + [JsonProperty("type")] + public string Type { get; set; } + + protected override Expression BuildExpression(IExpressionParser factory) + { + + // add constraints for activity type + return Expression.AndExpression(factory.Parse($"turn.dialogEvent.value.type == '{this.Type}'"), + base.BuildExpression(factory)); + } + + protected override ActionChangeList OnCreateChangeList(SequenceContext planning, object dialogOptions = null) + { + return new ActionChangeList() + { + Actions = Actions.Select(s => new ActionState() + { + DialogStack = new List(), + DialogId = s.Id, + Options = dialogOptions + }).ToList() + }; + } + + public override string GetIdentity() + { + return $"{this.GetType().Name}({this.Type})[{this.Constraint}]"; + } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/BeginDialogRule.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnBeginDialog.cs similarity index 70% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/BeginDialogRule.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnBeginDialog.cs index d65a925763..d14622d929 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/BeginDialogRule.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnBeginDialog.cs @@ -6,15 +6,15 @@ using Microsoft.Bot.Builder.Expressions; using Newtonsoft.Json; -namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events { /// /// Rule triggered when a dialog is started via BeginDialog() /// - public class BeginDialogRule : EventRule + public class OnBeginDialog : OnDialogEvent { [JsonConstructor] - public BeginDialogRule(List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + public OnBeginDialog(List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) : base(events: new List() { AdaptiveEvents.BeginDialog diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnConversationUpdateActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnConversationUpdateActivity.cs new file mode 100644 index 0000000000..ffaff803e8 --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnConversationUpdateActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for ConversationUpdate Activity + /// + public class OnConversationUpdateActivity : OnActivity + { + [JsonConstructor] + public OnConversationUpdateActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.ConversationUpdate, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/EventRule.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnDialogEvent.cs similarity index 84% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/EventRule.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnDialogEvent.cs index ce29d91fc0..c0963d6241 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/EventRule.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnDialogEvent.cs @@ -6,12 +6,12 @@ using Microsoft.Bot.Builder.Expressions; using Newtonsoft.Json; -namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events { /// - /// Rule triggered when a dialog event matching a list of event names is emitted. + /// Event triggered when a dialog event matching a list of event names is emitted. /// - public class EventRule : Rule + public class OnDialogEvent : OnEvent { /// /// List of events to filter @@ -19,7 +19,7 @@ public class EventRule : Rule public List Events { get; set; } [JsonConstructor] - public EventRule(List events = null, List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + public OnDialogEvent(List events = null, List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) : base(constraint: constraint, actions: actions, callerPath: callerPath, callerLine: callerLine) { this.Events = events ?? new List(); diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEndOfConversationActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEndOfConversationActivity.cs new file mode 100644 index 0000000000..83bd976ebc --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEndOfConversationActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for EndOfConversation Activity + /// + public class OnEndOfConversationActivity : OnActivity + { + [JsonConstructor] + public OnEndOfConversationActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.EndOfConversation, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/Rule.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEvent.cs similarity index 95% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/Rule.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEvent.cs index 300af63f87..3e5ab8dd0f 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/Rule.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEvent.cs @@ -14,13 +14,13 @@ using Microsoft.Bot.Builder.Expressions.Parser; using Newtonsoft.Json; -namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events { /// - /// Defines basic Rule contract + /// Defines basic OnEvent handler /// [DebuggerDisplay("{GetIdentity()}")] - public abstract class Rule : IRule, IItemIdentity + public abstract class OnEvent : IOnEvent, IItemIdentity { // constraints from Rule.AddConstraint() private List extraConstraints = new List(); @@ -29,7 +29,7 @@ public abstract class Rule : IRule, IItemIdentity private Expression fullConstraint = null; [JsonConstructor] - public Rule(string constraint = null, List actions = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + public OnEvent(string constraint = null, List actions = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) { this.RegisterSourceLocation(callerPath, callerLine); diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEventActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEventActivity.cs new file mode 100644 index 0000000000..d6b07cb8dc --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnEventActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for Event Activity + /// + public class OnEventActivity : OnActivity + { + [JsonConstructor] + public OnEventActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.Event, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnHandoffActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnHandoffActivity.cs new file mode 100644 index 0000000000..4b3bb5addb --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnHandoffActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for Handoff Activity + /// + public class OnHandoffActivity : OnActivity + { + [JsonConstructor] + public OnHandoffActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.Handoff, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/IntentRule.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnIntent.cs similarity index 92% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/IntentRule.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnIntent.cs index 0e7feb1af3..40ea8f52ca 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/IntentRule.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnIntent.cs @@ -9,16 +9,16 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events { /// /// Rule triggered when a message is received and the recognized intents & entities match a /// specified list of intent & entity filters. /// - public class IntentRule : EventRule + public class OnIntent : OnDialogEvent { [JsonConstructor] - public IntentRule(string intent = null, List entities = null, List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + public OnIntent(string intent = null, List entities = null, List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) : base(events: new List() { AdaptiveEvents.RecognizedIntent diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnInvokeActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnInvokeActivity.cs new file mode 100644 index 0000000000..09e6d219c1 --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnInvokeActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for Invoke Activity + /// + public class OnInvokeActivity : OnActivity + { + [JsonConstructor] + public OnInvokeActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.Invoke, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageActivity.cs new file mode 100644 index 0000000000..95b6a421c3 --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for Message Activity + /// + public class OnMessageActivity : OnActivity + { + [JsonConstructor] + public OnMessageActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.Message, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageDeleteActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageDeleteActivity.cs new file mode 100644 index 0000000000..7f3557751c --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageDeleteActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for MessageDelete Activity + /// + public class OnMessageDeleteActivity : OnActivity + { + [JsonConstructor] + public OnMessageDeleteActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.MessageDelete, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageReactionActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageReactionActivity.cs new file mode 100644 index 0000000000..3a07848c19 --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageReactionActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for MessageReaction Activity + /// + public class OnMessageReactionActivity : OnActivity + { + [JsonConstructor] + public OnMessageReactionActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.MessageReaction, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageUpdateActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageUpdateActivity.cs new file mode 100644 index 0000000000..d707e526e7 --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnMessageUpdateActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for MessageUpdate Activity + /// + public class OnMessageUpdateActivity : OnActivity + { + [JsonConstructor] + public OnMessageUpdateActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.MessageUpdate, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnTypingActivity.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnTypingActivity.cs new file mode 100644 index 0000000000..427be998e4 --- /dev/null +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnTypingActivity.cs @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.Bot.Schema; +using Newtonsoft.Json; + +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events +{ + /// + /// Event for Typing Activity + /// + public class OnTypingActivity : OnActivity + { + [JsonConstructor] + public OnTypingActivity(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + : base(type: ActivityTypes.Typing, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } + } + +} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/UnknownIntentRule.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnUnknownIntent.cs similarity index 80% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/UnknownIntentRule.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnUnknownIntent.cs index f14bb2b072..307697f76f 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/UnknownIntentRule.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Events/OnUnknownIntent.cs @@ -12,7 +12,7 @@ using Microsoft.Bot.Builder.Expressions.Parser; using Newtonsoft.Json; -namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules +namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Events { /// /// This rule fires when the utterance is not recognized and the fallback consultation is happening @@ -21,10 +21,10 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules /// * none of the parent dialogs handle the event /// This provides the parent dialogs the opportunity to handle global commands as fallback interruption /// - public class UnknownIntentRule : EventRule + public class OnUnknownIntent : OnDialogEvent { [JsonConstructor] - public UnknownIntentRule(List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) + public OnUnknownIntent(List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) : base(events: new List() { AdaptiveEvents.UnknownIntent diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IRuleSelector.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IEventSelector.cs similarity index 84% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IRuleSelector.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IEventSelector.cs index 8681d15946..3435abf2d3 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IRuleSelector.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IEventSelector.cs @@ -7,16 +7,16 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive { /// - /// Select the rule to execute in a given state. + /// Select the event to execute in a given state. /// - public interface IRuleSelector + public interface IEventSelector { /// /// Initialize the selector with the set of rules. /// /// Possible rules to match. /// True if rules should be evaluated on select. - void Initialize(IEnumerable rules, bool evaluate = true); + void Initialize(IEnumerable rules, bool evaluate = true); /// /// Select the best rule to execute. diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IRule.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IOnEvent.cs similarity index 96% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IRule.cs rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IOnEvent.cs index cf78d4387c..5bebf60628 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IRule.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/IOnEvent.cs @@ -7,7 +7,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive { - public interface IRule + public interface IOnEvent { /// /// Get the expression for this rule. diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Microsoft.Bot.Builder.Dialogs.Adaptive.csproj b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Microsoft.Bot.Builder.Dialogs.Adaptive.csproj index ab3eb09a91..fa1030fa8c 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Microsoft.Bot.Builder.Dialogs.Adaptive.csproj +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Microsoft.Bot.Builder.Dialogs.Adaptive.csproj @@ -39,14 +39,6 @@ - - bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Rules.xml - - - - bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Rules.xml - - full true @@ -59,48 +51,64 @@ - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -110,49 +118,49 @@ - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/ActivityRule.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/ActivityRule.cs deleted file mode 100644 index 9f3833c21f..0000000000 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Rules/ActivityRule.cs +++ /dev/null @@ -1,169 +0,0 @@ -// Licensed under the MIT License. -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using Microsoft.Bot.Builder.Expressions; -using Microsoft.Bot.Schema; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Rules -{ - - /// - /// Rule triggered when a Activity of a given type is received - /// - public class ActivityRule : EventRule - { - [JsonConstructor] - public ActivityRule(string type=null, List actions = null, string constraint = null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(events: new List() - { - AdaptiveEvents.ActivityReceived - }, - actions: actions, - constraint: constraint, - callerPath: callerPath, callerLine: callerLine) - { - Type = type; - } - - /// - /// ActivityType - /// - [JsonProperty("type")] - public string Type { get; set; } - - protected override Expression BuildExpression(IExpressionParser factory) - { - - // add constraints for activity type - return Expression.AndExpression(factory.Parse($"turn.dialogEvent.value.type == '{this.Type}'"), - base.BuildExpression(factory)); - } - - protected override ActionChangeList OnCreateChangeList(SequenceContext planning, object dialogOptions = null) - { - return new ActionChangeList() - { - Actions = Actions.Select(s => new ActionState() - { - DialogStack = new List(), - DialogId = s.Id, - Options = dialogOptions - }).ToList() - }; - } - - public override string GetIdentity() - { - return $"{this.GetType().Name}({this.Type})[{this.Constraint}]"; - } - } - - /// - /// Rule for ConversationUpdate Activity - /// - public class ConversationUpdateActivityRule : ActivityRule - { - [JsonConstructor] - public ConversationUpdateActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.ConversationUpdate, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - /// - /// Rule for EndOfConversation Activity - /// - public class EndOfConversationActivityRule : ActivityRule - { - [JsonConstructor] - public EndOfConversationActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.EndOfConversation, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - - /// - /// Rule for Event Activity - /// - public class EventActivityRule : ActivityRule - { - [JsonConstructor] - public EventActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.Event, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - /// - /// Rule for Handoff Activity - /// - public class HandoffActivityRule: ActivityRule - { - [JsonConstructor] - public HandoffActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.Handoff, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - /// - /// Rule for Invoke Activity - /// - public class InvokeActivityRule : ActivityRule - { - [JsonConstructor] - public InvokeActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.Invoke, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - /// - /// Rule for Message Activity - /// - public class MessageActivityRule : ActivityRule - { - [JsonConstructor] - public MessageActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.Message, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - /// - /// Rule for MessageReaction Activity - /// - public class MessageReactionActivityRule : ActivityRule - { - [JsonConstructor] - public MessageReactionActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.MessageReaction, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - - /// - /// Rule for MessageUpdate Activity - /// - public class MessageUpdateActivityRule : ActivityRule - { - [JsonConstructor] - public MessageUpdateActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.MessageUpdate, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - /// - /// Rule for MessageDelete Activity - /// - public class MessageDeleteActivityRule : ActivityRule - { - [JsonConstructor] - public MessageDeleteActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.MessageDelete, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - - /// - /// Rule for TypingActivity Activity - /// - public class TypingActivityRule : ActivityRule - { - [JsonConstructor] - public TypingActivityRule(List actions = null, string constraint= null, [CallerFilePath] string callerPath = "", [CallerLineNumber] int callerLine = 0) - : base(type: ActivityTypes.Typing, actions: actions, constraint: constraint, callerPath: callerPath, callerLine: callerLine) { } - } - -} diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.BeginDialog.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.BeginDialog.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.BeginDialog.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.BeginDialog.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.CancelAllDialogs.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.CancelAllDialogs.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.CancelAllDialogs.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.CancelAllDialogs.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.DebugBreak.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.DebugBreak.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.DebugBreak.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.DebugBreak.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.DeleteProperty.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.DeleteProperty.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.DeleteProperty.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.DeleteProperty.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EditActions.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EditActions.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EditActions.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EditActions.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EditArray.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EditArray.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EditArray.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EditArray.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EmitEvent.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EmitEvent.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EmitEvent.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EmitEvent.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EndDialog.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EndDialog.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EndDialog.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EndDialog.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EndTurn.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EndTurn.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.EndTurn.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EndTurn.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.Foreach.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.Foreach.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.Foreach.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.Foreach.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.ForeachPage.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.ForeachPage.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.ForeachPage.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.ForeachPage.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.HttpRequest.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.HttpRequest.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.HttpRequest.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.HttpRequest.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.IfCondition.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.IfCondition.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.IfCondition.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.IfCondition.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.InitProperty.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.InitProperty.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.InitProperty.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.InitProperty.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.LogStep.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.LogAction.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.LogStep.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.LogAction.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.RepeatDialog.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.RepeatDialog.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.RepeatDialog.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.RepeatDialog.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.ReplaceDialog.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.ReplaceDialog.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.ReplaceDialog.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.ReplaceDialog.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.SendActivity.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.SendActivity.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.SendActivity.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.SendActivity.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.SetProperty.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.SetProperty.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.SetProperty.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.SetProperty.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.SwitchCondition.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.SwitchCondition.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.SwitchCondition.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.SwitchCondition.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.TraceActivity.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.TraceActivity.schema similarity index 100% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Steps/Microsoft.TraceActivity.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.TraceActivity.schema diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.AdaptiveDialog.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.AdaptiveDialog.schema index c0cd197c51..393535a4ce 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.AdaptiveDialog.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.AdaptiveDialog.schema @@ -33,7 +33,7 @@ "description": "Language generator to use for this dialog. (aka: LG file)" }, "selector": { - "$type": "Microsoft.IRuleSelector", + "$type": "Microsoft.IEventSelector", "title": "Selector", "description": "Policy for how to select rule to execute next" }, @@ -41,7 +41,7 @@ "type": "array", "description": "Array of rules to use to evaluate conversation", "items": { - "$type": "Microsoft.IRule" + "$type": "Microsoft.IOnEvent" } } } diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.ActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnActivity.schema similarity index 78% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.ActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnActivity.schema index 4b0af268a0..f62c1a8c35 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.ActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "Custom Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnActivity", "description": "This defines the actions to take when an custom activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "properties": { diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.BeginDialogRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnBeginDialog.schema similarity index 79% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.BeginDialogRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnBeginDialog.schema index 8203381bd6..4095070302 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.BeginDialogRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnBeginDialog.schema @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.Rule.schema#", - "title": "BeginDialog Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "title": "OnBeginDialog", "description": "This defines the actions to take when a dialog is started via BeginDialog()", "required": [ "actions" diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.ConversationUpdateActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnConversationUpdateActivity.schema similarity index 67% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.ConversationUpdateActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnConversationUpdateActivity.schema index 5af259d2eb..465500dd20 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.ConversationUpdateActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnConversationUpdateActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "ConversationUpdateActivity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnConversationUpdateActivity", "description": "This defines the actions to take when an ConversationUpdate activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EventRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnDialogEvent.schema similarity index 90% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EventRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnDialogEvent.schema index 838d886401..342e5b7527 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EventRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnDialogEvent.schema @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.Rule.schema#", - "title": "Event Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "title": "OnDialogEvent", "description": "Defines a rule for an event which is triggered by some source", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "properties": { diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EndOfConversationActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEndOfConversationActivity.schema similarity index 67% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EndOfConversationActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEndOfConversationActivity.schema index 7082d0c93a..fa0d5068fb 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EndOfConversationActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEndOfConversationActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "EndOfConversation Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnEndOfConversationActivity", "description": "This defines the actions to take when an EndOfConversation Activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.Rule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEvent.schema similarity index 91% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.Rule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEvent.schema index 8e8f981ad7..eb1732a915 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.Rule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEvent.schema @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$role": "unionType(Microsoft.IRule)", - "title": "Event Rule", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnEvent", "description": "Defines a rule for an event which is triggered by some source", "type": "object", "properties": { diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EventActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEventActivity.schema similarity index 68% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EventActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEventActivity.schema index 8b46858b0c..267dfa5613 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.EventActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnEventActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "Event Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnEventActivity", "description": "This defines the actions to take when an Event activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.HandoffActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnHandoffActivity.schema similarity index 68% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.HandoffActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnHandoffActivity.schema index 6f7c9ae63a..be4400e8a8 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.HandoffActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnHandoffActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "Handoff Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnHandoffActivity", "description": "This defines the actions to take when an Handoff activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.IntentRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnIntent.schema similarity index 85% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.IntentRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnIntent.schema index a57e13b344..810c48b4b4 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.IntentRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnIntent.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "Intent Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnIntent", "description": "This defines the actions to take when an Intent is recognized (and optionally entities)", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "properties": { diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.InvokeActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnInvokeActivity.schema similarity index 68% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.InvokeActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnInvokeActivity.schema index 124b21a4d6..f7816564a2 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.InvokeActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnInvokeActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "Invoke Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnInvokeActivity", "description": "This defines the actions to take when an Invoke activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageActivity.schema similarity index 72% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageActivity.schema index be8707ae65..1c0dd47621 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "Message Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnMessageActivity", "description": "This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageDeleteActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageDeleteActivity.schema similarity index 68% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageDeleteActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageDeleteActivity.schema index e9d60f23b9..32e6696f7b 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageDeleteActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageDeleteActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "MessageDelete Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "MessageDeleteActivity", "description": "This defines the actions to take when an MessageDelete activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageReactionActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageReactionActivity.schema similarity index 68% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageReactionActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageReactionActivity.schema index e37a67de88..7cee831828 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageReactionActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageReactionActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "MessageReaction Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "MessageReactionActivity", "description": "This defines the actions to take when a MessageReaction activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageUpdateActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageUpdateActivity.schema similarity index 68% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageUpdateActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageUpdateActivity.schema index ea84ac97b4..a47a4d1cbe 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.MessageUpdateActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnMessageUpdateActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "MessageUpdate Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "MessageUpdateActivity", "description": "This defines the actions to take when an MessageUpdate ctivity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.TypingActivityRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnTypingActivity.schema similarity index 68% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.TypingActivityRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnTypingActivity.schema index 1c0dfe298b..6e9aa2177f 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.TypingActivityRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnTypingActivity.schema @@ -1,13 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.EventRule.schema#", - "$role": "unionType(Microsoft.IRule)", - "title": "Typing Activity Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "$role": "unionType(Microsoft.IOnEvent)", + "title": "TypingActivity", "description": "This defines the actions to take when a Typing activity is received", "type": "object", "allOf": [ { - "$ref": "./Microsoft.Rule.schema" + "$ref": "./Microsoft.OnEvent.schema#" }, { "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.UnknownIntentRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnUnknownIntent.schema similarity index 55% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.UnknownIntentRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnUnknownIntent.schema index 10f28ae50b..7a10939813 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Rules/Microsoft.UnknownIntentRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Events/Microsoft.OnUnknownIntent.schema @@ -1,9 +1,17 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$ref": "./Microsoft.Rule.schema#", - "title": "Unknown Intent Rule", + "$ref": "./Microsoft.OnEvent.schema#", + "title": "OnUnknownIntent", "description": "This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog", - "required": [ - "actions" + "allOf": [ + { + "$ref": "./Microsoft.OnEvent.schema#" + }, + { + "required": [ + "type", + "actions" + ] + } ] } \ No newline at end of file diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IRuleSelector.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IEventSelector.schema similarity index 56% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IRuleSelector.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IEventSelector.schema index 4e518e0f10..8fa88f0780 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IRuleSelector.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IEventSelector.schema @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "title": "Microsoft IRuleSelector", - "description": "Union of components which implement the IRuleSelector interface", + "title": "Microsoft IEventSelector", + "description": "Union of components which implement the IEventSelector interface", "$role": "unionType" } diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IRule.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IOnEvent.schema similarity index 57% rename from libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IRule.schema rename to libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IOnEvent.schema index 8b06eb8419..aa991f6fcf 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IRule.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Microsoft.IOnEvent.schema @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "title": "Microsoft IRule", - "description": "Union of components which implement the IRule interface", + "title": "Microsoft IOnEvent", + "description": "Union of components which implement the IOnEvent interface", "$role": "unionType" } \ No newline at end of file diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.ConditionalSelector.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.ConditionalSelector.schema index 084bcf9739..0ac0e78624 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.ConditionalSelector.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.ConditionalSelector.schema @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "Condtional Rule Selector", + "$role": "unionType(Microsoft.IEventSelector)", + "title": "Condtional Event Selector", "description": "Use a rule selector based on a condition", "type": "object", "properties": { @@ -9,10 +9,10 @@ "$role": "expression" }, "ifTrue": { - "$type": "Microsoft.IRuleSelector" + "$type": "Microsoft.IEventSelector" }, "ifFalse": { - "$type": "Microsoft.IRuleSelector" + "$type": "Microsoft.IEventSelector" } }, "required": [ diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.FirstSelector.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.FirstSelector.schema index 91b9548b21..f2df6890da 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.FirstSelector.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.FirstSelector.schema @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "First Rule Selector", + "$role": "unionType(Microsoft.IEventSelector)", + "title": "First Event Selector", "description": "Selector for first true rule", "type": "object" } \ No newline at end of file diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.MostSpecificSelector.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.MostSpecificSelector.schema index 8cc7ee987a..137631bc47 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.MostSpecificSelector.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.MostSpecificSelector.schema @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "Most Specific Rule Selector", + "$role": "unionType(Microsoft.IEventSelector)", + "title": "Most Specific Event Selector", "description": "Select most specific true rules with optional additional selector", "type": "object", "properties": { "selector": { - "$type": "Microsoft.IRuleSelector" + "$type": "Microsoft.IEventSelector" } } } \ No newline at end of file diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.RandomSelector.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.RandomSelector.schema index be1657b5c6..b062d62a6b 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.RandomSelector.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.RandomSelector.schema @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$role": "unionType(Microsoft.IRuleSelector)", + "$role": "unionType(Microsoft.IEventSelector)", "title": "Random rule selector", "description": "Select most specific true rule", "type": "object", diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.TrueSelector.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.TrueSelector.schema index 36861fc0a7..0af17af6e2 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.TrueSelector.schema +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Selectors/Microsoft.TrueSelector.schema @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/master/packages/DialogSchema/src/dialogSchema.schema", - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "True Rule Selector", + "$role": "unionType(Microsoft.IEventSelector)", + "title": "True Event Selector", "description": "Selector for all true rules", "type": "object" } \ No newline at end of file diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/ConditionalSelector.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/ConditionalSelector.cs index 42f32185ee..e77e83be5a 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/ConditionalSelector.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/ConditionalSelector.cs @@ -12,9 +12,9 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Selectors /// /// Select between two rule selectors based on a condition. /// - public class ConditionalSelector : IRuleSelector + public class ConditionalSelector : IEventSelector { - private IReadOnlyList _rules; + private IReadOnlyList _rules; private bool _evaluate; private Expression condition; @@ -30,14 +30,14 @@ public string Condition /// /// Selector if is true. /// - public IRuleSelector IfTrue { get; set; } + public IEventSelector IfTrue { get; set; } /// /// Selector if is false. /// - public IRuleSelector IfFalse { get; set; } + public IEventSelector IfFalse { get; set; } - public void Initialize(IEnumerable rules, bool evaluate = true) + public void Initialize(IEnumerable rules, bool evaluate = true) { _rules = rules.ToList(); _evaluate = evaluate; @@ -47,7 +47,7 @@ public void Initialize(IEnumerable rules, bool evaluate = true) { var (value, error) = condition.TryEvaluate(context.State); var eval = error == null && (bool)value; - IRuleSelector selector; + IEventSelector selector; if (eval) { selector = IfTrue; diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/FirstSelector.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/FirstSelector.cs index 6483ae9a0e..c8293534ef 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/FirstSelector.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/FirstSelector.cs @@ -8,15 +8,15 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Selectors { /// - /// Select the first true rule implementation of . + /// Select the first true rule implementation of . /// - public class FirstSelector : IRuleSelector + public class FirstSelector : IEventSelector { - private List _rules; + private List _rules; private bool _evaluate; private readonly IExpressionParser _parser = new ExpressionEngine(); - public void Initialize(IEnumerable rules, bool evaluate) + public void Initialize(IEnumerable rules, bool evaluate) { _rules = rules.ToList(); _evaluate = evaluate; diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/MostSpecificSelector.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/MostSpecificSelector.cs index 47b2e31dde..94b8493f7b 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/MostSpecificSelector.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/MostSpecificSelector.cs @@ -9,18 +9,18 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Selectors { /// - /// Select the most specific true rule implementation of . + /// Select the most specific true rule implementation of . /// - public class MostSpecificSelector : IRuleSelector + public class MostSpecificSelector : IEventSelector { private readonly TriggerTree _tree = new TriggerTree(); /// /// Optional rule selector to use when more than one most specific rule is true. /// - public IRuleSelector Selector { get; set; } + public IEventSelector Selector { get; set; } - public void Initialize(IEnumerable rules, bool evaluate) + public void Initialize(IEnumerable rules, bool evaluate) { var i = 0; var parser = new ExpressionEngine(TriggerTree.LookupFunction); @@ -43,7 +43,7 @@ public async Task> Select(SequenceContext context, Cancellati { foreach (var trigger in node.AllTriggers) { - var (pos, rule) = (ValueTuple)trigger.Action; + var (pos, rule) = (ValueTuple)trigger.Action; matches.Add(pos); } } @@ -51,12 +51,12 @@ public async Task> Select(SequenceContext context, Cancellati } else { - var matches = new List>(); + var matches = new List>(); foreach (var node in nodes) { foreach (var trigger in node.AllTriggers) { - matches.Add((ValueTuple)trigger.Action); + matches.Add((ValueTuple)trigger.Action); } } // Sort rules by original order and then pass to child selector diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/RandomSelector.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/RandomSelector.cs index a61e87a937..9e43663362 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/RandomSelector.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/RandomSelector.cs @@ -11,9 +11,9 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Selectors /// /// Select a random true rule implementation of IRuleSelector. /// - public class RandomSelector : IRuleSelector + public class RandomSelector : IEventSelector { - private List _rules; + private List _rules; private bool _evaluate; private Random _rand; private int _seed = -1; @@ -33,7 +33,7 @@ public int Seed } } - public void Initialize(IEnumerable rules, bool evaluate) + public void Initialize(IEnumerable rules, bool evaluate) { _rules = rules.ToList(); _evaluate = evaluate; diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/TrueSelector.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/TrueSelector.cs index 8494dc3f69..1e8eeceb01 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/TrueSelector.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Selectors/TrueSelector.cs @@ -11,12 +11,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Selectors /// /// Select all rules which evaluate to true. /// - public class TrueSelector : IRuleSelector + public class TrueSelector : IEventSelector { - private List _rules; + private List _rules; private bool _evaluate; - public void Initialize(IEnumerable rules, bool evaluate = true) + public void Initialize(IEnumerable rules, bool evaluate = true) { _rules = rules.ToList(); _evaluate = evaluate; diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/DeclarativeTypeLoader.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/DeclarativeTypeLoader.cs index d21fd4b3b2..bbacc35cb1 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/DeclarativeTypeLoader.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/DeclarativeTypeLoader.cs @@ -54,7 +54,7 @@ private static T _load(Source.IRegistry registry, IRefResolver refResolver, S Converters = new List() { new InterfaceConverter(refResolver, registry, paths), - new InterfaceConverter(refResolver, registry, paths), + new InterfaceConverter(refResolver, registry, paths), new InterfaceConverter(refResolver, registry, paths), new InterfaceConverter(refResolver, registry, paths), new LanguageGeneratorConverter(refResolver, registry, paths), diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/Types/Factory.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/Types/Factory.cs index 05dc33d33f..57a1d71f64 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/Types/Factory.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/Types/Factory.cs @@ -12,7 +12,7 @@ using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Adaptive.Input; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; @@ -124,22 +124,22 @@ public static void RegisterAdaptiveTypes() //TODO: we don't want this static initialization, leaving it here for convenience now // while things are changing rapidly still - // Rules - Register("Microsoft.EventRule", typeof(EventRule)); - Register("Microsoft.IntentRule", typeof(IntentRule)); - Register("Microsoft.UnknownIntentRule", typeof(UnknownIntentRule)); - Register("Microsoft.BeginDialogRule", typeof(BeginDialogRule)); - Register("Microsoft.ActivityRule", typeof(ActivityRule)); - Register("Microsoft.MessageActivityRule", typeof(MessageActivityRule)); - Register("Microsoft.MessageUpdateActivityRule", typeof(MessageUpdateActivityRule)); - Register("Microsoft.MessageDeleteActivityRule", typeof(MessageDeleteActivityRule)); - Register("Microsoft.MessageReactionActivityRule", typeof(MessageReactionActivityRule)); - Register("Microsoft.EventActivityRule", typeof(EventActivityRule)); - Register("Microsoft.InvokeActivityRule", typeof(InvokeActivityRule)); - Register("Microsoft.ConversationUpdateActivityRule", typeof(ConversationUpdateActivityRule)); - Register("Microsoft.EndOfConversationActivityRule", typeof(EndOfConversationActivityRule)); - Register("Microsoft.TypingActivityRule", typeof(TypingActivityRule)); - Register("Microsoft.HandoffActivityRule", typeof(HandoffActivityRule)); + // Events + Register("Microsoft.OnDialogEvent", typeof(Adaptive.Events.OnDialogEvent)); + Register("Microsoft.OnIntent", typeof(OnIntent)); + Register("Microsoft.OnUnknownIntent", typeof(OnUnknownIntent)); + Register("Microsoft.OnBeginDialog", typeof(OnBeginDialog)); + Register("Microsoft.OnActivity", typeof(OnActivity)); + Register("Microsoft.OnMessageActivity", typeof(OnMessageActivity)); + Register("Microsoft.OnMessageUpdateActivity", typeof(OnMessageUpdateActivity)); + Register("Microsoft.OnMessageDeleteActivity", typeof(OnMessageDeleteActivity)); + Register("Microsoft.OnMessageReactionActivity", typeof(OnMessageReactionActivity)); + Register("Microsoft.OnEventActivity", typeof(OnEventActivity)); + Register("Microsoft.OnInvokeActivity", typeof(OnInvokeActivity)); + Register("Microsoft.OnConversationUpdateActivity", typeof(OnConversationUpdateActivity)); + Register("Microsoft.OnEndOfConversationActivity", typeof(OnEndOfConversationActivity)); + Register("Microsoft.OnTypingActivity", typeof(OnTypingActivity)); + Register("Microsoft.OnHandoffActivity", typeof(OnHandoffActivity)); // Actions Register("Microsoft.BeginDialog", typeof(BeginDialog)); @@ -156,7 +156,7 @@ public static void RegisterAdaptiveTypes() Register("Microsoft.HttpRequest", typeof(HttpRequest)); Register("Microsoft.IfCondition", typeof(IfCondition)); Register("Microsoft.InitProperty", typeof(InitProperty)); - Register("Microsoft.LogStep", typeof(LogStep)); + Register("Microsoft.LogStep", typeof(LogAction)); Register("Microsoft.RepeatDialog", typeof(RepeatDialog)); Register("Microsoft.ReplaceDialog", typeof(ReplaceDialog)); Register("Microsoft.SendActivity", typeof(SendActivity)); diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/01 - Steps/Actions.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/01 - Steps/Actions.main.dialog index adf1e4d0c3..f5d2ad77f4 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/01 - Steps/Actions.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/01 - Steps/Actions.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/02 - EndTurn/EndTurn.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/02 - EndTurn/EndTurn.main.dialog index a186fb243e..bbb43f7673 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/02 - EndTurn/EndTurn.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/02 - EndTurn/EndTurn.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules":[ + "events":[ { - "$type":"Microsoft.BeginDialogRule", + "$type":"Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/IfCondition.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/IfCondition.main.dialog index 06c3d22bec..d714f686dc 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/IfCondition.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/IfCondition.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules":[ + "events":[ { - "$type":"Microsoft.BeginDialogRule", + "$type":"Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/SwitchCondition.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/SwitchCondition.main.dialog index 51b1058647..8c6a77a5f3 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/SwitchCondition.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/03 - IfCondition/SwitchCondition.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SetProperty", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/NumberInput.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/NumberInput.main.dialog index 3ac886f7cc..d03608736f 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/NumberInput.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/NumberInput.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.NumberInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.WithoutProperty.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.WithoutProperty.main.dialog index ca6c617a38..0d08b96191 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.WithoutProperty.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.WithoutProperty.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.TextInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.main.dialog index 985b5c4e4c..b3aa3c6c5d 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/04 - TextInput/TextInput.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/05 - WelcomeRule/WelcomeRule.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/05 - WelcomeRule/WelcomeRule.main.dialog index 985b5c4e4c..b3aa3c6c5d 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/05 - WelcomeRule/WelcomeRule.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/05 - WelcomeRule/WelcomeRule.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/06 - DoSteps/DoActions.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/06 - DoSteps/DoActions.main.dialog index 6e781ccd2d..721fc8b71e 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/06 - DoSteps/DoActions.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/06 - DoSteps/DoActions.main.dialog @@ -10,9 +10,9 @@ "CancelIntent": "(?i)cancel" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", @@ -36,7 +36,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "JokeIntent", "actions": [ { @@ -53,7 +53,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "FortuneTellerIntent", "actions": [ { @@ -71,7 +71,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { @@ -84,7 +84,7 @@ ] }, { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.FortuneTellerDialog.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.FortuneTellerDialog.dialog index a41ed2b844..6204623693 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.FortuneTellerDialog.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.FortuneTellerDialog.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.TellJokeDialog.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.TellJokeDialog.dialog index f7e8a97af9..882e5dd3c6 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.TellJokeDialog.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.TellJokeDialog.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.main.dialog index 402f570b8c..516d413c10 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/07 - BeginDialog/BeginDialog.main.dialog @@ -10,9 +10,9 @@ "CancelIntent": "(?i)cancel" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", @@ -36,21 +36,21 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "JokeIntent", "actions": [ "BeginDialog.TellJokeDialog" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "FortuneTellerIntent", "actions": [ "BeginDialog.FortuneTellerDialog" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { @@ -63,7 +63,7 @@ ] }, { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.FortuneTeller.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.FortuneTeller.dialog index 91923a6e4e..b4e6cd1e66 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.FortuneTeller.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.FortuneTeller.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "ExternalLanguage.main.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.Greeting.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.Greeting.dialog index c7a8a0b4aa..321b2f8b50 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.Greeting.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.Greeting.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "ExternalLanguage.main.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.TellJoke.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.TellJoke.dialog index 0712f9cec9..717cf72825 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.TellJoke.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.TellJoke.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "ExternalLanguage.main.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.main.dialog index 7dfec98c0c..7ec6cf0772 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/08 - ExternalLanguage/ExternalLanguage.main.dialog @@ -13,9 +13,9 @@ "CancelIntent": "(?i)cancel" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", @@ -25,28 +25,28 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "JokeIntent", "actions": [ "ExternalLanguage.TellJoke" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "FortuneTellerIntent", "actions": [ "ExternalLanguage.FortuneTeller" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "GreetingIntent", "actions": [ "ExternalLanguage.Greeting" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "HelpIntent", "actions": [ { @@ -56,7 +56,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { @@ -69,7 +69,7 @@ ] }, { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.TellJoke.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.TellJoke.dialog index 9ed1ce705d..caf994b181 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.TellJoke.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.TellJoke.dialog @@ -7,9 +7,9 @@ "CancelIntent": "(?i)cancel|never mind" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", @@ -25,7 +25,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.main.dialog index 02b37c076b..2fa97da387 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/09 - EndDialog/EndDialog.main.dialog @@ -9,9 +9,9 @@ "CancelIntent": "(?i)cancel|never mind" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", @@ -35,7 +35,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "cancelDialog" ], @@ -50,7 +50,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "JokeIntent", "actions": [ "EndDialog.TellJoke" diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/10 - ChoiceInput/ChoiceInput.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/10 - ChoiceInput/ChoiceInput.main.dialog index 40171ca077..236d4b6227 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/10 - ChoiceInput/ChoiceInput.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/10 - ChoiceInput/ChoiceInput.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.ChoiceInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/11 - HttpRequest/HttpRequest.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/11 - HttpRequest/HttpRequest.main.dialog index fea2535018..0e354dbc6f 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/11 - HttpRequest/HttpRequest.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/11 - HttpRequest/HttpRequest.main.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "$id": "root", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.TextInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/12 - GithubIssueBot/GithubIssueBot.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/12 - GithubIssueBot/GithubIssueBot.main.dialog index 0d1a4e09b6..898ad77f06 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/12 - GithubIssueBot/GithubIssueBot.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/12 - GithubIssueBot/GithubIssueBot.main.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "GithubIssueBot.main.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/CustomStep.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/CustomStep.main.dialog index 6ca2d689a5..6112d1ee92 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/CustomStep.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/CustomStep.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.NumberInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/JavascriptStep.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/JavascriptStep.main.dialog index 55808dbdb4..ee1c1421e5 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/JavascriptStep.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/13 - CustomStep/JavascriptStep.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.NumberInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/14 - RepeatDialog/RepeatDialog.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/14 - RepeatDialog/RepeatDialog.main.dialog index 239827649b..f2e355f3c8 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/14 - RepeatDialog/RepeatDialog.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/14 - RepeatDialog/RepeatDialog.main.dialog @@ -8,9 +8,9 @@ "cancel": "cancel" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", @@ -35,7 +35,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "cancel", "actions": [ { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/15 - TraceAndLog/TraceAndLog.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/15 - TraceAndLog/TraceAndLog.main.dialog index a8fb5bf842..68ceaabc5e 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/15 - TraceAndLog/TraceAndLog.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/15 - TraceAndLog/TraceAndLog.main.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "$id": "root", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.TextInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/16 - EditSteps/EditActions.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/16 - EditSteps/EditActions.main.dialog index b08cac75fb..07eac7482f 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/16 - EditSteps/EditActions.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/16 - EditSteps/EditActions.main.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.EditActions", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/AskForName.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/AskForName.dialog index 6b330521b7..b225a89855 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/AskForName.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/AskForName.dialog @@ -5,9 +5,9 @@ "$name": "dialog.name" }, "defaultResultProperty": "$name", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.TextInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/BugRepo.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/BugRepo.main.dialog index 723d942767..a1917fd879 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/BugRepo.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/BugRepo/BugRepo.main.dialog @@ -11,9 +11,9 @@ "End": "end" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "End", "actions": [ { @@ -22,7 +22,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "Test", "actions": [ { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarClearUserData.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarClearUserData.dialog index 5ec6ee2f0f..e56ec5120e 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarClearUserData.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarClearUserData.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ // Reset data { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarNextPage.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarNextPage.dialog index dc96c759d6..b4d7950b1d 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarNextPage.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/CalendarNextPage.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SetProperty", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetDisplayMeetings.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetDisplayMeetings.dialog index c5c0e807e4..076c9e0b63 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetDisplayMeetings.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetDisplayMeetings.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ "GetMeetingsService", { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetNewEndDateTime.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetNewEndDateTime.dialog index a728c0e5c4..98536529bf 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetNewEndDateTime.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Controller/GetNewEndDateTime.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ // todo: need a subtract expression of two timestamp //{ diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/AcceptMeeting/AcceptMeeting.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/AcceptMeeting/AcceptMeeting.dialog index fd7376da22..1e40f088e8 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/AcceptMeeting/AcceptMeeting.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/AcceptMeeting/AcceptMeeting.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CalendarBot.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CalendarBot.main.dialog index 22095498fa..a3c1a97682 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CalendarBot.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CalendarBot.main.dialog @@ -16,9 +16,9 @@ "CancelIntent": "(?i)cancel" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", @@ -27,7 +27,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowMeetingIntent", "actions": [ // should be initialize @@ -37,7 +37,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CreateMeetingIntent", "actions": [ // should be initialize @@ -47,7 +47,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "UpdateMeetingIntent", "actions": [ // should be initialize @@ -57,7 +57,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "AcceptMeetingIntent", "actions": [ // should be initialize @@ -67,7 +67,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "DeclineMeetingIntent", "actions": [ // should be initialize @@ -77,7 +77,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "HelpIntent", "actions": [ { @@ -87,7 +87,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { @@ -96,7 +96,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowNextPageIntent", "actions": [ "CalendarNextPage", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CreateMeeting/CreateMeeting.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CreateMeeting/CreateMeeting.dialog index e641159e9d..189f32a9d8 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CreateMeeting/CreateMeeting.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/CreateMeeting/CreateMeeting.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ "CalendarFindContact", { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/DeclineMeeting/DeclineMeeting.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/DeclineMeeting/DeclineMeeting.dialog index 081edc19a2..22279ca5e7 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/DeclineMeeting/DeclineMeeting.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/DeclineMeeting/DeclineMeeting.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindContact.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindContact.dialog index 9c81045be0..6bdff0206b 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindContact.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindContact.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.TextInput", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindSingleContact.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindSingleContact.dialog index b8483075e1..b58e8bfd1a 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindSingleContact.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/FindContact/CalendarFindSingleContact.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.OAuthPrompt", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/ShowMeeting/ShowMeeting.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/ShowMeeting/ShowMeeting.dialog index 5626a3e396..62e2a793d3 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/ShowMeeting/ShowMeeting.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/ShowMeeting/ShowMeeting.dialog @@ -12,9 +12,9 @@ "DeclineMeetingIntent": "(?i)decline meeting" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ "GetDisplayMeetings", { @@ -94,21 +94,21 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "UpdateMeetingIntent", "actions": [ "UpdateMeeting" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "AcceptMeetingIntent", "actions": [ "AcceptMeeting" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "DeclineMeetingIntent", "actions": [ "DeclineMeeting" diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/UpdateMeeting/UpdateMeeting.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/UpdateMeeting/UpdateMeeting.dialog index d90b0bdb1e..d5f61ecc35 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/UpdateMeeting/UpdateMeeting.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Dialog/UpdateMeeting/UpdateMeeting.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/AcceptMeetingService.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/AcceptMeetingService.dialog index af07163425..89620e4d8d 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/AcceptMeetingService.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/AcceptMeetingService.dialog @@ -1,9 +1,9 @@ { "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/CreateMeetingService.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/CreateMeetingService.dialog index ef0aa87670..3c7f60f3f9 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/CreateMeetingService.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/CreateMeetingService.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/DeclineMeetingService.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/DeclineMeetingService.dialog index e987af628c..f20a6dbff4 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/DeclineMeetingService.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/DeclineMeetingService.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/GetContactService.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/GetContactService.dialog index 5c918e5e39..9f166e1cd0 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/GetContactService.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/CalendarBot/Service/MSGraph/GetContactService.dialog @@ -1,9 +1,9 @@ { "$schema": "../../../../app.schema", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.IfCondition", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/EmailBot.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/EmailBot.main.dialog index 77746e98d7..a7e0e3b84e 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/EmailBot.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/EmailBot.main.dialog @@ -15,9 +15,9 @@ "CancelIntent": "(?i)cancel|never mind" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", @@ -26,7 +26,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { @@ -39,7 +39,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowEmailIntent", "actions": [ "ClearUserData", @@ -47,7 +47,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowNextPageIntent", "actions": [ "NextPage", @@ -55,7 +55,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "SendEmailIntent", "actions": [ "ClearUserData", @@ -63,7 +63,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "FindContactIntent", "actions": [ "ClearUserData", @@ -71,7 +71,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ForwardEmailIntent", "actions": [ "ClearUserData", @@ -79,7 +79,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ReplyEmailIntent", "actions": [ "ClearUserData", @@ -87,7 +87,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "HelpIntent", "actions": [ { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/ShowEmail/ShowEmail.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/ShowEmail/ShowEmail.dialog index 7dc2deff83..fa0b602b30 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/ShowEmail/ShowEmail.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/EmailBot/Dialogs/ShowEmail/ShowEmail.dialog @@ -10,23 +10,23 @@ "ShowEmailIntent": "(?i)show" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ForwardEmailIntent", "actions": [ "ForwardEmail" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ReplyEmailIntent", "actions": [ "ReplyEmail" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowNextPageIntent", "actions": [ "NextPage", @@ -34,7 +34,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowEmailIntent", "actions": [ "DisplayEmailList" diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/Sandwich/sandwich.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/Sandwich/sandwich.main.dialog index 50fa0da712..7124694e07 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/Sandwich/sandwich.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/Sandwich/sandwich.main.dialog @@ -3,17 +3,17 @@ "autoEndDialog": false, "generator": "sandwich.lg", "recognizer": "OrderSandwichApp.lu", - "rules": [ + "events": [ { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "actions": [ { "$comment": "**** Primary ordering dialog ****", "$type": "Microsoft.AdaptiveDialog", - "rules": [ + "events": [ { "$comment": "**** Start of slot mapping over conversation.order as frame ****", - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -29,7 +29,7 @@ "value": "first(@meat[0])" }, { - "$comment": "This is a mechanism to keep the rule from running more than once per turn.", + "$comment": "This is a mechanism to keep the event from running more than once per turn.", "$type": "Microsoft.SetProperty", "property": "turn.setmeat", "value": "true" @@ -42,7 +42,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -70,7 +70,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -98,7 +98,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -126,7 +126,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -155,7 +155,7 @@ }, { "$comment": "**** This is the start of prompts ****", - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -168,7 +168,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -181,7 +181,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -194,7 +194,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "$comment": "Should update this to use actual http with failure.", "events": [ "recognizedIntent" @@ -213,7 +213,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -234,7 +234,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "$comment": "This is the kind of thing we should build in a default for.", "events": [ "recognizedIntent" @@ -247,7 +247,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -260,7 +260,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -273,8 +273,8 @@ ] }, { - "$comment": "*** Ideally these would be a generic template rule against any slot value. ***", - "$type": "Microsoft.EventRule", + "$comment": "*** Ideally these would be a generic template event against any slot value. ***", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -290,7 +290,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -303,7 +303,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -316,7 +316,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "recognizedIntent" ], @@ -332,7 +332,7 @@ } ], "intent": "OrderSandwich", - "$comment": "**** This is the start of top-level intent rules ****", + "$comment": "**** This is the start of top-level intent events ****", "$designer": { "createdAt": "2019-05-14T20:33:33.353Z", "updatedAt": "2019-05-14T20:33:33.451Z", @@ -340,7 +340,7 @@ } }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "SandwichOptions", "actions": [ { @@ -350,7 +350,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "BreadOptions", "actions": [ { @@ -360,7 +360,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ToppingOptions", "actions": [ { @@ -370,7 +370,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CheeseOptions", "actions": [ { @@ -380,7 +380,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "Greeting", "actions": [ { @@ -390,7 +390,7 @@ ] }, { - "$type": "Microsoft.EventRule", + "$type": "Microsoft.OnDialogEvent", "events": [ "beginDialog" ], diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/AddToDo.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/AddToDo.dialog index f52f213173..e5ec20898c 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/AddToDo.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/AddToDo.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "todo.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SetProperty", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ClearToDos.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ClearToDos.dialog index 7a2579f7f7..a39309d73e 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ClearToDos.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ClearToDos.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "todo.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/DeleteToDo.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/DeleteToDo.dialog index 0e3172f0ed..2ea3c1b783 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/DeleteToDo.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/DeleteToDo.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "todo.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ShowToDos.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ShowToDos.dialog index 01a3767280..c77e1b669b 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ShowToDos.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ShowToDos.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "todo.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ToDoBot.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ToDoBot.main.dialog index 426d476bf7..9ce86de8df 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ToDoBot.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoBot/ToDoBot.main.dialog @@ -14,9 +14,9 @@ "CancelIntent": "(?i)cancel|never mind" } }, - "rules": [ + "events": [ { - "$type":"Microsoft.BeginDialogRule", + "$type":"Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", @@ -25,35 +25,35 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "AddIntent", "actions": [ "AddToDo" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "DeleteIntent", "actions": [ "DeleteToDo" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ClearIntent", "actions": [ "ClearToDos" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowIntent", "actions": [ "ShowToDos" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "HelpIntent", "actions": [ { @@ -63,7 +63,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { @@ -76,7 +76,7 @@ ] }, { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.AddItem.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.AddItem.dialog index 7a9b601375..2a822fece2 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.AddItem.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.AddItem.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "ToDoLuisBot.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SetProperty", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.DeleteItem.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.DeleteItem.dialog index c5a8748543..2c7a291808 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.DeleteItem.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.DeleteItem.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "ToDoLuisBot.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SetProperty", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.ShowItems.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.ShowItems.dialog index 6da6c55ee6..f2e744b753 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.ShowItems.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.ShowItems.dialog @@ -2,9 +2,9 @@ "$schema": "../../app.schema", "$type": "Microsoft.AdaptiveDialog", "generator": "ToDoLuisBot.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SetProperty", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.main.dialog index fc529c9162..b7fe8232f7 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/ToDoLuisBot/ToDoLuisBot.main.dialog @@ -5,9 +5,9 @@ "autoEndDialog": false, "generator": "ToDoLuisBot.lg", "recognizer": "ToDoLuis.lu", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", @@ -16,28 +16,28 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "AddToDo", "actions": [ "ToDoLuisBot.AddItem" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "DeleteToDo", "actions": [ "ToDoLuisBot.DeleteItem" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ShowToDo", "actions": [ "ToDoLuisBot.ShowItems" ] }, { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/VARootDialog/VARootDialog.main.dialog b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/VARootDialog/VARootDialog.main.dialog index 93c51cafa1..61f6879a7e 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/VARootDialog/VARootDialog.main.dialog +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/Samples/VARootDialog/VARootDialog.main.dialog @@ -12,30 +12,30 @@ "CancelIntent":"(?i)cancel" } }, - "rules": [ + "events": [ { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "ToDoIntent", "actions": [ "ToDoBot.main" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "EmailIntent", "actions": [ "EmailBot.main" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CalendarIntent", "actions": [ "CalendarBot.main" ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "HelpIntent", "actions": [ { @@ -45,7 +45,7 @@ ] }, { - "$type": "Microsoft.IntentRule", + "$type": "Microsoft.OnIntent", "intent": "CancelIntent", "actions": [ { @@ -54,7 +54,7 @@ ] }, { - "$type": "Microsoft.UnknownIntentRule", + "$type": "Microsoft.OnUnknownIntent", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/TestBot.cs b/samples/Microsoft.Bot.Builder.TestBot.Json/TestBot.cs index 90aa24d25b..6c0f55c9c4 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/TestBot.cs +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/TestBot.cs @@ -11,7 +11,7 @@ using Microsoft.Bot.Builder.Dialogs.Adaptive; using Microsoft.Bot.Builder.Dialogs.Adaptive.Input; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Choices; using Microsoft.Bot.Builder.Dialogs.Debugging; @@ -76,7 +76,7 @@ private void LoadDialogs() handleChoice.Cases.Add(new Case($"{name}", new List() { dialog })); } choiceInput.Style = ListStyle.Auto; - rootDialog.Rules.Add(new BeginDialogRule() + rootDialog.Events.Add(new OnBeginDialog() { Actions = new List() { diff --git a/samples/Microsoft.Bot.Builder.TestBot.Json/app.schema b/samples/Microsoft.Bot.Builder.TestBot.Json/app.schema index 42f6f8dad5..5d37ef50fb 100644 --- a/samples/Microsoft.Bot.Builder.TestBot.Json/app.schema +++ b/samples/Microsoft.Bot.Builder.TestBot.Json/app.schema @@ -5,11 +5,6 @@ "title": "Component types", "description": "These are all of the types that can be created by the loader.", "oneOf": [ - { - "title": "Microsoft.ActivityRule", - "description": "This defines the actions to take when an custom activity is received", - "$ref": "#/definitions/Microsoft.ActivityRule" - }, { "title": "Microsoft.AdaptiveDialog", "description": "Configures a data driven dialog via a collection of actions/dialogs.", @@ -25,11 +20,6 @@ "description": "Step which begins another dialog (and when that dialog is done, it will return the caller).", "$ref": "#/definitions/Microsoft.BeginDialog" }, - { - "title": "Microsoft.BeginDialogRule", - "description": "This defines the actions to take when a dialog is started via BeginDialog()", - "$ref": "#/definitions/Microsoft.BeginDialogRule" - }, { "title": "Microsoft.CancelAllDialogs", "description": "Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.", @@ -50,11 +40,6 @@ "description": "This represents a dialog which gathers a yes/no style responses", "$ref": "#/definitions/Microsoft.ConfirmInput" }, - { - "title": "Microsoft.ConversationUpdateActivityRule", - "description": "This defines the actions to take when an ConversationUpdate activity is received", - "$ref": "#/definitions/Microsoft.ConversationUpdateActivityRule" - }, { "title": "Microsoft.DateTimeInput", "description": "This represents a dialog which gathers Date or Time or DateTime from the user", @@ -90,26 +75,11 @@ "description": "Command which ends the current dialog, returning the resultProperty as the result of the dialog.", "$ref": "#/definitions/Microsoft.EndDialog" }, - { - "title": "Microsoft.EndOfConversationActivityRule", - "description": "This defines the actions to take when an EndOfConversation Activity is received", - "$ref": "#/definitions/Microsoft.EndOfConversationActivityRule" - }, { "title": "Microsoft.EndTurn", "description": "End the current turn without ending the dialog.", "$ref": "#/definitions/Microsoft.EndTurn" }, - { - "title": "Microsoft.EventActivityRule", - "description": "This defines the actions to take when an Event activity is received", - "$ref": "#/definitions/Microsoft.EventActivityRule" - }, - { - "title": "Microsoft.EventRule", - "description": "Defines a rule for an event which is triggered by some source", - "$ref": "#/definitions/Microsoft.EventRule" - }, { "title": "Microsoft.FirstSelector", "description": "Selector for first true rule", @@ -125,11 +95,6 @@ "description": "Step which execute actions per item page in a collection.", "$ref": "#/definitions/Microsoft.ForeachPage" }, - { - "title": "Microsoft.HandoffActivityRule", - "description": "This defines the actions to take when an Handoff activity is received", - "$ref": "#/definitions/Microsoft.HandoffActivityRule" - }, { "title": "Microsoft.HttpRequest", "description": "This is a step which replaces the current dialog with the target dialog", @@ -145,25 +110,15 @@ "description": "This step allows you to innitial a property to either an object or array", "$ref": "#/definitions/Microsoft.InitProperty" }, - { - "title": "Microsoft.IntentRule", - "description": "This defines the actions to take when an Intent is recognized (and optionally entities)", - "$ref": "#/definitions/Microsoft.IntentRule" - }, - { - "title": "Microsoft.InvokeActivityRule", - "description": "This defines the actions to take when an Invoke activity is received", - "$ref": "#/definitions/Microsoft.InvokeActivityRule" - }, { "title": "Microsoft.LanguagePolicy", "description": "This represents a dialog which gathers a DateTime in a specified range", "$ref": "#/definitions/Microsoft.LanguagePolicy" }, { - "title": "Microsoft.LogStep", + "title": "Microsoft.LogAction", "description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding", - "$ref": "#/definitions/Microsoft.LogStep" + "$ref": "#/definitions/Microsoft.LogAction" }, { "title": "Microsoft.LuisRecognizer", @@ -171,39 +126,99 @@ "$ref": "#/definitions/Microsoft.LuisRecognizer" }, { - "title": "Microsoft.MessageActivityRule", + "title": "Microsoft.MostSpecificSelector", + "description": "Select most specific true rules with optional additional selector", + "$ref": "#/definitions/Microsoft.MostSpecificSelector" + }, + { + "title": "Microsoft.MultiLanguageRecognizer", + "description": "Recognizer which allows you to configure the recognizer per language, and to define the policy for using them", + "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" + }, + { + "title": "Microsoft.NumberInput", + "description": "This represents a dialog which gathers a decimal number in a specified range", + "$ref": "#/definitions/Microsoft.NumberInput" + }, + { + "title": "Microsoft.OnActivity", + "description": "This defines the actions to take when an custom activity is received", + "$ref": "#/definitions/Microsoft.OnActivity" + }, + { + "title": "Microsoft.OnBeginDialog", + "description": "This defines the actions to take when a dialog is started via BeginDialog()", + "$ref": "#/definitions/Microsoft.OnBeginDialog" + }, + { + "title": "Microsoft.OnConversationUpdateActivity", + "description": "This defines the actions to take when an ConversationUpdate activity is received", + "$ref": "#/definitions/Microsoft.OnConversationUpdateActivity" + }, + { + "title": "Microsoft.OnDialogEvent", + "description": "Defines a rule for an event which is triggered by some source", + "$ref": "#/definitions/Microsoft.OnDialogEvent" + }, + { + "title": "Microsoft.OnEndOfConversationActivity", + "description": "This defines the actions to take when an EndOfConversation Activity is received", + "$ref": "#/definitions/Microsoft.OnEndOfConversationActivity" + }, + { + "title": "Microsoft.OnEvent", + "description": "Defines a rule for an event which is triggered by some source", + "$ref": "#/definitions/Microsoft.OnEvent" + }, + { + "title": "Microsoft.OnEventActivity", + "description": "This defines the actions to take when an Event activity is received", + "$ref": "#/definitions/Microsoft.OnEventActivity" + }, + { + "title": "Microsoft.OnHandoffActivity", + "description": "This defines the actions to take when an Handoff activity is received", + "$ref": "#/definitions/Microsoft.OnHandoffActivity" + }, + { + "title": "Microsoft.OnIntent", + "description": "This defines the actions to take when an Intent is recognized (and optionally entities)", + "$ref": "#/definitions/Microsoft.OnIntent" + }, + { + "title": "Microsoft.OnInvokeActivity", + "description": "This defines the actions to take when an Invoke activity is received", + "$ref": "#/definitions/Microsoft.OnInvokeActivity" + }, + { + "title": "Microsoft.OnMessageActivity", "description": "This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation", - "$ref": "#/definitions/Microsoft.MessageActivityRule" + "$ref": "#/definitions/Microsoft.OnMessageActivity" }, { - "title": "Microsoft.MessageDeleteActivityRule", + "title": "Microsoft.OnMessageDeleteActivity", "description": "This defines the actions to take when an MessageDelete activity is received", - "$ref": "#/definitions/Microsoft.MessageDeleteActivityRule" + "$ref": "#/definitions/Microsoft.OnMessageDeleteActivity" }, { - "title": "Microsoft.MessageReactionActivityRule", + "title": "Microsoft.OnMessageReactionActivity", "description": "This defines the actions to take when a MessageReaction activity is received", - "$ref": "#/definitions/Microsoft.MessageReactionActivityRule" + "$ref": "#/definitions/Microsoft.OnMessageReactionActivity" }, { - "title": "Microsoft.MessageUpdateActivityRule", + "title": "Microsoft.OnMessageUpdateActivity", "description": "This defines the actions to take when an MessageUpdate ctivity is received", - "$ref": "#/definitions/Microsoft.MessageUpdateActivityRule" + "$ref": "#/definitions/Microsoft.OnMessageUpdateActivity" }, { - "title": "Microsoft.MostSpecificSelector", - "description": "Select most specific true rules with optional additional selector", - "$ref": "#/definitions/Microsoft.MostSpecificSelector" - }, - { - "title": "Microsoft.MultiLanguageRecognizer", - "description": "Recognizer which allows you to configure the recognizer per language, and to define the policy for using them", - "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" + "title": "Microsoft.OnTypingActivity", + "description": "This defines the actions to take when a Typing activity is received", + "$ref": "#/definitions/Microsoft.OnTypingActivity" }, { - "title": "Microsoft.NumberInput", - "description": "This represents a dialog which gathers a decimal number in a specified range", - "$ref": "#/definitions/Microsoft.NumberInput" + "title": "Microsoft.OnUnknownIntent", + "description": "This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog", + "$ref": "#/definitions/Microsoft.OnUnknownIntent" }, { "title": "Microsoft.QnAMakerDialog", @@ -230,11 +245,6 @@ "description": "This is a step which replaces the current dialog with the target dialog", "$ref": "#/definitions/Microsoft.ReplaceDialog" }, - { - "title": "Microsoft.Rule", - "description": "Defines a rule for an event which is triggered by some source", - "$ref": "#/definitions/Microsoft.Rule" - }, { "title": "Microsoft.SendActivity", "description": "This is a step which sends an activity to the user", @@ -265,16 +275,6 @@ "description": "Selector for all true rules", "$ref": "#/definitions/Microsoft.TrueSelector" }, - { - "title": "Microsoft.TypingActivityRule", - "description": "This defines the actions to take when a Typing activity is received", - "$ref": "#/definitions/Microsoft.TypingActivityRule" - }, - { - "title": "Microsoft.UnknownIntentRule", - "description": "This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog", - "$ref": "#/definitions/Microsoft.UnknownIntentRule" - }, { "title": "Testbot.JavascriptStep", "description": "This gives you the ability to execute javascript to manipulate memory", @@ -287,82 +287,6 @@ } ], "definitions": { - "Microsoft.ActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Custom Activity Rule", - "description": "This defines the actions to take when an custom activity is received", - "type": "object", - "properties": { - "$type": { - "title": "$type", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ActivityRule" - }, - "$copy": { - "title": "$copy", - "description": "Copy the definition by id from a .dialog file.", - "type": "string", - "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" - }, - "$id": { - "title": "$id", - "description": "Inline id for reuse of an inline definition", - "type": "string", - "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" - }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." - }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", - "examples": [ - "user.vip == true" - ], - "type": "string" - }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "type": { - "type": "string", - "title": "Type", - "description": "Activity type" - } - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "type": "string" - } - }, - "anyOf": [ - { - "title": "Reference", - "required": [ - "$copy" - ] - }, - { - "title": "Type", - "required": [ - "actions", - "type", - "$type" - ] - } - ] - }, "Microsoft.AdaptiveDialog": { "$role": "unionType(Microsoft.IDialog)", "title": "Adaptive Dialog", @@ -449,17 +373,17 @@ "$ref": "#/definitions/Microsoft.ILanguageGenerator" }, "selector": { - "$type": "Microsoft.IRuleSelector", + "$type": "Microsoft.IEventSelector", "title": "Selector", "description": "Policy for how to select rule to execute next", - "$ref": "#/definitions/Microsoft.IRuleSelector" + "$ref": "#/definitions/Microsoft.IEventSelector" }, "rules": { "type": "array", "description": "Array of rules to use to evaluate conversation", "items": { - "$type": "Microsoft.IRule", - "$ref": "#/definitions/Microsoft.IRule" + "$type": "Microsoft.IOnEvent", + "$ref": "#/definitions/Microsoft.IOnEvent" } } }, @@ -728,76 +652,6 @@ } ] }, - "Microsoft.BeginDialogRule": { - "title": "BeginDialog Rule", - "description": "This defines the actions to take when a dialog is started via BeginDialog()", - "$role": "unionType(Microsoft.IRule)", - "type": "object", - "properties": { - "$type": { - "title": "$type", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.BeginDialogRule" - }, - "$copy": { - "title": "$copy", - "description": "Copy the definition by id from a .dialog file.", - "type": "string", - "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" - }, - "$id": { - "title": "$id", - "description": "Inline id for reuse of an inline definition", - "type": "string", - "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" - }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." - }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", - "examples": [ - "user.vip == true" - ], - "type": "string" - }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - } - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "type": "string" - } - }, - "anyOf": [ - { - "title": "Reference", - "required": [ - "$copy" - ] - }, - { - "title": "Type", - "required": [ - "actions", - "$type" - ] - } - ] - }, "Microsoft.CancelAllDialogs": { "$role": "unionType(Microsoft.IDialog)", "title": "Cancel All Dialogs", @@ -1149,8 +1003,8 @@ ] }, "Microsoft.ConditionalSelector": { - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "Condtional Rule Selector", + "$role": "unionType(Microsoft.IEventSelector)", + "title": "Condtional Event Selector", "description": "Use a rule selector based on a condition", "type": "object", "properties": { @@ -1184,12 +1038,12 @@ "description": "String must contain an expression." }, "ifTrue": { - "$type": "Microsoft.IRuleSelector", - "$ref": "#/definitions/Microsoft.IRuleSelector" + "$type": "Microsoft.IEventSelector", + "$ref": "#/definitions/Microsoft.IEventSelector" }, "ifFalse": { - "$type": "Microsoft.IRuleSelector", - "$ref": "#/definitions/Microsoft.IRuleSelector" + "$type": "Microsoft.IEventSelector", + "$ref": "#/definitions/Microsoft.IEventSelector" } }, "additionalProperties": false, @@ -1481,10 +1335,10 @@ } ] }, - "Microsoft.ConversationUpdateActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "ConversationUpdateActivity Rule", - "description": "This defines the actions to take when an ConversationUpdate activity is received", + "Microsoft.DateTimeInput": { + "$role": "unionType(Microsoft.IDialog)", + "title": "DateTimeInput Dialog", + "description": "This represents a dialog which gathers Date or Time or DateTime from the user", "type": "object", "properties": { "$type": { @@ -1492,7 +1346,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ConversationUpdateActivityRule" + "const": "Microsoft.DateTimeInput" }, "$copy": { "title": "$copy", @@ -1511,86 +1365,16 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", + "property": { + "$role": "memoryPath", + "title": "Property", + "description": "This is that will be passed in as InputProperty and also set as the OutputProperty", "examples": [ - "user.vip == true" + "value.birthday", + "user.name" ], - "type": "string" - }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - } - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "type": "string" - } - }, - "anyOf": [ - { - "title": "Reference", - "required": [ - "$copy" - ] - }, - { - "title": "Type", - "required": [ - "actions", - "$type" - ] - } - ] - }, - "Microsoft.DateTimeInput": { - "$role": "unionType(Microsoft.IDialog)", - "title": "DateTimeInput Dialog", - "description": "This represents a dialog which gathers Date or Time or DateTime from the user", - "type": "object", - "properties": { - "$type": { - "title": "$type", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.DateTimeInput" - }, - "$copy": { - "title": "$copy", - "description": "Copy the definition by id from a .dialog file.", - "type": "string", - "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" - }, - "$id": { - "title": "$id", - "description": "Inline id for reuse of an inline definition", - "type": "string", - "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" - }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." - }, - "property": { - "$role": "memoryPath", - "title": "Property", - "description": "This is that will be passed in as InputProperty and also set as the OutputProperty", - "examples": [ - "value.birthday", - "user.name" - ], - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" }, "inputBindings": { "type": "object", @@ -2141,10 +1925,10 @@ } ] }, - "Microsoft.EndOfConversationActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "EndOfConversation Activity Rule", - "description": "This defines the actions to take when an EndOfConversation Activity is received", + "Microsoft.EndTurn": { + "$role": "unionType(Microsoft.IDialog)", + "title": "End Turn", + "description": "End the current turn without ending the dialog.", "type": "object", "properties": { "$type": { @@ -2152,7 +1936,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EndOfConversationActivityRule" + "const": "Microsoft.EndTurn" }, "$copy": { "title": "$copy", @@ -2170,23 +1954,6 @@ "title": "$designer", "type": "object", "description": "Extra information for the Bot Framework Designer." - }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", - "examples": [ - "user.vip == true" - ], - "type": "string" - }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } } }, "additionalProperties": false, @@ -2205,16 +1972,15 @@ { "title": "Type", "required": [ - "actions", "$type" ] } ] }, - "Microsoft.EndTurn": { - "$role": "unionType(Microsoft.IDialog)", - "title": "End Turn", - "description": "End the current turn without ending the dialog.", + "Microsoft.FirstSelector": { + "$role": "unionType(Microsoft.IEventSelector)", + "title": "First Event Selector", + "description": "Selector for first true rule", "type": "object", "properties": { "$type": { @@ -2222,7 +1988,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EndTurn" + "const": "Microsoft.FirstSelector" }, "$copy": { "title": "$copy", @@ -2263,10 +2029,10 @@ } ] }, - "Microsoft.EventActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Event Activity Rule", - "description": "This defines the actions to take when an Event activity is received", + "Microsoft.Foreach": { + "$role": "unionType(Microsoft.IDialog)", + "title": "Foreach Step", + "description": "Step which executes actions per item in a collection.", "type": "object", "properties": { "$type": { @@ -2274,7 +2040,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EventActivityRule" + "const": "Microsoft.Foreach" }, "$copy": { "title": "$copy", @@ -2293,22 +2059,39 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "constraint": { + "listProperty": { "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", + "title": "ListProperty", + "description": "Expression to evaluate.", "examples": [ - "user.vip == true" + "user.todoList" ], "type": "string" }, "actions": { "type": "array", - "description": "Sequence of actions or dialogs to execute", + "title": "Actions", + "description": "Actions to execute", "items": { "$type": "Microsoft.IDialog", "$ref": "#/definitions/Microsoft.IDialog" } + }, + "indexProperty": { + "$role": "memoryPath", + "title": "Index Property", + "description": "The memory path which refers to the index of the item", + "default": "dialog.index", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" + }, + "valueProperty": { + "$role": "memoryPath", + "title": "Value Property", + "description": "The memory path which refers to the value of the item", + "default": "dialog.value", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" } }, "additionalProperties": false, @@ -2327,24 +2110,25 @@ { "title": "Type", "required": [ + "listProperty", "actions", "$type" ] } ] }, - "Microsoft.EventRule": { - "title": "Event Rule", - "description": "Defines a rule for an event which is triggered by some source", + "Microsoft.ForeachPage": { + "$role": "unionType(Microsoft.IDialog)", + "title": "Foreach Page Step", + "description": "Step which execute actions per item page in a collection.", "type": "object", - "$role": "unionType(Microsoft.IRule)", "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.EventRule" + "const": "Microsoft.ForeachPage" }, "$copy": { "title": "$copy", @@ -2363,41 +2147,37 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "constraint": { + "listProperty": { "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", + "title": "ListProperty", + "description": "Expression to evaluate.", "examples": [ - "user.vip == true" + "user.todoList" ], "type": "string" }, "actions": { "type": "array", - "description": "Sequence of actions or dialogs to execute", + "title": "Actions", + "description": "Actions to execute", "items": { "$type": "Microsoft.IDialog", "$ref": "#/definitions/Microsoft.IDialog" } }, - "events": { - "type": "array", - "description": "Events to trigger this rule for", - "items": { - "type": "string", - "enum": [ - "beginDialog", - "consultDialog", - "cancelDialog", - "activityReceived", - "recognizedIntent", - "unknownIntent", - "actionsStarted", - "actionsSaved", - "actionsEnded", - "actionsResumed" - ] - } + "pageSize": { + "type": "integer", + "title": "Page Size", + "description": "The page size", + "default": 10 + }, + "valueProperty": { + "$role": "memoryPath", + "title": "Value Property", + "description": "The memory path which refers to the value of the item", + "default": "dialog.value", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" } }, "additionalProperties": false, @@ -2416,25 +2196,25 @@ { "title": "Type", "required": [ + "listProperty", "actions", - "events", "$type" ] } ] }, - "Microsoft.FirstSelector": { - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "First Rule Selector", - "description": "Selector for first true rule", + "Microsoft.HttpRequest": { + "$role": "unionType(Microsoft.IDialog)", "type": "object", + "title": "Http Request", + "description": "This is a step which replaces the current dialog with the target dialog", "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.FirstSelector" + "const": "Microsoft.HttpRequest" }, "$copy": { "title": "$copy", @@ -2452,6 +2232,61 @@ "title": "$designer", "type": "object", "description": "Extra information for the Bot Framework Designer." + }, + "method": { + "type": "string", + "title": "Method", + "description": "The HTTP method to use", + "enum": [ + "GET", + "POST" + ], + "examples": [ + "GET", + "POST" + ] + }, + "url": { + "type": "string", + "title": "Url", + "description": "The url to call (supports data binding)", + "examples": [ + "https://contoso.com" + ] + }, + "body": { + "type": "object", + "title": "Body", + "description": "The body to send in the HTTP call (supports data binding)", + "additionalProperties": true + }, + "property": { + "$role": "memoryPath", + "title": "Property", + "description": "The property to store the result of the HTTP call in (as object or string)", + "examples": [ + "dialog.contosodata" + ], + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" + }, + "headers": { + "type": "object", + "additionProperties": true, + "title": "Http headers", + "description": "Http headers to include with the HTTP request (supports data binding)" + }, + "responseTypes": { + "type": "string", + "title": "Response Types", + "description": "Describes how to parse the response from the http request. If Activity or Activities, then the they will be sent to the user.", + "enum": [ + "none", + "json", + "activity", + "activities" + ], + "default": "json" } }, "additionalProperties": false, @@ -2470,23 +2305,468 @@ { "title": "Type", "required": [ + "url", + "entity", "$type" ] } ] }, - "Microsoft.Foreach": { - "$role": "unionType(Microsoft.IDialog)", - "title": "Foreach Step", - "description": "Step which executes actions per item in a collection.", - "type": "object", - "properties": { - "$type": { + "Microsoft.IActivityTemplate": { + "title": "Microsoft ActivityTemplate", + "description": "Union of components which implement the IActivityTemplate interface", + "$role": "unionType", + "oneOf": [ + { + "$role": "lg", + "type": "string", + "description": "String is used for language generation.", + "title": "string" + } + ] + }, + "Microsoft.IDialog": { + "title": "Microsoft IDialog", + "description": "Union of components which implement the IDialog interface", + "$role": "unionType", + "oneOf": [ + { + "title": "Microsoft.AdaptiveDialog", + "description": "Configures a data driven dialog via a collection of actions/dialogs.", + "$ref": "#/definitions/Microsoft.AdaptiveDialog" + }, + { + "title": "Microsoft.AttachmentInput", + "description": "This represents a dialog which gathers an attachment such as image or music", + "$ref": "#/definitions/Microsoft.AttachmentInput" + }, + { + "title": "Microsoft.BeginDialog", + "description": "Step which begins another dialog (and when that dialog is done, it will return the caller).", + "$ref": "#/definitions/Microsoft.BeginDialog" + }, + { + "title": "Microsoft.CancelAllDialogs", + "description": "Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.", + "$ref": "#/definitions/Microsoft.CancelAllDialogs" + }, + { + "title": "Microsoft.ChoiceInput", + "description": "This represents a dialog which gathers a choice responses", + "$ref": "#/definitions/Microsoft.ChoiceInput" + }, + { + "title": "Microsoft.ConfirmInput", + "description": "This represents a dialog which gathers a yes/no style responses", + "$ref": "#/definitions/Microsoft.ConfirmInput" + }, + { + "title": "Microsoft.DateTimeInput", + "description": "This represents a dialog which gathers Date or Time or DateTime from the user", + "$ref": "#/definitions/Microsoft.DateTimeInput" + }, + { + "title": "Microsoft.DebugBreak", + "description": "If debugger is attached, do a debugger break at this point", + "$ref": "#/definitions/Microsoft.DebugBreak" + }, + { + "title": "Microsoft.DeleteProperty", + "description": "This is a step which allows you to remove a property from memory", + "$ref": "#/definitions/Microsoft.DeleteProperty" + }, + { + "title": "Microsoft.EditActions", + "description": "Edit current dialog with changeType and Actions", + "$ref": "#/definitions/Microsoft.EditActions" + }, + { + "title": "Microsoft.EditArray", + "description": "This is a step which allows you to modify an array in memory", + "$ref": "#/definitions/Microsoft.EditArray" + }, + { + "title": "Microsoft.EmitEvent", + "description": "This is a step which allows you to emit an event", + "$ref": "#/definitions/Microsoft.EmitEvent" + }, + { + "title": "Microsoft.EndDialog", + "description": "Command which ends the current dialog, returning the resultProperty as the result of the dialog.", + "$ref": "#/definitions/Microsoft.EndDialog" + }, + { + "title": "Microsoft.EndTurn", + "description": "End the current turn without ending the dialog.", + "$ref": "#/definitions/Microsoft.EndTurn" + }, + { + "title": "Microsoft.Foreach", + "description": "Step which executes actions per item in a collection.", + "$ref": "#/definitions/Microsoft.Foreach" + }, + { + "title": "Microsoft.ForeachPage", + "description": "Step which execute actions per item page in a collection.", + "$ref": "#/definitions/Microsoft.ForeachPage" + }, + { + "title": "Microsoft.HttpRequest", + "description": "This is a step which replaces the current dialog with the target dialog", + "$ref": "#/definitions/Microsoft.HttpRequest" + }, + { + "title": "Microsoft.IfCondition", + "description": "Step which conditionally decides which step to execute next.", + "$ref": "#/definitions/Microsoft.IfCondition" + }, + { + "title": "Microsoft.InitProperty", + "description": "This step allows you to innitial a property to either an object or array", + "$ref": "#/definitions/Microsoft.InitProperty" + }, + { + "title": "Microsoft.LogAction", + "description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding", + "$ref": "#/definitions/Microsoft.LogAction" + }, + { + "title": "Microsoft.NumberInput", + "description": "This represents a dialog which gathers a decimal number in a specified range", + "$ref": "#/definitions/Microsoft.NumberInput" + }, + { + "title": "Microsoft.QnAMakerDialog", + "description": "This represents a dialog which is driven by a call to QnAMaker.ai knowledge base", + "$ref": "#/definitions/Microsoft.QnAMakerDialog" + }, + { + "title": "Microsoft.RepeatDialog", + "description": "This is a step which repeats the current dialog with the same dialog.", + "$ref": "#/definitions/Microsoft.RepeatDialog" + }, + { + "title": "Microsoft.ReplaceDialog", + "description": "This is a step which replaces the current dialog with the target dialog", + "$ref": "#/definitions/Microsoft.ReplaceDialog" + }, + { + "title": "Microsoft.SendActivity", + "description": "This is a step which sends an activity to the user", + "$ref": "#/definitions/Microsoft.SendActivity" + }, + { + "title": "Microsoft.SetProperty", + "description": "This step allows you to set memory to the value of an expression", + "$ref": "#/definitions/Microsoft.SetProperty" + }, + { + "title": "Microsoft.SwitchCondition", + "description": "Step which conditionally decides which step to execute next.", + "$ref": "#/definitions/Microsoft.SwitchCondition" + }, + { + "title": "Microsoft.TextInput", + "description": "This represents a dialog which gathers a text from the user", + "$ref": "#/definitions/Microsoft.TextInput" + }, + { + "title": "Microsoft.TraceActivity", + "description": "This is a step which sends an TraceActivity to the transcript", + "$ref": "#/definitions/Microsoft.TraceActivity" + }, + { + "type": "string", + "title": "string" + }, + { + "title": "Testbot.JavascriptStep", + "description": "This gives you the ability to execute javascript to manipulate memory", + "$ref": "#/definitions/Testbot.JavascriptStep" + }, + { + "title": "Testbot.Multiply", + "description": "This will return the result of arg1*arg2", + "$ref": "#/definitions/Testbot.Multiply" + } + ] + }, + "Microsoft.IEventSelector": { + "title": "Microsoft IEventSelector", + "description": "Union of components which implement the IEventSelector interface", + "$role": "unionType", + "oneOf": [ + { + "title": "Microsoft.ConditionalSelector", + "description": "Use a rule selector based on a condition", + "$ref": "#/definitions/Microsoft.ConditionalSelector" + }, + { + "title": "Microsoft.FirstSelector", + "description": "Selector for first true rule", + "$ref": "#/definitions/Microsoft.FirstSelector" + }, + { + "title": "Microsoft.MostSpecificSelector", + "description": "Select most specific true rules with optional additional selector", + "$ref": "#/definitions/Microsoft.MostSpecificSelector" + }, + { + "title": "Microsoft.RandomSelector", + "description": "Select most specific true rule", + "$ref": "#/definitions/Microsoft.RandomSelector" + }, + { + "title": "Microsoft.TrueSelector", + "description": "Selector for all true rules", + "$ref": "#/definitions/Microsoft.TrueSelector" + } + ] + }, + "Microsoft.ILanguageGenerator": { + "title": "Microsoft ILanguageGenerator", + "description": "Union of components which implement the ILanguageGenerator interface", + "$role": "unionType", + "oneOf": [ + { + "type": "string", + "title": "string" + } + ] + }, + "Microsoft.ILanguagePolicy": { + "title": "Microsoft Language Policy", + "description": "Union of components which implement the ILanguagePolicy interface", + "$role": "unionType", + "oneOf": [ + { + "title": "Microsoft.LanguagePolicy", + "description": "This represents a dialog which gathers a DateTime in a specified range", + "$ref": "#/definitions/Microsoft.LanguagePolicy" + }, + { + "type": "string", + "title": "string" + } + ] + }, + "Microsoft.IOnEvent": { + "title": "Microsoft IOnEvent", + "description": "Union of components which implement the IOnEvent interface", + "$role": "unionType", + "oneOf": [ + { + "title": "Microsoft.OnActivity", + "description": "This defines the actions to take when an custom activity is received", + "$ref": "#/definitions/Microsoft.OnActivity" + }, + { + "title": "Microsoft.OnBeginDialog", + "description": "This defines the actions to take when a dialog is started via BeginDialog()", + "$ref": "#/definitions/Microsoft.OnBeginDialog" + }, + { + "title": "Microsoft.OnConversationUpdateActivity", + "description": "This defines the actions to take when an ConversationUpdate activity is received", + "$ref": "#/definitions/Microsoft.OnConversationUpdateActivity" + }, + { + "title": "Microsoft.OnDialogEvent", + "description": "Defines a rule for an event which is triggered by some source", + "$ref": "#/definitions/Microsoft.OnDialogEvent" + }, + { + "title": "Microsoft.OnEndOfConversationActivity", + "description": "This defines the actions to take when an EndOfConversation Activity is received", + "$ref": "#/definitions/Microsoft.OnEndOfConversationActivity" + }, + { + "title": "Microsoft.OnEvent", + "description": "Defines a rule for an event which is triggered by some source", + "$ref": "#/definitions/Microsoft.OnEvent" + }, + { + "title": "Microsoft.OnEventActivity", + "description": "This defines the actions to take when an Event activity is received", + "$ref": "#/definitions/Microsoft.OnEventActivity" + }, + { + "title": "Microsoft.OnHandoffActivity", + "description": "This defines the actions to take when an Handoff activity is received", + "$ref": "#/definitions/Microsoft.OnHandoffActivity" + }, + { + "title": "Microsoft.OnIntent", + "description": "This defines the actions to take when an Intent is recognized (and optionally entities)", + "$ref": "#/definitions/Microsoft.OnIntent" + }, + { + "title": "Microsoft.OnInvokeActivity", + "description": "This defines the actions to take when an Invoke activity is received", + "$ref": "#/definitions/Microsoft.OnInvokeActivity" + }, + { + "title": "Microsoft.OnMessageActivity", + "description": "This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation", + "$ref": "#/definitions/Microsoft.OnMessageActivity" + }, + { + "title": "Microsoft.OnMessageDeleteActivity", + "description": "This defines the actions to take when an MessageDelete activity is received", + "$ref": "#/definitions/Microsoft.OnMessageDeleteActivity" + }, + { + "title": "Microsoft.OnMessageReactionActivity", + "description": "This defines the actions to take when a MessageReaction activity is received", + "$ref": "#/definitions/Microsoft.OnMessageReactionActivity" + }, + { + "title": "Microsoft.OnMessageUpdateActivity", + "description": "This defines the actions to take when an MessageUpdate ctivity is received", + "$ref": "#/definitions/Microsoft.OnMessageUpdateActivity" + }, + { + "title": "Microsoft.OnTypingActivity", + "description": "This defines the actions to take when a Typing activity is received", + "$ref": "#/definitions/Microsoft.OnTypingActivity" + }, + { + "title": "Microsoft.OnUnknownIntent", + "description": "This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog", + "$ref": "#/definitions/Microsoft.OnUnknownIntent" + } + ] + }, + "Microsoft.IRecognizer": { + "title": "Microsoft IRecognizer", + "description": "Union of components which implement the IRecognizer interface", + "$role": "unionType", + "oneOf": [ + { + "title": "Microsoft.LuisRecognizer", + "description": "LUIS recognizer.", + "$ref": "#/definitions/Microsoft.LuisRecognizer" + }, + { + "title": "Microsoft.MultiLanguageRecognizer", + "description": "Recognizer which allows you to configure the recognizer per language, and to define the policy for using them", + "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" + }, + { + "title": "Microsoft.RegexRecognizer", + "description": "Recognizer which uses regex expressions to generate intents and entities.", + "$ref": "#/definitions/Microsoft.RegexRecognizer" + }, + { + "type": "string", + "title": "string" + } + ] + }, + "Microsoft.ITextTemplate": { + "title": "Microsoft TextTemplate", + "description": "Union of components which implement the ITextTemplate interface", + "$role": "unionType", + "oneOf": [ + { + "type": "string", + "title": "string" + } + ] + }, + "Microsoft.IfCondition": { + "$role": "unionType(Microsoft.IDialog)", + "title": "If Condition Step", + "description": "Step which conditionally decides which step to execute next.", + "type": "object", + "properties": { + "$type": { + "title": "$type", + "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", + "const": "Microsoft.IfCondition" + }, + "$copy": { + "title": "$copy", + "description": "Copy the definition by id from a .dialog file.", + "type": "string", + "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" + }, + "$id": { + "title": "$id", + "description": "Inline id for reuse of an inline definition", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" + }, + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." + }, + "condition": { + "$role": "expression", + "title": "Condition", + "description": "Expression to evaluate.", + "examples": [ + "user.age > 3" + ], + "type": "string" + }, + "actions": { + "type": "array", + "title": "Actions", + "description": "Step to execute if condition is true.", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } + }, + "elseActions": { + "type": "array", + "title": "Else Actions", + "description": "Step to execute if condition is false.", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } + } + }, + "additionalProperties": false, + "patternProperties": { + "^\\$": { + "type": "string" + } + }, + "anyOf": [ + { + "title": "Reference", + "required": [ + "$copy" + ] + }, + { + "title": "Type", + "required": [ + "condition", + "actions", + "$type" + ] + } + ] + }, + "Microsoft.InitProperty": { + "$role": "unionType(Microsoft.IDialog)", + "title": "Init Property Step", + "description": "This step allows you to innitial a property to either an object or array", + "type": "object", + "properties": { + "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.Foreach" + "const": "Microsoft.InitProperty" }, "$copy": { "title": "$copy", @@ -2505,39 +2785,24 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "listProperty": { - "$role": "expression", - "title": "ListProperty", - "description": "Expression to evaluate.", + "property": { + "$role": "memoryPath", + "title": "Property", + "description": "The property to set the value of", "examples": [ - "user.todoList" + "user.age" ], - "type": "string" - }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "indexProperty": { - "$role": "memoryPath", - "title": "Index Property", - "description": "The memory path which refers to the index of the item", - "default": "dialog.index", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" }, - "valueProperty": { - "$role": "memoryPath", - "title": "Value Property", - "description": "The memory path which refers to the value of the item", - "default": "dialog.value", + "type": { "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" + "title": "type", + "description": "type of value to set the property to, object or array.", + "enum": [ + "object", + "array" + ] } }, "additionalProperties": false, @@ -2556,25 +2821,26 @@ { "title": "Type", "required": [ - "listProperty", - "actions", + "property", + "type", "$type" ] } ] }, - "Microsoft.ForeachPage": { - "$role": "unionType(Microsoft.IDialog)", - "title": "Foreach Page Step", - "description": "Step which execute actions per item page in a collection.", + "Microsoft.LanguagePolicy": { + "$role": "unionType(Microsoft.ILanguagePolicy)", + "title": "Language Policy", + "description": "This represents a dialog which gathers a DateTime in a specified range", "type": "object", + "additionalProperties": false, "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.ForeachPage" + "const": "Microsoft.LanguagePolicy" }, "$copy": { "title": "$copy", @@ -2592,38 +2858,68 @@ "title": "$designer", "type": "object", "description": "Extra information for the Bot Framework Designer." - }, - "listProperty": { - "$role": "expression", - "title": "ListProperty", - "description": "Expression to evaluate.", - "examples": [ - "user.todoList" - ], + } + }, + "patternProperties": { + "^\\$": { "type": "string" + } + }, + "anyOf": [ + { + "title": "Reference", + "required": [ + "$copy" + ] }, - "actions": { - "type": "array", - "title": "Actions", - "description": "Actions to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } + { + "title": "Type", + "required": [ + "$type" + ] + } + ] + }, + "Microsoft.LogAction": { + "$role": "unionType(Microsoft.IDialog)", + "title": "Log Action", + "description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding", + "type": "object", + "properties": { + "$type": { + "title": "$type", + "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", + "const": "Microsoft.LogAction" }, - "pageSize": { - "type": "integer", - "title": "Page Size", - "description": "The page size", - "default": 10 + "$copy": { + "title": "$copy", + "description": "Copy the definition by id from a .dialog file.", + "type": "string", + "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" }, - "valueProperty": { - "$role": "memoryPath", - "title": "Value Property", - "description": "The memory path which refers to the value of the item", - "default": "dialog.value", + "$id": { + "title": "$id", + "description": "Inline id for reuse of an inline definition", "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" + "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" + }, + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." + }, + "text": { + "type": "string", + "title": "Text", + "description": "LG Expression to write to the log" + }, + "traceActivity": { + "type": "boolean", + "title": "Send Trace Activity", + "description": "Set to true to also create a TraceActivity with the log text", + "default": false } }, "additionalProperties": false, @@ -2642,25 +2938,25 @@ { "title": "Type", "required": [ - "listProperty", - "actions", + "text", "$type" ] } ] }, - "Microsoft.HandoffActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Handoff Activity Rule", - "description": "This defines the actions to take when an Handoff activity is received", + "Microsoft.LuisRecognizer": { + "$role": "unionType(Microsoft.IRecognizer)", + "title": "LUIS Recognizer", + "description": "LUIS recognizer.", "type": "object", + "additionalProperties": false, "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.HandoffActivityRule" + "const": "Microsoft.LuisRecognizer" }, "$copy": { "title": "$copy", @@ -2679,22 +2975,72 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", - "examples": [ - "user.vip == true" - ], + "applicationId": { "type": "string" }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } + "endpoint": { + "type": "string" + }, + "endpointKey": { + "type": "string" + } + }, + "patternProperties": { + "^\\$": { + "type": "string" + } + }, + "anyOf": [ + { + "title": "Reference", + "required": [ + "$copy" + ] + }, + { + "title": "Type", + "required": [ + "applicationId", + "endpoint", + "endpointKey", + "$type" + ] + } + ] + }, + "Microsoft.MostSpecificSelector": { + "$role": "unionType(Microsoft.IEventSelector)", + "title": "Most Specific Event Selector", + "description": "Select most specific true rules with optional additional selector", + "type": "object", + "properties": { + "$type": { + "title": "$type", + "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", + "const": "Microsoft.MostSpecificSelector" + }, + "$copy": { + "title": "$copy", + "description": "Copy the definition by id from a .dialog file.", + "type": "string", + "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" + }, + "$id": { + "title": "$id", + "description": "Inline id for reuse of an inline definition", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" + }, + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." + }, + "selector": { + "$type": "Microsoft.IEventSelector", + "$ref": "#/definitions/Microsoft.IEventSelector" } }, "additionalProperties": false, @@ -2713,24 +3059,23 @@ { "title": "Type", "required": [ - "actions", "$type" ] } ] }, - "Microsoft.HttpRequest": { - "$role": "unionType(Microsoft.IDialog)", + "Microsoft.MultiLanguageRecognizer": { + "$role": "unionType(Microsoft.IRecognizer)", + "title": "Multi Language Recognizer", + "description": "Recognizer which allows you to configure the recognizer per language, and to define the policy for using them", "type": "object", - "title": "Http Request", - "description": "This is a step which replaces the current dialog with the target dialog", "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.HttpRequest" + "const": "Microsoft.MultiLanguageRecognizer" }, "$copy": { "title": "$copy", @@ -2749,60 +3094,21 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "method": { - "type": "string", - "title": "Method", - "description": "The HTTP method to use", - "enum": [ - "GET", - "POST" - ], - "examples": [ - "GET", - "POST" - ] - }, - "url": { - "type": "string", - "title": "Url", - "description": "The url to call (supports data binding)", - "examples": [ - "https://contoso.com" - ] - }, - "body": { + "languagePolicy": { + "$type": "Microsoft.ILanguagePolicy", "type": "object", - "title": "Body", - "description": "The body to send in the HTTP call (supports data binding)", - "additionalProperties": true - }, - "property": { - "$role": "memoryPath", - "title": "Property", - "description": "The property to store the result of the HTTP call in (as object or string)", - "examples": [ - "dialog.contosodata" - ], - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" + "title": "Language Policy", + "description": "Defines languages to try per language.", + "$ref": "#/definitions/Microsoft.ILanguagePolicy" }, - "headers": { + "recognizers": { "type": "object", - "additionProperties": true, - "title": "Http headers", - "description": "Http headers to include with the HTTP request (supports data binding)" - }, - "responseTypes": { - "type": "string", - "title": "Response Types", - "description": "Describes how to parse the response from the http request. If Activity or Activities, then the they will be sent to the user.", - "enum": [ - "none", - "json", - "activity", - "activities" - ], - "default": "json" + "title": "Recognizers", + "description": "Map of language -> IRecognizer", + "additionalProperties": { + "$type": "Microsoft.IRecognizer", + "$ref": "#/definitions/Microsoft.IRecognizer" + } } }, "additionalProperties": false, @@ -2816,384 +3122,343 @@ "title": "Reference", "required": [ "$copy" - ] - }, - { - "title": "Type", - "required": [ - "url", - "entity", - "$type" - ] - } - ] - }, - "Microsoft.IActivityTemplate": { - "title": "Microsoft ActivityTemplate", - "description": "Union of components which implement the IActivityTemplate interface", - "$role": "unionType", - "oneOf": [ - { - "$role": "lg", - "type": "string", - "description": "String is used for language generation.", - "title": "string" - } - ] - }, - "Microsoft.IDialog": { - "title": "Microsoft IDialog", - "description": "Union of components which implement the IDialog interface", - "$role": "unionType", - "oneOf": [ - { - "title": "Microsoft.AdaptiveDialog", - "description": "Configures a data driven dialog via a collection of actions/dialogs.", - "$ref": "#/definitions/Microsoft.AdaptiveDialog" - }, - { - "title": "Microsoft.AttachmentInput", - "description": "This represents a dialog which gathers an attachment such as image or music", - "$ref": "#/definitions/Microsoft.AttachmentInput" - }, - { - "title": "Microsoft.BeginDialog", - "description": "Step which begins another dialog (and when that dialog is done, it will return the caller).", - "$ref": "#/definitions/Microsoft.BeginDialog" - }, - { - "title": "Microsoft.CancelAllDialogs", - "description": "Command to cancel all of the current dialogs by emitting an event which must be caught to prevent cancelation from propagating.", - "$ref": "#/definitions/Microsoft.CancelAllDialogs" - }, - { - "title": "Microsoft.ChoiceInput", - "description": "This represents a dialog which gathers a choice responses", - "$ref": "#/definitions/Microsoft.ChoiceInput" - }, - { - "title": "Microsoft.ConfirmInput", - "description": "This represents a dialog which gathers a yes/no style responses", - "$ref": "#/definitions/Microsoft.ConfirmInput" - }, - { - "title": "Microsoft.DateTimeInput", - "description": "This represents a dialog which gathers Date or Time or DateTime from the user", - "$ref": "#/definitions/Microsoft.DateTimeInput" - }, - { - "title": "Microsoft.DebugBreak", - "description": "If debugger is attached, do a debugger break at this point", - "$ref": "#/definitions/Microsoft.DebugBreak" - }, - { - "title": "Microsoft.DeleteProperty", - "description": "This is a step which allows you to remove a property from memory", - "$ref": "#/definitions/Microsoft.DeleteProperty" - }, - { - "title": "Microsoft.EditActions", - "description": "Edit current dialog with changeType and Actions", - "$ref": "#/definitions/Microsoft.EditActions" - }, - { - "title": "Microsoft.EditArray", - "description": "This is a step which allows you to modify an array in memory", - "$ref": "#/definitions/Microsoft.EditArray" - }, - { - "title": "Microsoft.EmitEvent", - "description": "This is a step which allows you to emit an event", - "$ref": "#/definitions/Microsoft.EmitEvent" - }, - { - "title": "Microsoft.EndDialog", - "description": "Command which ends the current dialog, returning the resultProperty as the result of the dialog.", - "$ref": "#/definitions/Microsoft.EndDialog" - }, - { - "title": "Microsoft.EndTurn", - "description": "End the current turn without ending the dialog.", - "$ref": "#/definitions/Microsoft.EndTurn" - }, - { - "title": "Microsoft.Foreach", - "description": "Step which executes actions per item in a collection.", - "$ref": "#/definitions/Microsoft.Foreach" - }, - { - "title": "Microsoft.ForeachPage", - "description": "Step which execute actions per item page in a collection.", - "$ref": "#/definitions/Microsoft.ForeachPage" - }, - { - "title": "Microsoft.HttpRequest", - "description": "This is a step which replaces the current dialog with the target dialog", - "$ref": "#/definitions/Microsoft.HttpRequest" - }, - { - "title": "Microsoft.IfCondition", - "description": "Step which conditionally decides which step to execute next.", - "$ref": "#/definitions/Microsoft.IfCondition" - }, - { - "title": "Microsoft.InitProperty", - "description": "This step allows you to innitial a property to either an object or array", - "$ref": "#/definitions/Microsoft.InitProperty" - }, - { - "title": "Microsoft.LogStep", - "description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding", - "$ref": "#/definitions/Microsoft.LogStep" - }, - { - "title": "Microsoft.NumberInput", - "description": "This represents a dialog which gathers a decimal number in a specified range", - "$ref": "#/definitions/Microsoft.NumberInput" - }, - { - "title": "Microsoft.QnAMakerDialog", - "description": "This represents a dialog which is driven by a call to QnAMaker.ai knowledge base", - "$ref": "#/definitions/Microsoft.QnAMakerDialog" - }, - { - "title": "Microsoft.RepeatDialog", - "description": "This is a step which repeats the current dialog with the same dialog.", - "$ref": "#/definitions/Microsoft.RepeatDialog" - }, - { - "title": "Microsoft.ReplaceDialog", - "description": "This is a step which replaces the current dialog with the target dialog", - "$ref": "#/definitions/Microsoft.ReplaceDialog" - }, - { - "title": "Microsoft.SendActivity", - "description": "This is a step which sends an activity to the user", - "$ref": "#/definitions/Microsoft.SendActivity" - }, - { - "title": "Microsoft.SetProperty", - "description": "This step allows you to set memory to the value of an expression", - "$ref": "#/definitions/Microsoft.SetProperty" - }, - { - "title": "Microsoft.SwitchCondition", - "description": "Step which conditionally decides which step to execute next.", - "$ref": "#/definitions/Microsoft.SwitchCondition" - }, - { - "title": "Microsoft.TextInput", - "description": "This represents a dialog which gathers a text from the user", - "$ref": "#/definitions/Microsoft.TextInput" - }, - { - "title": "Microsoft.TraceActivity", - "description": "This is a step which sends an TraceActivity to the transcript", - "$ref": "#/definitions/Microsoft.TraceActivity" - }, - { - "type": "string", - "title": "string" - }, - { - "title": "Testbot.JavascriptStep", - "description": "This gives you the ability to execute javascript to manipulate memory", - "$ref": "#/definitions/Testbot.JavascriptStep" + ] }, { - "title": "Testbot.Multiply", - "description": "This will return the result of arg1*arg2", - "$ref": "#/definitions/Testbot.Multiply" + "title": "Type", + "required": [ + "recognizers", + "$type" + ] } ] }, - "Microsoft.ILanguageGenerator": { - "title": "Microsoft ILanguageGenerator", - "description": "Union of components which implement the ILanguageGenerator interface", - "$role": "unionType", - "oneOf": [ - { + "Microsoft.NumberInput": { + "$role": "unionType(Microsoft.IDialog)", + "title": "NumberInput Dialog", + "description": "This represents a dialog which gathers a decimal number in a specified range", + "type": "object", + "properties": { + "$type": { + "title": "$type", + "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", - "title": "string" - } - ] - }, - "Microsoft.ILanguagePolicy": { - "title": "Microsoft Language Policy", - "description": "Union of components which implement the ILanguagePolicy interface", - "$role": "unionType", - "oneOf": [ - { - "title": "Microsoft.LanguagePolicy", - "description": "This represents a dialog which gathers a DateTime in a specified range", - "$ref": "#/definitions/Microsoft.LanguagePolicy" + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", + "const": "Microsoft.NumberInput" }, - { + "$copy": { + "title": "$copy", + "description": "Copy the definition by id from a .dialog file.", "type": "string", - "title": "string" - } - ] - }, - "Microsoft.IRecognizer": { - "title": "Microsoft IRecognizer", - "description": "Union of components which implement the IRecognizer interface", - "$role": "unionType", - "oneOf": [ - { - "title": "Microsoft.LuisRecognizer", - "description": "LUIS recognizer.", - "$ref": "#/definitions/Microsoft.LuisRecognizer" + "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" }, - { - "title": "Microsoft.MultiLanguageRecognizer", - "description": "Recognizer which allows you to configure the recognizer per language, and to define the policy for using them", - "$ref": "#/definitions/Microsoft.MultiLanguageRecognizer" + "$id": { + "title": "$id", + "description": "Inline id for reuse of an inline definition", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" }, - { - "title": "Microsoft.RegexRecognizer", - "description": "Recognizer which uses regex expressions to generate intents and entities.", - "$ref": "#/definitions/Microsoft.RegexRecognizer" + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." }, - { + "property": { + "$role": "memoryPath", + "title": "Property", + "description": "This is that will be passed in as InputProperty and also set as the OutputProperty", + "examples": [ + "value.birthday", + "user.name" + ], "type": "string", - "title": "string" - } - ] - }, - "Microsoft.IRule": { - "title": "Microsoft IRule", - "description": "Union of components which implement the IRule interface", - "$role": "unionType", - "oneOf": [ - { - "title": "Microsoft.ActivityRule", - "description": "This defines the actions to take when an custom activity is received", - "$ref": "#/definitions/Microsoft.ActivityRule" + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" }, - { - "title": "Microsoft.BeginDialogRule", - "description": "This defines the actions to take when a dialog is started via BeginDialog()", - "$ref": "#/definitions/Microsoft.BeginDialogRule" + "inputBindings": { + "type": "object", + "title": "Input Bindings", + "description": "This defines properties which be passed as arguments to this dialog", + "examples": [ + "value.birthday" + ], + "additionalProperties": { + "type": "string" + } }, - { - "title": "Microsoft.ConversationUpdateActivityRule", - "description": "This defines the actions to take when an ConversationUpdate activity is received", - "$ref": "#/definitions/Microsoft.ConversationUpdateActivityRule" + "outputBinding": { + "$role": "memoryPath", + "title": "Output Property binding", + "description": "This is the property which the EndDialog(result) will be set to when EndDialog() is called", + "examples": [ + "value.birthday" + ], + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" }, - { - "title": "Microsoft.EndOfConversationActivityRule", - "description": "This defines the actions to take when an EndOfConversation Activity is received", - "$ref": "#/definitions/Microsoft.EndOfConversationActivityRule" + "prompt": { + "$type": "Microsoft.IActivityTemplate", + "title": "Initial Prompt", + "description": "The message to send to as prompt for this input.", + "examples": [ + "What is your birth date?" + ], + "$ref": "#/definitions/Microsoft.IActivityTemplate" }, - { - "title": "Microsoft.EventActivityRule", - "description": "This defines the actions to take when an Event activity is received", - "$ref": "#/definitions/Microsoft.EventActivityRule" + "unrecognizedPrompt": { + "$type": "Microsoft.IActivityTemplate", + "title": "Unrecognized Prompt", + "description": "The message to send if the last input is not recognized.", + "examples": [ + "Let's try again. What is your birth date?" + ], + "$ref": "#/definitions/Microsoft.IActivityTemplate" }, - { - "title": "Microsoft.EventRule", - "description": "Defines a rule for an event which is triggered by some source", - "$ref": "#/definitions/Microsoft.EventRule" + "invalidPrompt": { + "$type": "Microsoft.IActivityTemplate", + "title": "Invalid Prompt", + "description": "The message to send to when then input was not valid for the input type.", + "examples": [ + "No date was recognized" + ], + "$ref": "#/definitions/Microsoft.IActivityTemplate" }, - { - "title": "Microsoft.HandoffActivityRule", - "description": "This defines the actions to take when an Handoff activity is received", - "$ref": "#/definitions/Microsoft.HandoffActivityRule" + "maxTurnCount": { + "type": "integer", + "title": "Max Turn Count", + "description": "The max retry count for this prompt.", + "default": 2147483647, + "examples": [ + 3 + ] }, - { - "title": "Microsoft.IntentRule", - "description": "This defines the actions to take when an Intent is recognized (and optionally entities)", - "$ref": "#/definitions/Microsoft.IntentRule" + "validations": { + "type": "array", + "title": "Validation Expressions", + "description": "Expressions to validate an input.", + "items": { + "$role": "expression", + "type": "string", + "description": "String must contain an expression." + } }, - { - "title": "Microsoft.InvokeActivityRule", - "description": "This defines the actions to take when an Invoke activity is received", - "$ref": "#/definitions/Microsoft.InvokeActivityRule" + "value": { + "$role": "expression", + "title": "Value", + "description": "The expression that you evaluated for input.", + "type": "string" }, - { - "title": "Microsoft.MessageActivityRule", - "description": "This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation", - "$ref": "#/definitions/Microsoft.MessageActivityRule" + "defaultValue": { + "$role": "expression", + "title": "Default Value", + "description": "Value to return if the value expression can't be evaluated.", + "type": "string" + }, + "alwaysPrompt": { + "type": "boolean", + "title": "Always Prompt", + "description": "If set to true this will always prompt the user regardless if you already have the value or not.", + "default": false, + "examples": [ + false + ] + }, + "allowInterruptions": { + "type": "boolean", + "title": "Allow Interruptions", + "description": "If set to true this will always consult the parent dialog whether it will be interupt or not.", + "default": true, + "examples": [ + true + ] + }, + "outputFormat": { + "type": "string", + "enum": [ + "float", + "interger" + ], + "title": "Output Format", + "description": "The NumberInput output format.", + "default": "float" }, + "defaultLocale": { + "type": "string", + "title": "Default Locale", + "description": "The prompts default locale that should be recognized.", + "default": "en-us" + } + }, + "additionalProperties": false, + "patternProperties": { + "^\\$": { + "type": "string" + } + }, + "anyOf": [ { - "title": "Microsoft.MessageDeleteActivityRule", - "description": "This defines the actions to take when an MessageDelete activity is received", - "$ref": "#/definitions/Microsoft.MessageDeleteActivityRule" + "title": "Reference", + "required": [ + "$copy" + ] }, { - "title": "Microsoft.MessageReactionActivityRule", - "description": "This defines the actions to take when a MessageReaction activity is received", - "$ref": "#/definitions/Microsoft.MessageReactionActivityRule" + "title": "Type", + "required": [ + "$type" + ] + } + ] + }, + "Microsoft.OnActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnActivity", + "description": "This defines the actions to take when an custom activity is received", + "type": "object", + "properties": { + "$type": { + "title": "$type", + "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", + "const": "Microsoft.OnActivity" + }, + "$copy": { + "title": "$copy", + "description": "Copy the definition by id from a .dialog file.", + "type": "string", + "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" + }, + "$id": { + "title": "$id", + "description": "Inline id for reuse of an inline definition", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" + }, + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." }, - { - "title": "Microsoft.MessageUpdateActivityRule", - "description": "This defines the actions to take when an MessageUpdate ctivity is received", - "$ref": "#/definitions/Microsoft.MessageUpdateActivityRule" + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", + "examples": [ + "user.vip == true" + ], + "type": "string" }, - { - "title": "Microsoft.Rule", - "description": "Defines a rule for an event which is triggered by some source", - "$ref": "#/definitions/Microsoft.Rule" + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } }, + "type": { + "type": "string", + "title": "Type", + "description": "Activity type" + } + }, + "additionalProperties": false, + "patternProperties": { + "^\\$": { + "type": "string" + } + }, + "anyOf": [ { - "title": "Microsoft.TypingActivityRule", - "description": "This defines the actions to take when a Typing activity is received", - "$ref": "#/definitions/Microsoft.TypingActivityRule" + "title": "Reference", + "required": [ + "$copy" + ] }, { - "title": "Microsoft.UnknownIntentRule", - "description": "This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog", - "$ref": "#/definitions/Microsoft.UnknownIntentRule" + "title": "Type", + "required": [ + "actions", + "type", + "$type" + ] } ] }, - "Microsoft.IRuleSelector": { - "title": "Microsoft IRuleSelector", - "description": "Union of components which implement the IRuleSelector interface", - "$role": "unionType", - "oneOf": [ - { - "title": "Microsoft.ConditionalSelector", - "description": "Use a rule selector based on a condition", - "$ref": "#/definitions/Microsoft.ConditionalSelector" + "Microsoft.OnBeginDialog": { + "title": "OnBeginDialog", + "description": "This defines the actions to take when a dialog is started via BeginDialog()", + "$role": "unionType(Microsoft.IOnEvent)", + "type": "object", + "properties": { + "$type": { + "title": "$type", + "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", + "const": "Microsoft.OnBeginDialog" }, - { - "title": "Microsoft.FirstSelector", - "description": "Selector for first true rule", - "$ref": "#/definitions/Microsoft.FirstSelector" + "$copy": { + "title": "$copy", + "description": "Copy the definition by id from a .dialog file.", + "type": "string", + "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" }, - { - "title": "Microsoft.MostSpecificSelector", - "description": "Select most specific true rules with optional additional selector", - "$ref": "#/definitions/Microsoft.MostSpecificSelector" + "$id": { + "title": "$id", + "description": "Inline id for reuse of an inline definition", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" }, - { - "title": "Microsoft.RandomSelector", - "description": "Select most specific true rule", - "$ref": "#/definitions/Microsoft.RandomSelector" + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." }, - { - "title": "Microsoft.TrueSelector", - "description": "Selector for all true rules", - "$ref": "#/definitions/Microsoft.TrueSelector" + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", + "examples": [ + "user.vip == true" + ], + "type": "string" + }, + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } } - ] - }, - "Microsoft.ITextTemplate": { - "title": "Microsoft TextTemplate", - "description": "Union of components which implement the ITextTemplate interface", - "$role": "unionType", - "oneOf": [ + }, + "additionalProperties": false, + "patternProperties": { + "^\\$": { + "type": "string" + } + }, + "anyOf": [ { - "type": "string", - "title": "string" + "title": "Reference", + "required": [ + "$copy" + ] + }, + { + "title": "Type", + "required": [ + "actions", + "$type" + ] } ] }, - "Microsoft.IfCondition": { - "$role": "unionType(Microsoft.IDialog)", - "title": "If Condition Step", - "description": "Step which conditionally decides which step to execute next.", + "Microsoft.OnConversationUpdateActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnConversationUpdateActivity", + "description": "This defines the actions to take when an ConversationUpdate activity is received", "type": "object", "properties": { "$type": { @@ -3201,7 +3466,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.IfCondition" + "const": "Microsoft.OnConversationUpdateActivity" }, "$copy": { "title": "$copy", @@ -3220,28 +3485,18 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "condition": { + "constraint": { "$role": "expression", - "title": "Condition", - "description": "Expression to evaluate.", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", "examples": [ - "user.age > 3" + "user.vip == true" ], "type": "string" }, "actions": { "type": "array", - "title": "Actions", - "description": "Step to execute if condition is true.", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - }, - "elseActions": { - "type": "array", - "title": "Else Actions", - "description": "Step to execute if condition is false.", + "description": "Sequence of actions or dialogs to execute", "items": { "$type": "Microsoft.IDialog", "$ref": "#/definitions/Microsoft.IDialog" @@ -3264,25 +3519,24 @@ { "title": "Type", "required": [ - "condition", "actions", "$type" ] } ] }, - "Microsoft.InitProperty": { - "$role": "unionType(Microsoft.IDialog)", - "title": "Init Property Step", - "description": "This step allows you to innitial a property to either an object or array", + "Microsoft.OnDialogEvent": { + "title": "OnDialogEvent", + "description": "Defines a rule for an event which is triggered by some source", "type": "object", + "$role": "unionType(Microsoft.IOnEvent)", "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.InitProperty" + "const": "Microsoft.OnDialogEvent" }, "$copy": { "title": "$copy", @@ -3301,24 +3555,41 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "property": { - "$role": "memoryPath", - "title": "Property", - "description": "The property to set the value of", + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", "examples": [ - "user.age" + "user.vip == true" ], - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" + "type": "string" }, - "type": { - "type": "string", - "title": "type", - "description": "type of value to set the property to, object or array.", - "enum": [ - "object", - "array" - ] + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } + }, + "events": { + "type": "array", + "description": "Events to trigger this rule for", + "items": { + "type": "string", + "enum": [ + "beginDialog", + "consultDialog", + "cancelDialog", + "activityReceived", + "recognizedIntent", + "unknownIntent", + "actionsStarted", + "actionsSaved", + "actionsEnded", + "actionsResumed" + ] + } } }, "additionalProperties": false, @@ -3337,17 +3608,17 @@ { "title": "Type", "required": [ - "property", - "type", + "actions", + "events", "$type" ] } ] }, - "Microsoft.IntentRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Intent Rule", - "description": "This defines the actions to take when an Intent is recognized (and optionally entities)", + "Microsoft.OnEndOfConversationActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnEndOfConversationActivity", + "description": "This defines the actions to take when an EndOfConversation Activity is received", "type": "object", "properties": { "$type": { @@ -3355,7 +3626,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.IntentRule" + "const": "Microsoft.OnEndOfConversationActivity" }, "$copy": { "title": "$copy", @@ -3390,19 +3661,6 @@ "$type": "Microsoft.IDialog", "$ref": "#/definitions/Microsoft.IDialog" } - }, - "intent": { - "type": "string", - "title": "Intent", - "description": "Intent name to trigger on" - }, - "entities": { - "type": "array", - "title": "Entities", - "description": "The entities required to trigger this rule", - "items": { - "type": "string" - } } }, "additionalProperties": false, @@ -3422,16 +3680,15 @@ "title": "Type", "required": [ "actions", - "intent", "$type" ] } ] }, - "Microsoft.InvokeActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Invoke Activity Rule", - "description": "This defines the actions to take when an Invoke activity is received", + "Microsoft.OnEvent": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnEvent", + "description": "Defines a rule for an event which is triggered by some source", "type": "object", "properties": { "$type": { @@ -3439,7 +3696,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.InvokeActivityRule" + "const": "Microsoft.OnEvent" }, "$copy": { "title": "$copy", @@ -3498,19 +3755,18 @@ } ] }, - "Microsoft.LanguagePolicy": { - "$role": "unionType(Microsoft.ILanguagePolicy)", - "title": "Language Policy", - "description": "This represents a dialog which gathers a DateTime in a specified range", + "Microsoft.OnEventActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnEventActivity", + "description": "This defines the actions to take when an Event activity is received", "type": "object", - "additionalProperties": false, "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LanguagePolicy" + "const": "Microsoft.OnEventActivity" }, "$copy": { "title": "$copy", @@ -3524,12 +3780,30 @@ "type": "string", "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." + }, + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", + "examples": [ + "user.vip == true" + ], + "type": "string" + }, + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } } }, + "additionalProperties": false, "patternProperties": { "^\\$": { "type": "string" @@ -3545,15 +3819,16 @@ { "title": "Type", "required": [ + "actions", "$type" ] } ] }, - "Microsoft.LogStep": { - "$role": "unionType(Microsoft.IDialog)", - "title": "Log Action", - "description": "This is a action which writes to console.log and optional creates a TraceActivity around a text binding", + "Microsoft.OnHandoffActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnHandoffActivity", + "description": "This defines the actions to take when an Handoff activity is received", "type": "object", "properties": { "$type": { @@ -3561,7 +3836,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LogStep" + "const": "Microsoft.OnHandoffActivity" }, "$copy": { "title": "$copy", @@ -3580,16 +3855,22 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "text": { - "type": "string", - "title": "Text", - "description": "LG Expression to write to the log" + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", + "examples": [ + "user.vip == true" + ], + "type": "string" }, - "traceActivity": { - "type": "boolean", - "title": "Send Trace Activity", - "description": "Set to true to also create a TraceActivity with the log text", - "default": false + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } } }, "additionalProperties": false, @@ -3608,25 +3889,24 @@ { "title": "Type", "required": [ - "text", + "actions", "$type" ] } ] }, - "Microsoft.LuisRecognizer": { - "$role": "unionType(Microsoft.IRecognizer)", - "title": "LUIS Recognizer", - "description": "LUIS recognizer.", + "Microsoft.OnIntent": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnIntent", + "description": "This defines the actions to take when an Intent is recognized (and optionally entities)", "type": "object", - "additionalProperties": false, "properties": { "$type": { "title": "$type", "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.LuisRecognizer" + "const": "Microsoft.OnIntent" }, "$copy": { "title": "$copy", @@ -3645,16 +3925,38 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "applicationId": { + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", + "examples": [ + "user.vip == true" + ], "type": "string" }, - "endpoint": { - "type": "string" + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } }, - "endpointKey": { - "type": "string" + "intent": { + "type": "string", + "title": "Intent", + "description": "Intent name to trigger on" + }, + "entities": { + "type": "array", + "title": "Entities", + "description": "The entities required to trigger this rule", + "items": { + "type": "string" + } } }, + "additionalProperties": false, "patternProperties": { "^\\$": { "type": "string" @@ -3670,18 +3972,17 @@ { "title": "Type", "required": [ - "applicationId", - "endpoint", - "endpointKey", + "actions", + "intent", "$type" ] } ] }, - "Microsoft.MessageActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Message Activity Rule", - "description": "This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation", + "Microsoft.OnInvokeActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnInvokeActivity", + "description": "This defines the actions to take when an Invoke activity is received", "type": "object", "properties": { "$type": { @@ -3689,7 +3990,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MessageActivityRule" + "const": "Microsoft.OnInvokeActivity" }, "$copy": { "title": "$copy", @@ -3748,10 +4049,10 @@ } ] }, - "Microsoft.MessageDeleteActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "MessageDelete Activity Rule", - "description": "This defines the actions to take when an MessageDelete activity is received", + "Microsoft.OnMessageActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "OnMessageActivity", + "description": "This defines the actions to take when an Message activity is received. NOTE: If this triggers it will override any Recognizer/Intent rule calculation", "type": "object", "properties": { "$type": { @@ -3759,7 +4060,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MessageDeleteActivityRule" + "const": "Microsoft.OnMessageActivity" }, "$copy": { "title": "$copy", @@ -3818,10 +4119,10 @@ } ] }, - "Microsoft.MessageReactionActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "MessageReaction Activity Rule", - "description": "This defines the actions to take when a MessageReaction activity is received", + "Microsoft.OnMessageDeleteActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "MessageDeleteActivity", + "description": "This defines the actions to take when an MessageDelete activity is received", "type": "object", "properties": { "$type": { @@ -3829,7 +4130,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MessageReactionActivityRule" + "const": "Microsoft.OnMessageDeleteActivity" }, "$copy": { "title": "$copy", @@ -3888,10 +4189,10 @@ } ] }, - "Microsoft.MessageUpdateActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "MessageUpdate Activity Rule", - "description": "This defines the actions to take when an MessageUpdate ctivity is received", + "Microsoft.OnMessageReactionActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "MessageReactionActivity", + "description": "This defines the actions to take when a MessageReaction activity is received", "type": "object", "properties": { "$type": { @@ -3899,7 +4200,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MessageUpdateActivityRule" + "const": "Microsoft.OnMessageReactionActivity" }, "$copy": { "title": "$copy", @@ -3958,10 +4259,10 @@ } ] }, - "Microsoft.MostSpecificSelector": { - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "Most Specific Rule Selector", - "description": "Select most specific true rules with optional additional selector", + "Microsoft.OnMessageUpdateActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "MessageUpdateActivity", + "description": "This defines the actions to take when an MessageUpdate ctivity is received", "type": "object", "properties": { "$type": { @@ -3969,7 +4270,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MostSpecificSelector" + "const": "Microsoft.OnMessageUpdateActivity" }, "$copy": { "title": "$copy", @@ -3988,9 +4289,22 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "selector": { - "$type": "Microsoft.IRuleSelector", - "$ref": "#/definitions/Microsoft.IRuleSelector" + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", + "examples": [ + "user.vip == true" + ], + "type": "string" + }, + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } } }, "additionalProperties": false, @@ -4009,15 +4323,16 @@ { "title": "Type", "required": [ + "actions", "$type" ] } ] }, - "Microsoft.MultiLanguageRecognizer": { - "$role": "unionType(Microsoft.IRecognizer)", - "title": "Multi Language Recognizer", - "description": "Recognizer which allows you to configure the recognizer per language, and to define the policy for using them", + "Microsoft.OnTypingActivity": { + "$role": "unionType(Microsoft.IOnEvent)", + "title": "TypingActivity", + "description": "This defines the actions to take when a Typing activity is received", "type": "object", "properties": { "$type": { @@ -4025,7 +4340,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.MultiLanguageRecognizer" + "const": "Microsoft.OnTypingActivity" }, "$copy": { "title": "$copy", @@ -4044,20 +4359,21 @@ "type": "object", "description": "Extra information for the Bot Framework Designer." }, - "languagePolicy": { - "$type": "Microsoft.ILanguagePolicy", - "type": "object", - "title": "Language Policy", - "description": "Defines languages to try per language.", - "$ref": "#/definitions/Microsoft.ILanguagePolicy" + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", + "examples": [ + "user.vip == true" + ], + "type": "string" }, - "recognizers": { - "type": "object", - "title": "Recognizers", - "description": "Map of language -> IRecognizer", - "additionalProperties": { - "$type": "Microsoft.IRecognizer", - "$ref": "#/definitions/Microsoft.IRecognizer" + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" } } }, @@ -4077,16 +4393,16 @@ { "title": "Type", "required": [ - "recognizers", + "actions", "$type" ] } ] }, - "Microsoft.NumberInput": { - "$role": "unionType(Microsoft.IDialog)", - "title": "NumberInput Dialog", - "description": "This represents a dialog which gathers a decimal number in a specified range", + "Microsoft.OnUnknownIntent": { + "title": "OnUnknownIntent", + "description": "This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog", + "$role": "unionType(Microsoft.IOnEvent)", "type": "object", "properties": { "$type": { @@ -4094,7 +4410,7 @@ "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.NumberInput" + "const": "Microsoft.OnUnknownIntent" }, "$copy": { "title": "$copy", @@ -4102,140 +4418,33 @@ "type": "string", "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" }, - "$id": { - "title": "$id", - "description": "Inline id for reuse of an inline definition", - "type": "string", - "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" - }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." - }, - "property": { - "$role": "memoryPath", - "title": "Property", - "description": "This is that will be passed in as InputProperty and also set as the OutputProperty", - "examples": [ - "value.birthday", - "user.name" - ], - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" - }, - "inputBindings": { - "type": "object", - "title": "Input Bindings", - "description": "This defines properties which be passed as arguments to this dialog", - "examples": [ - "value.birthday" - ], - "additionalProperties": { - "type": "string" - } - }, - "outputBinding": { - "$role": "memoryPath", - "title": "Output Property binding", - "description": "This is the property which the EndDialog(result) will be set to when EndDialog() is called", - "examples": [ - "value.birthday" - ], - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$" - }, - "prompt": { - "$type": "Microsoft.IActivityTemplate", - "title": "Initial Prompt", - "description": "The message to send to as prompt for this input.", - "examples": [ - "What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "unrecognizedPrompt": { - "$type": "Microsoft.IActivityTemplate", - "title": "Unrecognized Prompt", - "description": "The message to send if the last input is not recognized.", - "examples": [ - "Let's try again. What is your birth date?" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "invalidPrompt": { - "$type": "Microsoft.IActivityTemplate", - "title": "Invalid Prompt", - "description": "The message to send to when then input was not valid for the input type.", - "examples": [ - "No date was recognized" - ], - "$ref": "#/definitions/Microsoft.IActivityTemplate" - }, - "maxTurnCount": { - "type": "integer", - "title": "Max Turn Count", - "description": "The max retry count for this prompt.", - "default": 2147483647, - "examples": [ - 3 - ] - }, - "validations": { - "type": "array", - "title": "Validation Expressions", - "description": "Expressions to validate an input.", - "items": { - "$role": "expression", - "type": "string", - "description": "String must contain an expression." - } - }, - "value": { - "$role": "expression", - "title": "Value", - "description": "The expression that you evaluated for input.", - "type": "string" - }, - "defaultValue": { - "$role": "expression", - "title": "Default Value", - "description": "Value to return if the value expression can't be evaluated.", - "type": "string" + "$id": { + "title": "$id", + "description": "Inline id for reuse of an inline definition", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" }, - "alwaysPrompt": { - "type": "boolean", - "title": "Always Prompt", - "description": "If set to true this will always prompt the user regardless if you already have the value or not.", - "default": false, - "examples": [ - false - ] + "$designer": { + "title": "$designer", + "type": "object", + "description": "Extra information for the Bot Framework Designer." }, - "allowInterruptions": { - "type": "boolean", - "title": "Allow Interruptions", - "description": "If set to true this will always consult the parent dialog whether it will be interupt or not.", - "default": true, + "constraint": { + "$role": "expression", + "title": "Constraint", + "description": "Optional constraint to which must be met for this rule to fire", "examples": [ - true - ] - }, - "outputFormat": { - "type": "string", - "enum": [ - "float", - "interger" + "user.vip == true" ], - "title": "Output Format", - "description": "The NumberInput output format.", - "default": "float" + "type": "string" }, - "defaultLocale": { - "type": "string", - "title": "Default Locale", - "description": "The prompts default locale that should be recognized.", - "default": "en-us" + "actions": { + "type": "array", + "description": "Sequence of actions or dialogs to execute", + "items": { + "$type": "Microsoft.IDialog", + "$ref": "#/definitions/Microsoft.IDialog" + } } }, "additionalProperties": false, @@ -4254,6 +4463,8 @@ { "title": "Type", "required": [ + "actions", + "type", "$type" ] } @@ -4354,7 +4565,7 @@ ] }, "Microsoft.RandomSelector": { - "$role": "unionType(Microsoft.IRuleSelector)", + "$role": "unionType(Microsoft.IEventSelector)", "title": "Random rule selector", "description": "Select most specific true rule", "type": "object", @@ -4594,76 +4805,6 @@ } ] }, - "Microsoft.Rule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Event Rule", - "description": "Defines a rule for an event which is triggered by some source", - "type": "object", - "properties": { - "$type": { - "title": "$type", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.Rule" - }, - "$copy": { - "title": "$copy", - "description": "Copy the definition by id from a .dialog file.", - "type": "string", - "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" - }, - "$id": { - "title": "$id", - "description": "Inline id for reuse of an inline definition", - "type": "string", - "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" - }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." - }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", - "examples": [ - "user.vip == true" - ], - "type": "string" - }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - } - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "type": "string" - } - }, - "anyOf": [ - { - "title": "Reference", - "required": [ - "$copy" - ] - }, - { - "title": "Type", - "required": [ - "actions", - "$type" - ] - } - ] - }, "Microsoft.SendActivity": { "$role": "unionType(Microsoft.IDialog)", "title": "Send Activity Step", @@ -5137,8 +5278,8 @@ ] }, "Microsoft.TrueSelector": { - "$role": "unionType(Microsoft.IRuleSelector)", - "title": "True Rule Selector", + "$role": "unionType(Microsoft.IEventSelector)", + "title": "True Event Selector", "description": "Selector for all true rules", "type": "object", "properties": { @@ -5188,146 +5329,6 @@ } ] }, - "Microsoft.TypingActivityRule": { - "$role": "unionType(Microsoft.IRule)", - "title": "Typing Activity Rule", - "description": "This defines the actions to take when a Typing activity is received", - "type": "object", - "properties": { - "$type": { - "title": "$type", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.TypingActivityRule" - }, - "$copy": { - "title": "$copy", - "description": "Copy the definition by id from a .dialog file.", - "type": "string", - "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" - }, - "$id": { - "title": "$id", - "description": "Inline id for reuse of an inline definition", - "type": "string", - "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" - }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." - }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", - "examples": [ - "user.vip == true" - ], - "type": "string" - }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - } - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "type": "string" - } - }, - "anyOf": [ - { - "title": "Reference", - "required": [ - "$copy" - ] - }, - { - "title": "Type", - "required": [ - "actions", - "$type" - ] - } - ] - }, - "Microsoft.UnknownIntentRule": { - "title": "Unknown Intent Rule", - "description": "This defines the actions to take when an utterence is not recognized (aka, the None Intent). NOTE: UnknownIntent will defer to any specific intent that fires in a parent dialog", - "$role": "unionType(Microsoft.IRule)", - "type": "object", - "properties": { - "$type": { - "title": "$type", - "description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)", - "type": "string", - "pattern": "^[a-zA-Z][a-zA-Z0-9.]*$", - "const": "Microsoft.UnknownIntentRule" - }, - "$copy": { - "title": "$copy", - "description": "Copy the definition by id from a .dialog file.", - "type": "string", - "pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$" - }, - "$id": { - "title": "$id", - "description": "Inline id for reuse of an inline definition", - "type": "string", - "pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$" - }, - "$designer": { - "title": "$designer", - "type": "object", - "description": "Extra information for the Bot Framework Designer." - }, - "constraint": { - "$role": "expression", - "title": "Constraint", - "description": "Optional constraint to which must be met for this rule to fire", - "examples": [ - "user.vip == true" - ], - "type": "string" - }, - "actions": { - "type": "array", - "description": "Sequence of actions or dialogs to execute", - "items": { - "$type": "Microsoft.IDialog", - "$ref": "#/definitions/Microsoft.IDialog" - } - } - }, - "additionalProperties": false, - "patternProperties": { - "^\\$": { - "type": "string" - } - }, - "anyOf": [ - { - "title": "Reference", - "required": [ - "$copy" - ] - }, - { - "title": "Type", - "required": [ - "actions", - "$type" - ] - } - ] - }, "Testbot.JavascriptStep": { "$role": "unionType(Microsoft.IDialog)", "title": "Javascript Step", diff --git a/tests/Microsoft.Bot.Builder.AI.QnA.Tests/QnAMakerTests.cs b/tests/Microsoft.Bot.Builder.AI.QnA.Tests/QnAMakerTests.cs index 28b337bc51..325e2e8e62 100644 --- a/tests/Microsoft.Bot.Builder.AI.QnA.Tests/QnAMakerTests.cs +++ b/tests/Microsoft.Bot.Builder.AI.QnA.Tests/QnAMakerTests.cs @@ -11,7 +11,7 @@ using Microsoft.Bot.Builder.Dialogs; using Microsoft.Bot.Builder.Dialogs.Adaptive; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Declarative; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; @@ -116,9 +116,9 @@ private AdaptiveDialog createDialog(MockHttpMessageHandler mockHttp) var rootDialog = new AdaptiveDialog("root") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -134,16 +134,16 @@ private AdaptiveDialog createDialog(MockHttpMessageHandler mockHttp) { "CowboyIntent" , "moo" } } }, - Rules = new List() + Events = new List() { - new IntentRule(intent: "CowboyIntent") + new OnIntent(intent: "CowboyIntent") { Actions = new List() { new SendActivity("Yippee ki-yay!") } }, - new UnknownIntentRule() + new OnUnknownIntent() { Actions = new List() { @@ -166,7 +166,7 @@ private AdaptiveDialog createDialog(MockHttpMessageHandler mockHttp) } } }, - new EventRule() + new Dialogs.Adaptive.Events.OnDialogEvent() { Events = new List() { "UnhandledUnknownIntent"}, Actions = new List() diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/ActionTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/ActionTests.cs index 13970b8093..340c2534fd 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/ActionTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/ActionTests.cs @@ -7,7 +7,7 @@ using Microsoft.Bot.Builder.Dialogs.Declarative; using Microsoft.Bot.Builder.Dialogs.Adaptive.Input; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Expressions; using Microsoft.Bot.Builder.Expressions.Parser; @@ -54,9 +54,9 @@ public async Task Step_WaitForInput() { var testDialog = new AdaptiveDialog("planningTest"); - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new TextInput() { Prompt = new ActivityTemplate("Hello, what is your name?"), OutputBinding = "user.name" }, @@ -77,9 +77,9 @@ public async Task Step_TraceActivity() { var dialog = new AdaptiveDialog("traceActivity"); - dialog.AddRules(new List() + dialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new SetProperty() @@ -123,9 +123,9 @@ await CreateFlow(dialog, sendTrace: true) public async Task Step_IfCondition() { var testDialog = new AdaptiveDialog("planningTest"); - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new IfCondition() @@ -161,9 +161,9 @@ public async Task Step_Switch() { var testDialog = new AdaptiveDialog("planningTest") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -199,9 +199,9 @@ public async Task Step_Switch_Default() { var testDialog = new AdaptiveDialog("planningTest") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -237,9 +237,9 @@ public async Task Step_Switch_Number() { var testDialog = new AdaptiveDialog("planningTest") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -276,9 +276,9 @@ public async Task Step_Switch_Bool() { var testDialog = new AdaptiveDialog("planningTest") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -314,9 +314,9 @@ public async Task Step_TextInput() { var testDialog = new AdaptiveDialog("planningTest"); - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new IfCondition() @@ -355,9 +355,9 @@ public async Task Step_ConfirmInput() var testDialog = new AdaptiveDialog("planningTest") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -408,9 +408,9 @@ public async Task Step_ChoiceInput() var testDialog = new AdaptiveDialog("planningTest") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -468,9 +468,9 @@ public async Task Step_ChoiceStringInMemory() var testDialog = new AdaptiveDialog("planningTest") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -533,9 +533,9 @@ public async Task Step_ChoicesInMemory() var testDialog = new AdaptiveDialog("planningTest") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -599,9 +599,9 @@ public async Task Step_NumberInput() AutoEndDialog = false }; - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new NumberInput() @@ -639,9 +639,9 @@ public async Task Step_DatetimeInput() AutoEndDialog = false }; - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new DateTimeInput() @@ -667,9 +667,9 @@ public async Task Step_TextInputWithInvalidPrompt() { var testDialog = new AdaptiveDialog("planningTest"); - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new IfCondition() @@ -710,16 +710,16 @@ public async Task Step_DoActions() testDialog.Recognizer = new RegexRecognizer() { Intents = new Dictionary() { { "JokeIntent", "joke" } } }; - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new IntentRule("JokeIntent", + new OnIntent("JokeIntent", actions: new List() { new SendActivity("Why did the chicken cross the road?"), new EndTurn(), new SendActivity("To get to the other side") }), - new UnknownIntentRule( + new OnUnknownIntent( new List() { new IfCondition() @@ -756,9 +756,9 @@ await CreateFlow(testDialog) public async Task Step_BeginDialog() { var tellJokeDialog = new AdaptiveDialog("TellJokeDialog"); - tellJokeDialog.AddRules(new List() + tellJokeDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new SendActivity("Why did the chicken cross the road?"), @@ -770,9 +770,9 @@ public async Task Step_BeginDialog() var askNameDialog = new AdaptiveDialog("AskNameDialog") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -802,9 +802,9 @@ public async Task Step_BeginDialog() testDialog.Recognizer = new RegexRecognizer() { Intents = new Dictionary() { { "JokeIntent", "joke" } } }; - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -813,12 +813,12 @@ public async Task Step_BeginDialog() } }, - new IntentRule("JokeIntent", + new OnIntent("JokeIntent", actions: new List() { new BeginDialog() { Dialog = tellJokeDialog } }), - new UnknownIntentRule( + new OnUnknownIntent( actions: new List() { new SendActivity("I'm a joke bot. To get started say 'tell me a joke'") @@ -840,9 +840,9 @@ await CreateFlow(testDialog) public async Task Step_ReplaceDialog() { var tellJokeDialog = new AdaptiveDialog("TellJokeDialog"); - tellJokeDialog.AddRules(new List() + tellJokeDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new SendActivity("Why did the chicken cross the road?"), @@ -854,9 +854,9 @@ public async Task Step_ReplaceDialog() var askNameDialog = new AdaptiveDialog("AskNameDialog") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -885,7 +885,7 @@ public async Task Step_ReplaceDialog() testDialog.AutoEndDialog = false; testDialog.Recognizer = new RegexRecognizer() { Intents = new Dictionary() { { "JokeIntent", "joke" } } }; - testDialog.AddRule(new BeginDialogRule() + testDialog.AddEvent(new OnBeginDialog() { Actions = new List() { @@ -894,9 +894,9 @@ public async Task Step_ReplaceDialog() } }); - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new IntentRule("JokeIntent", + new OnIntent("JokeIntent", actions: new List() { new ReplaceDialog("TellJokeDialog") @@ -930,14 +930,14 @@ public async Task Step_EndDialog() testDialog.Recognizer = new RegexRecognizer() { Intents = new Dictionary() { { "EndIntent", "end" } } }; var tellJokeDialog = new AdaptiveDialog("TellJokeDialog"); - tellJokeDialog.AddRules(new List() + tellJokeDialog.AddEvents(new List() { - new IntentRule("EndIntent", + new OnIntent("EndIntent", actions: new List() { new EndDialog() }), - new UnknownIntentRule( + new OnUnknownIntent( new List() { new SendActivity("Why did the chicken cross the road?"), @@ -948,9 +948,9 @@ public async Task Step_EndDialog() }); tellJokeDialog.Recognizer = new RegexRecognizer() { Intents = new Dictionary() { { "EndIntent", "end" } } }; - testDialog.AddRules(new List() + testDialog.AddEvents(new List() { - new UnknownIntentRule( + new OnUnknownIntent( new List() { new BeginDialog() { Dialog = tellJokeDialog }, @@ -971,9 +971,9 @@ public async Task Step_RepeatDialog() { var testDialog = new AdaptiveDialog("testDialog") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -1006,9 +1006,9 @@ public async Task Step_EmitEvent() var rootDialog = new AdaptiveDialog("root") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -1026,16 +1026,16 @@ public async Task Step_EmitEvent() { "CowboyIntent" , "moo" } } }, - Rules = new List() + Events = new List() { - new IntentRule(intent: "CowboyIntent") + new OnIntent(intent: "CowboyIntent") { Actions = new List() { new SendActivity("Yippee ki-yay!") } }, - new IntentRule(intent: "EmitIntent") + new OnIntent(intent: "EmitIntent") { Actions = new List() { @@ -1052,7 +1052,7 @@ public async Task Step_EmitEvent() } }, - new EventRule() + new OnDialogEvent() { Events = new List() { "CustomEvent"}, Actions = new List() @@ -1082,9 +1082,9 @@ public async Task Step_Foreach() var rootDialog = new AdaptiveDialog("root") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -1145,9 +1145,9 @@ public async Task Step_ForeachPage() var rootDialog = new AdaptiveDialog("root") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/AdaptiveDialogTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/AdaptiveDialogTests.cs index 8628118907..d9e110f2ef 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/AdaptiveDialogTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/AdaptiveDialogTests.cs @@ -6,7 +6,7 @@ using Microsoft.Bot.Builder.Adapters; using Microsoft.Bot.Builder.Dialogs.Adaptive.Input; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; using Microsoft.Bot.Builder.Dialogs.Declarative.Types; @@ -54,7 +54,7 @@ public async Task AdaptiveDialog_TopLevelFallback() { var ruleDialog = new AdaptiveDialog("planningTest"); - ruleDialog.AddRule(new UnknownIntentRule( + ruleDialog.AddEvent(new OnUnknownIntent( new List() { new SendActivity("Hello Planning!") @@ -71,7 +71,7 @@ public async Task AdaptiveDialog_TopLevelFallbackMultipleActivities() { var ruleDialog = new AdaptiveDialog("planningTest"); - ruleDialog.AddRule(new UnknownIntentRule(new List() + ruleDialog.AddEvent(new OnUnknownIntent(new List() { new SendActivity("Hello Planning!"), new SendActivity("Howdy awain") @@ -89,8 +89,8 @@ public async Task AdaptiveDialog_EndTurn() { var ruleDialog = new AdaptiveDialog("planningTest"); - ruleDialog.AddRule( - new UnknownIntentRule( + ruleDialog.AddEvent( + new OnUnknownIntent( new List() { new TextInput() @@ -113,7 +113,7 @@ await CreateFlow(ruleDialog) public async Task AdaptiveDialog_EditArray() { var dialog = new AdaptiveDialog("planningTest"); - dialog.Rules.Add(new BeginDialogRule() + dialog.Events.Add(new OnBeginDialog() { Actions = new List() { @@ -200,7 +200,7 @@ public async Task AdaptiveDialog_IfProperty() { var ruleDialog = new AdaptiveDialog("planningTest"); - ruleDialog.AddRule(new UnknownIntentRule( + ruleDialog.AddEvent(new OnUnknownIntent( new List() { new IfCondition() @@ -230,9 +230,9 @@ public async Task AdaptiveDialog_TextInput() { var ruleDialog = new AdaptiveDialog("planningTest") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -270,9 +270,9 @@ public async Task AdaptiveDialog_StringLiteralInExpression() var ruleDialog = new AdaptiveDialog("planningTest") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new UnknownIntentRule() + new OnUnknownIntent() { Actions = new List() { @@ -328,9 +328,9 @@ public async Task AdaptiveDialog_DoActions() { "HelloIntent", "hi|hello" } } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -349,7 +349,7 @@ public async Task AdaptiveDialog_DoActions() new SendActivity("Hello {user.name}, nice to meet you!") }, }, - new IntentRule() + new OnIntent() { Intent="JokeIntent", Actions = new List() @@ -359,7 +359,7 @@ public async Task AdaptiveDialog_DoActions() new SendActivity("To get to the other side") } }, - new IntentRule() + new OnIntent() { Intent="HelloIntent", Actions = new List() @@ -398,9 +398,9 @@ public async Task AdaptiveDialog_ReplacePlan() } }; - ruleDialog.AddRules(new List() + ruleDialog.AddEvents(new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -419,7 +419,7 @@ public async Task AdaptiveDialog_ReplacePlan() new SendActivity("Hello {user.name}, nice to meet you!") } }, - new IntentRule() + new OnIntent() { Intent= "GreetingIntent", Actions = new List() @@ -427,14 +427,14 @@ public async Task AdaptiveDialog_ReplacePlan() new SendActivity("Hello {user.name}, nice to meet you!") } }, - new IntentRule("JokeIntent", + new OnIntent("JokeIntent", actions: new List() { new SendActivity("Why did the chicken cross the road?"), new EndTurn(), new SendActivity("To get to the other side") }), - new UnknownIntentRule( + new OnUnknownIntent( actions: new List() { new SendActivity("I'm a joke bot. To get started say 'tell me a joke'") @@ -470,9 +470,9 @@ public async Task AdaptiveDialog_NestedInlineSequences() { "GoodbyeIntent", "bye|goodbye|seeya|see ya"}, } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -491,25 +491,25 @@ public async Task AdaptiveDialog_NestedInlineSequences() new SendActivity("Hello {user.name}, nice to meet you!"), }, }, - new IntentRule("GreetingIntemt", + new OnIntent("GreetingIntemt", actions: new List() { new SendActivity("Hello {user.name}, nice to meet you!"), }), - new IntentRule("JokeIntent", + new OnIntent("JokeIntent", actions: new List() { new SendActivity("Why did the chicken cross the road?"), new EndTurn(), new SendActivity("To get to the other side") }), - new IntentRule("GoodbyeIntent", + new OnIntent("GoodbyeIntent", actions: new List() { new SendActivity("See you later aligator!"), new EndDialog() }), - new UnknownIntentRule( + new OnUnknownIntent( new List() { new SendActivity("I'm a joke bot. To get started say 'tell me a joke'") @@ -550,9 +550,9 @@ public async Task AdaptiveDialog_BeginDialog() { "GoodbyeIntent", "(?i)bye|goodbye|seeya|see ya"} } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -561,26 +561,26 @@ public async Task AdaptiveDialog_BeginDialog() }, }, - new IntentRule("JokeIntent", + new OnIntent("JokeIntent", actions: new List() { new BeginDialog("TellJokeDialog"), }), - new IntentRule("GreetingIntent", + new OnIntent("GreetingIntent", actions: new List() { new BeginDialog("Greeting"), }), - new IntentRule("GoodbyeIntent", + new OnIntent("GoodbyeIntent", actions: new List() { new SendActivity("See you later aligator!"), new EndDialog() }), - new UnknownIntentRule(actions: new List() + new OnUnknownIntent(actions: new List() { new SendActivity("Like I said, I'm a joke bot. To get started say 'tell me a joke'"), }), @@ -590,9 +590,9 @@ public async Task AdaptiveDialog_BeginDialog() innerDialog.AddDialog(new[] { new AdaptiveDialog("Greeting") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -620,9 +620,9 @@ public async Task AdaptiveDialog_BeginDialog() }, new AdaptiveDialog("TellJokeDialog") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -647,30 +647,30 @@ public async Task AdaptiveDialog_BeginDialog() { "HelpIntent", "(?i)help" } } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { new SendActivity("Hi, type 'begin' to start a dialog, type 'help' to get help.") }, }, - new IntentRule("BeginIntent") + new OnIntent("BeginIntent") { Actions = new List() { new BeginDialog("innerDialog") } }, - new IntentRule("HelpIntent") + new OnIntent("HelpIntent") { Actions = new List() { new SendActivity("help is coming") } }, - new UnknownIntentRule() + new OnUnknownIntent() { Actions = new List() { @@ -710,7 +710,7 @@ await CreateFlow(outerDialog) } [TestMethod] - public async Task AdaptiveDialog_IntentRule() + public async Task AdaptiveDialog_IntentEvent() { var planningDialog = new AdaptiveDialog("planningTest") { @@ -722,16 +722,16 @@ public async Task AdaptiveDialog_IntentRule() { "JokeIntent", "joke" } } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { new SendActivity("I'm a joke bot. To get started say 'tell me a joke'") }, }, - new IntentRule("JokeIntent", + new OnIntent("JokeIntent", actions: new List() { new SendActivity("Why did the chicken cross the road?"), @@ -766,9 +766,9 @@ public async Task AdaptiveDialog_NestedRecognizers() } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -786,9 +786,9 @@ public async Task AdaptiveDialog_NestedRecognizers() new SendActivity("{user.age}"), } }, - new IntentRule("SideIntent") { Actions = new List() { new SendActivity("sideintent") } }, - new IntentRule("CancelIntent") { Actions = new List() { new EndDialog() } }, - new UnknownIntentRule() { Actions = new List() { new SendActivity("outerWhat") } } + new OnIntent("SideIntent") { Actions = new List() { new SendActivity("sideintent") } }, + new OnIntent("CancelIntent") { Actions = new List() { new EndDialog() } }, + new OnUnknownIntent() { Actions = new List() { new SendActivity("outerWhat") } } } }; @@ -803,11 +803,11 @@ public async Task AdaptiveDialog_NestedRecognizers() { "RootIntent", "root" }, } }, - Rules = new List() + Events = new List() { - new IntentRule("StartOuterIntent", actions: new List() { outerDialog }), - new IntentRule("RootIntent", actions: new List() { new SendActivity("rootintent") }), - new UnknownIntentRule( new List() { new SendActivity("rootunknown") }) + new OnIntent("StartOuterIntent", actions: new List() { outerDialog }), + new OnIntent("RootIntent", actions: new List() { new SendActivity("rootintent") }), + new OnUnknownIntent( new List() { new SendActivity("rootunknown") }) } }; @@ -835,7 +835,7 @@ await CreateFlow(ruleDialog) } [TestMethod] - public async Task AdaptiveDialog_ActivityRules() + public async Task AdaptiveDialog_ActivityEvents() { var dialog = new AdaptiveDialog("test") { @@ -847,53 +847,53 @@ public async Task AdaptiveDialog_ActivityRules() { "JokeIntent", "joke" } } }, - Rules = new List() + Events = new List() { - new ActivityRule("Custom", actions: new List() { new SendActivity("CustomActivityRule") }), - new MessageActivityRule(actions: new List() { new SendActivity("MessageActivityRule") }), - new MessageDeleteActivityRule(actions: new List() { new SendActivity("MessageDeleteActivityRule") }), - new MessageUpdateActivityRule(actions: new List() { new SendActivity("MessageUpdateActivityRule") }), - new MessageReactionActivityRule(actions: new List() { new SendActivity("MessageReactionActivityRule") }), - new ConversationUpdateActivityRule(actions: new List() { new SendActivity("ConversationUpdateActivityRule") }), - new EndOfConversationActivityRule(actions: new List() { new SendActivity("EndOfConversationActivityRule") }), - new InvokeActivityRule(actions: new List() { new SendActivity("InvokeActivityRule") }), - new EventActivityRule(actions: new List() { new SendActivity("EventActivityRule") }), - new HandoffActivityRule(actions: new List() { new SendActivity("HandoffActivityRule") }), - new TypingActivityRule(actions: new List() { new SendActivity("TypingActivityRule") }), - new MessageActivityRule(constraint: "turn.activity.text == 'constraint'", actions: new List() { new SendActivity("constraint") }), + new OnActivity("Custom", actions: new List() { new SendActivity("CustomActivityEvent") }), + new OnMessageActivity(actions: new List() { new SendActivity("MessageActivityEvent") }), + new OnMessageDeleteActivity(actions: new List() { new SendActivity("MessageDeleteActivityEvent") }), + new OnMessageUpdateActivity(actions: new List() { new SendActivity("MessageUpdateActivityEvent") }), + new OnMessageReactionActivity(actions: new List() { new SendActivity("MessageReactionActivityEvent") }), + new OnConversationUpdateActivity(actions: new List() { new SendActivity("ConversationUpdateActivityEvent") }), + new OnEndOfConversationActivity(actions: new List() { new SendActivity("EndOfConversationActivityEvent") }), + new OnInvokeActivity(actions: new List() { new SendActivity("InvokeActivityEvent") }), + new OnEventActivity(actions: new List() { new SendActivity("EventActivityEvent") }), + new OnHandoffActivity(actions: new List() { new SendActivity("HandoffActivityEvent") }), + new OnTypingActivity(actions: new List() { new SendActivity("TypingActivityEvent") }), + new OnMessageActivity(constraint: "turn.activity.text == 'constraint'", actions: new List() { new SendActivity("constraint") }), } }; await CreateFlow(dialog) .SendConversationUpdate() - .AssertReply("ConversationUpdateActivityRule") - .Send("MessageActivityRule") - .AssertReply("MessageActivityRule") + .AssertReply("ConversationUpdateActivityEvent") + .Send("MessageActivityEvent") + .AssertReply("MessageActivityEvent") .Send("constraint") .AssertReply("constraint") .Send(new Activity(type: ActivityTypes.MessageUpdate)) - .AssertReply("MessageUpdateActivityRule") + .AssertReply("MessageUpdateActivityEvent") .Send(new Activity(type: ActivityTypes.MessageDelete)) - .AssertReply("MessageDeleteActivityRule") + .AssertReply("MessageDeleteActivityEvent") .Send(new Activity(type: ActivityTypes.MessageReaction)) - .AssertReply("MessageReactionActivityRule") + .AssertReply("MessageReactionActivityEvent") .Send(Activity.CreateTypingActivity()) - .AssertReply("TypingActivityRule") + .AssertReply("TypingActivityEvent") .Send(Activity.CreateEndOfConversationActivity()) - .AssertReply("EndOfConversationActivityRule") + .AssertReply("EndOfConversationActivityEvent") .Send(Activity.CreateEventActivity()) - .AssertReply("EventActivityRule") + .AssertReply("EventActivityEvent") .Send(Activity.CreateHandoffActivity()) - .AssertReply("HandoffActivityRule") + .AssertReply("HandoffActivityEvent") .Send(Activity.CreateInvokeActivity()) - .AssertReply("InvokeActivityRule") + .AssertReply("InvokeActivityEvent") .Send(new Activity(type: "Custom")) - .AssertReply("CustomActivityRule") + .AssertReply("CustomActivityEvent") .StartTestAsync(); } [TestMethod] - public async Task AdaptiveDialog_ActivityAndIntentRules() + public async Task AdaptiveDialog_ActivityAndIntentEvents() { var dialog = new AdaptiveDialog("test") { @@ -905,10 +905,10 @@ public async Task AdaptiveDialog_ActivityAndIntentRules() { "JokeIntent", "joke" } } }, - Rules = new List() + Events = new List() { - new IntentRule(intent: "JokeIntent", actions: new List() { new SendActivity("chicken joke") }), - new MessageActivityRule(constraint: "turn.activity.text == 'magic'", actions: new List() { new SendActivity("abracadabra") }), + new OnIntent(intent: "JokeIntent", actions: new List() { new SendActivity("chicken joke") }), + new OnMessageActivity(constraint: "turn.activity.text == 'magic'", actions: new List() { new SendActivity("abracadabra") }), } }; diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/DialogContextStateTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/DialogContextStateTests.cs index c060dd07c7..6c74bee7fe 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/DialogContextStateTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/DialogContextStateTests.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Microsoft.Bot.Builder.Adapters; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; using Microsoft.Bot.Builder.Dialogs.Declarative.Types; @@ -254,16 +254,16 @@ public async Task DialogContextState_TurnStateMappings() { "NameIntent", ".*name is (?.*)" } } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { new SendActivity("{turn.activity.text}"), } }, - new IntentRule(intent: "IntentNumber1", + new OnIntent(intent: "IntentNumber1", actions:new List() { new SendActivity("{turn.activity.text}"), @@ -272,7 +272,7 @@ public async Task DialogContextState_TurnStateMappings() new SendActivity("{turn.recognized.text}"), new SendActivity("{turn.recognized.intents.intentnumber1.score}"), }), - new IntentRule(intent: "NameIntent", + new OnIntent(intent: "NameIntent", actions:new List() { new SendActivity("{turn.recognized.entities.name}"), @@ -300,9 +300,9 @@ public async Task DialogContextState_DialogCommandScope() var testDialog = new AdaptiveDialog("testDialog") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() @@ -339,9 +339,9 @@ public async Task DialogContextState_InputBinding() var testDialog = new AdaptiveDialog("testDialog") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -350,9 +350,9 @@ public async Task DialogContextState_InputBinding() new AdaptiveDialog("d1") { InputBindings = new Dictionary() { { "$address.name", "dialog.name" } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -367,9 +367,9 @@ public async Task DialogContextState_InputBinding() Dialog = new AdaptiveDialog("d2") { InputBindings = new Dictionary() { { "$address.name", "dialog.name" } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -398,9 +398,9 @@ public async Task DialogContextState_OutputBinding() var testDialog = new AdaptiveDialog("testDialog") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -411,9 +411,9 @@ public async Task DialogContextState_OutputBinding() InputBindings = new Dictionary() { { "$xxx", "dialog.name" } }, OutputBinding = "dialog.name", DefaultResultProperty = "$xxx", - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -433,9 +433,9 @@ public async Task DialogContextState_OutputBinding() DefaultResultProperty = "$zzz", // test output binding from adaptive dialog OutputBinding = "dialog.name", - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -456,9 +456,9 @@ public async Task DialogContextState_OutputBinding() { InputBindings = new Dictionary() { { "$qqq", "dialog.name" } }, DefaultResultProperty = "$qqq", - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -497,9 +497,9 @@ public async Task DialogContextState_CallstackScope() var testDialog = new AdaptiveDialog("testDialog") { AutoEndDialog = false, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -510,9 +510,9 @@ public async Task DialogContextState_CallstackScope() { Dialog = new AdaptiveDialog("d2") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -523,9 +523,9 @@ public async Task DialogContextState_CallstackScope() { Dialog = new AdaptiveDialog("d3") { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/MiscTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/MiscTests.cs index 49cd138b43..9fb8ab0258 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/MiscTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/MiscTests.cs @@ -7,7 +7,7 @@ using Microsoft.Bot.Builder.Dialogs.Declarative; using Microsoft.Bot.Builder.Dialogs.Adaptive.Input; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Expressions; using Microsoft.Bot.Builder.Expressions.Parser; @@ -54,9 +54,9 @@ public async Task IfCondition_EndDialog() { var testDialog = new AdaptiveDialog(nameof(AdaptiveDialog)) { - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -68,7 +68,7 @@ public async Task IfCondition_EndDialog() new SendActivity("Hello, {user.name}") }, }, - new IntentRule("CancelIntent") + new OnIntent("CancelIntent") { Actions = new List() { @@ -128,9 +128,9 @@ public async Task Rule_Reprompt() { "SetName", @"my name is (?.*)" } } }, - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() { @@ -141,7 +141,7 @@ public async Task Rule_Reprompt() new SendActivity("your name is {user.name}!"), }, }, - new IntentRule("SetName", new List() { "name" }) + new OnIntent("SetName", new List() { "name" }) { Actions = new List() { diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/RecognizerTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/RecognizerTests.cs index 8559a6d2f1..9e3a59e419 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/RecognizerTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/RecognizerTests.cs @@ -6,7 +6,7 @@ using Microsoft.Bot.Builder.Adapters; using Microsoft.Bot.Builder.Dialogs.Declarative; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; @@ -92,19 +92,19 @@ private TestFlow CreateFlow(string locale) var dialog = new AdaptiveDialog(); dialog.Recognizer = GetMultiLingualRecognizer(); - dialog.AddRules(new List() + dialog.AddEvents(new List() { - new IntentRule("Greeting", actions: + new OnIntent("Greeting", actions: new List() { new SendActivity("greeting intent"), }), - new IntentRule("Goodbye", actions: + new OnIntent("Goodbye", actions: new List() { new SendActivity("goodbye intent"), }), - new UnknownIntentRule(actions: + new OnUnknownIntent(actions: new List() { new SendActivity("default rule"), diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SelectorTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SelectorTests.cs index d73dde6790..dd9bd32f89 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SelectorTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SelectorTests.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using Microsoft.Bot.Builder.Adapters; using Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Selectors; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; @@ -20,7 +20,7 @@ public class SelectorTests { public TestContext TestContext { get; set; } - private TestFlow CreateFlow(IRuleSelector selector) + private TestFlow CreateFlow(IEventSelector selector) { TypeFactory.Configuration = new ConfigurationBuilder().Build(); var storage = new MemoryStorage(); @@ -45,16 +45,16 @@ private TestFlow CreateFlow(IRuleSelector selector) { "trigger", "trigger" } } }; - dialog.AddRules(new List() + dialog.AddEvents(new List() { - new IntentRule("a", actions: new List { new SetProperty { Property = "user.a", Value = "1" } }), - new IntentRule("b", actions: new List { new SetProperty { Property = "user.b", Value = "1" } }), - new IntentRule("trigger", constraint: "user.a == 1", actions: new List { new SendActivity("ruleA1") }), - new IntentRule("trigger", constraint: "user.a == 1", actions: new List { new SendActivity("ruleA2") }), - new IntentRule("trigger", constraint: "user.b == 1 || user.c == 1", actions: new List { new SendActivity("ruleBorC") }), - new IntentRule("trigger", constraint: "user.a == 1 && user.b == 1", actions: new List { new SendActivity("ruleAandB") }), - new IntentRule("trigger", constraint: "user.a == 1 && user.c == 1", actions: new List { new SendActivity("ruleAandC") }), - new IntentRule("trigger", constraint: "", actions: new List { new SendActivity("default")}) + new OnIntent("a", actions: new List { new SetProperty { Property = "user.a", Value = "1" } }), + new OnIntent("b", actions: new List { new SetProperty { Property = "user.b", Value = "1" } }), + new OnIntent("trigger", constraint: "user.a == 1", actions: new List { new SendActivity("ruleA1") }), + new OnIntent("trigger", constraint: "user.a == 1", actions: new List { new SendActivity("ruleA2") }), + new OnIntent("trigger", constraint: "user.b == 1 || user.c == 1", actions: new List { new SendActivity("ruleBorC") }), + new OnIntent("trigger", constraint: "user.a == 1 && user.b == 1", actions: new List { new SendActivity("ruleAandB") }), + new OnIntent("trigger", constraint: "user.a == 1 && user.c == 1", actions: new List { new SendActivity("ruleAandC") }), + new OnIntent("trigger", constraint: "", actions: new List { new SendActivity("default")}) }); dialog.AutoEndDialog = false; diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SettingsStateTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SettingsStateTests.cs index 39cc78fa1b..3eadcaf6c0 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SettingsStateTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Adaptive.Tests/SettingsStateTests.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Bot.Builder.Adapters; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Declarative; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; @@ -46,9 +46,9 @@ private TestFlow CreateFlow(string locale) var convoState = new ConversationState(new MemoryStorage()); var userState = new UserState(new MemoryStorage()); var dialog = new AdaptiveDialog(); - dialog.AddRules(new List() + dialog.AddEvents(new List() { - new UnknownIntentRule(actions: + new OnUnknownIntent(actions: new List() { new SendActivity() diff --git a/tests/Microsoft.Bot.Builder.Dialogs.Tests/DialogManagerTests.cs b/tests/Microsoft.Bot.Builder.Dialogs.Tests/DialogManagerTests.cs index b2b0d45636..d03e6fd67d 100644 --- a/tests/Microsoft.Bot.Builder.Dialogs.Tests/DialogManagerTests.cs +++ b/tests/Microsoft.Bot.Builder.Dialogs.Tests/DialogManagerTests.cs @@ -7,7 +7,7 @@ using Microsoft.Bot.Builder.Adapters; using Microsoft.Bot.Builder.Dialogs.Adaptive; using Microsoft.Bot.Builder.Dialogs.Adaptive.Input; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; using Microsoft.Bot.Builder.Dialogs.Declarative.Types; @@ -125,8 +125,8 @@ private AdaptiveDialog CreateTestDialog(string property = "user.name") { var adaptiveDialog = new AdaptiveDialog("planningTest"); - adaptiveDialog.AddRule( - new UnknownIntentRule( + adaptiveDialog.AddEvent( + new OnUnknownIntent( new List() { new TextInput() diff --git a/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/Fallback/test.dialog b/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/Fallback/test.dialog index 00eaa778d7..00fdc319e6 100644 --- a/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/Fallback/test.dialog +++ b/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/Fallback/test.dialog @@ -1,9 +1,9 @@ { "$type": "Microsoft.AdaptiveDialog", "generator": "root.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", @@ -12,9 +12,9 @@ { "$type": "Microsoft.AdaptiveDialog", "generator": "subDialog.lg", - "rules": [ + "events": [ { - "$type": "Microsoft.BeginDialogRule", + "$type": "Microsoft.OnBeginDialog", "actions": [ { "$type": "Microsoft.SendActivity", diff --git a/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/LGGeneratorTests.cs b/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/LGGeneratorTests.cs index 8a0a097df0..0c2891a0e3 100644 --- a/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/LGGeneratorTests.cs +++ b/tests/Microsoft.Bot.Builder.LanguageGeneration.Renderer.Tests/LGGeneratorTests.cs @@ -7,7 +7,7 @@ using Microsoft.Bot.Builder.Dialogs; using Microsoft.Bot.Builder.Dialogs.Adaptive; using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; -using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Events; using Microsoft.Bot.Builder.Dialogs.Debugging; using Microsoft.Bot.Builder.Dialogs.Declarative; using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; @@ -142,9 +142,9 @@ public async Task TestDialogInjection() var dialog = new AdaptiveDialog() { Generator = new ResourceMultiLanguageGenerator("subDialog.lg"), - Rules = new List() + Events = new List() { - new BeginDialogRule() + new OnBeginDialog() { Actions = new List() {