I think pretty much all references to v1 and v2 have been removed. All files have been renamed from _v3 to just the function/var name with out the appended version. Assume no _vX is the current version.

This commit is contained in:
Scott Idem
2026-03-24 11:32:06 -04:00
parent 512e5ef87c
commit 94849137f0
7 changed files with 99 additions and 232 deletions

View File

@@ -664,138 +664,6 @@ export async function search__event({
export const qry_ae_obj_li__event = search__event;
/**
* Specialized search function for IDAA module using legacy V2 endpoints.
* This is isolated to prevent V3 migration bugs from affecting Recovery Meetings.
*/
// Updated 2026-01-20
// export async function qry_ae_obj_li__event_v2({
// api_cfg,
// for_obj_type = 'account',
// for_obj_id,
// qry_str,
// qry_person_id = null,
// qry_conference = null,
// qry_physical = null,
// qry_virtual = null,
// qry_type = null,
// enabled = 'enabled',
// hidden = 'not_hidden',
// view = 'default',
// limit = 99,
// offset = 0,
// order_by_li = { start_datetime: 'DESC' } as const,
// try_cache = true,
// log_lvl = 0
// }: {
// api_cfg: any;
// for_obj_type?: string;
// for_obj_id: string;
// qry_str?: string;
// qry_person_id?: string | null;
// qry_conference?: boolean | null;
// qry_physical?: boolean | null;
// qry_virtual?: boolean | null;
// qry_type?: string | null;
// enabled?: 'enabled' | 'all' | 'not_enabled';
// hidden?: 'hidden' | 'all' | 'not_hidden';
// view?: string;
// limit?: number;
// offset?: number;
// order_by_li?: Record<string, 'ASC' | 'DESC'>;
// try_cache?: boolean;
// log_lvl?: number;
// }) {
// if (log_lvl) console.log('*** qry_ae_obj_li__event_v2() ***');
// const params_json: any = { qry: { and: [] } };
// if (qry_str) {
// // Use default_qry_str for searching as requested
// params_json.qry.and.push({ field: 'default_qry_str', op: 'like', value: `%${qry_str}%` });
// }
// const result_li = await get_ae_obj_li_for_obj_id_crud_v2({
// api_cfg,
// obj_type: 'event',
// for_obj_type,
// for_obj_id,
// enabled,
// hidden,
// limit,
// offset,
// order_by_li,
// params_json,
// log_lvl
// });
// if (!result_li) return [];
// const processed_obj_li = await process_ae_obj__event_props({
// obj_li: result_li,
// log_lvl: log_lvl
// });
// if (try_cache) {
// await db_save_ae_obj_li__ae_obj({
// db_instance: db_events,
// table_name: 'event',
// obj_li: processed_obj_li,
// properties_to_save: properties_to_save,
// log_lvl: log_lvl
// });
// }
// // Client-side Filter Layer
// const filtered_obj_li = processed_obj_li.filter((ev: any) => {
// // Handle conference filter
// if (qry_conference != null) {
// const ev_conf = ev.conference === true || ev.conference === 1 || ev.conference === '1';
// if (ev_conf !== !!qry_conference) return false;
// }
// // Location Filtering (Inclusive OR logic)
// // If either filter is explicitly true, we restrict results.
// // If both are false or null, we show everything.
// if (qry_physical === true || qry_virtual === true) {
// const ev_physical = ev.physical === true || ev.physical === 1 || ev.physical === '1';
// const ev_virtual = ev.virtual === true || ev.virtual === 1 || ev.virtual === '1';
// let match = false;
// if (qry_physical === true && ev_physical) match = true;
// if (qry_virtual === true && ev_virtual) match = true;
// if (!match) return false;
// }
// // Handle type filter (skip if null, undefined, 'all', or empty string)
// if (qry_type != null && qry_type !== 'all' && qry_type !== '') {
// if (ev.type !== qry_type) return false;
// }
// // Handle person ID filter
// if (qry_person_id) {
// const match = (
// ev.external_person_id === qry_person_id ||
// ev.poc_person_id === qry_person_id ||
// ev.poc_person_id_random === qry_person_id ||
// ev.poc_event_person_id === qry_person_id ||
// ev.poc_event_person_id_random === qry_person_id
// );
// if (!match) return false;
// }
// return true;
// });
// if (log_lvl) {
// console.log(`Filter results (V2): Input=${processed_obj_li.length}, Output=${filtered_obj_li.length}`);
// }
// return filtered_obj_li.slice(0, limit);
// }
// Updated 2026-03-10
export const properties_to_save = [
'id',

View File

@@ -41,7 +41,6 @@ const export_obj = {
load_ae_obj_li__event: event.load_ae_obj_li__event,
qry_ae_obj_li__event: event.qry_ae_obj_li__event,
search__event: event.search__event,
// qry_ae_obj_li__event_v2: event.qry_ae_obj_li__event_v2,
create_ae_obj__event: event.create_ae_obj__event,
delete_ae_obj_id__event: event.delete_ae_obj_id__event,
update_ae_obj__event: event.update_ae_obj__event,