More code clean up

This commit is contained in:
Scott Idem
2026-03-24 10:54:40 -04:00
parent 8e61bd0ba1
commit 42358efe7d
43 changed files with 228 additions and 228 deletions

View File

@@ -14,7 +14,7 @@ interface GetAeObjV3Params {
/**
* Get a single object by ID (V3)
*/
export async function get_ae_obj_v3({
export async function get_ae_obj({
api_cfg,
obj_type,
obj_id,
@@ -27,7 +27,7 @@ export async function get_ae_obj_v3({
const query_params: key_val = { view, ...params };
if (log_lvl) {
console.log('*** get_ae_obj_v3 ***');
console.log('*** get_ae_obj ***');
console.log('Endpoint:', endpoint);
console.log('Params:', query_params);
}
@@ -56,7 +56,7 @@ interface GetNestedAeObjV3Params {
/**
* Get a single nested object by ID (V3)
*/
export async function get_nested_ae_obj_v3({
export async function get_nested_ae_obj({
api_cfg,
parent_type,
parent_id,
@@ -71,7 +71,7 @@ export async function get_nested_ae_obj_v3({
const query_params: key_val = { view, ...params };
if (log_lvl) {
console.log('*** get_nested_ae_obj_v3 ***');
console.log('*** get_nested_ae_obj ***');
console.log('Endpoint:', endpoint);
console.log('Params:', query_params);
}
@@ -102,7 +102,7 @@ interface GetAeObjLiV3Params {
log_lvl?: number;
}
export async function get_ae_obj_li_v3({
export async function get_ae_obj_li({
api_cfg,
obj_type,
for_obj_type,
@@ -137,7 +137,7 @@ export async function get_ae_obj_li_v3({
if (delay_ms > 0) query_params['delay_ms'] = delay_ms;
if (log_lvl) {
console.log('*** get_ae_obj_li_v3 ***');
console.log('*** get_ae_obj_li ***');
console.log('Endpoint:', endpoint);
console.log('Params:', query_params);
console.log('Headers:', headers);
@@ -167,7 +167,7 @@ interface GetNestedObjLiV3Params {
log_lvl?: number;
}
export async function get_nested_obj_li_v3({
export async function get_nested_obj_li({
api_cfg,
parent_type,
parent_id,
@@ -195,7 +195,7 @@ export async function get_nested_obj_li_v3({
if (delay_ms > 0) params['delay_ms'] = delay_ms;
if (log_lvl) {
console.log('*** get_nested_obj_li_v3 ***');
console.log('*** get_nested_obj_li ***');
console.log('Endpoint:', endpoint);
console.log('Params:', params);
}

View File

@@ -5,10 +5,10 @@ import type { key_val } from '$lib/stores/ae_stores';
* Get a list of lookup objects (V3)
* Standardized lookup data like countries, timezones, and subdivisions.
* Updated 2026-02-20
*
*
* Endpoint: GET /v3/lookup/{lu_type}/list
*/
export async function get_ae_lookup_li_v3({
export async function get_ae_lookup_li({
api_cfg,
lu_type,
site_id,
@@ -38,11 +38,11 @@ export async function get_ae_lookup_li_v3({
log_lvl?: number;
}) {
if (log_lvl) {
console.log(`*** get_ae_lookup_li_v3() *** lu_type=${lu_type}`);
console.log(`*** get_ae_lookup_li() *** lu_type=${lu_type}`);
}
const endpoint = `/v3/lookup/${lu_type}/list`;
// Build query params
if (site_id) params['site_id'] = site_id;
if (for_type) params['for_type'] = for_type;
@@ -53,11 +53,11 @@ export async function get_ae_lookup_li_v3({
if (limit != null) params['limit'] = limit;
if (offset != null) params['offset'] = offset;
// Lookup data is often global; ensure account context is handled if needed,
// Lookup data is often global; ensure account context is handled if needed,
// but GUIDE says it uses site Whitelist Policy.
// If no account_id is present in api_cfg, we might need 'x-no-account-id'
// If no account_id is present in api_cfg, we might need 'x-no-account-id'
// for some lookups if they are public.
return await get_object({
api_cfg,
endpoint,

View File

@@ -23,7 +23,7 @@ export async function create_ae_obj_v3({
log_lvl = 0
}: CreateAeObjV3Params) {
const endpoint = `/v3/crud/${obj_type}/`;
if (log_lvl) {
console.log('*** create_ae_obj_v3 ***');
console.log('Endpoint:', endpoint);
@@ -61,7 +61,7 @@ interface CreateNestedObjV3Params {
for_obj_type?: string;
for_obj_id?: string;
obj_type?: string;
fields: key_val;
params?: key_val;
log_lvl?: number;
@@ -233,7 +233,7 @@ interface DeleteAeObjV3Params {
* Delete a single object by ID (V3)
* Supports 'delete' (hard), 'soft_delete', 'disable' (enable=false), and 'hide' (hide=true).
*/
export async function delete_ae_obj_v3({
export async function delete_ae_obj({
api_cfg,
obj_type,
obj_id,
@@ -245,7 +245,7 @@ export async function delete_ae_obj_v3({
const query_params = { ...params, method };
if (log_lvl) {
console.log('*** delete_ae_obj_v3 ***');
console.log('*** delete_ae_obj ***');
console.log('Endpoint:', endpoint);
console.log('Params:', query_params);
}
@@ -278,7 +278,7 @@ interface DeleteNestedAeObjV3Params {
/**
* Delete a single nested object by ID (V3)
*/
export async function delete_nested_ae_obj_v3({
export async function delete_nested_ae_obj({
api_cfg,
parent_type,
parent_id,
@@ -301,7 +301,7 @@ export async function delete_nested_ae_obj_v3({
const query_params = { ...params, method };
if (log_lvl) {
console.log('*** delete_nested_ae_obj_v3 ***');
console.log('*** delete_nested_ae_obj ***');
console.log('Endpoint:', endpoint);
console.log('Params:', query_params);
}

View File

@@ -19,7 +19,7 @@ interface SearchAeObjV3Params {
log_lvl?: number;
}
export async function search_ae_obj_v3({
export async function search_ae_obj({
api_cfg,
obj_type,
search_query,
@@ -61,7 +61,7 @@ export async function search_ae_obj_v3({
}
if (log_lvl) {
console.log('*** search_ae_obj_v3 ***');
console.log('*** search_ae_obj ***');
console.log('Endpoint:', endpoint);
console.log('Params:', query_params);
console.log('Search Query:', search_query);