fix: Consolidate type and parameter fixes across multiple modules

- API: Standardized 'order_by_li' types in event and archive modules.
- API: Corrected 'enabled'/'hidden' parameter types in event exhibit and device search/list functions.
- Type Safety: Addressed generic type casting issues in _process_generic_props across event modules.
- Data Handling: Resolved return type consistency in journal creation and DB save operations.
- Parameter Management: Fixed missing 'try_cache' parameters in event exhibit functions.
- Core Logic: Ensured correct object properties in DB put operations for hosted files.
This commit is contained in:
Scott Idem
2026-01-15 19:56:37 -05:00
parent ee1ca93894
commit c7d63da8a1
5 changed files with 3593 additions and 21 deletions

View File

@@ -308,7 +308,7 @@ export async function create_ae_obj__journal({
if (!account_id) {
console.log(`ERROR: Journals - Journal - account_id required to create`);
return false;
return null;
}
ae_promises.create__journal = await api
@@ -467,6 +467,14 @@ export async function qry__journal({
hidden = 'not_hidden',
limit = 50,
offset = 0,
order_by_li = {
priority: 'DESC',
sort: 'DESC',
start_datetime: 'ASC',
name: 'ASC',
updated_on: 'DESC',
created_on: 'DESC'
} as const,
params = {},
try_cache = true,
log_lvl = 0
@@ -480,6 +488,7 @@ export async function qry__journal({
hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden
limit?: number;
offset?: number;
order_by_li?: Record<string, 'ASC' | 'DESC'> | Record<string, 'ASC' | 'DESC'>[];
params?: any;
try_cache?: boolean;
log_lvl?: number;
@@ -525,15 +534,6 @@ export async function qry__journal({
search_query.and.push({ field: 'hidden', op: 'eq', value: false });
}
const order_by_li: Record<string, 'ASC' | 'DESC'> = {
priority: 'DESC',
sort: 'DESC',
start_datetime: 'ASC',
name: 'ASC',
updated_on: 'DESC',
created_on: 'DESC'
};
ae_promises.load__journal_obj_li = await api
.search_ae_obj_v3({
api_cfg: api_cfg,