feat: Migrate ESLint to flat config and resolve initial linting errors

Migrated the ESLint configuration to the new flat config format ()
and addressed several initial linting errors.

Key changes include:
- Updated ESLint configuration to treat  as warnings instead of errors.
- Fixed  errors in  by declaring  and .
- Corrected  error in  by using  instead of an out-of-scope .
- Resolved  error in  by replacing the undefined  directive with the  component.
- Addressed  errors in  by replacing  with  and  with .
- Fixed  errors in  by importing necessary modules (, , ) and adding missing props (, , , , ).
This commit is contained in:
Scott Idem
2025-11-17 18:46:54 -05:00
parent b99e85f1db
commit 7e1eaba3bc
374 changed files with 95654 additions and 93952 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,462 +1,456 @@
import type { key_val } from '$lib/stores/ae_stores';
import { api } from '$lib/api/api';
import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie";
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
import { db_posts } from "$lib/ae_posts/db_posts";
let ae_promises: key_val = {};
import { db_posts } from '$lib/ae_posts/db_posts';
const ae_promises: key_val = {};
// Updated 2025-06-23
export async function load_ae_obj_id__post_comment(
{
api_cfg,
post_comment_id,
enabled = 'enabled',
hidden = 'not_hidden',
limit = 99,
offset = 0,
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any,
post_comment_id: string,
enabled?: "enabled" | "all" | "not_enabled" | undefined,
hidden?: "hidden" | "all" | "not_hidden" | undefined,
limit?: number,
offset?: number,
params?: key_val,
try_cache?: boolean,
log_lvl?: number
}
) {
if (log_lvl) {
console.log(`*** load_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`);
}
export async function load_ae_obj_id__post_comment({
api_cfg,
post_comment_id,
enabled = 'enabled',
hidden = 'not_hidden',
limit = 99,
offset = 0,
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any;
post_comment_id: string;
enabled?: 'enabled' | 'all' | 'not_enabled' | undefined;
hidden?: 'hidden' | 'all' | 'not_hidden' | undefined;
limit?: number;
offset?: number;
params?: key_val;
try_cache?: boolean;
log_lvl?: number;
}) {
if (log_lvl) {
console.log(`*** load_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`);
}
ae_promises.load__post_comment_obj = await api.get_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
obj_id: post_comment_id,
use_alt_table: false,
use_alt_base: false,
params: params,
log_lvl: log_lvl
})
.then(async function (post_comment_obj_get_result) {
if (post_comment_obj_get_result) {
if (try_cache) {
// Process the results first
let processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: [post_comment_obj_get_result],
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('DB save completed.');
}
ae_promises.load__post_comment_obj = await api
.get_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
obj_id: post_comment_id,
use_alt_table: false,
use_alt_base: false,
params: params,
log_lvl: log_lvl
})
.then(async function (post_comment_obj_get_result) {
if (post_comment_obj_get_result) {
if (try_cache) {
// Process the results first
const processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: [post_comment_obj_get_result],
log_lvl: log_lvl
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl
});
if (log_lvl) {
console.log('DB save completed.');
}
// // This is expecting a list
// db_save_ae_obj_li__post_comment({
// obj_type: 'post_comment',
// obj_li: [post_comment_obj_get_result],
// log_lvl: log_lvl
// // This is expecting a list
// db_save_ae_obj_li__post_comment({
// obj_type: 'post_comment',
// obj_li: [post_comment_obj_get_result],
// log_lvl: log_lvl
// });
}
return post_comment_obj_get_result;
} else {
console.log('No results returned.');
return null;
}
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
});
// });
}
return post_comment_obj_get_result;
} else {
console.log('No results returned.');
return null;
}
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
});
return ae_promises.load__post_comment_obj;
return ae_promises.load__post_comment_obj;
}
// Updated 2025-06-23
export async function load_ae_obj_li__post_comment(
{
api_cfg,
for_obj_type = 'post',
for_obj_id,
enabled = 'enabled',
hidden = 'not_hidden',
limit = 99,
offset = 0,
order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'},
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any,
for_obj_type: string,
for_obj_id: string,
enabled?: "enabled" | "all" | "not_enabled" | undefined,
hidden?: "hidden" | "all" | "not_hidden" | undefined,
limit?: number,
offset?: number,
order_by_li?: key_val,
params?: key_val,
try_cache?: boolean,
log_lvl?: number
}
) {
if (log_lvl) {
console.log(`*** load_ae_obj_li__post_comment() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`);
}
export async function load_ae_obj_li__post_comment({
api_cfg,
for_obj_type = 'post',
for_obj_id,
enabled = 'enabled',
hidden = 'not_hidden',
limit = 99,
offset = 0,
order_by_li = {
priority: 'DESC',
sort: 'DESC',
updated_on: 'DESC',
created_on: 'DESC',
title: 'ASC'
},
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any;
for_obj_type: string;
for_obj_id: string;
enabled?: 'enabled' | 'all' | 'not_enabled' | undefined;
hidden?: 'hidden' | 'all' | 'not_hidden' | undefined;
limit?: number;
offset?: number;
order_by_li?: key_val;
params?: key_val;
try_cache?: boolean;
log_lvl?: number;
}) {
if (log_lvl) {
console.log(
`*** load_ae_obj_li__post_comment() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
);
}
let params_json: key_val = {};
const params_json: key_val = {};
if (log_lvl) {
console.log('params_json:', params_json);
}
if (log_lvl) {
console.log('params_json:', params_json);
}
ae_promises.load__post_comment_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({
api_cfg: api_cfg,
obj_type: 'post_comment',
for_obj_type: for_obj_type,
for_obj_id: for_obj_id,
use_alt_tbl: false,
use_alt_mdl: false,
use_alt_exp: false,
enabled: enabled,
hidden: hidden,
order_by_li: order_by_li,
limit: limit,
offset: offset,
params_json: params_json,
params: params,
log_lvl: log_lvl
})
.then(async function (post_comment_obj_li_get_result) {
if (post_comment_obj_li_get_result) {
if (try_cache) {
// Process the results first
let processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: post_comment_obj_li_get_result,
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('DB save completed.');
}
ae_promises.load__post_comment_obj_li = await api
.get_ae_obj_li_for_obj_id_crud_v2({
api_cfg: api_cfg,
obj_type: 'post_comment',
for_obj_type: for_obj_type,
for_obj_id: for_obj_id,
use_alt_tbl: false,
use_alt_mdl: false,
use_alt_exp: false,
enabled: enabled,
hidden: hidden,
order_by_li: order_by_li,
limit: limit,
offset: offset,
params_json: params_json,
params: params,
log_lvl: log_lvl
})
.then(async function (post_comment_obj_li_get_result) {
if (post_comment_obj_li_get_result) {
if (try_cache) {
// Process the results first
const processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: post_comment_obj_li_get_result,
log_lvl: log_lvl
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl
});
if (log_lvl) {
console.log('DB save completed.');
}
// db_save_ae_obj_li__post_comment({
// obj_type: 'post_comment',
// obj_li: post_comment_obj_li_get_result,
// log_lvl: log_lvl
// });
}
return post_comment_obj_li_get_result;
} else {
return [];
}
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
});
// db_save_ae_obj_li__post_comment({
// obj_type: 'post_comment',
// obj_li: post_comment_obj_li_get_result,
// log_lvl: log_lvl
// });
}
return post_comment_obj_li_get_result;
} else {
return [];
}
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
});
if (log_lvl) {
console.log('ae_promises.load__post_comment_obj_li:', ae_promises.load__post_comment_obj_li);
}
if (log_lvl) {
console.log('ae_promises.load__post_comment_obj_li:', ae_promises.load__post_comment_obj_li);
}
return ae_promises.load__post_comment_obj_li;
return ae_promises.load__post_comment_obj_li;
}
// Updated 2025-06-23
export async function create_ae_obj__post_comment(
{
api_cfg,
post_id,
data_kv,
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any,
post_id: string,
data_kv: key_val,
params?: key_val,
try_cache?: boolean,
log_lvl?: number
}
) {
if (log_lvl) {
console.log(`*** create_ae_obj__post_comment() *** post_id=${post_id}`);
}
export async function create_ae_obj__post_comment({
api_cfg,
post_id,
data_kv,
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any;
post_id: string;
data_kv: key_val;
params?: key_val;
try_cache?: boolean;
log_lvl?: number;
}) {
if (log_lvl) {
console.log(`*** create_ae_obj__post_comment() *** post_id=${post_id}`);
}
if (!post_id) {
console.log(`ERROR: Posts - Comment - post_id required to create`);
return false;
}
if (!post_id) {
console.log(`ERROR: Posts - Comment - post_id required to create`);
return false;
}
ae_promises.create__post_comment = await api.create_ae_obj_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
fields: {
post_id_random: post_id,
...data_kv
},
key: api_cfg.api_crud_super_key,
params: params,
return_obj: true,
log_lvl: log_lvl
})
.then(async function (post_comment_obj_create_result) {
if (post_comment_obj_create_result) {
if (try_cache) {
// Process the results first
let processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: [post_comment_obj_create_result],
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('DB save completed.');
}
ae_promises.create__post_comment = await api
.create_ae_obj_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
fields: {
post_id_random: post_id,
...data_kv
},
key: api_cfg.api_crud_super_key,
params: params,
return_obj: true,
log_lvl: log_lvl
})
.then(async function (post_comment_obj_create_result) {
if (post_comment_obj_create_result) {
if (try_cache) {
// Process the results first
const processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: [post_comment_obj_create_result],
log_lvl: log_lvl
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl
});
if (log_lvl) {
console.log('DB save completed.');
}
// db_save_ae_obj_li__post_comment(
// {
// obj_type: 'post_comment',
// obj_li: [post_comment_obj_create_result],
// log_lvl: log_lvl
// });
}
return post_comment_obj_create_result;
} else {
return null;
}
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
})
.finally(function () {
});
// db_save_ae_obj_li__post_comment(
// {
// obj_type: 'post_comment',
// obj_li: [post_comment_obj_create_result],
// log_lvl: log_lvl
// });
}
return post_comment_obj_create_result;
} else {
return null;
}
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
})
.finally(function () {});
if (log_lvl) {
console.log('ae_promises.create__post_comment:', ae_promises.create__post_comment);
}
return ae_promises.create__post_comment;
if (log_lvl) {
console.log('ae_promises.create__post_comment:', ae_promises.create__post_comment);
}
return ae_promises.create__post_comment;
}
// Updated 2024-11-08
export async function delete_ae_obj_id__post_comment(
{
api_cfg,
post_comment_id,
method = 'delete', // 'delete', 'disable', 'hide'
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any,
post_comment_id: string,
method?: string,
params?: key_val,
try_cache?: boolean,
log_lvl?: number
}
) {
if (log_lvl) {
console.log(`*** delete_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`);
}
export async function delete_ae_obj_id__post_comment({
api_cfg,
post_comment_id,
method = 'delete', // 'delete', 'disable', 'hide'
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any;
post_comment_id: string;
method?: string;
params?: key_val;
try_cache?: boolean;
log_lvl?: number;
}) {
if (log_lvl) {
console.log(`*** delete_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`);
}
ae_promises.delete__post_comment_obj = await api.delete_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
obj_id: post_comment_id,
key: api_cfg.api_crud_super_key,
params: params,
method: method,
log_lvl: log_lvl
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
})
.finally(function () {
if (try_cache) {
if (log_lvl) {
console.log(`Attempting to remove IDB entry for post_comment_id=${post_comment_id}`);
}
db_posts.comment.delete(post_comment_id); // Delete from the DB no matter what.
}
});
ae_promises.delete__post_comment_obj = await api
.delete_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
obj_id: post_comment_id,
key: api_cfg.api_crud_super_key,
params: params,
method: method,
log_lvl: log_lvl
})
.catch(function (error: any) {
console.log('No results returned or failed.', error);
})
.finally(function () {
if (try_cache) {
if (log_lvl) {
console.log(`Attempting to remove IDB entry for post_comment_id=${post_comment_id}`);
}
db_posts.comment.delete(post_comment_id); // Delete from the DB no matter what.
}
});
if (log_lvl) {
console.log('ae_promises.delete__post_comment_obj:', ae_promises.delete__post_comment_obj);
}
if (log_lvl) {
console.log('ae_promises.delete__post_comment_obj:', ae_promises.delete__post_comment_obj);
}
return ae_promises.delete__post_comment_obj;
return ae_promises.delete__post_comment_obj;
}
// Updated 2025-06-23
export async function update_ae_obj__post_comment(
{
api_cfg,
post_comment_id,
data_kv,
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any,
post_comment_id: string,
data_kv: key_val,
params?: key_val,
try_cache?: boolean,
log_lvl?: number
}
) {
if (log_lvl) {
console.log(`*** update_ae_obj__post_comment() *** post_comment_id=${post_comment_id}`, data_kv);
}
export async function update_ae_obj__post_comment({
api_cfg,
post_comment_id,
data_kv,
params = {},
try_cache = true,
log_lvl = 0
}: {
api_cfg: any;
post_comment_id: string;
data_kv: key_val;
params?: key_val;
try_cache?: boolean;
log_lvl?: number;
}) {
if (log_lvl) {
console.log(
`*** update_ae_obj__post_comment() *** post_comment_id=${post_comment_id}`,
data_kv
);
}
// Perform the API update
const result = await api.update_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
obj_id: post_comment_id,
fields: data_kv,
key: api_cfg.api_crud_super_key,
params: params,
return_obj: true,
log_lvl: log_lvl,
});
// Perform the API update
const result = await api.update_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'post_comment',
obj_id: post_comment_id,
fields: data_kv,
key: api_cfg.api_crud_super_key,
params: params,
return_obj: true,
log_lvl: log_lvl
});
// Handle the result
if (result) {
if (try_cache) {
// Process the results first
let processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: [result],
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl,
});
if (log_lvl) {
console.log('DB save completed.');
}
// Handle the result
if (result) {
if (try_cache) {
// Process the results first
const processed_obj_li = await process_ae_obj__post_comment_props({
obj_li: [result],
log_lvl: log_lvl
});
if (log_lvl) {
console.log('Processed object list:', processed_obj_li);
}
// Save the updated results list to the database
if (log_lvl) {
console.log('Saving to DB...');
}
await db_save_ae_obj_li__ae_obj({
db_instance: db_posts,
table_name: 'comment',
obj_li: processed_obj_li,
properties_to_save: properties_to_save,
log_lvl: log_lvl
});
if (log_lvl) {
console.log('DB save completed.');
}
// await db_save_ae_obj_li__post_comment({
// obj_type: 'post_comment',
// obj_li: [result],
// log_lvl: log_lvl,
// });
}
return result;
} else {
console.error('Failed to update post comment.');
return null;
}
// await db_save_ae_obj_li__post_comment({
// obj_type: 'post_comment',
// obj_li: [result],
// log_lvl: log_lvl,
// });
}
return result;
} else {
console.error('Failed to update post comment.');
return null;
}
}
// Updated 2025-06-04
export const properties_to_save = [
'id',
'post_comment_id',
// 'post_comment_id_random',
'id',
'post_comment_id',
// 'post_comment_id_random',
'post_id',
// 'post_id_random',
'post_id',
// 'post_id_random',
'external_person_id',
'external_person_id',
'name',
'title',
'content',
'name',
'title',
'content',
'anonymous',
'full_name',
'email',
'notify',
'anonymous',
'full_name',
'email',
'notify',
'linked_li_json',
'cfg_json',
'linked_li_json',
'cfg_json',
'enable',
'hide',
'priority',
'sort',
'group',
'notes',
'created_on',
'updated_on',
'enable',
'hide',
'priority',
'sort',
'group',
'notes',
'created_on',
'updated_on',
// Generated fields for sorting locally only
'tmp_sort_1',
'tmp_sort_2',
// 'tmp_sort_a',
// 'tmp_sort_b',
// Generated fields for sorting locally only
'tmp_sort_1',
'tmp_sort_2'
// 'tmp_sort_a',
// 'tmp_sort_b',
// From SQL view
// From SQL view
];
/**
* NON-EXPORTED LOCAL HELPER
* Processes a list of Aether objects by applying common and specific transformations.
@@ -525,7 +519,6 @@ async function _process_generic_props<T extends Record<string, any>>({
return processed_obj_li;
}
// Updated 2025-06-04
export async function process_ae_obj__post_comment_props({
obj_li,
@@ -550,4 +543,4 @@ export async function process_ae_obj__post_comment_props({
return obj;
}
});
}
}

View File

@@ -1,38 +1,32 @@
// This file is used to export all the functions that are used for Aether Posts related functions.
import {
load_ae_obj_id__post,
load_ae_obj_li__post,
create_ae_obj__post,
delete_ae_obj_id__post,
update_ae_obj__post,
} from "$lib/ae_posts/ae_posts__post";
load_ae_obj_id__post,
load_ae_obj_li__post,
create_ae_obj__post,
delete_ae_obj_id__post,
update_ae_obj__post
} from '$lib/ae_posts/ae_posts__post';
import {
load_ae_obj_id__post_comment,
load_ae_obj_li__post_comment,
create_ae_obj__post_comment,
delete_ae_obj_id__post_comment,
update_ae_obj__post_comment,
load_ae_obj_id__post_comment,
load_ae_obj_li__post_comment,
create_ae_obj__post_comment,
delete_ae_obj_id__post_comment,
update_ae_obj__post_comment
} from '$lib/ae_posts/ae_posts__post_comment';
} from "$lib/ae_posts/ae_posts__post_comment";
let export_obj = {
load_ae_obj_id__post: load_ae_obj_id__post,
load_ae_obj_li__post: load_ae_obj_li__post,
create_ae_obj__post: create_ae_obj__post,
delete_ae_obj_id__post: delete_ae_obj_id__post,
update_ae_obj__post: update_ae_obj__post,
load_ae_obj_id__post_comment: load_ae_obj_id__post_comment,
load_ae_obj_li__post_comment: load_ae_obj_li__post_comment,
create_ae_obj__post_comment: create_ae_obj__post_comment,
delete_ae_obj_id__post_comment: delete_ae_obj_id__post_comment,
update_ae_obj__post_comment: update_ae_obj__post_comment,
const export_obj = {
load_ae_obj_id__post: load_ae_obj_id__post,
load_ae_obj_li__post: load_ae_obj_li__post,
create_ae_obj__post: create_ae_obj__post,
delete_ae_obj_id__post: delete_ae_obj_id__post,
update_ae_obj__post: update_ae_obj__post,
load_ae_obj_id__post_comment: load_ae_obj_id__post_comment,
load_ae_obj_li__post_comment: load_ae_obj_li__post_comment,
create_ae_obj__post_comment: create_ae_obj__post_comment,
delete_ae_obj_id__post_comment: delete_ae_obj_id__post_comment,
update_ae_obj__post_comment: update_ae_obj__post_comment
};
export let posts_func = export_obj;
export const posts_func = export_obj;

View File

@@ -7,115 +7,113 @@ import type { key_val } from '$lib/stores/ae_stores';
// Updated 2024-11-13
export interface Post {
id: string;
// id_random: string;
post_id: string;
// post_id_random: string;
id: string;
// id_random: string;
post_id: string;
// post_id_random: string;
account_id: string;
// account_id_random: string;
account_id: string;
// account_id_random: string;
person_id?: null|string;
external_person_id?: null|string; // For IDAA this is the Novi UUID
user_id?: null|string;
person_id?: null | string;
external_person_id?: null | string; // For IDAA this is the Novi UUID
user_id?: null | string;
topic_id?: string;
topic?: string; // or topic_name?
topic_name?: string;
topic_id?: string;
topic?: string; // or topic_name?
topic_name?: string;
name: null|string;
title: null|string;
// summary?: null|string;
content?: null|string;
name: null | string;
title: null | string;
// summary?: null|string;
content?: null | string;
anonymous?: null|boolean;
full_name?: null|string;
email?: null|string;
notify?: null|boolean;
anonymous?: null | boolean;
full_name?: null | string;
email?: null | string;
notify?: null | boolean;
enable_comments?: null|boolean;
enable_comments?: null | boolean;
archive?: null|boolean;
archive_on?: null|Date;
archive?: null | boolean;
archive_on?: null | Date;
linked_li_json?: null|string;
cfg_json?: null|key_val;
linked_li_json?: null | string;
cfg_json?: null | key_val;
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;
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;
// Generated fields for sorting locally only
tmp_sort_1?: null|string;
tmp_sort_2?: null|string;
// Generated fields for sorting locally only
tmp_sort_1?: null | string;
tmp_sort_2?: null | string;
// Additional fields for convenience (database views)
post_comment_count?: number;
// Additional fields for convenience (database views)
post_comment_count?: number;
// Placeholder for generated temp data
hosted_file_id_li?: null|Array<string>;
hosted_file_obj_li?: null|Array<any>;
upload_complete?: boolean;
// Placeholder for generated temp data
hosted_file_id_li?: null | Array<string>;
hosted_file_obj_li?: null | Array<any>;
upload_complete?: boolean;
}
// Updated 2024-11-13
export interface Post_Comment {
id: string;
// id_random: string;
post_comment_id: string;
// post_comment_id_random: string;
id: string;
// id_random: string;
post_comment_id: string;
// post_comment_id_random: string;
post_id: string;
// post_id_random: string;
post_id: string;
// post_id_random: string;
external_person_id?: null|string; // For IDAA this is the Novi UUID
external_person_id?: null | string; // For IDAA this is the Novi UUID
name: null|string;
title: null|string;
// summary?: null|string;
content?: null|string;
name: null | string;
title: null | string;
// summary?: null|string;
content?: null | string;
anonymous?: null|boolean;
full_name?: null|string;
email?: null|string;
notify?: null|boolean;
anonymous?: null | boolean;
full_name?: null | string;
email?: null | string;
notify?: null | boolean;
linked_li_json?: null|string;
cfg_json?: null|key_val;
linked_li_json?: null | string;
cfg_json?: null | key_val;
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;
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;
// Generated fields for sorting locally only
tmp_sort_1?: null|string;
tmp_sort_2?: null|string;
// Generated fields for sorting locally only
tmp_sort_1?: null | string;
tmp_sort_2?: null | string;
// Additional fields for convenience (database views)
// Additional fields for convenience (database views)
}
// Updated 2024-09-25
export class MySubClassedDexie extends Dexie {
// We just tell the typing system this is the case
post!: Table<Post>;
comment!: Table<Post_Comment>;
// We just tell the typing system this is the case
post!: Table<Post>;
comment!: Table<Post_Comment>;
constructor() {
super('ae_posts_db');
this.version(1).stores({
post: `
constructor() {
super('ae_posts_db');
this.version(1).stores({
post: `
id, post_id,
account_id,
topic_id, topic,
@@ -126,16 +124,16 @@ export class MySubClassedDexie extends Dexie {
tmp_sort_1, tmp_sort_2,
enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on], [created_on+updated_on]`,
comment: `
comment: `
id, post_comment_id,
post_id,
name,
title,
full_name, email,
tmp_sort_1, tmp_sort_2,
enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on]`,
});
}
enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on]`
});
}
}
export const db_posts = new MySubClassedDexie();