Save notes and documentation updates
This commit is contained in:
@@ -295,3 +295,53 @@ export async function get_ae_obj_li_for_obj_id_crud_v2({
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```ts
|
||||
/**
|
||||
* Aether V3 Search (POST)
|
||||
* Standardized search with recursive logical grouping and wildcard support.
|
||||
*/
|
||||
export async function search_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type,
|
||||
search_query, // Example: { q: "%", and: [{ field: "enable", op: "eq", value: true }] }
|
||||
view = 'default',
|
||||
limit = 100,
|
||||
offset = 0,
|
||||
log_lvl = 0
|
||||
}) {
|
||||
const endpoint = `/v3/crud/${obj_type}/search`;
|
||||
const params = { view, limit, offset };
|
||||
|
||||
return await post_object({
|
||||
api_cfg,
|
||||
endpoint,
|
||||
params,
|
||||
data: search_query,
|
||||
log_lvl
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Aether V3 Schema Discovery (GET)
|
||||
* Returns database and Pydantic model metadata for an object.
|
||||
*/
|
||||
export async function get_obj_schema_v3({ api_cfg, obj_type, view = 'default' }) {
|
||||
const endpoint = `/v3/crud/${obj_type}/schema`;
|
||||
const params = { view };
|
||||
|
||||
return await get_object({ api_cfg, endpoint, params });
|
||||
}
|
||||
|
||||
/**
|
||||
* Initial Site/Domain Resolution (Legacy V1/V2 Public Route)
|
||||
* Used to bootstrap the app context (resolve account_id) from the current FQDN.
|
||||
*/
|
||||
export async function resolve_site_context({ api_cfg, fqdn }) {
|
||||
// This specific path bypasses X-Account-ID requirement
|
||||
const endpoint = `/crud/site/domain/${fqdn}`;
|
||||
const params = { use_alt_table: true, use_alt_base: true };
|
||||
|
||||
return await get_object({ api_cfg, endpoint, params });
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user