crisp-api 9.13.0 → 10.0.2

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.
Files changed (116) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/dist/crisp.d.ts +167 -0
  4. package/dist/crisp.js +764 -0
  5. package/dist/resources/BaseResource.d.ts +15 -0
  6. package/dist/resources/BaseResource.js +20 -0
  7. package/dist/resources/BucketURL.d.ts +28 -0
  8. package/dist/resources/BucketURL.js +29 -0
  9. package/dist/resources/MediaAnimation.d.ts +14 -0
  10. package/dist/resources/MediaAnimation.js +32 -0
  11. package/dist/resources/PluginConnect.d.ts +50 -0
  12. package/dist/resources/PluginConnect.js +73 -0
  13. package/dist/resources/PluginSubscription.d.ts +103 -0
  14. package/dist/resources/PluginSubscription.js +122 -0
  15. package/dist/resources/WebsiteAnalytics.d.ts +14 -0
  16. package/dist/resources/WebsiteAnalytics.js +29 -0
  17. package/dist/resources/WebsiteAvailability.d.ts +31 -0
  18. package/dist/resources/WebsiteAvailability.js +36 -0
  19. package/dist/resources/WebsiteBase.d.ts +60 -0
  20. package/dist/resources/WebsiteBase.js +71 -0
  21. package/dist/resources/WebsiteBatch.d.ts +52 -0
  22. package/dist/resources/WebsiteBatch.js +70 -0
  23. package/dist/resources/WebsiteCampaign.d.ts +199 -0
  24. package/dist/resources/WebsiteCampaign.js +194 -0
  25. package/dist/resources/WebsiteConversation.d.ts +701 -0
  26. package/dist/resources/WebsiteConversation.js +595 -0
  27. package/dist/resources/WebsiteHelpdesk.d.ts +347 -0
  28. package/dist/resources/WebsiteHelpdesk.js +587 -0
  29. package/dist/resources/WebsiteOperator.d.ts +79 -0
  30. package/dist/resources/WebsiteOperator.js +93 -0
  31. package/dist/resources/WebsitePeople.d.ts +248 -0
  32. package/dist/resources/WebsitePeople.js +276 -0
  33. package/dist/resources/WebsiteSettings.d.ts +159 -0
  34. package/dist/resources/WebsiteSettings.js +36 -0
  35. package/dist/resources/WebsiteVerify.d.ts +38 -0
  36. package/dist/resources/WebsiteVerify.js +50 -0
  37. package/dist/resources/WebsiteVisitors.d.ts +113 -0
  38. package/dist/resources/WebsiteVisitors.js +88 -0
  39. package/dist/resources/index.d.ts +17 -0
  40. package/dist/resources/index.js +40 -0
  41. package/dist/services/bucket.d.ts +13 -0
  42. package/dist/services/bucket.js +28 -0
  43. package/dist/services/media.d.ts +13 -0
  44. package/dist/services/media.js +28 -0
  45. package/dist/services/plugin.d.ts +14 -0
  46. package/dist/services/plugin.js +30 -0
  47. package/dist/services/website.d.ts +24 -0
  48. package/dist/services/website.js +50 -0
  49. package/eslint.config.mjs +208 -0
  50. package/lib/crisp.ts +957 -0
  51. package/lib/resources/BaseResource.ts +29 -0
  52. package/lib/resources/BucketURL.ts +49 -0
  53. package/lib/resources/MediaAnimation.ts +34 -0
  54. package/lib/resources/PluginConnect.ts +128 -0
  55. package/lib/resources/PluginSubscription.ts +208 -0
  56. package/lib/resources/WebsiteAnalytics.ts +31 -0
  57. package/lib/resources/WebsiteAvailability.ts +54 -0
  58. package/lib/resources/WebsiteBase.ts +108 -0
  59. package/lib/resources/WebsiteBatch.ts +96 -0
  60. package/lib/resources/WebsiteCampaign.ts +399 -0
  61. package/lib/resources/WebsiteConversation.ts +1416 -0
  62. package/lib/resources/WebsiteHelpdesk.ts +982 -0
  63. package/lib/resources/WebsiteOperator.ts +161 -0
  64. package/lib/resources/WebsitePeople.ts +527 -0
  65. package/lib/resources/WebsiteSettings.ts +192 -0
  66. package/lib/resources/WebsiteVerify.ts +76 -0
  67. package/lib/resources/WebsiteVisitors.ts +196 -0
  68. package/lib/resources/index.ts +25 -0
  69. package/lib/services/bucket.ts +28 -0
  70. package/lib/services/media.ts +28 -0
  71. package/lib/services/plugin.ts +32 -0
  72. package/lib/services/website.ts +62 -0
  73. package/package.json +16 -11
  74. package/tsconfig.json +12 -5
  75. package/lib/crisp.js +0 -1171
  76. package/lib/resources/BucketURL.js +0 -34
  77. package/lib/resources/MediaAnimation.js +0 -41
  78. package/lib/resources/PluginConnect.js +0 -119
  79. package/lib/resources/PluginSubscription.js +0 -234
  80. package/lib/resources/WebsiteAnalytics.js +0 -37
  81. package/lib/resources/WebsiteAvailability.js +0 -48
  82. package/lib/resources/WebsiteBase.js +0 -100
  83. package/lib/resources/WebsiteBatch.js +0 -92
  84. package/lib/resources/WebsiteCampaign.js +0 -396
  85. package/lib/resources/WebsiteConversation.js +0 -1261
  86. package/lib/resources/WebsiteHelpdesk.js +0 -1198
  87. package/lib/resources/WebsiteOperator.js +0 -167
  88. package/lib/resources/WebsitePeople.js +0 -516
  89. package/lib/resources/WebsiteSettings.js +0 -50
  90. package/lib/resources/WebsiteVerify.js +0 -79
  91. package/lib/resources/WebsiteVisitors.js +0 -148
  92. package/lib/services/Bucket.js +0 -28
  93. package/lib/services/Media.js +0 -28
  94. package/lib/services/Plugin.js +0 -29
  95. package/lib/services/Website.js +0 -39
  96. package/types/crisp.d.ts +0 -151
  97. package/types/resources/BucketURL.d.ts +0 -15
  98. package/types/resources/MediaAnimation.d.ts +0 -15
  99. package/types/resources/PluginConnect.d.ts +0 -15
  100. package/types/resources/PluginSubscription.d.ts +0 -15
  101. package/types/resources/WebsiteAnalytics.d.ts +0 -15
  102. package/types/resources/WebsiteAvailability.d.ts +0 -15
  103. package/types/resources/WebsiteBase.d.ts +0 -15
  104. package/types/resources/WebsiteBatch.d.ts +0 -15
  105. package/types/resources/WebsiteCampaign.d.ts +0 -15
  106. package/types/resources/WebsiteConversation.d.ts +0 -15
  107. package/types/resources/WebsiteHelpdesk.d.ts +0 -15
  108. package/types/resources/WebsiteOperator.d.ts +0 -15
  109. package/types/resources/WebsitePeople.d.ts +0 -15
  110. package/types/resources/WebsiteSettings.d.ts +0 -15
  111. package/types/resources/WebsiteVerify.d.ts +0 -15
  112. package/types/resources/WebsiteVisitors.d.ts +0 -15
  113. package/types/services/Bucket.d.ts +0 -14
  114. package/types/services/Media.d.ts +0 -14
  115. package/types/services/Plugin.d.ts +0 -14
  116. package/types/services/Website.d.ts +0 -14
