public AssignGoalIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IPublishWrapper publishWrapper,
            IParameterResultFactory resultFactory,
            IProfileService profileService) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;
            ProfileService = profileService;

            var goalParameters = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.GoalPath },
                { Constants.SearchParameters.TemplateId, Constants.TemplateIds.GoalTemplateId.ToString() },
                { Constants.SearchParameters.AutoStart, "true" }
            };

            ConversationParameters.Add(new ItemParameter(GoalItemKey, Translator.Text("Chat.Intents.AssignGoal.GoalParameterRequest"), goalParameters, dataWrapper, inputFactory, resultFactory));
            var contentParameters = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ContentPath }
            };

            ConversationParameters.Add(new ItemParameter(PageItemKey, Translator.Text("Chat.Intents.AssignGoal.PageParameterRequest"), contentParameters, dataWrapper, inputFactory, resultFactory));
        }
Exemple #2
0
        public PublishIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IPublishWrapper publishWrapper,
            IParameterResultFactory resultFactory) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;

            ConversationParameters.Add(new RoleParameter(Translator.Text("Chat.Intents.Publish.RoleParameterWarning"), new List <string> {
                @"sitecore\Sitecore Client Publishing", @"sitecore\Sitecore Client Advanced Publishing"
            }, DataWrapper));
            var parameters = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ContentPath }
            };

            ConversationParameters.Add(new ItemParameter(ItemKey, Translator.Text("Chat.Intents.Publish.ItemParameterRequest"), parameters, dataWrapper, inputFactory, resultFactory));
            ConversationParameters.Add(new LanguageParameter(LangKey, Translator.Text("Chat.Parameters.LangParameterRequest"), settings, dataWrapper, inputFactory, resultFactory));
            ConversationParameters.Add(new WorkflowParameter(ItemKey, LangKey, Translator.Text("Chat.Intents.Publish.WorkflowParameterWarning")));
            ConversationParameters.Add(new DatabaseParameter(DBKey, Translator.Text("Chat.Parameters.DBParameterRequest"), settings, dataWrapper, inputFactory, publishWrapper, resultFactory));
            ConversationParameters.Add(new YesOrNoParameter(RecursionKey, Translator.Text("Chat.Intents.Publish.RecursionParameterRequest"), inputFactory, resultFactory));
            ConversationParameters.Add(new YesOrNoParameter(RelatedKey, Translator.Text("Chat.Intents.Publish.RelatedParameterRequest"), inputFactory, resultFactory));
        }
Exemple #3
0
 public RegistrationIntent(
     IIntentInputFactory inputFactory,
     IConversationResponseFactory responseFactory,
     IParameterResultFactory resultFactory,
     IIntelligentSearchSettings settings) : base(inputFactory, responseFactory, settings)
 {
     ConversationParameters.Add(new UsernameParameter(UsernameKey, inputFactory, resultFactory));
     ConversationParameters.Add(new PasswordParameter(PasswordKey, inputFactory, resultFactory));
 }
        public AssignProfileCardIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IParameterResultFactory resultFactory,
            IPublishWrapper publishWrapper,
            IProfileService profileService,
            ISearchService searchService) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;
            ProfileService = profileService;
            SearchService  = searchService;

            var profileParameters = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ProfilePath },
                { Constants.SearchParameters.TemplateId, Constants.TemplateIds.ProfileCardTemplateId.ToString() },
                { Constants.SearchParameters.AutoStart, "true" }
            };

            ConversationParameters.Add(new ItemParameter(ProfileCardItemKey, Translator.Text("Chat.Intents.AssignProfileCard.ProfileCardItemParameterRequest"), profileParameters, dataWrapper, inputFactory, resultFactory));

            var nameParameter = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ContentPath },
            };
            var nameParam = new ItemParameter(ItemNameKey, Translator.Text("Chat.Intents.AssignProfileCard.ItemNameParameterRequest"), nameParameter, dataWrapper, inputFactory, resultFactory);

            nameParam.IsOptional = true;
            ConversationParameters.Add(nameParam);

            var templateParameter = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.TemplatePath },
            };
            var templateParam = new ItemParameter(TemplateItemKey, Translator.Text("Chat.Intents.AssignProfileCard.TemplateItemParameterRequest"), templateParameter, dataWrapper, inputFactory, resultFactory);

            templateParam.IsOptional = true;
            ConversationParameters.Add(templateParam);

            var folderParameter = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ContentPath },
            };
            var folderParam = new ItemParameter(FolderItemKey, Translator.Text("Chat.Intents.AssignProfileCard.FolderItemParameterRequest"), folderParameter, dataWrapper, inputFactory, resultFactory);

            folderParam.IsOptional = true;
            ConversationParameters.Add(folderParam);

            var fieldParam = new KeyValueParameter(FieldItemKey, Translator.Text("Chat.Intents.AssignProfileCard.FieldNameParameterRequest"), Translator.Text("Chat.Intents.AssignProfileCard.FieldValueParameterRequest"), inputFactory, resultFactory);

            fieldParam.IsOptional = true;
            ConversationParameters.Add(fieldParam);
        }
