UNPKG

forge-server-utils

Version:

Tools for accessing Autodesk Forge APIs from Node.js apps and from browser.

67 lines 94 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WebhooksClient | forge-server-utils</title><meta name="description" content="Documentation for forge-server-utils"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">forge-server-utils</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">forge-server-utils</a></li><li><a href="WebhooksClient.html">WebhooksClient</a></li></ul><h1>Class WebhooksClient</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Client providing access to Autodesk Forge <a href="https://forge.autodesk.com/en/docs/webhooks/v1/developers_guide/overview|webhooks">APIs</a>.</p> </div><div class="tsd-comment tsd-typography"><h4>Tutorial</h4><p>webhooks</p> </div></section><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#WebhooksClient">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="ForgeClient.html" class="tsd-signature-type tsd-kind-class">ForgeClient</a><ul class="tsd-hierarchy"><li><span class="target">WebhooksClient</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L217">webhooks.ts:217</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="WebhooksClient.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a> </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="WebhooksClient.html#auth" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>auth?</span></a> <a href="WebhooksClient.html#axios" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>axios</span></a> <a href="WebhooksClient.html#host" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>host</span></a> <a href="WebhooksClient.html#region" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>region</span></a> <a href="WebhooksClient.html#root" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>root</span></a> <a href="WebhooksClient.html#token" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>token?</span></a> </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="WebhooksClient.html#_collect" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_collect</span></a> <a href="WebhooksClient.html#_pager" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_pager</span></a> <a href="WebhooksClient.html#createHook" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Hook</span></a> <a href="WebhooksClient.html#delete" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a> <a href="WebhooksClient.html#deleteHook" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>Hook</span></a> <a href="WebhooksClient.html#fetch" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fetch</span></a> <a href="WebhooksClient.html#get" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a> <a href="WebhooksClient.html#getBuffer" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Buffer</span></a> <a href="WebhooksClient.html#getHookDetails" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Hook<wbr/>Details</span></a> <a href="WebhooksClient.html#getStream" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Stream</span></a> <a href="WebhooksClient.html#iterateHooks" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>iterate<wbr/>Hooks</span></a> <a href="WebhooksClient.html#listHooks" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Hooks</span></a> <a href="WebhooksClient.html#patch" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>patch</span></a> <a href="WebhooksClient.html#post" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>post</span></a> <a href="WebhooksClient.html#put" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>put</span></a> <a href="WebhooksClient.html#reset" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reset</span></a> <a href="WebhooksClient.html#setAuthorization" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>set<wbr/>Authorization</span></a> <a href="WebhooksClient.html#updateHook" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>update<wbr/>Hook</span></a> </div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_WebhooksClient" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Webhooks<wbr/>Client</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">auth</span>, <span class="tsd-kind-parameter">host</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">region</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="WebhooksClient.html" class="tsd-signature-type tsd-kind-class">WebhooksClient</a><a href="#constructor.new_WebhooksClient" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes new client with specific authentication method.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">auth</span>: <span class="tsd-signature-type">IAuthOptions</span></h5><div class="tsd-comment tsd-typography"><p>Authentication object, containing either <code>client_id</code> and <code>client_secret</code> properties (for 2-legged authentication), or a single <code>token</code> property (for 2-legged or 3-legged authentication with pre-generated access token).</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">host</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Forge API host.</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">region</span>: <span class="tsd-signature-type">Region</span></h5><div class="tsd-comment tsd-typography"><p>Forge availability region (&quot;US&quot; or &quot;EMEA&quot;).</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="WebhooksClient.html" class="tsd-signature-type tsd-kind-class">WebhooksClient</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L226">webhooks.ts:226</a></li></ul></aside></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="auth" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagOptional">Optional</code> <span>auth</span><a href="#auth" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">auth</span><span class="tsd-signature-symbol">?:</span> <a href="AuthenticationClient.html" class="tsd-signature-type tsd-kind-class">AuthenticationClient</a></div><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#auth">auth</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L23">common.ts:23</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="axios" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>axios</span><a href="#axios" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">axios</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AxiosInstance</span></div><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#axios">axios</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L28">common.ts:28</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="host" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>host</span><a href="#host" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">host</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#host">host</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L26">common.ts:26</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="region" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>region</span><a href="#region" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">region</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Region</span></div><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#region">region</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L27">common.ts:27</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="root" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>root</span><a href="#root" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">root</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#root">root</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L25">common.ts:25</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="token" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagOptional">Optional</code> <span>token</span><a href="#token" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">token</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#token">token</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L24">common.ts:24</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-is-private"><a id="_collect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_collect</span><a href="#_collect" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-private"><li class="tsd-signature tsd-anchor-link"><a id="_collect._collect-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_collect</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">endpoint</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#_collect._collect-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">endpoint</span>: <span class="tsd-signature-type">string</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L244">webhooks.ts:244</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-private"><a id="_pager" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_pager</span><a href="#_pager" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-private"><li class="tsd-signature tsd-anchor-link"><a id="_pager._pager-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_pager</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">endpoint</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><a href="#_pager._pager-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">endpoint</span>: <span class="tsd-signature-type">string</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L231">webhooks.ts:231</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="createHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>create<wbr/>Hook</span><a href="#createHook" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="createHook.createHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>Hook</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">system</span>, <span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/IWebhook.html" class="tsd-signature-type tsd-kind-interface">IWebhook</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#createHook.createHook-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new webhook, either for entire webhook system, or for a specific event (<a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-hooks-POST|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-hooks-POST|docs</a>, <a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-POST|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-POST|docs</a>).</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">system</span>: <a href="../enums/WebhookSystem.html" class="tsd-signature-type tsd-kind-enum">WebhookSystem</a></h5><div class="tsd-comment tsd-typography"><p>Webhook system (e.g., &quot;data&quot;).</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../enums/WebhookEvent.html" class="tsd-signature-type tsd-kind-enum">WebhookEvent</a></h5><div class="tsd-comment tsd-typography"><p>Optional webhook event (e.g., &quot;dm.version.copied&quot;). If undefined, the webhook will be defined for the entire webhook system.</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><span class="tsd-kind-parameter">params</span>: <a href="../interfaces/ICreateWebhookParams.html" class="tsd-signature-type tsd-kind-interface">ICreateWebhookParams</a></h5><div class="tsd-comment tsd-typography"><p>Parameters of the new webhook.</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/IWebhook.html" class="tsd-signature-type tsd-kind-interface">IWebhook</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Webhook ID (when both <code>system</code> and <code>event</code> parameters are provided). or a list of webhooks (when only <code>system</code> is specified).</p> <div class="tsd-comment tsd-typography"><h4>Throws</h4><p>Error when the request fails, for example, due to insufficient rights, or incorrect scopes.</p> </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L329">webhooks.ts:329</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="delete" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>delete</span><a href="#delete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="delete.delete-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">endpoint</span>, <span class="tsd-kind-parameter">headers</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">scopes</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#delete.delete-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">endpoint</span>: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-kind-parameter">headers</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>[<span class="tsd-kind-index-signature">name</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></h5></li></ul></li><li><h5><span class="tsd-kind-parameter">scopes</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#delete">delete</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L161">common.ts:161</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="deleteHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>delete<wbr/>Hook</span><a href="#deleteHook" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="deleteHook.deleteHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">delete<wbr/>Hook</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">system</span>, <span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">id</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteHook.deleteHook-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deletes a webhook (<a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-hook_id-DELETE|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-hook_id-DELETE|docs</a>).</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">system</span>: <a href="../enums/WebhookSystem.html" class="tsd-signature-type tsd-kind-enum">WebhookSystem</a></h5><div class="tsd-comment tsd-typography"><p>Webhook system (e.g., &quot;data&quot;).</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><span class="tsd-kind-parameter">event</span>: <a href="../enums/WebhookEvent.html" class="tsd-signature-type tsd-kind-enum">WebhookEvent</a></h5><div class="tsd-comment tsd-typography"><p>Webhook event (e.g., &quot;dm.version.copied&quot;).</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">string</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Async</h4><h4>Throws</h4><p>Error when the request fails, for example, due to insufficient rights, or incorrect scopes.</p> </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L367">webhooks.ts:367</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="fetch" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>fetch</span><a href="#fetch" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="fetch.fetch-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">fetch</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">config</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">AxiosResponse</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><a href="#fetch.fetch-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">config</span>: <span class="tsd-signature-type">AxiosRequestConfig</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">AxiosResponse</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#fetch">fetch</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L101">common.ts:101</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="get" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>get</span><a href="#get" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="get.get-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">endpoint</span>, <span class="tsd-kind-parameter">headers</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">scopes</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">endpoint</span>: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-kind-parameter">headers</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>[<span class="tsd-kind-index-signature">name</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></h5></li></ul></li><li><h5><span class="tsd-kind-parameter">scopes</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#get">get</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L107">common.ts:107</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="getBuffer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>get<wbr/>Buffer</span><a href="#getBuffer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="getBuffer.getBuffer-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Buffer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">endpoint</span>, <span class="tsd-kind-parameter">headers</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">scopes</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#getBuffer.getBuffer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">endpoint</span>: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-kind-parameter">headers</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>[<span class="tsd-kind-index-signature">name</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></h5></li></ul></li><li><h5><span class="tsd-kind-parameter">scopes</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#getBuffer">getBuffer</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L116">common.ts:116</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="getHookDetails" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Hook<wbr/>Details</span><a href="#getHookDetails" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getHookDetails.getHookDetails-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Hook<wbr/>Details</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">system</span>, <span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">id</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/IWebhook.html" class="tsd-signature-type tsd-kind-interface">IWebhook</a><span class="tsd-signature-symbol">&gt;</span><a href="#getHookDetails.getHookDetails-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Provides details about a specific webhook (<a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-hook_id-GET|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-hook_id-GET|docs</a>).</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">system</span>: <a href="../enums/WebhookSystem.html" class="tsd-signature-type tsd-kind-enum">WebhookSystem</a></h5><div class="tsd-comment tsd-typography"><p>Webhook system (e.g., &quot;data&quot;).</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><span class="tsd-kind-parameter">event</span>: <a href="../enums/WebhookEvent.html" class="tsd-signature-type tsd-kind-enum">WebhookEvent</a></h5><div class="tsd-comment tsd-typography"><p>Webhook event (e.g., &quot;dm.version.copied&quot;).</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Webhook ID.</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/IWebhook.html" class="tsd-signature-type tsd-kind-interface">IWebhook</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Webhook details.</p> <div class="tsd-comment tsd-typography"><h4>Async</h4><h4>Throws</h4><p>Error when the request fails, for example, due to insufficient rights, or incorrect scopes.</p> </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L312">webhooks.ts:312</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="getStream" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>get<wbr/>Stream</span><a href="#getStream" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="getStream.getStream-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Stream</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">endpoint</span>, <span class="tsd-kind-parameter">headers</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">scopes</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#getStream.getStream-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">endpoint</span>: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-kind-parameter">headers</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>[<span class="tsd-kind-index-signature">name</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></h5></li></ul></li><li><h5><span class="tsd-kind-parameter">scopes</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="ForgeClient.html">ForgeClient</a>.<a href="ForgeClient.html#getStream">getStream</a></p><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/common.ts#L125">common.ts:125</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="iterateHooks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>iterate<wbr/>Hooks</span><a href="#iterateHooks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="iterateHooks.iterateHooks-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">iterate<wbr/>Hooks</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">system</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncIterable</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/IWebhook.html" class="tsd-signature-type tsd-kind-interface">IWebhook</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#iterateHooks.iterateHooks-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Iterates over all webhooks, webhooks for specific system, or webhooks for specific system and event (<a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/hooks-GET|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/hooks-GET|docs</a>, <a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-hooks-GET|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-hooks-GET|docs</a>, <a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-GET|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-GET|docs</a>).</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">system</span>: <a href="../enums/WebhookSystem.html" class="tsd-signature-type tsd-kind-enum">WebhookSystem</a></h5><div class="tsd-comment tsd-typography"><p>Optional webhook system (e.g., &quot;data&quot;) to filter the results.</p> </div><div class="tsd-comment tsd-typography"></div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">event</span>: <a href="../enums/WebhookEvent.html" class="tsd-signature-type tsd-kind-enum">WebhookEvent</a></h5><div class="tsd-comment tsd-typography"><p>Optional webhook event (e.g., &quot;dm.version.copied&quot;) to filter the results.</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncIterable</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/IWebhook.html" class="tsd-signature-type tsd-kind-interface">IWebhook</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Async</h4><h4>Generator</h4><h4>Yields</h4><p>Single page of webhooks.</p> <h4>Throws</h4><p>Error when the request fails, for example, due to insufficient rights, or incorrect scopes.</p> </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/petrbroz/forge-server-utils/blob/cdaa7a5/src/webhooks.ts#L269">webhooks.ts:269</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="listHooks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Hooks</span><a href="#listHooks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="listHooks.listHooks-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">list<wbr/>Hooks</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">system</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/IWebhook.html" class="tsd-signature-type tsd-kind-interface">IWebhook</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listHooks.listHooks-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Lists all webhooks, webhooks for specific system, or webhooks for specific system and event (<a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/hooks-GET|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/hooks-GET|docs</a>, <a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-hooks-GET|docs">https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-hooks-GET|docs</a>, <a href="https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/systems-system-events-event-hooks-GET|docs">https://forge.autod