-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase-blueprint.json
More file actions
172 lines (172 loc) · 7.61 KB
/
Copy pathfirebase-blueprint.json
File metadata and controls
172 lines (172 loc) · 7.61 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
"entities": {
"UserProfile": {
"title": "UserProfile",
"description": "User account information and role.",
"type": "object",
"properties": {
"uid": { "type": "string" },
"displayName": { "type": "string" },
"email": { "type": "string", "format": "email" },
"photoURL": { "type": "string" },
"role": { "type": "string", "enum": ["freelancer", "client"] },
"skills": { "type": "array", "items": { "type": "string" } },
"location": { "type": "string" },
"bio": { "type": "string" },
"portfolioUrl": { "type": "string" },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["uid", "displayName", "email", "role", "createdAt"]
},
"Thread": {
"title": "Thread",
"description": "A conversation thread between a client and a freelancer.",
"type": "object",
"properties": {
"title": { "type": "string" },
"participants": { "type": "array", "items": { "type": "string" } },
"clientId": { "type": "string" },
"freelancerId": { "type": "string" },
"lastMessage": { "type": "string" },
"workPostId": { "type": "string" },
"updatedAt": { "type": "string", "format": "date-time" }
},
"required": ["title", "participants", "clientId", "freelancerId", "updatedAt"]
},
"Message": {
"title": "Message",
"description": "A single message within a thread.",
"type": "object",
"properties": {
"text": { "type": "string" },
"senderId": { "type": "string" },
"senderName": { "type": "string" },
"senderPhoto": { "type": "string" },
"seenBy": { "type": "array", "items": { "type": "string" } },
"edited": { "type": "boolean" },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["text", "senderId", "senderName", "createdAt"]
},
"Task": {
"title": "Task",
"description": "A specific task or milestone within a thread.",
"type": "object",
"properties": {
"title": { "type": "string" },
"description": { "type": "string" },
"price": { "type": "number" },
"deadline": { "type": "string" },
"status": { "type": "string", "enum": ["pending", "waiting_payment_details", "waiting_client_confirmation", "waiting_freelancer_confirmation", "in_progress", "delivered", "completed", "disputed"] },
"paymentMethod": { "type": "string" },
"freelancerPaymentDetails": { "type": "string" },
"proofUrl": { "type": "string" },
"clientId": { "type": "string" },
"freelancerId": { "type": "string" },
"threadId": { "type": "string" },
"creatorId": { "type": "string" },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["title", "description", "price", "status", "threadId", "creatorId", "clientId", "freelancerId", "createdAt"]
},
"WorkPost": {
"title": "WorkPost",
"description": "A public job posting by a client.",
"type": "object",
"properties": {
"title": { "type": "string" },
"description": { "type": "string" },
"budget": { "type": "number" },
"category": { "type": "string" },
"clientId": { "type": "string" },
"clientName": { "type": "string" },
"status": { "type": "string", "enum": ["open", "closed"] },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["title", "description", "budget", "clientId", "clientName", "status", "createdAt"]
},
"Transaction": {
"title": "Transaction",
"description": "A record of a payment between a client and a freelancer.",
"type": "object",
"properties": {
"taskId": { "type": "string" },
"amount": { "type": "number" },
"fromId": { "type": "string" },
"toId": { "type": "string" },
"status": { "type": "string" },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["taskId", "amount", "status", "fromId", "toId", "createdAt"]
},
"Dispute": {
"title": "Dispute",
"description": "A record of a payment dispute.",
"type": "object",
"properties": {
"taskId": { "type": "string" },
"threadId": { "type": "string" },
"clientId": { "type": "string" },
"freelancerId": { "type": "string" },
"proofUrl": { "type": "string" },
"status": { "type": "string", "enum": ["open", "resolved"] },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["taskId", "threadId", "clientId", "freelancerId", "status", "createdAt"]
},
"Invite": {
"title": "Invite",
"description": "A record of an invitation sent to a new user.",
"type": "object",
"properties": {
"inviterId": { "type": "string", "description": "The UID of the user who sent the invite." },
"inviteeEmail": { "type": "string", "format": "email", "description": "The email of the invited user (optional)." },
"role": { "type": "string", "enum": ["client", "freelancer"], "description": "The suggested role for the invitee." },
"status": { "type": "string", "enum": ["pending", "accepted"], "description": "The status of the invitation." },
"createdAt": { "type": "string", "format": "date-time", "description": "When the invite was generated." }
},
"required": ["inviterId", "role", "status", "createdAt"]
},
"Notification": {
"title": "Notification",
"description": "An in-app notification for the user.",
"type": "object",
"properties": {
"userId": { "type": "string" },
"title": { "type": "string" },
"message": { "type": "string" },
"type": { "type": "string", "enum": ["message", "task_status", "task_created", "payment", "delivery"] },
"link": { "type": "string" },
"read": { "type": "boolean" },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["userId", "title", "message", "type", "link", "read", "createdAt"]
},
"TimelineEvent": {
"title": "TimelineEvent",
"description": "An event in the project timeline.",
"type": "object",
"properties": {
"type": { "type": "string" },
"title": { "type": "string" },
"description": { "type": "string" },
"timestamp": { "type": "string", "format": "date-time" },
"userId": { "type": "string" },
"metadata": { "type": "object" }
},
"required": ["type", "title", "description", "timestamp", "userId"]
}
},
"firestore": {
"/users/{uid}": { "schema": "UserProfile", "description": "User profiles" },
"/users/{uid}/notifications/{notificationId}": { "schema": "Notification", "description": "User notifications" },
"/threads/{threadId}": { "schema": "Thread", "description": "Project threads" },
"/threads/{threadId}/messages/{messageId}": { "schema": "Message", "description": "Thread messages" },
"/threads/{threadId}/tasks/{taskId}": { "schema": "Task", "description": "Thread tasks" },
"/threads/{threadId}/timeline/{eventId}": { "schema": "TimelineEvent", "description": "Thread timeline events" },
"/workPosts/{postId}": { "schema": "WorkPost", "description": "Public work posts" },
"/transactions/{transactionId}": { "schema": "Transaction", "description": "Payment records" },
"/disputes/{disputeId}": { "schema": "Dispute", "description": "Dispute records" },
"/invites/{inviteId}": { "schema": "Invite", "description": "User invitation records" }
}
}