Skip to content

Commit 7543a48

Browse files
facebook conversation service
1 parent 9420505 commit 7543a48

File tree

5 files changed

+81
-3
lines changed

5 files changed

+81
-3
lines changed

blueprints/examples/facebook/main.app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"message":"globa.models.comunication.chat.feed.message"
77
},
88
"services": {
9-
"questions":"service.questions"
9+
"questions":"service.chat"
1010
}
1111
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"endpoints":{
3+
"create conversation":{
4+
"request":{
5+
"conversation" : {
6+
"type": "conversation.create"
7+
}
8+
},
9+
"response":{
10+
"conversation" : {"type": "conversation.list"}
11+
}
12+
},
13+
"list user conversations":{
14+
"request":{
15+
"__extends":{
16+
"from":"global.models.pagination.request",
17+
"include":["page", "page_size"]
18+
},
19+
"user" : {"type": "user.attributes.id"}
20+
},
21+
"response":{
22+
"__extends":{
23+
"from":"global.models.pagination.response",
24+
"include":["total_count", "page_count"]
25+
},
26+
"conversations" : {"many": true, "type": "conversation.list"}
27+
}
28+
},
29+
"get conversation":{
30+
"request":{
31+
"id" : {"type": "conversation.attributes.id"}
32+
},
33+
"response":{
34+
"conversation" : {"type": "conversation.get"}
35+
}
36+
}
37+
38+
}
39+
}

blueprints/global/models/comunication/chat/feed/feed.models.json renamed to blueprints/global/models/comunication/chat/feed/feed.model.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{
2+
"__constructor":{
3+
"user":{
4+
"description":"user to be used"
5+
}
6+
},
27
"attributes":{
38
"id": {"type":"id"},
4-
"reactions":{"many":true, "type":"reaction", "required":true}
9+
"reactions":{"many":true, "type":"reaction", "required":true, "user":"__user"}
510
},
611
"create":{
712
"__extends":{

blueprints/global/models/comunication/chat/feed/message.model.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
2+
"__constructor":{
3+
"user":{
4+
"description":"user to be used"
5+
}
6+
},
27
"attributes":{
3-
"feed":{"type":"feed", "required":true}
8+
"feed":{"type":"feed", "required":true, "user":"__user"}
49
},
510
"__extends":{
611
"from":"global.models.comunication.chat.message"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"__constructor":{
3+
"user":{
4+
"description":"user to be used"
5+
}
6+
},
7+
"attributes":{
8+
"id": {"type":"id"},
9+
"type":{"many":true, "type":"str", "required":true},
10+
"owner":{"type":"__user", "required":true}
11+
},
12+
"create":{
13+
"__extends":{
14+
"from":"attributes",
15+
"__excludes":["id"]
16+
}
17+
},
18+
"list":{
19+
"__extends":{
20+
"from":"attributes"
21+
}
22+
},
23+
"get":{
24+
"__extends":{
25+
"from":"create",
26+
"__excludes":[ "id"]
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)