1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 23:29:33 +00:00

WAT A HUGE REFACTOR

This commit is contained in:
2025-07-12 15:42:48 +06:00
parent 586a61157d
commit 9e4d7dd9f9
292 changed files with 1337 additions and 509 deletions

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.webapps
@Suppress("INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING", "unused")
external interface ThemeParams {
@JsName("bg_color")
val backgroundColor: HEXColor?

View File

@@ -1,3 +1,5 @@
@file:Suppress("unused")
package dev.inmo.tgbotapi.webapps
import dev.inmo.tgbotapi.types.CustomEmojiId
@@ -16,6 +18,7 @@ import dev.inmo.tgbotapi.webapps.storage.DeviceStorage
import dev.inmo.tgbotapi.webapps.storage.SecureStorage
import dev.inmo.tgbotapi.webapps.stories.StoryShareParams
@Suppress("INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING")
external class WebApp {
val version: String
@@ -177,7 +180,7 @@ external class WebApp {
@JsName("onEvent")
internal fun onAccelerometerStopped(type: String, callback: () -> Unit)
@JsName("onEvent")
internal fun onPopupClosed(type: String, callback: (dev.inmo.tgbotapi.webapps.popup.PopupClosedEventArg) -> Unit)
internal fun onPopupClosed(type: String, callback: (PopupClosedEventArg) -> Unit)
@JsName("onEvent")
internal fun onGyroscopeStopped(type: String, callback: () -> Unit)
@JsName("onEvent")

View File

@@ -8,6 +8,7 @@ external interface WebAppChat {
val id: ChatIdentifier
val type: String
val title: String
@Suppress("INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING")
val username: Username?
@JsName("photo_url")
val photoUrl: String?

View File

@@ -1,7 +1,10 @@
@file:Suppress("unused")
package dev.inmo.tgbotapi.webapps.biometric
import kotlinx.coroutines.CompletableDeferred
@Suppress("INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING")
external interface BiometricManager {
val isInited: Boolean
val isBiometricAvailable: Boolean

View File

@@ -1,6 +1,6 @@
package dev.inmo.tgbotapi.webapps.cloud
@file:Suppress("INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING", "unused")
import kotlin.js.Json
package dev.inmo.tgbotapi.webapps.cloud
external interface CloudStorage {
fun setItem(

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.webapps.haptic
@Suppress("unused", "INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING")
external interface HapticFeedback {
fun impactOccurred(style: HapticFeedbackStyle)
fun notificationOccurred(type: HapticFeedbackType)

View File

@@ -1,3 +1,5 @@
@file:Suppress("unused", "INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING")
package dev.inmo.tgbotapi.webapps.popup
import kotlin.js.json