
export function setSpecsURLsForDocumentWithID(documentID, specsURLs) {
  
}

@@ -1,77 +1,1580 @@
-%0Aexport function setSpecsURLsForDocumentWithID(documentID, specsURLs) %7B%0A  
+// TODO: change to ../config ?%0Aimport %7B getActionURL %7D from '../stores/ConfigurationStore';%0A%0A%0Aexport function setSpecsURLsForDocument(%7B documentID, specsURLs %7D) %7B%0A  return arguments%5B0%5D;%0A%7D%0A%0Aexport function invalidateSpec(%7B specURL %7D) %7B%0A  return arguments%5B0%5D;%0A%7D%0A%0Aexport function beginLoadingSpec(%7B specURL %7D) %7B%0A  return arguments%5B0%5D;%0A%7D%0A%0Aexport function didLoadSpec(%7B specURL, specJSON %7D) %7B%0A  return arguments%5B0%5D;%0A%7D%0A%0Aexport function didFailLoadingSpec(%7B specURL, error %7D) %7B%0A  return arguments%5B0%5D;%0A%7D%0A%0Afunction loadSpec(%7B specURL %7D, %7B dispatch %7D) %7B%0A  let loadURL;%0A%0A  const actionURL = getActionURL('specs/');%0A  if (actionURL) %7B%0A    loadURL = actionURL + specURL + '/';%0A  %7D%0A  else %7B%0A    loadURL = specURL;%0A  %7D%0A%0A  dispatch(%7B%0A    actionID: 'beginLoadingSpec',%0A    payload: %7B specURL %7D%0A  %7D);%0A%0A  qwest.get(loadURL, null, %7B%0A    cache: true,%0A    dataType: 'json',%0A    responseType: 'json'%0A  %7D)%0A  .then((specJSON) =%3E %7B%0A    dispatch(%7B%0A      actionID: 'didLoadSpec',%0A      payload: didLoadSpec(%7B specURL, specJSON %7D)%0A    %7D);%0A  %7D)%0A  .catch((message) =%3E %7B%0A    console.error(%60Failed to load specs with URL $%7BspecURL%7D $%7Bmessage%7D%60);%0A    dispatch(%7B%0A      actionID: 'didFailLoadingSpec',%0A      payload: didFailLoadingSpec(%7B specURL, error: message %7D)%0A    %7D);%0A  %7D);%0A%7D%0A%0Aexport function loadSpecIfNeeded(%7B specURL %7D, %7B dispatch, getConsensus %7D) %7B%0A  if (getConsensus(%7B%0A    introspectionID: 'needsToLoadSpec',%0A    payload: %7B specURL %7D,%0A    booleanOr: true%0A  %7D)) %7B%0A    loadSpec(%7B specURL %7D, %7B dispatch %7D);%0A  %7D%0A%7D%0A%0Aexport const introspection = %7B%0A  needsToLoadSpec(%7B specURL %7D) %7B%0A    return arguments%5B0%5D;%0A  %7D
 %0A%7D%0A

Add declarative flambeau-style Specs actions