crisp-api 10.10.4 → 10.10.6
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 +14 -0
- package/dist/crisp.d.ts +8 -2
- package/dist/crisp.js +2 -2
- package/dist/events/Events.d.ts +601 -0
- package/dist/events/Events.js +8 -0
- package/dist/resources/WebsitePeople.d.ts +1 -0
- package/lib/crisp.ts +20 -0
- package/lib/events/Events.ts +793 -0
- package/lib/resources/WebsitePeople.ts +1 -0
- package/package.json +1 -1
package/lib/crisp.ts
CHANGED
|
@@ -25,6 +25,9 @@ import Plugin, { PluginServiceInterface } from "@/services/plugin";
|
|
|
25
25
|
import Plan, { PlanServiceInterface } from "@/services/plan";
|
|
26
26
|
import Website, { WebsiteServiceInterface } from "@/services/website";
|
|
27
27
|
|
|
28
|
+
// PROJECT: EVENTS
|
|
29
|
+
import { EventsMap, EventName } from "@/events/Events";
|
|
30
|
+
|
|
28
31
|
/**************************************************************************
|
|
29
32
|
* TYPES
|
|
30
33
|
***************************************************************************/
|
|
@@ -424,6 +427,22 @@ class Crisp {
|
|
|
424
427
|
|
|
425
428
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
426
429
|
|
|
430
|
+
/**
|
|
431
|
+
* Binds RTM event (typed variant)
|
|
432
|
+
*/
|
|
433
|
+
on<Name extends EventName>(
|
|
434
|
+
// eslint-disable-next-line no-unused-vars
|
|
435
|
+
event: Name, callback: (data: EventsMap[Name]) => unknown
|
|
436
|
+
): Promise<unknown>;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Binds RTM event (loose variant)
|
|
440
|
+
*/
|
|
441
|
+
on(
|
|
442
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-unused-vars
|
|
443
|
+
event: string, callback: (data: any) => unknown
|
|
444
|
+
): Promise<unknown>;
|
|
445
|
+
|
|
427
446
|
/**
|
|
428
447
|
* Binds RTM event
|
|
429
448
|
*/
|
|
@@ -1046,5 +1065,6 @@ class Crisp {
|
|
|
1046
1065
|
***************************************************************************/
|
|
1047
1066
|
|
|
1048
1067
|
export * from "@/resources";
|
|
1068
|
+
export * from "@/events/Events";
|
|
1049
1069
|
export { Crisp };
|
|
1050
1070
|
export default Crisp;
|