We're currently retrieving a list of Salesforce apps from the UI API using this function:
net.sendRequest('/services/data', `${net.getApiVersion()}/ui-api/apps`,
(e) => {
setApps(e.apps);
if (selectedApp) {
if (!find(e.apps, { appId: selectedApp })) return setPage("AppSwitcher");
setPage("Page");
} else {
setPage("AppSwitcher")
}
},
console.error,
'GET',
{ formFactor: 'Large', userCustomizations: 'true' }
);
We're now attempting to migrate to SmartStore and SmartSync - but cannot find any documentation on how to query a REST API endpoint using SmartSync - i.e - what would we populate in the target section for syncDown:
syncDownApps() {
return syncDown(false, {target}, "apps", { mergeMode: smartsync.MERGE_MODE.OVERWRITE }, "appSync")
.then(() => {
console.log("Sync completed");
})
}
registerAppSoup() {
registerSoup(false, "apps", [
{path: "Id", type: "string"},
{path: "__local__", type: "string"}
]).then(this.syncDownApps);
}
All current Salesforce documentation shows examples using SOQL. Thanks for your help :)