mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Add missing Intercom method: getVisitorId
This commit is contained in:
Vendored
+3
-1
@@ -43,7 +43,8 @@ declare namespace Intercom_ {
|
||||
| 'onShow'
|
||||
| 'onUnreadCountChange'
|
||||
| 'onActivatorClick'
|
||||
| 'trackEvent';
|
||||
| 'trackEvent'
|
||||
| 'getVisitorId';
|
||||
|
||||
interface IntercomStatic {
|
||||
(command: 'boot', param: IntercomSettings): void;
|
||||
@@ -53,6 +54,7 @@ declare namespace Intercom_ {
|
||||
(command: 'onHide' | 'onShow' | 'onActivatorClick', param?: () => void): void;
|
||||
(command: 'trackEvent', tag?: string, metadata?: any): void;
|
||||
(command: 'onUnreadCountChange', cb: (unreadCount: number) => void): void;
|
||||
(command: 'getVisitorId'): string;
|
||||
(command: IntercomCommand, param1?: any, param2?: any): void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ Intercom('onHide', () => { /* Do stuff */ });
|
||||
Intercom('onUnreadCountChange', (unreadCount: number) => { /* Do stuff */ });
|
||||
Intercom('onActivatorClick', () => { /* Do stuff */ });
|
||||
Intercom('trackEvent', 'invited-friend');
|
||||
const visitorId = Intercom('getVisitorId');
|
||||
|
||||
const metadata = {
|
||||
invitee_email: 'pi@example.org',
|
||||
|
||||
Reference in New Issue
Block a user