-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from umbraco/v14/feature/42959-V14-Integratio…
…ns-(Zapier/Forms) V14 integrations (zapier/forms)
- Loading branch information
Showing
39 changed files
with
65,939 additions
and
1,019 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 16 additions & 7 deletions
23
...lers/ZapierFormAuthorizedApiController.cs → ...gement/Controllers/FormsControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...egrations.Automation.Zapier/Api/Management/Controllers/GetFormPropertiesByIdController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Asp.Versioning; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Forms.Integrations.Automation.Zapier.Extensions; | ||
using Umbraco.Forms.Integrations.Automation.Zapier.Services; | ||
|
||
namespace Umbraco.Forms.Integrations.Automation.Zapier.Api.Management.Controllers | ||
{ | ||
[ApiVersion("1.0")] | ||
[ApiExplorerSettings(GroupName = Constants.ManagementApi.GroupName)] | ||
public class GetFormPropertiesByIdController : FormsControllerBase | ||
{ | ||
public GetFormPropertiesByIdController(IUserValidationService userValidationService, ZapierFormService zapierFormService) | ||
: base(userValidationService, zapierFormService) | ||
{ | ||
} | ||
|
||
[HttpGet("forms/{id}")] | ||
[ProducesResponseType(typeof(List<Dictionary<string, string>>), StatusCodes.Status200OK)] | ||
public IActionResult GetFormPropertiesById(string id) | ||
{ | ||
var emptyList = new List<Dictionary<string, string>>(); | ||
|
||
if (!IsAccessValid()) return Ok(emptyList); | ||
|
||
var form = ZapierFormService.GetById(id); | ||
|
||
if (form == null) return Ok(emptyList); | ||
|
||
return Ok(new List<Dictionary<string, string>> { form.ToEmptyFormDictionary() }); | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...aco.Forms.Integrations.Automation.Zapier/Api/Management/Controllers/GetFormsController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Asp.Versioning; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Forms.Integrations.Automation.Zapier.Models.Dtos; | ||
using Umbraco.Forms.Integrations.Automation.Zapier.Services; | ||
|
||
namespace Umbraco.Forms.Integrations.Automation.Zapier.Api.Management.Controllers | ||
{ | ||
[ApiVersion("1.0")] | ||
[ApiExplorerSettings(GroupName = Constants.ManagementApi.GroupName)] | ||
public class GetFormsController : FormsControllerBase | ||
{ | ||
public GetFormsController(IUserValidationService userValidationService, ZapierFormService zapierFormService) | ||
: base(userValidationService, zapierFormService) | ||
{ | ||
|
||
} | ||
|
||
[HttpGet("forms")] | ||
[ProducesResponseType(typeof(IEnumerable<FormDto>), StatusCodes.Status200OK)] | ||
public IActionResult GetForms() | ||
{ | ||
if (!IsAccessValid()) return Ok(Enumerable.Empty<FormDto>()); | ||
|
||
return Ok(ZapierFormService.GetAll()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
src/Umbraco.Forms.Integrations.Automation.Zapier/Controllers/FormController.cs
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
src/Umbraco.Forms.Integrations.Automation.Zapier/Controllers/FormPollingController.cs
This file was deleted.
Oops, something went wrong.
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Forms.Integrations.Automation.Zapier/Extensions/FormExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Forms.Integrations.Automation.Zapier/Helpers/TriggerHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/Umbraco.Forms.Integrations.Automation.Zapier/Models/Dtos/FormDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Umbraco.Forms.Integrations.Automation.Zapier.Models.Dtos | ||
{ | ||
public class FormDto | ||
{ | ||
[JsonProperty("id")] | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty("name")] | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
} | ||
} |
15 changes: 8 additions & 7 deletions
15
src/Umbraco.Forms.Integrations.Automation.Zapier/Models/Dtos/SubscriptionDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Umbraco.Forms.Integrations.Automation.Zapier.Models.Dtos | ||
{ | ||
public class SubscriptionDto | ||
{ | ||
[JsonProperty("id")] | ||
[JsonPropertyName("id")] | ||
public int Id { get; set; } | ||
|
||
[JsonProperty("entityId")] | ||
[JsonPropertyName("entityId")] | ||
public string EntityId { get; set; } | ||
|
||
[JsonProperty("type")] | ||
[JsonPropertyName("type")] | ||
public int Type { get; set; } | ||
|
||
[JsonProperty("typeName")] public string TypeName => nameof(Constants.EntityType.Form); | ||
[JsonPropertyName("typeName")] | ||
public string TypeName => nameof(Constants.EntityType.Form); | ||
|
||
[JsonProperty("hookUrl")] | ||
[JsonPropertyName("hookUrl")] | ||
public string HookUrl { get; set; } | ||
|
||
[JsonProperty("subscribeHook")] | ||
[JsonPropertyName("subscribeHook")] | ||
public bool SubscribeHook { get; set; } | ||
} | ||
} |
25 changes: 17 additions & 8 deletions
25
...stsite.V10/Properties/launchSettings.json → ...ion.Zapier/Properties/launchSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/launchsettings.json", | ||
"$schema": "http://json.schemastore.org/launchsettings.json", | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:38889", | ||
"sslPort": 44358 | ||
"applicationUrl": "http://localhost:18629", | ||
"sslPort": 44339 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"http": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "http://localhost:5220", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"Umbraco.Web.UI": { | ||
"https": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"applicationUrl": "https://localhost:44358;http://localhost:38889", | ||
"applicationUrl": "https://localhost:7106;http://localhost:5220", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
src/Umbraco.Forms.Integrations.Automation.Zapier/Services/IUserValidationService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 2 additions & 6 deletions
8
src/Umbraco.Forms.Integrations.Automation.Zapier/Services/UserValidationService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
src/Umbraco.Forms.Integrations.Automation.Zapier/Services/ZapierFormService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...mbraco.Forms.Integrations.Automation.Zapier/Services/ZapierFormSubscriptionHookService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
src/Umbraco.Forms.Integrations.Automation.Zapier/Services/ZapierService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.