Implemented 'inc_hosted_file' support and expanded data mapping for Event Files.

Updated the Event File data layer to support the 'inc_hosted_file' flag in load and search functions, enabling on-demand retrieval of joined Hosted File metadata.

Refined the data mapping in 'process_ae_obj__event_file_props' to include 'content_type' and strictly controlled which properties are persisted to IndexedDB, adhering to the 'Bite-Sized Data' principle by excluding unneeded backend fields like subdirectory paths.

Enhanced 'get_ae_obj_li_v3' to support generic parameter pass-through for V3 CRUD operations.
This commit is contained in:
Scott Idem
2026-02-19 17:15:12 -05:00
parent e5b94123a5
commit 0a689be25d
2 changed files with 45 additions and 16 deletions

View File

@@ -97,6 +97,7 @@ interface GetAeObjLiV3Params {
offset?: number;
order_by_li?: Record<string, 'ASC' | 'DESC'> | Record<string, 'ASC' | 'DESC'>[] | null;
delay_ms?: number;
params?: key_val;
headers?: key_val;
log_lvl?: number;
}
@@ -113,6 +114,7 @@ export async function get_ae_obj_li_v3({
offset = 0,
order_by_li = null,
delay_ms = 0,
params = {},
headers = {},
log_lvl = 0
}: GetAeObjLiV3Params) {
@@ -120,30 +122,31 @@ export async function get_ae_obj_li_v3({
const endpoint = `/v3/crud/${obj_type}/`;
// 2. Build Query Params
const params: key_val = {
const query_params: key_val = {
enabled,
hidden,
view,
limit,
offset
offset,
...params
};
if (for_obj_type) params['for_obj_type'] = for_obj_type;
if (for_obj_id) params['for_obj_id'] = for_obj_id;
if (order_by_li) params['order_by_li'] = JSON.stringify(order_by_li);
if (delay_ms > 0) params['delay_ms'] = delay_ms;
if (for_obj_type) query_params['for_obj_type'] = for_obj_type;
if (for_obj_id) query_params['for_obj_id'] = for_obj_id;
if (order_by_li) query_params['order_by_li'] = JSON.stringify(order_by_li);
if (delay_ms > 0) query_params['delay_ms'] = delay_ms;
if (log_lvl) {
console.log('*** get_ae_obj_li_v3 ***');
console.log('Endpoint:', endpoint);
console.log('Params:', params);
console.log('Params:', query_params);
console.log('Headers:', headers);
}
return await get_object({
api_cfg,
endpoint,
params,
params: query_params,
headers,
log_lvl
});