aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/types.ts
blob: f3ac305162b24b1b20c3230f3b55eb040ff2cf89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export type MentionValue = {
  key: string,
  value: string,
  name: string,
  fullname: string,
  avatar: string,
}

export type Config = {
  appUrl: string,
  appSubUrl: string,
  assetVersionEncoded: string,
  assetUrlPrefix: string,
  runModeIsProd: boolean,
  customEmojis: Record<string, string>,
  csrfToken: string,
  pageData: Record<string, any>,
  notificationSettings: Record<string, any>,
  enableTimeTracking: boolean,
  mentionValues?: MentionValue[],
  mermaidMaxSourceCharacters: number,
  i18n: Record<string, string>,
}

export type Intent = 'error' | 'warning' | 'info';

export type RequestData = string | FormData | URLSearchParams;

export type RequestOpts = {
  data?: RequestData,
} & RequestInit;

export type IssueData = {
  owner: string,
  repo: string,
  type: string,
  index: string,
}