// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschraenkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; using Squidex.Infrastructure.Validation; namespace Squidex.Extensions.Actions.Medium { [RuleAction( Title = "Medium", IconImage = "", IconColor = "#00ab6c", Display = "Post to Medium", Description = "Create a new story or post at medium.", ReadMore = "https://medium.com/")] public sealed record MediumAction : RuleAction { [LocalizedRequired] [Display(Name = "Access Token", Description = "The self issued access token.")] [DataType(DataType.Text)] public string AccessToken { get; set; } [LocalizedRequired] [Display(Name = "Title", Description = "The title, used for the url.")] [DataType(DataType.Text)] [Formattable] public string Title { get; set; } [LocalizedRequired] [Display(Name = "Content", Description = "The content, either html or markdown.")] [DataType(DataType.MultilineText)] [Formattable] public string Content { get; set; } [Display(Name = "Canonical Url", Description = "The original home of this content, if it was originally published elsewhere.")] [DataType(DataType.Text)] [Formattable] public string CanonicalUrl { get; set; } [Display(Name = "Tags", Description = "The optional comma separated list of tags.")] [DataType(DataType.Text)] [Formattable] public string Tags { get; set; } [Display(Name = "Publication Id", Description = "Optional publication id.")] [DataType(DataType.Text)] public string PublicationId { get; set; } [Display(Name = "Is Html", Description = "Indicates whether the content is markdown or html.")] [DataType(DataType.Text)] public bool IsHtml { get; set; } } }