@tma.js/sdk 2.7.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +9 -9
  3. package/dist/dts/composables/AsyncMountable.d.ts +44 -0
  4. package/dist/dts/composables/Button.d.ts +140 -0
  5. package/dist/dts/composables/Mountable.d.ts +43 -0
  6. package/dist/dts/composables/Stateful.d.ts +35 -0
  7. package/dist/dts/errors.d.ts +41 -0
  8. package/dist/dts/features/BackButton/BackButton.d.ts +96 -0
  9. package/dist/dts/features/BackButton/exports.d.ts +2 -0
  10. package/dist/dts/features/BackButton/instance.d.ts +2 -0
  11. package/dist/dts/features/Biometry/Biometry.d.ts +122 -0
  12. package/dist/dts/features/Biometry/exports.d.ts +3 -0
  13. package/dist/dts/features/Biometry/instance.d.ts +2 -0
  14. package/dist/dts/features/Biometry/types.d.ts +84 -0
  15. package/dist/dts/features/ClosingBehavior/ClosingBehavior.d.ts +51 -0
  16. package/dist/dts/features/ClosingBehavior/exports.d.ts +2 -0
  17. package/dist/dts/features/ClosingBehavior/instance.d.ts +2 -0
  18. package/dist/dts/features/CloudStorage/CloudStorage.d.ts +90 -0
  19. package/dist/dts/features/CloudStorage/exports.d.ts +2 -0
  20. package/dist/dts/features/CloudStorage/instance.d.ts +2 -0
  21. package/dist/dts/features/HapticFeedback/HapticFeedback.d.ts +57 -0
  22. package/dist/dts/features/HapticFeedback/exports.d.ts +2 -0
  23. package/dist/dts/features/HapticFeedback/instance.d.ts +2 -0
  24. package/dist/dts/features/InitData/InitData.d.ts +84 -0
  25. package/dist/dts/features/InitData/exports.d.ts +2 -0
  26. package/dist/dts/features/InitData/instance.d.ts +2 -0
  27. package/dist/dts/features/Invoice/Invoice.d.ts +54 -0
  28. package/dist/dts/features/Invoice/exports.d.ts +2 -0
  29. package/dist/dts/features/Invoice/instance.d.ts +2 -0
  30. package/dist/dts/features/LocationManager/LocationManager.d.ts +74 -0
  31. package/dist/dts/features/LocationManager/exports.d.ts +3 -0
  32. package/dist/dts/features/LocationManager/instance.d.ts +2 -0
  33. package/dist/dts/features/LocationManager/types.d.ts +65 -0
  34. package/dist/dts/features/MainButton/MainButton.d.ts +214 -0
  35. package/dist/dts/features/MainButton/exports.d.ts +2 -0
  36. package/dist/dts/features/MainButton/instance.d.ts +2 -0
  37. package/dist/dts/features/MiniApp/MiniApp.d.ts +192 -0
  38. package/dist/dts/features/MiniApp/exports.d.ts +2 -0
  39. package/dist/dts/features/MiniApp/instance.d.ts +2 -0
  40. package/dist/dts/features/Popup/Popup.d.ts +56 -0
  41. package/dist/dts/features/Popup/exports.d.ts +3 -0
  42. package/dist/dts/features/Popup/instance.d.ts +2 -0
  43. package/dist/dts/features/Popup/prepareParams.d.ts +9 -0
  44. package/dist/dts/{components → features}/Popup/types.d.ts +5 -12
  45. package/dist/dts/features/QrScanner/QrScanner.d.ts +132 -0
  46. package/dist/dts/features/QrScanner/exports.d.ts +2 -0
  47. package/dist/dts/features/QrScanner/instance.d.ts +2 -0
  48. package/dist/dts/features/SecondaryButton/SecondaryButton.d.ts +253 -0
  49. package/dist/dts/features/SecondaryButton/exports.d.ts +2 -0
  50. package/dist/dts/features/SecondaryButton/instance.d.ts +2 -0
  51. package/dist/dts/features/SettingsButton/SettingsButton.d.ts +96 -0
  52. package/dist/dts/features/SettingsButton/exports.d.ts +2 -0
  53. package/dist/dts/features/SettingsButton/instance.d.ts +2 -0
  54. package/dist/dts/features/SwipeBehavior/SwipeBehavior.d.ts +62 -0
  55. package/dist/dts/features/SwipeBehavior/exports.d.ts +2 -0
  56. package/dist/dts/features/SwipeBehavior/instance.d.ts +2 -0
  57. package/dist/dts/features/ThemeParams/ThemeParams.d.ts +127 -0
  58. package/dist/dts/features/ThemeParams/exports.d.ts +2 -0
  59. package/dist/dts/features/ThemeParams/instance.d.ts +2 -0
  60. package/dist/dts/features/Viewport/Viewport.d.ts +220 -0
  61. package/dist/dts/features/Viewport/exports.d.ts +2 -0
  62. package/dist/dts/features/Viewport/instance.d.ts +2 -0
  63. package/dist/dts/features/emoji-status/exports.d.ts +2 -0
  64. package/dist/dts/features/emoji-status/requestEmojiStatusAccess.d.ts +16 -0
  65. package/dist/dts/features/emoji-status/setEmojiStatus.d.ts +28 -0
  66. package/dist/dts/features/home-screen/addToHomeScreen.d.ts +11 -0
  67. package/dist/dts/features/home-screen/checkHomeScreenStatus.d.ts +14 -0
  68. package/dist/dts/features/home-screen/exports.d.ts +2 -0
  69. package/dist/dts/features/links/exports.d.ts +3 -0
  70. package/dist/dts/features/links/openLink.d.ts +31 -0
  71. package/dist/dts/features/links/openTelegramLink.d.ts +18 -0
  72. package/dist/dts/features/links/shareURL.d.ts +18 -0
  73. package/dist/dts/features/privacy/exports.d.ts +3 -0
  74. package/dist/dts/features/privacy/requestContact.d.ts +59 -0
  75. package/dist/dts/features/privacy/requestPhoneAccess.d.ts +19 -0
  76. package/dist/dts/features/privacy/requestWriteAccess.d.ts +14 -0
  77. package/dist/dts/features/uncategorized/copyTextToClipboard.d.ts +5 -0
  78. package/dist/dts/features/uncategorized/downloadFile.d.ts +21 -0
  79. package/dist/dts/features/uncategorized/exports.d.ts +11 -0
  80. package/dist/dts/features/uncategorized/getCurrentTime.d.ts +15 -0
  81. package/dist/dts/features/uncategorized/hideKeyboard.d.ts +13 -0
  82. package/dist/dts/features/uncategorized/readTextFromClipboard.d.ts +13 -0
  83. package/dist/dts/features/uncategorized/retrieveAndroidDeviceData.d.ts +6 -0
  84. package/dist/dts/features/uncategorized/retrieveAndroidDeviceDataFrom.d.ts +14 -0
  85. package/dist/dts/features/uncategorized/sendData.d.ts +20 -0
  86. package/dist/dts/features/uncategorized/shareMessage.d.ts +14 -0
  87. package/dist/dts/features/uncategorized/shareStory.d.ts +50 -0
  88. package/dist/dts/features/uncategorized/switchInlineQuery.d.ts +28 -0
  89. package/dist/dts/fn-options/bottomButtonOptions.d.ts +11 -0
  90. package/dist/dts/fn-options/buttonOptions.d.ts +10 -0
  91. package/dist/dts/fn-options/createFnOption.d.ts +2 -0
  92. package/dist/dts/fn-options/sharedFeatureOptions.d.ts +8 -0
  93. package/dist/dts/fn-options/withInvokeCustomMethod.d.ts +11 -0
  94. package/dist/dts/fn-options/withPostEvent.d.ts +8 -0
  95. package/dist/dts/fn-options/withRequest.d.ts +8 -0
  96. package/dist/dts/fn-options/withStateRestore.d.ts +13 -0
  97. package/dist/dts/fn-options/withVersion.d.ts +9 -0
  98. package/dist/dts/globals/createRequestId.d.ts +4 -0
  99. package/dist/dts/globals/inline-mode.d.ts +4 -0
  100. package/dist/dts/globals/invokeCustomMethod.d.ts +16 -0
  101. package/dist/dts/globals/post-event.d.ts +4 -0
  102. package/dist/dts/globals/request.d.ts +3 -0
  103. package/dist/dts/globals/resetGlobals.d.ts +4 -0
  104. package/dist/dts/globals/signals-registry.d.ts +39 -0
  105. package/dist/dts/globals/themeParams.d.ts +4 -0
  106. package/dist/dts/globals/version.d.ts +4 -0
  107. package/dist/dts/helpers/access.d.ts +2 -0
  108. package/dist/dts/helpers/component-storage.d.ts +9 -0
  109. package/dist/dts/helpers/createIsSupportedSignal.d.ts +5 -0
  110. package/dist/dts/helpers/css-vars.d.ts +11 -0
  111. package/dist/dts/helpers/isColorDark.d.ts +11 -0
  112. package/dist/dts/{navigation/isPageReload.d.ts → helpers/navigation.d.ts} +1 -1
  113. package/dist/dts/helpers/removeUndefined.d.ts +10 -0
  114. package/dist/dts/helpers/shallowEqual.d.ts +1 -0
  115. package/dist/dts/index.d.ts +33 -168
  116. package/dist/dts/init.d.ts +42 -0
  117. package/dist/dts/types.d.ts +6 -0
  118. package/dist/dts/with-checks/throwifyWithChecksFp.d.ts +3 -0
  119. package/dist/dts/with-checks/withChecksFp.d.ts +172 -0
  120. package/dist/index.cjs +1 -3
  121. package/dist/index.cjs.map +1 -1
  122. package/dist/index.iife.js +3 -3
  123. package/dist/index.iife.js.map +1 -1
  124. package/dist/index.js +3811 -2897
  125. package/dist/index.js.map +1 -1
  126. package/package.json +15 -5
  127. package/dist/dts/bridge/captureSameReq.d.ts +0 -10
  128. package/dist/dts/bridge/events/event-emitter/createMiniAppsEventEmitter.d.ts +0 -15
  129. package/dist/dts/bridge/events/event-emitter/singleton.d.ts +0 -8
  130. package/dist/dts/bridge/events/event-handlers/cleanupEventHandlers.d.ts +0 -4
  131. package/dist/dts/bridge/events/event-handlers/defineEventHandlers.d.ts +0 -6
  132. package/dist/dts/bridge/events/event-handlers/emitMiniAppsEvent.d.ts +0 -9
  133. package/dist/dts/bridge/events/listening/off.d.ts +0 -8
  134. package/dist/dts/bridge/events/listening/on.d.ts +0 -12
  135. package/dist/dts/bridge/events/listening/subscribe.d.ts +0 -9
  136. package/dist/dts/bridge/events/listening/unsubscribe.d.ts +0 -7
  137. package/dist/dts/bridge/events/types.d.ts +0 -302
  138. package/dist/dts/bridge/invokeCustomMethod.d.ts +0 -23
  139. package/dist/dts/bridge/methods/createPostEvent.d.ts +0 -14
  140. package/dist/dts/bridge/methods/postEvent.d.ts +0 -40
  141. package/dist/dts/bridge/methods/types/custom-methods.d.ts +0 -57
  142. package/dist/dts/bridge/methods/types/haptic.d.ts +0 -40
  143. package/dist/dts/bridge/methods/types/index.d.ts +0 -4
  144. package/dist/dts/bridge/methods/types/methods.d.ts +0 -392
  145. package/dist/dts/bridge/methods/types/popup.d.ts +0 -49
  146. package/dist/dts/bridge/parseMessage.d.ts +0 -18
  147. package/dist/dts/bridge/request.d.ts +0 -53
  148. package/dist/dts/bridge/target-origin.d.ts +0 -18
  149. package/dist/dts/classes/State/State.d.ts +0 -46
  150. package/dist/dts/classes/State/types.d.ts +0 -29
  151. package/dist/dts/classes/WithStateUtils.d.ts +0 -18
  152. package/dist/dts/classes/WithSupports.d.ts +0 -19
  153. package/dist/dts/classes/WithSupportsAndStateUtils.d.ts +0 -24
  154. package/dist/dts/classes/WithSupportsAndTrackableState.d.ts +0 -16
  155. package/dist/dts/classes/WithTrackableState.d.ts +0 -16
  156. package/dist/dts/classnames/classNames.d.ts +0 -12
  157. package/dist/dts/classnames/mergeClassNames.d.ts +0 -14
  158. package/dist/dts/colors/isColorDark.d.ts +0 -6
  159. package/dist/dts/colors/isRGB.d.ts +0 -7
  160. package/dist/dts/colors/isRGBShort.d.ts +0 -7
  161. package/dist/dts/colors/toRGB.d.ts +0 -12
  162. package/dist/dts/colors/types.d.ts +0 -8
  163. package/dist/dts/components/BackButton/BackButton.d.ts +0 -41
  164. package/dist/dts/components/BackButton/initBackButton.d.ts +0 -7
  165. package/dist/dts/components/BackButton/types.d.ts +0 -25
  166. package/dist/dts/components/BiometryManager/BiometryManager.d.ts +0 -61
  167. package/dist/dts/components/BiometryManager/formatEvent.d.ts +0 -34
  168. package/dist/dts/components/BiometryManager/initBiometryManager.d.ts +0 -7
  169. package/dist/dts/components/BiometryManager/requestBiometryInfo.d.ts +0 -8
  170. package/dist/dts/components/BiometryManager/types.d.ts +0 -40
  171. package/dist/dts/components/ClosingBehavior/ClosingBehavior.d.ts +0 -26
  172. package/dist/dts/components/ClosingBehavior/initClosingBehavior.d.ts +0 -7
  173. package/dist/dts/components/ClosingBehavior/types.d.ts +0 -20
  174. package/dist/dts/components/CloudStorage/CloudStorage.d.ts +0 -47
  175. package/dist/dts/components/CloudStorage/initCloudStorage.d.ts +0 -7
  176. package/dist/dts/components/HapticFeedback/HapticFeedback.d.ts +0 -34
  177. package/dist/dts/components/HapticFeedback/initHapticFeedback.d.ts +0 -7
  178. package/dist/dts/components/InitData/InitData.d.ts +0 -55
  179. package/dist/dts/components/InitData/initInitData.d.ts +0 -7
  180. package/dist/dts/components/InitData/parseInitData.d.ts +0 -7
  181. package/dist/dts/components/InitData/parsers/chat.d.ts +0 -3
  182. package/dist/dts/components/InitData/parsers/initData.d.ts +0 -7
  183. package/dist/dts/components/InitData/parsers/user.d.ts +0 -3
  184. package/dist/dts/components/InitData/types.d.ts +0 -132
  185. package/dist/dts/components/Invoice/Invoice.d.ts +0 -31
  186. package/dist/dts/components/Invoice/initInvoice.d.ts +0 -7
  187. package/dist/dts/components/Invoice/types.d.ts +0 -20
  188. package/dist/dts/components/MainButton/MainButton.d.ts +0 -106
  189. package/dist/dts/components/MainButton/initMainButton.d.ts +0 -7
  190. package/dist/dts/components/MainButton/types.d.ts +0 -40
  191. package/dist/dts/components/MiniApp/MiniApp.d.ts +0 -121
  192. package/dist/dts/components/MiniApp/initMiniApp.d.ts +0 -7
  193. package/dist/dts/components/MiniApp/parsing/contact.d.ts +0 -7
  194. package/dist/dts/components/MiniApp/types.d.ts +0 -53
  195. package/dist/dts/components/Popup/Popup.d.ts +0 -30
  196. package/dist/dts/components/Popup/initPopup.d.ts +0 -7
  197. package/dist/dts/components/Popup/preparePopupParams.d.ts +0 -8
  198. package/dist/dts/components/QRScanner/QRScanner.d.ts +0 -33
  199. package/dist/dts/components/QRScanner/initQRScanner.d.ts +0 -7
  200. package/dist/dts/components/QRScanner/types.d.ts +0 -31
  201. package/dist/dts/components/SettingsButton/SettingsButton.d.ts +0 -37
  202. package/dist/dts/components/SettingsButton/initSettingsButton.d.ts +0 -7
  203. package/dist/dts/components/SettingsButton/types.d.ts +0 -25
  204. package/dist/dts/components/ThemeParams/ThemeParams.d.ts +0 -57
  205. package/dist/dts/components/ThemeParams/initThemeParams.d.ts +0 -7
  206. package/dist/dts/components/ThemeParams/keys.d.ts +0 -11
  207. package/dist/dts/components/ThemeParams/parsing/parseThemeParams.d.ts +0 -7
  208. package/dist/dts/components/ThemeParams/parsing/serializeThemeParams.d.ts +0 -6
  209. package/dist/dts/components/ThemeParams/parsing/themeParams.d.ts +0 -4
  210. package/dist/dts/components/ThemeParams/requestThemeParams.d.ts +0 -8
  211. package/dist/dts/components/ThemeParams/types.d.ts +0 -29
  212. package/dist/dts/components/Utils/Utils.d.ts +0 -77
  213. package/dist/dts/components/Utils/initUtils.d.ts +0 -7
  214. package/dist/dts/components/Viewport/Viewport.d.ts +0 -77
  215. package/dist/dts/components/Viewport/initViewport.d.ts +0 -7
  216. package/dist/dts/components/Viewport/requestViewport.d.ts +0 -13
  217. package/dist/dts/components/Viewport/types.d.ts +0 -35
  218. package/dist/dts/css-vars/bindMiniAppCSSVars.d.ts +0 -29
  219. package/dist/dts/css-vars/bindThemeParamsCSSVars.d.ts +0 -29
  220. package/dist/dts/css-vars/bindViewportCSSVars.d.ts +0 -32
  221. package/dist/dts/css-vars/setCSSVar.d.ts +0 -6
  222. package/dist/dts/debug/debug.d.ts +0 -14
  223. package/dist/dts/env/hasExternalNotify.d.ts +0 -10
  224. package/dist/dts/env/hasWebviewProxy.d.ts +0 -10
  225. package/dist/dts/env/initWeb.d.ts +0 -11
  226. package/dist/dts/env/isIframe.d.ts +0 -5
  227. package/dist/dts/env/isSSR.d.ts +0 -4
  228. package/dist/dts/env/isTMA.d.ts +0 -4
  229. package/dist/dts/env/mockTelegramEnv.d.ts +0 -7
  230. package/dist/dts/errors/SDKError.d.ts +0 -9
  231. package/dist/dts/errors/createError.d.ts +0 -10
  232. package/dist/dts/errors/errors.d.ts +0 -49
  233. package/dist/dts/errors/isSDKError.d.ts +0 -7
  234. package/dist/dts/errors/isSDKErrorOfType.d.ts +0 -8
  235. package/dist/dts/events/event-emitter/EventEmitter.d.ts +0 -54
  236. package/dist/dts/events/event-emitter/types.d.ts +0 -45
  237. package/dist/dts/events/onWindow.d.ts +0 -10
  238. package/dist/dts/events/types.d.ts +0 -6
  239. package/dist/dts/index.low-level.d.ts +0 -41
  240. package/dist/dts/launch-params/parseLaunchParams.d.ts +0 -7
  241. package/dist/dts/launch-params/retrieveFromLocation.d.ts +0 -7
  242. package/dist/dts/launch-params/retrieveFromPerformance.d.ts +0 -7
  243. package/dist/dts/launch-params/retrieveFromStorage.d.ts +0 -7
  244. package/dist/dts/launch-params/retrieveFromUrl.d.ts +0 -8
  245. package/dist/dts/launch-params/retrieveLaunchParams.d.ts +0 -7
  246. package/dist/dts/launch-params/saveToStorage.d.ts +0 -7
  247. package/dist/dts/launch-params/serializeLaunchParams.d.ts +0 -7
  248. package/dist/dts/launch-params/types.d.ts +0 -51
  249. package/dist/dts/logger/Logger.d.ts +0 -29
  250. package/dist/dts/misc/createCleanup.d.ts +0 -11
  251. package/dist/dts/misc/createComponentInitFn/createComponentInitFn.d.ts +0 -16
  252. package/dist/dts/misc/createComponentInitFn/types.d.ts +0 -54
  253. package/dist/dts/misc/createSingleton.d.ts +0 -15
  254. package/dist/dts/misc/isRecord.d.ts +0 -5
  255. package/dist/dts/misc/objectFromKeys.d.ts +0 -6
  256. package/dist/dts/navigation/BasicNavigator/BasicNavigator.d.ts +0 -118
  257. package/dist/dts/navigation/BasicNavigator/prepareItem.d.ts +0 -8
  258. package/dist/dts/navigation/BasicNavigator/types.d.ts +0 -37
  259. package/dist/dts/navigation/BrowserNavigator/BrowserNavigator.d.ts +0 -198
  260. package/dist/dts/navigation/BrowserNavigator/basicItemToBrowser.d.ts +0 -7
  261. package/dist/dts/navigation/BrowserNavigator/createBrowserNavigatorFromLocation.d.ts +0 -4
  262. package/dist/dts/navigation/BrowserNavigator/prepareItem.d.ts +0 -25
  263. package/dist/dts/navigation/BrowserNavigator/types.d.ts +0 -64
  264. package/dist/dts/navigation/createSafeURL.d.ts +0 -7
  265. package/dist/dts/navigation/drop.d.ts +0 -4
  266. package/dist/dts/navigation/ensurePrefix.d.ts +0 -7
  267. package/dist/dts/navigation/getFirstNavigationEntry.d.ts +0 -6
  268. package/dist/dts/navigation/getHash.d.ts +0 -15
  269. package/dist/dts/navigation/getPathname.d.ts +0 -7
  270. package/dist/dts/navigation/go.d.ts +0 -5
  271. package/dist/dts/navigation/initNavigator.d.ts +0 -9
  272. package/dist/dts/navigation/urlToPath.d.ts +0 -7
  273. package/dist/dts/parsing/ArrayParser/ArrayParser.d.ts +0 -17
  274. package/dist/dts/parsing/ArrayParser/types.d.ts +0 -12
  275. package/dist/dts/parsing/ValueParser/ValueParser.d.ts +0 -17
  276. package/dist/dts/parsing/ValueParser/types.d.ts +0 -28
  277. package/dist/dts/parsing/createTypeError.d.ts +0 -6
  278. package/dist/dts/parsing/createValueParserGenerator.d.ts +0 -10
  279. package/dist/dts/parsing/parseBySchema.d.ts +0 -9
  280. package/dist/dts/parsing/parsers/array.d.ts +0 -7
  281. package/dist/dts/parsing/parsers/boolean.d.ts +0 -6
  282. package/dist/dts/parsing/parsers/date.d.ts +0 -6
  283. package/dist/dts/parsing/parsers/json.d.ts +0 -9
  284. package/dist/dts/parsing/parsers/number.d.ts +0 -6
  285. package/dist/dts/parsing/parsers/rgb.d.ts +0 -7
  286. package/dist/dts/parsing/parsers/searchParams.d.ts +0 -9
  287. package/dist/dts/parsing/parsers/string.d.ts +0 -6
  288. package/dist/dts/parsing/toRecord.d.ts +0 -7
  289. package/dist/dts/parsing/types.d.ts +0 -30
  290. package/dist/dts/request-id/createRequestIdGenerator.d.ts +0 -6
  291. package/dist/dts/request-id/types.d.ts +0 -9
  292. package/dist/dts/storage/storage.d.ts +0 -42
  293. package/dist/dts/supports/createSupportsFn.d.ts +0 -12
  294. package/dist/dts/supports/createSupportsParamFn.d.ts +0 -16
  295. package/dist/dts/supports/supports.d.ts +0 -16
  296. package/dist/dts/supports/types.d.ts +0 -4
  297. package/dist/dts/timeout/createTimeoutError.d.ts +0 -7
  298. package/dist/dts/timeout/sleep.d.ts +0 -5
  299. package/dist/dts/timeout/withTimeout.d.ts +0 -6
  300. package/dist/dts/types/index.d.ts +0 -6
  301. package/dist/dts/types/logical.d.ts +0 -16
  302. package/dist/dts/types/methods.d.ts +0 -16
  303. package/dist/dts/types/misc.d.ts +0 -12
  304. package/dist/dts/types/platform.d.ts +0 -4
  305. package/dist/dts/types/unions.d.ts +0 -20
  306. package/dist/dts/types/utils.d.ts +0 -24
  307. package/dist/dts/version/compareVersions.d.ts +0 -10
  308. package/dist/dts/version/types.d.ts +0 -5
  309. package/dist/index.low-level.iife.js +0 -4
  310. package/dist/index.low-level.iife.js.map +0 -1
