@@ -20,6 +20,8 @@ import { PlainSubstitution, TranslationStringsObject } from "./types/translation
20
20
import { DialogContent , DialogProps } from "./components/DialogContent" ;
21
21
import { AccountAuthInfo } from "./types/AccountAuthInfo" ;
22
22
import { ModuleUiDialogOptions } from "./types/ModuleUiDialogOptions" ;
23
+ import { App } from "./types/App" ;
24
+ import { Container } from "./types/Container" ;
23
25
24
26
/**
25
27
* A module API surface for the react-sdk. Provides a stable API for modules to
@@ -120,4 +122,40 @@ export interface ModuleApi {
120
122
* @returns The config value verbatim.
121
123
*/
122
124
getConfigValue < T > ( namespace : string , key : string ) : T | undefined ;
125
+
126
+ /**
127
+ * Gets the apps for a given room.
128
+ *
129
+ * @param roomId The room ID to get the apps for.
130
+ * @returns The apps for the given room.
131
+ */
132
+ getApps ( roomId : string ) : Array < App > ;
133
+
134
+ /**
135
+ * Gets the avatar URL for an app.
136
+ *
137
+ * @param app The app to get the avatar URL for.
138
+ * @param width The width of the avatar.
139
+ * @param height The height of the avatar.
140
+ * @param resizeMethod The resize method to use, either "crop" or "scale".
141
+ */
142
+ getAppAvatarUrl ( app : App , width ?: number , height ?: number , resizeMethod ?: string ) : string | null ;
143
+
144
+ /**
145
+ * Checks if an app is in a container for a given room.
146
+ *
147
+ * @param app The app to check.
148
+ * @param container The container to check.
149
+ * @param roomId The room ID to check.
150
+ */
151
+ isAppInContainer ( app : App , container : Container , roomId : string ) : boolean ;
152
+
153
+ /**
154
+ * Moves apps to containers for a given room.
155
+ *
156
+ * @param app The app to move.
157
+ * @param container The container to move the app to.
158
+ * @param roomId The room ID to move the app in.
159
+ */
160
+ moveAppToContainer ( app : App , container : Container , roomId : string ) : void ;
123
161
}
0 commit comments