purecloud-platform-client-v2 175.0.0 → 177.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/node/purecloud-platform-client-v2.js +714 -75
- package/dist/web-amd/purecloud-platform-client-v2.js +714 -75
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +714 -75
- package/dist/web-cjs/purecloud-platform-client-v2.js +714 -75
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +380 -213
- package/package.json +1 -1
- package/src/purecloud-platform-client-v2/ApiClient.js +1 -1
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +36 -1
- package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CarrierServicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +605 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmailsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +3 -3
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SettingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TaskManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TeamsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/index.js +1 -1
|
@@ -5,7 +5,7 @@ class ChatApi {
|
|
|
5
5
|
/**
|
|
6
6
|
* Chat service.
|
|
7
7
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
8
|
-
* @version
|
|
8
|
+
* @version 177.0.0
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -20,6 +20,130 @@ class ChatApi {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Delete a message in a room
|
|
25
|
+
*
|
|
26
|
+
* @param {String} roomJid roomId
|
|
27
|
+
* @param {String} messageId messageId
|
|
28
|
+
* deleteChatsRoomMessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
29
|
+
*/
|
|
30
|
+
deleteChatsRoomMessage(roomJid, messageId) {
|
|
31
|
+
// verify the required parameter 'roomJid' is set
|
|
32
|
+
if (roomJid === undefined || roomJid === null) {
|
|
33
|
+
throw 'Missing the required parameter "roomJid" when calling deleteChatsRoomMessage';
|
|
34
|
+
}
|
|
35
|
+
// verify the required parameter 'messageId' is set
|
|
36
|
+
if (messageId === undefined || messageId === null) {
|
|
37
|
+
throw 'Missing the required parameter "messageId" when calling deleteChatsRoomMessage';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return this.apiClient.callApi(
|
|
41
|
+
'/api/v2/chats/rooms/{roomJid}/messages/{messageId}',
|
|
42
|
+
'DELETE',
|
|
43
|
+
{ 'roomJid': roomJid,'messageId': messageId },
|
|
44
|
+
{ },
|
|
45
|
+
{ },
|
|
46
|
+
{ },
|
|
47
|
+
null,
|
|
48
|
+
['PureCloud OAuth'],
|
|
49
|
+
['application/json'],
|
|
50
|
+
['application/json']
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Remove a user from a room.
|
|
56
|
+
*
|
|
57
|
+
* @param {String} roomJid roomJid
|
|
58
|
+
* @param {String} userId userId
|
|
59
|
+
* deleteChatsRoomParticipant is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
60
|
+
*/
|
|
61
|
+
deleteChatsRoomParticipant(roomJid, userId) {
|
|
62
|
+
// verify the required parameter 'roomJid' is set
|
|
63
|
+
if (roomJid === undefined || roomJid === null) {
|
|
64
|
+
throw 'Missing the required parameter "roomJid" when calling deleteChatsRoomParticipant';
|
|
65
|
+
}
|
|
66
|
+
// verify the required parameter 'userId' is set
|
|
67
|
+
if (userId === undefined || userId === null) {
|
|
68
|
+
throw 'Missing the required parameter "userId" when calling deleteChatsRoomParticipant';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return this.apiClient.callApi(
|
|
72
|
+
'/api/v2/chats/rooms/{roomJid}/participants/{userId}',
|
|
73
|
+
'DELETE',
|
|
74
|
+
{ 'roomJid': roomJid,'userId': userId },
|
|
75
|
+
{ },
|
|
76
|
+
{ },
|
|
77
|
+
{ },
|
|
78
|
+
null,
|
|
79
|
+
['PureCloud OAuth'],
|
|
80
|
+
['application/json'],
|
|
81
|
+
['application/json']
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Remove a pinned message from a room
|
|
87
|
+
*
|
|
88
|
+
* @param {String} roomJid roomJid
|
|
89
|
+
* @param {String} pinnedMessageId pinnedMessageId
|
|
90
|
+
* deleteChatsRoomPinnedmessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
91
|
+
*/
|
|
92
|
+
deleteChatsRoomPinnedmessage(roomJid, pinnedMessageId) {
|
|
93
|
+
// verify the required parameter 'roomJid' is set
|
|
94
|
+
if (roomJid === undefined || roomJid === null) {
|
|
95
|
+
throw 'Missing the required parameter "roomJid" when calling deleteChatsRoomPinnedmessage';
|
|
96
|
+
}
|
|
97
|
+
// verify the required parameter 'pinnedMessageId' is set
|
|
98
|
+
if (pinnedMessageId === undefined || pinnedMessageId === null) {
|
|
99
|
+
throw 'Missing the required parameter "pinnedMessageId" when calling deleteChatsRoomPinnedmessage';
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return this.apiClient.callApi(
|
|
103
|
+
'/api/v2/chats/rooms/{roomJid}/pinnedmessages/{pinnedMessageId}',
|
|
104
|
+
'DELETE',
|
|
105
|
+
{ 'roomJid': roomJid,'pinnedMessageId': pinnedMessageId },
|
|
106
|
+
{ },
|
|
107
|
+
{ },
|
|
108
|
+
{ },
|
|
109
|
+
null,
|
|
110
|
+
['PureCloud OAuth'],
|
|
111
|
+
['application/json'],
|
|
112
|
+
['application/json']
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Delete a message to a user
|
|
118
|
+
*
|
|
119
|
+
* @param {String} userId userId
|
|
120
|
+
* @param {String} messageId messageId
|
|
121
|
+
* deleteChatsUserMessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
122
|
+
*/
|
|
123
|
+
deleteChatsUserMessage(userId, messageId) {
|
|
124
|
+
// verify the required parameter 'userId' is set
|
|
125
|
+
if (userId === undefined || userId === null) {
|
|
126
|
+
throw 'Missing the required parameter "userId" when calling deleteChatsUserMessage';
|
|
127
|
+
}
|
|
128
|
+
// verify the required parameter 'messageId' is set
|
|
129
|
+
if (messageId === undefined || messageId === null) {
|
|
130
|
+
throw 'Missing the required parameter "messageId" when calling deleteChatsUserMessage';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return this.apiClient.callApi(
|
|
134
|
+
'/api/v2/chats/users/{userId}/messages/{messageId}',
|
|
135
|
+
'DELETE',
|
|
136
|
+
{ 'userId': userId,'messageId': messageId },
|
|
137
|
+
{ },
|
|
138
|
+
{ },
|
|
139
|
+
{ },
|
|
140
|
+
null,
|
|
141
|
+
['PureCloud OAuth'],
|
|
142
|
+
['application/json'],
|
|
143
|
+
['application/json']
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
23
147
|
/**
|
|
24
148
|
* Get Chat Settings.
|
|
25
149
|
* This route is deprecated, please use /chats/settings instead
|
|
@@ -41,6 +165,127 @@ class ChatApi {
|
|
|
41
165
|
);
|
|
42
166
|
}
|
|
43
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Get a message
|
|
170
|
+
*
|
|
171
|
+
* @param {String} messageId messageId
|
|
172
|
+
* getChatsMessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
173
|
+
*/
|
|
174
|
+
getChatsMessage(messageId) {
|
|
175
|
+
// verify the required parameter 'messageId' is set
|
|
176
|
+
if (messageId === undefined || messageId === null) {
|
|
177
|
+
throw 'Missing the required parameter "messageId" when calling getChatsMessage';
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return this.apiClient.callApi(
|
|
181
|
+
'/api/v2/chats/messages/{messageId}',
|
|
182
|
+
'GET',
|
|
183
|
+
{ 'messageId': messageId },
|
|
184
|
+
{ },
|
|
185
|
+
{ },
|
|
186
|
+
{ },
|
|
187
|
+
null,
|
|
188
|
+
['PureCloud OAuth'],
|
|
189
|
+
['application/json'],
|
|
190
|
+
['application/json']
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Get a room
|
|
196
|
+
*
|
|
197
|
+
* @param {String} roomJid roomJid
|
|
198
|
+
* getChatsRoom is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
199
|
+
*/
|
|
200
|
+
getChatsRoom(roomJid) {
|
|
201
|
+
// verify the required parameter 'roomJid' is set
|
|
202
|
+
if (roomJid === undefined || roomJid === null) {
|
|
203
|
+
throw 'Missing the required parameter "roomJid" when calling getChatsRoom';
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return this.apiClient.callApi(
|
|
207
|
+
'/api/v2/chats/rooms/{roomJid}',
|
|
208
|
+
'GET',
|
|
209
|
+
{ 'roomJid': roomJid },
|
|
210
|
+
{ },
|
|
211
|
+
{ },
|
|
212
|
+
{ },
|
|
213
|
+
null,
|
|
214
|
+
['PureCloud OAuth'],
|
|
215
|
+
['application/json'],
|
|
216
|
+
['application/json']
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Get messages by id(s) from a room
|
|
222
|
+
*
|
|
223
|
+
* @param {String} roomJid roomJid
|
|
224
|
+
* @param {String} messageIds messageIds, comma separated
|
|
225
|
+
* getChatsRoomMessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
226
|
+
*/
|
|
227
|
+
getChatsRoomMessage(roomJid, messageIds) {
|
|
228
|
+
// verify the required parameter 'roomJid' is set
|
|
229
|
+
if (roomJid === undefined || roomJid === null) {
|
|
230
|
+
throw 'Missing the required parameter "roomJid" when calling getChatsRoomMessage';
|
|
231
|
+
}
|
|
232
|
+
// verify the required parameter 'messageIds' is set
|
|
233
|
+
if (messageIds === undefined || messageIds === null) {
|
|
234
|
+
throw 'Missing the required parameter "messageIds" when calling getChatsRoomMessage';
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return this.apiClient.callApi(
|
|
238
|
+
'/api/v2/chats/rooms/{roomJid}/messages/{messageIds}',
|
|
239
|
+
'GET',
|
|
240
|
+
{ 'roomJid': roomJid,'messageIds': messageIds },
|
|
241
|
+
{ },
|
|
242
|
+
{ },
|
|
243
|
+
{ },
|
|
244
|
+
null,
|
|
245
|
+
['PureCloud OAuth'],
|
|
246
|
+
['application/json'],
|
|
247
|
+
['application/json']
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Get a room's message history
|
|
253
|
+
*
|
|
254
|
+
* @param {String} roomJid roomJid
|
|
255
|
+
* @param {Object} opts Optional parameters
|
|
256
|
+
* @param {Number} opts.pageSize The total page size requested (default to 25)
|
|
257
|
+
* @param {Number} opts.pageNumber The page number requested (default to 1)
|
|
258
|
+
* @param {String} opts.sortBy variable name requested to sort by
|
|
259
|
+
* @param {Array.<String>} opts.expand variable name requested by expand list
|
|
260
|
+
* @param {String} opts.nextPage next page token
|
|
261
|
+
* @param {String} opts.previousPage Previous page token
|
|
262
|
+
* @param {String} opts.limit The maximum number of messages to retrieve
|
|
263
|
+
* @param {String} opts.before The cutoff date for messages to retrieve
|
|
264
|
+
* @param {String} opts.after The beginning date for messages to retrieve
|
|
265
|
+
* getChatsRoomMessages is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
266
|
+
*/
|
|
267
|
+
getChatsRoomMessages(roomJid, opts) {
|
|
268
|
+
opts = opts || {};
|
|
269
|
+
|
|
270
|
+
// verify the required parameter 'roomJid' is set
|
|
271
|
+
if (roomJid === undefined || roomJid === null) {
|
|
272
|
+
throw 'Missing the required parameter "roomJid" when calling getChatsRoomMessages';
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return this.apiClient.callApi(
|
|
276
|
+
'/api/v2/chats/rooms/{roomJid}/messages',
|
|
277
|
+
'GET',
|
|
278
|
+
{ 'roomJid': roomJid },
|
|
279
|
+
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'limit': opts['limit'],'before': opts['before'],'after': opts['after'] },
|
|
280
|
+
{ },
|
|
281
|
+
{ },
|
|
282
|
+
null,
|
|
283
|
+
['PureCloud OAuth'],
|
|
284
|
+
['application/json'],
|
|
285
|
+
['application/json']
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
44
289
|
/**
|
|
45
290
|
* Get Chat Settings.
|
|
46
291
|
*
|
|
@@ -61,6 +306,113 @@ class ChatApi {
|
|
|
61
306
|
);
|
|
62
307
|
}
|
|
63
308
|
|
|
309
|
+
/**
|
|
310
|
+
* Get history by thread
|
|
311
|
+
*
|
|
312
|
+
* @param {String} threadId threadId
|
|
313
|
+
* @param {Object} opts Optional parameters
|
|
314
|
+
* @param {Number} opts.pageSize The total page size requested (default to 25)
|
|
315
|
+
* @param {Number} opts.pageNumber The page number requested (default to 1)
|
|
316
|
+
* @param {String} opts.sortBy variable name requested to sort by
|
|
317
|
+
* @param {Array.<String>} opts.expand variable name requested by expand list
|
|
318
|
+
* @param {String} opts.nextPage next page token
|
|
319
|
+
* @param {String} opts.previousPage Previous page token
|
|
320
|
+
* @param {String} opts.limit The maximum number of messages to retrieve
|
|
321
|
+
* @param {String} opts.before The cutoff date for messages to retrieve
|
|
322
|
+
* @param {String} opts.after The beginning date for messages to retrieve
|
|
323
|
+
* getChatsThreadMessages is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
324
|
+
*/
|
|
325
|
+
getChatsThreadMessages(threadId, opts) {
|
|
326
|
+
opts = opts || {};
|
|
327
|
+
|
|
328
|
+
// verify the required parameter 'threadId' is set
|
|
329
|
+
if (threadId === undefined || threadId === null) {
|
|
330
|
+
throw 'Missing the required parameter "threadId" when calling getChatsThreadMessages';
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return this.apiClient.callApi(
|
|
334
|
+
'/api/v2/chats/threads/{threadId}/messages',
|
|
335
|
+
'GET',
|
|
336
|
+
{ 'threadId': threadId },
|
|
337
|
+
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'limit': opts['limit'],'before': opts['before'],'after': opts['after'] },
|
|
338
|
+
{ },
|
|
339
|
+
{ },
|
|
340
|
+
null,
|
|
341
|
+
['PureCloud OAuth'],
|
|
342
|
+
['application/json'],
|
|
343
|
+
['application/json']
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Get messages by id(s) from a 1on1
|
|
349
|
+
*
|
|
350
|
+
* @param {String} userId userId
|
|
351
|
+
* @param {String} messageIds messageIds, comma separated
|
|
352
|
+
* getChatsUserMessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
353
|
+
*/
|
|
354
|
+
getChatsUserMessage(userId, messageIds) {
|
|
355
|
+
// verify the required parameter 'userId' is set
|
|
356
|
+
if (userId === undefined || userId === null) {
|
|
357
|
+
throw 'Missing the required parameter "userId" when calling getChatsUserMessage';
|
|
358
|
+
}
|
|
359
|
+
// verify the required parameter 'messageIds' is set
|
|
360
|
+
if (messageIds === undefined || messageIds === null) {
|
|
361
|
+
throw 'Missing the required parameter "messageIds" when calling getChatsUserMessage';
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return this.apiClient.callApi(
|
|
365
|
+
'/api/v2/chats/users/{userId}/messages/{messageIds}',
|
|
366
|
+
'GET',
|
|
367
|
+
{ 'userId': userId,'messageIds': messageIds },
|
|
368
|
+
{ },
|
|
369
|
+
{ },
|
|
370
|
+
{ },
|
|
371
|
+
null,
|
|
372
|
+
['PureCloud OAuth'],
|
|
373
|
+
['application/json'],
|
|
374
|
+
['application/json']
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Get 1on1 History between a user
|
|
380
|
+
*
|
|
381
|
+
* @param {String} userId userId
|
|
382
|
+
* @param {Object} opts Optional parameters
|
|
383
|
+
* @param {Number} opts.pageSize The total page size requested (default to 25)
|
|
384
|
+
* @param {Number} opts.pageNumber The page number requested (default to 1)
|
|
385
|
+
* @param {String} opts.sortBy variable name requested to sort by
|
|
386
|
+
* @param {Array.<String>} opts.expand variable name requested by expand list
|
|
387
|
+
* @param {String} opts.nextPage next page token
|
|
388
|
+
* @param {String} opts.previousPage Previous page token
|
|
389
|
+
* @param {String} opts.limit The maximum number of messages to retrieve
|
|
390
|
+
* @param {String} opts.before The cutoff date for messages to retrieve
|
|
391
|
+
* @param {String} opts.after The beginning date for messages to retrieve
|
|
392
|
+
* getChatsUserMessages is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
393
|
+
*/
|
|
394
|
+
getChatsUserMessages(userId, opts) {
|
|
395
|
+
opts = opts || {};
|
|
396
|
+
|
|
397
|
+
// verify the required parameter 'userId' is set
|
|
398
|
+
if (userId === undefined || userId === null) {
|
|
399
|
+
throw 'Missing the required parameter "userId" when calling getChatsUserMessages';
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
return this.apiClient.callApi(
|
|
403
|
+
'/api/v2/chats/users/{userId}/messages',
|
|
404
|
+
'GET',
|
|
405
|
+
{ 'userId': userId },
|
|
406
|
+
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'limit': opts['limit'],'before': opts['before'],'after': opts['after'] },
|
|
407
|
+
{ },
|
|
408
|
+
{ },
|
|
409
|
+
null,
|
|
410
|
+
['PureCloud OAuth'],
|
|
411
|
+
['application/json'],
|
|
412
|
+
['application/json']
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
64
416
|
/**
|
|
65
417
|
* Patch Chat Settings.
|
|
66
418
|
* This route is deprecated, please use /chats/settings instead
|
|
@@ -87,6 +439,73 @@ class ChatApi {
|
|
|
87
439
|
);
|
|
88
440
|
}
|
|
89
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Set properties for a room
|
|
444
|
+
*
|
|
445
|
+
* @param {String} roomJid roomJid
|
|
446
|
+
* @param {Object} body Room properties
|
|
447
|
+
* patchChatsRoom is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
448
|
+
*/
|
|
449
|
+
patchChatsRoom(roomJid, body) {
|
|
450
|
+
// verify the required parameter 'roomJid' is set
|
|
451
|
+
if (roomJid === undefined || roomJid === null) {
|
|
452
|
+
throw 'Missing the required parameter "roomJid" when calling patchChatsRoom';
|
|
453
|
+
}
|
|
454
|
+
// verify the required parameter 'body' is set
|
|
455
|
+
if (body === undefined || body === null) {
|
|
456
|
+
throw 'Missing the required parameter "body" when calling patchChatsRoom';
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
return this.apiClient.callApi(
|
|
460
|
+
'/api/v2/chats/rooms/{roomJid}',
|
|
461
|
+
'PATCH',
|
|
462
|
+
{ 'roomJid': roomJid },
|
|
463
|
+
{ },
|
|
464
|
+
{ },
|
|
465
|
+
{ },
|
|
466
|
+
body,
|
|
467
|
+
['PureCloud OAuth'],
|
|
468
|
+
['application/json'],
|
|
469
|
+
['application/json']
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Edit a message in a room
|
|
475
|
+
*
|
|
476
|
+
* @param {String} roomJid roomId
|
|
477
|
+
* @param {String} messageId messageId
|
|
478
|
+
* @param {Object} body messageBody
|
|
479
|
+
* patchChatsRoomMessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
480
|
+
*/
|
|
481
|
+
patchChatsRoomMessage(roomJid, messageId, body) {
|
|
482
|
+
// verify the required parameter 'roomJid' is set
|
|
483
|
+
if (roomJid === undefined || roomJid === null) {
|
|
484
|
+
throw 'Missing the required parameter "roomJid" when calling patchChatsRoomMessage';
|
|
485
|
+
}
|
|
486
|
+
// verify the required parameter 'messageId' is set
|
|
487
|
+
if (messageId === undefined || messageId === null) {
|
|
488
|
+
throw 'Missing the required parameter "messageId" when calling patchChatsRoomMessage';
|
|
489
|
+
}
|
|
490
|
+
// verify the required parameter 'body' is set
|
|
491
|
+
if (body === undefined || body === null) {
|
|
492
|
+
throw 'Missing the required parameter "body" when calling patchChatsRoomMessage';
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
return this.apiClient.callApi(
|
|
496
|
+
'/api/v2/chats/rooms/{roomJid}/messages/{messageId}',
|
|
497
|
+
'PATCH',
|
|
498
|
+
{ 'roomJid': roomJid,'messageId': messageId },
|
|
499
|
+
{ },
|
|
500
|
+
{ },
|
|
501
|
+
{ },
|
|
502
|
+
body,
|
|
503
|
+
['PureCloud OAuth'],
|
|
504
|
+
['application/json'],
|
|
505
|
+
['application/json']
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
|
|
90
509
|
/**
|
|
91
510
|
* Patch Chat Settings.
|
|
92
511
|
*
|
|
@@ -112,6 +531,191 @@ class ChatApi {
|
|
|
112
531
|
);
|
|
113
532
|
}
|
|
114
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Edit a message to a user
|
|
536
|
+
*
|
|
537
|
+
* @param {String} userId userId
|
|
538
|
+
* @param {String} messageId messageId
|
|
539
|
+
* @param {Object} body message body
|
|
540
|
+
* patchChatsUserMessage is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
541
|
+
*/
|
|
542
|
+
patchChatsUserMessage(userId, messageId, body) {
|
|
543
|
+
// verify the required parameter 'userId' is set
|
|
544
|
+
if (userId === undefined || userId === null) {
|
|
545
|
+
throw 'Missing the required parameter "userId" when calling patchChatsUserMessage';
|
|
546
|
+
}
|
|
547
|
+
// verify the required parameter 'messageId' is set
|
|
548
|
+
if (messageId === undefined || messageId === null) {
|
|
549
|
+
throw 'Missing the required parameter "messageId" when calling patchChatsUserMessage';
|
|
550
|
+
}
|
|
551
|
+
// verify the required parameter 'body' is set
|
|
552
|
+
if (body === undefined || body === null) {
|
|
553
|
+
throw 'Missing the required parameter "body" when calling patchChatsUserMessage';
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
return this.apiClient.callApi(
|
|
557
|
+
'/api/v2/chats/users/{userId}/messages/{messageId}',
|
|
558
|
+
'PATCH',
|
|
559
|
+
{ 'userId': userId,'messageId': messageId },
|
|
560
|
+
{ },
|
|
561
|
+
{ },
|
|
562
|
+
{ },
|
|
563
|
+
body,
|
|
564
|
+
['PureCloud OAuth'],
|
|
565
|
+
['application/json'],
|
|
566
|
+
['application/json']
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Send a message to a room
|
|
572
|
+
*
|
|
573
|
+
* @param {String} roomJid roomId
|
|
574
|
+
* @param {Object} body messageBody
|
|
575
|
+
* postChatsRoomMessages is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
576
|
+
*/
|
|
577
|
+
postChatsRoomMessages(roomJid, body) {
|
|
578
|
+
// verify the required parameter 'roomJid' is set
|
|
579
|
+
if (roomJid === undefined || roomJid === null) {
|
|
580
|
+
throw 'Missing the required parameter "roomJid" when calling postChatsRoomMessages';
|
|
581
|
+
}
|
|
582
|
+
// verify the required parameter 'body' is set
|
|
583
|
+
if (body === undefined || body === null) {
|
|
584
|
+
throw 'Missing the required parameter "body" when calling postChatsRoomMessages';
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
return this.apiClient.callApi(
|
|
588
|
+
'/api/v2/chats/rooms/{roomJid}/messages',
|
|
589
|
+
'POST',
|
|
590
|
+
{ 'roomJid': roomJid },
|
|
591
|
+
{ },
|
|
592
|
+
{ },
|
|
593
|
+
{ },
|
|
594
|
+
body,
|
|
595
|
+
['PureCloud OAuth'],
|
|
596
|
+
['application/json'],
|
|
597
|
+
['application/json']
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Join a room
|
|
603
|
+
*
|
|
604
|
+
* @param {String} roomJid roomJid
|
|
605
|
+
* @param {String} userId userId
|
|
606
|
+
* postChatsRoomParticipant is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
607
|
+
*/
|
|
608
|
+
postChatsRoomParticipant(roomJid, userId) {
|
|
609
|
+
// verify the required parameter 'roomJid' is set
|
|
610
|
+
if (roomJid === undefined || roomJid === null) {
|
|
611
|
+
throw 'Missing the required parameter "roomJid" when calling postChatsRoomParticipant';
|
|
612
|
+
}
|
|
613
|
+
// verify the required parameter 'userId' is set
|
|
614
|
+
if (userId === undefined || userId === null) {
|
|
615
|
+
throw 'Missing the required parameter "userId" when calling postChatsRoomParticipant';
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
return this.apiClient.callApi(
|
|
619
|
+
'/api/v2/chats/rooms/{roomJid}/participants/{userId}',
|
|
620
|
+
'POST',
|
|
621
|
+
{ 'roomJid': roomJid,'userId': userId },
|
|
622
|
+
{ },
|
|
623
|
+
{ },
|
|
624
|
+
{ },
|
|
625
|
+
null,
|
|
626
|
+
['PureCloud OAuth'],
|
|
627
|
+
['application/json'],
|
|
628
|
+
['application/json']
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Add pinned messages for a room, up to a maximum of 5 pinned messages
|
|
634
|
+
*
|
|
635
|
+
* @param {String} roomJid roomJid
|
|
636
|
+
* @param {Object} body Pinned Message Ids
|
|
637
|
+
* postChatsRoomPinnedmessages is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
638
|
+
*/
|
|
639
|
+
postChatsRoomPinnedmessages(roomJid, body) {
|
|
640
|
+
// verify the required parameter 'roomJid' is set
|
|
641
|
+
if (roomJid === undefined || roomJid === null) {
|
|
642
|
+
throw 'Missing the required parameter "roomJid" when calling postChatsRoomPinnedmessages';
|
|
643
|
+
}
|
|
644
|
+
// verify the required parameter 'body' is set
|
|
645
|
+
if (body === undefined || body === null) {
|
|
646
|
+
throw 'Missing the required parameter "body" when calling postChatsRoomPinnedmessages';
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return this.apiClient.callApi(
|
|
650
|
+
'/api/v2/chats/rooms/{roomJid}/pinnedmessages',
|
|
651
|
+
'POST',
|
|
652
|
+
{ 'roomJid': roomJid },
|
|
653
|
+
{ },
|
|
654
|
+
{ },
|
|
655
|
+
{ },
|
|
656
|
+
body,
|
|
657
|
+
['PureCloud OAuth'],
|
|
658
|
+
['application/json'],
|
|
659
|
+
['application/json']
|
|
660
|
+
);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* Create an adhoc room
|
|
665
|
+
*
|
|
666
|
+
* @param {Object} opts Optional parameters
|
|
667
|
+
* @param {Object} opts.body Room properties
|
|
668
|
+
* postChatsRooms is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
669
|
+
*/
|
|
670
|
+
postChatsRooms(opts) {
|
|
671
|
+
opts = opts || {};
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
return this.apiClient.callApi(
|
|
675
|
+
'/api/v2/chats/rooms',
|
|
676
|
+
'POST',
|
|
677
|
+
{ },
|
|
678
|
+
{ },
|
|
679
|
+
{ },
|
|
680
|
+
{ },
|
|
681
|
+
opts['body'],
|
|
682
|
+
['PureCloud OAuth'],
|
|
683
|
+
['application/json'],
|
|
684
|
+
['application/json']
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Send a message to a user
|
|
690
|
+
*
|
|
691
|
+
* @param {String} userId userId
|
|
692
|
+
* @param {Object} body message body
|
|
693
|
+
* postChatsUserMessages is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
694
|
+
*/
|
|
695
|
+
postChatsUserMessages(userId, body) {
|
|
696
|
+
// verify the required parameter 'userId' is set
|
|
697
|
+
if (userId === undefined || userId === null) {
|
|
698
|
+
throw 'Missing the required parameter "userId" when calling postChatsUserMessages';
|
|
699
|
+
}
|
|
700
|
+
// verify the required parameter 'body' is set
|
|
701
|
+
if (body === undefined || body === null) {
|
|
702
|
+
throw 'Missing the required parameter "body" when calling postChatsUserMessages';
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
return this.apiClient.callApi(
|
|
706
|
+
'/api/v2/chats/users/{userId}/messages',
|
|
707
|
+
'POST',
|
|
708
|
+
{ 'userId': userId },
|
|
709
|
+
{ },
|
|
710
|
+
{ },
|
|
711
|
+
{ },
|
|
712
|
+
body,
|
|
713
|
+
['PureCloud OAuth'],
|
|
714
|
+
['application/json'],
|
|
715
|
+
['application/json']
|
|
716
|
+
);
|
|
717
|
+
}
|
|
718
|
+
|
|
115
719
|
/**
|
|
116
720
|
* Update Chat Settings.
|
|
117
721
|
* This route is deprecated, please use /chats/settings instead
|