diff --git a/src/github/common/types.ts b/src/github/common/types.ts index 8e654be8..af81f22f 100644 --- a/src/github/common/types.ts +++ b/src/github/common/types.ts @@ -110,6 +110,25 @@ export const GitHubCommitSchema = z.object({ ), }); +export const GitHubListCommitsSchema = z.array(z.object({ + sha: z.string(), + node_id: z.string(), + commit: z.object({ + author: GitHubAuthorSchema, + committer: GitHubAuthorSchema, + message: z.string(), + tree: z.object({ + sha: z.string(), + url: z.string() + }), + url: z.string(), + comment_count: z.number(), + }), + url: z.string(), + html_url: z.string(), + comments_url: z.string() +})); + export const GitHubReferenceSchema = z.object({ ref: z.string(), node_id: z.string(), @@ -178,6 +197,13 @@ export const GitHubIssueSchema = z.object({ body: z.string().nullable(), }); +// Search-related schemas +export const GitHubSearchResponseSchema = z.object({ + total_count: z.number(), + incomplete_results: z.boolean(), + items: z.array(GitHubRepositorySchema), +}); + // Export types export type GitHubAuthor = z.infer; export type GitHubRepository = z.infer; @@ -186,8 +212,10 @@ export type GitHubDirectoryContent = z.infer; export type GitHubTree = z.infer; export type GitHubCommit = z.infer; +export type GitHubListCommits = z.infer; export type GitHubReference = z.infer; export type GitHubIssueAssignee = z.infer; export type GitHubLabel = z.infer; export type GitHubMilestone = z.infer; -export type GitHubIssue = z.infer; \ No newline at end of file +export type GitHubIssue = z.infer; +export type GitHubSearchResponse = z.infer; \ No newline at end of file