From acdd7c1785e8393a9dfe791f0393f73f177e1001 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 30 Mar 2021 17:23:44 -0400 Subject: [PATCH] build: generate types --- schema.d.ts | 455 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 455 insertions(+) diff --git a/schema.d.ts b/schema.d.ts index e482301df..acb48bcd6 100644 --- a/schema.d.ts +++ b/schema.d.ts @@ -16,6 +16,7 @@ export type Schema = | DeployKeyEvent | DeploymentEvent | DeploymentStatusEvent + | DiscussionEvent | ForkEvent | GithubAppAuthorizationEvent | GollumEvent @@ -90,6 +91,18 @@ export type ContentReferenceEvent = ContentReferenceCreatedEvent; export type DeployKeyEvent = DeployKeyCreatedEvent | DeployKeyDeletedEvent; export type DeploymentEvent = DeploymentCreatedEvent; export type DeploymentStatusEvent = DeploymentStatusCreatedEvent; +export type DiscussionEvent = + | DiscussionAnsweredEvent + | DiscussionCreatedEvent + | DiscussionCreatedEvent1 + | DiscussionDeletedEvent + | DiscussionEditedEvent + | DiscussionLockedEvent + | DiscussionPinnedEvent + | DiscussionTransferredEvent + | DiscussionUnansweredEvent + | DiscussionUnlockedEvent + | DiscussionUnpinnedEvent; export type GithubAppAuthorizationEvent = GithubAppAuthorizationRevokedEvent; export type InstallationEvent = | InstallationCreatedEvent @@ -1862,6 +1875,447 @@ export interface DeploymentStatusCreatedEvent { installation?: InstallationLite; organization?: Organization; } +export interface DiscussionAnsweredEvent { + action: "answered"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionCreatedEvent { + changes: { + category: { + from: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + }; + }; + action: "category_changed"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionCreatedEvent1 { + action: "created"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionDeletedEvent { + action: "deleted"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionEditedEvent { + changes?: { + title?: { + from: string; + }; + body?: { + from: string; + }; + }; + action: "edited"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionLockedEvent { + action: "locked"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "locked"; + locked: true; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionPinnedEvent { + action: "pinned"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionTransferredEvent { + action: "transferred"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionUnansweredEvent { + action: "unanswered"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionUnlockedEvent { + action: "unlocked"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open"; + locked: false; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} +export interface DiscussionUnpinnedEvent { + action: "unpinned"; + discussion: { + repository_url: string; + category: { + id: number; + repository_id: number; + emoji: string; + name: string; + description: string; + created_at: string; + updated_at: string; + slug: string; + is_answerable: boolean; + }; + answer_html_url: string | null; + answer_chosen_at: string | null; + answer_chosen_by: string | null; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + user: User; + state: "open" | "locked"; + locked: boolean; + comments: number; + created_at: string; + updated_at: string; + author_association: AuthorAssociation; + active_lock_reason: string | null; + body: string; + }; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} /** * A user forks a repository. */ @@ -5666,6 +6120,7 @@ export interface EventPayloadMap { deploy_key: DeployKeyEvent; deployment: DeploymentEvent; deployment_status: DeploymentStatusEvent; + discussion: DiscussionEvent; fork: ForkEvent; github_app_authorization: GithubAppAuthorizationEvent; gollum: GollumEvent;