generated from NatoBoram/gigachad.ts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🏷️ Export discriminated interfaces for SchemaRestPullRequestActivity (#…
…17)
- Loading branch information
Showing
55 changed files
with
214 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from "./client.js" | ||
export type * from "./openapi/index.js" | ||
export * from "./client.ts" | ||
export type * as OpenApi from "./openapi/index.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type * from "./openapi-typescript.js" | ||
export type * from "./openapi-typescript.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from "./base64.js" | ||
export * as cloud from "./cloud/index.js" | ||
export * as server from "./server/index.js" | ||
export * from "./base64.ts" | ||
export * as BitbucketCloud from "./cloud/index.ts" | ||
export * as BitbucketServer from "./server/index.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./client.js" | ||
export type * from "./openapi/index.js" | ||
export * from "./webhooks/index.js" | ||
export * from "./client.ts" | ||
export * from "./interfaces/index.ts" | ||
export type * as OpenApi from "./openapi/index.ts" | ||
export * from "./webhooks/index.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./schema_rest_pull_request_activity.ts" |
47 changes: 47 additions & 0 deletions
47
src/server/interfaces/schema_rest_pull_request_activity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import type { | ||
SchemaRestComment, | ||
SchemaRestPullRequestActivity as SchemaRestPullRequestActivityBase, | ||
} from "../openapi/index.ts" | ||
|
||
export type SchemaRestPullRequestActivity = | ||
| SchemaRestPullRequestActivityCommented | ||
| SchemaRestPullRequestActivityOpened | ||
| SchemaRestPullRequestActivityUpdated | ||
type User = SchemaRestPullRequestActivityBase["user"] | ||
|
||
export interface SchemaRestPullRequestActivityCommented | ||
extends SchemaRestPullRequestActivityBase { | ||
readonly action: "COMMENTED" | ||
readonly comment?: SchemaRestComment | ||
readonly commentAnchor?: SchemaRestComment["anchor"] | ||
} | ||
|
||
export interface SchemaRestPullRequestActivityOpened | ||
extends SchemaRestPullRequestActivityBase { | ||
readonly action: "OPENED" | ||
} | ||
|
||
export interface SchemaRestPullRequestActivityUpdated | ||
extends SchemaRestPullRequestActivityBase { | ||
readonly action: "UPDATED" | ||
readonly addedReviewers: User[] | ||
readonly removedReviewers: User[] | ||
} | ||
|
||
export function isSchemaRestPullRequestActivityCommented( | ||
activity: SchemaRestPullRequestActivity, | ||
): activity is SchemaRestPullRequestActivityCommented { | ||
return activity.action === "COMMENTED" | ||
} | ||
|
||
export function isSchemaRestPullRequestActivityOpened( | ||
activity: SchemaRestPullRequestActivity, | ||
): activity is SchemaRestPullRequestActivityOpened { | ||
return activity.action === "OPENED" | ||
} | ||
|
||
export function isSchemaRestPullRequestActivityUpdated( | ||
activity: SchemaRestPullRequestActivity, | ||
): activity is SchemaRestPullRequestActivityUpdated { | ||
return activity.action === "UPDATED" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type * from "./openapi-typescript.js" | ||
export type * from "./openapi-typescript.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export * from "./event.js" | ||
export * as pr from "./pr/index.js" | ||
export * as project from "./project/index.js" | ||
export * as repo from "./repo/index.js" | ||
export * from "./suggestion_state.js" | ||
export * from "./event.ts" | ||
export * as pr from "./pr/index.ts" | ||
export * as project from "./project/index.ts" | ||
export * as repo from "./repo/index.ts" | ||
export * from "./suggestion_state.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.