diff --git a/UFMailchimpWorkFlowType/Publish Package.BAT b/UFMailchimpWorkFlowType/Publish Package.BAT index d3fff34..1b11beb 100644 --- a/UFMailchimpWorkFlowType/Publish Package.BAT +++ b/UFMailchimpWorkFlowType/Publish Package.BAT @@ -1,2 +1,2 @@ -nuget push UmbracoForm.MailChimp.WorkFlow.2.1.1.nupkg oy2l5x7rwewc6nn3l6dqlrlfcdne6zoetorp7optanbaye -Source https://api.nuget.org/v3/index.json +nuget push UmbracoForm.MailChimp.WorkFlow.3.0.0.nupkg oy2l5x7rwewc6nn3l6dqlrlfcdne6zoetorp7optanbaye -Source https://api.nuget.org/v3/index.json pause \ No newline at end of file diff --git a/UFMailchimpWorkFlowType/UFMailChimpWorkFlowType.cs b/UFMailchimpWorkFlowType/UFMailChimpWorkFlowType.cs index fddc13e..be00232 100644 --- a/UFMailchimpWorkFlowType/UFMailChimpWorkFlowType.cs +++ b/UFMailchimpWorkFlowType/UFMailChimpWorkFlowType.cs @@ -11,6 +11,7 @@ using Newtonsoft.Json; using Umbraco.Forms.Core; using Umbraco.Forms.Core.Enums; +using Umbraco.Forms.Core.Persistence.Dtos; using Umbraco.Forms.Core.Providers.Models; using UmbracoSetting = Umbraco.Forms.Core.Attributes.Setting; @@ -20,16 +21,16 @@ public class UFMailChimpWorkFlowType : WorkflowType { #region Settings - [UmbracoSetting("API KEY", view = "TextField", description = "Enter the Mailchimp API key.")] + [UmbracoSetting("API KEY", View = "TextField", Description = "Enter the Mailchimp API key.")] public string ApiKey { get; set; } - [UmbracoSetting("List ID", view = "TextField", description = "Enter the Mailchimp List ID.")] + [UmbracoSetting("List ID", View = "TextField", Description = "Enter the Mailchimp List ID.")] public string ListID { get; set; } - [UmbracoSetting("Fields", view = "FieldMapper", description = "Map the needed fields .Minimum Email field for subscribe.")] + [UmbracoSetting("Fields", View = "FieldMapper", Description ="Map the needed fields .Minimum Email field for subscribe.")] public string Fields { get; set; } - [UmbracoSetting("Tags", view = "TextField", description = "List of Tags. Separate by semicolon ';'. Tag must be created before being used. i.e: User; Help Center")] + [UmbracoSetting("Tags", View = "TextField", Description ="List of Tags. Separate by semicolon ';'. Tag must be created before being used. i.e: User; Help Center")] public string Tags { get; set; } #endregion @@ -54,37 +55,6 @@ public override List ValidateSettings() return exceptionList; } - public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e) - { - try - { - var data = ParseEmailAndMergeFields(record, this.Fields); - if (string.IsNullOrEmpty(data.Item1)) - { - throw new Exception("Email is missing"); - } - - Task.Run(async () => - { - await SubscribeMember(data.Item1, data.Item2); - - var tagNames = ParseTags(this.Tags); - if (tagNames.Count() > 0) - { - await TagMember(data.Item1, tagNames); - } - }); - - return WorkflowExecutionStatus.Completed; - - } - catch (Exception ex) - { - Umbraco.Core.Logging.LogHelper.Error("error : UFMailchimp FlowType", ex); - return WorkflowExecutionStatus.Failed; - } - } - private async Task SubscribeMember(string email, Dictionary mergeFields) { var mc = new MailChimpManager(this.ApiKey); @@ -179,6 +149,37 @@ private static bool IsEmail(string str) return Regex.IsMatch(str, @"\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z", RegexOptions.IgnoreCase); } + public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e) + { + try + { + var data = ParseEmailAndMergeFields(record, this.Fields); + if (string.IsNullOrEmpty(data.Item1)) + { + throw new Exception("Email is missing"); + } + + Task.Run(async () => + { + await SubscribeMember(data.Item1, data.Item2); + + var tagNames = ParseTags(this.Tags); + if (tagNames.Count() > 0) + { + await TagMember(data.Item1, tagNames); + } + }); + + return WorkflowExecutionStatus.Completed; + + } + catch (Exception ex) + { + Umbraco.Core.Composing.Current.Logger.Error(typeof(UFMailChimpWorkFlowType), ex); + return WorkflowExecutionStatus.Failed; + } + } + #endregion } } diff --git a/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.csproj b/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.csproj index ad0e3c2..8dcf771 100644 --- a/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.csproj +++ b/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.csproj @@ -9,9 +9,11 @@ Properties UFMailchimpWorkFlowType UFMailchimpWorkFlowType - v4.7 + v4.7.2 512 + + true @@ -41,23 +43,14 @@ ..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\businesslogic.dll - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\cms.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\controls.dll - - - ..\packages\UmbracoForms.Core.7.3.0\lib\EPPlus.dll + + ..\packages\EPPlus.4.5.3.2\lib\net40\EPPlus.dll ..\packages\Examine.0.1.90\lib\net45\Examine.dll @@ -74,11 +67,14 @@ ..\packages\ImageProcessor.Web.4.10.0.100\lib\net452\ImageProcessor.Web.dll - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\interfaces.dll + + ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll + + + ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\log4net.dll + + ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll ..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll @@ -92,9 +88,6 @@ ..\packages\Markdown.1.14.7\lib\net45\MarkdownSharp.dll - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\Microsoft.ApplicationBlocks.Data.dll - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll @@ -104,6 +97,9 @@ ..\packages\Microsoft.AspNet.SignalR.Core.2.4.1\lib\net45\Microsoft.AspNet.SignalR.Core.dll + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll + ..\packages\Microsoft.IO.RecyclableMemoryStream.1.2.2\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll @@ -125,8 +121,11 @@ ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - ..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll + + ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll + + + ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll ..\packages\MySql.Data.6.9.12\lib\net45\MySql.Data.dll @@ -134,40 +133,87 @@ ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll + ..\packages\Owin.1.0\lib\net40\Owin.dll - - ..\packages\semver.1.1.2\lib\net45\Semver.dll + + + ..\packages\Semver.2.0.4\lib\net452\Semver.dll + + + ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll + + + ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll + + + ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll + + + ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll + + + ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll + + + ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll + + + ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll + + + ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll + + + ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll + + + ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll ..\packages\ServiceStack.Text.3.9.71\lib\net35\ServiceStack.Text.dll - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\SQLCE4Umbraco.dll + + ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll + + - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\System.Data.SqlServerCe.dll + ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\System.Data.SqlServerCe.Entity.dll + ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll + + + ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll + + + + ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll @@ -198,52 +244,25 @@ - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\TidyNet.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\umbraco.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\umbraco.DataLayer.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\umbraco.editorControls.dll + + ..\packages\UmbracoCms.Core.8.4.1\lib\net472\Umbraco.Core.dll - - ..\packages\UmbracoForms.Core.7.3.0\lib\Umbraco.Forms.Core.dll + + ..\packages\UmbracoForms.Core.8.1.2\lib\net472\Umbraco.Forms.Core.dll - - ..\packages\UmbracoForms.Core.7.3.0\lib\Umbraco.Forms.Core.Providers.dll + + ..\packages\UmbracoForms.Core.8.1.2\lib\net472\Umbraco.Forms.Core.Providers.dll - - ..\packages\UmbracoForms.Core.7.3.0\lib\Umbraco.Forms.Web.dll - - - ..\packages\UmbracoForms.Core.7.3.0\lib\Umbraco.Forms.Web.XmlSerializers.dll + + ..\packages\UmbracoForms.Core.8.1.2\lib\net472\Umbraco.Forms.Web.dll - ..\packages\UmbracoForms.Core.7.3.0\lib\Umbraco.Licensing.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\umbraco.MacroEngines.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\umbraco.providers.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\Umbraco.Web.UI.dll - - - ..\packages\UmbracoCms.Core.7.15.3\lib\net452\UmbracoExamine.dll + ..\packages\UmbracoForms.Core.8.1.2\lib\net472\Umbraco.Licensing.dll - + @@ -251,4 +270,11 @@ + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.nuspec b/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.nuspec index bfd339d..5676bde 100644 --- a/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.nuspec +++ b/UFMailchimpWorkFlowType/UFMailchimpWorkFlowType.nuspec @@ -2,21 +2,21 @@ UmbracoForm.MailChimp.WorkFlow - 2.1.1 - UmbracoForm.MailChimp.WorkFlow + 3.0.0 + UmbracoForm.MailChimp.WorkFlow.v8 Harikrishna Parmar Harikrishna Parmar false MIT https://github.com/harikrishna43/UmbracoForms.Mailchimp.WorkFlow/ https://github.com/harikrishna43/UmbracoForms.Mailchimp.WorkFlow/blob/master/mailchimpICO.png - Umbraco Forms Mailchimp Integration WorkflowType + Update package for umbraco CMS v8.4.1 * Umbraco Forms v8.1.2 * Mailchimp Integration WorkflowType Updated Umbraco-Umbracoforms-Mailchimp api v3 Copyright 2020 UmbracoForms,Mailchimp Subscriber to list,umraco form workflow,Mailchimp - - + + diff --git a/UFMailchimpWorkFlowType/UmbracoForm.MailChimp.WorkFlow.3.0.0.nupkg b/UFMailchimpWorkFlowType/UmbracoForm.MailChimp.WorkFlow.3.0.0.nupkg new file mode 100644 index 0000000..1fc3766 Binary files /dev/null and b/UFMailchimpWorkFlowType/UmbracoForm.MailChimp.WorkFlow.3.0.0.nupkg differ diff --git a/UFMailchimpWorkFlowType/app.config b/UFMailchimpWorkFlowType/app.config index 456ac90..e9546c2 100644 --- a/UFMailchimpWorkFlowType/app.config +++ b/UFMailchimpWorkFlowType/app.config @@ -52,6 +52,10 @@ + + + + - + diff --git a/UFMailchimpWorkFlowType/packages.config b/UFMailchimpWorkFlowType/packages.config index a9ef03b..6523418 100644 --- a/UFMailchimpWorkFlowType/packages.config +++ b/UFMailchimpWorkFlowType/packages.config @@ -3,11 +3,14 @@ - + + + + @@ -23,6 +26,7 @@ + @@ -30,15 +34,30 @@ - + + + - + + + + + + + + + + + + + - - + + + \ No newline at end of file