-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
619 changed files
with
3,320 additions
and
223 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { App } from '@rocket.chat/apps-engine/definition/App.ts'; | ||
|
||
import { AppObjectRegistry } from '../../AppObjectRegistry.ts'; | ||
import { AppAccessorsInstance } from '../../lib/accessors/mod.ts'; | ||
|
||
export default async function handleOnUpdate(params: unknown): Promise<boolean> { | ||
const app = AppObjectRegistry.get<App>('app'); | ||
|
||
if (typeof app?.onUpdate !== 'function') { | ||
throw new Error('App must contain an onUpdate function', { | ||
cause: 'invalid_app', | ||
}); | ||
} | ||
|
||
if (!Array.isArray(params)) { | ||
throw new Error('Invalid params', { cause: 'invalid_param_type' }); | ||
} | ||
|
||
const [context] = params as [Record<string, unknown>]; | ||
|
||
await app.onUpdate( | ||
context, | ||
AppAccessorsInstance.getReader(), | ||
AppAccessorsInstance.getHttp(), | ||
AppAccessorsInstance.getPersistence(), | ||
AppAccessorsInstance.getModifier(), | ||
); | ||
|
||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,13 +130,13 @@ <h4>See</h4><p><a href="https://v8.dev/docs/stack-trace-api#customizing-stack-tr | |
</div></li></ul></li></ul></div><aside class="tsd-sources"> | ||
<p>Inherited from Error.prepareStackTrace</p> | ||
<ul> | ||
<li>Defined in node_modules/@types/node/globals.d.ts:11</li></ul></aside></section> | ||
<li>Defined in node_modules/.deno/@types[email protected]/node_modules/@types/node/globals.d.ts:27</li></ul></aside></section> | ||
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="stackTraceLimit" class="tsd-anchor"></a> | ||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>stack<wbr/>Trace<wbr/>Limit</span><a href="#stackTraceLimit" 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">stack<wbr/>Trace<wbr/>Limit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"> | ||
<p>Inherited from Error.stackTraceLimit</p> | ||
<ul> | ||
<li>Defined in node_modules/@types/node/globals.d.ts:13</li></ul></aside></section></section> | ||
<li>Defined in node_modules/.deno/@types[email protected]/node_modules/@types/node/globals.d.ts:29</li></ul></aside></section></section> | ||
<section class="tsd-panel-group tsd-member-group"> | ||
<h2>Methods</h2> | ||
<section class="tsd-panel tsd-member"><a id="getErrorInfo" class="tsd-anchor"></a> | ||
|
@@ -170,7 +170,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</spa | |
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> | ||
<p>Inherited from Error.captureStackTrace</p> | ||
<ul> | ||
<li>Defined in node_modules/@types/node/globals.d.ts:4</li></ul></aside></li></ul></section></section></div> | ||
<li>Defined in node_modules/.deno/@types[email protected]/node_modules/@types/node/globals.d.ts:20</li></ul></aside></li></ul></section></section></div> | ||
<div class="col-sidebar"> | ||
<div class="page-menu"> | ||
<div class="tsd-navigation settings"> | ||
|
@@ -209,6 +209,7 @@ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon | |
<li><a href="../modules/accessors_IAppAccessors.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>accessors/IApp<wbr/>Accessors</span></a></li> | ||
<li><a href="../modules/accessors_IAppInstallationContext.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>accessors/IApp<wbr/>Installation<wbr/>Context</span></a></li> | ||
<li><a href="../modules/accessors_IAppUninstallationContext.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>accessors/IApp<wbr/>Uninstallation<wbr/>Context</span></a></li> | ||
<li><a href="../modules/accessors_IAppUpdateContext.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>accessors/IApp<wbr/>Update<wbr/>Context</span></a></li> | ||
<li><a href="../modules/accessors_ICloudWorkspaceRead.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>accessors/ICloud<wbr/>Workspace<wbr/>Read</span></a></li> | ||
<li><a href="../modules/accessors_IConfigurationExtend.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>accessors/IConfiguration<wbr/>Extend</span></a></li> | ||
<li><a href="../modules/accessors_IConfigurationModify.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>accessors/IConfiguration<wbr/>Modify</span></a></li> | ||
|
@@ -329,6 +330,7 @@ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon | |
<li><a href="../modules/messages_IMessageFile.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>messages/IMessage<wbr/>File</span></a></li> | ||
<li><a href="../modules/messages_IMessageFollowContext.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>messages/IMessage<wbr/>Follow<wbr/>Context</span></a></li> | ||
<li><a href="../modules/messages_IMessagePinContext.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>messages/IMessage<wbr/>Pin<wbr/>Context</span></a></li> | ||
<li><a href="../modules/messages_IMessageRaw.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>messages/IMessage<wbr/>Raw</span></a></li> | ||
<li><a href="../modules/messages_IMessageReaction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>messages/IMessage<wbr/>Reaction</span></a></li> | ||
<li><a href="../modules/messages_IMessageReactionContext.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>messages/IMessage<wbr/>Reaction<wbr/>Context</span></a></li> | ||
<li><a href="../modules/messages_IMessageReportContext.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>messages/IMessage<wbr/>Report<wbr/>Context</span></a></li> | ||
|
Oops, something went wrong.