|
21 | 21 | "type": "string" |
22 | 22 | } |
23 | 23 | }, |
24 | | - "responseClass": "\\Intercom\\Resource\\Conversation", |
| 24 | + "responseClass": "Conversation", |
| 25 | + "responseType": "model", |
25 | 26 | "summary": "Creates a new conversation", |
26 | 27 | "uri": "/conversations" |
27 | 28 | }, |
| 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 | + }, |
28 | 43 | "getUserConversations": { |
29 | 44 | "httpMethod": "GET", |
30 | 45 | "parameters": { |
|
45 | 60 | "type": "string" |
46 | 61 | } |
47 | 62 | }, |
48 | | - "responseClass": "\\Intercom\\Resource\\ConversationList", |
| 63 | + "responseClass": "ConversationList", |
| 64 | + "responseType": "model", |
49 | 65 | "summary": "Gets conversations for a user", |
50 | 66 | "uri": "/conversations" |
51 | 67 | }, |
| 68 | + "getUnreadUserConversations": { |
| 69 | + "extends": "getUserConversations", |
| 70 | + "parameters": { |
| 71 | + "unread": { |
| 72 | + "default": true, |
| 73 | + "location": "query", |
| 74 | + "static": true, |
| 75 | + "required": true |
| 76 | + } |
| 77 | + } |
| 78 | + }, |
52 | 79 | "getUserConversationsByAdminID": { |
53 | 80 | "httpMethod": "GET", |
54 | 81 | "parameters": { |
|
59 | 86 | "type": "integer" |
60 | 87 | } |
61 | 88 | }, |
62 | | - "responseClass": "\\Intercom\\Resource\\ConversationList", |
| 89 | + "responseClass": "ConversationsList", |
| 90 | + "responseType": "model", |
63 | 91 | "summary": "Gets conversations for a user based on the ID of the admin the conversation is assigned to", |
64 | 92 | "uri": "/conversations" |
| 93 | + } |
| 94 | + }, |
| 95 | + "models": { |
| 96 | + "ConversationModel": { |
| 97 | + "type": "object", |
| 98 | + "location": "json" |
65 | 99 | }, |
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 | + } |
74 | 136 | } |
75 | 137 | } |
76 | 138 | } |
|
0 commit comments