@orbit-software/sdk 1.75.0 → 1.80.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 (237) hide show
  1. package/dist/esm/assets/icons/IconBalanceCoins.d.ts +3 -0
  2. package/dist/esm/{app/ui/components/IconBalanceCoin.d.ts → assets/icons/IconBalanceGems.d.ts} +1 -1
  3. package/dist/esm/assets/icons/IconUsdt.d.ts +3 -0
  4. package/dist/esm/components/BuyAdsFreeButton.d.ts +1 -0
  5. package/dist/esm/{features/profile/components → components}/OverlayProfile.d.ts +2 -2
  6. package/dist/esm/components/layout/BottomSentinel.d.ts +2 -0
  7. package/dist/esm/components/modals/BoxOpeningModal/AnimatedFullscreen.d.ts +14 -0
  8. package/dist/esm/components/modals/BoxOpeningModal/BoxOpeningModal.d.ts +2 -0
  9. package/dist/esm/{launcherSrc/features/profile/components → components/modals/BoxOpeningModal}/PrizeCarousel.d.ts +4 -3
  10. package/dist/esm/components/modals/BoxOpeningModal/RewardBoxRareBadge.d.ts +5 -0
  11. package/dist/esm/{launcherSrc/features/profile/components → components/modals/BoxOpeningModal}/RewardTypeBadge.d.ts +2 -2
  12. package/dist/esm/{launcherSrc/features/profile/components → components/modals/BoxOpeningModal}/RewardTypeImage.d.ts +3 -3
  13. package/dist/esm/{launcherSrc/features/profile → components/modals/BoxOpeningModal}/utils/findPrizeIndex.d.ts +1 -1
  14. package/dist/esm/components/modals/BoxOpeningModal/utils/generateExcitingPrizes.d.ts +9 -0
  15. package/dist/esm/components/modals/BoxOpeningModal/utils/sortPrizesDistributed.d.ts +2 -0
  16. package/dist/esm/components/modals/LevelInfoModal.d.ts +2 -0
  17. package/dist/esm/components/modals/ProfileInventoryModal.d.ts +2 -0
  18. package/dist/esm/components/modals/PurchaseAdsFreeModal.d.ts +2 -0
  19. package/dist/esm/components/modals/TopUpModal/TopUpModal.d.ts +2 -0
  20. package/dist/esm/components/{AnimatedBalance.d.ts → ui/AnimatedBalance.d.ts} +2 -1
  21. package/dist/esm/components/ui/BalanceHeader.d.ts +4 -0
  22. package/dist/esm/components/ui/Drawer.d.ts +9 -0
  23. package/dist/esm/components/ui/EventsStack.d.ts +6 -0
  24. package/dist/esm/components/ui/FormattedXP.d.ts +4 -0
  25. package/dist/esm/components/ui/Icon.d.ts +27 -0
  26. package/dist/esm/{launcherSrc/app/ui/components → components/ui}/XpProgress.d.ts +2 -4
  27. package/dist/esm/{launcherSrc/app/contexts → components/ui/snackbar}/SnackbarContext.d.ts +4 -2
  28. package/dist/esm/confirm/confirm.d.ts +2 -0
  29. package/dist/esm/constants/animations.d.ts +2 -0
  30. package/dist/esm/hooks/useAnimateNumber.d.ts +1 -0
  31. package/dist/esm/hooks/useLottie.d.ts +12 -0
  32. package/dist/esm/hooks/useThrottle.d.ts +1 -0
  33. package/dist/esm/i18n/generate-types.d.ts +1 -0
  34. package/dist/esm/i18n/generated-translation-type.d.ts +112 -0
  35. package/dist/esm/i18n/languages.d.ts +7 -0
  36. package/dist/esm/i18n/locales/en.json.d.ts +137 -0
  37. package/dist/esm/i18n/locales/es.json.d.ts +136 -0
  38. package/dist/esm/i18n/locales/hi.json.d.ts +137 -0
  39. package/dist/esm/i18n/locales/pt.json.d.ts +136 -0
  40. package/dist/esm/i18n/locales/ru.json.d.ts +137 -0
  41. package/dist/esm/i18n/types.d.ts +9 -0
  42. package/dist/esm/i18n/useTranslation.d.ts +6 -0
  43. package/dist/esm/lib/BannerManager.d.ts +36 -0
  44. package/dist/esm/lib/WebSocketManager.d.ts +3 -3
  45. package/dist/esm/lib/activity-detector.d.ts +1 -1
  46. package/dist/esm/lib/tma-network.d.ts +1 -1
  47. package/dist/esm/providers/BoxOpeningProvider.d.ts +21 -0
  48. package/dist/esm/providers/ConfettiProvider.d.ts +3 -0
  49. package/dist/esm/providers/I18nBackendLanguageProvider.d.ts +3 -0
  50. package/dist/esm/queries/box/useBoxRewards.d.ts +13 -0
  51. package/dist/esm/queries/box/useRevealReward.d.ts +10 -0
  52. package/dist/esm/queries/user/useCancelNoAds.d.ts +2 -0
  53. package/dist/esm/queries/user/useCreateInvoiceBuyNoAds.d.ts +3 -0
  54. package/dist/esm/queries/user/usePrices.d.ts +3 -0
  55. package/dist/esm/queries/user/useProfile.d.ts +4 -0
  56. package/dist/esm/queryClient.d.ts +2 -0
  57. package/dist/esm/sdk.d.ts +56 -31
  58. package/dist/esm/sdk.mjs +44640 -43919
  59. package/dist/esm/sdk.umd.js +134 -198
  60. package/dist/esm/stores/confettiStore.d.ts +8 -0
  61. package/dist/esm/stores/inventroryModalStore.d.ts +6 -0
  62. package/dist/esm/stores/topUpModalStore.d.ts +6 -0
  63. package/dist/esm/types/api.d.ts +39 -0
  64. package/dist/esm/utils/cn.d.ts +2 -0
  65. package/dist/esm/utils/formatter.d.ts +5 -0
  66. package/dist/esm/utils/price.d.ts +2 -0
  67. package/dist/esm/utils/shuffleArray.d.ts +1 -0
  68. package/dist/esm/utils/telegramLanguageCodeToFlagEmoji.d.ts +11 -0
  69. package/dist/stats-confirm.html +1 -1
  70. package/dist/stats-esm.html +1 -1
  71. package/dist/stats-umd-react.html +1 -1
  72. package/dist/stats-umd.html +1 -1
  73. package/dist/umd/sdk.umd.js +134 -198
  74. package/dist/umd_react/sdk_react.umd.js +191 -255
  75. package/package.json +28 -30
  76. package/dist/confirm/index.html +0 -24
  77. package/dist/esm/app/helpers.d.ts +0 -2
  78. package/dist/esm/app/ui/assets/IconBack.d.ts +0 -1
  79. package/dist/esm/app/ui/components/AvatarProgress.d.ts +0 -13
  80. package/dist/esm/app/ui/components/ClosableModal.d.ts +0 -12
  81. package/dist/esm/app/ui/components/IconBalanceDiamond.d.ts +0 -3
  82. package/dist/esm/app/ui/components/InputSwitch.d.ts +0 -9
  83. package/dist/esm/app/ui/components/Inventory/Inventory.d.ts +0 -2
  84. package/dist/esm/app/ui/components/Inventory/context.d.ts +0 -10
  85. package/dist/esm/app/ui/components/XsButton.d.ts +0 -6
  86. package/dist/esm/app/ui/hooks/useAnimateNumber.d.ts +0 -1
  87. package/dist/esm/app/utils.d.ts +0 -2
  88. package/dist/esm/components/AppContent/AppContent.d.ts +0 -10
  89. package/dist/esm/components/AppContent/BottomSentinel.d.ts +0 -2
  90. package/dist/esm/components/BuyShopItem.d.ts +0 -1
  91. package/dist/esm/components/ModalCardContent.d.ts +0 -5
  92. package/dist/esm/features/profile/assets/IconAd.d.ts +0 -1
  93. package/dist/esm/features/profile/assets/IconAddCircle.d.ts +0 -1
  94. package/dist/esm/features/profile/assets/IconChevronRight.d.ts +0 -2
  95. package/dist/esm/features/profile/assets/IconDrag.d.ts +0 -2
  96. package/dist/esm/features/profile/assets/IconEdit.d.ts +0 -2
  97. package/dist/esm/features/profile/assets/IconGame.d.ts +0 -2
  98. package/dist/esm/features/profile/assets/IconNoSign.d.ts +0 -1
  99. package/dist/esm/features/profile/assets/IconProfile.d.ts +0 -1
  100. package/dist/esm/features/profile/assets/profileBgGradients.d.ts +0 -6
  101. package/dist/esm/features/profile/components/BalanceConfetti.d.ts +0 -6
  102. package/dist/esm/features/profile/components/BuyMenu.d.ts +0 -8
  103. package/dist/esm/features/profile/components/CircleParticles.d.ts +0 -10
  104. package/dist/esm/features/profile/components/FormattedXP.d.ts +0 -8
  105. package/dist/esm/features/profile/components/LevelInfoModal.d.ts +0 -9
  106. package/dist/esm/features/profile/components/ModalContainer.d.ts +0 -6
  107. package/dist/esm/features/profile/components/PurchaseConfirm.d.ts +0 -9
  108. package/dist/esm/features/profile/components/TaskCard.d.ts +0 -21
  109. package/dist/esm/features/profile/components/XpProgress.d.ts +0 -14
  110. package/dist/esm/features/profile/components/adsFree/BuyAdsFreeButton.d.ts +0 -3
  111. package/dist/esm/features/profile/components/adsFree/PurchaseAdsFree.d.ts +0 -11
  112. package/dist/esm/features/profile/hooks/useAnimatedProfile.d.ts +0 -5
  113. package/dist/esm/features/profile/utils/getFormattedDate.d.ts +0 -1
  114. package/dist/esm/features/wages/components/ModalContainer.d.ts +0 -6
  115. package/dist/esm/features/wages/components/WageCollapsedOverlay.d.ts +0 -6
  116. package/dist/esm/features/wages/components/WageExpandedOverlay.d.ts +0 -7
  117. package/dist/esm/features/wages/components/WageMenu.d.ts +0 -4
  118. package/dist/esm/features/wages/index.d.ts +0 -3
  119. package/dist/esm/features/wages/utils/formatTime.d.ts +0 -1
  120. package/dist/esm/features/wages/utils/formatTimeWageItem.d.ts +0 -1
  121. package/dist/esm/features/wages/utils/getSecondsPassed.d.ts +0 -1
  122. package/dist/esm/i18n/locales/translations/en.json.d.ts +0 -300
  123. package/dist/esm/i18n/locales/translations/hi.json.d.ts +0 -300
  124. package/dist/esm/i18n/locales/translations/ru.json.d.ts +0 -300
  125. package/dist/esm/launcherSrc/App.d.ts +0 -2
  126. package/dist/esm/launcherSrc/api/types.d.ts +0 -211
  127. package/dist/esm/launcherSrc/api/userApi.d.ts +0 -24
  128. package/dist/esm/launcherSrc/app/components/DebugConsole.d.ts +0 -2
  129. package/dist/esm/launcherSrc/app/helpers.d.ts +0 -3
  130. package/dist/esm/launcherSrc/app/hooks/forceRerender.d.ts +0 -1
  131. package/dist/esm/launcherSrc/app/hooks/useMainButtonControl.d.ts +0 -7
  132. package/dist/esm/launcherSrc/app/hooks/useMiniApp.d.ts +0 -3
  133. package/dist/esm/launcherSrc/app/hooks.d.ts +0 -10
  134. package/dist/esm/launcherSrc/app/store.d.ts +0 -17
  135. package/dist/esm/launcherSrc/app/ui/assets/IconBack.d.ts +0 -1
  136. package/dist/esm/launcherSrc/app/ui/assets/IconCheck.d.ts +0 -2
  137. package/dist/esm/launcherSrc/app/ui/assets/IconCheckThin.d.ts +0 -2
  138. package/dist/esm/launcherSrc/app/ui/assets/IconCross.d.ts +0 -2
  139. package/dist/esm/launcherSrc/app/ui/assets/IconSearch.d.ts +0 -2
  140. package/dist/esm/launcherSrc/app/ui/components/AvatarProgress.d.ts +0 -13
  141. package/dist/esm/launcherSrc/app/ui/components/ClosableModal.d.ts +0 -10
  142. package/dist/esm/launcherSrc/app/ui/components/FormattedXP.d.ts +0 -8
  143. package/dist/esm/launcherSrc/app/ui/components/IconBalance.d.ts +0 -3
  144. package/dist/esm/launcherSrc/app/ui/components/InputSwitch.d.ts +0 -9
  145. package/dist/esm/launcherSrc/app/ui/components/Twemoji.d.ts +0 -8
  146. package/dist/esm/launcherSrc/app/ui/components/UICell.d.ts +0 -16
  147. package/dist/esm/launcherSrc/app/ui/components/UIDateInput.d.ts +0 -21
  148. package/dist/esm/launcherSrc/app/ui/components/UIDivider.d.ts +0 -4
  149. package/dist/esm/launcherSrc/app/ui/components/UIEmoji.d.ts +0 -8
  150. package/dist/esm/launcherSrc/app/ui/components/UIHero.d.ts +0 -10
  151. package/dist/esm/launcherSrc/app/ui/components/UISection.d.ts +0 -9
  152. package/dist/esm/launcherSrc/app/ui/components/UITextarea.d.ts +0 -7
  153. package/dist/esm/launcherSrc/app/ui/hooks/useAnimateNumber.d.ts +0 -1
  154. package/dist/esm/launcherSrc/app/utils.d.ts +0 -13
  155. package/dist/esm/launcherSrc/assets/Icon28Edit.d.ts +0 -2
  156. package/dist/esm/launcherSrc/assets/Icon28Game.d.ts +0 -1
  157. package/dist/esm/launcherSrc/assets/Icon28Link.d.ts +0 -1
  158. package/dist/esm/launcherSrc/features/games/assets/IconFilter.d.ts +0 -1
  159. package/dist/esm/launcherSrc/features/games/assets/IconPlayers.d.ts +0 -2
  160. package/dist/esm/launcherSrc/features/games/assets/IconQuestion.d.ts +0 -2
  161. package/dist/esm/launcherSrc/features/games/assets/IconQuestionCircle.d.ts +0 -2
  162. package/dist/esm/launcherSrc/features/games/assets/IconStar.d.ts +0 -4
  163. package/dist/esm/launcherSrc/features/games/assets/IconThumbsDownFilled.d.ts +0 -2
  164. package/dist/esm/launcherSrc/features/games/assets/IconThumbsDownOutlined.d.ts +0 -2
  165. package/dist/esm/launcherSrc/features/games/assets/IconThumbsUpFilled.d.ts +0 -2
  166. package/dist/esm/launcherSrc/features/games/assets/IconThumbsUpOutlined.d.ts +0 -2
  167. package/dist/esm/launcherSrc/features/games/components/GameItem.d.ts +0 -10
  168. package/dist/esm/launcherSrc/features/games/components/ResetStorageButton.d.ts +0 -3
  169. package/dist/esm/launcherSrc/features/games/components/ReviewModal.d.ts +0 -10
  170. package/dist/esm/launcherSrc/features/games/hooks/useGamesData.d.ts +0 -13
  171. package/dist/esm/launcherSrc/features/games/redux/gamesSlice.d.ts +0 -34
  172. package/dist/esm/launcherSrc/features/games/service/gamesService.d.ts +0 -3
  173. package/dist/esm/launcherSrc/features/leaderboard/components/Rating.d.ts +0 -1
  174. package/dist/esm/launcherSrc/features/leaderboard/components/RatingCard/RatingCard.d.ts +0 -10
  175. package/dist/esm/launcherSrc/features/leaderboard/components/RatingInfo/RatingInfo.d.ts +0 -1
  176. package/dist/esm/launcherSrc/features/leaderboard/components/RatingLevel/IconWreaths.d.ts +0 -3
  177. package/dist/esm/launcherSrc/features/leaderboard/components/RatingLevel/RatingLevel.d.ts +0 -6
  178. package/dist/esm/launcherSrc/features/leaderboard/components/RatingLevel/lock.d.ts +0 -3
  179. package/dist/esm/launcherSrc/features/leaderboard/hooks/useLeaderboardData.d.ts +0 -10
  180. package/dist/esm/launcherSrc/features/leaderboard/index.d.ts +0 -1
  181. package/dist/esm/launcherSrc/features/leaderboard/redux/leaderboardSlice.d.ts +0 -18
  182. package/dist/esm/launcherSrc/features/leaderboard/services/leaderboardService.d.ts +0 -2
  183. package/dist/esm/launcherSrc/features/navigation/assets/IconGame.d.ts +0 -1
  184. package/dist/esm/launcherSrc/features/navigation/assets/IconProfile.d.ts +0 -1
  185. package/dist/esm/launcherSrc/features/navigation/assets/IconSmile.d.ts +0 -2
  186. package/dist/esm/launcherSrc/features/navigation/components/FloatingProfile.d.ts +0 -2
  187. package/dist/esm/launcherSrc/features/navigation/components/IconWithCounter.d.ts +0 -7
  188. package/dist/esm/launcherSrc/features/navigation/redux/navigationSlice.d.ts +0 -15
  189. package/dist/esm/launcherSrc/features/navigation/redux/tabsSlice.d.ts +0 -12
  190. package/dist/esm/launcherSrc/features/profile/assets/IconAd.d.ts +0 -1
  191. package/dist/esm/launcherSrc/features/profile/assets/IconAddCircle.d.ts +0 -1
  192. package/dist/esm/launcherSrc/features/profile/assets/IconChevronRight.d.ts +0 -2
  193. package/dist/esm/launcherSrc/features/profile/assets/IconColorPicker.d.ts +0 -1
  194. package/dist/esm/launcherSrc/features/profile/assets/IconCurrencyStar.d.ts +0 -3
  195. package/dist/esm/launcherSrc/features/profile/assets/IconGlobe.d.ts +0 -2
  196. package/dist/esm/launcherSrc/features/profile/assets/IconLock.d.ts +0 -2
  197. package/dist/esm/launcherSrc/features/profile/assets/IconNoSign.d.ts +0 -1
  198. package/dist/esm/launcherSrc/features/profile/assets/IconSignature.d.ts +0 -5
  199. package/dist/esm/launcherSrc/features/profile/assets/profileBgGradients.d.ts +0 -50
  200. package/dist/esm/launcherSrc/features/profile/components/AdsFree/BuyAdsFreeButton.d.ts +0 -0
  201. package/dist/esm/launcherSrc/features/profile/components/AdsFree/PurchaseAdsFree.d.ts +0 -9
  202. package/dist/esm/launcherSrc/features/profile/components/Balance/ProfileBalance.d.ts +0 -6
  203. package/dist/esm/launcherSrc/features/profile/components/Balance/TopUpModal/BuyMenu.d.ts +0 -8
  204. package/dist/esm/launcherSrc/features/profile/components/Balance/TopUpModal/Ribbon.d.ts +0 -6
  205. package/dist/esm/launcherSrc/features/profile/components/BoxOpeningModal.d.ts +0 -3
  206. package/dist/esm/launcherSrc/features/profile/components/LevelInfoModal.d.ts +0 -9
  207. package/dist/esm/launcherSrc/features/profile/components/ProfileInventory.d.ts +0 -1
  208. package/dist/esm/launcherSrc/features/profile/components/ProfileLeaderboard.d.ts +0 -6
  209. package/dist/esm/launcherSrc/features/profile/components/ProfileReviews.d.ts +0 -6
  210. package/dist/esm/launcherSrc/features/profile/components/RewardBoxRareBadge.d.ts +0 -4
  211. package/dist/esm/launcherSrc/features/profile/components/particles/BalanceConfetti.d.ts +0 -6
  212. package/dist/esm/launcherSrc/features/profile/components/particles/CircleParticles.d.ts +0 -10
  213. package/dist/esm/launcherSrc/features/profile/components/particles/StarParticles.d.ts +0 -10
  214. package/dist/esm/launcherSrc/features/profile/contexts/BoxOpeningContext.d.ts +0 -12
  215. package/dist/esm/launcherSrc/features/profile/data/countries.d.ts +0 -10
  216. package/dist/esm/launcherSrc/features/profile/hooks/useProfileData.d.ts +0 -24
  217. package/dist/esm/launcherSrc/features/profile/redux/profileSlice.d.ts +0 -130
  218. package/dist/esm/launcherSrc/features/profile/services/buyMenuService.d.ts +0 -3
  219. package/dist/esm/launcherSrc/features/profile/services/profileService.d.ts +0 -12
  220. package/dist/esm/launcherSrc/i18n/index.d.ts +0 -2
  221. package/dist/esm/launcherSrc/index.d.ts +0 -0
  222. package/dist/esm/launcherSrc/setupTests.d.ts +0 -0
  223. package/dist/esm/launcherSrc/utils/openTelegramLinkFixed.d.ts +0 -1
  224. package/dist/esm/lib/init-sentry.d.ts +0 -5
  225. package/dist/esm/stores/buyShopModalStore.d.ts +0 -8
  226. package/dist/esm/stores/profileStore.d.ts +0 -17
  227. package/dist/esm/stores/wageStore.d.ts +0 -12
  228. package/dist/esm/{app/ui/assets → assets/icons}/IconClosePlain.d.ts +0 -0
  229. package/dist/esm/{features/profile/assets → assets/icons}/IconCurrencyStar.d.ts +0 -0
  230. package/dist/esm/{features/profile/assets → assets/icons}/IconTelegramStar.d.ts +0 -0
  231. package/dist/esm/{features/profile/assets → assets/lottie}/moneyTongue.json.d.ts +0 -0
  232. package/dist/esm/{features/profile/assets → assets/lottie}/newspaper.json.d.ts +0 -0
  233. package/dist/esm/{launcherSrc/features/profile/components/Balance → components/modals}/TopUpModal/BuyOption.d.ts +0 -0
  234. package/dist/esm/{features/profile/components → components/modals/TopUpModal}/Ribbon.d.ts +0 -0
  235. package/dist/esm/{launcherSrc/app/ui/components → components/ui/XsButton}/XsButton.d.ts +1 -1
  236. /package/dist/esm/{launcherSrc/features/profile/components → components/ui}/particles/ConfettiParticles.d.ts +0 -0
  237. /package/dist/esm/{features/profile/components → components/ui/particles}/StarParticles.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ export declare const ConfettiProvider: ({ children }: {
2
+ children: React.ReactNode;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function I18nBackendLanguageProvider({ children }: {
2
+ children: React.ReactNode;
3
+ }): import('react').ReactNode;
@@ -0,0 +1,13 @@
1
+ import { ServiceBoxContentResponse } from '../../types/api';
2
+ import { UseMutationOptions } from '@tanstack/react-query';
3
+ export declare function useBoxRewards(props?: Omit<UseMutationOptions<ServiceBoxContentResponse, Error, {
4
+ boxId: number;
5
+ }>, 'mutationFn'>): import('@tanstack/react-query').UseMutationResult<{
6
+ rewards: {
7
+ reward_value: number;
8
+ reward_type: string;
9
+ }[];
10
+ recent_rewards: import('../../types/api').ServiceRecentReward[];
11
+ }, Error, {
12
+ boxId: number;
13
+ }, unknown>;
@@ -0,0 +1,10 @@
1
+ import { ServiceBoxOpenResponse } from '../../types/api';
2
+ import { UseMutationOptions } from '@tanstack/react-query';
3
+ export declare function useRevealReward(props?: Omit<UseMutationOptions<ServiceBoxOpenResponse, Error, {
4
+ boxId: number;
5
+ }>, 'mutationFn'>): import('@tanstack/react-query').UseMutationResult<{
6
+ reward_value: number;
7
+ reward_type: string;
8
+ }, Error, {
9
+ boxId: number;
10
+ }, unknown>;
@@ -0,0 +1,2 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ export declare function useCancelNoAds(props?: Omit<UseMutationOptions<void, Error>, 'mutationFn'>): import('@tanstack/react-query').UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,3 @@
1
+ import { ServiceInvoiceCreatedResponse } from '../../types/api';
2
+ import { UseMutationOptions } from '@tanstack/react-query';
3
+ export declare function useCreateInvoiceBuyNoAds(props?: Omit<UseMutationOptions<ServiceInvoiceCreatedResponse, Error>, 'mutationFn'>): import('@tanstack/react-query').UseMutationResult<ServiceInvoiceCreatedResponse, Error, void, unknown>;
@@ -0,0 +1,3 @@
1
+ import { PricesResponse } from '../../types/api';
2
+ export declare const PRICES_TAG = "prices";
3
+ export declare function usePrices(): import('@tanstack/react-query').UseQueryResult<PricesResponse, Error>;
@@ -0,0 +1,4 @@
1
+ import { CryptoSteamSDKProfile } from '../../sdk';
2
+ import { UseQueryOptions } from '@tanstack/react-query';
3
+ export declare const PROFILE_TAG = "profile";
4
+ export declare function useProfile(props?: Omit<UseQueryOptions<CryptoSteamSDKProfile>, 'queryKey' | 'queryFn'>): import('@tanstack/react-query').UseSuspenseQueryResult<CryptoSteamSDKProfile, Error>;
@@ -0,0 +1,2 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ export declare const queryClient: QueryClient;
package/dist/esm/sdk.d.ts CHANGED
@@ -1,8 +1,9 @@
1
+ import { InventoryItem, ServiceInvoiceCreatedResponse } from './types/api';
1
2
  export declare const BASE_URL = "https://app.portalapp.games/sdk";
2
3
  interface LaunchResponse {
3
4
  tma_ads_key: string;
4
5
  ads?: {
5
- type: "tma" | "monetag" | "adsgram";
6
+ type: 'tma' | 'monetag' | 'adsgram';
6
7
  tmaAdsKey?: string;
7
8
  monetag?: string;
8
9
  adsgram?: string;
@@ -20,37 +21,55 @@ export declare class APIRequestError extends Error {
20
21
  responseText: string | undefined;
21
22
  });
22
23
  }
23
- export declare function makeRequest<T>(path: string, method: "POST" | "GET" | "PUT" | "DELETE", body?: any): Promise<T>;
24
+ export declare function makeRequest<T>(path: string, method: 'POST' | 'GET' | 'PUT' | 'DELETE', body?: any): Promise<T>;
24
25
  export interface CryptoSteamSDKConfig {
25
- supported_screen_formats: ("landscape" | "portrait" | "fullscreen")[];
26
+ supported_screen_formats: ('landscape' | 'portrait' | 'fullscreen')[];
26
27
  supported_devices: string[];
27
28
  title: string;
28
29
  app_url: string;
29
30
  }
30
- export type Audience = "start_page_default" | "start_page_few_ads" | "start_page_no_ads" | "start_page_games" | "banner_test";
31
+ export type Audience = 'start_page_default' | 'start_page_few_ads' | 'start_page_no_ads' | 'start_page_games' | 'banner_test';
31
32
  export interface CryptoSteamSDKProfile {
32
33
  id: number;
33
- is_admin?: boolean;
34
- experience: number;
35
- level_up_exp: number;
36
- level: number;
34
+ avatar_ug: string;
37
35
  user_name: string;
38
36
  first_name: string;
39
37
  last_name: string;
40
- avatar?: string;
41
- balance_coins: number;
38
+ language: string;
39
+ email: string;
40
+ email_confirmed: boolean;
41
+ phone_number: string;
42
+ location: string;
43
+ background_color: string;
44
+ override_ads: boolean;
45
+ ton_address: string;
42
46
  audiences: Audience[];
47
+ is_premium: boolean;
48
+ allows_write_to_pm: boolean;
49
+ ads_disabled_until?: string;
50
+ created: string;
51
+ updated: string;
52
+ avatar: string;
53
+ birth_date: string;
43
54
  balance_gems: number;
44
- ads_free: boolean;
45
- game_id?: string | number;
46
- games_count: number;
55
+ balance_coins: number;
56
+ experience: number;
57
+ balance_usdt: number;
58
+ minimum_usdt_withdraw: number;
59
+ level: number;
60
+ level_up_exp: number;
47
61
  invited: number;
48
- email?: string;
49
- phone_number?: string;
50
- location?: string;
51
- birth_date?: string;
52
- avatar_ug?: string;
53
- background_color?: string;
62
+ invited_full: number;
63
+ games_count: number;
64
+ ads_free: boolean;
65
+ is_admin: boolean;
66
+ inventory: InventoryItem[];
67
+ game_id?: number | string;
68
+ onboarding: boolean;
69
+ review_stats: {
70
+ total: number;
71
+ with_comments: number;
72
+ };
54
73
  }
55
74
  export interface CryptoSteamSDKShopItem {
56
75
  id: number;
@@ -106,13 +125,10 @@ export interface CryptoSteamSDKWage {
106
125
  export interface OverlayConfig {
107
126
  onOverlayOpen?: () => void;
108
127
  onOverlayClose?: () => void;
109
- variant?: "light" | "dark" | "translucent";
110
- initialPosition?: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
128
+ variant?: 'light' | 'dark' | 'translucent';
129
+ initialPosition?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
111
130
  botId?: string;
112
131
  }
113
- interface InvoiceResponse {
114
- invoice_link: string;
115
- }
116
132
  export interface CryptoSteamSDKTask {
117
133
  id: number;
118
134
  title: string;
@@ -125,7 +141,7 @@ export interface CryptoSteamSDKTask {
125
141
  is_done: boolean;
126
142
  }
127
143
  interface PurchaseConfirmResponse {
128
- status: "success" | "error";
144
+ status: 'success' | 'error';
129
145
  }
130
146
  interface TelegramCloudStorage {
131
147
  getValue: (key: string) => Promise<string>;
@@ -139,7 +155,7 @@ interface TMANetworkInterstitialResponse {
139
155
  interface ShowPromiseResult {
140
156
  done: boolean;
141
157
  description: string;
142
- state: "load" | "render" | "playing" | "destroy";
158
+ state: 'load' | 'render' | 'playing' | 'destroy';
143
159
  error: boolean;
144
160
  }
145
161
  interface AdsgramController {
@@ -153,7 +169,7 @@ interface BalanceResponse {
153
169
  balance_gems: number;
154
170
  balance_coins: number;
155
171
  }
156
- export type AdType = "REWARD" | "INTERSTITIAL";
172
+ export type AdType = 'REWARD' | 'INTERSTITIAL';
157
173
  export interface RequestAdOptions {
158
174
  onStart?: () => void;
159
175
  }
@@ -163,7 +179,7 @@ interface RequestWageValueParams {
163
179
  }
164
180
  export interface StartupConfig {
165
181
  isFullscreen: boolean;
166
- overlayPosition: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
182
+ overlayPosition: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
167
183
  }
168
184
  export declare function startGameTimeTrack(): void;
169
185
  export interface CryptoSteamSDK {
@@ -192,8 +208,7 @@ export interface CryptoSteamSDK {
192
208
  width: number;
193
209
  height: number;
194
210
  }) => Promise<PurchaseConfirmResponse>;
195
- createInvoice: (title: string, description: string, to_user_id: number, amount: number) => Promise<InvoiceResponse>;
196
- getTasks: () => Promise<CryptoSteamSDKTask[]>;
211
+ createInvoice: (title: string, description: string, to_user_id: number, amount: number) => Promise<ServiceInvoiceCreatedResponse>;
197
212
  claimTask: (taskId: number) => Promise<void>;
198
213
  getValue: (key: string) => Promise<string>;
199
214
  setValue: (key: string, value: string) => Promise<void>;
@@ -216,6 +231,7 @@ export interface CryptoSteamSDK {
216
231
  gameReady: () => void;
217
232
  getAdsgramController: () => AdsgramController | null;
218
233
  getLaunchResponse: () => LaunchResponse | null;
234
+ isLaunchedFromPortal: () => boolean;
219
235
  setBottomBanner: () => void;
220
236
  clearBottomBanner: () => void;
221
237
  }
@@ -237,7 +253,7 @@ declare global {
237
253
  declare global {
238
254
  namespace NodeJS {
239
255
  interface ProcessEnv {
240
- NODE_ENV: "development" | "production";
256
+ NODE_ENV: 'development' | 'production';
241
257
  version: string;
242
258
  }
243
259
  }
@@ -247,3 +263,12 @@ export default CryptoSteamSDK;
247
263
  export { CryptoSteamSDK as PortalSDK };
248
264
  export declare const TelegramWebApp: import('@twa-dev/types').WebApp;
249
265
  export type { ShowPromiseResult };
266
+ export interface PortalEmuSDK {
267
+ isAdRunning: () => boolean;
268
+ getValueSync: (key: string) => string;
269
+ setValueSync: (key: string, value: string) => void;
270
+ removeValueSync: (key: string) => Promise<void>;
271
+ reloadAd: () => void;
272
+ getStartParam: () => string;
273
+ requestAd: () => Promise<void>;
274
+ }