-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
112 lines (103 loc) · 2.37 KB
/
types.ts
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
export enum PermissionLevel {
READ = 'read',
WRITE = 'write',
DELETE = 'delete',
PUBLISH = 'publish',
OWNER = 'owner'
}
export interface TweetCampaignSummary {
id: number;
title: string;
description: string;
tweetCount: number;
targetListName: string;
userPermissionLevel: string[];
createdDate: string;
updatedDate: string;
}
export interface NominatimLocationInfo {
place_id: number;
licence: string;
osm_type: string;
osm_id: number;
lat: string;
lon: string;
category: string;
type: string;
place_rank: number;
importance: number;
addresstype: string;
name: string;
display_name: string;
address: {
road: string | undefined;
neighbourhood: string | undefined;
suburb: string | undefined;
village: string | undefined;
town: string | undefined;
municipality: string | undefined;
county: string;
'ISO3166-2-lvl6': string;
state: string;
'ISO3166-2-lvl4': string;
country: string;
country_code: string;
};
boundingbox: [string, string, string, string];
}
export interface DatabaseFile {
id: number;
url: string;
}
export interface CustomStyleTheme {
name: string;
backgroundColor: string | null;
backgroundTextColor: string | null;
backgroundHeaderColor: string | null;
accentColor: string | null;
accentTextColor: string | null;
accentHeaderColor: string | null;
headerFont: string | null;
font: string | null;
logo: DatabaseFile | null;
logoSquare: DatabaseFile | null;
icon: DatabaseFile | null;
}
interface sharingDescription {
description: string
}
interface petitionTheme {
id: number,
title: string,
icon: string
}
export interface PetitionListItem {
id: number
title: string,
sharingInformation: sharingDescription,
image: DatabaseFile | null,
slug: string,
petitionThemes: petitionTheme[]
}
export interface ShareInformation {
whatsappShareText: string;
tweet: string;
shareTitle: string;
description: string;
shareImage: DatabaseFile | null;
}
export interface PetitionCampaignEdit {
id: number;
title: string;
description: string | null;
themes: string[];
groupName: string | null;
defaultImage: {
id: number
url: string
} | null,
limitLocationCountry: string | null;
slug: string;
petitionContentTemplate: string | undefined | null;
}
export type PermissionType = 'owner' | 'read' | 'write' | 'approval' | 'admin'