import{_ as e,c as a,a2 as i,o as t}from"./chunks/framework.Do-HmJSh.js";const k=JSON.parse('{"title":"Custom attributes","description":"","frontmatter":{},"headers":[],"relativePath":"space-graph/custom-attributes.md","filePath":"space-graph/custom-attributes.md"}'),n={name:"space-graph/custom-attributes.md"};function p(o,s,r,l,c,h){return t(),a("div",null,s[0]||(s[0]=[i(`<h1 id="custom-attributes" tabindex="-1">Custom attributes <a class="header-anchor" href="#custom-attributes" aria-label="Permalink to &quot;Custom attributes&quot;">​</a></h1><h2 id="definitions" tabindex="-1">Definitions <a class="header-anchor" href="#definitions" aria-label="Permalink to &quot;Definitions&quot;">​</a></h2><p>Custom attribute definitions are stored uniquely for each resource type and organization, each accompanied by its own schema and offering complete user-defined configurability.</p><p>Currently supported resource types: <a href="./#floor"><code>Floor</code></a>, <a href="./spaces"><code>Space</code></a>, <a href="./elements#elements"><code>Asset</code></a>, <a href="./products"><code>Product</code></a><br> and value types: <code>Text</code>, <code>Number</code>, <code>Boolean</code></p><div class="two-column"><p>Example of registering a custom attribute with the <code>apiFieldName</code> &#39;department&#39; for the resource type <code>Space</code>.<br>Corresponding <a href="./../space-api/v2/reference/operations/resourcetype-custom-attributes-post">post method</a>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  apiFieldName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;department&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  description</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Defines the department the space belongs to.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  title</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Department&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  valueType</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Text&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div><h2 id="values" tabindex="-1">Values <a class="header-anchor" href="#values" aria-label="Permalink to &quot;Values&quot;">​</a></h2><div class="two-column"><p>Setting a custom attribute value for a specific resource by <code>resourceId</code> and <code>apiFieldName</code>, in this case a specific space.<br>Corresponding <a href="./../space-api/v2/reference/operations/resourcetype-resourceid-custom-attributes-apifieldname-post">post method</a>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">  value</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Accounting&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div>`,7)]))}const u=e(n,[["render",p]]);export{k as __pageData,u as default};
