-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase-blueprint.json
More file actions
112 lines (112 loc) · 3.5 KB
/
Copy pathfirebase-blueprint.json
File metadata and controls
112 lines (112 loc) · 3.5 KB
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
{
"entities": {
"Transformer": {
"title": "Transformer",
"description": "Information about an electrical transformer",
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"serialNumber": { "type": "string" },
"phoneNumber": { "type": "string" },
"ownerId": { "type": "string" },
"registrationLocation": { "$ref": "#/entities/Location" },
"currentLocation": {
"type": "object",
"properties": {
"latitude": { "type": "number" },
"longitude": { "type": "number" },
"lastUpdated": { "type": "string" }
}
},
"safeRadius": { "type": "number" },
"status": { "type": "string", "enum": ["GREEN", "ORANGE", "RED", "UNKNOWN", "DRAFT"] },
"riskRating": { "type": "number" },
"riskAnalysis": { "type": "string" },
"realTimeHint": { "type": "string" },
"alertPhoneNumbers": { "type": "array", "items": { "type": "string" } },
"maintenanceSchedule": {
"type": "object",
"properties": {
"lastMaintenance": { "type": "string" },
"nextMaintenance": { "type": "string" },
"notes": { "type": "string" }
}
},
"simSwapHistory": {
"type": "object",
"properties": {
"lastSwapped": { "type": "string" },
"isFraudPotential": { "type": "boolean" }
}
}
},
"required": ["id", "name", "serialNumber", "phoneNumber", "registrationLocation", "status", "ownerId"]
},
"Location": {
"title": "Location",
"type": "object",
"properties": {
"latitude": { "type": "number" },
"longitude": { "type": "number" }
}
},
"Alert": {
"title": "Alert",
"type": "object",
"properties": {
"id": { "type": "string" },
"transformerId": { "type": "string" },
"transformerName": { "type": "string" },
"type": { "type": "string" },
"message": { "type": "string" },
"severity": { "type": "string" },
"createdAt": { "type": "string" },
"isRead": { "type": "boolean" }
}
},
"Billing": {
"title": "Billing",
"type": "object",
"properties": {
"currentPlan": { "type": "string" },
"status": { "type": "string" },
"periodStart": { "type": "string" },
"periodEnd": { "type": "string" },
"cancelAtPeriodEnd": { "type": "boolean" },
"upcomingPlan": { "type": "string" }
}
},
"Payment": {
"title": "Payment",
"type": "object",
"properties": {
"id": { "type": "string" },
"amount": { "type": "number" },
"date": { "type": "string" },
"status": { "type": "string" },
"plan": { "type": "string" },
"description": { "type": "string" },
"userId": { "type": "string" }
}
}
},
"firestore": {
"/transformers/{transformerId}": {
"schema": "Transformer",
"description": "User-owned transformer monitoring points. Strictly isolated by ownerId."
},
"/alerts/{alertId}": {
"schema": "Alert",
"description": "System alerts and notifications. Strictly isolated by ownerId."
},
"/billing/{userId}": {
"schema": "Billing",
"description": "User subscription status"
},
"/payments/{paymentId}": {
"schema": "Payment",
"description": "Payment history"
}
}
}