| | | 1 | | namespace Syki.Back.Features.Webhooks.GetWebhookSubscriptions; |
| | | 2 | | |
| | | 3 | | public class GetWebhookSubscriptionsOut : IApiDto<GetWebhookSubscriptionsOut> |
| | | 4 | | { |
| | | 5 | | public int Total { get; set; } |
| | | 6 | | public List<GetWebhookSubscriptionsItemOut> Items { get; set; } = []; |
| | | 7 | | |
| | | 8 | | public static IEnumerable<(string, GetWebhookSubscriptionsOut)> GetExamples() => |
| | | 9 | | [ |
| | | 10 | | ("Exemplo", |
| | | 11 | | new GetWebhookSubscriptionsOut |
| | | 12 | | { |
| | | 13 | | Total = 1, |
| | | 14 | | Items = |
| | | 15 | | [ |
| | | 16 | | new GetWebhookSubscriptionsItemOut |
| | | 17 | | { |
| | | 18 | | Id = 1, |
| | | 19 | | Name = "Aluno criado", |
| | | 20 | | Url = "https://webhook.site/my-webhook", |
| | | 21 | | IsActive = true, |
| | | 22 | | Events = [WebhookEventType.StudentCreated], |
| | | 23 | | CreatedAt = DateTime.UtcNow, |
| | | 24 | | }, |
| | | 25 | | ], |
| | | 26 | | }), |
| | | 27 | | ]; |
| | | 28 | | } |
| | | 29 | | |
| | | 30 | | public class GetWebhookSubscriptionsItemOut |
| | | 31 | | { |
| | 0 | 32 | | public int Id { get; set; } |
| | 0 | 33 | | public string Name { get; set; } |
| | 0 | 34 | | public string Url { get; set; } |
| | 0 | 35 | | public bool IsActive { get; set; } |
| | 0 | 36 | | public List<WebhookEventType> Events { get; set; } |
| | 0 | 37 | | public DateTime CreatedAt { get; set; } |
| | | 38 | | } |