crisp-api 10.10.5 → 10.11.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 +13 -0
- package/EXAMPLES.md +74 -0
- package/README.md +101 -0
- package/dist/crisp.js +16 -23
- package/dist/events/Events.d.ts +6 -2
- package/dist/resources/PluginConnect.js +3 -3
- package/dist/resources/WebsiteBase.d.ts +0 -10
- package/dist/resources/WebsiteBase.js +0 -10
- package/dist/resources/WebsiteBatch.d.ts +0 -18
- package/dist/resources/WebsiteBatch.js +0 -18
- package/dist/resources/WebsiteCampaign.d.ts +0 -1
- package/dist/resources/WebsiteCampaign.js +0 -1
- package/dist/resources/WebsiteConversation.js +17 -20
- package/dist/resources/WebsiteHelpdesk.d.ts +2 -2
- package/dist/resources/WebsiteHelpdesk.js +8 -15
- package/dist/resources/WebsiteInbox.d.ts +2 -0
- package/dist/resources/WebsitePeople.d.ts +1 -0
- package/dist/resources/WebsitePeople.js +1 -6
- package/dist/resources/WebsiteSettings.d.ts +6 -0
- package/dist/resources/WebsiteTeams.d.ts +54 -0
- package/dist/resources/WebsiteTeams.js +73 -0
- package/dist/resources/index.d.ts +1 -0
- package/dist/resources/index.js +1 -0
- package/dist/services/website.d.ts +2 -1
- package/dist/services/website.js +2 -0
- package/eslint.config.mjs +13 -184
- package/lib/crisp.ts +17 -22
- package/lib/events/Events.ts +6 -2
- package/lib/resources/PluginConnect.ts +3 -3
- package/lib/resources/WebsiteBase.ts +0 -10
- package/lib/resources/WebsiteBatch.ts +0 -18
- package/lib/resources/WebsiteCampaign.ts +0 -1
- package/lib/resources/WebsiteConversation.ts +17 -20
- package/lib/resources/WebsiteHelpdesk.ts +8 -15
- package/lib/resources/WebsiteInbox.ts +2 -0
- package/lib/resources/WebsitePeople.ts +2 -6
- package/lib/resources/WebsiteSettings.ts +6 -0
- package/lib/resources/WebsiteTeams.ts +109 -0
- package/lib/resources/index.ts +1 -0
- package/lib/services/bucket.ts +1 -0
- package/lib/services/media.ts +1 -0
- package/lib/services/plan.ts +1 -0
- package/lib/services/website.ts +3 -0
- package/package.json +4 -4
|
@@ -148,17 +148,14 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
148
148
|
*/
|
|
149
149
|
getMessagesInConversation(websiteID, sessionID, timestampBefore, timestampAfter, timestampAround) {
|
|
150
150
|
// Generate query
|
|
151
|
-
|
|
151
|
+
const query = {};
|
|
152
152
|
if (timestampBefore) {
|
|
153
|
-
// @ts-ignore
|
|
154
153
|
query.timestamp_before = String(timestampBefore);
|
|
155
154
|
}
|
|
156
155
|
if (timestampAfter) {
|
|
157
|
-
// @ts-ignore
|
|
158
156
|
query.timestamp_after = String(timestampAfter);
|
|
159
157
|
}
|
|
160
158
|
if (timestampAround) {
|
|
161
|
-
// @ts-ignore
|
|
162
159
|
query.timestamp_around = String(timestampAround);
|
|
163
160
|
}
|
|
164
161
|
return this.crisp.get(this.crisp.prepareRestUrl([
|
|
@@ -344,12 +341,12 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
344
341
|
*/
|
|
345
342
|
changeConversationState(websiteID, sessionID, state, user, origin) {
|
|
346
343
|
// Generate body
|
|
347
|
-
|
|
344
|
+
const body = {
|
|
348
345
|
state: state,
|
|
349
346
|
user: user
|
|
350
347
|
};
|
|
351
348
|
if (origin) {
|
|
352
|
-
// @ts-
|
|
349
|
+
// @ts-expect-error - origin is a string
|
|
353
350
|
body.origin = origin;
|
|
354
351
|
}
|
|
355
352
|
return this.crisp.patch(this.crisp.prepareRestUrl([
|
|
@@ -398,12 +395,12 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
398
395
|
*/
|
|
399
396
|
blockIncomingMessagesForConversation(websiteID, sessionID, blocked, user, origin) {
|
|
400
397
|
// Generate body
|
|
401
|
-
|
|
398
|
+
const body = {
|
|
402
399
|
blocked: (blocked || false),
|
|
403
400
|
user: user
|
|
404
401
|
};
|
|
405
402
|
if (origin) {
|
|
406
|
-
// @ts-
|
|
403
|
+
// @ts-expect-error - body is a Record<string, unknown>
|
|
407
404
|
body.origin = origin;
|
|
408
405
|
}
|
|
409
406
|
return this.crisp.patch(this.crisp.prepareRestUrl([
|
|
@@ -455,11 +452,11 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
455
452
|
*/
|
|
456
453
|
requestEmailTranscriptForConversation(websiteID, sessionID, to, email) {
|
|
457
454
|
// Generate body
|
|
458
|
-
|
|
455
|
+
const body = {
|
|
459
456
|
to: to
|
|
460
457
|
};
|
|
461
458
|
if (email) {
|
|
462
|
-
// @ts-
|
|
459
|
+
// @ts-expect-error - email is a string
|
|
463
460
|
body.email = email;
|
|
464
461
|
}
|
|
465
462
|
return this.crisp.post(this.crisp.prepareRestUrl([
|
|
@@ -529,12 +526,12 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
529
526
|
*/
|
|
530
527
|
initiateNewCallSessionForConversation(websiteID, sessionID, mode, user, origin) {
|
|
531
528
|
// Generate body
|
|
532
|
-
|
|
529
|
+
const body = {
|
|
533
530
|
mode: (mode || "audio"),
|
|
534
531
|
user: user
|
|
535
532
|
};
|
|
536
533
|
if (origin) {
|
|
537
|
-
// @ts-
|
|
534
|
+
// @ts-expect-error - origin is a string
|
|
538
535
|
body.origin = origin;
|
|
539
536
|
}
|
|
540
537
|
return this.crisp.post(this.crisp.prepareRestUrl([
|
|
@@ -556,11 +553,11 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
556
553
|
*/
|
|
557
554
|
abortOngoingCallSessionForConversation(websiteID, sessionID, callID, user, origin) {
|
|
558
555
|
// Generate body
|
|
559
|
-
|
|
556
|
+
const body = {
|
|
560
557
|
user: user
|
|
561
558
|
};
|
|
562
559
|
if (origin) {
|
|
563
|
-
// @ts-
|
|
560
|
+
// @ts-expect-error - origin is a string
|
|
564
561
|
body.origin = origin;
|
|
565
562
|
}
|
|
566
563
|
return this.crisp.delete(this.crisp.prepareRestUrl([
|
|
@@ -582,11 +579,11 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
582
579
|
*/
|
|
583
580
|
requestToolCallForConversation(websiteID, sessionID, command, payload) {
|
|
584
581
|
// Generate body
|
|
585
|
-
|
|
582
|
+
const body = {
|
|
586
583
|
command: command
|
|
587
584
|
};
|
|
588
585
|
if (payload) {
|
|
589
|
-
// @ts-
|
|
586
|
+
// @ts-expect-error - payload is a Record<string, unknown>
|
|
590
587
|
body.payload = payload;
|
|
591
588
|
}
|
|
592
589
|
return this.crisp.post(this.crisp.prepareRestUrl([
|
|
@@ -599,13 +596,13 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
599
596
|
*/
|
|
600
597
|
deliverWidgetButtonActionForConversation(websiteID, sessionID, pluginID, sectionID, itemID, data, value) {
|
|
601
598
|
// Generate body
|
|
602
|
-
|
|
599
|
+
const body = {
|
|
603
600
|
section_id: sectionID,
|
|
604
601
|
item_id: itemID,
|
|
605
602
|
data: data
|
|
606
603
|
};
|
|
607
604
|
if (typeof value !== "undefined") {
|
|
608
|
-
// @ts-
|
|
605
|
+
// @ts-expect-error - value is a string
|
|
609
606
|
body.value = value;
|
|
610
607
|
}
|
|
611
608
|
return this.crisp.post(this.crisp.prepareRestUrl([
|
|
@@ -647,13 +644,13 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
647
644
|
*/
|
|
648
645
|
scheduleReminderForConversation(websiteID, sessionID, date, note, user, origin) {
|
|
649
646
|
// Generate body
|
|
650
|
-
|
|
647
|
+
const body = {
|
|
651
648
|
date: date,
|
|
652
649
|
note: note,
|
|
653
650
|
user: user
|
|
654
651
|
};
|
|
655
652
|
if (origin) {
|
|
656
|
-
// @ts-
|
|
653
|
+
// @ts-expect-error - origin is a string
|
|
657
654
|
body.origin = origin;
|
|
658
655
|
}
|
|
659
656
|
return this.crisp.post(this.crisp.prepareRestUrl([
|
|
@@ -295,7 +295,7 @@ declare class WebsiteHelpdesk extends BaseResource {
|
|
|
295
295
|
resolveHelpdeskLocaleSection(websiteID: string, locale: string, categoryId: string, sectionId: string): Promise<HelpdeskLocaleSection>;
|
|
296
296
|
/**
|
|
297
297
|
* Save Helpdesk Locale Section
|
|
298
|
-
|
|
298
|
+
*/
|
|
299
299
|
saveHelpdeskLocaleSection(websiteID: string, locale: string, categoryId: string, sectionId: string, section: HelpdeskLocaleSection): Promise<any>;
|
|
300
300
|
/**
|
|
301
301
|
* Update Helpdesk Locale Section
|
|
@@ -343,7 +343,7 @@ declare class WebsiteHelpdesk extends BaseResource {
|
|
|
343
343
|
deleteHelpdeskRedirection(websiteID: string, redirectionId: string): Promise<any>;
|
|
344
344
|
/**
|
|
345
345
|
* Resolve Helpdesk Settings
|
|
346
|
-
|
|
346
|
+
*/
|
|
347
347
|
resolveHelpdeskSettings(websiteID: string): Promise<HelpdeskSettings>;
|
|
348
348
|
/**
|
|
349
349
|
* Save Helpdesk Settings
|
|
@@ -194,11 +194,11 @@ class WebsiteHelpdesk extends BaseResource_1.default {
|
|
|
194
194
|
*/
|
|
195
195
|
updateHelpdeskLocaleArticleCategory(websiteID, locale, articleId, categoryId, sectionId) {
|
|
196
196
|
// Generate body
|
|
197
|
-
|
|
197
|
+
const body = {
|
|
198
198
|
category_id: categoryId
|
|
199
199
|
};
|
|
200
200
|
if (sectionId !== undefined) {
|
|
201
|
-
// @ts-
|
|
201
|
+
// @ts-expect-error - sectionId is a string
|
|
202
202
|
body.section_id = sectionId;
|
|
203
203
|
}
|
|
204
204
|
return this.crisp.patch(this.crisp.prepareRestUrl([
|
|
@@ -394,7 +394,7 @@ class WebsiteHelpdesk extends BaseResource_1.default {
|
|
|
394
394
|
;
|
|
395
395
|
/**
|
|
396
396
|
* Save Helpdesk Locale Section
|
|
397
|
-
|
|
397
|
+
*/
|
|
398
398
|
saveHelpdeskLocaleSection(websiteID, locale, categoryId, sectionId, section) {
|
|
399
399
|
return this.crisp.put(this.crisp.prepareRestUrl([
|
|
400
400
|
"website", websiteID, "helpdesk", "locale", locale, "category",
|
|
@@ -429,13 +429,11 @@ class WebsiteHelpdesk extends BaseResource_1.default {
|
|
|
429
429
|
filterDateStart = (filterDateStart || null);
|
|
430
430
|
filterDateEnd = (filterDateEnd || null);
|
|
431
431
|
// Generate query
|
|
432
|
-
|
|
432
|
+
const query = {};
|
|
433
433
|
if (filterDateStart !== null) {
|
|
434
|
-
// @ts-ignore
|
|
435
434
|
query.filter_date_start = filterDateStart;
|
|
436
435
|
}
|
|
437
436
|
if (filterDateEnd !== null) {
|
|
438
|
-
// @ts-ignore
|
|
439
437
|
query.filter_date_end = filterDateEnd;
|
|
440
438
|
}
|
|
441
439
|
return this.crisp.get(this.crisp.prepareRestUrl([
|
|
@@ -451,13 +449,11 @@ class WebsiteHelpdesk extends BaseResource_1.default {
|
|
|
451
449
|
filterDateStart = (filterDateStart || null);
|
|
452
450
|
filterDateEnd = (filterDateEnd || null);
|
|
453
451
|
// Generate query
|
|
454
|
-
|
|
452
|
+
const query = {};
|
|
455
453
|
if (filterDateStart !== null) {
|
|
456
|
-
// @ts-ignore
|
|
457
454
|
query.filter_date_start = filterDateStart;
|
|
458
455
|
}
|
|
459
456
|
if (filterDateEnd !== null) {
|
|
460
|
-
// @ts-ignore
|
|
461
457
|
query.filter_date_end = filterDateEnd;
|
|
462
458
|
}
|
|
463
459
|
return this.crisp.get(this.crisp.prepareRestUrl([
|
|
@@ -534,7 +530,7 @@ class WebsiteHelpdesk extends BaseResource_1.default {
|
|
|
534
530
|
;
|
|
535
531
|
/**
|
|
536
532
|
* Resolve Helpdesk Settings
|
|
537
|
-
|
|
533
|
+
*/
|
|
538
534
|
resolveHelpdeskSettings(websiteID) {
|
|
539
535
|
return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "helpdesk", "settings"]));
|
|
540
536
|
}
|
|
@@ -558,13 +554,11 @@ class WebsiteHelpdesk extends BaseResource_1.default {
|
|
|
558
554
|
*/
|
|
559
555
|
requestHelpdeskDomainChange(websiteID, basic, custom) {
|
|
560
556
|
// Generate body
|
|
561
|
-
|
|
557
|
+
const body = {};
|
|
562
558
|
if (basic !== undefined) {
|
|
563
|
-
// @ts-ignore
|
|
564
559
|
body.basic = basic;
|
|
565
560
|
}
|
|
566
561
|
if (custom !== undefined) {
|
|
567
|
-
// @ts-ignore
|
|
568
562
|
body.custom = custom;
|
|
569
563
|
}
|
|
570
564
|
return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "helpdesk", "domain"]), null, body);
|
|
@@ -576,9 +570,8 @@ class WebsiteHelpdesk extends BaseResource_1.default {
|
|
|
576
570
|
generateHelpdeskDomainSetupFlow(websiteID, custom) {
|
|
577
571
|
custom = (custom || null);
|
|
578
572
|
// Generate query
|
|
579
|
-
|
|
573
|
+
const query = {};
|
|
580
574
|
if (custom !== null) {
|
|
581
|
-
// @ts-ignore
|
|
582
575
|
query.custom = custom;
|
|
583
576
|
}
|
|
584
577
|
return this.crisp.get(this.crisp.prepareRestUrl([
|
|
@@ -95,25 +95,20 @@ class WebsitePeople extends BaseResource_1.default {
|
|
|
95
95
|
*/
|
|
96
96
|
listPeopleProfiles(websiteID, pageNumber = 1, searchField, searchOrder, searchOperator, searchFilter, searchText) {
|
|
97
97
|
// Generate query
|
|
98
|
-
|
|
98
|
+
const query = {};
|
|
99
99
|
if (searchField) {
|
|
100
|
-
// @ts-ignore
|
|
101
100
|
query.sort_field = searchField;
|
|
102
101
|
}
|
|
103
102
|
if (searchOrder) {
|
|
104
|
-
// @ts-ignore
|
|
105
103
|
query.sort_order = searchOrder;
|
|
106
104
|
}
|
|
107
105
|
if (searchOperator) {
|
|
108
|
-
// @ts-ignore
|
|
109
106
|
query.search_operator = searchOperator;
|
|
110
107
|
}
|
|
111
108
|
if (searchFilter) {
|
|
112
|
-
// @ts-ignore
|
|
113
109
|
query.search_filter = searchFilter;
|
|
114
110
|
}
|
|
115
111
|
if (searchText) {
|
|
116
|
-
// @ts-ignore
|
|
117
112
|
query.search_text = searchText;
|
|
118
113
|
}
|
|
119
114
|
return this.crisp.get(this.crisp.prepareRestUrl([
|
|
@@ -9,6 +9,7 @@ export interface WebsiteSettings {
|
|
|
9
9
|
websiteID?: string;
|
|
10
10
|
name?: string;
|
|
11
11
|
domain?: string;
|
|
12
|
+
domain_alternates?: string[];
|
|
12
13
|
logo?: string;
|
|
13
14
|
audit?: WebsiteSettingsAudit;
|
|
14
15
|
contact?: WebsiteSettingsContact;
|
|
@@ -36,6 +37,7 @@ export interface WebsiteSettingsInbox {
|
|
|
36
37
|
export interface WebsiteSettingsEmails {
|
|
37
38
|
rating?: boolean;
|
|
38
39
|
transcript?: boolean;
|
|
40
|
+
trackers?: boolean;
|
|
39
41
|
junk_filter?: boolean;
|
|
40
42
|
}
|
|
41
43
|
export interface WebsiteSettingsChatbox {
|
|
@@ -60,6 +62,7 @@ export interface WebsiteSettingsChatbox {
|
|
|
60
62
|
visitor_compose?: boolean;
|
|
61
63
|
file_transfer?: boolean;
|
|
62
64
|
audio_record?: boolean;
|
|
65
|
+
guard_level?: string;
|
|
63
66
|
mode_initial?: string;
|
|
64
67
|
home?: boolean;
|
|
65
68
|
overlay_search?: boolean;
|
|
@@ -85,6 +88,7 @@ export interface WebsiteSettingsUpdate {
|
|
|
85
88
|
websiteID?: string;
|
|
86
89
|
name?: string;
|
|
87
90
|
domain?: string;
|
|
91
|
+
domain_alternates?: string[];
|
|
88
92
|
logo?: string;
|
|
89
93
|
audit?: WebsiteSettingsUpdateAudit;
|
|
90
94
|
contact?: WebsiteSettingsUpdateContact;
|
|
@@ -112,6 +116,7 @@ export interface WebsiteSettingsUpdateInbox {
|
|
|
112
116
|
export interface WebsiteSettingsUpdateEmails {
|
|
113
117
|
rating?: boolean;
|
|
114
118
|
transcript?: boolean;
|
|
119
|
+
trackers?: boolean;
|
|
115
120
|
junk_filter?: boolean;
|
|
116
121
|
}
|
|
117
122
|
export interface WebsiteSettingsUpdateChatbox {
|
|
@@ -136,6 +141,7 @@ export interface WebsiteSettingsUpdateChatbox {
|
|
|
136
141
|
visitor_compose?: boolean;
|
|
137
142
|
file_transfer?: boolean;
|
|
138
143
|
audio_record?: boolean;
|
|
144
|
+
guard_level?: string;
|
|
139
145
|
mode_initial?: string;
|
|
140
146
|
home?: boolean;
|
|
141
147
|
overlay_search?: boolean;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**************************************************************************
|
|
2
|
+
* IMPORTS
|
|
3
|
+
***************************************************************************/
|
|
4
|
+
import BaseResource from "./BaseResource";
|
|
5
|
+
/**************************************************************************
|
|
6
|
+
* TYPES
|
|
7
|
+
***************************************************************************/
|
|
8
|
+
export type WebsiteTeam = {
|
|
9
|
+
team_id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
emoji?: string;
|
|
12
|
+
operators?: string[];
|
|
13
|
+
created_at?: number;
|
|
14
|
+
updated_at?: number;
|
|
15
|
+
};
|
|
16
|
+
export type WebsiteTeamNew = {
|
|
17
|
+
team_id?: string;
|
|
18
|
+
};
|
|
19
|
+
/**************************************************************************
|
|
20
|
+
* CLASSES
|
|
21
|
+
***************************************************************************/
|
|
22
|
+
/**
|
|
23
|
+
* Crisp WebsiteTeams Resource
|
|
24
|
+
*/
|
|
25
|
+
declare class WebsiteTeamsService extends BaseResource {
|
|
26
|
+
/**
|
|
27
|
+
* List Teams
|
|
28
|
+
*/
|
|
29
|
+
listTeams(websiteID: string, pageNumber?: number): Promise<WebsiteTeam[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Create A New Team
|
|
32
|
+
*/
|
|
33
|
+
createNewTeam(websiteID: string, team: WebsiteTeam): Promise<WebsiteTeamNew>;
|
|
34
|
+
/**
|
|
35
|
+
* Check If Team Exists
|
|
36
|
+
*/
|
|
37
|
+
checkTeamExists(websiteID: string, teamID: string): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* Get Team
|
|
40
|
+
*/
|
|
41
|
+
getTeam(websiteID: string, teamID: string): Promise<WebsiteTeam>;
|
|
42
|
+
/**
|
|
43
|
+
* Save Team
|
|
44
|
+
*/
|
|
45
|
+
saveTeam(websiteID: string, teamID: string, team: WebsiteTeam): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* Delete Team
|
|
48
|
+
*/
|
|
49
|
+
deleteTeam(websiteID: string, teamID: string): Promise<any>;
|
|
50
|
+
}
|
|
51
|
+
/**************************************************************************
|
|
52
|
+
* EXPORTS
|
|
53
|
+
***************************************************************************/
|
|
54
|
+
export default WebsiteTeamsService;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This file is part of node-crisp-api
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2026 Crisp IM SAS
|
|
6
|
+
* All rights belong to Crisp IM SAS
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
/**************************************************************************
|
|
13
|
+
* IMPORTS
|
|
14
|
+
***************************************************************************/
|
|
15
|
+
// PROJECT: RESOURCES
|
|
16
|
+
const BaseResource_1 = __importDefault(require("./BaseResource"));
|
|
17
|
+
/**************************************************************************
|
|
18
|
+
* CLASSES
|
|
19
|
+
***************************************************************************/
|
|
20
|
+
/**
|
|
21
|
+
* Crisp WebsiteTeams Resource
|
|
22
|
+
*/
|
|
23
|
+
class WebsiteTeamsService extends BaseResource_1.default {
|
|
24
|
+
/**
|
|
25
|
+
* List Teams
|
|
26
|
+
*/
|
|
27
|
+
listTeams(websiteID, pageNumber = 1) {
|
|
28
|
+
return this.crisp.get(this.crisp.prepareRestUrl([
|
|
29
|
+
"website", websiteID, "teams", "list", String(pageNumber)
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create A New Team
|
|
34
|
+
*/
|
|
35
|
+
createNewTeam(websiteID, team) {
|
|
36
|
+
return this.crisp.post(this.crisp.prepareRestUrl(["website", websiteID, "team"]), null, team);
|
|
37
|
+
}
|
|
38
|
+
;
|
|
39
|
+
/**
|
|
40
|
+
* Check If Team Exists
|
|
41
|
+
*/
|
|
42
|
+
checkTeamExists(websiteID, teamID) {
|
|
43
|
+
return this.crisp.head(this.crisp.prepareRestUrl(["website", websiteID, "team", teamID]));
|
|
44
|
+
}
|
|
45
|
+
;
|
|
46
|
+
/**
|
|
47
|
+
* Get Team
|
|
48
|
+
*/
|
|
49
|
+
getTeam(websiteID, teamID) {
|
|
50
|
+
return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "team", teamID]));
|
|
51
|
+
}
|
|
52
|
+
;
|
|
53
|
+
/**
|
|
54
|
+
* Save Team
|
|
55
|
+
*/
|
|
56
|
+
saveTeam(websiteID, teamID, team) {
|
|
57
|
+
return this.crisp.put(this.crisp.prepareRestUrl([
|
|
58
|
+
"website", websiteID, "team", teamID
|
|
59
|
+
]), null, team);
|
|
60
|
+
}
|
|
61
|
+
;
|
|
62
|
+
/**
|
|
63
|
+
* Delete Team
|
|
64
|
+
*/
|
|
65
|
+
deleteTeam(websiteID, teamID) {
|
|
66
|
+
return this.crisp.delete(this.crisp.prepareRestUrl(["website", websiteID, "team", teamID]));
|
|
67
|
+
}
|
|
68
|
+
;
|
|
69
|
+
}
|
|
70
|
+
/**************************************************************************
|
|
71
|
+
* EXPORTS
|
|
72
|
+
***************************************************************************/
|
|
73
|
+
exports.default = WebsiteTeamsService;
|
package/dist/resources/index.js
CHANGED
|
@@ -41,5 +41,6 @@ __exportStar(require("./WebsiteInbox"), exports);
|
|
|
41
41
|
__exportStar(require("./WebsiteOperator"), exports);
|
|
42
42
|
__exportStar(require("./WebsitePeople"), exports);
|
|
43
43
|
__exportStar(require("./WebsiteSettings"), exports);
|
|
44
|
+
__exportStar(require("./WebsiteTeams"), exports);
|
|
44
45
|
__exportStar(require("./WebsiteVerify"), exports);
|
|
45
46
|
__exportStar(require("./WebsiteVisitors"), exports);
|
|
@@ -13,6 +13,7 @@ import WebsiteInbox from "../resources/WebsiteInbox";
|
|
|
13
13
|
import WebsiteOperator from "../resources/WebsiteOperator";
|
|
14
14
|
import WebsitePeople from "../resources/WebsitePeople";
|
|
15
15
|
import WebsiteSettings from "../resources/WebsiteSettings";
|
|
16
|
+
import WebsiteTeams from "../resources/WebsiteTeams";
|
|
16
17
|
import WebsiteVerify from "../resources/WebsiteVerify";
|
|
17
18
|
import WebsiteVisitors from "../resources/WebsiteVisitors";
|
|
18
19
|
/**************************************************************************
|
|
@@ -27,6 +28,6 @@ declare class WebsiteService {
|
|
|
27
28
|
/**************************************************************************
|
|
28
29
|
* EXPORTS
|
|
29
30
|
***************************************************************************/
|
|
30
|
-
export interface WebsiteServiceInterface extends WebsiteBase, WebsiteAnalytics, WebsiteAvailability, WebsiteBatch, WebsiteCampaign, WebsiteConnect, WebsiteConversation, WebsiteHelpdesk, WebsiteInbox, WebsiteOperator, WebsitePeople, WebsiteSettings, WebsiteVerify, WebsiteVisitors {
|
|
31
|
+
export interface WebsiteServiceInterface extends WebsiteBase, WebsiteAnalytics, WebsiteAvailability, WebsiteBatch, WebsiteCampaign, WebsiteConnect, WebsiteConversation, WebsiteHelpdesk, WebsiteInbox, WebsiteOperator, WebsitePeople, WebsiteSettings, WebsiteTeams, WebsiteVerify, WebsiteVisitors {
|
|
31
32
|
}
|
|
32
33
|
export default WebsiteService;
|
package/dist/services/website.js
CHANGED
|
@@ -25,6 +25,7 @@ const WebsiteInbox_1 = __importDefault(require("../resources/WebsiteInbox"));
|
|
|
25
25
|
const WebsiteOperator_1 = __importDefault(require("../resources/WebsiteOperator"));
|
|
26
26
|
const WebsitePeople_1 = __importDefault(require("../resources/WebsitePeople"));
|
|
27
27
|
const WebsiteSettings_1 = __importDefault(require("../resources/WebsiteSettings"));
|
|
28
|
+
const WebsiteTeams_1 = __importDefault(require("../resources/WebsiteTeams"));
|
|
28
29
|
const WebsiteVerify_1 = __importDefault(require("../resources/WebsiteVerify"));
|
|
29
30
|
const WebsiteVisitors_1 = __importDefault(require("../resources/WebsiteVisitors"));
|
|
30
31
|
/**************************************************************************
|
|
@@ -49,6 +50,7 @@ class WebsiteService {
|
|
|
49
50
|
WebsiteOperator_1.default,
|
|
50
51
|
WebsitePeople_1.default,
|
|
51
52
|
WebsiteSettings_1.default,
|
|
53
|
+
WebsiteTeams_1.default,
|
|
52
54
|
WebsiteVerify_1.default,
|
|
53
55
|
WebsiteVisitors_1.default
|
|
54
56
|
];
|