docs(core): mark data store fallback temporary and list special cases
This commit is contained in:
@@ -12,7 +12,9 @@ interface GetDataStoreV3Params {
|
||||
|
||||
/**
|
||||
* Get a Data Store object by its human-friendly code (V3)
|
||||
* Uses hierarchical fallback logic (Specific -> Account -> Global)
|
||||
* Uses hierarchical fallback logic (Specific -> Account -> Global).
|
||||
* TEMPORARY: the global fallback is a stopgap until the backend can
|
||||
* serve account-scoped defaults via JWT-backed access only.
|
||||
* Path: GET /v3/data_store/code/{code}
|
||||
*/
|
||||
export async function get_data_store({
|
||||
@@ -36,8 +38,9 @@ export async function get_data_store({
|
||||
|
||||
const headers: key_val = {};
|
||||
if (no_account_id) {
|
||||
// Use the standard bypass header understood by get_object so the
|
||||
// request can actually fall back to global defaults.
|
||||
// TEMPORARY: keep this narrow global-default escape hatch until the
|
||||
// backend can answer the data_store request with account-scoped JWT
|
||||
// access only.
|
||||
headers['x-no-account-id'] = 'Nothing to See Here';
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ async function load_ae_obj_id__site_domain({
|
||||
no_account_id = true;
|
||||
// api_cfg.headers['x_account_id'] = 'nothing here';
|
||||
}
|
||||
// LEGACY BOOTSTRAP SPECIAL CASE: this helper is effectively a remove
|
||||
// candidate once all site-domain lookups use the cache-first/bootstrap
|
||||
// path in ae_core__site.ts.
|
||||
no_account_id = true;
|
||||
|
||||
const params = {};
|
||||
|
||||
@@ -28,6 +28,10 @@ export async function load_ae_obj_by_code__data_store({
|
||||
save_idb?: boolean;
|
||||
timeout?: number;
|
||||
log_lvl?: number;
|
||||
// TEMPORARY: this no-account fallback exists only until the backend
|
||||
// can serve account-scoped defaults via JWT-backed access alone.
|
||||
// Keep this path narrow and remove it when the backend no longer
|
||||
// needs a transport-level scope drop for data_store.
|
||||
}): Promise<any> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** load_ae_obj_by_code__data_store() *** code=${code}`);
|
||||
|
||||
@@ -227,6 +227,9 @@ async function load_data_store() {
|
||||
`ae_e_data_store [${ds_code}]: Not found in context (Status ${status_code}). Trying global fallback.`
|
||||
);
|
||||
|
||||
// TEMPORARY: same global-default fallback as core__data_store.ts.
|
||||
// This should go away once the backend can answer with JWT-backed,
|
||||
// account-scoped defaults only.
|
||||
ds_results = await api.get_data_store({
|
||||
api_cfg,
|
||||
code: ds_code,
|
||||
|
||||
Reference in New Issue
Block a user