@@ -1,392 +0,0 @@
1
- import { RGB } from '../../../colors/types.js';
2
- import { RequestId } from '../../../request-id/types.js';
3
- import { If, IsNever, UnionKeys } from '../../../types/index.js';
4
- import { AnyInvokeCustomMethodParams } from './custom-methods.js';
5
- import { AnyHapticFeedbackParams } from './haptic.js';
6
- import { PopupParams } from './popup.js';
7
-
8
- /**
9
- * Color key which could be used to update header color.
10
- */
11
- export type HeaderColorKey = 'bg_color' | 'secondary_bg_color';
12
- /**
13
- * Chat type which could be used when calling `web_app_switch_inline_query` method.
14
- */
15
- export type SwitchInlineQueryChatType = 'users' | 'bots' | 'groups' | 'channels';
16
- interface CreateParams<Params = never, VersionedParam extends UnionKeys<Params> = never> {
17
- params: Params;
18
- versionedParams: VersionedParam;
19
- }
20
- /**
21
- * Describes list of events and their parameters that could be posted by Bridge.
22
- * @see https://docs.telegram-mini-apps.com/platform/methods
23
- */
24
- export interface MiniAppsMethods {
25
- /**
26
- * Notifies parent iframe about the current frame is ready. This method is only used in the Web
27
- * version of Telegram. As a result, Mini App will receive `set_custom_style` event.
28
- * @see https://docs.telegram-mini-apps.com/platform/methods#iframe-ready
29
- */
30
- iframe_ready: CreateParams<{
31
- /**
32
- * True, if current Mini App supports native reloading.
33
- */
34
- reload_supported?: boolean;
35
- } | undefined>;
36
- /**
37
- * Notifies parent iframe about the current iframe is going to reload.
38
- * @see https://docs.telegram-mini-apps.com/platform/methods#iframe-will-reload
39
- */
40
- iframe_will_reload: CreateParams;
41
- /**
42
- * Request current biometry settings.
43
- * @since v7.2
44
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-biometry-get-info
45
- */
46
- web_app_biometry_get_info: CreateParams;
47
- /**
48
- * Opens the biometric access settings for bots. Useful when you need to request biometrics
49
- * access to users who haven't granted it yet.
50
- *
51
- * _Note that this method can be called only in response to user interaction with the Mini
52
- * App interface (e.g. a click inside the Mini App or on the main button)_.
53
- * @since v7.2
54
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-biometry-open-settings
55
- */
56
- web_app_biometry_open_settings: CreateParams;
57
- /**
58
- * Requests access to use biometrics.
59
- * @since v7.2
60
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-biometry-request-access
61
- */
62
- web_app_biometry_request_access: CreateParams<{
63
- /**
64
- * Reason to request biometry access. Should be at least 1 symbol length, but not
65
- * more than 128 symbols.
66
- */
67
- reason?: string;
68
- }>;
69
- /**
70
- * Authenticates the user using biometrics.
71
- * @since v7.2
72
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-biometry-request-auth
73
- */
74
- web_app_biometry_request_auth: CreateParams<{
75
- /**
76
- * Reason to request biometry data. Should be at least 1 symbol length, but not more than
77
- * 128 symbols.
78
- */
79
- reason?: string;
80
- }>;
81
- /**
82
- * Updates the biometric token in secure storage on the device. To remove the token, pass
83
- * an empty string.
84
- * @since v7.2
85
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-biometry-update-token
86
- */
87
- web_app_biometry_update_token: CreateParams<{
88
- /**
89
- * Token to store. Has max length of 1024 symbols.
90
- */
91
- token: string;
92
- }>;
93
- /**
94
- * Closes Mini App.
95
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-close
96
- */
97
- web_app_close: CreateParams<{
98
- /**
99
- * @since v7.6
100
- */
101
- return_back?: boolean;
102
- } | undefined, 'return_back'>;
103
- /**
104
- * Closes a QR scanner. The Telegram application creates `scan_qr_popup_closed` event.
105
- * @since v6.4
106
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-close-scan-qr-popup
107
- */
108
- web_app_close_scan_qr_popup: CreateParams;
109
- /**
110
- * Sends data to the bot. When this method is called, a service message is sent to the bot
111
- * containing the data of the length up to 4096 bytes. Then, Mini App will be closed.
112
- *
113
- * To get more information, take a look at `web_app_data` field in the
114
- * class [Message](https://core.telegram.org/bots/api#message).
115
- *
116
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-data-send
117
- */
118
- web_app_data_send: CreateParams<{
119
- /**
120
- * Data to send to a bot. Should not have size of more than 4096 bytes.
121
- */
122
- data: string;
123
- }>;
124
- /**
125
- * Expands the Mini App.
126
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-expand
127
- */
128
- web_app_expand: CreateParams;
129
- /**
130
- * Invokes custom method.
131
- * @since v6.9
132
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-invoke-custom-method
133
- */
134
- web_app_invoke_custom_method: CreateParams<AnyInvokeCustomMethodParams>;
135
- /**
136
- * Opens an invoice by its specified slug. More information about invoices in
137
- * this [documentation](https://core.telegram.org/bots/payments).
138
- * @since v6.1
139
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-invoice
140
- */
141
- web_app_open_invoice: CreateParams<{
142
- /**
143
- * Invoice unique identifier.
144
- */
145
- slug: string;
146
- }>;
147
- /**
148
- * Opens link in the default browser. Mini App will not be closed.
149
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-link
150
- */
151
- web_app_open_link: CreateParams<{
152
- /**
153
- * URL to be opened by Telegram application. Should be a full path with `https` protocol.
154
- */
155
- url: string;
156
- /**
157
- * Link will be opened in Instant View mode if possible.
158
- * @since v6.4
159
- * @see https://instantview.telegram.org/
160
- */
161
- try_instant_view?: boolean;
162
- /**
163
- * @since v7.6
164
- */
165
- try_browser?: boolean;
166
- }, 'try_instant_view' | 'try_browser'>;
167
- /**
168
- * Opens a new popup. When user closes the popup, Telegram creates the `popup_closed` event.
169
- * @since v6.2
170
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-popup
171
- */
172
- web_app_open_popup: CreateParams<PopupParams>;
173
- /**
174
- * Opens a QR scanner. When the scanner was closed, the Telegram application creates
175
- * the `scan_qr_popup_closed` event. When the scanner reads QR, Telegram creates the
176
- * `qr_text_received` event.
177
- * @since v6.4
178
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-scan-qr-popup
179
- */
180
- web_app_open_scan_qr_popup: CreateParams<{
181
- /**
182
- * Text to be displayed in the QR scanner.
183
- */
184
- text?: string;
185
- }>;
186
- /**
187
- * Opens the Telegram link by its pathname and query parameters. The link will be opened in the
188
- * Telegram app, Mini App will be closed.
189
- * @since v6.1
190
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-tg-link
191
- */
192
- web_app_open_tg_link: CreateParams<{
193
- /**
194
- * Should be a value taken from the link of this format: `https://t.me/{path_full}`. Can
195
- * additionally contain query parameters.
196
- */
197
- path_full: string;
198
- }>;
199
- /**
200
- * Reads text from the clipboard. The method accepts a request identifier which is used to
201
- * appropriately retrieve the method execution result from the `clipboard_text_received` event.
202
- * @since v6.4
203
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-read-text-from-clipboard
204
- */
205
- web_app_read_text_from_clipboard: CreateParams<{
206
- /**
207
- * Unique request identifier. Should be any unique string to handle the generated event
208
- * appropriately.
209
- */
210
- req_id: RequestId;
211
- }>;
212
- /**
213
- * Notifies Telegram about current application is ready to be shown. This method will make
214
- * Telegram to remove application loader and display Mini App.
215
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-ready
216
- */
217
- web_app_ready: CreateParams;
218
- /**
219
- * Requests access to current user's phone.
220
- * @since v6.9
221
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-request-phone
222
- */
223
- web_app_request_phone: CreateParams;
224
- /**
225
- * Requests current theme from Telegram. As a result, Telegram will create `theme_changed` event.
226
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-request-theme
227
- */
228
- web_app_request_theme: CreateParams;
229
- /**
230
- * Requests current viewport information from Telegram. As a result, Telegram will create
231
- * `viewport_changed` event.
232
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-request-viewport
233
- */
234
- web_app_request_viewport: CreateParams;
235
- /**
236
- * Requests write message access to current user.
237
- * @since v6.9
238
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-rqeuest-write-access
239
- */
240
- web_app_request_write_access: CreateParams;
241
- /**
242
- * Updates the Mini App background color.
243
- * @since v6.1
244
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-set-background-color
245
- */
246
- web_app_set_background_color: CreateParams<{
247
- /**
248
- * The Mini App background color in `#RRGGBB` format.
249
- */
250
- color: RGB;
251
- }>;
252
- /**
253
- * Updates the Mini App header color.
254
- * @since v6.1
255
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-set-header-color
256
- */
257
- web_app_set_header_color: CreateParams<{
258
- /**
259
- * The Mini App header color key.
260
- */
261
- color_key: HeaderColorKey;
262
- } | {
263
- /**
264
- * Color in RGB format.
265
- * @since v6.9
266
- */
267
- color: RGB;
268
- }, 'color'>;
269
- /**
270
- * Updates the Back Button settings.
271
- * @since v6.1
272
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-back-button
273
- */
274
- web_app_setup_back_button: CreateParams<{
275
- /**
276
- * Should the Back Button be visible.
277
- */
278
- is_visible: boolean;
279
- }>;
280
- /**
281
- * Updates current closing behavior.
282
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-closing-behavior
283
- */
284
- web_app_setup_closing_behavior: CreateParams<{
285
- /**
286
- * Will user be prompted in case, an application is going to be closed.
287
- */
288
- need_confirmation: boolean;
289
- }>;
290
- /**
291
- * Updates the Main Button settings.
292
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-main-button
293
- */
294
- web_app_setup_main_button: CreateParams<{
295
- /**
296
- * Should the Main Button be displayed.
297
- */
298
- is_visible?: boolean;
299
- /**
300
- * Should the Main Button be enabled.
301
- */
302
- is_active?: boolean;
303
- /**
304
- * Should loader inside the Main Button be displayed. Use this property in case, some
305
- * operation takes time. This loader will make user notified about it.
306
- */
307
- is_progress_visible?: boolean;
308
- /**
309
- * Text inside the Main Button.
310
- */
311
- text?: string;
312
- /**
313
- * The Main Button background color in `#RRGGBB` format.
314
- */
315
- color?: string;
316
- /**
317
- * The Main Button text color in `#RRGGBB` format.
318
- */
319
- text_color?: string;
320
- }>;
321
- /**
322
- * Updates current state of Settings Button.
323
- * @since v6.10
324
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-settings-button
325
- */
326
- web_app_setup_settings_button: CreateParams<{
327
- /**
328
- * Should the Settings Button be displayed.
329
- */
330
- is_visible: boolean;
331
- }>;
332
- /**
333
- * Inserts the bot's username and the specified inline query in the current chat's input field.
334
- * Query may be empty, in which case only the bot's username will be inserted. The client prompts
335
- * the user to choose a specific chat, then opens that chat and inserts the bot's username and
336
- * the specified inline query in the input field.
337
- * @since v6.7
338
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-switch-inline-query
339
- */
340
- web_app_switch_inline_query: CreateParams<{
341
- /**
342
- * Text which should be inserted in the input after the current bot name. Max length is
343
- * 256 symbols.
344
- */
345
- query: string;
346
- /**
347
- * List of chat types which could be chosen to send the message. Could be empty list.
348
- */
349
- chat_types: SwitchInlineQueryChatType[];
350
- }>;
351
- /**
352
- * Generates haptic feedback event.
353
- * @since v6.1
354
- * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-trigger-haptic-feedback
355
- */
356
- web_app_trigger_haptic_feedback: CreateParams<AnyHapticFeedbackParams>;
357
- }
358
- /**
359
- * Mini Apps method name.
360
- */
361
- export type MiniAppsMethodName = keyof MiniAppsMethods;
362
- /**
363
- * Parameters of the specified Mini Apps method.
364
- */
365
- export type MiniAppsMethodParams<M extends MiniAppsMethodName> = MiniAppsMethods[M]['params'];
366
- /**
367
- * Methods with optional parameters.
368
- */
369
- export type MiniAppsMethodWithOptionalParams = {
370
- [Method in MiniAppsMethodName]: undefined extends MiniAppsMethodParams<Method> ? Method : never;
371
- }[MiniAppsMethodName];
372
- /**
373
- * Methods without parameters.
374
- */
375
- export type MiniAppsMethodWithoutParams = {
376
- [Method in MiniAppsMethodName]: If<IsNever<MiniAppsMethodParams<Method>>, Method, never>;
377
- }[MiniAppsMethodName];
378
- /**
379
- * Methods with parameters.
380
- */
381
- export type MiniAppsMethodWithRequiredParams = Exclude<MiniAppsMethodName, MiniAppsMethodWithoutParams | MiniAppsMethodWithOptionalParams>;
382
- /**
383
- * Method names which have versioned params.
384
- */
385
- export type MiniAppsMethodWithVersionedParams = {
386
- [M in MiniAppsMethodName]: IsNever<MiniAppsMethods[M]['versionedParams']> extends true ? never : M;
387
- }[MiniAppsMethodName];
388
- /**
389
- * Method parameters which appear only in the specific Telegram Mini Apps version.
390
- */
391
- export type MiniAppsMethodVersionedParams<M extends MiniAppsMethodWithVersionedParams> = MiniAppsMethods[M]['versionedParams'];
392
- export {};
@@ -1,49 +0,0 @@
1
- /**
2
- * Describes the native popup.
3
- */
4
- export interface PopupParams {
5
- /**
6
- * The text to be displayed in the popup title, 0-64 characters.
7
- */
8
- title: string;
9
- /**
10
- * The message to be displayed in the body of the popup, 1-256 characters.
11
- */
12
- message: string;
13
- /**
14
- * List of buttons to be displayed in the popup, 1-3 buttons.
15
- */
16
- buttons: PopupButton[];
17
- }
18
- /**
19
- * Describes the native popup button.
20
- * @see https://docs.telegram-mini-apps.com/platform/methods#popupbutton
21
- */
22
- export type PopupButton = {
23
- /**
24
- * Identifier of the button, 0-64 characters.
25
- */
26
- id: string;
27
- } & ({
28
- /**
29
- * Type of the button:
30
- * - `default`, a button with the default style;
31
- * - `destructive`, a button with a style that indicates a destructive
32
- * action (e.g. "Remove", "Delete", etc.).
33
- *
34
- * @default "default"
35
- */
36
- type?: 'default' | 'destructive';
37
- /**
38
- * The text to be displayed on the button, 0-64 characters.
39
- */
40
- text: string;
41
- } | {
42
- /**
43
- * Type of the button:
44
- * - `ok`, a button with the localized text "OK";
45
- * - `close`, a button with the localized text "Close";
46
- * - `cancel`, a button with the localized text "Cancel".
47
- */
48
- type: 'ok' | 'close' | 'cancel';
49
- });
@@ -1,18 +0,0 @@
1
- /**
2
- * Message format used in communication between client and Telegram applications.
3
- */
4
- export interface MiniAppsMessage {
5
- /**
6
- * Event name.
7
- */
8
- eventType: string;
9
- /**
10
- * Event parameters.
11
- */
12
- eventData?: unknown;
13
- }
14
- /**
15
- * Parses value as a message between client and Telegram applications.
16
- * @param value - value to parse.
17
- */
18
- export declare function parseMessage(value: unknown): MiniAppsMessage;
@@ -1,53 +0,0 @@
1
- import { ExecuteWithOptions, If, IsNever } from '../types/index.js';
2
- import { MiniAppsEventName, MiniAppsEventPayload } from './events/types.js';
3
- import { MiniAppsMethodName, MiniAppsMethodParams } from './methods/types/index.js';
4
-
5
- /**
6
- * Returns all possible payloads for the specified events array.
7
- */
8
- export type RequestEventsPayloads<E extends MiniAppsEventName[]> = E extends (infer U extends MiniAppsEventName)[] ? MiniAppsEventPayload<U> : never;
9
- export type RequestCaptureEventsFn<E extends MiniAppsEventName[]> = E extends (infer U extends MiniAppsEventName)[] ? (payload: {
10
- [K in U]: If<IsNever<MiniAppsEventPayload<K>>, {
11
- event: K;
12
- }, {
13
- event: K;
14
- payload: MiniAppsEventPayload<K>;
15
- }>;
16
- }[U]) => boolean : never;
17
- export type RequestCaptureEventFn<E extends MiniAppsEventName> = If<IsNever<MiniAppsEventPayload<E>>, () => boolean, (payload: MiniAppsEventPayload<E>) => boolean>;
18
- /**
19
- * `request` method options.
20
- * @see request
21
- */
22
- export type RequestOptions<M extends MiniAppsMethodName, E, C> = {
23
- /**
24
- * Mini Apps method name.
25
- */
26
- method: M;
27
- /**
28
- * Tracked Mini Apps events.
29
- */
30
- event: E;
31
- /**
32
- * Should return true if this event should be captured.
33
- * A request will be captured if this property is omitted.
34
- */
35
- capture?: C;
36
- } & ExecuteWithOptions & If<IsNever<MiniAppsMethodParams<M>>, {}, {
37
- /**
38
- * List of method parameters.
39
- */
40
- params: MiniAppsMethodParams<M>;
41
- }>;
42
- /**
43
- * Calls specified Mini Apps method and captures specified event.
44
- * @param options - method options.
45
- * @returns Promise which will be resolved with data of the captured event.
46
- */
47
- export declare function request<M extends MiniAppsMethodName, E extends MiniAppsEventName>(options: RequestOptions<M, E, RequestCaptureEventFn<E>>): Promise<MiniAppsEventPayload<E>>;
48
- /**
49
- * Calls specified Mini Apps method and captures one of the specified events.
50
- * @param options - method options.
51
- * @returns Promise which will be resolved with data of the first captured event.
52
- */
53
- export declare function request<M extends MiniAppsMethodName, E extends MiniAppsEventName[]>(options: RequestOptions<M, E, RequestCaptureEventsFn<E>>): Promise<RequestEventsPayloads<E>>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Sets a new global targetOrigin, used by the `postEvent` method.
3
- * The default value is "https://web.telegram.org".
4
- * You don't need to use this method until you know what you are doing.
5
- *
6
- * This method could be used for test purposes.
7
- * @param value - new target origin.
8
- * @see postEvent
9
- */
10
- export declare function setTargetOrigin(value: string): void;
11
- /**
12
- * Sets the initial target origin.
13
- */
14
- export declare function resetTargetOrigin(): void;
15
- /**
16
- * Returns current global target origin.
17
- */
18
- export declare function targetOrigin(): string;
@@ -1,46 +0,0 @@
1
- import { EventEmitter } from '../../events/event-emitter/EventEmitter.js';
2
- import { StateEvents } from './types.js';
3
- import { StringKeys } from '../../types/utils.js';
4
-
5
- type Emitter<State extends object> = EventEmitter<StateEvents<State>>;
6
- export declare class State<State extends object> {
7
- /**
8
- * Initial state.
9
- */
10
- private readonly state;
11
- private readonly ee;
12
- constructor(
13
- /**
14
- * Initial state.
15
- */
16
- state: State);
17
- /**
18
- * Clones current state and returns its copy.
19
- */
20
- clone(): State;
21
- /**
22
- * Sets value by key.
23
- * @param key - state key.
24
- * @param value - value to set.
25
- */
26
- set<K extends StringKeys<State>>(key: K, value: State[K]): void;
27
- /**
28
- * Sets several values simultaneously.
29
- * @param state - partial state.
30
- */
31
- set(state: Partial<State>): void;
32
- /**
33
- * Returns value by specified key.
34
- * @param key - state key.
35
- */
36
- get<K extends StringKeys<State>>(key: K): State[K];
37
- /**
38
- * Adds new event listener.
39
- */
40
- on: Emitter<State>['on'];
41
- /**
42
- * Removes event listener.
43
- */
44
- off: Emitter<State>['off'];
45
- }
46
- export {};
@@ -1,29 +0,0 @@
1
- import { StringKeys } from '../../types/utils.js';
2
-
3
- /**
4
- * Creates a map with all events emitted by BaseComponent.
5
- * @example
6
- * ```ts
7
- * type A = StateEvents<{
8
- * name: string;
9
- * age: number;
10
- * isRegistered: boolean;
11
- * }>;
12
- *
13
- * // Will be:
14
- * {
15
- * "change:name": (currentValue: string) => void;
16
- * "change:age": (currentValue: number) => void;
17
- * "change:isRegistered": (currentValue: boolean) => void;
18
- * "change": () => void;
19
- * }
20
- * ```
21
- */
22
- export type StateEvents<State extends object> = {
23
- [Event in `change:${StringKeys<State>}`]: (currentValue: Event extends `change:${infer T extends StringKeys<State>}` ? State[T] : never) => void;
24
- } & {
25
- /**
26
- * Something has changed in the state.
27
- */
28
- change: (currentState: State) => void;
29
- };
@@ -1,18 +0,0 @@
1
- import { State } from './State/State.js';
2
-
3
- export declare class WithStateUtils<Shape extends object> {
4
- protected state: State<Shape>;
5
- constructor(shape: Shape);
6
- /**
7
- * Gets the state value.
8
- */
9
- protected get: State<Shape>['get'];
10
- /**
11
- * Sets the state value.
12
- */
13
- protected set: State<Shape>['set'];
14
- /**
15
- * Clones the current state.
16
- */
17
- protected clone: State<Shape>['clone'];
18
- }
@@ -1,19 +0,0 @@
1
- import { MiniAppsMethodName } from '../bridge/methods/types/methods.js';
2
- import { SupportsFn } from '../supports/types.js';
3
- import { Version } from '../version/types.js';
4
-
5
- export declare class WithSupports<SupportsMethod extends string> {
6
- constructor(
7
- /**
8
- * Mini Apps version.
9
- */
10
- version: Version,
11
- /**
12
- * Supports method schema.
13
- */
14
- supportsSchema: Record<SupportsMethod, MiniAppsMethodName>);
15
- /**
16
- * @returns True, if specified method is supported by the current component.
17
- */
18
- supports: SupportsFn<SupportsMethod>;
19
- }
@@ -1,24 +0,0 @@
1
- import { WithStateUtils } from './WithStateUtils.js';
2
- import { MiniAppsMethodName } from '../bridge/methods/types/methods.js';
3
- import { SupportsFn } from '../supports/types.js';
4
- import { Version } from '../version/types.js';
5
-
6
- export declare class WithSupportsAndStateUtils<StateShape extends object, SupportsMethod extends string> extends WithStateUtils<StateShape> {
7
- constructor(
8
- /**
9
- * Initial state.
10
- */
11
- stateShape: StateShape,
12
- /**
13
- * Mini Apps version.
14
- */
15
- version: Version,
16
- /**
17
- * Supports method schema.
18
- */
19
- supportsSchema: Record<SupportsMethod, MiniAppsMethodName>);
20
- /**
21
- * @returns True, if specified method is supported by the current component.
22
- */
23
- supports: SupportsFn<SupportsMethod>;
24
- }