-
Notifications
You must be signed in to change notification settings - Fork 237
Expand file tree
/
Copy pathDialog.cs
More file actions
80 lines (69 loc) · 2.29 KB
/
Copy pathDialog.cs
File metadata and controls
80 lines (69 loc) · 2.29 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
namespace SlackAPI
{
//see https://api.slack.com/dialogs
public class Dialog
{
public string callback_id { get; set; }
public string title { get; set; }
public string submit_label { get; set; }
public bool? notify_on_cancel { get; set; }
public string state { get; set; }
public Element[] elements { get; set; }
public abstract class Element
{
public string label { get; set; }
public string name { get; set; }
public string placeholder { get; set; }
public bool? optional { get; set; }
public string value { get; set; }
}
public class TextElement : Element
{
public string type { get; } = "text";
public string subtype { get; set; }
public int? max_length { get; set; }
public int? min_length { get; set; }
public string hint { get; set; }
}
public class TextAreaElement : Element
{
public string type { get; } = "textarea";
public int? max_length { get; set; }
public int? min_length { get; set; }
public string hint { get; set; }
}
public class SelectElement : Element
{
public string type { get; } = "select";
public string data_source { get; set; }
public Option[] options { get; set; }
public OptionGroup[] option_groups { get; set; }
public Option[] selected_options { get; set; }
public int? min_query_length { get; set; }
}
public class Option
{
public string label { get; set; }
public string value { get; set; }
}
public class OptionGroup
{
public string label { get; set; }
public Option[] options { get; set; }
}
public static class DataSourceTypes
{
public static string Users = "users";
public static string Channels = "channels";
public static string Conversations = "conversations";
public static string External = "external";
}
public static class TextElementSubTypes
{
public static string Email = "email";
public static string Number = "number";
public static string Telephone = "telephone";
public static string Url = "url";
}
}
}