@@ -0,0 +1,159 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import BaseResource from "./BaseResource";
5
+ export interface WebsiteSettings {
6
+ websiteID?: string;
7
+ name?: string;
8
+ domain?: string;
9
+ logo?: string;
10
+ audit?: WebsiteSettingsAudit;
11
+ contact?: WebsiteSettingsContact;
12
+ inbox?: WebsiteSettingsInbox;
13
+ emails?: WebsiteSettingsEmails;
14
+ chatbox?: WebsiteSettingsChatbox;
15
+ }
16
+ export interface WebsiteSettingsAudit {
17
+ log?: boolean;
18
+ }
19
+ export interface WebsiteSettingsContact {
20
+ email?: string;
21
+ phone?: string;
22
+ messenger?: string;
23
+ telegram?: string;
24
+ twitter?: string;
25
+ whatsapp?: string;
26
+ instagram?: string;
27
+ }
28
+ export interface WebsiteSettingsInbox {
29
+ lock_removal?: boolean;
30
+ force_operator_token?: boolean;
31
+ locale?: string;
32
+ }
33
+ export interface WebsiteSettingsEmails {
34
+ rating?: boolean;
35
+ transcript?: boolean;
36
+ enrich?: boolean;
37
+ junk_filter?: boolean;
38
+ }
39
+ export interface WebsiteSettingsChatbox {
40
+ tile?: string;
41
+ wait_game?: boolean;
42
+ website_logo?: boolean;
43
+ last_operator_face?: boolean;
44
+ ongoing_operator_face?: boolean;
45
+ activity_metrics?: boolean;
46
+ operator_privacy?: boolean;
47
+ visitor_privacy?: boolean;
48
+ availability_tooltip?: boolean;
49
+ hide_vacation?: boolean;
50
+ hide_on_away?: boolean;
51
+ hide_on_mobile?: boolean;
52
+ position_reverse?: boolean;
53
+ email_visitors?: boolean;
54
+ phone_visitors?: boolean;
55
+ force_identify?: boolean;
56
+ ignore_privacy?: boolean;
57
+ visitor_compose?: boolean;
58
+ file_transfer?: boolean;
59
+ audio_record?: boolean;
60
+ overlay_search?: boolean;
61
+ overlay_mode?: boolean;
62
+ helpdesk_link?: boolean;
63
+ helpdesk_only?: boolean;
64
+ status_health_dead?: boolean;
65
+ check_domain?: boolean;
66
+ color_theme?: string;
67
+ text_theme?: string;
68
+ welcome_message?: string;
69
+ locale?: string;
70
+ allowed_pages?: string[];
71
+ blocked_pages?: string[];
72
+ blocked_countries?: string[];
73
+ blocked_locales?: string[];
74
+ }
75
+ export interface WebsiteSettingsUpdate {
76
+ websiteID?: string;
77
+ name?: string;
78
+ domain?: string;
79
+ logo?: string;
80
+ audit?: WebsiteSettingsUpdateAudit;
81
+ contact?: WebsiteSettingsUpdateContact;
82
+ inbox?: WebsiteSettingsUpdateInbox;
83
+ emails?: WebsiteSettingsUpdateEmails;
84
+ chatbox?: WebsiteSettingsUpdateChatbox;
85
+ }
86
+ export interface WebsiteSettingsUpdateAudit {
87
+ log?: boolean;
88
+ }
89
+ export interface WebsiteSettingsUpdateContact {
90
+ email?: string;
91
+ phone?: string;
92
+ messenger?: string;
93
+ telegram?: string;
94
+ twitter?: string;
95
+ whatsapp?: string;
96
+ instagram?: string;
97
+ }
98
+ export interface WebsiteSettingsUpdateInbox {
99
+ lock_removal?: boolean;
100
+ force_operator_token?: boolean;
101
+ locale?: string;
102
+ }
103
+ export interface WebsiteSettingsUpdateEmails {
104
+ rating?: boolean;
105
+ transcript?: boolean;
106
+ enrich?: boolean;
107
+ junk_filter?: boolean;
108
+ }
109
+ export interface WebsiteSettingsUpdateChatbox {
110
+ tile?: string;
111
+ wait_game?: boolean;
112
+ website_logo?: boolean;
113
+ last_operator_face?: boolean;
114
+ ongoing_operator_face?: boolean;
115
+ activity_metrics?: boolean;
116
+ operator_privacy?: boolean;
117
+ visitor_privacy?: boolean;
118
+ availability_tooltip?: boolean;
119
+ hide_vacation?: boolean;
120
+ hide_on_away?: boolean;
121
+ hide_on_mobile?: boolean;
122
+ position_reverse?: boolean;
123
+ email_visitors?: boolean;
124
+ phone_visitors?: boolean;
125
+ force_identify?: boolean;
126
+ ignore_privacy?: boolean;
127
+ visitor_compose?: boolean;
128
+ file_transfer?: boolean;
129
+ audio_record?: boolean;
130
+ overlay_search?: boolean;
131
+ overlay_mode?: boolean;
132
+ helpdesk_link?: boolean;
133
+ helpdesk_only?: boolean;
134
+ status_health_dead?: boolean;
135
+ check_domain?: boolean;
136
+ color_theme?: string;
137
+ text_theme?: string;
138
+ welcome_message?: string;
139
+ locale?: string;
140
+ allowed_pages?: string[];
141
+ blocked_pages?: string[];
142
+ blocked_countries?: string[];
143
+ blocked_locales?: string[];
144
+ blocked_ips?: string[];
145
+ }
146
+ /**
147
+ * Crisp WebsiteSettings Resource
148
+ */
149
+ declare class WebsiteSettingsService extends BaseResource {
150
+ /**
151
+ * Get Website Settings
152
+ */
153
+ getWebsiteSettings(websiteID: string): Promise<WebsiteSettings>;
154
+ /**
155
+ * Update Website Settings
156
+ */
157
+ updateWebsiteSettings(websiteID: string, settings: WebsiteSettingsUpdate): Promise<any>;
158
+ }
159
+ export default WebsiteSettingsService;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Baptiste Jamin <baptiste@crisp.chat>
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
+ * Crisp WebsiteSettings Resource
19
+ */
20
+ class WebsiteSettingsService extends BaseResource_1.default {
21
+ /**
22
+ * Get Website Settings
23
+ */
24
+ getWebsiteSettings(websiteID) {
25
+ return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "settings"]));
26
+ }
27
+ ;
28
+ /**
29
+ * Update Website Settings
30
+ */
31
+ updateWebsiteSettings(websiteID, settings) {
32
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "settings"]), null, settings);
33
+ }
34
+ ;
35
+ }
36
+ exports.default = WebsiteSettingsService;
@@ -0,0 +1,38 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import BaseResource from "./BaseResource";
5
+ export interface WebsiteVerifyKeyData {
6
+ data?: WebsiteVerifyKey;
7
+ }
8
+ export interface WebsiteVerifySettings {
9
+ enabled?: boolean;
10
+ }
11
+ export interface WebsiteVerifyKey {
12
+ secret?: string;
13
+ }
14
+ export interface WebsiteVerifySettingsUpdate {
15
+ enabled?: boolean;
16
+ }
17
+ /**
18
+ * Crisp WebsiteVerify Resource
19
+ */
20
+ declare class WebsiteVerify extends BaseResource {
21
+ /**
22
+ * Get Verify Settings
23
+ */
24
+ getVerifySettings(websiteID: string): Promise<WebsiteVerifySettings>;
25
+ /**
26
+ * Update Verify Settings
27
+ */
28
+ updateVerifySettings(websiteID: string, settings: WebsiteVerifySettingsUpdate): Promise<any>;
29
+ /**
30
+ * Get Verify Key
31
+ */
32
+ getVerifyKey(websiteID: string): Promise<WebsiteVerifyKey>;
33
+ /**
34
+ * Roll Verify Key
35
+ */
36
+ rollVerifyKey(websiteID: string): Promise<any>;
37
+ }
38
+ export default WebsiteVerify;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Valerian Saliou <valerian@valeriansaliou.name>
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
+ * Crisp WebsiteVerify Resource
19
+ */
20
+ class WebsiteVerify extends BaseResource_1.default {
21
+ /**
22
+ * Get Verify Settings
23
+ */
24
+ getVerifySettings(websiteID) {
25
+ return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "verify", "settings"]));
26
+ }
27
+ ;
28
+ /**
29
+ * Update Verify Settings
30
+ */
31
+ updateVerifySettings(websiteID, settings) {
32
+ return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "verify", "settings"]), null, settings);
33
+ }
34
+ ;
35
+ /**
36
+ * Get Verify Key
37
+ */
38
+ getVerifyKey(websiteID) {
39
+ return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "verify", "key"]));
40
+ }
41
+ ;
42
+ /**
43
+ * Roll Verify Key
44
+ */
45
+ rollVerifyKey(websiteID) {
46
+ return this.crisp.post(this.crisp.prepareRestUrl(["website", websiteID, "verify", "key"]), null, null);
47
+ }
48
+ ;
49
+ }
50
+ exports.default = WebsiteVerify;
@@ -0,0 +1,113 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import BaseResource from "./BaseResource";
5
+ export interface WebsiteVisitorCount {
6
+ count?: number;
7
+ active?: number;
8
+ limited?: boolean;
9
+ }
10
+ export interface WebsiteVisitor {
11
+ session_id?: string;
12
+ inbox_id?: string;
13
+ nickname?: string;
14
+ email?: string;
15
+ avatar?: string;
16
+ useragent?: string;
17
+ initiated?: boolean;
18
+ active?: boolean;
19
+ last_page?: WebsiteVisitorLastPage;
20
+ geolocation?: WebsiteVisitorGeolocation;
21
+ timezone?: number;
22
+ capabilities?: string[];
23
+ locales?: string[];
24
+ }
25
+ export interface WebsiteVisitorLastPage {
26
+ page_title?: string;
27
+ page_url?: string;
28
+ }
29
+ export interface WebsiteVisitorGeolocation {
30
+ coordinates?: WebsiteVisitorGeolocationCoordinates;
31
+ city?: string;
32
+ region?: string;
33
+ country?: string;
34
+ }
35
+ export interface WebsiteVisitorGeolocationCoordinates {
36
+ latitude?: number;
37
+ longitude?: number;
38
+ }
39
+ export interface WebsiteVisitorsMapPointsData {
40
+ data?: WebsiteVisitorsMapPoint[];
41
+ }
42
+ export interface WebsiteVisitorsMapPoint {
43
+ visitors?: WebsiteVisitorsMapPointVisitors;
44
+ geolocation?: WebsiteVisitorsMapPointGeolocation;
45
+ }
46
+ export interface WebsiteVisitorsMapPointGeolocation {
47
+ coordinates?: WebsiteVisitorsMapPointGeolocationCoordinates;
48
+ city?: string;
49
+ region?: string;
50
+ country?: string;
51
+ }
52
+ export interface WebsiteVisitorsMapPointGeolocationCoordinates {
53
+ latitude?: number;
54
+ longitude?: number;
55
+ }
56
+ export interface WebsiteVisitorsMapPointVisitors {
57
+ count?: number;
58
+ threshold?: number;
59
+ sessions?: WebsiteVisitorsMapPointVisitorsSession[];
60
+ }
61
+ export interface WebsiteVisitorsMapPointVisitorsSession {
62
+ session_id?: string;
63
+ nickname?: string;
64
+ email?: string;
65
+ avatar?: string;
66
+ initiated?: boolean;
67
+ active?: boolean;
68
+ last_page?: WebsiteVisitorLastPage;
69
+ timezone?: number;
70
+ capabilities?: string[];
71
+ locales?: string[];
72
+ }
73
+ export interface WebsiteVisitorsToken {
74
+ session_id?: string;
75
+ }
76
+ export interface WebsiteVisitorsBlocked {
77
+ rule?: string[];
78
+ blocked?: number;
79
+ }
80
+ /**
81
+ * Crisp WebsiteVisitors Resource
82
+ */
83
+ declare class WebsiteVisitors extends BaseResource {
84
+ /**
85
+ * Count Visitors
86
+ */
87
+ countVisitors(websiteID: string): Promise<WebsiteVisitorCount>;
88
+ /**
89
+ * List Visitors
90
+ */
91
+ listVisitors(websiteID: string, pageNumber?: number): Promise<WebsiteVisitor[]>;
92
+ /**
93
+ * Pinpoint Visitors On A Map
94
+ */
95
+ pinpointVisitorsOnMap(websiteID: string, centerLongitude: number, centerLatitude: number, centerRadius: number): Promise<WebsiteVisitorsMapPoint[]>;
96
+ /**
97
+ * Get Session Identifier From Token
98
+ */
99
+ getSessionIdentifierFromToken(websiteID: string, tokenID: string): Promise<WebsiteVisitorsToken>;
100
+ /**
101
+ * Count Blocked Visitors
102
+ */
103
+ countBlockedVisitors(websiteID: string): Promise<WebsiteVisitorsBlocked>;
104
+ /**
105
+ * Count Blocked Visitors In Rule
106
+ */
107
+ countBlockedVisitorsInRule(websiteID: string, rule: string): Promise<number>;
108
+ /**
109
+ * Clear Blocked Visitors In Rule
110
+ */
111
+ clearBlockedVisitorsInRule(websiteID: string, rule: string): Promise<any>;
112
+ }
113
+ export default WebsiteVisitors;
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Valerian Saliou <valerian@valeriansaliou.name>
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
+ * Crisp WebsiteVisitors Resource
19
+ */
20
+ class WebsiteVisitors extends BaseResource_1.default {
21
+ /**
22
+ * Count Visitors
23
+ */
24
+ countVisitors(websiteID) {
25
+ return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "visitors", "count"]));
26
+ }
27
+ ;
28
+ /**
29
+ * List Visitors
30
+ */
31
+ listVisitors(websiteID, pageNumber = 1) {
32
+ return this.crisp.get(this.crisp.prepareRestUrl([
33
+ "website", websiteID, "visitors", "list", String(pageNumber)
34
+ ]));
35
+ }
36
+ ;
37
+ /**
38
+ * Pinpoint Visitors On A Map
39
+ */
40
+ pinpointVisitorsOnMap(websiteID, centerLongitude, centerLatitude, centerRadius) {
41
+ // Generate query
42
+ const query = {};
43
+ if (typeof centerLongitude === "number") {
44
+ query.center_longitude = String(centerLongitude);
45
+ }
46
+ if (typeof centerLatitude === "number") {
47
+ query.center_latitude = String(centerLatitude);
48
+ }
49
+ if (typeof centerRadius === "number") {
50
+ query.center_radius = String(centerRadius);
51
+ }
52
+ return this.crisp.get(this.crisp.prepareRestUrl([
53
+ "website", websiteID, "visitors", "map"
54
+ ]), query);
55
+ }
56
+ ;
57
+ /**
58
+ * Get Session Identifier From Token
59
+ */
60
+ getSessionIdentifierFromToken(websiteID, tokenID) {
61
+ return this.crisp.get(this.crisp.prepareRestUrl([
62
+ "website", websiteID, "visitors", "token", tokenID
63
+ ]));
64
+ }
65
+ ;
66
+ /**
67
+ * Count Blocked Visitors
68
+ */
69
+ countBlockedVisitors(websiteID) {
70
+ return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "visitors", "blocked"]));
71
+ }
72
+ ;
73
+ /**
74
+ * Count Blocked Visitors In Rule
75
+ */
76
+ countBlockedVisitorsInRule(websiteID, rule) {
77
+ return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "visitors", "blocked", rule]));
78
+ }
79
+ ;
80
+ /**
81
+ * Clear Blocked Visitors In Rule
82
+ */
83
+ clearBlockedVisitorsInRule(websiteID, rule) {
84
+ return this.crisp.delete(this.crisp.prepareRestUrl(["website", websiteID, "visitors", "blocked", rule]));
85
+ }
86
+ ;
87
+ }
88
+ exports.default = WebsiteVisitors;
@@ -0,0 +1,17 @@
1
+ export * from "./BaseResource";
2
+ export * from "./BucketURL";
3
+ export * from "./MediaAnimation";
4
+ export * from "./PluginConnect";
5
+ export * from "./PluginSubscription";
6
+ export * from "./WebsiteAnalytics";
7
+ export * from "./WebsiteAvailability";
8
+ export * from "./WebsiteBase";
9
+ export * from "./WebsiteBatch";
10
+ export * from "./WebsiteCampaign";
11
+ export * from "./WebsiteConversation";
12
+ export * from "./WebsiteHelpdesk";
13
+ export * from "./WebsiteOperator";
14
+ export * from "./WebsitePeople";
15
+ export * from "./WebsiteSettings";
16
+ export * from "./WebsiteVerify";
17
+ export * from "./WebsiteVisitors";
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Baptiste Jamin <baptiste@crisp.chat>
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ // Used to export all types
24
+ __exportStar(require("./BaseResource"), exports);
25
+ __exportStar(require("./BucketURL"), exports);
26
+ __exportStar(require("./MediaAnimation"), exports);
27
+ __exportStar(require("./PluginConnect"), exports);
28
+ __exportStar(require("./PluginSubscription"), exports);
29
+ __exportStar(require("./WebsiteAnalytics"), exports);
30
+ __exportStar(require("./WebsiteAvailability"), exports);
31
+ __exportStar(require("./WebsiteBase"), exports);
32
+ __exportStar(require("./WebsiteBatch"), exports);
33
+ __exportStar(require("./WebsiteCampaign"), exports);
34
+ __exportStar(require("./WebsiteConversation"), exports);
35
+ __exportStar(require("./WebsiteHelpdesk"), exports);
36
+ __exportStar(require("./WebsiteOperator"), exports);
37
+ __exportStar(require("./WebsitePeople"), exports);
38
+ __exportStar(require("./WebsiteSettings"), exports);
39
+ __exportStar(require("./WebsiteVerify"), exports);
40
+ __exportStar(require("./WebsiteVisitors"), exports);
@@ -0,0 +1,13 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import BucketURL from "../resources/BucketURL";
5
+ /**
6
+ * Bucket Service
7
+ */
8
+ declare class BucketService {
9
+ __resources: any[];
10
+ }
11
+ export interface BucketServiceInterface extends BucketURL {
12
+ }
13
+ export default BucketService;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Baptiste Jamin <baptiste@crisp.chat>
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 BucketURL_1 = __importDefault(require("../resources/BucketURL"));
17
+ /**
18
+ * Bucket Service
19
+ */
20
+ class BucketService {
21
+ constructor() {
22
+ /* eslint-disable @typescript-eslint/no-explicit-any */
23
+ this.__resources = [
24
+ BucketURL_1.default
25
+ ];
26
+ }
27
+ }
28
+ exports.default = BucketService;
@@ -0,0 +1,13 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import MediaAnimation from "../resources/MediaAnimation";
5
+ /**
6
+ * Crisp Media Service
7
+ */
8
+ declare class MediaService {
9
+ __resources: any[];
10
+ }
11
+ export interface MediaServiceInterface extends MediaAnimation {
12
+ }
13
+ export default MediaService;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Baptiste Jamin <baptiste@crisp.chat>
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 MediaAnimation_1 = __importDefault(require("../resources/MediaAnimation"));
17
+ /**
18
+ * Crisp Media Service
19
+ */
20
+ class MediaService {
21
+ constructor() {
22
+ /* eslint-disable @typescript-eslint/no-explicit-any */
23
+ this.__resources = [
24
+ MediaAnimation_1.default
25
+ ];
26
+ }
27
+ }
28
+ exports.default = MediaService;
@@ -0,0 +1,14 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import PluginConnect from "../resources/PluginConnect";
5
+ import PluginSubscription from "../resources/PluginSubscription";
6
+ /**
7
+ * Crisp Plugin Service
8
+ */
9
+ declare class PluginService {
10
+ __resources: any[];
11
+ }
12
+ export interface PluginServiceInterface extends PluginConnect, PluginSubscription {
13
+ }
14
+ export default PluginService;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Baptiste Jamin <baptiste@crisp.chat>
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 PluginConnect_1 = __importDefault(require("../resources/PluginConnect"));
17
+ const PluginSubscription_1 = __importDefault(require("../resources/PluginSubscription"));
18
+ /**
19
+ * Crisp Plugin Service
20
+ */
21
+ class PluginService {
22
+ constructor() {
23
+ /* eslint-disable @typescript-eslint/no-explicit-any */
24
+ this.__resources = [
25
+ PluginConnect_1.default,
26
+ PluginSubscription_1.default
27
+ ];
28
+ }
29
+ }
30
+ exports.default = PluginService;