Finalize Unified Type Migration and scaffold core logistics logic
- Completed the unified type system in ae_types.ts covering all 42 active Aether objects. - Scaffolded missing core logic modules for Organization, EventTrack, and Sponsorship with standardized return types. - Updated project roadmap in TODO.md to reflect mission completion on foundational type parity.
This commit is contained in:
42
src/lib/ae_sponsorships/ae_sponsorships__sponsorship.ts
Normal file
42
src/lib/ae_sponsorships/ae_sponsorships__sponsorship.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { api } from '$lib/api/api';
|
||||
import type { ae_Sponsorship } from '$lib/types/ae_types';
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
|
||||
/**
|
||||
* Sponsorship module logic
|
||||
*/
|
||||
|
||||
export async function load_ae_obj_id__sponsorship({
|
||||
api_cfg,
|
||||
sponsorship_id,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any;
|
||||
sponsorship_id: string;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_Sponsorship | null> {
|
||||
return await api.get_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type: 'sponsorship',
|
||||
obj_id: sponsorship_id,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
|
||||
export async function load_ae_obj_li__sponsorship({
|
||||
api_cfg,
|
||||
for_obj_id,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any;
|
||||
for_obj_id: string;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_Sponsorship[]> {
|
||||
return await api.get_ae_obj_li_v3({
|
||||
api_cfg,
|
||||
obj_type: 'sponsorship',
|
||||
for_obj_type: 'account',
|
||||
for_obj_id,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user