General code clean up
This commit is contained in:
@@ -20,7 +20,7 @@ async function handle_load_ae_obj_id__site_domain(
|
||||
try_cache=false,
|
||||
timeout=7000,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
fqdn: string,
|
||||
try_cache: boolean,
|
||||
@@ -236,7 +236,7 @@ async function handle_load_ae_obj_li__person(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
account_id: string,
|
||||
params?: key_val,
|
||||
@@ -366,7 +366,7 @@ async function handle_download_export__obj_type(
|
||||
limit=5000,
|
||||
params={}, // key value object is expected
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
get_obj_type: string,
|
||||
for_obj_type: string,
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function handle_load_ae_obj_id__event(
|
||||
event_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -58,7 +58,7 @@ export async function handle_load_ae_obj_li__event(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
account_id: string,
|
||||
params?: key_val,
|
||||
@@ -114,11 +114,19 @@ export async function handle_load_ae_obj_li__event(
|
||||
|
||||
|
||||
// This function will loop through the event_obj_li and save each one to the DB.
|
||||
export function handle_db_save_ae_obj_li__event({obj_type, obj_li}) {
|
||||
export function handle_db_save_ae_obj_li__event(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_db_save_ae_obj_li__event() ***`);
|
||||
|
||||
if (obj_li && obj_li.length) {
|
||||
obj_li.forEach(async function (obj) {
|
||||
obj_li.forEach(async function (obj: any) {
|
||||
// console.log(`ae_obj ${obj_type}:`, obj);
|
||||
|
||||
try {
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function handle_load_ae_obj_id__badge(
|
||||
badge_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
badge_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -271,7 +271,7 @@ export function handle_db_save_ae_obj_li__badge(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
} : {
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function handle_load_ae_obj_id__event_file(
|
||||
event_file_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_file_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -59,7 +59,7 @@ export async function handle_load_ae_obj_li__event_file(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_session_id: string,
|
||||
params?: key_val,
|
||||
@@ -119,7 +119,7 @@ export async function handle_delete_ae_obj_id__event_file(
|
||||
event_file_id,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_file_id: string,
|
||||
params?: key_val,
|
||||
@@ -158,7 +158,7 @@ export async function create_event_file_obj_from_hosted_file_async(
|
||||
inc_hosted_file=false,
|
||||
return_meta=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
hosted_file_id: string,
|
||||
params?: key_val,
|
||||
@@ -214,7 +214,7 @@ export function handle_db_save_ae_obj_li__event_file(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
} : {
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function handle_load_ae_obj_id__event_presentation(
|
||||
event_presentation_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_presentation_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -59,7 +59,7 @@ export async function handle_load_ae_obj_li__event_presentation(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_session_id: string,
|
||||
params?: key_val,
|
||||
@@ -117,7 +117,7 @@ export function handle_db_save_ae_obj_li__event_presentation(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
} : {
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function handle_load_ae_obj_id__event_presenter(
|
||||
event_presenter_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_presenter_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -59,7 +59,7 @@ export async function handle_load_ae_obj_li__event_presenter(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_presentation_id: string,
|
||||
params?: key_val,
|
||||
@@ -119,7 +119,7 @@ export async function handle_update_ae_obj__event_presenter(
|
||||
data,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_presenter_id: string,
|
||||
data: any,
|
||||
@@ -163,7 +163,7 @@ export function handle_db_save_ae_obj_li__event_presenter(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
} : {
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function handle_load_ae_obj_id__event_session(
|
||||
event_session_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_session_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -60,7 +60,7 @@ export async function handle_load_ae_obj_li__event_session(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_id: string,
|
||||
params?: key_val,
|
||||
@@ -235,7 +235,7 @@ export function handle_db_save_ae_obj_li__event_session(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
} : {
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function handle_load_ae_obj_id__exhibit(
|
||||
exhibit_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
exhibit_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -60,7 +60,7 @@ export async function handle_load_ae_obj_li__exhibit(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
event_id: any,
|
||||
params: any,
|
||||
@@ -199,7 +199,7 @@ export async function handle_load_ae_obj_id__exhibit_tracking(
|
||||
exhibit_tracking_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
exhibit_tracking_id: string,
|
||||
try_cache?: boolean,
|
||||
@@ -246,7 +246,7 @@ export async function handle_load_ae_obj_li__exhibit_tracking(
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
exhibit_id: any,
|
||||
params: any,
|
||||
@@ -313,7 +313,7 @@ export async function handle_create_ae_obj__exhibit_tracking(
|
||||
external_person_id,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
exhibit_id: string,
|
||||
event_badge_id: string,
|
||||
@@ -373,7 +373,7 @@ export async function handle_update_ae_obj__exhibit_tracking(
|
||||
data,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
exhibit_tracking_id: string,
|
||||
data: any,
|
||||
@@ -422,7 +422,7 @@ export async function handle_download_export__event_exhibit_tracking(
|
||||
auto_download=false,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
exhibit_id: string,
|
||||
file_type?: string,
|
||||
@@ -513,7 +513,7 @@ export function handle_db_save_ae_obj_li__exhibitor_tracking(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
} : {
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
// This file is used to export all the functions that are used for Aether Events related functions.
|
||||
|
||||
import { handle_load_ae_obj_id__event, handle_load_ae_obj_li__event, handle_db_save_ae_obj_li__event } from "$lib/ae_events__event";
|
||||
import {
|
||||
handle_load_ae_obj_id__event,
|
||||
handle_load_ae_obj_li__event,
|
||||
handle_db_save_ae_obj_li__event
|
||||
} from "$lib/ae_events__event";
|
||||
|
||||
import {
|
||||
handle_load_ae_obj_id__event_file,
|
||||
|
||||
@@ -19,7 +19,7 @@ async function handle_load_ae_obj_id__sponsorship_cfg(
|
||||
sponsorship_cfg_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
sponsorship_cfg_id: string,
|
||||
try_cache: boolean,
|
||||
@@ -76,7 +76,7 @@ async function handle_download_export__sponsorship(
|
||||
auto_download=false,
|
||||
params={}, // key value object is expected
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
account_id: string,
|
||||
file_type?: string,
|
||||
|
||||
@@ -669,7 +669,7 @@ export let shorten_string = function shorten_string(
|
||||
begin_length=15,
|
||||
end_length=5,
|
||||
wildcard_length=3
|
||||
} : {
|
||||
}: {
|
||||
string: string,
|
||||
max_length?: number,
|
||||
begin_length?: number,
|
||||
@@ -726,7 +726,7 @@ function shorten_filename(
|
||||
max_length=20,
|
||||
slice_end_at=15,
|
||||
max_end_length=5
|
||||
} : {
|
||||
}: {
|
||||
filename: string,
|
||||
max_length?: number,
|
||||
slice_end_at?: number,
|
||||
|
||||
@@ -31,7 +31,7 @@ export let get_ae_obj_id_crud = async function get_ae_obj_id_crud(
|
||||
timeout=25000,
|
||||
return_meta=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
no_account_id?: boolean,
|
||||
obj_type: string,
|
||||
@@ -203,7 +203,7 @@ export let get_ae_obj_li_for_obj_id_crud = async function get_ae_obj_li_for_obj_
|
||||
params={},
|
||||
return_meta=false,
|
||||
log_lvl=1
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
obj_type: string,
|
||||
for_obj_type: string,
|
||||
@@ -567,7 +567,7 @@ export let update_ae_obj_id_crud = async function update_ae_obj_id_crud(
|
||||
obj_v_name='',
|
||||
return_meta=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
obj_type: string,
|
||||
obj_id: string,
|
||||
|
||||
@@ -75,7 +75,7 @@ export let get_object = async function get_object(
|
||||
// The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event.
|
||||
task_id='get_object_x',
|
||||
log_lvl=0
|
||||
// } : {
|
||||
// }: {
|
||||
// api_cfg: any,
|
||||
// endpoint: string,
|
||||
// headers?: any,
|
||||
|
||||
@@ -27,7 +27,7 @@ export let get_object = async function get_object(
|
||||
// The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event.
|
||||
task_id=crypto.randomUUID(),
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
endpoint: string,
|
||||
headers?: any,
|
||||
|
||||
@@ -9,7 +9,7 @@ export let patch_object = async function patch_object(
|
||||
data={},
|
||||
return_meta=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
endpoint: string,
|
||||
params?: any,
|
||||
|
||||
@@ -20,7 +20,7 @@ export let post_object = async function post_object(
|
||||
// The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event.
|
||||
task_id=crypto.randomUUID(),
|
||||
log_lvl=0
|
||||
} : {
|
||||
}: {
|
||||
api_cfg: any,
|
||||
endpoint: string,
|
||||
params?: any,
|
||||
|
||||
Reference in New Issue
Block a user