File tree Expand file tree Collapse file tree 5 files changed +363
-361
lines changed Expand file tree Collapse file tree 5 files changed +363
-361
lines changed Original file line number Diff line number Diff line change @@ -554,6 +554,7 @@ export type SubscriptionMeta = {
554
554
export type Account = {
555
555
first_name : string
556
556
last_name : string
557
+ date_joined : string
557
558
sign_up_type : SignupType
558
559
id : number
559
560
email : string
@@ -800,7 +801,7 @@ export type Webhook = {
800
801
updated_at : string
801
802
}
802
803
803
- export type AccountModel = User & {
804
+ export type AccountModel = Account & {
804
805
organisations : Organisation [ ]
805
806
}
806
807
Original file line number Diff line number Diff line change 1
- import { User } from 'common/types/responses'
1
+ import { AccountModel , User } from 'common/types/responses'
2
2
3
- export default function ( user : User | undefined , defaultName = 'Unknown' ) {
3
+ export default function (
4
+ user : AccountModel | undefined ,
5
+ defaultName = 'Unknown' ,
6
+ ) {
4
7
if ( ! user ) {
5
8
return defaultName
6
9
}
Original file line number Diff line number Diff line change @@ -15,10 +15,30 @@ type Crisp = {
15
15
// The push method accepts a CrispCommand array.
16
16
push : ( command : CrispCommand ) => void
17
17
}
18
-
18
+ declare namespace UniversalAnalytics {
19
+ interface PageviewFieldsObject {
20
+ hitType : 'pageview' | 'event'
21
+ location ?: string
22
+ page ?: string
23
+ title ?: string
24
+ [ key : string ] : any
25
+ }
26
+ }
19
27
export declare const openModal : ( name ?: string ) => Promise < void >
20
28
declare global {
29
+ function ga (
30
+ command : 'send' ,
31
+ fields : UniversalAnalytics . PageviewFieldsObject ,
32
+ ) : void
21
33
const $crisp : Crisp
34
+ const delighted : {
35
+ survey : ( opts : {
36
+ createdAt : string
37
+ email : string
38
+ name : string
39
+ properties : Record < string , any >
40
+ } ) => void
41
+ }
22
42
const openModal : (
23
43
title : ReactNode ,
24
44
body ?: ReactNode ,
@@ -52,5 +72,10 @@ declare global {
52
72
const Tooltip : FC < TooltipProps >
53
73
interface Window {
54
74
$crisp : Crisp
75
+ engagement : {
76
+ init ( apiKey : string , options ?: InitOptions ) : void
77
+ plugin ( ) : unknown
78
+ boot ( options : BootOptions ) : Promise < void >
79
+ }
55
80
}
56
81
}
You can’t perform that action at this time.
0 commit comments