Files
better-auth-better-hub/apps/web/src/lib/mutation-events.ts
T
Maxwell f6bcb9988f feat: improve themes (#150)
- removed code themes in favour of themes having built-in code syntax
themes.

# Themes (30)

## Supabase
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/ebe48a46-93ee-4bea-9cc8-dda97531a2c8"
/>

## Vercel
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/9736aa0d-7b72-47d7-bf24-8416aeb14b08"
/>

## Evil Rabbit
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/7e63a20d-634d-4143-8179-2b41129412b9"
/>

## Mintlify
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/67d61fb8-a9d0-44da-9d65-2dd2e5b35214"
/>

## Tailwind
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/88bc8177-f5a3-45e9-ba39-6ff3fdceb362"
/>

## OpenAI
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/432386b2-a7fb-40d0-85a7-7ed0930a5f3f"
/>

## Prisma
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/73a7b0a1-8e09-4321-b21e-c2baaf866cfa"
/>

## ElevenLabs
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/57de3e05-5924-40f2-993c-c0ba651bb6ed"
/>

## Resend
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/a9855ba8-135d-4b5c-a77d-0c081dcf552b"
/>

## Trigger.dev
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/f833d2f6-0f02-4f85-b8ba-da20ce489c98"
/>

## Nuxt
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/80cf39d5-b04c-4914-b0fe-e057581827a4"
/>

## BrowserBase
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/6be2b610-0e67-4149-8e7c-6ad3e670a96d"
/>

## Cloudflare
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/3dd6847d-e848-4718-af26-4fae755943b1"
/>

## Gemini
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/a1ba05fd-4299-4f6b-8211-18182ec96a5e"
/>

## Stripe
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/570cf5c9-d00b-4306-b7fe-72cbd6eeb941"
/>

## Bitmap
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/42e975b4-f1db-443f-9bac-daff02fdea7f"
/>

## Nior
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/0f270ede-0325-4061-9662-e4db4e06e44b"
/>

## Ice
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/96de2a91-61b9-46c6-a00f-063b6f262559"
/>

## Sand
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/162404fd-b1c6-4991-bf8f-c875fead82b0"
/>

## Forest
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/df5e64fc-d31f-4dce-b249-4bedb17e10aa"
/>

## Mono
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/f9f3e93a-c70c-457a-b214-4fecdfd31992"
/>

## Breeze
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/227fb948-ab69-44f5-bb03-16df96a73bd3"
/>

## Candy
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/e952135d-0e7b-4b7e-9e27-8259e78bd71c"
/>

## Crismon
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/8fd0ffd4-48a4-4739-8d7b-befa2379eab3"
/>

## Falcon
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/19a03c00-f31b-4977-ad7b-4a6ef70e115e"
/>

## Meadow
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/31bae90b-dc5b-4e2e-85d7-6404e1cb213c"
/>

## Midnight
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/aa2aecce-1865-4eee-a653-f43490bcc895"
/>

## Raindrop
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/793e012c-c6bb-4467-9408-48670754d4f7"
/>

## Sunset
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/34a05617-7502-447e-aba3-9fcda7564c0e"
/>

## Firecrawl
<img width="2820" height="2124" alt="image"
src="https://github.com/user-attachments/assets/25ef8dc0-352f-4f81-b00f-df1ca4d3d59d"
/>
2026-02-27 10:33:14 +10:00

187 lines
6.1 KiB
TypeScript

// ── PR Events ─────────────────────────────────────────────────
export type PRMergedEvent = { type: "pr:merged"; owner: string; repo: string; number: number };
export type PRClosedEvent = { type: "pr:closed"; owner: string; repo: string; number: number };
export type PRReopenedEvent = { type: "pr:reopened"; owner: string; repo: string; number: number };
export type PRConvertedToDraftEvent = {
type: "pr:converted_to_draft";
owner: string;
repo: string;
number: number;
};
export type PRCommentedEvent = {
type: "pr:commented";
owner: string;
repo: string;
number: number;
};
export type PRReviewedEvent = { type: "pr:reviewed"; owner: string; repo: string; number: number };
export type PRRenamedEvent = { type: "pr:renamed"; owner: string; repo: string; number: number };
export type PRBranchUpdatedEvent = {
type: "pr:branch-updated";
owner: string;
repo: string;
number: number;
};
export type PRSuggestionCommittedEvent = {
type: "pr:suggestion-committed";
owner: string;
repo: string;
number: number;
};
export type PRFileCommittedEvent = {
type: "pr:file-committed";
owner: string;
repo: string;
number: number;
};
export type PRThreadResolvedEvent = {
type: "pr:thread-resolved";
owner: string;
repo: string;
number: number;
};
export type PRThreadUnresolvedEvent = {
type: "pr:thread-unresolved";
owner: string;
repo: string;
number: number;
};
export type PRConflictResolvedEvent = {
type: "pr:conflict-resolved";
owner: string;
repo: string;
number: number;
};
export type PRCreatedEvent = {
type: "pr:created";
owner: string;
repo: string;
number: number;
};
// ── Issue Events ──────────────────────────────────────────────
export type IssueClosedEvent = {
type: "issue:closed";
owner: string;
repo: string;
number: number;
};
export type IssueReopenedEvent = {
type: "issue:reopened";
owner: string;
repo: string;
number: number;
};
export type IssueCreatedEvent = {
type: "issue:created";
owner: string;
repo: string;
number: number;
};
export type IssueCommentedEvent = {
type: "issue:commented";
owner: string;
repo: string;
number: number;
};
// ── Discussion Events ──────────────────────────────────────────
export type DiscussionCreatedEvent = {
type: "discussion:created";
owner: string;
repo: string;
number: number;
};
export type DiscussionCommentedEvent = {
type: "discussion:commented";
owner: string;
repo: string;
number: number;
};
// ── Prompt Events ─────────────────────────────────────────────
export type PromptCreatedEvent = { type: "prompt:created"; owner: string; repo: string };
export type PromptAcceptedEvent = { type: "prompt:accepted"; owner: string; repo: string };
export type PromptClosedEvent = { type: "prompt:closed"; owner: string; repo: string };
export type PromptReopenedEvent = { type: "prompt:reopened"; owner: string; repo: string };
export type PromptDeletedEvent = { type: "prompt:deleted"; owner: string; repo: string };
// ── Repo Events ───────────────────────────────────────────────
export type RepoStarredEvent = { type: "repo:starred"; owner: string; repo: string };
export type RepoUnstarredEvent = { type: "repo:unstarred"; owner: string; repo: string };
export type RepoCreatedEvent = { type: "repo:created"; owner: string; repo: string };
export type RepoFileCommittedEvent = { type: "repo:file-committed"; owner: string; repo: string };
export type RepoBranchDeletedEvent = { type: "repo:branch-deleted"; owner: string; repo: string };
// ── Pin Events ───────────────────────────────────────────────
export type PinAddedEvent = {
type: "pin:added";
owner: string;
repo: string;
url: string;
title: string;
itemType: string;
};
export type PinRemovedEvent = { type: "pin:removed"; owner: string; repo: string; url: string };
// ── Settings Events ───────────────────────────────────────────
export type SettingsUpdatedEvent = { type: "settings:updated" };
export type GitHubAccountAddedEvent = { type: "github-account:added" };
export type GitHubAccountRemovedEvent = { type: "github-account:removed" };
export type GitHubAccountSwitchedEvent = { type: "github-account:switched" };
// ── Discriminated Union ───────────────────────────────────────
export type MutationEvent =
| PRMergedEvent
| PRClosedEvent
| PRReopenedEvent
| PRConvertedToDraftEvent
| PRCommentedEvent
| PRReviewedEvent
| PRRenamedEvent
| PRBranchUpdatedEvent
| PRSuggestionCommittedEvent
| PRFileCommittedEvent
| PRThreadResolvedEvent
| PRThreadUnresolvedEvent
| PRConflictResolvedEvent
| PRCreatedEvent
| IssueClosedEvent
| IssueReopenedEvent
| IssueCreatedEvent
| IssueCommentedEvent
| DiscussionCreatedEvent
| DiscussionCommentedEvent
| PromptCreatedEvent
| PromptAcceptedEvent
| PromptClosedEvent
| PromptReopenedEvent
| PromptDeletedEvent
| RepoStarredEvent
| RepoUnstarredEvent
| RepoCreatedEvent
| RepoFileCommittedEvent
| RepoBranchDeletedEvent
| PinAddedEvent
| PinRemovedEvent
| SettingsUpdatedEvent
| GitHubAccountAddedEvent
| GitHubAccountRemovedEvent
| GitHubAccountSwitchedEvent;
export type MutationEventType = MutationEvent["type"];
// ── Helpers ───────────────────────────────────────────────────
export function isRepoEvent(event: MutationEvent, owner: string, repo: string): boolean {
return "owner" in event && "repo" in event && event.owner === owner && event.repo === repo;
}