-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathtypes.lua
122 lines (103 loc) · 3.19 KB
/
types.lua
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
113
114
115
116
117
118
119
120
121
122
---@class PartialProfileData
---@field firstName string
---@field lastName string
---@field dob number
---@field stateId string
---@field image? string
---@class Profile : PartialProfileData
---@field stateId string
---@field charid number | string
---@field notes? string
---@field licenses? table<string, { label: string } | string>[]
---@field vehicles? { label: string, plate: string }[]
---@field pastCharges? { label: string, count: number }[]
---@field relatedReports? { title: string, author: string, date: string, id: number }[]
---@class Officer
---@field firstName string
---@field lastName string
---@field stateId string
---@field callSign? string
---@field unitId? string
---@field position? { [1]: number, [2]: number }
---@field ped number
---@field playerId number
---@field grade number
---@field group string
---@class CriminalProfile : PartialProfileData
---@class Criminal : CriminalProfile
---@field charges SelectedCharge[]
---@field issueWarrant boolean
---@field pleadedGuilty? boolean
---@field processed? boolean
---@field warrantExpiry? string
---@field penalty { time: number, fine: number, reduction?: number }
---@class Charge
---@field label string
---@field type 'misdemeanour' | 'felony' | 'infraction'
---@field description string
---@field time number
---@field fine number
---@class SelectedCharge
---@field label string
---@field count number
---@field time number
---@field fine number
---@class Report
---@field title string
---@field id number
---@field description? string
---@field officersInvolved { name: string, callSign: string }
---@field evidence table<Evidence>
---@field criminals Criminal[]
---@class PartialReportData
---@field title string
---@field author string
---@field date string
---@field id number
---@class Evidence
---@field label string
---@field image string
---@class Announcement
---@field id number
---@field contents string
---@field createdAt string
---@field firstName string
---@field lastName string
---@field stateId string
---@alias UnitType
---| 'car'
---| 'motor'
---| 'heli'
---| 'boat'
---@alias Unit { id: number, name: string, members: Officer[], type: UnitType }
---@class Units
---@field [number] Unit
---@class CallInfo
---@field plate? string
---@field vehicle? string
---@class Call
---@field id number
---@field offense string
---@field code string
---@field completed boolean
---@field coords { [1]: number, [2]: number }
---@field blip number
---@field units Units
---@field time number
---@field location string
---@field isEmergency? boolean
---@field info { [string]: string | number }
---@class Calls
---@field [number] Call
---@class CallDataInfo
---@field plate? string
---@field vehicle? string
---@class CallData
---@field offense string
---@field code string
---@field coords table
---@field info CallDataInfo
---@field blip number
---@alias FetchOfficers { firstName: string, lastName: string, stateId: string }[]
---@alias FetchCriminals { stateId: string, firstName: string, lastName: string, reduction: number, warrantExpiry?: string, processed?: number | boolean, pleadedGuilty?: number | boolean, issueWarrant?: boolean, [string]: any }[]
---@alias FetchCharges { stateId: string, label: string, time: number?, fine: number?, count: number }[]