Exemple #5
0
 public ContactIntent(
     IIntentInputFactory inputFactory,
     IConversationResponseFactory responseFactory,
     IParameterResultFactory resultFactory,
     IIntelligentSearchSettings settings) : base(inputFactory, responseFactory, settings)
 {
     ConversationParameters.Add(new NameParameter(NameKey, inputFactory, resultFactory));
     ConversationParameters.Add(new EmailParameter(EmailKey, inputFactory, resultFactory));
     ConversationParameters.Add(new MessageParameter(MessageKey, inputFactory, resultFactory));
 }
        public RebuildIndexIntent(
            IContentSearchWrapper searchWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IParameterResultFactory resultFactory,
            IOleSettings settings) : base(inputFactory, responseFactory, settings)
        {
            ContentSearchWrapper = searchWrapper;

            ConversationParameters.Add(new IndexParameter(IndexKey, inputFactory, searchWrapper, resultFactory));
        }
Exemple #7
0
 public NameParameter(
     string paramName,
     IIntentInputFactory inputFactory,
     IParameterResultFactory resultFactory)
 {
     ParamName          = paramName;
     ParamMessage       = Translator.Text("SearchForm.Parameters.NameRequest");
     IntentInputFactory = inputFactory;
     ResultFactory      = resultFactory;
     IsOptional         = false;
 }
 public LuisConversationService(
     IIntentProvider intentProvider,
     IMicrosoftCognitiveServicesApiKeys apiKeys,
     IConversationResponseFactory responseFactory,
     IParameterResultFactory resultFactory)
 {
     IntentProvider = intentProvider;
     ApiKeys        = apiKeys;
     ConversationResponseFactory = responseFactory;
     ResultFactory = resultFactory;
 }
        public KickUserIntent(
            IAuthenticationWrapper authWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IParameterResultFactory resultFactory,
            IOleSettings settings) : base(inputFactory, responseFactory, settings)
        {
            AuthenticationWrapper = authWrapper;

            ConversationParameters.Add(new UserParameter(UserKey, inputFactory, authWrapper, resultFactory));
        }
 public IntegerParameter(
     string paramName,
     string paramMessage,
     IIntentInputFactory inputFactory,
     IParameterResultFactory resultFactory)
 {
     ParamName          = paramName;
     ParamMessage       = paramMessage;
     IntentInputFactory = inputFactory;
     ResultFactory      = resultFactory;
     IsOptional         = false;
 }
 public IndexParameter(
     string paramName,
     IIntentInputFactory inputFactory,
     IContentSearchWrapper searchWrapper,
     IParameterResultFactory resultFactory)
 {
     ParamName          = paramName;
     ParamMessage       = Translator.Text("Chat.Parameters.IndexParameterRequest");
     IntentInputFactory = inputFactory;
     SearchWrapper      = searchWrapper;
     ResultFactory      = resultFactory;
     IsOptional         = false;
 }
 public ListGoalsIntent(
     IOleSettings settings,
     ISitecoreDataWrapper dataWrapper,
     IIntentInputFactory inputFactory,
     IConversationResponseFactory responseFactory,
     IParameterResultFactory resultFactory,
     IPublishWrapper publishWrapper,
     IProfileService profileService) : base(inputFactory, responseFactory, settings)
 {
     DataWrapper    = dataWrapper;
     PublishWrapper = publishWrapper;
     ProfileService = profileService;
 }
