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}`
|
||||
|
||||
Reference in New Issue
Block a user