File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -554,6 +554,7 @@ export type SubscriptionMeta = {
554554export type Account = {
555555 first_name : string
556556 last_name : string
557+ date_joined : string
557558 sign_up_type : SignupType
558559 id : number
559560 email : string
@@ -800,7 +801,7 @@ export type Webhook = {
800801 updated_at : string
801802}
802803
803- export type AccountModel = User & {
804+ export type AccountModel = Account & {
804805 organisations : Organisation [ ]
805806}
806807
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'
22
3- export default function ( user : User | undefined , defaultName = 'Unknown' ) {
3+ export default function (
4+ user : AccountModel | undefined ,
5+ defaultName = 'Unknown' ,
6+ ) {
47 if ( ! user ) {
58 return defaultName
69 }
Original file line number Diff line number Diff line change @@ -15,10 +15,30 @@ type Crisp = {
1515 // The push method accepts a CrispCommand array.
1616 push : ( command : CrispCommand ) => void
1717}
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+ }
1927export declare const openModal : ( name ?: string ) => Promise < void >
2028declare global {
29+ function ga (
30+ command : 'send' ,
31+ fields : UniversalAnalytics . PageviewFieldsObject ,
32+ ) : void
2133 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+ }
2242 const openModal : (
2343 title : ReactNode ,
2444 body ?: ReactNode ,
@@ -52,5 +72,10 @@ declare global {
5272 const Tooltip : FC < TooltipProps >
5373 interface Window {
5474 $crisp : Crisp
75+ engagement : {
76+ init ( apiKey : string , options ?: InitOptions ) : void
77+ plugin ( ) : unknown
78+ boot ( options : BootOptions ) : Promise < void >
79+ }
5580 }
5681}
You can’t perform that action at this time.
0 commit comments