Exemple #13
0
 public UserParameter(
     string paramName,
     IIntentInputFactory inputFactory,
     IAuthenticationWrapper authWrapper,
     IParameterResultFactory resultFactory)
 {
     ParamName             = paramName;
     ParamMessage          = Translator.Text("Chat.Parameters.UserParameterRequest");
     IntentInputFactory    = inputFactory;
     AuthenticationWrapper = authWrapper;
     ResultFactory         = resultFactory;
     IsOptional            = false;
 }
Exemple #14
0
        public CreateProfileIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IParameterResultFactory resultFactory,
            IPublishWrapper publishWrapper) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;

            ConversationParameters.Add(new StringParameter(NameKey, Translator.Text("Chat.Intents.CreateProfile.NameParameterRequest"), inputFactory, resultFactory));
            ConversationParameters.Add(new StringParameter(ProfileKeysKey, Translator.Text("Chat.Intents.CreateProfile.KeysParameterRequest"), inputFactory, resultFactory));
        }
 public KeyValueParameter(
     string paramName,
     string firstParamMessage,
     string secondParamMessage,
     IIntentInputFactory inputFactory,
     IParameterResultFactory resultFactory)
 {
     ParamName          = paramName;
     FirstParamMessage  = firstParamMessage;
     SecondParamMessage = secondParamMessage;
     IntentInputFactory = inputFactory;
     ResultFactory      = resultFactory;
     IsOptional         = false;
 }
 public DateParameter(
     string paramName,
     string paramMessage,
     IIntentInputFactory inputFactory,
     ISitecoreDataWrapper dataWrapper,
     IParameterResultFactory resultFactory)
 {
     ParamName          = paramName;
     ParamMessage       = paramMessage;
     IntentInputFactory = inputFactory;
     DataWrapper        = dataWrapper;
     ResultFactory      = resultFactory;
     IsOptional         = false;
 }
Exemple #17
0
        public CreateGoalIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IPublishWrapper publishWrapper,
            IParameterResultFactory resultFactory) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;

            ConversationParameters.Add(new StringParameter(NameKey, Translator.Text("Chat.Intents.CreateGoal.NameParameterRequest"), inputFactory, resultFactory));
            ConversationParameters.Add(new IntegerParameter(PointsKey, Translator.Text("Chat.Intents.CreateGoal.PointsParameterRequest"), inputFactory, resultFactory));
            //ConversationParameters.Add(new YesOrNoParameter(IsFailureKey, Translator.Text("Chat.Intents.CreateGoal.IsFailureParameterRequest"), inputFactory, resultFactory));
            // rule parameter - ConversationParameters.Add(new YesOrNoParameter(RecursionKey, Translator.Text("Chat.Intents.CreateGoal.IsFailure"), inputFactory, resultFactory));
        }
Exemple #18
0
 public ItemParameter(
     string paramName,
     string paramMessage,
     Dictionary <string, string> parameters,
     ISitecoreDataWrapper dataWrapper,
     IIntentInputFactory inputFactory,
     IParameterResultFactory resultFactory)
 {
     ParamName          = paramName;
     ParamMessage       = paramMessage;
     Parameters         = parameters;
     DataWrapper        = dataWrapper;
     IntentInputFactory = inputFactory;
     ResultFactory      = resultFactory;
     IsOptional         = false;
 }
