crisp-api 7.3.0 → 7.4.1
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/CHANGELOG.md +16 -0
- package/lib/crisp.js +153 -36
- package/lib/resources/BucketURL.js +3 -1
- package/lib/resources/MediaAnimation.js +5 -1
- package/lib/resources/PluginConnect.js +11 -4
- package/lib/resources/PluginSubscription.js +41 -10
- package/lib/resources/WebsiteAnalytics.js +28 -4
- package/lib/resources/WebsiteAvailability.js +6 -2
- package/lib/resources/WebsiteBase.js +13 -4
- package/lib/resources/WebsiteBatch.js +16 -4
- package/lib/resources/WebsiteCampaign.js +92 -21
- package/lib/resources/WebsiteConversation.js +244 -50
- package/lib/resources/WebsiteOperator.js +33 -8
- package/lib/resources/WebsitePeople.js +112 -25
- package/lib/resources/WebsiteSettings.js +7 -2
- package/lib/resources/WebsiteVerify.js +13 -4
- package/lib/resources/WebsiteVisitors.js +28 -7
- package/lib/services/Bucket.js +4 -0
- package/lib/services/Media.js +4 -0
- package/lib/services/Plugin.js +4 -0
- package/lib/services/Website.js +4 -0
- package/package.json +5 -5
- package/tsconfig.json +1 -1
- package/types/crisp.d.ts +98 -40
- package/types/services/Bucket.d.ts +5 -1
- package/types/services/Media.d.ts +5 -1
- package/types/services/Plugin.d.ts +5 -1
- package/types/services/Website.d.ts +5 -1
|
@@ -18,8 +18,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
18
18
|
/**
|
|
19
19
|
* List Conversations
|
|
20
20
|
* @memberof WebsiteConversation
|
|
21
|
+
* @public
|
|
21
22
|
* @method listConversations
|
|
22
|
-
* @
|
|
23
|
+
* @param {string} websiteID
|
|
24
|
+
* @param {number} pageNumber
|
|
25
|
+
* @return {Promise}
|
|
23
26
|
*/
|
|
24
27
|
service.listConversations = function(websiteID, pageNumber) {
|
|
25
28
|
return crisp.get(
|
|
@@ -30,8 +33,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
30
33
|
/**
|
|
31
34
|
* List Suggested Conversation Segments
|
|
32
35
|
* @memberof WebsiteConversation
|
|
36
|
+
* @public
|
|
33
37
|
* @method listSuggestedConversationSegments
|
|
34
|
-
* @
|
|
38
|
+
* @param {string} websiteID
|
|
39
|
+
* @param {number} pageNumber
|
|
40
|
+
* @return {Promise}
|
|
35
41
|
*/
|
|
36
42
|
service.listSuggestedConversationSegments = function(websiteID, pageNumber) {
|
|
37
43
|
return crisp.get(
|
|
@@ -44,8 +50,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
44
50
|
/**
|
|
45
51
|
* Delete Suggested Conversation Segment
|
|
46
52
|
* @memberof WebsiteConversation
|
|
53
|
+
* @public
|
|
47
54
|
* @method deleteSuggestedConversationSegment
|
|
48
|
-
* @
|
|
55
|
+
* @param {string} websiteID
|
|
56
|
+
* @param {string} segment
|
|
57
|
+
* @return {Promise}
|
|
49
58
|
*/
|
|
50
59
|
service.deleteSuggestedConversationSegment = function(websiteID, segment) {
|
|
51
60
|
return crisp.delete(
|
|
@@ -64,8 +73,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
64
73
|
/**
|
|
65
74
|
* List Suggested Conversation Data Keys
|
|
66
75
|
* @memberof WebsiteConversation
|
|
76
|
+
* @public
|
|
67
77
|
* @method listSuggestedConversationDataKeys
|
|
68
|
-
* @
|
|
78
|
+
* @param {string} websiteID
|
|
79
|
+
* @param {number} pageNumber
|
|
80
|
+
* @return {Promise}
|
|
69
81
|
*/
|
|
70
82
|
service.listSuggestedConversationDataKeys = function(websiteID, pageNumber) {
|
|
71
83
|
return crisp.get(
|
|
@@ -78,8 +90,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
78
90
|
/**
|
|
79
91
|
* Delete Suggested Conversation Data Key
|
|
80
92
|
* @memberof WebsiteConversation
|
|
93
|
+
* @public
|
|
81
94
|
* @method deleteSuggestedConversationDataKey
|
|
82
|
-
* @
|
|
95
|
+
* @param {string} websiteID
|
|
96
|
+
* @param {string} key
|
|
97
|
+
* @return {Promise}
|
|
83
98
|
*/
|
|
84
99
|
service.deleteSuggestedConversationDataKey = function(websiteID, key) {
|
|
85
100
|
return crisp.delete(
|
|
@@ -98,8 +113,10 @@ function WebsiteConversation(service, crisp) {
|
|
|
98
113
|
/**
|
|
99
114
|
* Create A New Conversation
|
|
100
115
|
* @memberof WebsiteConversation
|
|
116
|
+
* @public
|
|
101
117
|
* @method createNewConversation
|
|
102
|
-
* @
|
|
118
|
+
* @param {string} websiteID
|
|
119
|
+
* @return {Promise}
|
|
103
120
|
*/
|
|
104
121
|
service.createNewConversation = function(websiteID) {
|
|
105
122
|
return crisp.post(
|
|
@@ -110,8 +127,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
110
127
|
/**
|
|
111
128
|
* Check If Conversation Exists
|
|
112
129
|
* @memberof WebsiteConversation
|
|
130
|
+
* @public
|
|
113
131
|
* @method checkConversationExists
|
|
114
|
-
* @
|
|
132
|
+
* @param {string} websiteID
|
|
133
|
+
* @param {string} sessionID
|
|
134
|
+
* @return {Promise}
|
|
115
135
|
*/
|
|
116
136
|
service.checkConversationExists = function(websiteID, sessionID) {
|
|
117
137
|
return crisp.head(
|
|
@@ -122,8 +142,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
122
142
|
/**
|
|
123
143
|
* Get A Conversation
|
|
124
144
|
* @memberof WebsiteConversation
|
|
145
|
+
* @public
|
|
125
146
|
* @method getConversation
|
|
126
|
-
* @
|
|
147
|
+
* @param {string} websiteID
|
|
148
|
+
* @param {string} sessionID
|
|
149
|
+
* @return {Promise}
|
|
127
150
|
*/
|
|
128
151
|
service.getConversation = function(websiteID, sessionID) {
|
|
129
152
|
return crisp.get(
|
|
@@ -134,8 +157,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
134
157
|
/**
|
|
135
158
|
* Remove A Conversation
|
|
136
159
|
* @memberof WebsiteConversation
|
|
160
|
+
* @public
|
|
137
161
|
* @method removeConversation
|
|
138
|
-
* @
|
|
162
|
+
* @param {string} websiteID
|
|
163
|
+
* @param {string} sessionID
|
|
164
|
+
* @return {Promise}
|
|
139
165
|
*/
|
|
140
166
|
service.removeConversation = function(websiteID, sessionID) {
|
|
141
167
|
return crisp.delete(
|
|
@@ -146,8 +172,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
146
172
|
/**
|
|
147
173
|
* Initiate A Conversation With Existing Session
|
|
148
174
|
* @memberof WebsiteConversation
|
|
175
|
+
* @public
|
|
149
176
|
* @method initiateConversationWithExistingSession
|
|
150
|
-
* @
|
|
177
|
+
* @param {string} websiteID
|
|
178
|
+
* @param {string} sessionID
|
|
179
|
+
* @return {Promise}
|
|
151
180
|
*/
|
|
152
181
|
service.initiateConversationWithExistingSession = function(
|
|
153
182
|
websiteID, sessionID
|
|
@@ -162,8 +191,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
162
191
|
/**
|
|
163
192
|
* Get Messages In Conversation
|
|
164
193
|
* @memberof WebsiteConversation
|
|
194
|
+
* @public
|
|
165
195
|
* @method getMessagesInConversation
|
|
166
|
-
* @
|
|
196
|
+
* @param {string} websiteID
|
|
197
|
+
* @param {string} sessionID
|
|
198
|
+
* @param {string} [timestampBefore]
|
|
199
|
+
* @return {Promise}
|
|
167
200
|
*/
|
|
168
201
|
service.getMessagesInConversation = function(
|
|
169
202
|
websiteID, sessionID, timestampBefore
|
|
@@ -187,8 +220,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
187
220
|
/**
|
|
188
221
|
* Send A Message In Conversation
|
|
189
222
|
* @memberof WebsiteConversation
|
|
223
|
+
* @public
|
|
190
224
|
* @method sendMessageInConversation
|
|
191
|
-
* @
|
|
225
|
+
* @param {string} websiteID
|
|
226
|
+
* @param {string} sessionID
|
|
227
|
+
* @param {object} message
|
|
228
|
+
* @return {Promise}
|
|
192
229
|
*/
|
|
193
230
|
service.sendMessageInConversation = function(websiteID, sessionID, message) {
|
|
194
231
|
return crisp.post(
|
|
@@ -203,8 +240,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
203
240
|
/**
|
|
204
241
|
* Get A Message In Conversation
|
|
205
242
|
* @memberof WebsiteConversation
|
|
243
|
+
* @public
|
|
206
244
|
* @method getMessageInConversation
|
|
207
|
-
* @
|
|
245
|
+
* @param {string} websiteID
|
|
246
|
+
* @param {string} sessionID
|
|
247
|
+
* @param {number} fingerprint
|
|
248
|
+
* @return {Promise}
|
|
208
249
|
*/
|
|
209
250
|
service.getMessageInConversation = function(
|
|
210
251
|
websiteID, sessionID, fingerprint
|
|
@@ -219,8 +260,13 @@ function WebsiteConversation(service, crisp) {
|
|
|
219
260
|
/**
|
|
220
261
|
* Update A Message In Conversation
|
|
221
262
|
* @memberof WebsiteConversation
|
|
263
|
+
* @public
|
|
222
264
|
* @method updateMessageInConversation
|
|
223
|
-
* @
|
|
265
|
+
* @param {string} websiteID
|
|
266
|
+
* @param {string} sessionID
|
|
267
|
+
* @param {number} fingerprint
|
|
268
|
+
* @param {object} content
|
|
269
|
+
* @return {Promise}
|
|
224
270
|
*/
|
|
225
271
|
service.updateMessageInConversation = function(
|
|
226
272
|
websiteID, sessionID, fingerprint, content
|
|
@@ -241,8 +287,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
241
287
|
/**
|
|
242
288
|
* Remove A Message In Conversation
|
|
243
289
|
* @memberof WebsiteConversation
|
|
290
|
+
* @public
|
|
244
291
|
* @method removeMessageInConversation
|
|
245
|
-
* @
|
|
292
|
+
* @param {string} websiteID
|
|
293
|
+
* @param {string} sessionID
|
|
294
|
+
* @param {number} fingerprint
|
|
295
|
+
* @return {Promise}
|
|
246
296
|
*/
|
|
247
297
|
service.removeMessageInConversation = function(
|
|
248
298
|
websiteID, sessionID, fingerprint
|
|
@@ -257,8 +307,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
257
307
|
/**
|
|
258
308
|
* Compose A Message In Conversation
|
|
259
309
|
* @memberof WebsiteConversation
|
|
310
|
+
* @public
|
|
260
311
|
* @method composeMessageInConversation
|
|
261
|
-
* @
|
|
312
|
+
* @param {string} websiteID
|
|
313
|
+
* @param {string} sessionID
|
|
314
|
+
* @param {object} compose
|
|
315
|
+
* @return {Promise}
|
|
262
316
|
*/
|
|
263
317
|
service.composeMessageInConversation = function(
|
|
264
318
|
websiteID, sessionID, compose
|
|
@@ -275,8 +329,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
275
329
|
/**
|
|
276
330
|
* Mark Messages As Read In Conversation
|
|
277
331
|
* @memberof WebsiteConversation
|
|
332
|
+
* @public
|
|
278
333
|
* @method markMessagesReadInConversation
|
|
279
|
-
* @
|
|
334
|
+
* @param {string} websiteID
|
|
335
|
+
* @param {string} sessionID
|
|
336
|
+
* @param {object} read
|
|
337
|
+
* @return {Promise}
|
|
280
338
|
*/
|
|
281
339
|
service.markMessagesReadInConversation = function(
|
|
282
340
|
websiteID, sessionID, read
|
|
@@ -293,8 +351,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
293
351
|
/**
|
|
294
352
|
* Mark Messages As Delivered In Conversation
|
|
295
353
|
* @memberof WebsiteConversation
|
|
354
|
+
* @public
|
|
296
355
|
* @method markMessagesDeliveredInConversation
|
|
297
|
-
* @
|
|
356
|
+
* @param {string} websiteID
|
|
357
|
+
* @param {string} sessionID
|
|
358
|
+
* @param {object} delivered
|
|
359
|
+
* @return {Promise}
|
|
298
360
|
*/
|
|
299
361
|
service.markMessagesDeliveredInConversation = function(
|
|
300
362
|
websiteID, sessionID, delivered
|
|
@@ -311,8 +373,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
311
373
|
/**
|
|
312
374
|
* Update Conversation Open State
|
|
313
375
|
* @memberof WebsiteConversation
|
|
376
|
+
* @public
|
|
314
377
|
* @method updateConversationOpenState
|
|
315
|
-
* @
|
|
378
|
+
* @param {string} websiteID
|
|
379
|
+
* @param {string} sessionID
|
|
380
|
+
* @param {boolean} [opened]
|
|
381
|
+
* @return {Promise}
|
|
316
382
|
*/
|
|
317
383
|
service.updateConversationOpenState = function(websiteID, sessionID, opened) {
|
|
318
384
|
return crisp.patch(
|
|
@@ -331,8 +397,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
331
397
|
/**
|
|
332
398
|
* Get Conversation Routing Assign
|
|
333
399
|
* @memberof WebsiteConversation
|
|
400
|
+
* @public
|
|
334
401
|
* @method getConversationRoutingAssign
|
|
335
|
-
* @
|
|
402
|
+
* @param {string} websiteID
|
|
403
|
+
* @param {string} sessionID
|
|
404
|
+
* @return {Promise}
|
|
336
405
|
*/
|
|
337
406
|
service.getConversationRoutingAssign = function(websiteID, sessionID) {
|
|
338
407
|
return crisp.get(
|
|
@@ -345,8 +414,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
345
414
|
/**
|
|
346
415
|
* Assign Conversation Routing
|
|
347
416
|
* @memberof WebsiteConversation
|
|
417
|
+
* @public
|
|
348
418
|
* @method assignConversationRouting
|
|
349
|
-
* @
|
|
419
|
+
* @param {string} websiteID
|
|
420
|
+
* @param {string} sessionID
|
|
421
|
+
* @param {object} assign
|
|
422
|
+
* @return {Promise}
|
|
350
423
|
*/
|
|
351
424
|
service.assignConversationRouting = function(websiteID, sessionID, assign) {
|
|
352
425
|
return crisp.patch(
|
|
@@ -361,8 +434,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
361
434
|
/**
|
|
362
435
|
* Get Conversation Metas
|
|
363
436
|
* @memberof WebsiteConversation
|
|
437
|
+
* @public
|
|
364
438
|
* @method getConversationMetas
|
|
365
|
-
* @
|
|
439
|
+
* @param {string} websiteID
|
|
440
|
+
* @param {string} sessionID
|
|
441
|
+
* @return {Promise}
|
|
366
442
|
*/
|
|
367
443
|
service.getConversationMetas = function(websiteID, sessionID) {
|
|
368
444
|
return crisp.get(
|
|
@@ -375,8 +451,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
375
451
|
/**
|
|
376
452
|
* Update Conversation Metas
|
|
377
453
|
* @memberof WebsiteConversation
|
|
454
|
+
* @public
|
|
378
455
|
* @method updateConversationMetas
|
|
379
|
-
* @
|
|
456
|
+
* @param {string} websiteID
|
|
457
|
+
* @param {string} sessionID
|
|
458
|
+
* @param {object} metas
|
|
459
|
+
* @return {Promise}
|
|
380
460
|
*/
|
|
381
461
|
service.updateConversationMetas = function(websiteID, sessionID, metas) {
|
|
382
462
|
return crisp.patch(
|
|
@@ -391,8 +471,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
391
471
|
/**
|
|
392
472
|
* Get An Original Message In Conversation
|
|
393
473
|
* @memberof WebsiteConversation
|
|
474
|
+
* @public
|
|
394
475
|
* @method getOriginalMessageInConversation
|
|
395
|
-
* @
|
|
476
|
+
* @param {string} websiteID
|
|
477
|
+
* @param {string} sessionID
|
|
478
|
+
* @param {string} originalID
|
|
479
|
+
* @return {Promise}
|
|
396
480
|
*/
|
|
397
481
|
service.getOriginalMessageInConversation = function(
|
|
398
482
|
websiteID, sessionID, originalID
|
|
@@ -407,8 +491,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
407
491
|
/**
|
|
408
492
|
* List Conversation Pages
|
|
409
493
|
* @memberof WebsiteConversation
|
|
494
|
+
* @public
|
|
410
495
|
* @method listConversationPages
|
|
411
|
-
* @
|
|
496
|
+
* @param {string} websiteID
|
|
497
|
+
* @param {string} sessionID
|
|
498
|
+
* @param {number} pageNumber
|
|
499
|
+
* @return {Promise}
|
|
412
500
|
*/
|
|
413
501
|
service.listConversationPages = function(websiteID, sessionID, pageNumber) {
|
|
414
502
|
return crisp.get(
|
|
@@ -421,8 +509,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
421
509
|
/**
|
|
422
510
|
* List Conversation Events
|
|
423
511
|
* @memberof WebsiteConversation
|
|
512
|
+
* @public
|
|
424
513
|
* @method listConversationEvents
|
|
425
|
-
* @
|
|
514
|
+
* @param {string} websiteID
|
|
515
|
+
* @param {string} sessionID
|
|
516
|
+
* @param {number} pageNumber
|
|
517
|
+
* @return {Promise}
|
|
426
518
|
*/
|
|
427
519
|
service.listConversationEvents = function(websiteID, sessionID, pageNumber) {
|
|
428
520
|
return crisp.get(
|
|
@@ -435,8 +527,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
435
527
|
/**
|
|
436
528
|
* List Conversation Files
|
|
437
529
|
* @memberof WebsiteConversation
|
|
530
|
+
* @public
|
|
438
531
|
* @method listConversationFiles
|
|
439
|
-
* @
|
|
532
|
+
* @param {string} websiteID
|
|
533
|
+
* @param {string} sessionID
|
|
534
|
+
* @param {number} pageNumber
|
|
535
|
+
* @return {Promise}
|
|
440
536
|
*/
|
|
441
537
|
service.listConversationFiles = function(websiteID, sessionID, pageNumber) {
|
|
442
538
|
return crisp.get(
|
|
@@ -449,8 +545,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
449
545
|
/**
|
|
450
546
|
* Get Conversation State
|
|
451
547
|
* @memberof WebsiteConversation
|
|
548
|
+
* @public
|
|
452
549
|
* @method getConversationState
|
|
453
|
-
* @
|
|
550
|
+
* @param {string} websiteID
|
|
551
|
+
* @param {string} sessionID
|
|
552
|
+
* @return {Promise}
|
|
454
553
|
*/
|
|
455
554
|
service.getConversationState = function(websiteID, sessionID) {
|
|
456
555
|
return crisp.get(
|
|
@@ -463,8 +562,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
463
562
|
/**
|
|
464
563
|
* Change Conversation State
|
|
465
564
|
* @memberof WebsiteConversation
|
|
565
|
+
* @public
|
|
466
566
|
* @method changeConversationState
|
|
467
|
-
* @
|
|
567
|
+
* @param {string} websiteID
|
|
568
|
+
* @param {string} sessionID
|
|
569
|
+
* @param {string} state
|
|
570
|
+
* @return {Promise}
|
|
468
571
|
*/
|
|
469
572
|
service.changeConversationState = function(websiteID, sessionID, state) {
|
|
470
573
|
return crisp.patch(
|
|
@@ -483,8 +586,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
483
586
|
/**
|
|
484
587
|
* Get Conversation Participants
|
|
485
588
|
* @memberof WebsiteConversation
|
|
589
|
+
* @public
|
|
486
590
|
* @method getConversationParticipants
|
|
487
|
-
* @
|
|
591
|
+
* @param {string} websiteID
|
|
592
|
+
* @param {string} sessionID
|
|
593
|
+
* @return {Promise}
|
|
488
594
|
*/
|
|
489
595
|
service.getConversationParticipants = function(websiteID, sessionID) {
|
|
490
596
|
return crisp.get(
|
|
@@ -497,8 +603,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
497
603
|
/**
|
|
498
604
|
* Save Conversation Participants
|
|
499
605
|
* @memberof WebsiteConversation
|
|
606
|
+
* @public
|
|
500
607
|
* @method saveConversationParticipants
|
|
501
|
-
* @
|
|
608
|
+
* @param {string} websiteID
|
|
609
|
+
* @param {string} sessionID
|
|
610
|
+
* @param {object} participants
|
|
611
|
+
* @return {Promise}
|
|
502
612
|
*/
|
|
503
613
|
service.saveConversationParticipants = function(
|
|
504
614
|
websiteID, sessionID, participants
|
|
@@ -515,8 +625,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
515
625
|
/**
|
|
516
626
|
* Get Block Status For Conversation
|
|
517
627
|
* @memberof WebsiteConversation
|
|
628
|
+
* @public
|
|
518
629
|
* @method getBlockStatusForConversation
|
|
519
|
-
* @
|
|
630
|
+
* @param {string} websiteID
|
|
631
|
+
* @param {string} sessionID
|
|
632
|
+
* @return {Promise}
|
|
520
633
|
*/
|
|
521
634
|
service.getBlockStatusForConversation = function(websiteID, sessionID) {
|
|
522
635
|
return crisp.get(
|
|
@@ -529,8 +642,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
529
642
|
/**
|
|
530
643
|
* Block Incoming Messages For Conversation
|
|
531
644
|
* @memberof WebsiteConversation
|
|
645
|
+
* @public
|
|
532
646
|
* @method blockIncomingMessagesForConversation
|
|
533
|
-
* @
|
|
647
|
+
* @param {string} websiteID
|
|
648
|
+
* @param {string} sessionID
|
|
649
|
+
* @param {boolean} [blocked]
|
|
650
|
+
* @return {Promise}
|
|
534
651
|
*/
|
|
535
652
|
service.blockIncomingMessagesForConversation = function(
|
|
536
653
|
websiteID, sessionID, blocked
|
|
@@ -551,8 +668,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
551
668
|
/**
|
|
552
669
|
* Get Verify Status For Conversation
|
|
553
670
|
* @memberof WebsiteConversation
|
|
671
|
+
* @public
|
|
554
672
|
* @method getVerifyStatusForConversation
|
|
555
|
-
* @
|
|
673
|
+
* @param {string} websiteID
|
|
674
|
+
* @param {string} sessionID
|
|
675
|
+
* @return {Promise}
|
|
556
676
|
*/
|
|
557
677
|
service.getVerifyStatusForConversation = function(websiteID, sessionID) {
|
|
558
678
|
return crisp.get(
|
|
@@ -565,8 +685,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
565
685
|
/**
|
|
566
686
|
* Update Verify Status For Conversation
|
|
567
687
|
* @memberof WebsiteConversation
|
|
688
|
+
* @public
|
|
568
689
|
* @method updateVerifyStatusForConversation
|
|
569
|
-
* @
|
|
690
|
+
* @param {string} websiteID
|
|
691
|
+
* @param {string} sessionID
|
|
692
|
+
* @param {boolean} [verified]
|
|
693
|
+
* @return {Promise}
|
|
570
694
|
*/
|
|
571
695
|
service.updateVerifyStatusForConversation = function(
|
|
572
696
|
websiteID, sessionID, verified
|
|
@@ -587,8 +711,13 @@ function WebsiteConversation(service, crisp) {
|
|
|
587
711
|
/**
|
|
588
712
|
* Request Email Transcript For Conversation
|
|
589
713
|
* @memberof WebsiteConversation
|
|
714
|
+
* @public
|
|
590
715
|
* @method requestEmailTranscriptForConversation
|
|
591
|
-
* @
|
|
716
|
+
* @param {string} websiteID
|
|
717
|
+
* @param {string} sessionID
|
|
718
|
+
* @param {string} to
|
|
719
|
+
* @param {string} [email]
|
|
720
|
+
* @return {Promise}
|
|
592
721
|
*/
|
|
593
722
|
service.requestEmailTranscriptForConversation = function(
|
|
594
723
|
websiteID, sessionID, to, email
|
|
@@ -614,8 +743,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
614
743
|
/**
|
|
615
744
|
* Request Chatbox Binding Purge For Conversation
|
|
616
745
|
* @memberof WebsiteConversation
|
|
746
|
+
* @public
|
|
617
747
|
* @method requestChatboxBindingPurgeForConversation
|
|
618
|
-
* @
|
|
748
|
+
* @param {string} websiteID
|
|
749
|
+
* @param {string} sessionID
|
|
750
|
+
* @return {Promise}
|
|
619
751
|
*/
|
|
620
752
|
service.requestChatboxBindingPurgeForConversation = function(
|
|
621
753
|
websiteID, sessionID
|
|
@@ -630,8 +762,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
630
762
|
/**
|
|
631
763
|
* Request User Feedback For Conversation
|
|
632
764
|
* @memberof WebsiteConversation
|
|
765
|
+
* @public
|
|
633
766
|
* @method requestUserFeedbackForConversation
|
|
634
|
-
* @
|
|
767
|
+
* @param {string} websiteID
|
|
768
|
+
* @param {string} sessionID
|
|
769
|
+
* @return {Promise}
|
|
635
770
|
*/
|
|
636
771
|
service.requestUserFeedbackForConversation = function(
|
|
637
772
|
websiteID, sessionID
|
|
@@ -646,8 +781,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
646
781
|
/**
|
|
647
782
|
* List Browsing Sessions For Conversation
|
|
648
783
|
* @memberof WebsiteConversation
|
|
784
|
+
* @public
|
|
649
785
|
* @method listBrowsingSessionsForConversation
|
|
650
|
-
* @
|
|
786
|
+
* @param {string} websiteID
|
|
787
|
+
* @param {string} sessionID
|
|
788
|
+
* @return {Promise}
|
|
651
789
|
*/
|
|
652
790
|
service.listBrowsingSessionsForConversation = function(websiteID, sessionID) {
|
|
653
791
|
return crisp.get(
|
|
@@ -660,8 +798,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
660
798
|
/**
|
|
661
799
|
* Initiate Browsing Session For Conversation
|
|
662
800
|
* @memberof WebsiteConversation
|
|
801
|
+
* @public
|
|
663
802
|
* @method initiateBrowsingSessionForConversation
|
|
664
|
-
* @
|
|
803
|
+
* @param {string} websiteID
|
|
804
|
+
* @param {string} sessionID
|
|
805
|
+
* @return {Promise}
|
|
665
806
|
*/
|
|
666
807
|
service.initiateBrowsingSessionForConversation = function(
|
|
667
808
|
websiteID, sessionID
|
|
@@ -676,8 +817,13 @@ function WebsiteConversation(service, crisp) {
|
|
|
676
817
|
/**
|
|
677
818
|
* Send Action To An Existing Browsing Session
|
|
678
819
|
* @memberof WebsiteConversation
|
|
820
|
+
* @public
|
|
679
821
|
* @method sendActionToExistingBrowsingSession
|
|
680
|
-
* @
|
|
822
|
+
* @param {string} websiteID
|
|
823
|
+
* @param {string} sessionID
|
|
824
|
+
* @param {object} browsingID
|
|
825
|
+
* @param {string} action
|
|
826
|
+
* @return {Promise}
|
|
681
827
|
*/
|
|
682
828
|
service.sendActionToExistingBrowsingSession = function(
|
|
683
829
|
websiteID, sessionID, browsingID, action
|
|
@@ -698,8 +844,13 @@ function WebsiteConversation(service, crisp) {
|
|
|
698
844
|
/**
|
|
699
845
|
* Assist Existing Browsing Session
|
|
700
846
|
* @memberof WebsiteConversation
|
|
847
|
+
* @public
|
|
701
848
|
* @method assistExistingBrowsingSession
|
|
702
|
-
* @
|
|
849
|
+
* @param {string} websiteID
|
|
850
|
+
* @param {string} sessionID
|
|
851
|
+
* @param {object} browsingID
|
|
852
|
+
* @param {object} assist
|
|
853
|
+
* @return {Promise}
|
|
703
854
|
*/
|
|
704
855
|
service.assistExistingBrowsingSession = function(
|
|
705
856
|
websiteID, sessionID, browsingID, assist
|
|
@@ -717,8 +868,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
717
868
|
/**
|
|
718
869
|
* Initiate New Call Session For Conversation
|
|
719
870
|
* @memberof WebsiteConversation
|
|
871
|
+
* @public
|
|
720
872
|
* @method initiateNewCallSessionForConversation
|
|
721
|
-
* @
|
|
873
|
+
* @param {string} websiteID
|
|
874
|
+
* @param {string} sessionID
|
|
875
|
+
* @param {string} mode
|
|
876
|
+
* @return {Promise}
|
|
722
877
|
*/
|
|
723
878
|
service.initiateNewCallSessionForConversation = function(
|
|
724
879
|
websiteID, sessionID, mode
|
|
@@ -739,8 +894,11 @@ function WebsiteConversation(service, crisp) {
|
|
|
739
894
|
/**
|
|
740
895
|
* Get Ongoing Call Session For Conversation
|
|
741
896
|
* @memberof WebsiteConversation
|
|
897
|
+
* @public
|
|
742
898
|
* @method getOngoingCallSessionForConversation
|
|
743
|
-
* @
|
|
899
|
+
* @param {string} websiteID
|
|
900
|
+
* @param {string} sessionID
|
|
901
|
+
* @return {Promise}
|
|
744
902
|
*/
|
|
745
903
|
service.getOngoingCallSessionForConversation = function(
|
|
746
904
|
websiteID, sessionID
|
|
@@ -755,8 +913,12 @@ function WebsiteConversation(service, crisp) {
|
|
|
755
913
|
/**
|
|
756
914
|
* Abort Ongoing Call Session For Conversation
|
|
757
915
|
* @memberof WebsiteConversation
|
|
916
|
+
* @public
|
|
758
917
|
* @method abortOngoingCallSessionForConversation
|
|
759
|
-
* @
|
|
918
|
+
* @param {string} websiteID
|
|
919
|
+
* @param {string} sessionID
|
|
920
|
+
* @param {string} callID
|
|
921
|
+
* @return {Promise}
|
|
760
922
|
*/
|
|
761
923
|
service.abortOngoingCallSessionForConversation = function(
|
|
762
924
|
websiteID, sessionID, callID
|
|
@@ -771,8 +933,13 @@ function WebsiteConversation(service, crisp) {
|
|
|
771
933
|
/**
|
|
772
934
|
* Transmit Signaling On Ongoing Call Session
|
|
773
935
|
* @memberof WebsiteConversation
|
|
936
|
+
* @public
|
|
774
937
|
* @method transmitSignalingOnOngoingCallSession
|
|
775
|
-
* @
|
|
938
|
+
* @param {string} websiteID
|
|
939
|
+
* @param {string} sessionID
|
|
940
|
+
* @param {string} callID
|
|
941
|
+
* @param {object} payload
|
|
942
|
+
* @return {Promise}
|
|
776
943
|
*/
|
|
777
944
|
service.transmitSignalingOnOngoingCallSession = function(
|
|
778
945
|
websiteID, sessionID, callID, payload
|
|
@@ -789,8 +956,16 @@ function WebsiteConversation(service, crisp) {
|
|
|
789
956
|
/**
|
|
790
957
|
* Deliver Widget Button Action For Conversation
|
|
791
958
|
* @memberof WebsiteConversation
|
|
959
|
+
* @public
|
|
792
960
|
* @method deliverWidgetButtonActionForConversation
|
|
793
|
-
* @
|
|
961
|
+
* @param {string} websiteID
|
|
962
|
+
* @param {string} sessionID
|
|
963
|
+
* @param {string} pluginID
|
|
964
|
+
* @param {string} sectionID
|
|
965
|
+
* @param {string} itemID
|
|
966
|
+
* @param {object} data
|
|
967
|
+
* @param {object} value
|
|
968
|
+
* @return {Promise}
|
|
794
969
|
*/
|
|
795
970
|
service.deliverWidgetButtonActionForConversation = function(
|
|
796
971
|
websiteID, sessionID, pluginID, sectionID, itemID, data, value
|
|
@@ -819,8 +994,15 @@ function WebsiteConversation(service, crisp) {
|
|
|
819
994
|
/**
|
|
820
995
|
* Deliver Widget Data Fetch Action For Conversation
|
|
821
996
|
* @memberof WebsiteConversation
|
|
997
|
+
* @public
|
|
822
998
|
* @method deliverWidgetDataFetchActionForConversation
|
|
823
|
-
* @
|
|
999
|
+
* @param {string} websiteID
|
|
1000
|
+
* @param {string} sessionID
|
|
1001
|
+
* @param {string} pluginID
|
|
1002
|
+
* @param {string} sectionID
|
|
1003
|
+
* @param {string} itemID
|
|
1004
|
+
* @param {object} data
|
|
1005
|
+
* @return {Promise}
|
|
824
1006
|
*/
|
|
825
1007
|
service.deliverWidgetDataFetchActionForConversation = function(
|
|
826
1008
|
websiteID, sessionID, pluginID, sectionID, itemID, data
|
|
@@ -844,8 +1026,15 @@ function WebsiteConversation(service, crisp) {
|
|
|
844
1026
|
/**
|
|
845
1027
|
* Deliver Widget Data Edit Action For Conversation
|
|
846
1028
|
* @memberof WebsiteConversation
|
|
1029
|
+
* @public
|
|
847
1030
|
* @method deliverWidgetDataEditActionForConversation
|
|
848
|
-
* @
|
|
1031
|
+
* @param {string} websiteID
|
|
1032
|
+
* @param {string} sessionID
|
|
1033
|
+
* @param {string} pluginID
|
|
1034
|
+
* @param {string} sectionID
|
|
1035
|
+
* @param {string} itemID
|
|
1036
|
+
* @param {string} value
|
|
1037
|
+
* @return {Promise}
|
|
849
1038
|
*/
|
|
850
1039
|
service.deliverWidgetDataEditActionForConversation = function(
|
|
851
1040
|
websiteID, sessionID, pluginID, sectionID, itemID, value
|
|
@@ -869,8 +1058,13 @@ function WebsiteConversation(service, crisp) {
|
|
|
869
1058
|
/**
|
|
870
1059
|
* Schedule A Reminder For Conversation
|
|
871
1060
|
* @memberof WebsiteConversation
|
|
1061
|
+
* @public
|
|
872
1062
|
* @method scheduleReminderForConversation
|
|
873
|
-
* @
|
|
1063
|
+
* @param {string} websiteID
|
|
1064
|
+
* @param {string} sessionID
|
|
1065
|
+
* @param {string} date
|
|
1066
|
+
* @param {string} note
|
|
1067
|
+
* @return {Promise}
|
|
874
1068
|
*/
|
|
875
1069
|
service.scheduleReminderForConversation = function(
|
|
876
1070
|
websiteID, sessionID, date, note
|