Migrate Content and Storage modules to unified type system
- Added ae_HostedFile, ae_HostedFileLink, ae_DataStore, ae_Post, ae_PostComment, ae_Page, ae_Archive, and ae_ArchiveContent to ae_types.ts. - Replaced local interfaces in core__hosted_files.ts and core__data_store.ts with unified imports. - Replaced local interfaces in ae_archives/*.ts with unified imports. - Standardized Promise return types for all core data loading, creation, search, and update functions across migrated modules. - Synchronized storage and archival modules with Backend V3 field naming and Triple-ID patterns.
This commit is contained in:
@@ -3,6 +3,7 @@ import { api } from '$lib/api/api';
|
||||
|
||||
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
|
||||
import { db_archives } from '$lib/ae_archives/db_archives';
|
||||
import type { ae_Archive } from '$lib/types/ae_types';
|
||||
|
||||
import { load_ae_obj_li__archive_content } from '$lib/ae_archives/ae_archives__archive_content';
|
||||
|
||||
@@ -33,7 +34,7 @@ export async function load_ae_obj_id__archive({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_Archive | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** load_ae_obj_id__archive() *** archive_id=${archive_id}`);
|
||||
}
|
||||
@@ -123,11 +124,10 @@ export async function load_ae_obj_li__archive({
|
||||
view?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
order_by_li?: Record<string, 'ASC' | 'DESC'>;
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_Archive[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_li__archive() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
|
||||
@@ -208,7 +208,7 @@ export async function create_ae_obj__archive({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_Archive | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** create_ae_obj__archive() *** account_id=${account_id}`);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ export async function update_ae_obj__archive({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_Archive | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** update_ae_obj__archive() *** archive_id=${archive_id}`, data_kv);
|
||||
}
|
||||
@@ -352,7 +352,7 @@ export async function qry__archive({
|
||||
offset?: number;
|
||||
order_by_li?: Record<string, 'ASC' | 'DESC'>;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_Archive[]> {
|
||||
const search_query: any = { and: [] };
|
||||
|
||||
if (account_id) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { api } from '$lib/api/api';
|
||||
|
||||
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
|
||||
import { db_archives } from '$lib/ae_archives/db_archives';
|
||||
import type { ae_ArchiveContent } from '$lib/types/ae_types';
|
||||
|
||||
const ae_promises: key_val = {};
|
||||
|
||||
@@ -21,7 +22,7 @@ export async function load_ae_obj_id__archive_content({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_ArchiveContent | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_id__archive_content() *** archive_content_id=${archive_content_id}`
|
||||
@@ -95,11 +96,10 @@ export async function load_ae_obj_li__archive_content({
|
||||
view?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
order_by_li?: Record<string, 'ASC' | 'DESC'>;
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_ArchiveContent[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_li__archive_content() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
|
||||
@@ -159,7 +159,7 @@ export async function create_ae_obj__archive_content({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_ArchiveContent | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** create_ae_obj__archive_content() *** archive_id=${archive_id}`);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ export async function update_ae_obj__archive_content({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_ArchiveContent | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** update_ae_obj__archive_content() *** archive_content_id=${archive_content_id}`,
|
||||
|
||||
Reference in New Issue
Block a user