gitea/types.ts

gitify · src/renderer/utils/forges/gitea/types.ts · typescript · MIT
integration

Defines TypeScript interfaces for Gitea notification and repository data to facilitate type-safe interactions with the Gitea API.

// Source: https://github.com/gitify-app/gitify | License: MIT | Copyright 2015-2024 Emmanouil Konstantinidis
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Subset of Gitea `modules/structs` notification and repository types.
 *
 * Field names follow the JSON shape returned by the Gitea HTTP API.
 *
 * @see https://github.com/go-gitea/gitea/blob/main/modules/structs/notifications.go
 */

export type GiteaNotifySubjectType = 'Issue' | 'Pull' | 'Commit' | 'Repository';

export interface GiteaNotificationSubject {
  title: string;
  url: string;
  latest_comment_url?: string;
  html_url: string;
  latest_comment_html_url?: string;
  type: GiteaNotifySubjectType;
  state?: string;
}

export interface GiteaUser {
  id: number;
  login: string;
  full_name?: string;
  av

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key