crisp-api 7.3.0 → 7.4.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/CHANGELOG.md +10 -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/package.json +5 -5
- package/tsconfig.json +1 -1
- package/types/crisp.d.ts +98 -40
|
@@ -18,8 +18,10 @@ function WebsiteOperator(service, crisp) {
|
|
|
18
18
|
/**
|
|
19
19
|
* List Website Operators
|
|
20
20
|
* @memberof WebsiteOperator
|
|
21
|
+
* @public
|
|
21
22
|
* @method listWebsiteOperators
|
|
22
|
-
* @
|
|
23
|
+
* @param {string} websiteID
|
|
24
|
+
* @return {Promise}
|
|
23
25
|
*/
|
|
24
26
|
service.listWebsiteOperators = function(websiteID) {
|
|
25
27
|
return crisp.get(
|
|
@@ -32,8 +34,10 @@ function WebsiteOperator(service, crisp) {
|
|
|
32
34
|
/**
|
|
33
35
|
* List Last Active Website Operators
|
|
34
36
|
* @memberof WebsiteOperator
|
|
37
|
+
* @public
|
|
35
38
|
* @method listLastActiveWebsiteOperators
|
|
36
|
-
* @
|
|
39
|
+
* @param {string} websiteID
|
|
40
|
+
* @return {Promise}
|
|
37
41
|
*/
|
|
38
42
|
service.listLastActiveWebsiteOperators = function(websiteID) {
|
|
39
43
|
return crisp.get(
|
|
@@ -46,8 +50,10 @@ function WebsiteOperator(service, crisp) {
|
|
|
46
50
|
/**
|
|
47
51
|
* Flush Last Active Website Operators
|
|
48
52
|
* @memberof WebsiteOperator
|
|
53
|
+
* @public
|
|
49
54
|
* @method flushLastActiveWebsiteOperators
|
|
50
|
-
* @
|
|
55
|
+
* @param {string} websiteID
|
|
56
|
+
* @return {Promise}
|
|
51
57
|
*/
|
|
52
58
|
service.flushLastActiveWebsiteOperators = function(websiteID) {
|
|
53
59
|
return crisp.delete(
|
|
@@ -60,8 +66,11 @@ function WebsiteOperator(service, crisp) {
|
|
|
60
66
|
/**
|
|
61
67
|
* Send Email To Website Operators
|
|
62
68
|
* @memberof WebsiteOperator
|
|
69
|
+
* @public
|
|
63
70
|
* @method sendEmailToWebsiteOperators
|
|
64
|
-
* @
|
|
71
|
+
* @param {string} websiteID
|
|
72
|
+
* @param {object} emailData
|
|
73
|
+
* @return {Promise}
|
|
65
74
|
*/
|
|
66
75
|
service.sendEmailToWebsiteOperators = function(websiteID, emailData) {
|
|
67
76
|
return crisp.post(
|
|
@@ -74,8 +83,11 @@ function WebsiteOperator(service, crisp) {
|
|
|
74
83
|
/**
|
|
75
84
|
* Get A Website Operator
|
|
76
85
|
* @memberof WebsiteOperator
|
|
86
|
+
* @public
|
|
77
87
|
* @method getWebsiteOperator
|
|
78
|
-
* @
|
|
88
|
+
* @param {string} websiteID
|
|
89
|
+
* @param {string} userID
|
|
90
|
+
* @return {Promise}
|
|
79
91
|
*/
|
|
80
92
|
service.getWebsiteOperator = function(websiteID, userID) {
|
|
81
93
|
return crisp.get(
|
|
@@ -88,8 +100,13 @@ function WebsiteOperator(service, crisp) {
|
|
|
88
100
|
/**
|
|
89
101
|
* Invite A Website Operator
|
|
90
102
|
* @memberof WebsiteOperator
|
|
103
|
+
* @public
|
|
91
104
|
* @method inviteWebsiteOperator
|
|
92
|
-
* @
|
|
105
|
+
* @param {string} websiteID
|
|
106
|
+
* @param {string} email
|
|
107
|
+
* @param {string} role
|
|
108
|
+
* @param {string} verify
|
|
109
|
+
* @return {Promise}
|
|
93
110
|
*/
|
|
94
111
|
service.inviteWebsiteOperator = function(websiteID, email, role, verify) {
|
|
95
112
|
return crisp.post(
|
|
@@ -108,8 +125,13 @@ function WebsiteOperator(service, crisp) {
|
|
|
108
125
|
/**
|
|
109
126
|
* Change Operator Membership
|
|
110
127
|
* @memberof WebsiteOperator
|
|
128
|
+
* @public
|
|
111
129
|
* @method changeOperatorMembership
|
|
112
|
-
* @
|
|
130
|
+
* @param {string} websiteID
|
|
131
|
+
* @param {string} userID
|
|
132
|
+
* @param {string} role
|
|
133
|
+
* @param {string} title
|
|
134
|
+
* @return {Promise}
|
|
113
135
|
*/
|
|
114
136
|
service.changeOperatorMembership = function(websiteID, userID, role, title) {
|
|
115
137
|
return crisp.patch(
|
|
@@ -127,8 +149,11 @@ function WebsiteOperator(service, crisp) {
|
|
|
127
149
|
/**
|
|
128
150
|
* Unlink Operator From Website
|
|
129
151
|
* @memberof WebsiteOperator
|
|
152
|
+
* @public
|
|
130
153
|
* @method unlinkOperatorFromWebsite
|
|
131
|
-
* @
|
|
154
|
+
* @param {string} websiteID
|
|
155
|
+
* @param {string} userID
|
|
156
|
+
* @return {Promise}
|
|
132
157
|
*/
|
|
133
158
|
service.unlinkOperatorFromWebsite = function(websiteID, userID) {
|
|
134
159
|
return crisp.delete(
|
|
@@ -18,8 +18,10 @@ function WebsitePeople(service, crisp) {
|
|
|
18
18
|
/**
|
|
19
19
|
* Get People Statistics
|
|
20
20
|
* @memberof WebsitePeople
|
|
21
|
+
* @public
|
|
21
22
|
* @method getPeopleStatistics
|
|
22
|
-
* @
|
|
23
|
+
* @param {string} websiteID
|
|
24
|
+
* @return {Promise}
|
|
23
25
|
*/
|
|
24
26
|
service.getPeopleStatistics = function(websiteID) {
|
|
25
27
|
return crisp.get(
|
|
@@ -30,8 +32,11 @@ function WebsitePeople(service, crisp) {
|
|
|
30
32
|
/**
|
|
31
33
|
* List Suggested People Segments
|
|
32
34
|
* @memberof WebsitePeople
|
|
35
|
+
* @public
|
|
33
36
|
* @method listSuggestedPeopleSegments
|
|
34
|
-
* @
|
|
37
|
+
* @param {string} websiteID
|
|
38
|
+
* @param {number} pageNumber
|
|
39
|
+
* @return {Promise}
|
|
35
40
|
*/
|
|
36
41
|
service.listSuggestedPeopleSegments = function(websiteID, pageNumber) {
|
|
37
42
|
return crisp.get(
|
|
@@ -44,8 +49,11 @@ function WebsitePeople(service, crisp) {
|
|
|
44
49
|
/**
|
|
45
50
|
* Delete Suggested People Segment
|
|
46
51
|
* @memberof WebsitePeople
|
|
52
|
+
* @public
|
|
47
53
|
* @method deleteSuggestedPeopleSegment
|
|
48
|
-
* @
|
|
54
|
+
* @param {string} websiteID
|
|
55
|
+
* @param {string} segment
|
|
56
|
+
* @return {Promise}
|
|
49
57
|
*/
|
|
50
58
|
service.deleteSuggestedPeopleSegment = function(websiteID, segment) {
|
|
51
59
|
return crisp.delete(
|
|
@@ -64,8 +72,11 @@ function WebsitePeople(service, crisp) {
|
|
|
64
72
|
/**
|
|
65
73
|
* List Suggested People Data Keys
|
|
66
74
|
* @memberof WebsitePeople
|
|
75
|
+
* @public
|
|
67
76
|
* @method listSuggestedPeopleDataKeys
|
|
68
|
-
* @
|
|
77
|
+
* @param {string} websiteID
|
|
78
|
+
* @param {number} pageNumber
|
|
79
|
+
* @return {Promise}
|
|
69
80
|
*/
|
|
70
81
|
service.listSuggestedPeopleDataKeys = function(websiteID, pageNumber) {
|
|
71
82
|
return crisp.get(
|
|
@@ -78,8 +89,11 @@ function WebsitePeople(service, crisp) {
|
|
|
78
89
|
/**
|
|
79
90
|
* Delete Suggested People Data Key
|
|
80
91
|
* @memberof WebsitePeople
|
|
92
|
+
* @public
|
|
81
93
|
* @method deleteSuggestedPeopleDataKey
|
|
82
|
-
* @
|
|
94
|
+
* @param {string} websiteID
|
|
95
|
+
* @param {string} key
|
|
96
|
+
* @return {Promise}
|
|
83
97
|
*/
|
|
84
98
|
service.deleteSuggestedPeopleDataKey = function(websiteID, key) {
|
|
85
99
|
return crisp.delete(
|
|
@@ -98,8 +112,11 @@ function WebsitePeople(service, crisp) {
|
|
|
98
112
|
/**
|
|
99
113
|
* List Suggested People Events
|
|
100
114
|
* @memberof WebsitePeople
|
|
115
|
+
* @public
|
|
101
116
|
* @method listSuggestedPeopleEvents
|
|
102
|
-
* @
|
|
117
|
+
* @param {string} websiteID
|
|
118
|
+
* @param {number} pageNumber
|
|
119
|
+
* @return {Promise}
|
|
103
120
|
*/
|
|
104
121
|
service.listSuggestedPeopleEvents = function(websiteID, pageNumber) {
|
|
105
122
|
return crisp.get(
|
|
@@ -112,8 +129,11 @@ function WebsitePeople(service, crisp) {
|
|
|
112
129
|
/**
|
|
113
130
|
* Delete Suggested People Event
|
|
114
131
|
* @memberof WebsitePeople
|
|
132
|
+
* @public
|
|
115
133
|
* @method deleteSuggestedPeopleEvent
|
|
116
|
-
* @
|
|
134
|
+
* @param {string} websiteID
|
|
135
|
+
* @param {string} text
|
|
136
|
+
* @return {Promise}
|
|
117
137
|
*/
|
|
118
138
|
service.deleteSuggestedPeopleEvent = function(websiteID, text) {
|
|
119
139
|
return crisp.delete(
|
|
@@ -132,8 +152,16 @@ function WebsitePeople(service, crisp) {
|
|
|
132
152
|
/**
|
|
133
153
|
* List People Profiles
|
|
134
154
|
* @memberof WebsitePeople
|
|
155
|
+
* @public
|
|
135
156
|
* @method listPeopleProfiles
|
|
136
|
-
* @
|
|
157
|
+
* @param {string} websiteID
|
|
158
|
+
* @param {number} pageNumber
|
|
159
|
+
* @param {string} [searchField]
|
|
160
|
+
* @param {string} [searchOrder]
|
|
161
|
+
* @param {string} [searchOperator]
|
|
162
|
+
* @param {string} [searchFilter]
|
|
163
|
+
* @param {string} [searchText]
|
|
164
|
+
* @return {Promise}
|
|
137
165
|
*/
|
|
138
166
|
service.listPeopleProfiles = function(
|
|
139
167
|
websiteID, pageNumber, searchField, searchOrder, searchOperator,
|
|
@@ -170,8 +198,11 @@ function WebsitePeople(service, crisp) {
|
|
|
170
198
|
/**
|
|
171
199
|
* Add New People Profile
|
|
172
200
|
* @memberof WebsitePeople
|
|
201
|
+
* @public
|
|
173
202
|
* @method addNewPeopleProfile
|
|
174
|
-
* @
|
|
203
|
+
* @param {string} websiteID
|
|
204
|
+
* @param {object} profile
|
|
205
|
+
* @return {Promise}
|
|
175
206
|
*/
|
|
176
207
|
service.addNewPeopleProfile = function(websiteID, profile) {
|
|
177
208
|
return crisp.post(
|
|
@@ -184,8 +215,11 @@ function WebsitePeople(service, crisp) {
|
|
|
184
215
|
/**
|
|
185
216
|
* Check If People Profile Exists
|
|
186
217
|
* @memberof WebsitePeople
|
|
218
|
+
* @public
|
|
187
219
|
* @method checkPeopleProfileExists
|
|
188
|
-
* @
|
|
220
|
+
* @param {string} websiteID
|
|
221
|
+
* @param {string} peopleID
|
|
222
|
+
* @return {Promise}
|
|
189
223
|
*/
|
|
190
224
|
service.checkPeopleProfileExists = function(websiteID, peopleID) {
|
|
191
225
|
return crisp.head(
|
|
@@ -198,8 +232,11 @@ function WebsitePeople(service, crisp) {
|
|
|
198
232
|
/**
|
|
199
233
|
* Save People Profile
|
|
200
234
|
* @memberof WebsitePeople
|
|
235
|
+
* @public
|
|
201
236
|
* @method getPeopleProfile
|
|
202
|
-
* @
|
|
237
|
+
* @param {string} websiteID
|
|
238
|
+
* @param {string} peopleID
|
|
239
|
+
* @return {Promise}
|
|
203
240
|
*/
|
|
204
241
|
service.getPeopleProfile = function(websiteID, peopleID) {
|
|
205
242
|
return crisp.get(
|
|
@@ -212,8 +249,12 @@ function WebsitePeople(service, crisp) {
|
|
|
212
249
|
/**
|
|
213
250
|
* Get People Profile
|
|
214
251
|
* @memberof WebsitePeople
|
|
252
|
+
* @public
|
|
215
253
|
* @method savePeopleProfile
|
|
216
|
-
* @
|
|
254
|
+
* @param {string} websiteID
|
|
255
|
+
* @param {string} peopleID
|
|
256
|
+
* @param {object} profile
|
|
257
|
+
* @return {Promise}
|
|
217
258
|
*/
|
|
218
259
|
service.savePeopleProfile = function(websiteID, peopleID, profile) {
|
|
219
260
|
return crisp.put(
|
|
@@ -228,8 +269,12 @@ function WebsitePeople(service, crisp) {
|
|
|
228
269
|
/**
|
|
229
270
|
* Update People Profile
|
|
230
271
|
* @memberof WebsitePeople
|
|
272
|
+
* @public
|
|
231
273
|
* @method updatePeopleProfile
|
|
232
|
-
* @
|
|
274
|
+
* @param {string} websiteID
|
|
275
|
+
* @param {string} peopleID
|
|
276
|
+
* @param {object} profile
|
|
277
|
+
* @return {Promise}
|
|
233
278
|
*/
|
|
234
279
|
service.updatePeopleProfile = function(websiteID, peopleID, profile) {
|
|
235
280
|
return crisp.patch(
|
|
@@ -244,8 +289,11 @@ function WebsitePeople(service, crisp) {
|
|
|
244
289
|
/**
|
|
245
290
|
* Remove People Profile
|
|
246
291
|
* @memberof WebsitePeople
|
|
292
|
+
* @public
|
|
247
293
|
* @method removePeopleProfile
|
|
248
|
-
* @
|
|
294
|
+
* @param {string} websiteID
|
|
295
|
+
* @param {string} peopleID
|
|
296
|
+
* @return {Promise}
|
|
249
297
|
*/
|
|
250
298
|
service.removePeopleProfile = function(websiteID, peopleID) {
|
|
251
299
|
return crisp.delete(
|
|
@@ -258,8 +306,12 @@ function WebsitePeople(service, crisp) {
|
|
|
258
306
|
/**
|
|
259
307
|
* List People Conversations
|
|
260
308
|
* @memberof WebsitePeople
|
|
309
|
+
* @public
|
|
261
310
|
* @method listPeopleConversations
|
|
262
|
-
* @
|
|
311
|
+
* @param {string} websiteID
|
|
312
|
+
* @param {string} peopleID
|
|
313
|
+
* @param {number} pageNumber
|
|
314
|
+
* @return {Promise}
|
|
263
315
|
*/
|
|
264
316
|
service.listPeopleConversations = function(websiteID, peopleID, pageNumber) {
|
|
265
317
|
return crisp.get(
|
|
@@ -273,8 +325,12 @@ function WebsitePeople(service, crisp) {
|
|
|
273
325
|
/**
|
|
274
326
|
* List People Campaigns
|
|
275
327
|
* @memberof WebsitePeople
|
|
328
|
+
* @public
|
|
276
329
|
* @method listPeopleCampaigns
|
|
277
|
-
* @
|
|
330
|
+
* @param {string} websiteID
|
|
331
|
+
* @param {string} peopleID
|
|
332
|
+
* @param {number} pageNumber
|
|
333
|
+
* @return {Promise}
|
|
278
334
|
*/
|
|
279
335
|
service.listPeopleCampaigns = function(websiteID, peopleID, pageNumber) {
|
|
280
336
|
return crisp.get(
|
|
@@ -288,8 +344,12 @@ function WebsitePeople(service, crisp) {
|
|
|
288
344
|
/**
|
|
289
345
|
* Add A People Event
|
|
290
346
|
* @memberof WebsitePeople
|
|
347
|
+
* @public
|
|
291
348
|
* @method addPeopleEvent
|
|
292
|
-
* @
|
|
349
|
+
* @param {string} websiteID
|
|
350
|
+
* @param {string} peopleID
|
|
351
|
+
* @param {object} peopleEvent
|
|
352
|
+
* @return {Promise}
|
|
293
353
|
*/
|
|
294
354
|
service.addPeopleEvent = function(websiteID, peopleID, peopleEvent) {
|
|
295
355
|
return crisp.post(
|
|
@@ -304,8 +364,12 @@ function WebsitePeople(service, crisp) {
|
|
|
304
364
|
/**
|
|
305
365
|
* List People Events
|
|
306
366
|
* @memberof WebsitePeople
|
|
367
|
+
* @public
|
|
307
368
|
* @method listPeopleEvents
|
|
308
|
-
* @
|
|
369
|
+
* @param {string} websiteID
|
|
370
|
+
* @param {string} peopleID
|
|
371
|
+
* @param {number} pageNumber
|
|
372
|
+
* @return {Promise}
|
|
309
373
|
*/
|
|
310
374
|
service.listPeopleEvents = function(websiteID, peopleID, pageNumber) {
|
|
311
375
|
return crisp.get(
|
|
@@ -319,8 +383,11 @@ function WebsitePeople(service, crisp) {
|
|
|
319
383
|
/**
|
|
320
384
|
* Get People Data
|
|
321
385
|
* @memberof WebsitePeople
|
|
386
|
+
* @public
|
|
322
387
|
* @method getPeopleData
|
|
323
|
-
* @
|
|
388
|
+
* @param {string} websiteID
|
|
389
|
+
* @param {string} peopleID
|
|
390
|
+
* @return {Promise}
|
|
324
391
|
*/
|
|
325
392
|
service.getPeopleData = function(websiteID, peopleID) {
|
|
326
393
|
return crisp.get(
|
|
@@ -333,8 +400,12 @@ function WebsitePeople(service, crisp) {
|
|
|
333
400
|
/**
|
|
334
401
|
* Save People Data
|
|
335
402
|
* @memberof WebsitePeople
|
|
403
|
+
* @public
|
|
336
404
|
* @method savePeopleData
|
|
337
|
-
* @
|
|
405
|
+
* @param {string} websiteID
|
|
406
|
+
* @param {string} peopleID
|
|
407
|
+
* @param {object} peopleData
|
|
408
|
+
* @return {Promise}
|
|
338
409
|
*/
|
|
339
410
|
service.savePeopleData = function(websiteID, peopleID, peopleData) {
|
|
340
411
|
return crisp.put(
|
|
@@ -349,8 +420,12 @@ function WebsitePeople(service, crisp) {
|
|
|
349
420
|
/**
|
|
350
421
|
* Update People Data
|
|
351
422
|
* @memberof WebsitePeople
|
|
423
|
+
* @public
|
|
352
424
|
* @method updatePeopleData
|
|
353
|
-
* @
|
|
425
|
+
* @param {string} websiteID
|
|
426
|
+
* @param {string} peopleID
|
|
427
|
+
* @param {object} peopleData
|
|
428
|
+
* @return {Promise}
|
|
354
429
|
*/
|
|
355
430
|
service.updatePeopleData = function(websiteID, peopleID, peopleData) {
|
|
356
431
|
return crisp.patch(
|
|
@@ -365,8 +440,11 @@ function WebsitePeople(service, crisp) {
|
|
|
365
440
|
/**
|
|
366
441
|
* Get People Subscription Status
|
|
367
442
|
* @memberof WebsitePeople
|
|
443
|
+
* @public
|
|
368
444
|
* @method getPeopleSubscriptionStatus
|
|
369
|
-
* @
|
|
445
|
+
* @param {string} websiteID
|
|
446
|
+
* @param {string} peopleID
|
|
447
|
+
* @return {Promise}
|
|
370
448
|
*/
|
|
371
449
|
service.getPeopleSubscriptionStatus = function(websiteID, peopleID) {
|
|
372
450
|
return crisp.get(
|
|
@@ -379,8 +457,12 @@ function WebsitePeople(service, crisp) {
|
|
|
379
457
|
/**
|
|
380
458
|
* Update People Subscription Status
|
|
381
459
|
* @memberof WebsitePeople
|
|
460
|
+
* @public
|
|
382
461
|
* @method updatePeopleSubscriptionStatus
|
|
383
|
-
* @
|
|
462
|
+
* @param {string} websiteID
|
|
463
|
+
* @param {string} peopleID
|
|
464
|
+
* @param {object} peopleSubscription
|
|
465
|
+
* @return {Promise}
|
|
384
466
|
*/
|
|
385
467
|
service.updatePeopleSubscriptionStatus = function(
|
|
386
468
|
websiteID, peopleID, peopleSubscription
|
|
@@ -397,8 +479,10 @@ function WebsitePeople(service, crisp) {
|
|
|
397
479
|
/**
|
|
398
480
|
* Export People Profiles
|
|
399
481
|
* @memberof WebsitePeople
|
|
482
|
+
* @public
|
|
400
483
|
* @method exportPeopleProfiles
|
|
401
|
-
* @
|
|
484
|
+
* @param {string} websiteID
|
|
485
|
+
* @return {Promise}
|
|
402
486
|
*/
|
|
403
487
|
service.exportPeopleProfiles = function(websiteID) {
|
|
404
488
|
return crisp.post(
|
|
@@ -411,8 +495,11 @@ function WebsitePeople(service, crisp) {
|
|
|
411
495
|
/**
|
|
412
496
|
* Import People Profiles
|
|
413
497
|
* @memberof WebsitePeople
|
|
498
|
+
* @public
|
|
414
499
|
* @method importPeopleProfiles
|
|
415
|
-
* @
|
|
500
|
+
* @param {string} websiteID
|
|
501
|
+
* @param {object} importSetup
|
|
502
|
+
* @return {Promise}
|
|
416
503
|
*/
|
|
417
504
|
service.importPeopleProfiles = function(websiteID, importSetup) {
|
|
418
505
|
return crisp.post(
|
|
@@ -18,8 +18,10 @@ function WebsiteSettings(service, crisp) {
|
|
|
18
18
|
/**
|
|
19
19
|
* Get Website Settings
|
|
20
20
|
* @memberof WebsiteSettings
|
|
21
|
+
* @public
|
|
21
22
|
* @method getWebsiteSettings
|
|
22
|
-
* @
|
|
23
|
+
* @param {string} websiteID
|
|
24
|
+
* @return {Promise}
|
|
23
25
|
*/
|
|
24
26
|
service.getWebsiteSettings = function(websiteID) {
|
|
25
27
|
return crisp.get(
|
|
@@ -30,8 +32,11 @@ function WebsiteSettings(service, crisp) {
|
|
|
30
32
|
/**
|
|
31
33
|
* Update Website Settings
|
|
32
34
|
* @memberof WebsiteSettings
|
|
35
|
+
* @public
|
|
33
36
|
* @method updateWebsiteSettings
|
|
34
|
-
* @
|
|
37
|
+
* @param {string} websiteID
|
|
38
|
+
* @param {object} settings
|
|
39
|
+
* @return {Promise}
|
|
35
40
|
*/
|
|
36
41
|
service.updateWebsiteSettings = function(websiteID, settings) {
|
|
37
42
|
return crisp.patch(
|
|
@@ -18,8 +18,10 @@ function WebsiteVerify(service, crisp) {
|
|
|
18
18
|
/**
|
|
19
19
|
* Get Verify Settings
|
|
20
20
|
* @memberof WebsiteVerify
|
|
21
|
+
* @public
|
|
21
22
|
* @method getVerifySettings
|
|
22
|
-
* @
|
|
23
|
+
* @param {string} websiteID
|
|
24
|
+
* @return {Promise}
|
|
23
25
|
*/
|
|
24
26
|
service.getVerifySettings = function(websiteID) {
|
|
25
27
|
return crisp.get(
|
|
@@ -30,8 +32,11 @@ function WebsiteVerify(service, crisp) {
|
|
|
30
32
|
/**
|
|
31
33
|
* Update Verify Settings
|
|
32
34
|
* @memberof WebsiteVerify
|
|
35
|
+
* @public
|
|
33
36
|
* @method updateVerifySettings
|
|
34
|
-
* @
|
|
37
|
+
* @param {string} websiteID
|
|
38
|
+
* @param {object} settings
|
|
39
|
+
* @return {Promise}
|
|
35
40
|
*/
|
|
36
41
|
service.updateVerifySettings = function(websiteID, settings) {
|
|
37
42
|
return crisp.patch(
|
|
@@ -44,8 +49,10 @@ function WebsiteVerify(service, crisp) {
|
|
|
44
49
|
/**
|
|
45
50
|
* Get Verify Key
|
|
46
51
|
* @memberof WebsiteVerify
|
|
52
|
+
* @public
|
|
47
53
|
* @method getVerifyKey
|
|
48
|
-
* @
|
|
54
|
+
* @param {string} websiteID
|
|
55
|
+
* @return {Promise}
|
|
49
56
|
*/
|
|
50
57
|
service.getVerifyKey = function(websiteID) {
|
|
51
58
|
return crisp.get(
|
|
@@ -56,8 +63,10 @@ function WebsiteVerify(service, crisp) {
|
|
|
56
63
|
/**
|
|
57
64
|
* Roll Verify Key
|
|
58
65
|
* @memberof WebsiteVerify
|
|
66
|
+
* @public
|
|
59
67
|
* @method rollVerifyKey
|
|
60
|
-
* @
|
|
68
|
+
* @param {string} websiteID
|
|
69
|
+
* @return {Promise}
|
|
61
70
|
*/
|
|
62
71
|
service.rollVerifyKey = function(websiteID) {
|
|
63
72
|
return crisp.post(
|
|
@@ -18,8 +18,10 @@ function WebsiteVisitors(service, crisp) {
|
|
|
18
18
|
/**
|
|
19
19
|
* Count Visitors
|
|
20
20
|
* @memberof WebsiteVisitors
|
|
21
|
+
* @public
|
|
21
22
|
* @method countVisitors
|
|
22
|
-
* @
|
|
23
|
+
* @param {string} websiteID
|
|
24
|
+
* @return {Promise}
|
|
23
25
|
*/
|
|
24
26
|
service.countVisitors = function(websiteID) {
|
|
25
27
|
return crisp.get(
|
|
@@ -30,8 +32,11 @@ function WebsiteVisitors(service, crisp) {
|
|
|
30
32
|
/**
|
|
31
33
|
* List Visitors
|
|
32
34
|
* @memberof WebsiteVisitors
|
|
35
|
+
* @public
|
|
33
36
|
* @method listVisitors
|
|
34
|
-
* @
|
|
37
|
+
* @param {string} websiteID
|
|
38
|
+
* @param {number} pageNumber
|
|
39
|
+
* @return {Promise}
|
|
35
40
|
*/
|
|
36
41
|
service.listVisitors = function(websiteID, pageNumber) {
|
|
37
42
|
return crisp.get(
|
|
@@ -44,8 +49,13 @@ function WebsiteVisitors(service, crisp) {
|
|
|
44
49
|
/**
|
|
45
50
|
* Pinpoint Visitors On A Map
|
|
46
51
|
* @memberof WebsiteVisitors
|
|
52
|
+
* @public
|
|
47
53
|
* @method pinpointVisitorsOnMap
|
|
48
|
-
* @
|
|
54
|
+
* @param {string} websiteID
|
|
55
|
+
* @param {number} [centerLongitude]
|
|
56
|
+
* @param {number} [centerLatitude]
|
|
57
|
+
* @param {number} [centerRadius]
|
|
58
|
+
* @return {Promise}
|
|
49
59
|
*/
|
|
50
60
|
service.pinpointVisitorsOnMap = function(
|
|
51
61
|
websiteID, centerLongitude, centerLatitude, centerRadius
|
|
@@ -75,8 +85,11 @@ function WebsiteVisitors(service, crisp) {
|
|
|
75
85
|
/**
|
|
76
86
|
* Get Session Identifier From Token
|
|
77
87
|
* @memberof WebsiteVisitors
|
|
88
|
+
* @public
|
|
78
89
|
* @method getSessionIdentifierFromToken
|
|
79
|
-
* @
|
|
90
|
+
* @param {string} websiteID
|
|
91
|
+
* @param {string} tokenID
|
|
92
|
+
* @return {Promise}
|
|
80
93
|
*/
|
|
81
94
|
service.getSessionIdentifierFromToken = function(websiteID, tokenID) {
|
|
82
95
|
return crisp.get(
|
|
@@ -89,8 +102,10 @@ function WebsiteVisitors(service, crisp) {
|
|
|
89
102
|
/**
|
|
90
103
|
* Count Blocked Visitors
|
|
91
104
|
* @memberof WebsiteVisitors
|
|
105
|
+
* @public
|
|
92
106
|
* @method countBlockedVisitors
|
|
93
|
-
* @
|
|
107
|
+
* @param {string} websiteID
|
|
108
|
+
* @return {Promise}
|
|
94
109
|
*/
|
|
95
110
|
service.countBlockedVisitors = function(websiteID) {
|
|
96
111
|
return crisp.get(
|
|
@@ -101,8 +116,11 @@ function WebsiteVisitors(service, crisp) {
|
|
|
101
116
|
/**
|
|
102
117
|
* Count Blocked Visitors In Rule
|
|
103
118
|
* @memberof WebsiteVisitors
|
|
119
|
+
* @public
|
|
104
120
|
* @method countBlockedVisitorsInRule
|
|
105
|
-
* @
|
|
121
|
+
* @param {string} websiteID
|
|
122
|
+
* @param {string} rule
|
|
123
|
+
* @return {Promise}
|
|
106
124
|
*/
|
|
107
125
|
service.countBlockedVisitorsInRule = function(websiteID, rule) {
|
|
108
126
|
return crisp.get(
|
|
@@ -113,8 +131,11 @@ function WebsiteVisitors(service, crisp) {
|
|
|
113
131
|
/**
|
|
114
132
|
* Clear Blocked Visitors In Rule
|
|
115
133
|
* @memberof WebsiteVisitors
|
|
134
|
+
* @public
|
|
116
135
|
* @method clearBlockedVisitorsInRule
|
|
117
|
-
* @
|
|
136
|
+
* @param {string} websiteID
|
|
137
|
+
* @param {string} rule
|
|
138
|
+
* @return {Promise}
|
|
118
139
|
*/
|
|
119
140
|
service.clearBlockedVisitorsInRule = function(websiteID, rule) {
|
|
120
141
|
return crisp.delete(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crisp-api",
|
|
3
3
|
"description": "Crisp API wrapper for Node - official, maintained by Crisp",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.4.0",
|
|
5
5
|
"homepage": "https://github.com/crisp-im/node-crisp-api",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
"url": "https://github.com/crisp-im/node-crisp-api/blob/master/LICENSE"
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
|
-
"main": "
|
|
38
|
-
"types": "
|
|
37
|
+
"main": "lib/crisp.js",
|
|
38
|
+
"types": "types/crisp.d.ts",
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">= 10.19.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"test": "check-build",
|
|
44
|
-
"
|
|
44
|
+
"generate:types": "rm -rf ./types/* && tsc"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"check-build": "2.8.2",
|
|
48
|
-
"typescript": "4.
|
|
48
|
+
"typescript": "4.9.5"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"socket.io-client": "4.4.1",
|