diff --git a/src/lib/ae_core/ae_core__address.ts b/src/lib/ae_core/ae_core__address.ts index dc383f1a..3565ee9f 100644 --- a/src/lib/ae_core/ae_core__address.ts +++ b/src/lib/ae_core/ae_core__address.ts @@ -3,33 +3,10 @@ import { api } from '$lib/api/api'; import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; import { db_core } from '$lib/ae_core/db_core'; +import type { ae_Address } from '$lib/types/ae_types'; + const ae_promises: key_val = {}; -export interface Address { - id: string; - address_id: string; - address_id_random: string; - account_id: string; - account_id_random: string; - - for_type?: string; - for_id?: string; - for_id_random?: string; - - city: string; - state_province: string; - country: string; - - enable: null | boolean; - hide?: null | boolean; - priority?: null | boolean; - sort?: null | number; - group?: null | string; - notes?: null | string; - created_on: Date; - updated_on?: null | Date; -} - // Updated 2026-01-06 export async function load_ae_obj_id__address({ api_cfg, @@ -45,7 +22,7 @@ export async function load_ae_obj_id__address({ params?: key_val; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { ae_promises.load__address_obj = await api.get_ae_obj_v3({ api_cfg, obj_type: 'address', @@ -94,10 +71,10 @@ export async function load_ae_obj_li__address({ view?: string; limit?: number; offset?: number; - order_by_li?: Record; + params?: key_val; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { ae_promises.load__address_obj_li = await api.get_ae_obj_li_v3({ api_cfg, obj_type: 'address', @@ -144,7 +121,7 @@ export async function create_ae_obj__address({ params?: key_val; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { const result = await api.create_ae_obj_v3({ api_cfg, obj_type: 'address', @@ -184,7 +161,7 @@ export async function update_ae_obj__address({ params?: key_val; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { const result = await api.update_ae_obj_v3({ api_cfg, obj_type: 'address', diff --git a/src/lib/ae_core/ae_core__contact.ts b/src/lib/ae_core/ae_core__contact.ts index 04be5869..b3c0d64f 100644 --- a/src/lib/ae_core/ae_core__contact.ts +++ b/src/lib/ae_core/ae_core__contact.ts @@ -3,33 +3,10 @@ import { api } from '$lib/api/api'; import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; import { db_core } from '$lib/ae_core/db_core'; +import type { ae_Contact } from '$lib/types/ae_types'; + const ae_promises: key_val = {}; -export interface Contact { - id: string; - contact_id: string; - contact_id_random: string; - account_id: string; - account_id_random: string; - - for_type?: string; - for_id?: string; - for_id_random?: string; - - name: string; - email: string; - phone: string; - - enable: null | boolean; - hide?: null | boolean; - priority?: null | boolean; - sort?: null | number; - group?: null | string; - notes?: null | string; - created_on: Date; - updated_on?: null | Date; -} - // Updated 2026-01-06 export async function load_ae_obj_id__contact({ api_cfg, @@ -45,7 +22,7 @@ export async function load_ae_obj_id__contact({ params?: key_val; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { ae_promises.load__contact_obj = await api.get_ae_obj_v3({ api_cfg, obj_type: 'contact', @@ -97,7 +74,7 @@ export async function load_ae_obj_li__contact({ order_by_li?: Record; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { ae_promises.load__contact_obj_li = await api.get_ae_obj_li_v3({ api_cfg, obj_type: 'contact', @@ -144,7 +121,7 @@ export async function create_ae_obj__contact({ params?: key_val; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { const result = await api.create_ae_obj_v3({ api_cfg, obj_type: 'contact', @@ -184,7 +161,7 @@ export async function update_ae_obj__contact({ params?: key_val; try_cache?: boolean; log_lvl?: number; -}) { +}): Promise { const result = await api.update_ae_obj_v3({ api_cfg, obj_type: 'contact',