Exemple #19
0
 public ProfileKeysParameter(
     string profileItemKey,
     string paramName,
     string paramMessage,
     IIntentInputFactory inputFactory,
     IParameterResultFactory resultFactory,
     IProfileService profileService)
 {
     ProfileItemKey     = profileItemKey;
     ParamName          = paramName;
     ParamMessage       = paramMessage;
     IntentInputFactory = inputFactory;
     ResultFactory      = resultFactory;
     ProfileService     = profileService;
     IsOptional         = false;
 }
 public LanguageParameter(
     string paramName,
     string paramMessage,
     IOleSettings settings,
     ISitecoreDataWrapper dataWrapper,
     IIntentInputFactory inputFactory,
     IParameterResultFactory resultFactory)
 {
     ParamName          = paramName;
     ParamMessage       = paramMessage;
     Settings           = settings;
     DataWrapper        = dataWrapper;
     IntentInputFactory = inputFactory;
     ResultFactory      = resultFactory;
     IsOptional         = false;
 }
        public SchedulePublishIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IParameterResultFactory resultFactory,
            IPublishWrapper publishWrapper) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;

            var parameters = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ContentPath }
            };

            ConversationParameters.Add(new ItemParameter(ItemKey, Translator.Text("Chat.Intents.SchedulePublish.ItemParameterRequest"), parameters, dataWrapper, inputFactory, resultFactory));
            ConversationParameters.Add(new ItemVersionParameter(VersionKey, Translator.Text("Chat.Parameters.VersionParameterRequest"), ItemKey, inputFactory, resultFactory));
            ConversationParameters.Add(new DateParameter(DateKey, Translator.Text("Chat.Intents.SchedulePublish.DateParameterRequest"), inputFactory, dataWrapper, resultFactory));
            ConversationParameters.Add(new DatabaseParameter(DBKey, Translator.Text("Chat.Parameters.DBParameterRequest"), settings, dataWrapper, inputFactory, publishWrapper, resultFactory));
        }
Exemple #22
0
        public ListProfileKeysIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IParameterResultFactory resultFactory,
            IPublishWrapper publishWrapper,
            IProfileService profileService) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;
            ProfileService = profileService;

            var parameters = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ProfilePath },
                { Constants.SearchParameters.TemplateId, Constants.TemplateIds.ProfileTemplateId.ToString() },
                { Constants.SearchParameters.AutoStart, "true" }
            };

            ConversationParameters.Add(new ItemParameter(ItemKey, Translator.Text("Chat.Intents.ListProfileKeys.WhichProfile"), parameters, dataWrapper, inputFactory, resultFactory));
        }
Exemple #23
0
        public CreatePatternCardIntent(
            IOleSettings settings,
            ISitecoreDataWrapper dataWrapper,
            IIntentInputFactory inputFactory,
            IConversationResponseFactory responseFactory,
            IParameterResultFactory resultFactory,
            IPublishWrapper publishWrapper,
            IProfileService profileService) : base(inputFactory, responseFactory, settings)
        {
            DataWrapper    = dataWrapper;
            PublishWrapper = publishWrapper;
            ProfileService = profileService;

            var contentParameters = new Dictionary <string, string>
            {
                { Constants.SearchParameters.FilterPath, Constants.Paths.ProfilePath },
                { Constants.SearchParameters.TemplateId, Constants.TemplateIds.ProfileTemplateId.ToString() },
                { Constants.SearchParameters.AutoStart, "true" }
            };

            ConversationParameters.Add(new ItemParameter(ProfileItemKey, Translator.Text("Chat.Intents.CreatePatternCard.ProfileItemParameterRequest"), contentParameters, dataWrapper, inputFactory, resultFactory));
            ConversationParameters.Add(new StringParameter(NameKey, Translator.Text("Chat.Intents.CreatePatternCard.ProfileNameParameterRequest"), inputFactory, resultFactory));
            ConversationParameters.Add(new ProfileKeysParameter(ProfileItemKey, ProfileKeyValuesKey, Translator.Text("Chat.Intents.CreatePatternCard.ProfileKeyParameterRequest"), inputFactory, resultFactory, profileService));
        }