Skip to content

Commit 7314a62

Browse files
committed
Swap to Guzzle model for conversation responses, add get by conversation ID
1 parent d9bf39f commit 7314a62

File tree

1 file changed

+73
-11
lines changed

1 file changed

+73
-11
lines changed

src/intercom/Service/config/intercom_v3_conversation.json

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,25 @@
2121
"type": "string"
2222
}
2323
},
24-
"responseClass": "\\Intercom\\Resource\\Conversation",
24+
"responseClass": "Conversation",
25+
"responseType": "model",
2526
"summary": "Creates a new conversation",
2627
"uri": "/conversations"
2728
},
29+
"getConversationByID": {
30+
"httpMethod": "GET",
31+
"parameters": {
32+
"id": {
33+
"location": "uri",
34+
"required": true,
35+
"type": "integer"
36+
}
37+
},
38+
"responseClass": "ConversationPartList",
39+
"responseType": "model",
40+
"summary": "Gets a conversation by ID",
41+
"uri": "/conversations/{id}"
42+
},
2843
"getUserConversations": {
2944
"httpMethod": "GET",
3045
"parameters": {
@@ -45,10 +60,22 @@
4560
"type": "string"
4661
}
4762
},
48-
"responseClass": "\\Intercom\\Resource\\ConversationList",
63+
"responseClass": "ConversationList",
64+
"responseType": "model",
4965
"summary": "Gets conversations for a user",
5066
"uri": "/conversations"
5167
},
68+
"getUnreadUserConversations": {
69+
"extends": "getUserConversations",
70+
"parameters": {
71+
"unread": {
72+
"default": true,
73+
"location": "query",
74+
"static": true,
75+
"required": true
76+
}
77+
}
78+
},
5279
"getUserConversationsByAdminID": {
5380
"httpMethod": "GET",
5481
"parameters": {
@@ -59,18 +86,53 @@
5986
"type": "integer"
6087
}
6188
},
62-
"responseClass": "\\Intercom\\Resource\\ConversationList",
89+
"responseClass": "ConversationsList",
90+
"responseType": "model",
6391
"summary": "Gets conversations for a user based on the ID of the admin the conversation is assigned to",
6492
"uri": "/conversations"
93+
}
94+
},
95+
"models": {
96+
"ConversationModel": {
97+
"type": "object",
98+
"location": "json"
6599
},
66-
"getUnreadUserConversations": {
67-
"extends": "getUserConversations",
68-
"parameters": {
69-
"unread": {
70-
"default": true,
71-
"location": "query",
72-
"static": true,
73-
"required": true
100+
"ConversationListModel": {
101+
"type": "object",
102+
"properties": {
103+
"conversations": {
104+
"type": "array",
105+
"location": "json",
106+
"items": {
107+
"$ref": "ConversationModel"
108+
}
109+
}
110+
}
111+
},
112+
"ConversationPartModel": {
113+
"type": "object",
114+
"location": "json",
115+
"properties": {
116+
"author": {
117+
"type": "object"
118+
},
119+
"body": {
120+
"type": "string"
121+
},
122+
"created_at": {
123+
"type": "integer"
124+
}
125+
}
126+
},
127+
"ConversationPartListModel": {
128+
"type": "object",
129+
"properties": {
130+
"parts": {
131+
"type": "array",
132+
"location": "json",
133+
"items": {
134+
"$ref": "ConversationPartModel"
135+
}
74136
}
75137
}
76138
}

0 commit comments

Comments
 (0)