 680db9bae6
			
		
	
	680db9bae6
	
	
	
		
			
			* unrelated: dont show nested for user Signed-off-by: Jens Langhammer <jens@goauthentik.io> * unrelated: fix error when no extents in. map Signed-off-by: Jens Langhammer <jens@goauthentik.io> * events: use pending_user when possible Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix for identification stage "fake" user Signed-off-by: Jens Langhammer <jens@goauthentik.io> * better username rendering Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
		
			
				
	
	
		
			44 lines
		
	
	
		
			899 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			899 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { Event } from "@goauthentik/api";
 | |
| 
 | |
| export interface EventUser {
 | |
|     pk: number;
 | |
|     email?: string;
 | |
|     username: string;
 | |
|     is_anonymous?: boolean;
 | |
|     on_behalf_of?: EventUser;
 | |
|     authenticated_as?: EventUser;
 | |
| }
 | |
| 
 | |
| export interface EventGeo {
 | |
|     city?: string;
 | |
|     country?: string;
 | |
|     continent?: string;
 | |
|     lat?: number;
 | |
|     long?: number;
 | |
| }
 | |
| 
 | |
| export interface EventModel {
 | |
|     pk: string;
 | |
|     name: string;
 | |
|     app: string;
 | |
|     model_name: string;
 | |
| }
 | |
| 
 | |
| export interface EventRequest {
 | |
|     path: string;
 | |
|     method: string;
 | |
| }
 | |
| 
 | |
| export type EventContextProperty = EventModel | EventGeo | string | number | string[] | undefined;
 | |
| 
 | |
| // TODO: Events should have more specific types.
 | |
| export interface EventContext {
 | |
|     [key: string]: EventContext | EventContextProperty;
 | |
|     geo?: EventGeo;
 | |
| }
 | |
| 
 | |
| export interface EventWithContext extends Event {
 | |
|     user: EventUser;
 | |
|     context: EventContext;
 | |
| }
 |