Finalize Unified Type Migration and scaffold core logistics logic
- Completed the unified type system in ae_types.ts covering all 42 active Aether objects. - Scaffolded missing core logic modules for Organization, EventTrack, and Sponsorship with standardized return types. - Updated project roadmap in TODO.md to reflect mission completion on foundational type parity.
This commit is contained in:
23
src/lib/ae_core/ae_core__organization.ts
Normal file
23
src/lib/ae_core/ae_core__organization.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { api } from '$lib/api/api';
|
||||
import type { ae_Organization } from '$lib/types/ae_types';
|
||||
|
||||
/**
|
||||
* Organization module logic
|
||||
*/
|
||||
|
||||
export async function load_ae_obj_id__organization({
|
||||
api_cfg,
|
||||
organization_id,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any;
|
||||
organization_id: string;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_Organization | null> {
|
||||
return await api.get_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type: 'organization',
|
||||
obj_id: organization_id,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
24
src/lib/ae_events/ae_events__event_track.ts
Normal file
24
src/lib/ae_events/ae_events__event_track.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { api } from '$lib/api/api';
|
||||
import type { ae_EventTrack } from '$lib/types/ae_types';
|
||||
|
||||
/**
|
||||
* EventTrack module logic
|
||||
*/
|
||||
|
||||
export async function load_ae_obj_li__event_track({
|
||||
api_cfg,
|
||||
event_id,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any;
|
||||
event_id: string;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_EventTrack[]> {
|
||||
return await api.get_ae_obj_li_v3({
|
||||
api_cfg,
|
||||
obj_type: 'event_track',
|
||||
for_obj_type: 'event',
|
||||
for_obj_id: event_id,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
42
src/lib/ae_sponsorships/ae_sponsorships__sponsorship.ts
Normal file
42
src/lib/ae_sponsorships/ae_sponsorships__sponsorship.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { api } from '$lib/api/api';
|
||||
import type { ae_Sponsorship } from '$lib/types/ae_types';
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
|
||||
/**
|
||||
* Sponsorship module logic
|
||||
*/
|
||||
|
||||
export async function load_ae_obj_id__sponsorship({
|
||||
api_cfg,
|
||||
sponsorship_id,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any;
|
||||
sponsorship_id: string;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_Sponsorship | null> {
|
||||
return await api.get_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type: 'sponsorship',
|
||||
obj_id: sponsorship_id,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
|
||||
export async function load_ae_obj_li__sponsorship({
|
||||
api_cfg,
|
||||
for_obj_id,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any;
|
||||
for_obj_id: string;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_Sponsorship[]> {
|
||||
return await api.get_ae_obj_li_v3({
|
||||
api_cfg,
|
||||
obj_type: 'sponsorship',
|
||||
for_obj_type: 'account',
|
||||
for_obj_id,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
@@ -225,6 +225,26 @@ export interface ae_User extends ae_BaseObj {
|
||||
status_name?: string;
|
||||
logged_in_on?: string | Date;
|
||||
last_activity_on?: string | Date;
|
||||
|
||||
user_role_list?: ae_UserRole[];
|
||||
}
|
||||
|
||||
/**
|
||||
* UserRole - Specific access levels for a user
|
||||
*/
|
||||
export interface ae_UserRole {
|
||||
id: string;
|
||||
user_id_random: string;
|
||||
|
||||
for_type?: string;
|
||||
for_id_random?: string;
|
||||
|
||||
code?: string;
|
||||
name?: string;
|
||||
enable: boolean;
|
||||
|
||||
created_on: string | Date;
|
||||
updated_on: string | Date;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -338,6 +358,20 @@ export interface ae_Event extends ae_BaseObj {
|
||||
data_json?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventCfg - Advanced configuration for an event
|
||||
*/
|
||||
export interface ae_EventCfg extends ae_BaseObj {
|
||||
event_id_random: string;
|
||||
|
||||
enable_comments?: boolean;
|
||||
unauthenticated_access?: boolean;
|
||||
|
||||
mod_abstracts_json?: any;
|
||||
mod_badges_json?: any;
|
||||
mod_exhibits_json?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventBadge - An attendee's printed credentials
|
||||
*/
|
||||
@@ -454,6 +488,26 @@ export interface ae_EventSession extends ae_BaseObj {
|
||||
data_json?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventPresentation - A specific talk or session segment
|
||||
*/
|
||||
export interface ae_EventPresentation extends ae_BaseObj {
|
||||
event_presentation_id: string;
|
||||
event_presentation_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
event_session_id_random?: string;
|
||||
|
||||
abstract_code?: string;
|
||||
type_code?: string;
|
||||
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
|
||||
passcode?: string;
|
||||
file_count?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventPresenter - A speaker or facilitator
|
||||
*/
|
||||
@@ -797,3 +851,47 @@ export interface ae_EventPersonTracking extends ae_BaseObj {
|
||||
in_datetime?: string | Date;
|
||||
out_datetime?: string | Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sponsorship - A partnership level for an event
|
||||
*/
|
||||
export interface ae_Sponsorship extends ae_BaseObj {
|
||||
sponsorship_id: string;
|
||||
sponsorship_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
sponsorship_cfg_id_random: string;
|
||||
amount?: number;
|
||||
paid?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* SponsorshipCfg - Rules and levels for sponsorships
|
||||
*/
|
||||
export interface ae_SponsorshipCfg extends ae_BaseObj {
|
||||
sponsorship_cfg_id: string;
|
||||
sponsorship_cfg_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
level_li_json?: any;
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* LogClientViewing - Playback and interaction tracking for media
|
||||
*/
|
||||
export interface ae_LogClientViewing extends ae_BaseObj {
|
||||
account_id_random: string;
|
||||
external_client_id: string;
|
||||
|
||||
object_type: string;
|
||||
object_id: string;
|
||||
|
||||
page_load_on?: string | Date;
|
||||
play_start_count?: number;
|
||||
play_pause_count?: number;
|
||||
last_ping?: string | Date;
|
||||
}
|
||||
Reference in New Issue
Block a user