ee5ae8af62
* explicitly ordering global middlewares * various subscription fixes & WIP project invite middleware * SSR invite accept & toast notifs seem to work * backend support for mixpanel * mixpanel be logic -> shared * minor fix * finissh * lint fix * minor comment adjustments * better adblock handling
30 lines
681 B
TypeScript
30 lines
681 B
TypeScript
/* eslint-disable camelcase */
|
|
import type { OverridedMixpanel } from 'mixpanel-browser'
|
|
import type { Merge } from 'type-fest'
|
|
|
|
export type MixpanelClient = Merge<
|
|
Pick<
|
|
OverridedMixpanel,
|
|
'track' | 'init' | 'reset' | 'register' | 'identify' | 'people' | 'add_group'
|
|
>,
|
|
{
|
|
people: Pick<OverridedMixpanel['people'], 'set' | 'set_once'>
|
|
}
|
|
>
|
|
|
|
export const HOST_APP = 'web-2'
|
|
export const HOST_APP_DISPLAY_NAME = 'Web 2.0 App'
|
|
|
|
export const fakeMixpanelClient = (): MixpanelClient => ({
|
|
init: noop as MixpanelClient['init'],
|
|
track: noop,
|
|
reset: noop,
|
|
register: noop,
|
|
identify: noop,
|
|
people: {
|
|
set: noop,
|
|
set_once: noop
|
|
},
|
|
add_group: noop
|
|
})
|