@arbidocs/sdk 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1820,7 +1820,7 @@ declare namespace signatureRequests {
1820
1820
  * - A workspace's house template is one of its own documents: the workspace records its id as
1821
1821
  * `house_template_ext_id` (`PATCH /v1/workspace/`, owners only, as every workspace update).
1822
1822
  * - The deployment default is a .dotx/.docx the server holds: `GET /v1/deployment/house-template`
1823
- * (any signed-in user; 404 when none is set), `PUT` (multipart `file`) and `DELETE` (deployment
1823
+ * (any signed-in user; 204 when none is set, 404 from servers before that), `PUT` (multipart `file`) and `DELETE` (deployment
1824
1824
  * admins only; `is_deployment_admin` on the current user).
1825
1825
  *
1826
1826
  * A server without house templates has no `house_template_ext_id` key on its workspaces
@@ -1820,7 +1820,7 @@ declare namespace signatureRequests {
1820
1820
  * - A workspace's house template is one of its own documents: the workspace records its id as
1821
1821
  * `house_template_ext_id` (`PATCH /v1/workspace/`, owners only, as every workspace update).
1822
1822
  * - The deployment default is a .dotx/.docx the server holds: `GET /v1/deployment/house-template`
1823
- * (any signed-in user; 404 when none is set), `PUT` (multipart `file`) and `DELETE` (deployment
1823
+ * (any signed-in user; 204 when none is set, 404 from servers before that), `PUT` (multipart `file`) and `DELETE` (deployment
1824
1824
  * admins only; `is_deployment_admin` on the current user).
1825
1825
  *
1826
1826
  * A server without house templates has no `house_template_ext_id` key on its workspaces
package/dist/browser.cjs CHANGED
@@ -3622,7 +3622,7 @@ async function authenticatedFetch(options) {
3622
3622
  });
3623
3623
  if (!res.ok) {
3624
3624
  const message = await extractErrorMessage(res);
3625
- throw new ArbiApiError(message, { status: res.status, statusText: res.statusText });
3625
+ throw new ArbiApiError(message, { status: res.status, statusText: res.statusText }, res.status);
3626
3626
  }
3627
3627
  return res;
3628
3628
  }
@@ -5016,7 +5016,7 @@ async function getDeploymentHouseTemplate(arbi) {
5016
5016
  const { data, error, response } = await arbi.fetch.GET("/v1/deployment/house-template", {
5017
5017
  parseAs: "arrayBuffer"
5018
5018
  });
5019
- if (response.status === 404) return null;
5019
+ if (response.status === 204 || response.status === 404) return null;
5020
5020
  if (error || !data)
5021
5021
  throw new ArbiApiError("Could not read the deployment house template", error, response.status);
5022
5022
  return {