forked from Inumedia/SlackAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlock.cs
More file actions
87 lines (80 loc) · 2.57 KB
/
Copy pathBlock.cs
File metadata and controls
87 lines (80 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
namespace SlackAPI
{
//see https://api.slack.com/reference/messaging/blocks
public class Block
{
public string type { get; set; }
public string block_id { get; set; }
public Text text { get; set; }
public Element accessory { get; set; }
public Element[] elements { get; set; }
public Text title { get; set; }
public string image_url { get; set; }
public string alt_text { get; set; }
public Text[] fields { get; set; }
}
public class Text
{
public string type { get; set; } = TextTypes.PlainText;
public string text { get; set; }
public bool? emoji { get; set; }
public bool? verbatim { get; set; }
}
public class Option
{
public Text text { get; set; }
public string value { get; set; }
}
public class OptionGroups
{
public Text label { get; set; }
public Option[] options { get; set; }
}
public class Confirm
{
public Text title { get; set; }
public Text text { get; set; }
public Text confirm { get; set; }
public Text deny { get; set; }
}
public class Element
{
public string type { get; set; }
public string action_id { get; set; }
public Text text { get; set; }
public string value { get; set; }
public Text placeholder { get; set; }
public Option[] options { get; set; }
public OptionGroups[] option_groups { get; set; }
public string image_url { get; set; }
public string alt_text { get; set; }
public string initial_date { get; set; }
public string initial_user { get; set; }
public string initial_channel { get; set; }
public Confirm confirm { get; set; }
}
public static class BlockTypes
{
public const string Section = "section";
public const string Divider = "divider";
public const string Actions = "actions";
public const string Context = "context";
public const string Image = "image";
}
public static class TextTypes
{
public const string Markdown = "mrkdwn";
public const string PlainText = "plain_text";
}
public static class ElementTypes
{
public const string Image = "image";
public const string Button = "button";
public const string StaticSelect = "static_select";
public const string ExternalSelect = "external_select";
public const string UserSelect = "user_select";
public const string ChannelSelect = "channel_select";
public const string Overflow = "overflow";
public const string DatePicker = "date_picker";
}
}