Files
DefectingCat.github.io/types/index.ts
2022-06-21 14:05:41 +08:00

172 lines
3.8 KiB
TypeScript

import { GistData } from 'lib/fetcher';
import { NextPage } from 'next';
import { AppProps } from 'next/app';
import { ReactElement } from 'react';
export type NextPageWithLayout = {
getLayout(page: ReactElement): JSX.Element;
} & NextPage;
export type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
};
export interface MyMatters {
title: string;
date: string;
tags: string[];
}
export interface Post extends MyMatters {
slug: string;
}
// Generated by https://quicktype.io
// export interface Gist {
// url: string;
// forks_url: string;
// commits_url: string;
// id: string;
// node_id: string;
// git_pull_url: string;
// git_push_url: string;
// html_url: string;
// files: { [key: string]: GistsFile };
// public: boolean;
// created_at: string;
// updated_at: string;
// description: string;
// comments: number;
// user: null;
// comments_url: string;
// owner: GistsOwner;
// truncated: boolean;
// }
export interface GistsFile {
filename?: string | undefined;
type?: string | undefined;
language?: string | undefined;
raw_url?: string | undefined;
size?: number | undefined;
content?: string | undefined;
}
export enum GistsLanguage {
JavaScript = 'JavaScript',
PublicKey = 'Public Key',
TypeScript = 'TypeScript',
}
export enum GistsFileType {
ApplicationJavascript = 'application/javascript',
ApplicationPGPSignature = 'application/pgp-signature',
TextPlain = 'text/plain',
VideoMP2T = 'video/MP2T',
}
export interface GistsOwner {
login: GistsLogin;
id: number;
node_id: GistsNodeID;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: GistsFollowingURL;
gists_url: GistsURL;
starred_url: GistsStarredURL;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: GistsEventsURL;
received_events_url: string;
type: GistsOwnerType;
site_admin: boolean;
}
export enum GistsEventsURL {
HTTPSAPIGithubCOMUsersDefectingCatEventsPrivacy = 'https://api.github.com/users/DefectingCat/events{/privacy}',
}
export enum GistsFollowingURL {
HTTPSAPIGithubCOMUsersDefectingCatFollowingOtherUser = 'https://api.github.com/users/DefectingCat/following{/other_user}',
}
export enum GistsURL {
HTTPSAPIGithubCOMUsersDefectingCatGistsGistID = 'https://api.github.com/users/DefectingCat/gists{/gist_id}',
}
export enum GistsLogin {
DefectingCat = 'DefectingCat',
}
export enum GistsNodeID {
MDQ6VXNlcjI1MDMzNDkz = 'MDQ6VXNlcjI1MDMzNDkz',
}
export enum GistsStarredURL {
HTTPSAPIGithubCOMUsersDefectingCatStarredOwnerRepo = 'https://api.github.com/users/DefectingCat/starred{/owner}{/repo}',
}
export enum GistsOwnerType {
User = 'User',
}
// Generated by https://quicktype.io
export interface SignalGist extends GistData {
forks: any[];
history: History[];
}
// Generated by https://quicktype.io
export interface GithubUser {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
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;
name: string;
company: null;
blog: string;
location: null;
email: string;
hireable: null;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
private_gists: number;
total_private_repos: number;
owned_private_repos: number;
disk_usage: number;
collaborators: number;
two_factor_authentication: boolean;
plan: Plan;
}
export interface Plan {
name: string;
space: number;
collaborators: number;
private_repos: number;
}