Migrate Event logistics modules to unified type system
- Added ae_EventLocation, ae_EventSession, ae_EventPresenter, and ae_EventTrack to ae_types.ts. - Replaced local interfaces in logistics logic files with unified imports. - Standardized Promise return types for all core data loading, creation, search, and update functions. - Integrated triple-ID patterns for Dexie and V3 API parity across locations, sessions, and presenters.
This commit is contained in:
@@ -3,6 +3,7 @@ import { api } from '$lib/api/api';
|
||||
|
||||
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import type { ae_EventLocation } from '$lib/types/ae_types';
|
||||
|
||||
import { load_ae_obj_li__event_device } from '$lib/ae_events/ae_events__event_device';
|
||||
import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file';
|
||||
@@ -25,7 +26,7 @@ export async function load_ae_obj_id__event_location({
|
||||
inc_session_li?: boolean;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_id__event_location() *** event_location_id=${event_location_id}`
|
||||
@@ -175,11 +176,10 @@ export async function load_ae_obj_li__event_location({
|
||||
hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden
|
||||
limit?: number; // 99
|
||||
offset?: number; // 0
|
||||
order_by_li?: key_val;
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_li__event_location() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
|
||||
@@ -362,7 +362,7 @@ export async function create_ae_obj__event_location({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** create_ae_obj__event_location() *** event_id=${event_id}`);
|
||||
}
|
||||
@@ -499,7 +499,7 @@ export async function update_ae_obj__event_location({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** update_ae_obj__event_location() *** event_location_id=${event_location_id}`,
|
||||
@@ -589,7 +589,7 @@ export async function search__event_location({
|
||||
params?: any;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation[] | false> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** search__event_location() *** event_id=${event_id}`);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { api } from '$lib/api/api';
|
||||
|
||||
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import type { ae_EventPresenter } from '$lib/types/ae_types';
|
||||
|
||||
import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file';
|
||||
|
||||
@@ -29,7 +30,7 @@ export async function load_ae_obj_id__event_presenter({
|
||||
offset?: number;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventPresenter | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_id__event_presenter() *** event_presenter_id=${event_presenter_id}`
|
||||
@@ -153,7 +154,7 @@ export async function load_ae_obj_li__event_presenter({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventPresenter[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_li__event_presenter() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
|
||||
@@ -287,7 +288,7 @@ export async function create_ae_obj__event_presenter({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventPresenter | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** create_ae_obj__event_presenter() *** event_id=${event_id} event_session_id=${event_session_id} event_presentation_id=${event_presentation_id}`
|
||||
@@ -427,7 +428,7 @@ export async function update_ae_obj__event_presenter({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventPresenter | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** update_ae_obj__event_presenter() *** event_presenter_id=${event_presenter_id}`,
|
||||
@@ -541,7 +542,7 @@ export async function search__event_presenter({
|
||||
params?: any;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventPresenter[] | false> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** search__event_presenter() *** event_id=${event_id}`);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { api } from '$lib/api/api';
|
||||
|
||||
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import type { ae_EventSession } from '$lib/types/ae_types';
|
||||
|
||||
import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file';
|
||||
import { load_ae_obj_li__event_presentation } from '$lib/ae_events/ae_events__event_presentation';
|
||||
@@ -36,7 +37,7 @@ export async function load_ae_obj_id__event_session({
|
||||
offset?: number;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventSession | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** load_ae_obj_id__event_session() *** event_session_id=${event_session_id}`);
|
||||
}
|
||||
@@ -206,7 +207,7 @@ export async function load_ae_obj_li__event_session({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventSession[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_li__event_session() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
|
||||
@@ -381,7 +382,7 @@ export async function create_ae_obj__event_session({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventSession | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** create_ae_obj__event_session() *** event_id=${event_id}`);
|
||||
}
|
||||
@@ -518,7 +519,7 @@ export async function update_ae_obj__event_session({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventSession | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** update_ae_obj__event_session() *** event_session_id=${event_session_id}`,
|
||||
@@ -627,7 +628,7 @@ export async function qry__event_session({
|
||||
params?: any;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventSession[]> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** qry__event_session() *** event_id=${event_id} qry_str=${qry_str}`);
|
||||
}
|
||||
@@ -820,7 +821,7 @@ export async function search__event_session({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventSession[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** search__event_session() *** event_id=${event_id} like_search_qry_str=${like_search_qry_str} location_name=${location_name}`
|
||||
|
||||
@@ -285,4 +285,193 @@ export interface ae_ActivityLog extends ae_BaseObj {
|
||||
|
||||
details?: string;
|
||||
other_json?: any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event - A discrete conference or show
|
||||
*/
|
||||
export interface ae_Event extends ae_BaseObj {
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
account_id: string;
|
||||
account_id_random: string;
|
||||
|
||||
conference: boolean;
|
||||
type?: string;
|
||||
summary?: string;
|
||||
format?: 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventBadge - An attendee's printed credentials
|
||||
*/
|
||||
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;
|
||||
|
||||
event_badge_template_id?: string;
|
||||
event_badge_template_id_random?: string;
|
||||
|
||||
badge_type_code?: string;
|
||||
badge_type?: 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;
|
||||
|
||||
print_count?: number;
|
||||
print_first_datetime?: string | Date;
|
||||
print_last_datetime?: string | Date;
|
||||
|
||||
ticket_list?: any[];
|
||||
data_json?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventBadgeTemplate - Layout and style for badges
|
||||
*/
|
||||
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;
|
||||
|
||||
logo_path?: string;
|
||||
header_path?: string;
|
||||
header_row_1?: string;
|
||||
header_row_2?: string;
|
||||
|
||||
footer_path?: string;
|
||||
footer_title?: string;
|
||||
|
||||
badge_type_list?: any;
|
||||
ticket_list?: any;
|
||||
|
||||
layout?: string;
|
||||
style_href?: string;
|
||||
passcode?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventLocation - A room or area within an event
|
||||
*/
|
||||
export interface ae_EventLocation extends ae_BaseObj {
|
||||
event_location_id: string;
|
||||
event_location_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
location_type?: string;
|
||||
location_type_code?: string;
|
||||
|
||||
internal_use?: boolean;
|
||||
record_audio?: boolean;
|
||||
record_video?: boolean;
|
||||
|
||||
passcode?: string;
|
||||
data_json?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventSession - A timed presentation or meeting
|
||||
*/
|
||||
export interface ae_EventSession extends ae_BaseObj {
|
||||
event_session_id: string;
|
||||
event_session_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
event_location_id?: string;
|
||||
event_location_id_random?: string;
|
||||
event_track_id?: string;
|
||||
event_track_id_random?: string;
|
||||
|
||||
type_code?: string;
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
|
||||
internal_use?: boolean;
|
||||
record_audio?: boolean;
|
||||
record_video?: boolean;
|
||||
|
||||
status?: number;
|
||||
approve?: boolean;
|
||||
ready?: boolean;
|
||||
|
||||
data_json?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventPresenter - A speaker or facilitator
|
||||
*/
|
||||
export interface ae_EventPresenter extends ae_BaseObj {
|
||||
event_presenter_id: string;
|
||||
event_presenter_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
person_id: string;
|
||||
person_id_random: string;
|
||||
|
||||
pronouns?: string;
|
||||
given_name?: string;
|
||||
middle_name?: string;
|
||||
family_name?: string;
|
||||
full_name?: string;
|
||||
affiliations?: string;
|
||||
email?: string;
|
||||
|
||||
professional_title?: string;
|
||||
tagline?: string;
|
||||
biography?: string;
|
||||
|
||||
agree?: boolean;
|
||||
data_json?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventTrack - A thematic grouping of sessions
|
||||
*/
|
||||
export interface ae_EventTrack extends ae_BaseObj {
|
||||
event_track_id: string;
|
||||
event_track_id_random: string;
|
||||
event_id: string;
|
||||
event_id_random: string;
|
||||
|
||||
track_type?: string;
|
||||
track_type_code?: string;
|
||||
|
||||
start_datetime?: string | Date;
|
||||
end_datetime?: string | Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user