import * as API from "@distilled.cloud/core/api"; // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/rest-api-description). Do not edit. import * as S from "@distilled.cloud/core/schema-lite"; import * as __L from "@distilled.cloud/core/schema-lite"; import { GithubServiceErrors } from "../errors.ts"; import { paginateLink } from "../pagination.ts"; import { GithubProtocol, type GithubOpError, type GithubOpContext } from "../protocol.ts"; import * as Retry from "../retry.ts"; import * as T from "../traits.ts"; // Schema table, filled on first reach (see __S at the end). const __s: any[] = []; export type { GithubOpError, GithubOpContext }; /** Span facts shared by every operation (com.distilled.telemetry#service). */ const TELEMETRY = { system: "github-api", responseHeaders: [ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" }, { header: "request-id", name: "http.response.header.request-id", transform: "list" }, { header: "x-github-request-id", name: "http.response.header.x-github-request-id", transform: "list", }, ], prefix: "GitHub", service: "Reactions", labels: "github", propagate: "w3c", } as const; /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment. */ export type CreateForCommitCommentRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface CreateForCommitCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment. */ content: CreateForCommitCommentRequestContent | (string & {}); } /** A GitHub user. */ export interface NullableSimpleUser { name?: string | null | undefined; email?: string | null | undefined; login: string; id: number; node_id: string; avatar_url: string; gravatar_id: string | null; url: string; html_url: string; followers_url: string; following_url: string; gists_url: string; starred_url: string; subscriptions_url: string; organizations_url: string; repos_url: string; events_url: string; received_events_url: string; type: string; site_admin: boolean; starred_at?: string | undefined; user_view_type?: string | undefined; } /** The reaction to use */ export type ReactionContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; /** Reactions to conversations provide a way to help people express their feelings more simply and effectively. */ export interface Reaction { id: number; node_id: string; user: NullableSimpleUser | null; /** The reaction to use */ content: ReactionContent; created_at: string; } /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue. */ export type CreateForIssueRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface CreateForIssueRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The number that identifies the issue. */ issue_number: number; /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue. */ content: CreateForIssueRequestContent | (string & {}); } /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment. */ export type CreateForIssueCommentRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface CreateForIssueCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment. */ content: CreateForIssueCommentRequestContent | (string & {}); } /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment. */ export type CreateForPullRequestReviewCommentRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface CreateForPullRequestReviewCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment. */ content: CreateForPullRequestReviewCommentRequestContent | (string & {}); } /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release. */ export type CreateForReleaseRequestContent = | "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; export interface CreateForReleaseRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the release. */ release_id: number; /** The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release. */ content: CreateForReleaseRequestContent | (string & {}); } export interface DeleteForCommitCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** The unique identifier of the reaction. */ reaction_id: number; } export interface DeleteForCommitCommentResponse {} export interface DeleteForIssueRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The number that identifies the issue. */ issue_number: number; /** The unique identifier of the reaction. */ reaction_id: number; } export interface DeleteForIssueResponse {} export interface DeleteForIssueCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** The unique identifier of the reaction. */ reaction_id: number; } export interface DeleteForIssueCommentResponse {} export interface DeleteForPullRequestCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** The unique identifier of the reaction. */ reaction_id: number; } export interface DeleteForPullRequestCommentResponse {} export interface DeleteForReleaseRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the release. */ release_id: number; /** The unique identifier of the reaction. */ reaction_id: number; } export interface DeleteForReleaseResponse {} export type ListForCommitCommentRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface ListForCommitCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment. */ content?: ListForCommitCommentRequestContent | (string & {}) | undefined; /** The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ per_page?: number | undefined; /** The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ page?: number | undefined; } export type ListForCommitCommentResponseBodyList = Array; export type ListForCommitCommentResponse = ListForCommitCommentResponseBodyList; export type ListForIssueRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface ListForIssueRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The number that identifies the issue. */ issue_number: number; /** Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue. */ content?: ListForIssueRequestContent | (string & {}) | undefined; /** The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ per_page?: number | undefined; /** The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ page?: number | undefined; } export type ListForIssueResponseBodyList = Array; export type ListForIssueResponse = ListForIssueResponseBodyList; export type ListForIssueCommentRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface ListForIssueCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue comment. */ content?: ListForIssueCommentRequestContent | (string & {}) | undefined; /** The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ per_page?: number | undefined; /** The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ page?: number | undefined; } export type ListForIssueCommentResponseBodyList = Array; export type ListForIssueCommentResponse = ListForIssueCommentResponseBodyList; export type ListForPullRequestReviewCommentRequestContent = | "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; export interface ListForPullRequestReviewCommentRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the comment. */ comment_id: number; /** Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment. */ content?: ListForPullRequestReviewCommentRequestContent | (string & {}) | undefined; /** The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ per_page?: number | undefined; /** The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ page?: number | undefined; } export type ListForPullRequestReviewCommentResponseBodyList = Array; export type ListForPullRequestReviewCommentResponse = ListForPullRequestReviewCommentResponseBodyList; export type ListForReleaseRequestContent = "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; export interface ListForReleaseRequest { /** The account owner of the repository. The name is not case sensitive. */ owner: string; /** The name of the repository without the `.git` extension. The name is not case sensitive. */ repo: string; /** The unique identifier of the release. */ release_id: number; /** Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a release. */ content?: ListForReleaseRequestContent | (string & {}) | undefined; /** The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ per_page?: number | undefined; /** The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." */ page?: number | undefined; } export type ListForReleaseResponseBodyList = Array; export type ListForReleaseResponse = ListForReleaseResponseBodyList; export type CreateForCommitCommentError = GithubOpError; /** Create reaction for a commit comment Create a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ export const createForCommitComment: API.OperationMethod< CreateForCommitCommentRequest, Reaction, CreateForCommitCommentError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(0, __c0, 0) as any as S.Schema, output: __S(3, __c1, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateForCommitComment", })); export type CreateForIssueError = GithubOpError; /** Create reaction for an issue Create a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ export const createForIssue: API.OperationMethod< CreateForIssueRequest, Reaction, CreateForIssueError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(4, __c2, 0) as any as S.Schema, output: __S(3, __c1, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateForIssue", })); export type CreateForIssueCommentError = GithubOpError; /** Create reaction for an issue comment Create a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ export const createForIssueComment: API.OperationMethod< CreateForIssueCommentRequest, Reaction, CreateForIssueCommentError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(18, __c9, 0) as any as S.Schema, output: __S(3, __c1, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateForIssueComment", })); export type CreateForPullRequestReviewCommentError = GithubOpError; /** Create reaction for a pull request review comment Create a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ export const createForPullRequestReviewComment: API.OperationMethod< CreateForPullRequestReviewCommentRequest, Reaction, CreateForPullRequestReviewCommentError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(20, __c10, 0) as any as S.Schema, output: __S(3, __c1, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateForPullRequestReviewComment", })); export type CreateForReleaseError = GithubOpError; /** Create reaction for a release Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ export const createForRelease: API.OperationMethod< CreateForReleaseRequest, Reaction, CreateForReleaseError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(22, __c11, 0) as any as S.Schema, output: __S(3, __c1, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateForRelease", })); export type DeleteForCommitCommentError = GithubOpError; /** Delete a commit comment reaction > [!NOTE] > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. Delete a reaction to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). */ export const deleteForCommitComment: API.OperationMethod< DeleteForCommitCommentRequest, DeleteForCommitCommentResponse, DeleteForCommitCommentError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c12, 0) as any as S.Schema, output: __S(26, __c13, 0) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteForCommitComment", })); export type DeleteForIssueError = GithubOpError; /** Delete an issue reaction > [!NOTE] > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. Delete a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). */ export const deleteForIssue: API.OperationMethod< DeleteForIssueRequest, DeleteForIssueResponse, DeleteForIssueError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(28, __c14, 0) as any as S.Schema, output: __S(26, __c13, 0) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteForIssue", })); export type DeleteForIssueCommentError = GithubOpError; /** Delete an issue comment reaction > [!NOTE] > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. Delete a reaction to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). */ export const deleteForIssueComment: API.OperationMethod< DeleteForIssueCommentRequest, DeleteForIssueCommentResponse, DeleteForIssueCommentError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(30, __c15, 0) as any as S.Schema, output: __S(26, __c13, 0) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteForIssueComment", })); export type DeleteForPullRequestCommentError = GithubOpError; /** Delete a pull request comment reaction > [!NOTE] > You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` Delete a reaction to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). */ export const deleteForPullRequestComment: API.OperationMethod< DeleteForPullRequestCommentRequest, DeleteForPullRequestCommentResponse, DeleteForPullRequestCommentError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c16, 0) as any as S.Schema, output: __S(26, __c13, 0) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteForPullRequestComment", })); export type DeleteForReleaseError = GithubOpError; /** Delete a release reaction > [!NOTE] > You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. Delete a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). */ export const deleteForRelease: API.OperationMethod< DeleteForReleaseRequest, DeleteForReleaseResponse, DeleteForReleaseError, GithubOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(34, __c17, 0) as any as S.Schema, output: __S(26, __c13, 0) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteForRelease", })); export type ListForCommitCommentError = GithubOpError; /** List reactions for a commit comment List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). */ export const listForCommitComment: API.PaginatedOperationMethod< ListForCommitCommentRequest, ListForCommitCommentResponse, ListForCommitCommentError, GithubOpContext, Reaction > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(6, __c3, 0) as any as S.Schema, output: __S(9, __c4, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListForCommitComment", pagination: { mode: "link", inputToken: "page", pageSize: "per_page", items: "body" } as const, }), paginateLink, ) as any; export type ListForIssueError = GithubOpError; /** List reactions for an issue List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). */ export const listForIssue: API.PaginatedOperationMethod< ListForIssueRequest, ListForIssueResponse, ListForIssueError, GithubOpContext, Reaction > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(10, __c5, 0) as any as S.Schema, output: __S(9, __c4, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListForIssue", pagination: { mode: "link", inputToken: "page", pageSize: "per_page", items: "body" } as const, }), paginateLink, ) as any; export type ListForIssueCommentError = GithubOpError; /** List reactions for an issue comment List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). */ export const listForIssueComment: API.PaginatedOperationMethod< ListForIssueCommentRequest, ListForIssueCommentResponse, ListForIssueCommentError, GithubOpContext, Reaction > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(12, __c6, 0) as any as S.Schema, output: __S(9, __c4, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListForIssueComment", pagination: { mode: "link", inputToken: "page", pageSize: "per_page", items: "body" } as const, }), paginateLink, ) as any; export type ListForPullRequestReviewCommentError = GithubOpError; /** List reactions for a pull request review comment List the reactions to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). */ export const listForPullRequestReviewComment: API.PaginatedOperationMethod< ListForPullRequestReviewCommentRequest, ListForPullRequestReviewCommentResponse, ListForPullRequestReviewCommentError, GithubOpContext, Reaction > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(14, __c7, 0) as any as S.Schema, output: __S(9, __c4, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListForPullRequestReviewComment", pagination: { mode: "link", inputToken: "page", pageSize: "per_page", items: "body" } as const, }), paginateLink, ) as any; export type ListForReleaseError = GithubOpError; /** List reactions for a release List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release). */ export const listForRelease: API.PaginatedOperationMethod< ListForReleaseRequest, ListForReleaseResponse, ListForReleaseError, GithubOpContext, Reaction > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(16, __c8, 0) as any as S.Schema, output: __S(9, __c4, 1) as any as S.Schema, errors: [], serviceErrors: GithubServiceErrors, protocol: GithubProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListForRelease", pagination: { mode: "link", inputToken: "page", pageSize: "per_page", items: "body" } as const, }), paginateLink, ) as any; // Schema builders: each runs one schema initializer, on that schema's first use. function __c0(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), content: S.String, }).pipe( T.Http({ method: "POST", uri: "/repos/{owner}/{repo}/comments/{comment_id}/reactions", code: 200, }), ), ).annotate({ identifier: "CreateForCommitCommentRequest" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ name: S.optional(S.NullOr(S.String)), email: S.optional(S.NullOr(S.String)), login: S.String, id: S.Number, node_id: S.String, avatar_url: S.String, gravatar_id: S.NullOr(S.String), url: S.String, html_url: S.String, followers_url: S.String, following_url: S.String, gists_url: S.String, starred_url: S.String, subscriptions_url: S.String, organizations_url: S.String, repos_url: S.String, events_url: S.String, received_events_url: S.String, type: S.String, site_admin: S.Boolean, starred_at: S.optional(S.String), user_view_type: S.optional(S.String), }), ).annotate({ identifier: "NullableSimpleUser" }); case 1: return S.suspend(() => S.Struct({ id: S.Number, node_id: S.String, user: S.NullOr(__S(2, __c1, 0)), content: S.String, created_at: S.String, }), ).annotate({ identifier: "Reaction" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), issue_number: S.Number.pipe(T.Label()), content: S.String, }).pipe( T.Http({ method: "POST", uri: "/repos/{owner}/{repo}/issues/{issue_number}/reactions", code: 200, }), ), ).annotate({ identifier: "CreateForIssueRequest" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), content: S.optional(S.String.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/repos/{owner}/{repo}/comments/{comment_id}/reactions", code: 200, }), ), ).annotate({ identifier: "ListForCommitCommentRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.Array(__S(3, __c1, 1)); case 1: return S.suspend(() => __S(8, __c4, 0).pipe(T.RawResponseRoot())).annotate({ identifier: "ListForCommitCommentResponse", }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), issue_number: S.Number.pipe(T.Label()), content: S.optional(S.String.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/repos/{owner}/{repo}/issues/{issue_number}/reactions", code: 200, }), ), ).annotate({ identifier: "ListForIssueRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), content: S.optional(S.String.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", code: 200, }), ), ).annotate({ identifier: "ListForIssueCommentRequest" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), content: S.optional(S.String.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", code: 200, }), ), ).annotate({ identifier: "ListForPullRequestReviewCommentRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), release_id: S.Number.pipe(T.Label()), content: S.optional(S.String.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), }).pipe( T.Http({ method: "GET", uri: "/repos/{owner}/{repo}/releases/{release_id}/reactions", code: 200, }), ), ).annotate({ identifier: "ListForReleaseRequest" }); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), content: S.String, }).pipe( T.Http({ method: "POST", uri: "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", code: 200, }), ), ).annotate({ identifier: "CreateForIssueCommentRequest" }); } } function __c10(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), content: S.String, }).pipe( T.Http({ method: "POST", uri: "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", code: 200, }), ), ).annotate({ identifier: "CreateForPullRequestReviewCommentRequest" }); } } function __c11(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), release_id: S.Number.pipe(T.Label()), content: S.String, }).pipe( T.Http({ method: "POST", uri: "/repos/{owner}/{repo}/releases/{release_id}/reactions", code: 200, }), ), ).annotate({ identifier: "CreateForReleaseRequest" }); } } function __c12(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), reaction_id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", code: 200, }), ), ).annotate({ identifier: "DeleteForCommitCommentRequest" }); } } function __c13(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteForCommitCommentResponse", }); } } function __c14(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), issue_number: S.Number.pipe(T.Label()), reaction_id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", code: 200, }), ), ).annotate({ identifier: "DeleteForIssueRequest" }); } } function __c15(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), reaction_id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", code: 200, }), ), ).annotate({ identifier: "DeleteForIssueCommentRequest" }); } } function __c16(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), comment_id: S.Number.pipe(T.Label()), reaction_id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", code: 200, }), ), ).annotate({ identifier: "DeleteForPullRequestCommentRequest" }); } } function __c17(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ owner: S.String.pipe(T.Label()), repo: S.String.pipe(T.Label()), release_id: S.Number.pipe(T.Label()), reaction_id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", code: 200, }), ), ).annotate({ identifier: "DeleteForReleaseRequest" }); } } // Schema table: entry i is schema j of builder f, made on first reach. function __S(i: number, f: (j: number) => unknown, j: number): any { return (__s[i] ??= __L.at(f, j)); }