Migrate User and ActivityLog modules to unified type system

- Added ae_User and ae_ActivityLog interfaces to ae_types.ts.
- Replaced local interfaces in User and ActivityLog logic files with unified imports.
- Standardized Promise return types for all core data loading, creation, and update functions.
- Verified permission field alignment for User type to support hierarchical access logic.
This commit is contained in:
Scott Idem
2026-01-08 12:20:21 -05:00
parent 25b51e1081
commit 324b65394a
3 changed files with 92 additions and 151 deletions

View File

@@ -182,99 +182,107 @@ export interface ae_Person extends ae_BaseObj {
}
/**
* Event - A discrete conference or show
* User - A login entity with permissions
*/
export interface ae_Event extends ae_BaseObj {
event_id: string;
event_id_random: string;
export interface ae_User extends ae_BaseObj {
user_id: string;
user_id_random: string;
account_id: string;
account_id_random: string;
person_id?: string;
person_id_random?: string;
username: string;
email?: string;
// Permissions (Maps to $ae_loc logic)
super: boolean;
manager: boolean;
administrator: boolean;
public: boolean;
status_name?: string;
logged_in_on?: string | Date;
last_activity_on?: string | Date;
}
/**
* Address - Geographic location data
*/
export interface ae_Address extends ae_BaseObj {
address_id: string;
address_id_random: string;
account_id: string;
account_id_random: string;
conference: boolean;
type?: string;
summary?: string;
format?: string;
for_type?: string;
for_id_random?: string;
attention_to?: string;
organization_name?: string;
line_1: string;
line_2?: string;
line_3?: string;
city: string;
state_province?: string;
postal_code?: string;
country?: string;
country_name?: string;
timezone?: string;
start_datetime?: string | Date;
end_datetime?: string | Date;
location_text?: string;
location_address_json?: any;
status?: string;
approve?: boolean;
ready?: boolean;
ready_on?: string | Date;
cfg_json?: any;
data_json?: any;
latitude?: string;
longitude?: string;
}
/**
* EventBadge - An attendee's printed credentials
* Contact - Electronic communication details (Phone, Email, Web)
*/
export interface ae_EventBadge extends ae_BaseObj {
event_badge_id: string;
event_badge_id_random: string;
event_id: string;
event_id_random: string;
person_id: string;
person_id_random: string;
event_person_id?: string;
event_person_id_random?: string;
export interface ae_Contact extends ae_BaseObj {
contact_id: string;
contact_id_random: string;
account_id: string;
account_id_random: string;
event_badge_template_id?: string;
event_badge_template_id_random?: string;
address_id_random?: string;
for_type?: string;
for_id_random?: string;
badge_type_code?: string;
badge_type?: string;
title?: string;
tagline?: string;
member_type_code?: string;
member_status?: string;
pronouns?: string;
given_name?: string;
middle_name?: string;
family_name?: string;
full_name?: string;
affiliations?: string;
professional_title?: string;
email?: string;
city?: string;
state_province?: string;
country?: string;
phone_mobile?: string;
phone_office?: string;
website_url?: string;
print_count?: number;
print_first_datetime?: string | Date;
print_last_datetime?: string | Date;
ticket_list?: any[];
data_json?: any;
facebook_url?: string;
instagram_url?: string;
linkedin_url?: string;
}
/**
* EventBadgeTemplate - Layout and style for badges
* ActivityLog - System audit trail
*/
export interface ae_EventBadgeTemplate extends ae_BaseObj {
event_badge_template_id: string;
event_badge_template_id_random: string;
event_id: string;
event_id_random: string;
export interface ae_ActivityLog extends ae_BaseObj {
activity_log_id: string;
activity_log_id_random: string;
account_id: string;
account_id_random: string;
logo_path?: string;
header_path?: string;
header_row_1?: string;
header_row_2?: string;
person_id_random?: string;
user_id_random?: string;
footer_path?: string;
footer_title?: string;
external_client_id?: string;
source?: string;
badge_type_list?: any;
ticket_list?: any;
object_type?: string;
object_id_random?: string;
layout?: string;
style_href?: string;
passcode?: string;
}
action: string;
action_on_type?: string;
action_on_id_random?: string;
details?: string;
other_json?: any;
}