let prefix;
if (process.env.NODE_ENV === 'production') {
  prefix = '/_api';
} else {
  prefix = 'http://localhost:4000/_api';
}

export const API = prefix;

export const getConfigurationUrl = () => `${API}/configuration`;
export const putConfigurationUrl = () => `${API}/configuration`;

export const getPagesUrl = () => `${API}/pages`;
export const getPageUrl = (id) => `${API}/pages/${id}`;
export const putPageUrl = (id) => `${API}/pages/${id}`;
export const deletePageUrl = (id) => `${API}/pages/${id}`;

export const getCollectionsUrl = () => `${API}/collections`;
export const getCollectionUrl = (collection_name) =>
  `${API}/collections/${collection_name}`;
export const getCollectionDocumentsUrl = (collection_name) =>
  `${API}/collections/${collection_name}/documents`;
export const getCollectionDocumentUrl = (collection_name, id) =>
  `${API}/collections/${collection_name}/${id}`;
export const putCollectionDocumentUrl = (collection_name, id) =>
  `${API}/collections/${collection_name}/${id}`;
export const deleteCollectionDocumentUrl = (collection_name, id) =>
  `${API}/collections/${collection_name}/${id}`;

export const getDataFilesUrl = () => `${API}/data`;
export const getDataFileUrl = (filename) => `${API}/data/${filename}`;
export const putDataFileUrl = (filename) => `${API}/data/${filename}`;
export const deleteDataFileUrl = (filename) => `${API}/data/${filename}`;

@@ -1369,28 +1369,337 @@
  %60$%7BAPI%7D/data/$%7Bfilename%7D%60;%0A
+%0Aexport const getStaticFilesUrl = () =%3E %60$%7BAPI%7D/static_files%60;%0Aexport const getStaticFileUrl = (filename) =%3E %60$%7BAPI%7D/static_files/$%7Bfilename%7D%60;%0Aexport const putStaticFileUrl = (filename) =%3E %60$%7BAPI%7D/static_files/$%7Bfilename%7D%60;%0Aexport const deleteStaticFileUrl = (filename) =%3E %60$%7BAPI%7D/static_files/$%7Bfilename%7D%60;%0A

add endpoints