1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2
3package models
4
5import (
6 "github.com/git-bug/git-bug/cache"
7 "github.com/git-bug/git-bug/entities/bug"
8 "github.com/git-bug/git-bug/entities/common"
9 "github.com/git-bug/git-bug/entity/dag"
10 "github.com/git-bug/git-bug/repository"
11)
12
13// An object that has an author.
14type Authored interface {
15 IsAuthored()
16}
17
18// An entity (identity, bug, ...).
19type Entity interface {
20 IsEntity()
21}
22
23type BugAddCommentAndCloseInput struct {
24 // A unique identifier for the client performing the mutation.
25 ClientMutationID *string `json:"clientMutationId,omitempty"`
26 // The name of the repository. If not set, the default repository is used.
27 RepoRef *string `json:"repoRef,omitempty"`
28 // The bug ID's prefix.
29 Prefix string `json:"prefix"`
30 // The message to be added to the bug.
31 Message string `json:"message"`
32 // The collection of file's hash required for the first message.
33 Files []repository.Hash `json:"files,omitempty"`
34}
35
36type BugAddCommentAndClosePayload struct {
37 // A unique identifier for the client performing the mutation.
38 ClientMutationID *string `json:"clientMutationId,omitempty"`
39 // The affected bug.
40 Bug BugWrapper `json:"bug"`
41 // The resulting AddComment operation.
42 CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
43 // The resulting SetStatusOperation.
44 StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
45}
46
47type BugAddCommentAndReopenInput struct {
48 // A unique identifier for the client performing the mutation.
49 ClientMutationID *string `json:"clientMutationId,omitempty"`
50 // The name of the repository. If not set, the default repository is used.
51 RepoRef *string `json:"repoRef,omitempty"`
52 // The bug ID's prefix.
53 Prefix string `json:"prefix"`
54 // The message to be added to the bug.
55 Message string `json:"message"`
56 // The collection of file's hash required for the first message.
57 Files []repository.Hash `json:"files,omitempty"`
58}
59
60type BugAddCommentAndReopenPayload struct {
61 // A unique identifier for the client performing the mutation.
62 ClientMutationID *string `json:"clientMutationId,omitempty"`
63 // The affected bug.
64 Bug BugWrapper `json:"bug"`
65 // The resulting AddComment operation.
66 CommentOperation *bug.AddCommentOperation `json:"commentOperation"`
67 // The resulting SetStatusOperation.
68 StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
69}
70
71type BugAddCommentInput struct {
72 // A unique identifier for the client performing the mutation.
73 ClientMutationID *string `json:"clientMutationId,omitempty"`
74 // The name of the repository. If not set, the default repository is used.
75 RepoRef *string `json:"repoRef,omitempty"`
76 // The bug ID's prefix.
77 Prefix string `json:"prefix"`
78 // The message to be added to the bug.
79 Message string `json:"message"`
80 // The collection of file's hash required for the first message.
81 Files []repository.Hash `json:"files,omitempty"`
82}
83
84type BugAddCommentPayload struct {
85 // A unique identifier for the client performing the mutation.
86 ClientMutationID *string `json:"clientMutationId,omitempty"`
87 // The affected bug.
88 Bug BugWrapper `json:"bug"`
89 // The resulting operation.
90 Operation *bug.AddCommentOperation `json:"operation"`
91}
92
93type BugChangeLabelInput struct {
94 // A unique identifier for the client performing the mutation.
95 ClientMutationID *string `json:"clientMutationId,omitempty"`
96 // The name of the repository. If not set, the default repository is used.
97 RepoRef *string `json:"repoRef,omitempty"`
98 // The bug ID's prefix.
99 Prefix string `json:"prefix"`
100 // The list of label to add.
101 Added []string `json:"added,omitempty"`
102 // The list of label to remove.
103 Removed []string `json:"Removed,omitempty"`
104}
105
106type BugChangeLabelPayload struct {
107 // A unique identifier for the client performing the mutation.
108 ClientMutationID *string `json:"clientMutationId,omitempty"`
109 // The affected bug.
110 Bug BugWrapper `json:"bug"`
111 // The resulting operation.
112 Operation *bug.LabelChangeOperation `json:"operation"`
113 // The effect each source label had.
114 Results []*bug.LabelChangeResult `json:"results"`
115}
116
117type BugCommentConnection struct {
118 Edges []*BugCommentEdge `json:"edges"`
119 Nodes []*bug.Comment `json:"nodes"`
120 PageInfo *PageInfo `json:"pageInfo"`
121 TotalCount int `json:"totalCount"`
122}
123
124type BugCommentEdge struct {
125 Cursor string `json:"cursor"`
126 Node *bug.Comment `json:"node"`
127}
128
129// The connection type for Bug.
130type BugConnection struct {
131 // A list of edges.
132 Edges []*BugEdge `json:"edges"`
133 Nodes []BugWrapper `json:"nodes"`
134 // Information to aid in pagination.
135 PageInfo *PageInfo `json:"pageInfo"`
136 // Identifies the total count of items in the connection.
137 TotalCount int `json:"totalCount"`
138}
139
140type BugCreateInput struct {
141 // A unique identifier for the client performing the mutation.
142 ClientMutationID *string `json:"clientMutationId,omitempty"`
143 // The name of the repository. If not set, the default repository is used.
144 RepoRef *string `json:"repoRef,omitempty"`
145 // The title of the new bug.
146 Title string `json:"title"`
147 // The first message of the new bug.
148 Message string `json:"message"`
149 // The collection of file's hash required for the first message.
150 Files []repository.Hash `json:"files,omitempty"`
151}
152
153type BugCreatePayload struct {
154 // A unique identifier for the client performing the mutation.
155 ClientMutationID *string `json:"clientMutationId,omitempty"`
156 // The created bug.
157 Bug BugWrapper `json:"bug"`
158 // The resulting operation.
159 Operation *bug.CreateOperation `json:"operation"`
160}
161
162// An edge in a connection.
163type BugEdge struct {
164 // A cursor for use in pagination.
165 Cursor string `json:"cursor"`
166 // The item at the end of the edge.
167 Node BugWrapper `json:"node"`
168}
169
170type BugEditCommentInput struct {
171 // A unique identifier for the client performing the mutation.
172 ClientMutationID *string `json:"clientMutationId,omitempty"`
173 // The name of the repository. If not set, the default repository is used.
174 RepoRef *string `json:"repoRef,omitempty"`
175 // A prefix of the CombinedId of the comment to be changed.
176 TargetPrefix string `json:"targetPrefix"`
177 // The new message to be set.
178 Message string `json:"message"`
179 // The collection of file's hash required for the first message.
180 Files []repository.Hash `json:"files,omitempty"`
181}
182
183type BugEditCommentPayload struct {
184 // A unique identifier for the client performing the mutation.
185 ClientMutationID *string `json:"clientMutationId,omitempty"`
186 // The affected bug.
187 Bug BugWrapper `json:"bug"`
188 // The resulting operation.
189 Operation *bug.EditCommentOperation `json:"operation"`
190}
191
192type BugEvent struct {
193 Type cache.EntityEventType `json:"type"`
194 Bug BugWrapper `json:"bug"`
195}
196
197type BugSetTitleInput struct {
198 // A unique identifier for the client performing the mutation.
199 ClientMutationID *string `json:"clientMutationId,omitempty"`
200 // The name of the repository. If not set, the default repository is used.
201 RepoRef *string `json:"repoRef,omitempty"`
202 // The bug ID's prefix.
203 Prefix string `json:"prefix"`
204 // The new title.
205 Title string `json:"title"`
206}
207
208type BugSetTitlePayload struct {
209 // A unique identifier for the client performing the mutation.
210 ClientMutationID *string `json:"clientMutationId,omitempty"`
211 // The affected bug.
212 Bug BugWrapper `json:"bug"`
213 // The resulting operation
214 Operation *bug.SetTitleOperation `json:"operation"`
215}
216
217type BugStatusCloseInput struct {
218 // A unique identifier for the client performing the mutation.
219 ClientMutationID *string `json:"clientMutationId,omitempty"`
220 // The name of the repository. If not set, the default repository is used.
221 RepoRef *string `json:"repoRef,omitempty"`
222 // The bug ID's prefix.
223 Prefix string `json:"prefix"`
224}
225
226type BugStatusClosePayload struct {
227 // A unique identifier for the client performing the mutation.
228 ClientMutationID *string `json:"clientMutationId,omitempty"`
229 // The affected bug.
230 Bug BugWrapper `json:"bug"`
231 // The resulting operation.
232 Operation *bug.SetStatusOperation `json:"operation"`
233}
234
235type BugStatusOpenInput struct {
236 // A unique identifier for the client performing the mutation.
237 ClientMutationID *string `json:"clientMutationId,omitempty"`
238 // The name of the repository. If not set, the default repository is used.
239 RepoRef *string `json:"repoRef,omitempty"`
240 // The bug ID's prefix.
241 Prefix string `json:"prefix"`
242}
243
244type BugStatusOpenPayload struct {
245 // A unique identifier for the client performing the mutation.
246 ClientMutationID *string `json:"clientMutationId,omitempty"`
247 // The affected bug.
248 Bug BugWrapper `json:"bug"`
249 // The resulting operation.
250 Operation *bug.SetStatusOperation `json:"operation"`
251}
252
253// The connection type for TimelineItem
254type BugTimelineItemConnection struct {
255 Edges []*BugTimelineItemEdge `json:"edges"`
256 Nodes []bug.TimelineItem `json:"nodes"`
257 PageInfo *PageInfo `json:"pageInfo"`
258 TotalCount int `json:"totalCount"`
259}
260
261// Represent a TimelineItem
262type BugTimelineItemEdge struct {
263 Cursor string `json:"cursor"`
264 Node bug.TimelineItem `json:"node"`
265}
266
267type EntityEvent struct {
268 Type cache.EntityEventType `json:"type"`
269 Entity Entity `json:"entity,omitempty"`
270}
271
272// The content of a git blob (file).
273type GitBlob struct {
274 // Path of the file relative to the repository root.
275 Path string `json:"path"`
276 // Git object hash. Can be used as a stable cache key or to construct a
277 // raw download URL.
278 Hash string `json:"hash"`
279 // UTF-8 text content of the file. Null when isBinary is true or when
280 // the file is too large to be returned inline (see isTruncated).
281 Text *string `json:"text,omitempty"`
282 // Size in bytes.
283 Size int `json:"size"`
284 // True when the file contains null bytes and is treated as binary.
285 // text will be null.
286 IsBinary bool `json:"isBinary"`
287 // True when the file exceeds the maximum inline size and text has been
288 // omitted. Use the raw download endpoint to retrieve the full content.
289 IsTruncated bool `json:"isTruncated"`
290}
291
292type GitChangedFileConnection struct {
293 Nodes []*repository.ChangedFile `json:"nodes"`
294 PageInfo *PageInfo `json:"pageInfo"`
295 TotalCount int `json:"totalCount"`
296}
297
298// Paginated list of commits.
299type GitCommitConnection struct {
300 Nodes []*GitCommitMeta `json:"nodes"`
301 PageInfo *PageInfo `json:"pageInfo"`
302 TotalCount int `json:"totalCount"`
303}
304
305// The last commit that touched each requested entry in a directory.
306type GitLastCommit struct {
307 // Entry name within the directory.
308 Name string `json:"name"`
309 // Most recent commit that modified this entry.
310 Commit *GitCommitMeta `json:"commit"`
311}
312
313// A git branch or tag reference.
314type GitRef struct {
315 // Full reference name, e.g. refs/heads/main or refs/tags/v1.0.
316 Name string `json:"name"`
317 // Short name, e.g. main or v1.0.
318 ShortName string `json:"shortName"`
319 // Whether this reference is a branch or a tag.
320 Type GitRefType `json:"type"`
321 // Commit hash the reference points to.
322 Hash string `json:"hash"`
323 // True for the branch HEAD currently points to.
324 IsDefault bool `json:"isDefault"`
325}
326
327type GitRefConnection struct {
328 Nodes []*GitRef `json:"nodes"`
329 PageInfo *PageInfo `json:"pageInfo"`
330 TotalCount int `json:"totalCount"`
331}
332
333type IdentityConnection struct {
334 Edges []*IdentityEdge `json:"edges"`
335 Nodes []IdentityWrapper `json:"nodes"`
336 PageInfo *PageInfo `json:"pageInfo"`
337 TotalCount int `json:"totalCount"`
338}
339
340type IdentityEdge struct {
341 Cursor string `json:"cursor"`
342 Node IdentityWrapper `json:"node"`
343}
344
345type IdentityEvent struct {
346 Type cache.EntityEventType `json:"type"`
347 Identity IdentityWrapper `json:"identity"`
348}
349
350type LabelConnection struct {
351 Edges []*LabelEdge `json:"edges"`
352 Nodes []common.Label `json:"nodes"`
353 PageInfo *PageInfo `json:"pageInfo"`
354 TotalCount int `json:"totalCount"`
355}
356
357type LabelEdge struct {
358 Cursor string `json:"cursor"`
359 Node common.Label `json:"node"`
360}
361
362type Mutation struct {
363}
364
365// The connection type for an Operation
366type OperationConnection struct {
367 Edges []*OperationEdge `json:"edges"`
368 Nodes []dag.Operation `json:"nodes"`
369 PageInfo *PageInfo `json:"pageInfo"`
370 TotalCount int `json:"totalCount"`
371}
372
373// Represent an Operation
374type OperationEdge struct {
375 Cursor string `json:"cursor"`
376 Node dag.Operation `json:"node"`
377}
378
379// Information about pagination in a connection.
380type PageInfo struct {
381 // When paginating forwards, are there more items?
382 HasNextPage bool `json:"hasNextPage"`
383 // When paginating backwards, are there more items?
384 HasPreviousPage bool `json:"hasPreviousPage"`
385 // When paginating backwards, the cursor to continue.
386 StartCursor string `json:"startCursor"`
387 // When paginating forwards, the cursor to continue.
388 EndCursor string `json:"endCursor"`
389}
390
391type Query struct {
392}
393
394type RepositoryConnection struct {
395 Edges []*RepositoryEdge `json:"edges"`
396 Nodes []*Repository `json:"nodes"`
397 PageInfo *PageInfo `json:"pageInfo"`
398 TotalCount int `json:"totalCount"`
399}
400
401type RepositoryEdge struct {
402 Cursor string `json:"cursor"`
403 Node *Repository `json:"node"`
404}
405
406// Server-wide configuration, independent of any repository.
407type ServerConfig struct {
408 // Authentication mode: 'local' (single user from git config),
409 // 'external' (multi-user via OAuth/OIDC providers), or 'readonly'.
410 AuthMode string `json:"authMode"`
411 // Names of the login providers enabled on this server, e.g. ['github'].
412 // Empty when authMode is not 'external'.
413 LoginProviders []string `json:"loginProviders"`
414}
415
416type Subscription struct {
417}