-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.bal
212 lines (204 loc) · 6.21 KB
/
types.bal
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# The GitHub User
#
# + name - User name
# + login - Logged in user
# + id - User id
# + bio - User bio
# + url - Prfile url
# + created_at - Created date of Profile
# + updated_at - Last update date
# + avatar_url - Avatar url
# + 'type - User type
# + company - User company
# + blog - User blog
# + location - User location
# + email - User email
# + public_repos - number if public repos
# + followers - Number if followers
# + following - Number of following
type GitHubUser record {
string? name;
string login;
int id;
string bio;
string url;
string created_at;
string updated_at;
string avatar_url;
string 'type;
string? company;
string blog;
string? location;
string? email?;
int public_repos?;
int followers?;
int following?;
};
# The Repository Branch
#
# + id - Branch id
# + name - Branch name
# + prefix - Branch prefix
public type Branch record {
string id;
string name;
string prefix;
};
# The GitHub Repository
#
# + id - Repository id
# + name - The name of the repository.
# + description - The description of the repository.
# + 'fork - Field Description
# + created_at - Identifies the date and time when the object was created.
# + updated_at - Identifies the date and time when the object was last updated.
# + language - The language composition of the repository.
# + owner - The owner of the repository.
# + has_issues - State whether there are issues or not
# + forks_count - Fork count
# + open_issues_count - Open issues count
# + lisense - License type
# + allow_forking - State wether forking is allowed or not
# + visibility - Visibility of the repository
# + forks - Number of forks
# + open_issues - Number of open issues
# + watchers - Number of watchers
# + default_branch - Name of the default branch
public type Repository record {
int id;
string name;
string? description;
boolean 'fork;
string created_at;
string updated_at;
string? language;
Owner owner?;
boolean has_issues;
int forks_count;
int open_issues_count;
License lisense?;
boolean allow_forking;
string visibility;
int forks;
int open_issues;
int watchers;
string default_branch;
};
# The Repository Owner
#
# + login - Logged in user
# + id - user id
# + url - Profile url
# + 'type - User type
public type Owner record {
string login;
int id;
string url;
string 'type;
};
# The GitHub Repository Lisence
#
# + key - Lisence key
# + name - Lisen name
public type License record {
string key;
string name;
};
# Represent create repository input payload
#
# + name - The name of the new repository.
# + description - A short description of the new repository.
# + isPrivate - Whether the repository is private.
# + autoInit - Whether the repository is initialized with a minimal README.
# + template - Whether this repository acts as a template that can be used to generate new repositories.
public type CreateRepositoryInput record {
string name;
string description?;
boolean isPrivate?;
boolean autoInit?;
boolean template?;
};
# Represent create issue input payload.
#
# + title - The title for the issue.
# + body - The body for the issue description.
# + assigneeNames - The GitHub usernames of the user assignees for this issue.
# + milestoneId - The Node ID of the milestone for this issue.
# + labelNames - An array of Node IDs of labels for this issue.
# + projectIds - An array of Node IDs for projects associated with this issue.
# + issueTemplate - The name of an issue template in the repository, assigns labels and assignees from the template to the issue
# + clientMutationId - A unique identifier for the client performing the mutation.
public type CreateIssueInput record {
string title;
string body?;
string[] assigneeNames?;
string milestoneId?;
string[] labelNames?;
string[] projectIds?;
string issueTemplate?;
string clientMutationId?;
};
# Represent GitHub issue.
#
# + author - The actor who authored the comment.
# + body - Identifies the body of the issue.
# + bodyHTML - The body rendered to HTML.
# + bodyResourcePath - The http path for this issue body
# + bodyText - Identifies the body of the issue rendered to text.
# + bodyUrl - The http URL for this issue body
# + closed - `true` if the object is closed (definition of closed may depend on type)
# + closedAt - Identifies the date and time when the object was closed.
# + createdAt - Identifies the date and time when the object was created.
# + createdViaEmail - Check if this comment was created via an email reply.
# + databaseId - Identifies the primary key from the database.
# + id - ID
# + isPinned - Indicates whether or not this issue is currently pinned to the repository issues list
# + isReadByViewer - Is this issue read by the viewer
# + lastEditedAt - The moment the editor made the last edit
# + locked - `true` if the object is locked
# + number - Identifies the issue number.
# + publishedAt - Identifies when the comment was published at.
# + resourcePath - The HTTP path for this issue
# + title - Identifies the issue title.
# + updatedAt - Identifies the date and time when the object was last updated.
# + url - The HTTP URL for this issue
# + viewerDidAuthor - Did the viewer author this comment.
# + viewerCanUpdate - Check if the current viewer can update this object.
public type Issue record {
Actor? author?;
string? body?;
string bodyHTML?;
string bodyResourcePath?;
string bodyText?;
string bodyUrl?;
boolean closed?;
string? closedAt?;
string createdAt?;
boolean createdViaEmail?;
int? databaseId?;
int id;
boolean? isPinned?;
boolean? isReadByViewer?;
string? lastEditedAt?;
boolean locked?;
int number;
string? publishedAt?;
string resourcePath?;
string title?;
string updatedAt?;
string url?;
boolean viewerDidAuthor?;
boolean viewerCanUpdate?;
};
# Represent GitHub actor.
#
# + login - The username of the actor.
# + resourcePath - The HTTP path for this actor.
# + url - The HTTP URL for this actor.
# + avatarUrl - A URL pointing to the actor's public avatar.
public type Actor record {
string login;
string resourcePath?;
string url?;
string avatarUrl?;
};