Open History to see the last commit
1// Generated by @effect/graphql-generator from issues.graphql. Do not edit.
2import { GraphQL, GraphQLGroup } from "effect/graphql"
3import * as Schema from "effect/Schema"
4import * as Shared from "../../schema/github.graphql.ts"
5
6/** A user is an individual's account on GitHub that owns repositories and can make new content. */
7export const AuthorUser = Schema.Struct({
8 __typename: Schema.Literal("User"),
9 /** The username used to login. */
10 login: Schema.String,
11 /** A URL pointing to the user's public avatar. */
12 avatarUrl: Shared.URI,
13 /** The user's public profile name. */
14 name: Schema.NullOr(Schema.String)
15})
16export interface AuthorUser extends Schema.Struct.Type<typeof AuthorUser.fields> {}
17
18/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
19export const ActorOther = Schema.Struct({
20 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()(["User"]),
21 /** The username of the actor. */
22 login: Schema.String,
23 /** A URL pointing to the actor's public avatar. */
24 avatarUrl: Shared.URI
25})
26export interface ActorOther extends Schema.Struct.Type<typeof ActorOther.fields> {}
27
28/**
29 * `fragment IssueRow on Issue`
30 *
31 * An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project.
32 */
33export const IssueRow = Schema.Struct({
34 /** Identifies the issue number. */
35 number: Shared.Int,
36 /** Identifies the issue title. */
37 title: Schema.String,
38 /** The HTTP URL for this issue */
39 url: Shared.URI,
40 /** Identifies the state of the issue. */
41 state: GraphQL.enumLiterals(Shared.IssueState.literals),
42 /** Identifies the reason for the issue state. */
43 stateReason: Schema.NullOr(GraphQL.enumLiterals(Shared.IssueStateReason.literals)),
44 /** Identifies the date and time when the object was created. */
45 createdAt: Shared.DateTime,
46 /** Identifies the date and time when the object was last updated. */
47 updatedAt: Shared.DateTime,
48 /** Identifies the date and time when the object was closed. */
49 closedAt: Schema.NullOr(Shared.DateTime),
50 /** The actor who authored the comment. */
51 author: Schema.NullOr(Schema.Union([
52 AuthorUser,
53 ActorOther
54 ]))
55})
56export interface IssueRow extends Schema.Struct.Type<typeof IssueRow.fields> {}
57
58/**
59 * The category of a planning status, which decides whether the issue is open or
60 * closed. Issue statuses are in preview and only available to accounts enrolled in the preview.
61 */
62export const PlanningStatusCategory = Schema.Struct({
63 /**
64 * A stable identifier for the category, such as `new`, `backlog`, `planned`,
65 * `started`, `completed`, `not_planned` or `duplicate`. Clients should expect
66 * new keys to be added.
67 */
68 key: Schema.String,
69 /** The state an issue in this category has. */
70 state: GraphQL.enumLiterals(Shared.IssueState.literals),
71 /** The reason a closed issue in this category was closed, or null when the category is open. */
72 stateReason: Schema.NullOr(GraphQL.enumLiterals(Shared.IssueStateReason.literals))
73})
74export interface PlanningStatusCategory extends Schema.Struct.Type<typeof PlanningStatusCategory.fields> {}
75
76/**
77 * `fragment PlanningStatusFields on PlanningStatus`
78 *
79 * A planning status an issue can be in. Issue statuses are in preview and only available to accounts enrolled in the preview.
80 */
81export const PlanningStatusFields = Schema.Struct({
82 /** The Node ID of the PlanningStatus object */
83 id: Shared.ID,
84 /** The display name of the planning status. */
85 name: Schema.String,
86 /** The category of the planning status, which decides whether the issue is open or closed. */
87 category: PlanningStatusCategory
88})
89export interface PlanningStatusFields extends Schema.Struct.Type<typeof PlanningStatusFields.fields> {}
90
91/** Information about pagination in a connection. */
92export const SearchPageInfoPageInfo = Schema.Struct({
93 /** When paginating forwards, are there more items? */
94 hasNextPage: Schema.Boolean,
95 /** When paginating forwards, the cursor to continue. */
96 endCursor: Schema.NullOr(Schema.String)
97})
98export interface SearchPageInfoPageInfo extends Schema.Struct.Type<typeof SearchPageInfoPageInfo.fields> {}
99
100/** A user is an individual's account on GitHub that owns repositories and can make new content. */
101export const AssigneesNodesUser = Schema.Struct({
102 /** The username used to login. */
103 login: Schema.String,
104 /** The user's public profile name. */
105 name: Schema.NullOr(Schema.String),
106 /** A URL pointing to the user's public avatar. */
107 avatarUrl: Shared.URI
108})
109export interface AssigneesNodesUser extends Schema.Struct.Type<typeof AssigneesNodesUser.fields> {}
110
111/** A list of users. */
112export const NodesAssigneesUserConnection = Schema.Struct({
113 /** A list of nodes. */
114 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(AssigneesNodesUser)))
115})
116export interface NodesAssigneesUserConnection extends Schema.Struct.Type<typeof NodesAssigneesUserConnection.fields> {}
117
118/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
119export const NodesLabelsNodesLabel = Schema.Struct({
120 /** Identifies the label name. */
121 name: Schema.String,
122 /** Identifies the label color. */
123 color: Schema.String
124})
125export interface NodesLabelsNodesLabel extends Schema.Struct.Type<typeof NodesLabelsNodesLabel.fields> {}
126
127/** The connection type for Label. */
128export const NodesLabelsLabelConnection = Schema.Struct({
129 /** A list of nodes. */
130 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesLabelsNodesLabel)))
131})
132export interface NodesLabelsLabelConnection extends Schema.Struct.Type<typeof NodesLabelsLabelConnection.fields> {}
133
134/** The connection type for IssueComment. */
135export const NodesCommentsIssueCommentConnection = Schema.Struct({
136 /** Identifies the total count of items in the connection. */
137 totalCount: Shared.Int
138})
139export interface NodesCommentsIssueCommentConnection extends Schema.Struct.Type<typeof NodesCommentsIssueCommentConnection.fields> {}
140
141/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
142export const IssueSearchSearchNodesIssue = Schema.Struct({
143 __typename: Schema.Literal("Issue"),
144 ...IssueRow.fields,
145 /** A list of Users assigned to this object. */
146 assignees: NodesAssigneesUserConnection,
147 /** A list of labels associated with the object. */
148 labels: Schema.NullOr(NodesLabelsLabelConnection),
149 /** A list of comments associated with the Issue. */
150 comments: NodesCommentsIssueCommentConnection
151})
152export interface IssueSearchSearchNodesIssue extends Schema.Struct.Type<typeof IssueSearchSearchNodesIssue.fields> {}
153
154/** The results of a search. */
155export const SearchResultItemOther = Schema.Struct({
156 __typename: GraphQL.otherTypename<Shared.Typename.SearchResultItem>()(["Issue"])
157})
158export interface SearchResultItemOther extends Schema.Struct.Type<typeof SearchResultItemOther.fields> {}
159
160/**
161 * A list of results that matched against a search query. Regardless of the number
162 * of matches, a maximum of 1,000 results will be available across all types,
163 * potentially split across many pages.
164 */
165export const IssueSearchSearchSearchResultItemConnection = Schema.Struct({
166 /** Information to aid in pagination. */
167 pageInfo: SearchPageInfoPageInfo,
168 /** A list of nodes. */
169 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Schema.Union([
170 IssueSearchSearchNodesIssue,
171 SearchResultItemOther
172 ]))))
173})
174export interface IssueSearchSearchSearchResultItemConnection extends Schema.Struct.Type<typeof IssueSearchSearchSearchResultItemConnection.fields> {}
175
176/** `query IssueSearch` */
177export const IssueSearch = GraphQL.query("IssueSearch", {
178 document: {
179 variables: [
180 { name: "q", body: "String!" },
181 { name: "cursor", body: "String" },
182 { name: "rows", body: "Int!" }
183 ],
184 selections: [
185 { name: "search", body: ["(query:$", "q", " type:ISSUE first:$", "rows", " after:$", "cursor", "){pageInfo{hasNextPage endCursor}nodes{__typename...on Issue{...IssueRow assignees(first:20){nodes{login name avatarUrl}}labels(first:20){nodes{name color}}comments{totalCount}}}}"] }
186 ],
187 fragments: [
188 { name: "IssueRow", body: ["on Issue{number title url state stateReason createdAt updatedAt closedAt author{__typename login avatarUrl...on User{name}}}"] }
189 ]
190 },
191 variables: {
192 q: Schema.String,
193 cursor: Schema.optional(Schema.NullOr(Schema.String)),
194 rows: Shared.Int
195 },
196 result: Schema.Struct({
197 /** Perform a search across resources, returning a maximum of 1,000 results. */
198 search: IssueSearchSearchSearchResultItemConnection
199 })
200})
201export declare namespace IssueSearch {
202 export type Variables = typeof IssueSearch.variables.Type
203 export type Result = typeof IssueSearch.result.Type
204}
205
206/** A user is an individual's account on GitHub that owns repositories and can make new content. */
207export const ViewerUser = Schema.Struct({
208 /** The username used to login. */
209 login: Schema.String
210})
211export interface ViewerUser extends Schema.Struct.Type<typeof ViewerUser.fields> {}
212
213/** A list of users. */
214export const IssueAssigneesUserConnection = Schema.Struct({
215 /** Information to aid in pagination. */
216 pageInfo: SearchPageInfoPageInfo,
217 /** A list of nodes. */
218 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(AssigneesNodesUser)))
219})
220export interface IssueAssigneesUserConnection extends Schema.Struct.Type<typeof IssueAssigneesUserConnection.fields> {}
221
222/** The connection type for Label. */
223export const IssueLabelsLabelConnection = Schema.Struct({
224 /** Information to aid in pagination. */
225 pageInfo: SearchPageInfoPageInfo,
226 /** A list of nodes. */
227 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesLabelsNodesLabel)))
228})
229export interface IssueLabelsLabelConnection extends Schema.Struct.Type<typeof IssueLabelsLabelConnection.fields> {}
230
231/** A user is an individual's account on GitHub that owns repositories and can make new content. */
232export const ReactorsNodesUser = Schema.Struct({
233 __typename: Schema.Literal("User"),
234 /** The username used to login. */
235 login: Schema.String
236})
237export interface ReactorsNodesUser extends Schema.Struct.Type<typeof ReactorsNodesUser.fields> {}
238
239/** A special type of user which takes actions on behalf of GitHub Apps. */
240export const Bot = Schema.Struct({
241 __typename: Schema.Literal("Bot"),
242 /** The username of the actor. */
243 login: Schema.String
244})
245export interface Bot extends Schema.Struct.Type<typeof Bot.fields> {}
246
247/** An account on GitHub, with one or more owners, that has repositories, members and teams. */
248export const Organization = Schema.Struct({
249 __typename: Schema.Literal("Organization"),
250 /** The organization's login name. */
251 login: Schema.String
252})
253export interface Organization extends Schema.Struct.Type<typeof Organization.fields> {}
254
255/** A placeholder user for attribution of imported data on GitHub. */
256export const Mannequin = Schema.Struct({
257 __typename: Schema.Literal("Mannequin"),
258 /** The username of the actor. */
259 login: Schema.String
260})
261export interface Mannequin extends Schema.Struct.Type<typeof Mannequin.fields> {}
262
263/** Types that can be assigned to reactions. */
264export const ReactorOther = Schema.Struct({
265 __typename: GraphQL.otherTypename<Shared.Typename.Reactor>()(["User", "Bot", "Organization", "Mannequin"])
266})
267export interface ReactorOther extends Schema.Struct.Type<typeof ReactorOther.fields> {}
268
269/** The connection type for Reactor. */
270export const ReactorConnection = Schema.Struct({
271 /** Identifies the total count of items in the connection. */
272 totalCount: Shared.Int,
273 /** A list of nodes. */
274 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Schema.Union([
275 ReactorsNodesUser,
276 Bot,
277 Organization,
278 Mannequin,
279 ReactorOther
280 ]))))
281})
282export interface ReactorConnection extends Schema.Struct.Type<typeof ReactorConnection.fields> {}
283
284/** A group of emoji reactions to a particular piece of content. */
285export const ReactionGroup = Schema.Struct({
286 /** Identifies the emoji reaction. */
287 content: GraphQL.enumLiterals(Shared.ReactionContent.literals),
288 /** Whether or not the authenticated user has left a reaction on the subject. */
289 viewerHasReacted: Schema.Boolean,
290 /** Reactors to the reaction subject with the emotion represented by this reaction group. */
291 reactors: ReactorConnection
292})
293export interface ReactionGroup extends Schema.Struct.Type<typeof ReactionGroup.fields> {}
294
295/** Information about pagination in a connection. */
296export const CommentsPageInfoPageInfo = Schema.Struct({
297 /** When paginating backwards, are there more items? */
298 hasPreviousPage: Schema.Boolean,
299 /** When paginating backwards, the cursor to continue. */
300 startCursor: Schema.NullOr(Schema.String)
301})
302export interface CommentsPageInfoPageInfo extends Schema.Struct.Type<typeof CommentsPageInfoPageInfo.fields> {}
303
304/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
305export const Actor = Schema.Struct({
306 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()([]),
307 /** The username of the actor. */
308 login: Schema.String,
309 /** A URL pointing to the actor's public avatar. */
310 avatarUrl: Shared.URI
311})
312export interface Actor extends Schema.Struct.Type<typeof Actor.fields> {}
313
314/** Represents a comment on an Issue. */
315export const NodesIssueComment = Schema.Struct({
316 /** The Node ID of the IssueComment object */
317 id: Shared.ID,
318 /** The actor who authored the comment. */
319 author: Schema.NullOr(Actor),
320 /** The body as Markdown. */
321 body: Schema.String,
322 /** Identifies the date and time when the object was created. */
323 createdAt: Shared.DateTime,
324 /** The HTTP URL for this issue comment */
325 url: Shared.URI,
326 /** A list of reactions grouped by content left on the subject. */
327 reactionGroups: Schema.NullOr(Schema.Array(ReactionGroup))
328})
329export interface NodesIssueComment extends Schema.Struct.Type<typeof NodesIssueComment.fields> {}
330
331/** The connection type for IssueComment. */
332export const IssueDetailRepositoryIssueCommentsIssueCommentConnection = Schema.Struct({
333 /** Identifies the total count of items in the connection. */
334 totalCount: Shared.Int,
335 /** Information to aid in pagination. */
336 pageInfo: CommentsPageInfoPageInfo,
337 /** A list of nodes. */
338 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesIssueComment)))
339})
340export interface IssueDetailRepositoryIssueCommentsIssueCommentConnection extends Schema.Struct.Type<typeof IssueDetailRepositoryIssueCommentsIssueCommentConnection.fields> {}
341
342/** A repository contains the content for a project. */
343export const NodesRepositoryRepository = Schema.Struct({
344 /** The repository's name with owner. */
345 nameWithOwner: Schema.String
346})
347export interface NodesRepositoryRepository extends Schema.Struct.Type<typeof NodesRepositoryRepository.fields> {}
348
349/** A repository pull request. */
350export const NodesPullRequest = Schema.Struct({
351 /** Identifies the pull request number. */
352 number: Shared.Int,
353 /** Identifies the pull request title. */
354 title: Schema.String,
355 /** The HTTP URL for this pull request. */
356 url: Shared.URI,
357 /** Identifies the state of the pull request. */
358 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
359 /** Identifies if the pull request is a draft. */
360 isDraft: Schema.Boolean,
361 /** The repository associated with this node. */
362 repository: NodesRepositoryRepository
363})
364export interface NodesPullRequest extends Schema.Struct.Type<typeof NodesPullRequest.fields> {}
365
366/** The connection type for PullRequest. */
367export const PullRequestConnection = Schema.Struct({
368 /** Information to aid in pagination. */
369 pageInfo: SearchPageInfoPageInfo,
370 /** A list of nodes. */
371 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequest)))
372})
373export interface PullRequestConnection extends Schema.Struct.Type<typeof PullRequestConnection.fields> {}
374
375/** Represents a 'closed' event on any `Closable`. */
376export const ClosedEvent = Schema.Struct({
377 __typename: Schema.Literal("ClosedEvent"),
378 /** The Node ID of the ClosedEvent object */
379 id: Shared.ID,
380 /** Identifies the date and time when the object was created. */
381 createdAt: Shared.DateTime,
382 /** Identifies the actor who performed the event. */
383 actor: Schema.NullOr(Actor)
384})
385export interface ClosedEvent extends Schema.Struct.Type<typeof ClosedEvent.fields> {}
386
387/** Represents a 'reopened' event on any `Closable`. */
388export const ReopenedEvent = Schema.Struct({
389 __typename: Schema.Literal("ReopenedEvent"),
390 /** The Node ID of the ReopenedEvent object */
391 id: Shared.ID,
392 /** Identifies the date and time when the object was created. */
393 createdAt: Shared.DateTime,
394 /** Identifies the actor who performed the event. */
395 actor: Schema.NullOr(Actor)
396})
397export interface ReopenedEvent extends Schema.Struct.Type<typeof ReopenedEvent.fields> {}
398
399/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
400export const LabelLabel = Schema.Struct({
401 /** Identifies the label name. */
402 name: Schema.String
403})
404export interface LabelLabel extends Schema.Struct.Type<typeof LabelLabel.fields> {}
405
406/** Represents a 'labeled' event on a given issue or pull request. */
407export const LabeledEvent = Schema.Struct({
408 __typename: Schema.Literal("LabeledEvent"),
409 /** The Node ID of the LabeledEvent object */
410 id: Shared.ID,
411 /** Identifies the date and time when the object was created. */
412 createdAt: Shared.DateTime,
413 /** Identifies the actor who performed the event. */
414 actor: Schema.NullOr(Actor),
415 /** Identifies the label associated with the 'labeled' event. */
416 label: LabelLabel
417})
418export interface LabeledEvent extends Schema.Struct.Type<typeof LabeledEvent.fields> {}
419
420/** Represents an 'unlabeled' event on a given issue or pull request. */
421export const UnlabeledEvent = Schema.Struct({
422 __typename: Schema.Literal("UnlabeledEvent"),
423 /** The Node ID of the UnlabeledEvent object */
424 id: Shared.ID,
425 /** Identifies the date and time when the object was created. */
426 createdAt: Shared.DateTime,
427 /** Identifies the actor who performed the event. */
428 actor: Schema.NullOr(Actor),
429 /** Identifies the label associated with the 'unlabeled' event. */
430 label: LabelLabel
431})
432export interface UnlabeledEvent extends Schema.Struct.Type<typeof UnlabeledEvent.fields> {}
433
434/** A user is an individual's account on GitHub that owns repositories and can make new content. */
435export const AssigneeUser = Schema.Struct({
436 __typename: Schema.Literal("User"),
437 /** The username used to login. */
438 login: Schema.String,
439 /** The user's public profile name. */
440 name: Schema.NullOr(Schema.String)
441})
442export interface AssigneeUser extends Schema.Struct.Type<typeof AssigneeUser.fields> {}
443
444/** Types that can be assigned to issues. */
445export const AssigneeOther = Schema.Struct({
446 __typename: GraphQL.otherTypename<Shared.Typename.Assignee>()(["User", "Bot"])
447})
448export interface AssigneeOther extends Schema.Struct.Type<typeof AssigneeOther.fields> {}
449
450/** Represents an 'assigned' event on any assignable object. */
451export const AssignedEvent = Schema.Struct({
452 __typename: Schema.Literal("AssignedEvent"),
453 /** The Node ID of the AssignedEvent object */
454 id: Shared.ID,
455 /** Identifies the date and time when the object was created. */
456 createdAt: Shared.DateTime,
457 /** Identifies the actor who performed the event. */
458 actor: Schema.NullOr(Actor),
459 /** Identifies the user or mannequin that was assigned. */
460 assignee: Schema.NullOr(Schema.Union([
461 AssigneeUser,
462 Bot,
463 AssigneeOther
464 ]))
465})
466export interface AssignedEvent extends Schema.Struct.Type<typeof AssignedEvent.fields> {}
467
468/** Represents an 'unassigned' event on any assignable object. */
469export const UnassignedEvent = Schema.Struct({
470 __typename: Schema.Literal("UnassignedEvent"),
471 /** The Node ID of the UnassignedEvent object */
472 id: Shared.ID,
473 /** Identifies the date and time when the object was created. */
474 createdAt: Shared.DateTime,
475 /** Identifies the actor who performed the event. */
476 actor: Schema.NullOr(Actor),
477 /** Identifies the user or mannequin that was unassigned. */
478 assignee: Schema.NullOr(Schema.Union([
479 AssigneeUser,
480 Bot,
481 AssigneeOther
482 ]))
483})
484export interface UnassignedEvent extends Schema.Struct.Type<typeof UnassignedEvent.fields> {}
485
486/** Represents a 'renamed' event on a given issue or pull request */
487export const RenamedTitleEvent = Schema.Struct({
488 __typename: Schema.Literal("RenamedTitleEvent"),
489 /** The Node ID of the RenamedTitleEvent object */
490 id: Shared.ID,
491 /** Identifies the date and time when the object was created. */
492 createdAt: Shared.DateTime,
493 /** Identifies the actor who performed the event. */
494 actor: Schema.NullOr(Actor),
495 /** Identifies the current title of the issue or pull request. */
496 currentTitle: Schema.String
497})
498export interface RenamedTitleEvent extends Schema.Struct.Type<typeof RenamedTitleEvent.fields> {}
499
500/** A repository pull request. */
501export const SourcePullRequest = Schema.Struct({
502 __typename: Schema.Literal("PullRequest"),
503 /** Identifies the pull request number. */
504 number: Shared.Int,
505 /** Identifies the pull request title. */
506 title: Schema.String,
507 /** The HTTP URL for this pull request. */
508 url: Shared.URI,
509 /** Identifies the state of the pull request. */
510 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
511 /** Identifies if the pull request is a draft. */
512 isDraft: Schema.Boolean,
513 /** The repository associated with this node. */
514 repository: NodesRepositoryRepository
515})
516export interface SourcePullRequest extends Schema.Struct.Type<typeof SourcePullRequest.fields> {}
517
518/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
519export const SourceIssue = Schema.Struct({
520 __typename: Schema.Literal("Issue"),
521 /** Identifies the issue number. */
522 number: Shared.Int,
523 /** The HTTP URL for this issue */
524 url: Shared.URI,
525 /** The repository associated with this node. */
526 repository: NodesRepositoryRepository
527})
528export interface SourceIssue extends Schema.Struct.Type<typeof SourceIssue.fields> {}
529
530/** Any referencable object */
531export const ReferencedSubjectOther = Schema.Struct({
532 __typename: GraphQL.otherTypename<Shared.Typename.ReferencedSubject>()(["PullRequest", "Issue"])
533})
534export interface ReferencedSubjectOther extends Schema.Struct.Type<typeof ReferencedSubjectOther.fields> {}
535
536/** Represents a mention made by one issue or pull request to another. */
537export const CrossReferencedEvent = Schema.Struct({
538 __typename: Schema.Literal("CrossReferencedEvent"),
539 /** The Node ID of the CrossReferencedEvent object */
540 id: Shared.ID,
541 /** Identifies the date and time when the object was created. */
542 createdAt: Shared.DateTime,
543 /** Identifies the actor who performed the event. */
544 actor: Schema.NullOr(Actor),
545 /** Issue or pull request that made the reference. */
546 source: Schema.Union([
547 SourcePullRequest,
548 SourceIssue,
549 ReferencedSubjectOther
550 ])
551})
552export interface CrossReferencedEvent extends Schema.Struct.Type<typeof CrossReferencedEvent.fields> {}
553
554/** An item in an issue timeline */
555export const IssueTimelineItemsOther = Schema.Struct({
556 __typename: GraphQL.otherTypename<Shared.Typename.IssueTimelineItems>()(["ClosedEvent", "ReopenedEvent", "LabeledEvent", "UnlabeledEvent", "AssignedEvent", "UnassignedEvent", "RenamedTitleEvent", "CrossReferencedEvent"])
557})
558export interface IssueTimelineItemsOther extends Schema.Struct.Type<typeof IssueTimelineItemsOther.fields> {}
559
560/** The connection type for IssueTimelineItems. */
561export const IssueTimelineItemsConnection = Schema.Struct({
562 /** A list of nodes. */
563 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Schema.Union([
564 ClosedEvent,
565 ReopenedEvent,
566 LabeledEvent,
567 UnlabeledEvent,
568 AssignedEvent,
569 UnassignedEvent,
570 RenamedTitleEvent,
571 CrossReferencedEvent,
572 IssueTimelineItemsOther
573 ]))))
574})
575export interface IssueTimelineItemsConnection extends Schema.Struct.Type<typeof IssueTimelineItemsConnection.fields> {}
576
577/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
578export const IssueDetailRepositoryIssueIssue = Schema.Struct({
579 ...IssueRow.fields,
580 /** A list of Users assigned to this object. */
581 assignees: IssueAssigneesUserConnection,
582 /** A list of labels associated with the object. */
583 labels: Schema.NullOr(IssueLabelsLabelConnection),
584 /** Identifies the body of the issue. */
585 body: Schema.String,
586 /** Check if the current viewer can update this object. */
587 viewerCanUpdate: Schema.Boolean,
588 /** Indicates if the object can be closed by the viewer. */
589 viewerCanClose: Schema.Boolean,
590 /** Indicates if the object can be reopened by the viewer. */
591 viewerCanReopen: Schema.Boolean,
592 /** A list of reactions grouped by content left on the subject. */
593 reactionGroups: Schema.NullOr(Schema.Array(ReactionGroup)),
594 /** A list of comments associated with the Issue. */
595 comments: IssueDetailRepositoryIssueCommentsIssueCommentConnection,
596 /** List of open pull requests referenced from this issue */
597 closedByPullRequestsReferences: Schema.NullOr(PullRequestConnection),
598 /** A list of events, comments, commits, etc. associated with the issue. */
599 timelineItems: IssueTimelineItemsConnection
600})
601export interface IssueDetailRepositoryIssueIssue extends Schema.Struct.Type<typeof IssueDetailRepositoryIssueIssue.fields> {}
602
603/** A repository contains the content for a project. */
604export const IssueDetailRepositoryRepository = Schema.Struct({
605 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
606 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals)),
607 /** Returns a single issue from the current repository by number. */
608 issue: Schema.NullOr(IssueDetailRepositoryIssueIssue)
609})
610export interface IssueDetailRepositoryRepository extends Schema.Struct.Type<typeof IssueDetailRepositoryRepository.fields> {}
611
612/** `query IssueDetail` */
613export const IssueDetail = GraphQL.query("IssueDetail", {
614 document: {
615 variables: [
616 { name: "owner", body: "String!" },
617 { name: "name", body: "String!" },
618 { name: "number", body: "Int!" }
619 ],
620 selections: [
621 { name: "viewer", body: ["{login}"] },
622 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){viewerPermission issue(number:$", "number", "){...IssueRow assignees(first:100){pageInfo{hasNextPage endCursor}nodes{login name avatarUrl}}labels(first:100){pageInfo{hasNextPage endCursor}nodes{name color}}body viewerCanUpdate viewerCanClose viewerCanReopen...Reactions comments(last:100){totalCount pageInfo{hasPreviousPage startCursor}nodes{id author{__typename login avatarUrl}body createdAt url...Reactions}}closedByPullRequestsReferences(first:20 includeClosedPrs:true){pageInfo{hasNextPage endCursor}nodes{number title url state isDraft repository{nameWithOwner}}}timelineItems(last:100 itemTypes:[CLOSED_EVENT REOPENED_EVENT LABELED_EVENT UNLABELED_EVENT ASSIGNED_EVENT UNASSIGNED_EVENT RENAMED_TITLE_EVENT CROSS_REFERENCED_EVENT]){nodes{__typename...on ClosedEvent{id createdAt actor{__typename login avatarUrl}}...on ReopenedEvent{id createdAt actor{__typename login avatarUrl}}...on LabeledEvent{id createdAt actor{__typename login avatarUrl}label{name}}...on UnlabeledEvent{id createdAt actor{__typename login avatarUrl}label{name}}...on AssignedEvent{id createdAt actor{__typename login avatarUrl}assignee{__typename...on User{login name}...on Bot{login}}}...on UnassignedEvent{id createdAt actor{__typename login avatarUrl}assignee{__typename...on User{login name}...on Bot{login}}}...on RenamedTitleEvent{id createdAt actor{__typename login avatarUrl}currentTitle}...on CrossReferencedEvent{id createdAt actor{__typename login avatarUrl}source{__typename...on PullRequest{number title url state isDraft repository{nameWithOwner}}...on Issue{number url repository{nameWithOwner}}}}}}}}"] }
623 ],
624 fragments: [
625 { name: "IssueRow", body: ["on Issue{number title url state stateReason createdAt updatedAt closedAt author{__typename login avatarUrl...on User{name}}}"] },
626 { name: "Reactions", body: ["on Reactable{__typename reactionGroups{content viewerHasReacted reactors(first:10){totalCount nodes{__typename...on User{login}...on Bot{login}...on Organization{login}...on Mannequin{login}}}}}"] }
627 ]
628 },
629 variables: {
630 owner: Schema.String,
631 name: Schema.String,
632 number: Shared.Int
633 },
634 result: Schema.Struct({
635 /** The currently authenticated user. */
636 viewer: ViewerUser,
637 /** Lookup a given repository by the owner and repository name. */
638 repository: Schema.NullOr(IssueDetailRepositoryRepository)
639 })
640})
641export declare namespace IssueDetail {
642 export type Variables = typeof IssueDetail.variables.Type
643 export type Result = typeof IssueDetail.result.Type
644}
645
646/** The connection type for IssueComment. */
647export const IssueCommentsRepositoryIssueCommentsIssueCommentConnection = Schema.Struct({
648 /** Information to aid in pagination. */
649 pageInfo: CommentsPageInfoPageInfo,
650 /** A list of nodes. */
651 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesIssueComment)))
652})
653export interface IssueCommentsRepositoryIssueCommentsIssueCommentConnection extends Schema.Struct.Type<typeof IssueCommentsRepositoryIssueCommentsIssueCommentConnection.fields> {}
654
655/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
656export const IssueCommentsRepositoryIssueIssue = Schema.Struct({
657 /** A list of comments associated with the Issue. */
658 comments: IssueCommentsRepositoryIssueCommentsIssueCommentConnection
659})
660export interface IssueCommentsRepositoryIssueIssue extends Schema.Struct.Type<typeof IssueCommentsRepositoryIssueIssue.fields> {}
661
662/** A repository contains the content for a project. */
663export const IssueCommentsRepositoryRepository = Schema.Struct({
664 /** Returns a single issue from the current repository by number. */
665 issue: Schema.NullOr(IssueCommentsRepositoryIssueIssue)
666})
667export interface IssueCommentsRepositoryRepository extends Schema.Struct.Type<typeof IssueCommentsRepositoryRepository.fields> {}
668
669/** `query IssueComments` */
670export const IssueComments = GraphQL.query("IssueComments", {
671 document: {
672 variables: [
673 { name: "owner", body: "String!" },
674 { name: "name", body: "String!" },
675 { name: "number", body: "Int!" },
676 { name: "cursor", body: "String!" }
677 ],
678 selections: [
679 { name: "viewer", body: ["{login}"] },
680 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){issue(number:$", "number", "){comments(last:100 before:$", "cursor", "){pageInfo{hasPreviousPage startCursor}nodes{id author{__typename login avatarUrl}body createdAt url...Reactions}}}}"] }
681 ],
682 fragments: [
683 { name: "Reactions", body: ["on Reactable{__typename reactionGroups{content viewerHasReacted reactors(first:10){totalCount nodes{__typename...on User{login}...on Bot{login}...on Organization{login}...on Mannequin{login}}}}}"] }
684 ]
685 },
686 variables: {
687 owner: Schema.String,
688 name: Schema.String,
689 number: Shared.Int,
690 cursor: Schema.String
691 },
692 result: Schema.Struct({
693 /** The currently authenticated user. */
694 viewer: ViewerUser,
695 /** Lookup a given repository by the owner and repository name. */
696 repository: Schema.NullOr(IssueCommentsRepositoryRepository)
697 })
698})
699export declare namespace IssueComments {
700 export type Variables = typeof IssueComments.variables.Type
701 export type Result = typeof IssueComments.result.Type
702}
703
704/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
705export const IssueLinkMetadataRepositoryIssueIssue = Schema.Struct({
706 /** Identifies the issue number. */
707 number: Shared.Int,
708 /** Identifies the issue title. */
709 title: Schema.String,
710 /** The HTTP URL for this issue */
711 url: Shared.URI
712})
713export interface IssueLinkMetadataRepositoryIssueIssue extends Schema.Struct.Type<typeof IssueLinkMetadataRepositoryIssueIssue.fields> {}
714
715/** A repository contains the content for a project. */
716export const IssueLinkMetadataRepositoryRepository = Schema.Struct({
717 /** Returns a single issue from the current repository by number. */
718 issue: Schema.NullOr(IssueLinkMetadataRepositoryIssueIssue)
719})
720export interface IssueLinkMetadataRepositoryRepository extends Schema.Struct.Type<typeof IssueLinkMetadataRepositoryRepository.fields> {}
721
722/** `query IssueLinkMetadata` */
723export const IssueLinkMetadata = GraphQL.query("IssueLinkMetadata", {
724 document: {
725 variables: [
726 { name: "owner", body: "String!" },
727 { name: "name", body: "String!" },
728 { name: "number", body: "Int!" }
729 ],
730 selections: [
731 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){issue(number:$", "number", "){number title url}}"] }
732 ],
733 fragments: []
734 },
735 variables: {
736 owner: Schema.String,
737 name: Schema.String,
738 number: Shared.Int
739 },
740 result: Schema.Struct({
741 /** Lookup a given repository by the owner and repository name. */
742 repository: Schema.NullOr(IssueLinkMetadataRepositoryRepository)
743 })
744})
745export declare namespace IssueLinkMetadata {
746 export type Variables = typeof IssueLinkMetadata.variables.Type
747 export type Result = typeof IssueLinkMetadata.result.Type
748}
749
750/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
751export const IssueNodeIdRepositoryIssueIssue = Schema.Struct({
752 /** The Node ID of the Issue object */
753 id: Shared.ID,
754 /** Identifies the state of the issue. */
755 state: GraphQL.enumLiterals(Shared.IssueState.literals),
756 /** Identifies the reason for the issue state. */
757 stateReason: Schema.NullOr(GraphQL.enumLiterals(Shared.IssueStateReason.literals))
758})
759export interface IssueNodeIdRepositoryIssueIssue extends Schema.Struct.Type<typeof IssueNodeIdRepositoryIssueIssue.fields> {}
760
761/** A repository contains the content for a project. */
762export const IssueNodeIdRepositoryRepository = Schema.Struct({
763 /** Returns a single issue from the current repository by number. */
764 issue: Schema.NullOr(IssueNodeIdRepositoryIssueIssue)
765})
766export interface IssueNodeIdRepositoryRepository extends Schema.Struct.Type<typeof IssueNodeIdRepositoryRepository.fields> {}
767
768/** `query IssueNodeId` */
769export const IssueNodeId = GraphQL.query("IssueNodeId", {
770 document: {
771 variables: [
772 { name: "owner", body: "String!" },
773 { name: "name", body: "String!" },
774 { name: "number", body: "Int!" }
775 ],
776 selections: [
777 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){issue(number:$", "number", "){id state stateReason}}"] }
778 ],
779 fragments: []
780 },
781 variables: {
782 owner: Schema.String,
783 name: Schema.String,
784 number: Shared.Int
785 },
786 result: Schema.Struct({
787 /** Lookup a given repository by the owner and repository name. */
788 repository: Schema.NullOr(IssueNodeIdRepositoryRepository)
789 })
790})
791export declare namespace IssueNodeId {
792 export type Variables = typeof IssueNodeId.variables.Type
793 export type Result = typeof IssueNodeId.result.Type
794}
795
796/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
797export const IssueCommentScopeRepositoryIssueIssue = Schema.Struct({
798 /** The Node ID of the Issue object */
799 id: Shared.ID
800})
801export interface IssueCommentScopeRepositoryIssueIssue extends Schema.Struct.Type<typeof IssueCommentScopeRepositoryIssueIssue.fields> {}
802
803/** A repository contains the content for a project. */
804export const IssueCommentScopeRepositoryRepository = Schema.Struct({
805 /** Returns a single issue from the current repository by number. */
806 issue: Schema.NullOr(IssueCommentScopeRepositoryIssueIssue)
807})
808export interface IssueCommentScopeRepositoryRepository extends Schema.Struct.Type<typeof IssueCommentScopeRepositoryRepository.fields> {}
809
810/** Represents a comment on an Issue. */
811export const NodeIssueComment = Schema.Struct({
812 __typename: Schema.Literal("IssueComment"),
813 /** Identifies the issue associated with the comment. */
814 issue: IssueCommentScopeRepositoryIssueIssue
815})
816export interface NodeIssueComment extends Schema.Struct.Type<typeof NodeIssueComment.fields> {}
817
818/** An object with an ID. */
819export const NodeOther = Schema.Struct({
820 __typename: GraphQL.otherTypename<Shared.Typename.Node>()(["IssueComment"])
821})
822export interface NodeOther extends Schema.Struct.Type<typeof NodeOther.fields> {}
823
824/** `query IssueCommentScope` */
825export const IssueCommentScope = GraphQL.query("IssueCommentScope", {
826 document: {
827 variables: [
828 { name: "owner", body: "String!" },
829 { name: "name", body: "String!" },
830 { name: "number", body: "Int!" },
831 { name: "commentId", body: "ID!" }
832 ],
833 selections: [
834 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){issue(number:$", "number", "){id}}"] },
835 { name: "node", body: ["(id:$", "commentId", "){__typename...on IssueComment{issue{id}}}"] }
836 ],
837 fragments: []
838 },
839 variables: {
840 owner: Schema.String,
841 name: Schema.String,
842 number: Shared.Int,
843 commentId: Shared.ID
844 },
845 result: Schema.Struct({
846 /** Lookup a given repository by the owner and repository name. */
847 repository: Schema.NullOr(IssueCommentScopeRepositoryRepository),
848 /** Fetches an object given its ID. */
849 node: Schema.NullOr(Schema.Union([
850 NodeIssueComment,
851 NodeOther
852 ]))
853 })
854})
855export declare namespace IssueCommentScope {
856 export type Variables = typeof IssueCommentScope.variables.Type
857 export type Result = typeof IssueCommentScope.result.Type
858}
859
860/** Information about pagination in a connection. */
861export const LabelsPageInfoPageInfo = Schema.Struct({
862 /** When paginating forwards, are there more items? */
863 hasNextPage: Schema.Boolean
864})
865export interface LabelsPageInfoPageInfo extends Schema.Struct.Type<typeof LabelsPageInfoPageInfo.fields> {}
866
867/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
868export const RepositoryLabelsNodesLabel = Schema.Struct({
869 /** Identifies the label name. */
870 name: Schema.String,
871 /** Identifies the label color. */
872 color: Schema.String,
873 /** A brief description of this label. */
874 description: Schema.NullOr(Schema.String)
875})
876export interface RepositoryLabelsNodesLabel extends Schema.Struct.Type<typeof RepositoryLabelsNodesLabel.fields> {}
877
878/** The connection type for Label. */
879export const RepositoryLabelsLabelConnection = Schema.Struct({
880 /** Information to aid in pagination. */
881 pageInfo: LabelsPageInfoPageInfo,
882 /** A list of nodes. */
883 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(RepositoryLabelsNodesLabel)))
884})
885export interface RepositoryLabelsLabelConnection extends Schema.Struct.Type<typeof RepositoryLabelsLabelConnection.fields> {}
886
887/** A list of users. */
888export const AssignableUsersUserConnection = Schema.Struct({
889 /** Information to aid in pagination. */
890 pageInfo: LabelsPageInfoPageInfo,
891 /** A list of nodes. */
892 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(AssigneesNodesUser)))
893})
894export interface AssignableUsersUserConnection extends Schema.Struct.Type<typeof AssignableUsersUserConnection.fields> {}
895
896/** A repository contains the content for a project. */
897export const IssueCandidatesRepositoryRepository = Schema.Struct({
898 /** A list of labels associated with the repository. */
899 labels: Schema.NullOr(RepositoryLabelsLabelConnection),
900 /** A list of users that can be assigned to issues in this repository. */
901 assignableUsers: AssignableUsersUserConnection
902})
903export interface IssueCandidatesRepositoryRepository extends Schema.Struct.Type<typeof IssueCandidatesRepositoryRepository.fields> {}
904
905/** `query IssueCandidates` */
906export const IssueCandidates = GraphQL.query("IssueCandidates", {
907 document: {
908 variables: [
909 { name: "owner", body: "String!" },
910 { name: "name", body: "String!" }
911 ],
912 selections: [
913 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){labels(first:100){pageInfo{hasNextPage}nodes{name color description}}assignableUsers(first:100){pageInfo{hasNextPage}nodes{login name avatarUrl}}}"] }
914 ],
915 fragments: []
916 },
917 variables: {
918 owner: Schema.String,
919 name: Schema.String
920 },
921 result: Schema.Struct({
922 /** Lookup a given repository by the owner and repository name. */
923 repository: Schema.NullOr(IssueCandidatesRepositoryRepository)
924 })
925})
926export declare namespace IssueCandidates {
927 export type Variables = typeof IssueCandidates.variables.Type
928 export type Result = typeof IssueCandidates.result.Type
929}
930
931/** Represents a Git blob. */
932export const Blob = Schema.Struct({
933 __typename: Schema.Literal("Blob"),
934 /** UTF8 text data or null if the Blob is binary */
935 text: Schema.NullOr(Schema.String),
936 /** Indicates whether the contents is truncated */
937 isTruncated: Schema.Boolean
938})
939export interface Blob extends Schema.Struct.Type<typeof Blob.fields> {}
940
941/** Represents a Git object. */
942export const ObjectGitObjectOther = Schema.Struct({
943 __typename: GraphQL.otherTypename<Shared.Typename.GitObject>()(["Blob"])
944})
945export interface ObjectGitObjectOther extends Schema.Struct.Type<typeof ObjectGitObjectOther.fields> {}
946
947/** Represents a Git tree entry. */
948export const TreeEntry = Schema.Struct({
949 /** Entry file name. */
950 name: Schema.String,
951 /** Entry file object. */
952 object: Schema.NullOr(Schema.Union([
953 Blob,
954 ObjectGitObjectOther
955 ]))
956})
957export interface TreeEntry extends Schema.Struct.Type<typeof TreeEntry.fields> {}
958
959/** Represents a Git tree. */
960export const Tree = Schema.Struct({
961 __typename: Schema.Literal("Tree"),
962 /** A list of tree entries. */
963 entries: Schema.NullOr(Schema.Array(TreeEntry))
964})
965export interface Tree extends Schema.Struct.Type<typeof Tree.fields> {}
966
967/** Represents a Git object. */
968export const TemplateDirectoryGitObjectOther = Schema.Struct({
969 __typename: GraphQL.otherTypename<Shared.Typename.GitObject>()(["Tree"])
970})
971export interface TemplateDirectoryGitObjectOther extends Schema.Struct.Type<typeof TemplateDirectoryGitObjectOther.fields> {}
972
973/** A list of users. */
974export const IssueTemplatesAssigneesUserConnection = Schema.Struct({
975 /** A list of nodes. */
976 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ViewerUser)))
977})
978export interface IssueTemplatesAssigneesUserConnection extends Schema.Struct.Type<typeof IssueTemplatesAssigneesUserConnection.fields> {}
979
980/** The connection type for Label. */
981export const IssueTemplatesLabelsLabelConnection = Schema.Struct({
982 /** A list of nodes. */
983 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(LabelLabel)))
984})
985export interface IssueTemplatesLabelsLabelConnection extends Schema.Struct.Type<typeof IssueTemplatesLabelsLabelConnection.fields> {}
986
987/** A repository issue template. */
988export const IssueTemplate = Schema.Struct({
989 /** The template filename. */
990 filename: Schema.String,
991 /** The template name. */
992 name: Schema.String,
993 /** The template purpose. */
994 about: Schema.NullOr(Schema.String),
995 /** The suggested issue title. */
996 title: Schema.NullOr(Schema.String),
997 /** The suggested issue body. */
998 body: Schema.NullOr(Schema.String),
999 /** The suggested assignees. */
1000 assignees: IssueTemplatesAssigneesUserConnection,
1001 /** The suggested issue labels */
1002 labels: Schema.NullOr(IssueTemplatesLabelsLabelConnection)
1003})
1004export interface IssueTemplate extends Schema.Struct.Type<typeof IssueTemplate.fields> {}
1005
1006/** A repository contains the content for a project. */
1007export const IssueTemplatesRepositoryRepository = Schema.Struct({
1008 /** A Git object in the repository */
1009 templateDirectory: Schema.NullOr(Schema.Union([
1010 Tree,
1011 TemplateDirectoryGitObjectOther
1012 ])),
1013 /** Returns a list of issue templates associated to the repository */
1014 issueTemplates: Schema.NullOr(Schema.Array(IssueTemplate))
1015})
1016export interface IssueTemplatesRepositoryRepository extends Schema.Struct.Type<typeof IssueTemplatesRepositoryRepository.fields> {}
1017
1018/** `query IssueTemplates` */
1019export const IssueTemplates = GraphQL.query("IssueTemplates", {
1020 document: {
1021 variables: [
1022 { name: "owner", body: "String!" },
1023 { name: "name", body: "String!" }
1024 ],
1025 selections: [
1026 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){templateDirectory:object(expression:\"HEAD:.github/ISSUE_TEMPLATE\"){__typename...on Tree{entries{name object{__typename...on Blob{text isTruncated}}}}}issueTemplates{filename name about title body assignees(first:25){nodes{login}}labels(first:50){nodes{name}}}}"] }
1027 ],
1028 fragments: []
1029 },
1030 variables: {
1031 owner: Schema.String,
1032 name: Schema.String
1033 },
1034 result: Schema.Struct({
1035 /** Lookup a given repository by the owner and repository name. */
1036 repository: Schema.NullOr(IssueTemplatesRepositoryRepository)
1037 })
1038})
1039export declare namespace IssueTemplates {
1040 export type Variables = typeof IssueTemplates.variables.Type
1041 export type Result = typeof IssueTemplates.result.Type
1042}
1043
1044/** `query IssueViewer` */
1045export const IssueViewer = GraphQL.query("IssueViewer", {
1046 document: {
1047 variables: [],
1048 selections: [
1049 { name: "viewer", body: ["{login}"] }
1050 ],
1051 fragments: []
1052 },
1053 result: Schema.Struct({
1054 /** The currently authenticated user. */
1055 viewer: ViewerUser
1056 })
1057})
1058export declare namespace IssueViewer {
1059 export type Variables = typeof IssueViewer.variables.Type
1060 export type Result = typeof IssueViewer.result.Type
1061}
1062
1063/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
1064export const IssueCollectionsRepositoryIssueIssue = Schema.Struct({
1065 /** A list of labels associated with the object. */
1066 labels: Schema.optionalKey(Schema.NullOr(IssueLabelsLabelConnection)),
1067 /** A list of Users assigned to this object. */
1068 assignees: Schema.optionalKey(IssueAssigneesUserConnection),
1069 /** List of open pull requests referenced from this issue */
1070 closedByPullRequestsReferences: Schema.optionalKey(Schema.NullOr(PullRequestConnection))
1071})
1072export interface IssueCollectionsRepositoryIssueIssue extends Schema.Struct.Type<typeof IssueCollectionsRepositoryIssueIssue.fields> {}
1073
1074/** A repository contains the content for a project. */
1075export const IssueCollectionsRepositoryRepository = Schema.Struct({
1076 /** Returns a single issue from the current repository by number. */
1077 issue: Schema.NullOr(IssueCollectionsRepositoryIssueIssue)
1078})
1079export interface IssueCollectionsRepositoryRepository extends Schema.Struct.Type<typeof IssueCollectionsRepositoryRepository.fields> {}
1080
1081/** `query IssueCollections` */
1082export const IssueCollections = GraphQL.query("IssueCollections", {
1083 document: {
1084 variables: [
1085 { name: "owner", body: "String!" },
1086 { name: "name", body: "String!" },
1087 { name: "number", body: "Int!" },
1088 { name: "labelsCursor", body: "String" },
1089 { name: "assigneesCursor", body: "String" },
1090 { name: "closingPullRequestsCursor", body: "String" },
1091 { name: "withLabels", body: "Boolean!" },
1092 { name: "withAssignees", body: "Boolean!" },
1093 { name: "withClosingPullRequests", body: "Boolean!" }
1094 ],
1095 selections: [
1096 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){issue(number:$", "number", "){labels(first:100 after:$", "labelsCursor", ")@include(if:$", "withLabels", "){pageInfo{hasNextPage endCursor}nodes{name color}}assignees(first:100 after:$", "assigneesCursor", ")@include(if:$", "withAssignees", "){pageInfo{hasNextPage endCursor}nodes{login name avatarUrl}}closedByPullRequestsReferences(first:100 after:$", "closingPullRequestsCursor", " includeClosedPrs:true)@include(if:$", "withClosingPullRequests", "){pageInfo{hasNextPage endCursor}nodes{number title url state isDraft repository{nameWithOwner}}}}}"] }
1097 ],
1098 fragments: []
1099 },
1100 variables: {
1101 owner: Schema.String,
1102 name: Schema.String,
1103 number: Shared.Int,
1104 labelsCursor: Schema.optional(Schema.NullOr(Schema.String)),
1105 assigneesCursor: Schema.optional(Schema.NullOr(Schema.String)),
1106 closingPullRequestsCursor: Schema.optional(Schema.NullOr(Schema.String)),
1107 withLabels: Schema.Boolean,
1108 withAssignees: Schema.Boolean,
1109 withClosingPullRequests: Schema.Boolean
1110 },
1111 result: Schema.Struct({
1112 /** Lookup a given repository by the owner and repository name. */
1113 repository: Schema.NullOr(IssueCollectionsRepositoryRepository)
1114 })
1115})
1116export declare namespace IssueCollections {
1117 export type Variables = typeof IssueCollections.variables.Type
1118 export type Result = typeof IssueCollections.result.Type
1119}
1120
1121/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
1122export const IssueSearchWithStatusSearchNodesIssue = Schema.Struct({
1123 __typename: Schema.Literal("Issue"),
1124 ...IssueRow.fields,
1125 /**
1126 * The status of this issue, or null when it has none or issue statuses aren't
1127 * available in the repository. Issue statuses are in preview and only available
1128 * to accounts enrolled in the preview.
1129 */
1130 status: Schema.NullOr(PlanningStatusFields),
1131 /** A list of Users assigned to this object. */
1132 assignees: NodesAssigneesUserConnection,
1133 /** A list of labels associated with the object. */
1134 labels: Schema.NullOr(NodesLabelsLabelConnection),
1135 /** A list of comments associated with the Issue. */
1136 comments: NodesCommentsIssueCommentConnection
1137})
1138export interface IssueSearchWithStatusSearchNodesIssue extends Schema.Struct.Type<typeof IssueSearchWithStatusSearchNodesIssue.fields> {}
1139
1140/**
1141 * A list of results that matched against a search query. Regardless of the number
1142 * of matches, a maximum of 1,000 results will be available across all types,
1143 * potentially split across many pages.
1144 */
1145export const IssueSearchWithStatusSearchSearchResultItemConnection = Schema.Struct({
1146 /** Information to aid in pagination. */
1147 pageInfo: SearchPageInfoPageInfo,
1148 /** A list of nodes. */
1149 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Schema.Union([
1150 IssueSearchWithStatusSearchNodesIssue,
1151 SearchResultItemOther
1152 ]))))
1153})
1154export interface IssueSearchWithStatusSearchSearchResultItemConnection extends Schema.Struct.Type<typeof IssueSearchWithStatusSearchSearchResultItemConnection.fields> {}
1155
1156/** `query IssueSearchWithStatus` */
1157export const IssueSearchWithStatus = GraphQL.query("IssueSearchWithStatus", {
1158 document: {
1159 variables: [
1160 { name: "q", body: "String!" },
1161 { name: "cursor", body: "String" },
1162 { name: "rows", body: "Int!" }
1163 ],
1164 selections: [
1165 { name: "search", body: ["(query:$", "q", " type:ISSUE first:$", "rows", " after:$", "cursor", "){pageInfo{hasNextPage endCursor}nodes{__typename...on Issue{...IssueRow status{...PlanningStatusFields}assignees(first:20){nodes{login name avatarUrl}}labels(first:20){nodes{name color}}comments{totalCount}}}}"] }
1166 ],
1167 fragments: [
1168 { name: "IssueRow", body: ["on Issue{number title url state stateReason createdAt updatedAt closedAt author{__typename login avatarUrl...on User{name}}}"] },
1169 { name: "PlanningStatusFields", body: ["on PlanningStatus{id name category{key state stateReason}}"] }
1170 ]
1171 },
1172 variables: {
1173 q: Schema.String,
1174 cursor: Schema.optional(Schema.NullOr(Schema.String)),
1175 rows: Shared.Int
1176 },
1177 result: Schema.Struct({
1178 /** Perform a search across resources, returning a maximum of 1,000 results. */
1179 search: IssueSearchWithStatusSearchSearchResultItemConnection
1180 })
1181})
1182export declare namespace IssueSearchWithStatus {
1183 export type Variables = typeof IssueSearchWithStatus.variables.Type
1184 export type Result = typeof IssueSearchWithStatus.result.Type
1185}
1186
1187/** The connection type for PlanningStatus. */
1188export const PlanningStatusConnection = Schema.Struct({
1189 /** A list of nodes. */
1190 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PlanningStatusFields)))
1191})
1192export interface PlanningStatusConnection extends Schema.Struct.Type<typeof PlanningStatusConnection.fields> {}
1193
1194/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
1195export const IssueStatusesRepositoryIssueIssue = Schema.Struct({
1196 /**
1197 * Whether the viewer can set this issue's status. Issue statuses are in preview
1198 * and only available to accounts enrolled in the preview.
1199 */
1200 viewerCanSetStatus: Schema.Boolean,
1201 /**
1202 * The status of this issue, or null when it has none or issue statuses aren't
1203 * available in the repository. Issue statuses are in preview and only available
1204 * to accounts enrolled in the preview.
1205 */
1206 status: Schema.NullOr(PlanningStatusFields)
1207})
1208export interface IssueStatusesRepositoryIssueIssue extends Schema.Struct.Type<typeof IssueStatusesRepositoryIssueIssue.fields> {}
1209
1210/** A repository contains the content for a project. */
1211export const IssueStatusesRepositoryRepository = Schema.Struct({
1212 /**
1213 * The planning statuses issues in this repository can be in, or null when issue
1214 * statuses aren't available for this repository or viewer. Planning statuses are
1215 * returned in display order. Issue statuses are in preview and only available to
1216 * accounts enrolled in the preview.
1217 */
1218 planningStatuses: Schema.NullOr(PlanningStatusConnection),
1219 /** Returns a single issue from the current repository by number. */
1220 issue: Schema.NullOr(IssueStatusesRepositoryIssueIssue)
1221})
1222export interface IssueStatusesRepositoryRepository extends Schema.Struct.Type<typeof IssueStatusesRepositoryRepository.fields> {}
1223
1224/** `query IssueStatuses` */
1225export const IssueStatuses = GraphQL.query("IssueStatuses", {
1226 document: {
1227 variables: [
1228 { name: "owner", body: "String!" },
1229 { name: "name", body: "String!" },
1230 { name: "number", body: "Int!" }
1231 ],
1232 selections: [
1233 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){planningStatuses(first:50){nodes{...PlanningStatusFields}}issue(number:$", "number", "){viewerCanSetStatus status{...PlanningStatusFields}}}"] }
1234 ],
1235 fragments: [
1236 { name: "PlanningStatusFields", body: ["on PlanningStatus{id name category{key state stateReason}}"] }
1237 ]
1238 },
1239 variables: {
1240 owner: Schema.String,
1241 name: Schema.String,
1242 number: Shared.Int
1243 },
1244 result: Schema.Struct({
1245 /** Lookup a given repository by the owner and repository name. */
1246 repository: Schema.NullOr(IssueStatusesRepositoryRepository)
1247 })
1248})
1249export declare namespace IssueStatuses {
1250 export type Variables = typeof IssueStatuses.variables.Type
1251 export type Result = typeof IssueStatuses.result.Type
1252}
1253
1254/** Autogenerated return type of SetIssueStatus. */
1255export const SetIssueStatusPayload = Schema.Struct({
1256 /** A unique identifier for the client performing the mutation. */
1257 clientMutationId: Schema.NullOr(Schema.String)
1258})
1259export interface SetIssueStatusPayload extends Schema.Struct.Type<typeof SetIssueStatusPayload.fields> {}
1260
1261/** `mutation SetIssueStatus` */
1262export const SetIssueStatus = GraphQL.mutation("SetIssueStatus", {
1263 document: {
1264 variables: [
1265 { name: "issueId", body: "ID!" },
1266 { name: "statusId", body: "ID!" }
1267 ],
1268 selections: [
1269 { name: "setIssueStatus", body: ["(input:{issueId:$", "issueId", " statusId:$", "statusId", "}){clientMutationId}"] }
1270 ],
1271 fragments: []
1272 },
1273 variables: {
1274 issueId: Shared.ID,
1275 statusId: Shared.ID
1276 },
1277 result: Schema.Struct({
1278 /**
1279 * Sets the status of an issue, closing or reopening it when the status calls for
1280 * it. Issue statuses are in preview and only available to accounts enrolled in the preview.
1281 */
1282 setIssueStatus: Schema.NullOr(SetIssueStatusPayload)
1283 })
1284})
1285export declare namespace SetIssueStatus {
1286 export type Variables = typeof SetIssueStatus.variables.Type
1287 export type Result = typeof SetIssueStatus.result.Type
1288}
1289
1290/** Every operation in issues.graphql. */
1291export const IssuesGraphQLGroup = GraphQLGroup.make(IssueSearch, IssueDetail, IssueComments, IssueLinkMetadata, IssueNodeId, IssueCommentScope, IssueCandidates, IssueTemplates, IssueViewer, IssueCollections, IssueSearchWithStatus, IssueStatuses, SetIssueStatus)