-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
113 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* NOTE: See the Mixpanel guide in the terra-ui GitHub Wiki for more details: | ||
* https://github.com/DataBiosphere/terra-ui/wiki/Mixpanel | ||
*/ | ||
const eventList = { | ||
userRegister: 'user:register', | ||
userSignIn: 'user:signin', | ||
|
||
pageView: 'page:view', | ||
dataLibrary: 'page:view:data-library', | ||
dar: 'page:view:dar' | ||
}; | ||
|
||
export default eventList; | ||
|
||
// Helper type to create BaseMetricsEventName. | ||
type MetricsEventsMap<EventName> = { [key: string]: EventName | MetricsEventsMap<EventName> }; | ||
// Union type of all event names configured in eventsList. | ||
type BaseMetricsEventName = typeof eventList extends MetricsEventsMap<infer EventName> ? EventName : never; | ||
// Each route has its own page view event, where the event name includes the name of the route. | ||
type PageViewMetricsEventName = `${typeof eventList.pageView}:${string}`; | ||
|
||
/** | ||
* Union type of all metrics event names. | ||
*/ | ||
export type MetricsEventName = BaseMetricsEventName | PageViewMetricsEventName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,8 @@ | |
} | ||
}, | ||
"include": [ | ||
"src" | ||
"src", | ||
"types/index.d.ts" | ||
], | ||
"plugins": ["@typescript-eslint", "import"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
declare module "@databiosphere/bard-client" { | ||
export function getDefaultProperties(): any | ||
} |