test: combine and modernize private-network checks; remove legacy disabled variants

This commit is contained in:
Scott Idem
2026-02-24 16:38:36 -05:00
parent 7f9f93765d
commit f2c426b595
14 changed files with 877 additions and 714 deletions

View File

@@ -308,90 +308,95 @@ async function _refresh_tracking_li_background({ api_cfg, exhibit_id, enabled, h
* Lead Capture (V3)
*/
export async function create_ae_obj__exhibit_tracking({
api_cfg,
exhibit_id,
event_badge_id,
external_person_id,
group,
try_cache = true,
log_lvl = 0
api_cfg,
exhibit_id,
event_badge_id,
external_person_id,
group,
try_cache = true,
log_lvl = 0
}: {
api_cfg: any;
exhibit_id: string;
event_badge_id: string;
external_person_id: string;
group?: string;
try_cache?: boolean;
log_lvl?: number;
api_cfg: any;
exhibit_id: string;
event_badge_id: string;
external_person_id: string;
group?: string;
try_cache?: boolean;
log_lvl?: number;
}): Promise<ae_EventExhibitTracking | null> {
const result = await api.create_ae_obj_v3({
api_cfg,
obj_type: 'event_exhibit_tracking',
fields: {
event_exhibit_id: exhibit_id,
event_badge_id: event_badge_id,
external_person_id,
group
},
log_lvl
});
const result = await api.create_nested_obj_v3({
api_cfg,
for_obj_type: 'event_exhibit',
for_obj_id: exhibit_id,
obj_type: 'event_exhibit_tracking',
fields: {
event_badge_id: event_badge_id,
external_person_id,
group
},
log_lvl
});
if (result) {
const processed = await process_ae_obj__exhibit_tracking_props({ obj_li: [result], log_lvl });
const processed_obj = processed[0];
if (try_cache) {
await db_save_ae_obj_li__ae_obj({
db_instance: db_events,
table_name: 'exhibit_tracking',
obj_li: [processed_obj],
properties_to_save: properties_to_save_exhibit_tracking,
log_lvl
});
}
return processed_obj;
}
return null;
if (result) {
const processed = await process_ae_obj__exhibit_tracking_props({ obj_li: [result], log_lvl });
const processed_obj = processed[0];
if (try_cache) {
await db_save_ae_obj_li__ae_obj({
db_instance: db_events,
table_name: 'exhibit_tracking',
obj_li: [processed_obj],
properties_to_save: properties_to_save_exhibit_tracking,
log_lvl
});
}
return processed_obj;
}
return null;
}
/**
* Lead Update (V3)
*/
export async function update_ae_obj__exhibit_tracking({
api_cfg,
exhibit_tracking_id,
data,
try_cache = true,
log_lvl = 0
api_cfg,
exhibit_id,
exhibit_tracking_id,
data,
try_cache = true,
log_lvl = 0
}: {
api_cfg: any;
exhibit_tracking_id: string;
data: any;
try_cache?: boolean;
log_lvl?: number;
api_cfg: any;
exhibit_id: string;
exhibit_tracking_id: string;
data: any;
try_cache?: boolean;
log_lvl?: number;
}): Promise<ae_EventExhibitTracking | null> {
const result = await api.update_ae_obj_v3({
api_cfg,
obj_type: 'event_exhibit_tracking',
obj_id: exhibit_tracking_id,
fields: data,
log_lvl
});
const result = await api.update_nested_obj_v3({
api_cfg,
for_obj_type: 'event_exhibit',
for_obj_id: exhibit_id,
obj_type: 'event_exhibit_tracking',
obj_id: exhibit_tracking_id,
fields: data,
log_lvl
});
if (result) {
const processed = await process_ae_obj__exhibit_tracking_props({ obj_li: [result], log_lvl });
const processed_obj = processed[0];
if (try_cache) {
await db_save_ae_obj_li__ae_obj({
db_instance: db_events,
table_name: 'exhibit_tracking',
obj_li: [processed_obj],
properties_to_save: properties_to_save_exhibit_tracking,
log_lvl
});
}
return processed_obj;
}
return null;
if (result) {
const processed = await process_ae_obj__exhibit_tracking_props({ obj_li: [result], log_lvl });
const processed_obj = processed[0];
if (try_cache) {
await db_save_ae_obj_li__ae_obj({
db_instance: db_events,
table_name: 'exhibit_tracking',
obj_li: [processed_obj],
properties_to_save: properties_to_save_exhibit_tracking,
log_lvl
});
}
return processed_obj;
}
return null;
}
/**