diff --git a/apps/tablet/ios/App/App/App.entitlements b/apps/tablet/ios/App/App/App.entitlements index bb30651f7..f58e08f1b 100644 --- a/apps/tablet/ios/App/App/App.entitlements +++ b/apps/tablet/ios/App/App/App.entitlements @@ -4,6 +4,10 @@ aps-environment development + com.apple.developer.associated-domains + + applinks:app.tonkeeper.com + keychain-access-groups $(AppIdentifierPrefix)com.tonapps.tonkeeperpro diff --git a/apps/tablet/ios/App/App/AppRelease.entitlements b/apps/tablet/ios/App/App/AppRelease.entitlements index bb30651f7..f58e08f1b 100644 --- a/apps/tablet/ios/App/App/AppRelease.entitlements +++ b/apps/tablet/ios/App/App/AppRelease.entitlements @@ -4,6 +4,10 @@ aps-environment development + com.apple.developer.associated-domains + + applinks:app.tonkeeper.com + keychain-access-groups $(AppIdentifierPrefix)com.tonapps.tonkeeperpro diff --git a/apps/tablet/ios/App/App/GoogleService-Info.plist b/apps/tablet/ios/App/App/GoogleService-Info.plist index d03fe032c..f2ce963b7 100644 --- a/apps/tablet/ios/App/App/GoogleService-Info.plist +++ b/apps/tablet/ios/App/App/GoogleService-Info.plist @@ -3,17 +3,17 @@ API_KEY - AIzaSyBfuV_ymekwDZwlD6TkvKB5292oYd96dbM + AIzaSyCpV-zBAgyo22ua1DEZtER8PgUg862hK-c GCM_SENDER_ID - 488327313434 + 695609596302 PLIST_VERSION 1 BUNDLE_ID com.tonapps.tonkeeperpro PROJECT_ID - tonkeeper-web + tonkeeper-3b1dc STORAGE_BUCKET - tonkeeper-web.appspot.com + tonkeeper-3b1dc.appspot.com IS_ADS_ENABLED IS_ANALYTICS_ENABLED @@ -25,6 +25,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:488327313434:ios:85fdb7916fec750461f9a3 + 1:695609596302:ios:54607bbb498c208809acdf \ No newline at end of file diff --git a/apps/tablet/ios/App/App/Info.plist b/apps/tablet/ios/App/App/Info.plist index d7fb5866a..59c1fd3bf 100644 --- a/apps/tablet/ios/App/App/Info.plist +++ b/apps/tablet/ios/App/App/Info.plist @@ -81,5 +81,9 @@ dev-pro.tonconsole.com pro.tonconsole.com + NSUserActivityTypes + + NSUserActivityTypeBrowsingWeb + diff --git a/apps/tablet/ios/App/Podfile b/apps/tablet/ios/App/Podfile index 291234d5a..48d7cc6f6 100644 --- a/apps/tablet/ios/App/Podfile +++ b/apps/tablet/ios/App/Podfile @@ -15,6 +15,7 @@ def capacitor_pods pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera' pod 'CapacitorClipboard', :path => '../../node_modules/@capacitor/clipboard' pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device' + pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences' pod 'CapacitorPushNotifications', :path => '../../node_modules/@capacitor/push-notifications' pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen' diff --git a/apps/tablet/ios/App/Podfile.lock b/apps/tablet/ios/App/Podfile.lock index 9374e3041..e5e9504e6 100644 --- a/apps/tablet/ios/App/Podfile.lock +++ b/apps/tablet/ios/App/Podfile.lock @@ -10,6 +10,8 @@ PODS: - CapacitorCordova (6.2.0) - CapacitorDevice (6.0.2): - Capacitor + - CapacitorHaptics (6.0.2): + - Capacitor - CapacitorPreferences (6.0.3): - Capacitor - CapacitorPushNotifications (6.0.3): @@ -77,6 +79,7 @@ DEPENDENCIES: - "CapacitorClipboard (from `../../node_modules/@capacitor/clipboard`)" - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)" - "CapacitorDevice (from `../../node_modules/@capacitor/device`)" + - "CapacitorHaptics (from `../../node_modules/@capacitor/haptics`)" - "CapacitorPreferences (from `../../node_modules/@capacitor/preferences`)" - "CapacitorPushNotifications (from `../../node_modules/@capacitor/push-notifications`)" - "CapacitorSplashScreen (from `../../node_modules/@capacitor/splash-screen`)" @@ -106,6 +109,8 @@ EXTERNAL SOURCES: :path: "../../node_modules/@capacitor/ios" CapacitorDevice: :path: "../../node_modules/@capacitor/device" + CapacitorHaptics: + :path: "../../node_modules/@capacitor/haptics" CapacitorPreferences: :path: "../../node_modules/@capacitor/preferences" CapacitorPushNotifications: @@ -120,6 +125,7 @@ SPEC CHECKSUMS: CapacitorClipboard: 4443c3cdb7c77b1533dfe3ff0f9f7756aa8579df CapacitorCordova: b33e7f4aa4ed105dd43283acdd940964374a87d9 CapacitorDevice: 9efd479d71d1baad74b75df531184c3f730eaa48 + CapacitorHaptics: 4fc15afe22b123d093e6ace24d95e8e3b1f261b9 CapacitorPreferences: f3eadae2369ac3ab8e21743a2959145b0d1286a3 CapacitorPushNotifications: 9b178e010634d2f7bfca97b81478503463f86b6c CapacitorSplashScreen: fd8bf1bf9081d9aa8817b7cd37d740d1bdaf2fb2 @@ -132,6 +138,6 @@ SPEC CHECKSUMS: nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 -PODFILE CHECKSUM: f9d707744c97cd8f502d129ac50e6f2a2abd9aca +PODFILE CHECKSUM: 909da498bd070920c1661b81df41f840cf5ecf80 COCOAPODS: 1.16.2 diff --git a/apps/tablet/package.json b/apps/tablet/package.json index bcac63630..13e1b088b 100644 --- a/apps/tablet/package.json +++ b/apps/tablet/package.json @@ -1,6 +1,6 @@ { "name": "@tonkeeper/tablet", - "version": "3.0.0", + "version": "3.1.0", "license": "Apache-2.0", "description": "Your tablet wallet on The Open Network", "type": "module", @@ -26,6 +26,7 @@ "@capacitor/clipboard": "^6.0.1", "@capacitor/core": "latest", "@capacitor/device": "^6.0.2", + "@capacitor/haptics": "^6.0.2", "@capacitor/ios": "^6.1.2", "@capacitor/preferences": "^6.0.2", "@capacitor/push-notifications": "^6.0.3", diff --git a/apps/tablet/src/libs/appSdk.ts b/apps/tablet/src/libs/appSdk.ts index a25801da1..57af82a5c 100644 --- a/apps/tablet/src/libs/appSdk.ts +++ b/apps/tablet/src/libs/appSdk.ts @@ -1,17 +1,19 @@ import { BaseApp, + CookieService, IAppSdk, KeychainPassword, - TouchId, - CookieService, NotificationService + NotificationService, + TouchId } from "@tonkeeper/core/dist/AppSdk"; -import packageJson from '../../package.json'; -import { TabletStorage } from './storage'; -import { Clipboard } from '@capacitor/clipboard'; -import { getWindow } from './utils'; +import packageJson from "../../package.json"; +import { TabletStorage } from "./storage"; +import { Clipboard } from "@capacitor/clipboard"; +import { getWindow } from "./utils"; import { Biometric, SecureStorage } from "./plugins"; import { CapacitorCookies } from "@capacitor/core"; -import { Device } from '@capacitor/device'; +import { Device } from "@capacitor/device"; +import { Haptics, NotificationType } from "@capacitor/haptics"; export class KeychainTablet implements KeychainPassword { setPassword = async (publicKey: string, mnemonic: string) => { @@ -36,6 +38,8 @@ export class CookieTablet implements CookieService { } export class TouchIdTablet implements TouchId { + constructor(private alert: (text: string) => void) { } + canPrompt = async () => { try { const result = await Biometric.canPrompt(); @@ -47,7 +51,14 @@ export class TouchIdTablet implements TouchId { }; prompt = async (reason: (lang: string) => string) => { - return Biometric.prompt(reason('en')); + try { + return await Biometric.prompt(reason('en')); + } catch (e) { + if (e && typeof e === 'object' && 'message' in e && typeof e.message === 'string') { + this.alert(e.message); + } + throw e; + } }; } @@ -61,7 +72,7 @@ export class TabletAppSdk extends BaseApp implements IAppSdk { */ notifications: NotificationService | undefined = undefined; - touchId = new TouchIdTablet(); + touchId = new TouchIdTablet(this.topMessage.bind(this)); constructor() { super(new TabletStorage()); @@ -79,6 +90,10 @@ export class TabletAppSdk extends BaseApp implements IAppSdk { version = packageJson.version ?? 'Unknown'; targetEnv = TABLET_APPLICATION_ID; + + hapticNotification = (type: 'success' | 'error') => { + return Haptics.notification({type: type === 'success' ? NotificationType.Success : NotificationType.Error}); + }; } export const getTabletOS = async ()=> { diff --git a/apps/tablet/src/libs/tabletNotifications.ts b/apps/tablet/src/libs/tabletNotifications.ts index 15c878731..371ae8691 100644 --- a/apps/tablet/src/libs/tabletNotifications.ts +++ b/apps/tablet/src/libs/tabletNotifications.ts @@ -105,10 +105,10 @@ export class TabletNotifications implements NotificationService { await this.storage.set(AppKey.NOTIFICATIONS, records); } async subscribeTonConnect() { - throw new Error('Method not supported.'); + // TODO } async unsubscribeTonConnect() { - throw new Error('Method not supported.'); + // TODO } async subscribed(address: string) { const records = await this.getRecords(); diff --git a/packages/core/package.json b/packages/core/package.json index dbf4cddcc..32e0ac903 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -10,7 +10,7 @@ "sdk": "npm-run-all -p generate:*", "generate:sdkV2": "rm -fr src/tonApiV2 && docker build -f resource/Dockerfile.apiV2 . -t tonapisdkv2 && docker run --rm --user=$(id -u):$(id -g) -v \"$PWD\":/local tonapisdkv2", "generate:tronApi": "rm -fr src/tronApi && docker build -f resource/Dockerfile.tronApi . -t tronapisdk && docker run --rm --user=$(id -u):$(id -g) -v \"$PWD\":/local tronapisdk", - "generate:tonConsoleApi": "rm -r ./src/tonConsoleApi || true && npx openapi-typescript-codegen --input 'https://raw.githubusercontent.com/tonkeeper/tonconsole_backend/dev/swagger.yaml?token=GHSAT0AAAAAACKHFPNI4HJL4Q4RIAYDUQ3MZPAKM2A' --output ./src/tonConsoleApi", + "generate:tonConsoleApi": "rm -r ./src/tonConsoleApi || true && npx openapi-typescript-codegen --input 'https://raw.githubusercontent.com/tonkeeper/tonconsole_backend/refs/heads/main/swagger.yaml?token=GHSAT0AAAAAACJYQUOCGQXJBM2BFNOB6XREZ2ZZZCA' --output ./src/tonConsoleApi", "generate:swapsApi": "rm -r ./src/swapsApi || true && npx openapi-typescript-codegen --input 'https://raw.githubusercontent.com/tonkeeper/swaps-backend/master/swagger.yaml?token=GHSAT0AAAAAACJYQUODBKR67AB7WULZBFWEZSUUGFQ' --output ./src/swapsApi", "generate:batteryApi": "rm -fr ./src/batteryApi && docker build -f resource/Dockerfile.batteryApi . -t batteryapi && docker run --rm --user=$(id -u):$(id -g) -v \"$PWD\":/local batteryapi", "build:pkg": "yarn build" diff --git a/packages/core/src/Keys.ts b/packages/core/src/Keys.ts index 8333cbaf8..eb27d375b 100644 --- a/packages/core/src/Keys.ts +++ b/packages/core/src/Keys.ts @@ -40,6 +40,7 @@ export enum AppKey { USER_ID = 'user_id', PRO = 'pro_state', PRO_BACKUP = 'pro_backup', + PRO_AUTH_TOKEN = 'pro_auth_token', SIGNER_MESSAGE = 'signer_message', SWAP_CUSTOM_ASSETS = 'swap_custom_assets', diff --git a/packages/core/src/service/proService.ts b/packages/core/src/service/proService.ts index 7cb12be5e..4f5bdef18 100644 --- a/packages/core/src/service/proService.ts +++ b/packages/core/src/service/proService.ts @@ -17,7 +17,6 @@ import { FiatCurrencies as FiatCurrenciesGenerated, InvoiceStatus, InvoicesInvoice, - Lang, ProServiceDashboardCellAddress, ProServiceDashboardCellNumericCrypto, ProServiceDashboardCellNumericFiat, @@ -44,9 +43,12 @@ export const getBackupState = async (storage: IStorage) => { return backup ?? toEmptySubscription(); }; -export const getProState = async (storage: IStorage): Promise => { +export const getProState = async ( + authTokenService: ProAuthTokenService, + storage: IStorage +): Promise => { try { - return await loadProState(storage); + return await loadProState(authTokenService, storage); } catch (e) { console.error(e); return { @@ -81,7 +83,16 @@ export const walletVersionFromProServiceDTO = (value: string) => { } }; -export const loadProState = async (storage: IStorage): Promise => { +export type ProAuthTokenService = { + attachToken: () => Promise; + onTokenUpdated: (token: string | null) => Promise; +}; + +const loadProState = async ( + authService: ProAuthTokenService, + storage: IStorage +): Promise => { + await authService.attachToken(); const user = await ProServiceService.proServiceGetUserInfo(); let authorizedWallet: ProStateWallet | null = null; @@ -147,16 +158,8 @@ export const loadProState = async (storage: IStorage): Promise => { }; }; -export const checkAuthCookie = async () => { - try { - await ProServiceService.proServiceVerify(); - return true; - } catch (e) { - return false; - } -}; - export const authViaTonConnect = async ( + authService: ProAuthTokenService, api: APIConfig, wallet: TonWalletStandard, signProof: (bufferToSing: Buffer) => Promise @@ -187,13 +190,17 @@ export const authViaTonConnect = async ( if (!result.ok) { throw new Error('Unable to authorize'); } + + await authService.onTokenUpdated(result.auth_token); }; -export const logoutTonConsole = async () => { +export const logoutTonConsole = async (authService: ProAuthTokenService) => { const result = await ProServiceService.proServiceLogout(); if (!result.ok) { throw new Error('Unable to logout'); } + + await authService.onTokenUpdated(null); }; export const getProServiceTiers = async (lang?: Language | undefined, promoCode?: string) => { @@ -237,9 +244,9 @@ export const createRecipient = async ( return [recipient, asset]; }; -export const retryProService = async (storage: IStorage) => { +export const retryProService = async (authService: ProAuthTokenService, storage: IStorage) => { for (let i = 0; i < 10; i++) { - const state = await getProState(storage); + const state = await getProState(authService, storage); if (state.subscription.valid) { return; } @@ -260,12 +267,20 @@ export const waitProServiceInvoice = async (invoice: InvoicesInvoice) => { } while (updated.status === InvoiceStatus.PENDING); }; -export async function startProServiceTrial(botId: string, lang?: string) { +export async function startProServiceTrial( + authService: ProAuthTokenService, + botId: string, + lang?: string +) { const tgData = await loginViaTG(botId, lang); if (!tgData) { return false; } - return (await ProServiceService.proServiceTrial(tgData)).ok; + const result = await ProServiceService.proServiceTrial(tgData); + + await authService.onTokenUpdated(result.auth_token); + + return result.ok; } export async function getDashboardColumns(lang?: string): Promise { @@ -283,6 +298,11 @@ export async function getDashboardColumns(lang?: string): Promise implements Promise { }); } - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } + get [Symbol.toStringTag]() { + return "Cancellable Promise"; + } public then( onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, diff --git a/packages/core/src/tonConsoleApi/core/OpenAPI.ts b/packages/core/src/tonConsoleApi/core/OpenAPI.ts index 9a32dce6a..c4605467d 100644 --- a/packages/core/src/tonConsoleApi/core/OpenAPI.ts +++ b/packages/core/src/tonConsoleApi/core/OpenAPI.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/core/request.ts b/packages/core/src/tonConsoleApi/core/request.ts index 2201a0e69..f83d71199 100644 --- a/packages/core/src/tonConsoleApi/core/request.ts +++ b/packages/core/src/tonConsoleApi/core/request.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -164,7 +164,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio headers['Authorization'] = `Basic ${credentials}`; } - if (options.body) { + if (options.body !== undefined) { if (options.mediaType) { headers['Content-Type'] = options.mediaType; } else if (isBlob(options.body)) { diff --git a/packages/core/src/tonConsoleApi/index.ts b/packages/core/src/tonConsoleApi/index.ts index 0da33bcf1..2e7d7b1ae 100644 --- a/packages/core/src/tonConsoleApi/index.ts +++ b/packages/core/src/tonConsoleApi/index.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -7,13 +7,14 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise'; export { OpenAPI } from './core/OpenAPI'; export type { OpenAPIConfig } from './core/OpenAPI'; -export type { account } from './models/account'; +export type { Account, account } from './models/Account'; export type { appID } from './models/appID'; export type { AppTier } from './models/AppTier'; export type { Balance } from './models/Balance'; export { Chain } from './models/Chain'; export type { Charge } from './models/Charge'; export type { CnftCollection } from './models/CnftCollection'; +export { CryptoCurrency } from './models/CryptoCurrency'; export type { dashboardID } from './models/dashboardID'; export { Deposit } from './models/Deposit'; export { Error } from './models/Error'; @@ -24,12 +25,18 @@ export type { InvoicesApp } from './models/InvoicesApp'; export type { InvoicesAppWebhooks } from './models/InvoicesAppWebhooks'; export type { InvoicesInvoice } from './models/InvoicesInvoice'; export { InvoiceStatus } from './models/InvoiceStatus'; -export { Lang } from './models/Lang'; +export type { Lang } from './models/Lang'; +export type { LiteproxyKey } from './models/LiteproxyKey'; +export type { LiteproxyPrivateKey } from './models/LiteproxyPrivateKey'; +export type { LiteproxyTier } from './models/LiteproxyTier'; export type { MessagesApp } from './models/MessagesApp'; export type { MessagesPackage } from './models/MessagesPackage'; +export type { MintlessJetton } from './models/MintlessJetton'; export type { Ok } from './models/Ok'; +export type { Participant } from './models/Participant'; export type { Project } from './models/Project'; export type { projectID } from './models/projectID'; +export type { ProjectLiteproxyTierDetail } from './models/ProjectLiteproxyTierDetail'; export type { ProjectTonApiToken } from './models/ProjectTonApiToken'; export type { promoCode } from './models/promoCode'; export type { ProServiceAppTier } from './models/ProServiceAppTier'; @@ -43,9 +50,11 @@ export { ProServiceDashboardColumnType } from './models/ProServiceDashboardColum export type { ProServiceInvoiceWebhook } from './models/ProServiceInvoiceWebhook'; export type { ProServiceState } from './models/ProServiceState'; export type { ProServiceTier } from './models/ProServiceTier'; +export type { queryAddress } from './models/queryAddress'; export type { queryAddresses } from './models/queryAddresses'; export type { queryAppID } from './models/queryAppID'; export type { queryChain } from './models/queryChain'; +export type { queryCryptoCurrency } from './models/queryCryptoCurrency'; export type { queryCurrency } from './models/queryCurrency'; export type { queryDetailed } from './models/queryDetailed'; export type { queryEndDate } from './models/queryEndDate'; @@ -53,10 +62,12 @@ export type { queryEndDateRequired } from './models/queryEndDateRequired'; export type { queryFieldOrder } from './models/queryFieldOrder'; export type { queryFilterOverpayment } from './models/queryFilterOverpayment'; export type { queryFilterStatus } from './models/queryFilterStatus'; +export { queryGrafanaDashboard } from './models/queryGrafanaDashboard'; export type { queryID } from './models/queryID'; export type { queryInvoicesSearchID } from './models/queryInvoicesSearchID'; export type { queryLang } from './models/queryLang'; export type { queryLimit } from './models/queryLimit'; +export type { queryLiteproxyServer } from './models/queryLiteproxyServer'; export type { queryOffset } from './models/queryOffset'; export type { queryOnlyBetween } from './models/queryOnlyBetween'; export type { queryProjectID } from './models/queryProjectID'; @@ -68,7 +79,9 @@ export type { queryStatsIsRepetitive } from './models/queryStatsIsRepetitive'; export type { queryStatsType } from './models/queryStatsType'; export type { queryStep } from './models/queryStep'; export { queryTypeOrder } from './models/queryTypeOrder'; +export type { Referral } from './models/Referral'; export { ServiceName } from './models/ServiceName'; +export type { siteID } from './models/siteID'; export type { Stats } from './models/Stats'; export type { StatsDashboard } from './models/StatsDashboard'; export type { StatsEstimateQuery } from './models/StatsEstimateQuery'; @@ -79,9 +92,14 @@ export { StatsQueryType } from './models/StatsQueryType'; export type { TgAuth } from './models/TgAuth'; export type { Tier } from './models/Tier'; export type { tierID } from './models/tierID'; +export { TokenCapability } from './models/TokenCapability'; export type { tokenID } from './models/tokenID'; export type { TonConnectProof } from './models/TonConnectProof'; +export type { TonSite } from './models/TonSite'; +export type { TonSiteReduced } from './models/TonSiteReduced'; +export type { URL } from './models/URL'; export type { User } from './models/User'; +export type { userID } from './models/userID'; export type { webhookID } from './models/webhookID'; export { AccountService } from './services/AccountService'; @@ -90,9 +108,14 @@ export { AuthService } from './services/AuthService'; export { CnftServiceService } from './services/CnftServiceService'; export { InvoicesServiceService } from './services/InvoicesServiceService'; export { MessagesServiceService } from './services/MessagesServiceService'; +export { MinterJettonMediaService } from './services/MinterJettonMediaService'; +export { MintlessJettonServiceService } from './services/MintlessJettonServiceService'; export { ProjectService } from './services/ProjectService'; export { ProServiceService } from './services/ProServiceService'; export { StatsServiceService } from './services/StatsServiceService'; export { SystemService } from './services/SystemService'; +export { TestService } from './services/TestService'; export { TestnetServiceService } from './services/TestnetServiceService'; export { TonapiServiceService } from './services/TonapiServiceService'; +export { TonSitesServiceService } from './services/TonSitesServiceService'; +export { UtilsService } from './services/UtilsService'; diff --git a/packages/core/src/tonConsoleApi/models/account.ts b/packages/core/src/tonConsoleApi/models/Account.ts similarity index 55% rename from packages/core/src/tonConsoleApi/models/account.ts rename to packages/core/src/tonConsoleApi/models/Account.ts index 0ea84ee4d..a41f66c7c 100644 --- a/packages/core/src/tonConsoleApi/models/account.ts +++ b/packages/core/src/tonConsoleApi/models/Account.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -6,3 +6,4 @@ * Account */ export type account = string; +export type Account = string; diff --git a/packages/core/src/tonConsoleApi/models/AppTier.ts b/packages/core/src/tonConsoleApi/models/AppTier.ts index 267501062..9a462626a 100644 --- a/packages/core/src/tonConsoleApi/models/AppTier.ts +++ b/packages/core/src/tonConsoleApi/models/AppTier.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/Balance.ts b/packages/core/src/tonConsoleApi/models/Balance.ts index 507b38c18..3916c4f4f 100644 --- a/packages/core/src/tonConsoleApi/models/Balance.ts +++ b/packages/core/src/tonConsoleApi/models/Balance.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/Chain.ts b/packages/core/src/tonConsoleApi/models/Chain.ts index 1bae23f47..985c24994 100644 --- a/packages/core/src/tonConsoleApi/models/Chain.ts +++ b/packages/core/src/tonConsoleApi/models/Chain.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/Charge.ts b/packages/core/src/tonConsoleApi/models/Charge.ts index 8548ed6a0..aa1b52207 100644 --- a/packages/core/src/tonConsoleApi/models/Charge.ts +++ b/packages/core/src/tonConsoleApi/models/Charge.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/CnftCollection.ts b/packages/core/src/tonConsoleApi/models/CnftCollection.ts index 425d5a219..b991a9c5e 100644 --- a/packages/core/src/tonConsoleApi/models/CnftCollection.ts +++ b/packages/core/src/tonConsoleApi/models/CnftCollection.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -7,8 +7,8 @@ export type CnftCollection = { name: string; description?: string; image?: string; - nft_counts: number; - minted_counts: number; - paid_indexing_counts: number; + nft_count: number; + minted_count: number; + paid_indexing_count: number; }; diff --git a/packages/core/src/tonConsoleApi/models/CryptoCurrency.ts b/packages/core/src/tonConsoleApi/models/CryptoCurrency.ts new file mode 100644 index 000000000..bd54785db --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/CryptoCurrency.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export enum CryptoCurrency { + TON = 'TON', + USDT = 'USDT', +} diff --git a/packages/core/src/tonConsoleApi/models/Deposit.ts b/packages/core/src/tonConsoleApi/models/Deposit.ts index aeef66b8f..24878b552 100644 --- a/packages/core/src/tonConsoleApi/models/Deposit.ts +++ b/packages/core/src/tonConsoleApi/models/Deposit.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/Error.ts b/packages/core/src/tonConsoleApi/models/Error.ts index 95fd36f2e..fb6ea075d 100644 --- a/packages/core/src/tonConsoleApi/models/Error.ts +++ b/packages/core/src/tonConsoleApi/models/Error.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/FiatCurrencies.ts b/packages/core/src/tonConsoleApi/models/FiatCurrencies.ts index fe787edf1..a4fc2ec52 100644 --- a/packages/core/src/tonConsoleApi/models/FiatCurrencies.ts +++ b/packages/core/src/tonConsoleApi/models/FiatCurrencies.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/InvoiceFieldOrder.ts b/packages/core/src/tonConsoleApi/models/InvoiceFieldOrder.ts index 15257a53c..250984d17 100644 --- a/packages/core/src/tonConsoleApi/models/InvoiceFieldOrder.ts +++ b/packages/core/src/tonConsoleApi/models/InvoiceFieldOrder.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/InvoiceStatus.ts b/packages/core/src/tonConsoleApi/models/InvoiceStatus.ts index f0c1dcc75..f2aeeab46 100644 --- a/packages/core/src/tonConsoleApi/models/InvoiceStatus.ts +++ b/packages/core/src/tonConsoleApi/models/InvoiceStatus.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/InvoicesApp.ts b/packages/core/src/tonConsoleApi/models/InvoicesApp.ts index cba39dfbb..ebd1d05f2 100644 --- a/packages/core/src/tonConsoleApi/models/InvoicesApp.ts +++ b/packages/core/src/tonConsoleApi/models/InvoicesApp.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/InvoicesAppWebhooks.ts b/packages/core/src/tonConsoleApi/models/InvoicesAppWebhooks.ts index c0417c9d1..58688d747 100644 --- a/packages/core/src/tonConsoleApi/models/InvoicesAppWebhooks.ts +++ b/packages/core/src/tonConsoleApi/models/InvoicesAppWebhooks.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/InvoicesInvoice.ts b/packages/core/src/tonConsoleApi/models/InvoicesInvoice.ts index 98b90b9d5..298c550de 100644 --- a/packages/core/src/tonConsoleApi/models/InvoicesInvoice.ts +++ b/packages/core/src/tonConsoleApi/models/InvoicesInvoice.ts @@ -1,7 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { CryptoCurrency } from './CryptoCurrency'; import type { InvoiceStatus } from './InvoiceStatus'; export type InvoicesInvoice = { id: string; @@ -16,5 +17,6 @@ export type InvoicesInvoice = { date_change: number; date_expire: number; date_create: number; + currency: CryptoCurrency; }; diff --git a/packages/core/src/tonConsoleApi/models/Lang.ts b/packages/core/src/tonConsoleApi/models/Lang.ts index 90ebbab8d..a1003ddbc 100644 --- a/packages/core/src/tonConsoleApi/models/Lang.ts +++ b/packages/core/src/tonConsoleApi/models/Lang.ts @@ -1,8 +1,5 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export enum Lang { - EN = 'en', - RU = 'ru', -} +export type Lang = string; diff --git a/packages/core/src/tonConsoleApi/models/LiteproxyKey.ts b/packages/core/src/tonConsoleApi/models/LiteproxyKey.ts new file mode 100644 index 000000000..8b4543429 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/LiteproxyKey.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type LiteproxyKey = { + server: string; + rps: number; + public_key: string; + date_create: number; +}; + diff --git a/packages/core/src/tonConsoleApi/models/LiteproxyPrivateKey.ts b/packages/core/src/tonConsoleApi/models/LiteproxyPrivateKey.ts new file mode 100644 index 000000000..0ac18ad8c --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/LiteproxyPrivateKey.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type LiteproxyPrivateKey = { + app_id: number; + rps: number; + private_key: string; + date_create: number; +}; + diff --git a/packages/core/src/tonConsoleApi/models/LiteproxyTier.ts b/packages/core/src/tonConsoleApi/models/LiteproxyTier.ts new file mode 100644 index 000000000..c5fe21e8b --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/LiteproxyTier.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type LiteproxyTier = { + id: number; + name: string; + usd_price: number; + rps: number; +}; + diff --git a/packages/core/src/tonConsoleApi/models/MessagesApp.ts b/packages/core/src/tonConsoleApi/models/MessagesApp.ts index 8e750255e..c16f028a9 100644 --- a/packages/core/src/tonConsoleApi/models/MessagesApp.ts +++ b/packages/core/src/tonConsoleApi/models/MessagesApp.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/MessagesPackage.ts b/packages/core/src/tonConsoleApi/models/MessagesPackage.ts index e15c3926b..b151cf898 100644 --- a/packages/core/src/tonConsoleApi/models/MessagesPackage.ts +++ b/packages/core/src/tonConsoleApi/models/MessagesPackage.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/MintlessJetton.ts b/packages/core/src/tonConsoleApi/models/MintlessJetton.ts new file mode 100644 index 000000000..2af0b6c9e --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/MintlessJetton.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type MintlessJetton = { + account: string; +}; + diff --git a/packages/core/src/tonConsoleApi/models/Ok.ts b/packages/core/src/tonConsoleApi/models/Ok.ts index 0cfd8cdc8..da2b494d8 100644 --- a/packages/core/src/tonConsoleApi/models/Ok.ts +++ b/packages/core/src/tonConsoleApi/models/Ok.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/Participant.ts b/packages/core/src/tonConsoleApi/models/Participant.ts new file mode 100644 index 000000000..5eca35fec --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/Participant.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type Participant = { + id: number; + first_name?: string; + last_name?: string; + permissions: Array<'admin' | 'user'>; + avatar?: string; +}; + diff --git a/packages/core/src/tonConsoleApi/models/ProServiceAppTier.ts b/packages/core/src/tonConsoleApi/models/ProServiceAppTier.ts index 379f9f36d..9c082f9be 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceAppTier.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceAppTier.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellAddress.ts b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellAddress.ts index 5292bc2be..748de767d 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellAddress.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellAddress.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericCrypto.ts b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericCrypto.ts index 9820e08c7..b76c68fd4 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericCrypto.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericCrypto.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericFiat.ts b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericFiat.ts index 2c3135efc..cf20b58c9 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericFiat.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellNumericFiat.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellString.ts b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellString.ts index c0e17f94e..748d0fb8d 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellString.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceDashboardCellString.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumn.ts b/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumn.ts index b5f7d83ff..94318c32f 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumn.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumn.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnID.ts b/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnID.ts index 1047e9632..ce2c92e47 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnID.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnID.ts @@ -1,10 +1,11 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ export enum ProServiceDashboardColumnID { ADDRESS = 'address', TOTAL_BALANCE = 'total_balance', + JETTONS_BALANCE = 'jettons_balance', TOTAL_TON = 'total_ton', SEND_CURRENT_MONTH = 'send_current_month', SEND_LAST_MONTH = 'send_last_month', diff --git a/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnType.ts b/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnType.ts index c816dd382..3331cd5e1 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnType.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceDashboardColumnType.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceInvoiceWebhook.ts b/packages/core/src/tonConsoleApi/models/ProServiceInvoiceWebhook.ts index 53a93b7bf..a9c2d462d 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceInvoiceWebhook.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceInvoiceWebhook.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceState.ts b/packages/core/src/tonConsoleApi/models/ProServiceState.ts index 9d9d2e865..4509f55a0 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceState.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceState.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProServiceTier.ts b/packages/core/src/tonConsoleApi/models/ProServiceTier.ts index 1f4219b70..1144a4285 100644 --- a/packages/core/src/tonConsoleApi/models/ProServiceTier.ts +++ b/packages/core/src/tonConsoleApi/models/ProServiceTier.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/Project.ts b/packages/core/src/tonConsoleApi/models/Project.ts index 348c2e8b7..3771a76c7 100644 --- a/packages/core/src/tonConsoleApi/models/Project.ts +++ b/packages/core/src/tonConsoleApi/models/Project.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/ProjectLiteproxyTierDetail.ts b/packages/core/src/tonConsoleApi/models/ProjectLiteproxyTierDetail.ts new file mode 100644 index 000000000..4fb64db2d --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/ProjectLiteproxyTierDetail.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ProjectLiteproxyTierDetail = { + id: number; + name: string; + rps: number; + usd_price: number; + next_payment?: number; + date_create: number; +}; + diff --git a/packages/core/src/tonConsoleApi/models/ProjectTonApiToken.ts b/packages/core/src/tonConsoleApi/models/ProjectTonApiToken.ts index 72ae78e00..855d3c759 100644 --- a/packages/core/src/tonConsoleApi/models/ProjectTonApiToken.ts +++ b/packages/core/src/tonConsoleApi/models/ProjectTonApiToken.ts @@ -1,12 +1,15 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { TokenCapability } from './TokenCapability'; export type ProjectTonApiToken = { id: number; name: string; limit_rps?: number; token: string; + origins: Array; date_create: number; + capabilities?: Array; }; diff --git a/packages/core/src/tonConsoleApi/models/Referral.ts b/packages/core/src/tonConsoleApi/models/Referral.ts new file mode 100644 index 000000000..692d97be7 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/Referral.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type Referral = { + id: number; + first_name?: string; + last_name?: string; + profit: number; +}; + diff --git a/packages/core/src/tonConsoleApi/models/ServiceName.ts b/packages/core/src/tonConsoleApi/models/ServiceName.ts index 6d0c2f2d2..55e32afbf 100644 --- a/packages/core/src/tonConsoleApi/models/ServiceName.ts +++ b/packages/core/src/tonConsoleApi/models/ServiceName.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -9,4 +9,6 @@ export enum ServiceName { TESTNET = 'testnet', PRO = 'pro', CNFT = 'cnft', + LITEPROXY = 'liteproxy', + STREAMING = 'streaming', } diff --git a/packages/core/src/tonConsoleApi/models/Stats.ts b/packages/core/src/tonConsoleApi/models/Stats.ts index 680866cc2..becad9bde 100644 --- a/packages/core/src/tonConsoleApi/models/Stats.ts +++ b/packages/core/src/tonConsoleApi/models/Stats.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/StatsDashboard.ts b/packages/core/src/tonConsoleApi/models/StatsDashboard.ts index b7641d484..f00366057 100644 --- a/packages/core/src/tonConsoleApi/models/StatsDashboard.ts +++ b/packages/core/src/tonConsoleApi/models/StatsDashboard.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/StatsEstimateQuery.ts b/packages/core/src/tonConsoleApi/models/StatsEstimateQuery.ts index 0b780e252..ace047c4d 100644 --- a/packages/core/src/tonConsoleApi/models/StatsEstimateQuery.ts +++ b/packages/core/src/tonConsoleApi/models/StatsEstimateQuery.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/StatsQuery.ts b/packages/core/src/tonConsoleApi/models/StatsQuery.ts index 053b927b4..2d66a36aa 100644 --- a/packages/core/src/tonConsoleApi/models/StatsQuery.ts +++ b/packages/core/src/tonConsoleApi/models/StatsQuery.ts @@ -1,8 +1,9 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ export type StatsQuery = { + name?: string; addresses?: Array; only_between?: boolean; sql?: string; diff --git a/packages/core/src/tonConsoleApi/models/StatsQueryResult.ts b/packages/core/src/tonConsoleApi/models/StatsQueryResult.ts index 53f0639cf..0ca16102e 100644 --- a/packages/core/src/tonConsoleApi/models/StatsQueryResult.ts +++ b/packages/core/src/tonConsoleApi/models/StatsQueryResult.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -8,6 +8,7 @@ import type { StatsQueryStatus } from './StatsQueryStatus'; import type { StatsQueryType } from './StatsQueryType'; export type StatsQueryResult = { id: string; + name?: string; status: StatsQueryStatus; query?: StatsQuery; type?: StatsQueryType; diff --git a/packages/core/src/tonConsoleApi/models/StatsQueryStatus.ts b/packages/core/src/tonConsoleApi/models/StatsQueryStatus.ts index 9abebfbed..eb92f96fc 100644 --- a/packages/core/src/tonConsoleApi/models/StatsQueryStatus.ts +++ b/packages/core/src/tonConsoleApi/models/StatsQueryStatus.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/StatsQueryType.ts b/packages/core/src/tonConsoleApi/models/StatsQueryType.ts index 12570eafa..b6e378589 100644 --- a/packages/core/src/tonConsoleApi/models/StatsQueryType.ts +++ b/packages/core/src/tonConsoleApi/models/StatsQueryType.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/TgAuth.ts b/packages/core/src/tonConsoleApi/models/TgAuth.ts index d9c2f938e..457a05fd1 100644 --- a/packages/core/src/tonConsoleApi/models/TgAuth.ts +++ b/packages/core/src/tonConsoleApi/models/TgAuth.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -10,5 +10,6 @@ export type TgAuth = { username?: string; hash: string; auth_date: number; + referral_id?: string; }; diff --git a/packages/core/src/tonConsoleApi/models/Tier.ts b/packages/core/src/tonConsoleApi/models/Tier.ts index 5bb14b58f..9a2ebcf3d 100644 --- a/packages/core/src/tonConsoleApi/models/Tier.ts +++ b/packages/core/src/tonConsoleApi/models/Tier.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/TokenCapability.ts b/packages/core/src/tonConsoleApi/models/TokenCapability.ts new file mode 100644 index 000000000..3cc5653ad --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/TokenCapability.ts @@ -0,0 +1,7 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export enum TokenCapability { + WEBHOOKS = 'webhooks', +} diff --git a/packages/core/src/tonConsoleApi/models/TonConnectProof.ts b/packages/core/src/tonConsoleApi/models/TonConnectProof.ts index 003f79521..39ff4a158 100644 --- a/packages/core/src/tonConsoleApi/models/TonConnectProof.ts +++ b/packages/core/src/tonConsoleApi/models/TonConnectProof.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/TonSite.ts b/packages/core/src/tonConsoleApi/models/TonSite.ts new file mode 100644 index 000000000..8450fcbe6 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/TonSite.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type TonSite = { + id: string; + domain: string; + endpoints: Array; + adnl_address: string; + date_create: number; +}; + diff --git a/packages/core/src/tonConsoleApi/models/TonSiteReduced.ts b/packages/core/src/tonConsoleApi/models/TonSiteReduced.ts new file mode 100644 index 000000000..1a063e390 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/TonSiteReduced.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type TonSiteReduced = { + endpoints: Array; + adnl_address: string; + private_key: string; +}; + diff --git a/packages/core/src/tonConsoleApi/models/URL.ts b/packages/core/src/tonConsoleApi/models/URL.ts new file mode 100644 index 000000000..9141c6cbc --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/URL.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type URL = { + url: string; +}; + diff --git a/packages/core/src/tonConsoleApi/models/User.ts b/packages/core/src/tonConsoleApi/models/User.ts index 9f49a962a..e64975bf1 100644 --- a/packages/core/src/tonConsoleApi/models/User.ts +++ b/packages/core/src/tonConsoleApi/models/User.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -16,10 +16,9 @@ export type User = { last_name?: string; avatar?: string; is_ban: boolean; - /** - * Authorization token - */ - token?: string; + invited_by?: number; + referral_id: string; + referrals_count: number; date_create: number; }; diff --git a/packages/core/src/tonConsoleApi/models/appID.ts b/packages/core/src/tonConsoleApi/models/appID.ts index 7abdbf49a..4dcb192b0 100644 --- a/packages/core/src/tonConsoleApi/models/appID.ts +++ b/packages/core/src/tonConsoleApi/models/appID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/dashboardID.ts b/packages/core/src/tonConsoleApi/models/dashboardID.ts index 72a35178c..65d9785fe 100644 --- a/packages/core/src/tonConsoleApi/models/dashboardID.ts +++ b/packages/core/src/tonConsoleApi/models/dashboardID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/invoiceID.ts b/packages/core/src/tonConsoleApi/models/invoiceID.ts index 099e44697..adbdc41f6 100644 --- a/packages/core/src/tonConsoleApi/models/invoiceID.ts +++ b/packages/core/src/tonConsoleApi/models/invoiceID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/projectID.ts b/packages/core/src/tonConsoleApi/models/projectID.ts index 915bca116..cb611a26e 100644 --- a/packages/core/src/tonConsoleApi/models/projectID.ts +++ b/packages/core/src/tonConsoleApi/models/projectID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/promoCode.ts b/packages/core/src/tonConsoleApi/models/promoCode.ts index 1d6b53c22..6d9cb6173 100644 --- a/packages/core/src/tonConsoleApi/models/promoCode.ts +++ b/packages/core/src/tonConsoleApi/models/promoCode.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryAddress.ts b/packages/core/src/tonConsoleApi/models/queryAddress.ts new file mode 100644 index 000000000..a515e9905 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/queryAddress.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Address + */ +export type queryAddress = string; diff --git a/packages/core/src/tonConsoleApi/models/queryAddresses.ts b/packages/core/src/tonConsoleApi/models/queryAddresses.ts index f1f3fb05c..83ca4e82f 100644 --- a/packages/core/src/tonConsoleApi/models/queryAddresses.ts +++ b/packages/core/src/tonConsoleApi/models/queryAddresses.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryAppID.ts b/packages/core/src/tonConsoleApi/models/queryAppID.ts index 7b68dc940..134145175 100644 --- a/packages/core/src/tonConsoleApi/models/queryAppID.ts +++ b/packages/core/src/tonConsoleApi/models/queryAppID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryChain.ts b/packages/core/src/tonConsoleApi/models/queryChain.ts index 49e2ef9ea..bbcd66b5c 100644 --- a/packages/core/src/tonConsoleApi/models/queryChain.ts +++ b/packages/core/src/tonConsoleApi/models/queryChain.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryCryptoCurrency.ts b/packages/core/src/tonConsoleApi/models/queryCryptoCurrency.ts new file mode 100644 index 000000000..36e11eb59 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/queryCryptoCurrency.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CryptoCurrency } from './CryptoCurrency'; +/** + * Currency + */ +export type queryCryptoCurrency = CryptoCurrency; diff --git a/packages/core/src/tonConsoleApi/models/queryCurrency.ts b/packages/core/src/tonConsoleApi/models/queryCurrency.ts index a70f1b9f2..e0f7eb2f7 100644 --- a/packages/core/src/tonConsoleApi/models/queryCurrency.ts +++ b/packages/core/src/tonConsoleApi/models/queryCurrency.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryDetailed.ts b/packages/core/src/tonConsoleApi/models/queryDetailed.ts index efb9546e1..76b6e7218 100644 --- a/packages/core/src/tonConsoleApi/models/queryDetailed.ts +++ b/packages/core/src/tonConsoleApi/models/queryDetailed.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryEndDate.ts b/packages/core/src/tonConsoleApi/models/queryEndDate.ts index 5ce21f9e2..bdf95ac0e 100644 --- a/packages/core/src/tonConsoleApi/models/queryEndDate.ts +++ b/packages/core/src/tonConsoleApi/models/queryEndDate.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryEndDateRequired.ts b/packages/core/src/tonConsoleApi/models/queryEndDateRequired.ts index f8499f04c..47577eb00 100644 --- a/packages/core/src/tonConsoleApi/models/queryEndDateRequired.ts +++ b/packages/core/src/tonConsoleApi/models/queryEndDateRequired.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryFieldOrder.ts b/packages/core/src/tonConsoleApi/models/queryFieldOrder.ts index af98cd61b..f6099afca 100644 --- a/packages/core/src/tonConsoleApi/models/queryFieldOrder.ts +++ b/packages/core/src/tonConsoleApi/models/queryFieldOrder.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryFilterOverpayment.ts b/packages/core/src/tonConsoleApi/models/queryFilterOverpayment.ts index 46b763312..33f3ab3bd 100644 --- a/packages/core/src/tonConsoleApi/models/queryFilterOverpayment.ts +++ b/packages/core/src/tonConsoleApi/models/queryFilterOverpayment.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryFilterStatus.ts b/packages/core/src/tonConsoleApi/models/queryFilterStatus.ts index 382e60841..4678717e1 100644 --- a/packages/core/src/tonConsoleApi/models/queryFilterStatus.ts +++ b/packages/core/src/tonConsoleApi/models/queryFilterStatus.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryGrafanaDashboard.ts b/packages/core/src/tonConsoleApi/models/queryGrafanaDashboard.ts new file mode 100644 index 000000000..10ddeeb29 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/queryGrafanaDashboard.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export enum queryGrafanaDashboard { + TONAPI_TOKEN = 'tonapi_token', + TONAPI_WEBHOOK = 'tonapi_webhook', +} diff --git a/packages/core/src/tonConsoleApi/models/queryID.ts b/packages/core/src/tonConsoleApi/models/queryID.ts index 0e2ff499f..b283aecbd 100644 --- a/packages/core/src/tonConsoleApi/models/queryID.ts +++ b/packages/core/src/tonConsoleApi/models/queryID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryInvoicesSearchID.ts b/packages/core/src/tonConsoleApi/models/queryInvoicesSearchID.ts index cf4df382c..746df4b97 100644 --- a/packages/core/src/tonConsoleApi/models/queryInvoicesSearchID.ts +++ b/packages/core/src/tonConsoleApi/models/queryInvoicesSearchID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryLang.ts b/packages/core/src/tonConsoleApi/models/queryLang.ts index 61371d68d..0d65df225 100644 --- a/packages/core/src/tonConsoleApi/models/queryLang.ts +++ b/packages/core/src/tonConsoleApi/models/queryLang.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryLimit.ts b/packages/core/src/tonConsoleApi/models/queryLimit.ts index 7c47fa5d9..0a4d3c25d 100644 --- a/packages/core/src/tonConsoleApi/models/queryLimit.ts +++ b/packages/core/src/tonConsoleApi/models/queryLimit.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryLiteproxyServer.ts b/packages/core/src/tonConsoleApi/models/queryLiteproxyServer.ts new file mode 100644 index 000000000..faa61e801 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/queryLiteproxyServer.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Liteproxy server address + */ +export type queryLiteproxyServer = string; diff --git a/packages/core/src/tonConsoleApi/models/queryOffset.ts b/packages/core/src/tonConsoleApi/models/queryOffset.ts index 08045991a..969bf7c1f 100644 --- a/packages/core/src/tonConsoleApi/models/queryOffset.ts +++ b/packages/core/src/tonConsoleApi/models/queryOffset.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryOnlyBetween.ts b/packages/core/src/tonConsoleApi/models/queryOnlyBetween.ts index 1763aaa7d..16bd72719 100644 --- a/packages/core/src/tonConsoleApi/models/queryOnlyBetween.ts +++ b/packages/core/src/tonConsoleApi/models/queryOnlyBetween.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryProjectID.ts b/packages/core/src/tonConsoleApi/models/queryProjectID.ts index 2642ce8d4..08358a912 100644 --- a/packages/core/src/tonConsoleApi/models/queryProjectID.ts +++ b/packages/core/src/tonConsoleApi/models/queryProjectID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryPromoCode.ts b/packages/core/src/tonConsoleApi/models/queryPromoCode.ts index 402b2decd..7ca8d512c 100644 --- a/packages/core/src/tonConsoleApi/models/queryPromoCode.ts +++ b/packages/core/src/tonConsoleApi/models/queryPromoCode.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryRepeatInterval.ts b/packages/core/src/tonConsoleApi/models/queryRepeatInterval.ts index 5f558e0a9..eee27da0e 100644 --- a/packages/core/src/tonConsoleApi/models/queryRepeatInterval.ts +++ b/packages/core/src/tonConsoleApi/models/queryRepeatInterval.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryStartDate.ts b/packages/core/src/tonConsoleApi/models/queryStartDate.ts index 9411cc82f..adf217f60 100644 --- a/packages/core/src/tonConsoleApi/models/queryStartDate.ts +++ b/packages/core/src/tonConsoleApi/models/queryStartDate.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryStartDateRequired.ts b/packages/core/src/tonConsoleApi/models/queryStartDateRequired.ts index e82dbfd1d..ab51cd6dd 100644 --- a/packages/core/src/tonConsoleApi/models/queryStartDateRequired.ts +++ b/packages/core/src/tonConsoleApi/models/queryStartDateRequired.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryStatsIsRepetitive.ts b/packages/core/src/tonConsoleApi/models/queryStatsIsRepetitive.ts index 789b74fc7..621738863 100644 --- a/packages/core/src/tonConsoleApi/models/queryStatsIsRepetitive.ts +++ b/packages/core/src/tonConsoleApi/models/queryStatsIsRepetitive.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryStatsType.ts b/packages/core/src/tonConsoleApi/models/queryStatsType.ts index bde71937e..f4d0977d8 100644 --- a/packages/core/src/tonConsoleApi/models/queryStatsType.ts +++ b/packages/core/src/tonConsoleApi/models/queryStatsType.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryStep.ts b/packages/core/src/tonConsoleApi/models/queryStep.ts index 5eb7e7e7e..7fffc5435 100644 --- a/packages/core/src/tonConsoleApi/models/queryStep.ts +++ b/packages/core/src/tonConsoleApi/models/queryStep.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/queryTypeOrder.ts b/packages/core/src/tonConsoleApi/models/queryTypeOrder.ts index 56242da31..d239899db 100644 --- a/packages/core/src/tonConsoleApi/models/queryTypeOrder.ts +++ b/packages/core/src/tonConsoleApi/models/queryTypeOrder.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/siteID.ts b/packages/core/src/tonConsoleApi/models/siteID.ts new file mode 100644 index 000000000..d1072bbd8 --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/siteID.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * Site ID + */ +export type siteID = string; diff --git a/packages/core/src/tonConsoleApi/models/tierID.ts b/packages/core/src/tonConsoleApi/models/tierID.ts index 962de8b11..d3041b2c2 100644 --- a/packages/core/src/tonConsoleApi/models/tierID.ts +++ b/packages/core/src/tonConsoleApi/models/tierID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/tokenID.ts b/packages/core/src/tonConsoleApi/models/tokenID.ts index 69282b731..518947a99 100644 --- a/packages/core/src/tonConsoleApi/models/tokenID.ts +++ b/packages/core/src/tonConsoleApi/models/tokenID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/models/userID.ts b/packages/core/src/tonConsoleApi/models/userID.ts new file mode 100644 index 000000000..b1253dbbc --- /dev/null +++ b/packages/core/src/tonConsoleApi/models/userID.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * User ID + */ +export type userID = number; diff --git a/packages/core/src/tonConsoleApi/models/webhookID.ts b/packages/core/src/tonConsoleApi/models/webhookID.ts index 6dfc2dca1..e16d18b15 100644 --- a/packages/core/src/tonConsoleApi/models/webhookID.ts +++ b/packages/core/src/tonConsoleApi/models/webhookID.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/services/AccountService.ts b/packages/core/src/tonConsoleApi/services/AccountService.ts index f554454e6..6373892a3 100644 --- a/packages/core/src/tonConsoleApi/services/AccountService.ts +++ b/packages/core/src/tonConsoleApi/services/AccountService.ts @@ -1,12 +1,53 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Ok } from '../models/Ok'; +import type { Referral } from '../models/Referral'; +import type { User } from '../models/User'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class AccountService { + /** + * Get user info + * @returns any User info + * @throws ApiError + */ + public static getUserInfo(): CancelablePromise<{ + user: User; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/me', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Get user referrals + * @returns any User referrals + * @throws ApiError + */ + public static getUserReferrals(): CancelablePromise<{ + items: Array; + total_profit: number; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/user/referrals', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } /** * Logout from the system * After logout, the user's token is deleted diff --git a/packages/core/src/tonConsoleApi/services/AdminService.ts b/packages/core/src/tonConsoleApi/services/AdminService.ts index cc107b831..4c100bbcf 100644 --- a/packages/core/src/tonConsoleApi/services/AdminService.ts +++ b/packages/core/src/tonConsoleApi/services/AdminService.ts @@ -1,8 +1,9 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Ok } from '../models/Ok'; +import type { TonSiteReduced } from '../models/TonSiteReduced'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; @@ -92,4 +93,24 @@ export class AdminService { }, }); } + /** + * Private method: Get sites + * Private method + * @returns any Ton Sites reduced + * @throws ApiError + */ + public static adminGetTonSites(): CancelablePromise<{ + items: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/admin/sites', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } } diff --git a/packages/core/src/tonConsoleApi/services/AuthService.ts b/packages/core/src/tonConsoleApi/services/AuthService.ts index a05cb0388..d2fc87981 100644 --- a/packages/core/src/tonConsoleApi/services/AuthService.ts +++ b/packages/core/src/tonConsoleApi/services/AuthService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -12,6 +12,7 @@ export class AuthService { /** * Auth via telegram * The token is recorded in the database and in the user's cookies. If the user logs in under different browsers, then each authorization will have its own token. + * * @param requestBody Data that is expected from Telegram * @returns Ok Ok * @throws ApiError @@ -54,6 +55,7 @@ export class AuthService { /** * Auth via TON Connect * The token is recorded in the database and in the user's cookies. If the user logs in under different browsers, then each authorization will have its own token. + * * @param requestBody Data that is expected * @returns Ok Ok * @throws ApiError diff --git a/packages/core/src/tonConsoleApi/services/CnftServiceService.ts b/packages/core/src/tonConsoleApi/services/CnftServiceService.ts index 31b716dbb..7c6520f54 100644 --- a/packages/core/src/tonConsoleApi/services/CnftServiceService.ts +++ b/packages/core/src/tonConsoleApi/services/CnftServiceService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -8,11 +8,11 @@ import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class CnftServiceService { /** - * Compress NFT config + * Get cNFT config * @returns any Compress NFT config * @throws ApiError */ - public static cnftConfig(): CancelablePromise<{ + public static getCNftConfig(): CancelablePromise<{ price_per_nft: number; }> { return __request(OpenAPI, { @@ -27,16 +27,16 @@ export class CnftServiceService { }); } /** - * Get info about compress collection account + * Get info about cNFT collection account * @param account Account * @returns CnftCollection Compress NFT collection * @throws ApiError */ - public static getInfoCnftCollectionAccount( + public static getInfoCNftCollectionAccount( account: string, ): CancelablePromise { return __request(OpenAPI, { - method: 'POST', + method: 'GET', url: '/api/v1/services/cnft/collection/{account}', path: { 'account': account, @@ -50,13 +50,13 @@ export class CnftServiceService { }); } /** - * Indexing compress NFTs + * Indexing cNFTs * @param projectId Project ID * @param requestBody Data that is expected * @returns CnftCollection Compress NFT collection * @throws ApiError */ - public static indexingCnftCollection( + public static indexingCNftCollection( projectId: number, requestBody?: { account: string; @@ -80,19 +80,19 @@ export class CnftServiceService { }); } /** - * Get paid compress NFT collections + * Get paid cNFT collections * @param projectId Project ID - * @returns any Paid compress NFT collections + * @returns any cNFT collections * @throws ApiError */ - public static cnftPaidCollections( + public static getPaidCNftCollections( projectId: number, ): CancelablePromise<{ items: Array; }> { return __request(OpenAPI, { method: 'GET', - url: '/api/v1/services/cnft/paid/collections', + url: '/api/v1/services/cnft/paid', query: { 'project_id': projectId, }, diff --git a/packages/core/src/tonConsoleApi/services/InvoicesServiceService.ts b/packages/core/src/tonConsoleApi/services/InvoicesServiceService.ts index b02481fd6..95231a0b2 100644 --- a/packages/core/src/tonConsoleApi/services/InvoicesServiceService.ts +++ b/packages/core/src/tonConsoleApi/services/InvoicesServiceService.ts @@ -1,7 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { CryptoCurrency } from '../models/CryptoCurrency'; import type { InvoiceFieldOrder } from '../models/InvoiceFieldOrder'; import type { InvoicesApp } from '../models/InvoicesApp'; import type { InvoicesInvoice } from '../models/InvoicesInvoice'; @@ -279,6 +280,7 @@ export class InvoicesServiceService { */ life_time: number; description?: string; + currency?: CryptoCurrency; }, ): CancelablePromise { return __request(OpenAPI, { @@ -305,6 +307,7 @@ export class InvoicesServiceService { * @param typeOrder Type order * @param searchId Search ID * @param filterStatus Filter status + * @param currency Currency * @param overpayment Overpayment * @param start Start date * @param end End date @@ -319,6 +322,7 @@ export class InvoicesServiceService { typeOrder?: 'asc' | 'desc', searchId?: string, filterStatus?: Array, + currency?: CryptoCurrency, overpayment: boolean = false, start?: number, end?: number, @@ -337,6 +341,7 @@ export class InvoicesServiceService { 'type_order': typeOrder, 'search_id': searchId, 'filter_status': filterStatus, + 'currency': currency, 'overpayment': overpayment, 'start': start, 'end': end, @@ -439,11 +444,13 @@ export class InvoicesServiceService { /** * Get invoices stats * @param appId App ID + * @param currency Currency * @returns any Invoices stats * @throws ApiError */ public static getInvoicesStats( appId: number, + currency?: CryptoCurrency, ): CancelablePromise<{ stats: { total: number; @@ -451,6 +458,7 @@ export class InvoicesServiceService { success_in_week: number; invoices_in_progress: number; total_amount_pending: number; + currency: CryptoCurrency; }; }> { return __request(OpenAPI, { @@ -458,6 +466,7 @@ export class InvoicesServiceService { url: '/api/v1/services/invoices/stats', query: { 'app_id': appId, + 'currency': currency, }, errors: { 400: `Something went wrong on client side`, @@ -476,6 +485,7 @@ export class InvoicesServiceService { * @param overpayment Overpayment * @param start Start date * @param end End date + * @param currency Currency * @returns binary Invoices CSV * @throws ApiError */ @@ -488,6 +498,7 @@ export class InvoicesServiceService { overpayment: boolean = false, start?: number, end?: number, + currency?: CryptoCurrency, ): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -501,6 +512,7 @@ export class InvoicesServiceService { 'overpayment': overpayment, 'start': start, 'end': end, + 'currency': currency, }, errors: { 400: `Something went wrong on client side`, diff --git a/packages/core/src/tonConsoleApi/services/MessagesServiceService.ts b/packages/core/src/tonConsoleApi/services/MessagesServiceService.ts index 4734b8afc..a8fa67919 100644 --- a/packages/core/src/tonConsoleApi/services/MessagesServiceService.ts +++ b/packages/core/src/tonConsoleApi/services/MessagesServiceService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/services/MinterJettonMediaService.ts b/packages/core/src/tonConsoleApi/services/MinterJettonMediaService.ts new file mode 100644 index 000000000..86ef7e6eb --- /dev/null +++ b/packages/core/src/tonConsoleApi/services/MinterJettonMediaService.ts @@ -0,0 +1,84 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Account } from '../models/Account'; +import type { URL } from '../models/URL'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class MinterJettonMediaService { + /** + * Get jettons by owner + * @param address Address + * @returns any Accounts + * @throws ApiError + */ + public static getJettonsByOwner( + address: string, + ): CancelablePromise<{ + items: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/minter/owner/jettons', + query: { + 'address': address, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Upload jetton media + * @param formData Data that is expected + * @returns URL URL + * @throws ApiError + */ + public static uploadMinterJettonMedia( + formData?: { + media: Blob; + }, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v1/services/minter/jetton/media', + formData: formData, + mediaType: 'multipart/form-data', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Upload jetton meta + * @param requestBody Data that is expected + * @returns URL URL + * @throws ApiError + */ + public static uploadMinterJettonMeta( + requestBody?: { + meta: any; + }, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v1/services/minter/jetton/meta', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } +} diff --git a/packages/core/src/tonConsoleApi/services/MintlessJettonServiceService.ts b/packages/core/src/tonConsoleApi/services/MintlessJettonServiceService.ts new file mode 100644 index 000000000..1d5a44203 --- /dev/null +++ b/packages/core/src/tonConsoleApi/services/MintlessJettonServiceService.ts @@ -0,0 +1,78 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { MintlessJetton } from '../models/MintlessJetton'; +import type { Ok } from '../models/Ok'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class MintlessJettonServiceService { + /** + * Get mintless jetton config + * @returns any Mintless Jetton config + * @throws ApiError + */ + public static getMintlessJettonConfig(): CancelablePromise<{ + price_per_jetton: number; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/mintless/config', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Get paid mintless jettons + * @param projectId Project ID + * @returns any Mintless Jettons + * @throws ApiError + */ + public static getPaidMintlessJettons( + projectId: number, + ): CancelablePromise<{ + jettons: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/mintless/paid', + query: { + 'project_id': projectId, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Check if a mintless jetton exists + * @param account Account + * @returns Ok Ok + * @throws ApiError + */ + public static checkExistsMintlessJetton( + account: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/mintless/{account}', + path: { + 'account': account, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } +} diff --git a/packages/core/src/tonConsoleApi/services/ProServiceService.ts b/packages/core/src/tonConsoleApi/services/ProServiceService.ts index cdfa8d82c..409521519 100644 --- a/packages/core/src/tonConsoleApi/services/ProServiceService.ts +++ b/packages/core/src/tonConsoleApi/services/ProServiceService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -42,12 +42,15 @@ export class ProServiceService { /** * Auth via TonConnect * @param requestBody Data that is expected - * @returns Ok Ok + * @returns any Ok * @throws ApiError */ public static proServiceTonConnectAuth( requestBody?: TonConnectProof, - ): CancelablePromise { + ): CancelablePromise<{ + ok: boolean; + auth_token: string; + }> { return __request(OpenAPI, { method: 'POST', url: '/api/v1/services/pro/auth/proof/check', @@ -63,10 +66,13 @@ export class ProServiceService { } /** * Logout from the system - * @returns Ok Ok + * @returns any Ok * @throws ApiError */ - public static proServiceLogout(): CancelablePromise { + public static proServiceLogout(): CancelablePromise<{ + ok: boolean; + auth_token: string; + }> { return __request(OpenAPI, { method: 'POST', url: '/api/v1/services/pro/logout', @@ -207,6 +213,7 @@ export class ProServiceService { is_trial: boolean; used_trial: boolean; next_charge?: number; + auth_token: string; }> { return __request(OpenAPI, { method: 'GET', @@ -222,12 +229,15 @@ export class ProServiceService { /** * Activate pro trial period * @param requestBody Data that is expected from Telegram - * @returns Ok Ok + * @returns any Ok * @throws ApiError */ public static proServiceTrial( requestBody?: TgAuth, - ): CancelablePromise { + ): CancelablePromise<{ + ok: boolean; + auth_token: string; + }> { return __request(OpenAPI, { method: 'POST', url: '/api/v1/services/pro/trial', @@ -321,12 +331,15 @@ export class ProServiceService { /** * Update the state * @param requestBody Data that is expected - * @returns Ok Ok + * @returns any Ok * @throws ApiError */ public static proServiceUpdateState( requestBody?: ProServiceState, - ): CancelablePromise { + ): CancelablePromise<{ + ok: boolean; + auth_token: string; + }> { return __request(OpenAPI, { method: 'PATCH', url: '/api/v1/services/pro/state', @@ -342,10 +355,13 @@ export class ProServiceService { } /** * Delete the state - * @returns Ok Ok + * @returns any Ok * @throws ApiError */ - public static proServiceDeleteState(): CancelablePromise { + public static proServiceDeleteState(): CancelablePromise<{ + ok: boolean; + auth_token: string; + }> { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/services/pro/state', diff --git a/packages/core/src/tonConsoleApi/services/ProjectService.ts b/packages/core/src/tonConsoleApi/services/ProjectService.ts index 20635a485..dec9e7cd6 100644 --- a/packages/core/src/tonConsoleApi/services/ProjectService.ts +++ b/packages/core/src/tonConsoleApi/services/ProjectService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -6,6 +6,7 @@ import type { Balance } from '../models/Balance'; import type { Charge } from '../models/Charge'; import type { Deposit } from '../models/Deposit'; import type { Ok } from '../models/Ok'; +import type { Participant } from '../models/Participant'; import type { Project } from '../models/Project'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -225,4 +226,86 @@ export class ProjectService { }, }); } + /** + * Get project participants + * @param id Project ID + * @returns any List of project participants + * @throws ApiError + */ + public static getProjectParticipants( + id: number, + ): CancelablePromise<{ + items: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/project/{id}/participants', + path: { + 'id': id, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Add a participant to the project + * @param id Project ID + * @param requestBody Data that is expected + * @returns any Participant + * @throws ApiError + */ + public static addProjectParticipant( + id: number, + requestBody?: { + user_id: number; + }, + ): CancelablePromise<{ + participant: Participant; + }> { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v1/project/{id}/participants', + path: { + 'id': id, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Delete a participant from the project + * @param id Project ID + * @param userId User ID + * @returns Ok Ok + * @throws ApiError + */ + public static deleteProjectParticipant( + id: number, + userId: number, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v1/project/{id}/participant/{user_id}', + path: { + 'id': id, + 'user_id': userId, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } } diff --git a/packages/core/src/tonConsoleApi/services/StatsServiceService.ts b/packages/core/src/tonConsoleApi/services/StatsServiceService.ts index 3417141c7..aac06db8f 100644 --- a/packages/core/src/tonConsoleApi/services/StatsServiceService.ts +++ b/packages/core/src/tonConsoleApi/services/StatsServiceService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -46,6 +46,7 @@ export class StatsServiceService { chain?: Chain, requestBody?: { project_id: number; + name?: string; query?: string; gpt_message?: string; /** @@ -81,6 +82,7 @@ export class StatsServiceService { chain?: Chain, requestBody?: { project_id: number; + name?: string; query?: string; gpt_message?: string; /** @@ -140,10 +142,11 @@ export class StatsServiceService { id: string, projectId: number, requestBody?: { + name?: string; /** * cyclic execution of requests */ - repeat_interval: number; + repeat_interval?: number; }, ): CancelablePromise { return __request(OpenAPI, { @@ -172,6 +175,7 @@ export class StatsServiceService { * @param limit Limit * @param type * @param isRepetitive + * @param chain chain * @returns any History of queries * @throws ApiError */ @@ -181,6 +185,7 @@ export class StatsServiceService { limit: number = 100, type?: Array, isRepetitive?: boolean, + chain?: Chain, ): CancelablePromise<{ count: number; items: Array; @@ -194,6 +199,7 @@ export class StatsServiceService { 'limit': limit, 'type': type, 'is_repetitive': isRepetitive, + 'chain': chain, }, errors: { 400: `Something went wrong on client side`, diff --git a/packages/core/src/tonConsoleApi/services/SystemService.ts b/packages/core/src/tonConsoleApi/services/SystemService.ts index e784eca14..883727a44 100644 --- a/packages/core/src/tonConsoleApi/services/SystemService.ts +++ b/packages/core/src/tonConsoleApi/services/SystemService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/services/TestService.ts b/packages/core/src/tonConsoleApi/services/TestService.ts new file mode 100644 index 000000000..22ac31384 --- /dev/null +++ b/packages/core/src/tonConsoleApi/services/TestService.ts @@ -0,0 +1,27 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Ok } from '../models/Ok'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class TestService { + /** + * Delete test user + * @returns Ok Ok + * @throws ApiError + */ + public static testDeleteUser(): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v1/test/user', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } +} diff --git a/packages/core/src/tonConsoleApi/services/TestnetServiceService.ts b/packages/core/src/tonConsoleApi/services/TestnetServiceService.ts index feb3580bb..06996d565 100644 --- a/packages/core/src/tonConsoleApi/services/TestnetServiceService.ts +++ b/packages/core/src/tonConsoleApi/services/TestnetServiceService.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ diff --git a/packages/core/src/tonConsoleApi/services/TonSitesServiceService.ts b/packages/core/src/tonConsoleApi/services/TonSitesServiceService.ts new file mode 100644 index 000000000..a6ba2649d --- /dev/null +++ b/packages/core/src/tonConsoleApi/services/TonSitesServiceService.ts @@ -0,0 +1,127 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Ok } from '../models/Ok'; +import type { TonSite } from '../models/TonSite'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class TonSitesServiceService { + /** + * Create a Ton Site + * @param projectId Project ID + * @param requestBody Data that is expected + * @returns any Created Ton Site + * @throws ApiError + */ + public static createTonSite( + projectId: number, + requestBody?: { + domain: string; + }, + ): CancelablePromise<{ + site: TonSite; + }> { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v1/services/sites', + query: { + 'project_id': projectId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Get Ton Sites + * @param projectId Project ID + * @returns any Ton Sites + * @throws ApiError + */ + public static getTonSites( + projectId: number, + ): CancelablePromise<{ + items: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/sites', + query: { + 'project_id': projectId, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Delete the Ton Site + * @param projectId Project ID + * @param id Site ID + * @returns Ok Ok + * @throws ApiError + */ + public static deleteTonSite( + projectId: number, + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v1/services/sites/{id}', + path: { + 'id': id, + }, + query: { + 'project_id': projectId, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Add endpoints to the Ton Site + * @param projectId Project ID + * @param id Site ID + * @param requestBody Data that is expected + * @returns Ok Ok + * @throws ApiError + */ + public static updateTonSitesEndpoints( + projectId: number, + id: string, + requestBody?: Array, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v1/services/sites/{id}/endpoints', + path: { + 'id': id, + }, + query: { + 'project_id': projectId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } +} diff --git a/packages/core/src/tonConsoleApi/services/TonapiServiceService.ts b/packages/core/src/tonConsoleApi/services/TonapiServiceService.ts index 0997532b4..a5316fae0 100644 --- a/packages/core/src/tonConsoleApi/services/TonapiServiceService.ts +++ b/packages/core/src/tonConsoleApi/services/TonapiServiceService.ts @@ -1,11 +1,16 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { AppTier } from '../models/AppTier'; +import type { LiteproxyKey } from '../models/LiteproxyKey'; +import type { LiteproxyPrivateKey } from '../models/LiteproxyPrivateKey'; +import type { LiteproxyTier } from '../models/LiteproxyTier'; import type { Ok } from '../models/Ok'; +import type { ProjectLiteproxyTierDetail } from '../models/ProjectLiteproxyTierDetail'; import type { ProjectTonApiToken } from '../models/ProjectTonApiToken'; import type { Tier } from '../models/Tier'; +import type { TokenCapability } from '../models/TokenCapability'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; @@ -47,6 +52,8 @@ export class TonapiServiceService { requestBody?: { name: string; limit_rps?: number | null; + origins?: Array; + capabilities?: Array; }, ): CancelablePromise<{ token: ProjectTonApiToken; @@ -81,6 +88,8 @@ export class TonapiServiceService { requestBody?: { name: string; limit_rps?: number | null; + origins?: Array; + capabilities?: Array; }, ): CancelablePromise { return __request(OpenAPI, { @@ -248,6 +257,7 @@ export class TonapiServiceService { * @param end End date * @param step Step * @param detailed Show more detailed information + * @param dashboard * @returns any Project TonApi stats * @throws ApiError */ @@ -257,6 +267,7 @@ export class TonapiServiceService { end: number, step?: number, detailed?: boolean, + dashboard: 'tonapi_token' | 'tonapi_webhook' = 'tonapi_token', ): CancelablePromise<{ stats: any; }> { @@ -269,6 +280,7 @@ export class TonapiServiceService { 'end': end, 'step': step, 'detailed': detailed, + 'dashboard': dashboard, }, errors: { 400: `Something went wrong on client side`, @@ -278,4 +290,152 @@ export class TonapiServiceService { }, }); } + /** + * Get private keys for the liteproxy server + * @param server Liteproxy server address + * @returns any Private keys for the liteproxy server + * @throws ApiError + */ + public static adminGetLiteproxyPrivateKeys( + server: string, + ): CancelablePromise<{ + keys: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/tonapi/liteproxy/private_keys', + query: { + 'server': server, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Create liteproxy keys + * @param projectId Project ID + * @returns any Keys for connecting to liteproxy servers + * @throws ApiError + */ + public static createLiteproxyKeys( + projectId: number, + ): CancelablePromise<{ + keys: Array; + }> { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v1/services/tonapi/liteproxy/keys', + query: { + 'project_id': projectId, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Get keys for connecting to liteproxy servers + * @param projectId Project ID + * @returns any Keys for connecting to liteproxy servers + * @throws ApiError + */ + public static getLiteproxyKeys( + projectId: number, + ): CancelablePromise<{ + keys: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/tonapi/liteproxy/keys', + query: { + 'project_id': projectId, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Get list of active tiers for the liteproxy server + * @returns any Active tiers for the liteproxy server + * @throws ApiError + */ + public static getLiteproxyTiers(): CancelablePromise<{ + tiers: Array; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/tonapi/liteproxy/tiers', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Get the current tier for liteproxy server + * @param projectId Project ID + * @returns any Active the project tier for the liteproxy server + * @throws ApiError + */ + public static getProjectLiteproxyTier( + projectId: number, + ): CancelablePromise<{ + tier: ProjectLiteproxyTierDetail; + }> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/services/tonapi/liteproxy/tier', + query: { + 'project_id': projectId, + }, + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } + /** + * Switch to a new tier for liteproxy server + * @param projectId Project ID + * @param requestBody Data that is expected + * @returns Ok Ok + * @throws ApiError + */ + public static updateLiteproxyTier( + projectId: number, + requestBody?: { + tier_id: number; + }, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/api/v1/services/tonapi/liteproxy/tier', + query: { + 'project_id': projectId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Something went wrong on client side`, + 403: `Access token is missing or invalid`, + 404: `The specified resource was not found`, + 500: `Something went wrong on server side`, + }, + }); + } } diff --git a/packages/core/src/tonConsoleApi/services/UtilsService.ts b/packages/core/src/tonConsoleApi/services/UtilsService.ts new file mode 100644 index 000000000..4ae706b12 --- /dev/null +++ b/packages/core/src/tonConsoleApi/services/UtilsService.ts @@ -0,0 +1,30 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Ok } from '../models/Ok'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class UtilsService { + /** + * Send user feedback + * @param requestBody Data that is expected + * @returns Ok Ok + * @throws ApiError + */ + public static feedback( + requestBody?: Record, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v1/feedback', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Something went wrong on client side`, + 500: `Something went wrong on server side`, + }, + }); + } +} diff --git a/packages/core/src/tonkeeperApi/tonendpoint.ts b/packages/core/src/tonkeeperApi/tonendpoint.ts index ada40a702..9b8517201 100644 --- a/packages/core/src/tonkeeperApi/tonendpoint.ts +++ b/packages/core/src/tonkeeperApi/tonendpoint.ts @@ -80,7 +80,11 @@ export interface TonendpointConfig { battery_beta?: boolean; disable_battery?: boolean; disable_battery_send?: boolean; - isOnReview?: boolean; + + /** + * "secret" flag name to determine if the app is on ios review + */ + tablet_enable_additional_security?: boolean; } const defaultTonendpoint = 'https://api.tonkeeper.com'; // 'http://localhost:1339'; diff --git a/packages/uikit/src/components/Notification.tsx b/packages/uikit/src/components/Notification.tsx index 2f0cac163..b7dae793c 100644 --- a/packages/uikit/src/components/Notification.tsx +++ b/packages/uikit/src/components/Notification.tsx @@ -484,6 +484,7 @@ export const Notification: FC<{ children: (afterClose: (action?: () => void) => void) => React.ReactNode; className?: string; }> = ({ children, isOpen, hideButton, backShadow, handleClose, title, footer, className }) => { + const animationTime = 200; const [onCloseInterceptor, setOnCloseInterceptor] = useState(); const onClose = useCallback(() => { if (!onCloseInterceptor) { @@ -513,7 +514,7 @@ export const Notification: FC<{ const Child = useMemo(() => { return children((afterClose?: () => void) => { - setTimeout(() => afterClose && afterClose(), 300); + setTimeout(() => afterClose && afterClose(), animationTime); onClose(); }); }, [open, children, onClose]); @@ -531,8 +532,8 @@ export const Notification: FC<{ } }; handler(); - const timer = setTimeout(handler, 301); - const timer2 = setTimeout(handler, 400); + const timer = setTimeout(handler, animationTime + 1); + const timer2 = setTimeout(handler, animationTime + 100); return () => { clearTimeout(timer); @@ -589,12 +590,12 @@ export const Notification: FC<{ setIsEntering(true)} onExited={() => setIsEntering(false)} - onEntered={() => setTimeout(() => setEntered(true), 300)} + onEntered={() => setTimeout(() => setEntered(true), animationTime)} onExit={() => setEntered(false)} > diff --git a/packages/uikit/src/components/create/AddWallet.tsx b/packages/uikit/src/components/create/AddWallet.tsx index 5f7843dff..2ac401ae1 100644 --- a/packages/uikit/src/components/create/AddWallet.tsx +++ b/packages/uikit/src/components/create/AddWallet.tsx @@ -165,25 +165,27 @@ export const AddWalletContent: FC<{ onSelect: (path: AddWalletMethod) => void }> - {canAddMultisig && !hideMultisig && ( - onSelect('multisig')}> - - - - - - {t('add_wallet_new_multisig_title')}{' '} - - PRO - - - - {t('add_wallet_new_multisig_description')} - - - - - )} + + {canAddMultisig && !hideMultisig && ( + onSelect('multisig')}> + + + + + + {t('add_wallet_new_multisig_title')}{' '} + + PRO + + + + {t('add_wallet_new_multisig_description')} + + + + + )} + onSelect('testnet')}> diff --git a/packages/uikit/src/components/desktop/aside/AsideHeaderAccount.tsx b/packages/uikit/src/components/desktop/aside/AsideHeaderAccount.tsx index 1276f1339..8e4f62e0f 100644 --- a/packages/uikit/src/components/desktop/aside/AsideHeaderAccount.tsx +++ b/packages/uikit/src/components/desktop/aside/AsideHeaderAccount.tsx @@ -45,7 +45,7 @@ export const AsideHeaderAccount: FC<{ width: number }> = ({ width }) => { const account = useActiveAccount(); if (account.type !== 'mam') { - return null; + return ; } return ( diff --git a/packages/uikit/src/components/desktop/aside/AsideMenu.tsx b/packages/uikit/src/components/desktop/aside/AsideMenu.tsx index 20a5b157f..65af81330 100644 --- a/packages/uikit/src/components/desktop/aside/AsideMenu.tsx +++ b/packages/uikit/src/components/desktop/aside/AsideMenu.tsx @@ -11,7 +11,7 @@ import { useIsScrolled } from '../../../hooks/useIsScrolled'; import { scrollToTop } from '../../../libs/common'; import { AppProRoute, AppRoute } from '../../../libs/routes'; import { useMutateUserUIPreferences, useUserUIPreferences } from '../../../state/theme'; -import { useMutateActiveTonWallet } from '../../../state/wallet'; +import { useActiveWallet, useMutateActiveTonWallet } from '../../../state/wallet'; import { fallbackRenderOver } from '../../Error'; import { GlobeIcon, PlusIcon, SlidersIcon, StatsIcon } from '../../Icon'; import { ScrollContainer } from '../../ScrollContainer'; @@ -107,7 +107,7 @@ const DraggingBlock = styled.div<{ $isDragging: boolean }>` cursor: pointer !important; border-radius: ${p => p.theme.corner2xSmall}; overflow: hidden; - transition: background-color 0.15s ease-in-out; + transition: background-color 0.1s ease-in-out; ${p => p.$isDragging && css` @@ -125,26 +125,41 @@ const DraggingBlock = styled.div<{ $isDragging: boolean }>` `} `; +const shouldNavigateHome = (pathname: string) => { + const navigateHomeFromRoutes = [ + AppProRoute.dashboard, + AppRoute.settings, + AppRoute.browser, + AppRoute.accountSettings + ]; + return navigateHomeFromRoutes.some(path => pathname.startsWith(path)); +}; + export const AsideMenuDNDItem = forwardRef< HTMLDivElement, { item: Account | AccountsFolder; - mightBeHighlighted: boolean; isDragging: boolean; } & DraggableProvidedDraggableProps ->(({ item, mightBeHighlighted, isDragging, ...rest }, fRef) => { +>(({ item, isDragging, ...rest }, fRef) => { const { mutateAsync: setActiveWallet } = useMutateActiveTonWallet(); const navigate = useNavigate(); const location = useLocation(); + const activeRoute = useAsideActiveRoute(); + const [optimisticActiveRoute, setOptimisticActiveRoute] = useState(activeRoute); + useEffect(() => { + setOptimisticActiveRoute(activeRoute); + }, [activeRoute]); + + const activeWalletId = useActiveWallet().id; + const [optimisticWalletId, setOptimisticWalletId] = useState(activeWalletId); + useEffect(() => { + setOptimisticWalletId(activeWalletId); + }, [activeWalletId]); + const handleNavigateHome = useCallback(() => { - const navigateHomeFromRoutes = [ - AppProRoute.dashboard, - AppRoute.settings, - AppRoute.browser, - AppRoute.accountSettings - ]; - if (navigateHomeFromRoutes.some(path => location.pathname.startsWith(path))) { + if (shouldNavigateHome(location.pathname)) { return navigate(AppRoute.home); } else { scrollToTop(); @@ -152,8 +167,14 @@ export const AsideMenuDNDItem = forwardRef< }, [location.pathname]); const onClickWallet = useCallback( - (walletId: WalletId) => setActiveWallet(walletId).then(handleNavigateHome), - [setActiveWallet, handleNavigateHome] + (walletId: WalletId) => { + if (shouldNavigateHome(location.pathname)) { + setOptimisticActiveRoute(undefined); + } + setOptimisticWalletId(walletId); + setActiveWallet(walletId).then(handleNavigateHome); + }, + [setActiveWallet, handleNavigateHome, location.pathname] ); if (!item) { @@ -166,13 +187,15 @@ export const AsideMenuDNDItem = forwardRef< ) : ( )} @@ -181,8 +204,7 @@ export const AsideMenuDNDItem = forwardRef< const AccountDNDBlock: FC<{ items: (Account | AccountsFolder)[]; - activeRoute: string | undefined; -}> = ({ activeRoute, items }) => { +}> = ({ items }) => { const { handleDrop, itemsOptimistic } = useAccountsDNDDrop(items); return ( @@ -207,7 +229,6 @@ const AccountDNDBlock: FC<{ = ({ className }) => { {t('aside_discover')} - + diff --git a/packages/uikit/src/components/desktop/aside/AsideMenuAccount.tsx b/packages/uikit/src/components/desktop/aside/AsideMenuAccount.tsx index e924bfb0e..e355c9fd8 100644 --- a/packages/uikit/src/components/desktop/aside/AsideMenuAccount.tsx +++ b/packages/uikit/src/components/desktop/aside/AsideMenuAccount.tsx @@ -24,7 +24,7 @@ import { FC, forwardRef } from 'react'; import { useIsHovered } from '../../../hooks/useIsHovered'; import styled from 'styled-components'; import { IconButtonTransparentBackground } from '../../fields/IconButton'; -import { useAccountsState, useActiveAccount, useMutateActiveAccount } from '../../../state/wallet'; +import { useAccountsState, useMutateActiveAccount } from '../../../state/wallet'; import { useMultisigsOfAccountToDisplay, useMutateMultisigSelectedHostWallet @@ -126,9 +126,10 @@ const AsideMultisigItem = forwardRef< export const AsideMenuAccountMnemonic: FC<{ account: AccountTonMnemonic | AccountTonTestnet; - isSelected: boolean; + mightBeHighlighted: boolean; + selectedWalletId: WalletId; onClickWallet: (walletId: WalletId) => void; -}> = ({ account, isSelected, onClickWallet }) => { +}> = ({ account, mightBeHighlighted, selectedWalletId, onClickWallet }) => { const { isHovered, ref } = useIsHovered(); const shouldShowIcon = useAccountsState().length > 1; const network = getNetworkByAccount(account); @@ -139,7 +140,11 @@ export const AsideMenuAccountMnemonic: FC<{ return ( <> onClickWallet(sortedWallets[0].id)} ref={ref} > @@ -170,7 +175,7 @@ export const AsideMenuAccountMnemonic: FC<{ sortedWallets.map(wallet => ( onClickWallet(wallet.id)} > @@ -190,9 +195,10 @@ export const AsideMenuAccountMnemonic: FC<{ export const AsideMenuAccountLedger: FC<{ account: AccountLedger; - isSelected: boolean; + mightBeHighlighted: boolean; + selectedWalletId: WalletId; onClickWallet: (walletId: WalletId) => void; -}> = ({ account, isSelected, onClickWallet }) => { +}> = ({ account, mightBeHighlighted, selectedWalletId, onClickWallet }) => { const { isHovered, ref } = useIsHovered(); const shouldShowIcon = useAccountsState().length > 1; const network = getNetworkByAccount(account); @@ -202,7 +208,11 @@ export const AsideMenuAccountLedger: FC<{ return ( <> onClickWallet(sortedDerivations[0].activeTonWalletId)} ref={ref} > @@ -242,7 +252,8 @@ export const AsideMenuAccountLedger: FC<{ onClickWallet(derivation.activeTonWalletId)} > @@ -266,9 +277,10 @@ export const AsideMenuAccountLedger: FC<{ export const AsideMenuAccountTonOnly: FC<{ account: AccountTonOnly; - isSelected: boolean; + mightBeHighlighted: boolean; + selectedWalletId: WalletId; onClickWallet: (walletId: WalletId) => void; -}> = ({ account, isSelected, onClickWallet }) => { +}> = ({ account, mightBeHighlighted, selectedWalletId, onClickWallet }) => { const { isHovered, ref } = useIsHovered(); const shouldShowIcon = useAccountsState().length > 1; const network = getNetworkByAccount(account); @@ -278,7 +290,11 @@ export const AsideMenuAccountTonOnly: FC<{ return ( <> onClickWallet(account.activeTonWallet.id)} ref={ref} > @@ -308,7 +324,7 @@ export const AsideMenuAccountTonOnly: FC<{ sortedWallets.map(wallet => ( onClickWallet(wallet.id)} > @@ -328,14 +344,15 @@ export const AsideMenuAccountTonOnly: FC<{ export const AsideMenuAccountKeystone: FC<{ account: AccountKeystone; - isSelected: boolean; + mightBeHighlighted: boolean; + selectedWalletId: WalletId; onClickWallet: (walletId: WalletId) => void; -}> = ({ account, isSelected, onClickWallet }) => { +}> = ({ account, mightBeHighlighted, selectedWalletId, onClickWallet }) => { const shouldShowIcon = useAccountsState().length > 1; return ( onClickWallet(account.activeTonWallet.id)} > {shouldShowIcon && ( @@ -349,14 +366,15 @@ export const AsideMenuAccountKeystone: FC<{ export const AsideMenuAccountWatchOnly: FC<{ account: AccountTonWatchOnly; - isSelected: boolean; + mightBeHighlighted: boolean; + selectedWalletId: WalletId; onClickWallet: (walletId: WalletId) => void; -}> = ({ account, isSelected, onClickWallet }) => { +}> = ({ account, mightBeHighlighted, selectedWalletId, onClickWallet }) => { const shouldShowIcon = useAccountsState().length > 1; return ( onClickWallet(account.activeTonWallet.id)} > {shouldShowIcon && ( @@ -370,9 +388,10 @@ export const AsideMenuAccountWatchOnly: FC<{ export const AsideMenuAccountMAM: FC<{ account: AccountMAM; - isSelected: boolean; + mightBeHighlighted: boolean; + selectedWalletId: WalletId; onClickWallet: (walletId: WalletId) => void; -}> = ({ account, isSelected, onClickWallet }) => { +}> = ({ account, mightBeHighlighted, selectedWalletId, onClickWallet }) => { const { isHovered, ref } = useIsHovered(); const shouldShowIcon = useAccountsState().length > 1; @@ -381,20 +400,20 @@ export const AsideMenuAccountMAM: FC<{ const sortedDerivations = account.derivations.slice().sort(sortDerivationsByIndex); const location = useAsideActiveRoute(); - const activeAccount = useActiveAccount(); const navigate = useNavigate(); const { mutateAsync: setActiveAccount } = useMutateActiveAccount(); const onClickAccount = async () => { - await setActiveAccount(account.id); navigate(AppRoute.accountSettings); + await setActiveAccount(account.id); }; return ( <> w.id === selectedWalletId) } onClick={onClickAccount} ref={ref} @@ -422,7 +441,8 @@ export const AsideMenuAccountMAM: FC<{ onClickWallet(derivation.activeTonWalletId)} > @@ -457,25 +477,22 @@ export const AsideMenuAccount: FC<{ account: Account; mightBeHighlighted: boolean; onClickWallet: (walletId: WalletId) => void; + selectedWalletId: WalletId; }> = ({ account, ...rest }) => { - const activeAccount = useActiveAccount(); - const isSelected = rest.mightBeHighlighted && activeAccount.id === account.id; switch (account.type) { case 'mnemonic': case 'testnet': - return ; + return ; case 'ledger': - return ; + return ; case 'ton-only': - return ; + return ; case 'keystone': - return ; + return ; case 'watch-only': - return ( - - ); + return ; case 'mam': - return ; + return ; case 'ton-multisig': return ; default: diff --git a/packages/uikit/src/components/desktop/aside/AsideMenuFolder.tsx b/packages/uikit/src/components/desktop/aside/AsideMenuFolder.tsx index 3c607cae4..6b4a7f54d 100644 --- a/packages/uikit/src/components/desktop/aside/AsideMenuFolder.tsx +++ b/packages/uikit/src/components/desktop/aside/AsideMenuFolder.tsx @@ -35,7 +35,8 @@ export const AsideMenuFolder: FC<{ folder: AccountsFolder; onClickWallet: (walletId: WalletId) => void; accountMightBeHighlighted: boolean; -}> = ({ folder, onClickWallet, accountMightBeHighlighted }) => { + selectedWalletId: WalletId; +}> = ({ folder, onClickWallet, accountMightBeHighlighted, selectedWalletId }) => { const { isHovered, ref } = useIsHovered(); const { onOpen: onManageFolder } = useManageFolderNotification(); const { isOpen, onToggle } = useDisclosure(folder.lastIsOpened); @@ -71,6 +72,7 @@ export const AsideMenuFolder: FC<{ account={account} mightBeHighlighted={accountMightBeHighlighted} onClickWallet={onClickWallet} + selectedWalletId={selectedWalletId} /> ))} diff --git a/packages/uikit/src/components/desktop/aside/PreferencesAsideMenu.tsx b/packages/uikit/src/components/desktop/aside/PreferencesAsideMenu.tsx index dbca4a1e9..5551a61b1 100644 --- a/packages/uikit/src/components/desktop/aside/PreferencesAsideMenu.tsx +++ b/packages/uikit/src/components/desktop/aside/PreferencesAsideMenu.tsx @@ -30,6 +30,7 @@ import { availableThemes, useUserUIPreferences } from '../../../state/theme'; import { hexToRGBA } from '../../../libs/css'; import { useAccountsState, useActiveConfig } from '../../../state/wallet'; import { useShouldShowSecurityPage } from '../../../pages/settings/Security'; +import { HideOnReview } from '../../ios/HideOnReview'; const PreferencesAsideContainer = styled.div` width: fit-content; @@ -116,14 +117,16 @@ export const PreferencesAsideMenu = () => { )} )} - - {({ isActive }) => ( - - - {t('tonkeeper_pro')} - - )} - + + + {({ isActive }) => ( + + + {t('tonkeeper_pro')} + + )} + + {proState?.subscription.valid && ( {({ isActive }) => ( diff --git a/packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx b/packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx index ad1f091e1..e006f3911 100644 --- a/packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx +++ b/packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx @@ -96,6 +96,7 @@ export const WalletAsideMenu = () => { )} + {({ isActive }) => ( @@ -104,15 +105,15 @@ export const WalletAsideMenu = () => { )} - - {({ isActive }) => ( - - - {t('wallet_aside_domains')} - - )} - + + {({ isActive }) => ( + + + {t('wallet_aside_domains')} + + )} + {!isReadOnly && !isTestnet && ( {({ isActive }) => ( @@ -123,19 +124,19 @@ export const WalletAsideMenu = () => { )} )} + {isMultisig && !isTestnet && } + {showMultisigs && !isTestnet && ( + + {({ isActive }) => ( + + + {t('wallet_aside_multisig_wallets')} + + )} + + )} + {canUseBattery && } - {isMultisig && !isTestnet && } - {showMultisigs && !isTestnet && ( - - {({ isActive }) => ( - - - {t('wallet_aside_multisig_wallets')} - - )} - - )} - {canUseBattery && } {({ isActive }) => ( diff --git a/packages/uikit/src/components/desktop/header/DesktopDashboardHeader.tsx b/packages/uikit/src/components/desktop/header/DesktopDashboardHeader.tsx index 5a789ebbd..32f5f6bb3 100644 --- a/packages/uikit/src/components/desktop/header/DesktopDashboardHeader.tsx +++ b/packages/uikit/src/components/desktop/header/DesktopDashboardHeader.tsx @@ -17,6 +17,7 @@ import { useDashboardColumnsForm } from '../../../state/dashboard/useDashboardColumns'; import { Network } from '@tonkeeper/core/dist/entries/network'; +import { useAppPlatform } from '../../../hooks/appContext'; const ButtonsContainer = styled.div` display: flex; @@ -52,6 +53,8 @@ const DesktopDashboardHeaderPayload = () => { return arrayToCsvString([columnsRow, ...dataRows]); }, [data, columns, selectedColumns]); + const platform = useAppPlatform(); + return ( { /> - + {platform !== 'tablet' && ( + + )} diff --git a/packages/uikit/src/components/nft/NftAction.tsx b/packages/uikit/src/components/nft/NftAction.tsx index 99a34ce3d..973aca052 100644 --- a/packages/uikit/src/components/nft/NftAction.tsx +++ b/packages/uikit/src/components/nft/NftAction.tsx @@ -10,6 +10,7 @@ import { Body2 } from '../Text'; import { Button } from '../fields/Button'; import { LinkNft } from './LinkNft'; import { RenewNft } from './RenewNft'; +import { HideOnReview } from '../ios/HideOnReview'; const getMarketplaceUrl = (nftItem: NftItem) => { const { marketplace } = nftItem.metadata; @@ -29,18 +30,20 @@ const ViewOnMarketButton: FC<{ url: string }> = ({ url }) => { const sdk = useAppSdk(); return ( - + + + ); }; const ActionTransfer: FC<{ diff --git a/packages/uikit/src/components/settings/ProSettings.tsx b/packages/uikit/src/components/settings/ProSettings.tsx index 6114be1a8..4e4cf4039 100644 --- a/packages/uikit/src/components/settings/ProSettings.tsx +++ b/packages/uikit/src/components/settings/ProSettings.tsx @@ -49,6 +49,7 @@ import { Input } from '../fields/Input'; import { WalletEmoji } from '../shared/emoji/WalletEmoji'; import { ConfirmView } from '../transfer/ConfirmView'; import { useNotifyError } from '../../hooks/useNotification'; +import { HideOnReview } from '../ios/HideOnReview'; const Block = styled.div` display: flex; @@ -451,11 +452,11 @@ export const ProSettingsContent: FC<{ showLogo?: boolean; onSuccess?: () => void export const ProSettings: FC = () => { return ( - <> + - + ); }; diff --git a/packages/uikit/src/components/shared/AsideItem.tsx b/packages/uikit/src/components/shared/AsideItem.tsx index 6a6c442a9..a0b519681 100644 --- a/packages/uikit/src/components/shared/AsideItem.tsx +++ b/packages/uikit/src/components/shared/AsideItem.tsx @@ -5,7 +5,7 @@ import { hexToRGBA } from '../../libs/css'; * Need to be a 'div' instead of 'button' to provide correct dnd behavior */ export const AsideMenuItem = styled.div<{ isSelected: boolean }>` - background: ${p => (p.isSelected ? p.theme.backgroundContentTint : p.theme.backgroundContent)}; + background: ${p => (p.isSelected ? p.theme.backgroundContentTint : 'transparent')}; border-radius: ${p => p.theme.corner2xSmall}; box-sizing: border-box; cursor: pointer; @@ -24,9 +24,9 @@ export const AsideMenuItem = styled.div<{ isSelected: boolean }>` overflow: hidden; } - transition: background-color 0.15s ease-in-out; - - &:hover { - background: ${p => hexToRGBA(p.theme.backgroundContentTint, 0.56)}; + @media (pointer: fine) { + &:hover { + background: ${p => hexToRGBA(p.theme.backgroundContentTint, 0.56)}; + } } `; diff --git a/packages/uikit/src/desktop-pages/coin/DesktopCoinPage.tsx b/packages/uikit/src/desktop-pages/coin/DesktopCoinPage.tsx index aab32fefe..3e5d2761f 100644 --- a/packages/uikit/src/desktop-pages/coin/DesktopCoinPage.tsx +++ b/packages/uikit/src/desktop-pages/coin/DesktopCoinPage.tsx @@ -32,7 +32,6 @@ import { useTonendpointBuyMethods } from '../../state/tonendpoint'; import { useActiveTonNetwork, useIsActiveWalletWatchOnly } from '../../state/wallet'; import { OtherHistoryFilters } from '../../components/desktop/history/DesktopHistoryFilters'; import { Network } from '@tonkeeper/core/dist/entries/network'; -import { useIsOnIosReview } from '../../hooks/ios'; import { HideOnReview } from '../../components/ios/HideOnReview'; export const DesktopCoinPage = () => { diff --git a/packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx b/packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx index 4477bec0d..8b7ef4e94 100644 --- a/packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx +++ b/packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx @@ -14,7 +14,7 @@ import { KnownNFTDnsCollections } from '../../components/nft/NftView'; import { useMemo } from 'react'; import { SlidersIcon } from '../../components/Icon'; import { IconButtonTransparentBackground } from '../../components/fields/IconButton'; -import { useWalletFilteredNftList } from "../../state/nft"; +import { useWalletFilteredNftList } from '../../state/nft'; const gap = '10px'; const maxColumnsNumber = 4; @@ -71,6 +71,10 @@ const SettingsButtonStyled = styled(IconButtonTransparentBackground)` `; export const DesktopCollectables = () => { + return ; +}; + +export const DesktopCollectablesContent = () => { const { data: nfts } = useWalletFilteredNftList(); const { t } = useTranslation(); const navigate = useNavigate(); diff --git a/packages/uikit/src/desktop-pages/nft/DesktopDns.tsx b/packages/uikit/src/desktop-pages/nft/DesktopDns.tsx index 26e99b7b1..4d8931c1b 100644 --- a/packages/uikit/src/desktop-pages/nft/DesktopDns.tsx +++ b/packages/uikit/src/desktop-pages/nft/DesktopDns.tsx @@ -14,7 +14,8 @@ import { useMemo } from 'react'; import { KnownNFTDnsCollections } from '../../components/nft/NftView'; import { SlidersIcon } from '../../components/Icon'; import { IconButtonTransparentBackground } from '../../components/fields/IconButton'; -import { useWalletFilteredNftList } from "../../state/nft"; +import { useWalletFilteredNftList } from '../../state/nft'; +import { HideOnReview } from '../../components/ios/HideOnReview'; const gap = '10px'; const maxColumnsNumber = 4; @@ -71,6 +72,14 @@ const SettingsButtonStyled = styled(IconButtonTransparentBackground)` `; export const DesktopDns = () => { + return ( + + + + ); +}; + +export const DesktopDnsContent = () => { const { data: nfts } = useWalletFilteredNftList(); const { t } = useTranslation(); const navigate = useNavigate(); diff --git a/packages/uikit/src/desktop-pages/settings/DesktopAccountSettingsPage.tsx b/packages/uikit/src/desktop-pages/settings/DesktopAccountSettingsPage.tsx index 6342c793e..2b95abff7 100644 --- a/packages/uikit/src/desktop-pages/settings/DesktopAccountSettingsPage.tsx +++ b/packages/uikit/src/desktop-pages/settings/DesktopAccountSettingsPage.tsx @@ -13,7 +13,7 @@ import { useActiveAccount } from '../../state/wallet'; import { AccountMAM } from '@tonkeeper/core/dist/entries/account'; import { useRenameNotification } from '../../components/modals/RenameNotificationControlled'; import { useRecoveryNotification } from '../../components/modals/RecoveryNotificationControlled'; -import React, { FC } from 'react'; +import React, { FC, useEffect, useState } from 'react'; import { useDeleteAccountNotification } from '../../components/modals/DeleteAccountNotificationControlled'; import { useMAMIndexesSettingsNotification } from '../../components/modals/MAMIndexesSettingsNotification'; import { DesktopAccountHeader } from '../../components/desktop/header/DesktopAccountHeader'; @@ -50,9 +50,14 @@ const SettingsListText = styled.div` const DesktopAccountSettingsPage: FC = () => { const account = useActiveAccount(); + const [waiting, setWaiting] = useState(true); + + useEffect(() => { + setTimeout(() => setWaiting(false), 200); + }, []); if (account.type !== 'mam') { - return ; + return waiting ? <> : ; } return ; diff --git a/packages/uikit/src/hooks/appContext.ts b/packages/uikit/src/hooks/appContext.ts index 0e842897f..69dab1c08 100644 --- a/packages/uikit/src/hooks/appContext.ts +++ b/packages/uikit/src/hooks/appContext.ts @@ -64,3 +64,8 @@ export const useAppContext = () => { }; export const AppSelectionContext = React.createContext(null); + +export const useAppPlatform = () => { + const { tonendpoint } = useAppContext(); + return tonendpoint.params.platform; +}; diff --git a/packages/uikit/src/hooks/appSdk.ts b/packages/uikit/src/hooks/appSdk.ts index 33927c079..04b34e1f4 100644 --- a/packages/uikit/src/hooks/appSdk.ts +++ b/packages/uikit/src/hooks/appSdk.ts @@ -1,5 +1,5 @@ -import { IAppSdk, MockAppSdk } from "@tonkeeper/core/dist/AppSdk"; -import React, { useContext } from "react"; +import { IAppSdk, MockAppSdk } from '@tonkeeper/core/dist/AppSdk'; +import React, { useContext } from 'react'; export const AppSdkContext = React.createContext(new MockAppSdk()); diff --git a/packages/uikit/src/hooks/blockchain/multisig/useDeployMultisig.ts b/packages/uikit/src/hooks/blockchain/multisig/useDeployMultisig.ts index b44ed6433..0b0d4e20e 100644 --- a/packages/uikit/src/hooks/blockchain/multisig/useDeployMultisig.ts +++ b/packages/uikit/src/hooks/blockchain/multisig/useDeployMultisig.ts @@ -76,7 +76,10 @@ export const useDeployMultisig = ( const signer = await getSigner(sdk, accountAndWallet.account.id, checkTouchId, { walletId: accountAndWallet.wallet.id - }).catch(() => null); + }).catch(e => { + console.error(e); + return null; + }); if (signer === null) { throw new Error('Signer not found'); } diff --git a/packages/uikit/src/hooks/ios.ts b/packages/uikit/src/hooks/ios.ts index 94ad456a8..ee2b3142f 100644 --- a/packages/uikit/src/hooks/ios.ts +++ b/packages/uikit/src/hooks/ios.ts @@ -23,5 +23,5 @@ export function hideIosKeyboard() { export const useIsOnIosReview = () => { const { mainnetConfig } = useAppContext(); - return Boolean(mainnetConfig.isOnReview); + return Boolean(mainnetConfig.tablet_enable_additional_security); }; diff --git a/packages/uikit/src/hooks/useEventListener.ts b/packages/uikit/src/hooks/useEventListener.ts index e3d42d02a..5a002ab0a 100644 --- a/packages/uikit/src/hooks/useEventListener.ts +++ b/packages/uikit/src/hooks/useEventListener.ts @@ -1,5 +1,7 @@ import { RefObject, useEffect, useLayoutEffect, useRef } from 'react'; +function useEventListener(): void; + function useEventListener( eventName: K, handler: (event: MediaQueryListEventMap[K]) => void, @@ -37,8 +39,8 @@ function useEventListener< KM extends keyof MediaQueryListEventMap, T extends HTMLElement | MediaQueryList | void = void >( - eventName: KW | KH | KM, - handler: ( + eventName?: KW | KH | KM, + handler?: ( event: WindowEventMap[KW] | HTMLElementEventMap[KH] | MediaQueryListEventMap[KM] | Event ) => void, element?: RefObject, @@ -51,11 +53,14 @@ function useEventListener< }, [handler]); useEffect(() => { + if (!eventName) { + return; + } const targetElement: T | Window = element?.current ?? window; if (!(targetElement && targetElement.addEventListener)) return; - const listener: typeof handler = event => savedHandler.current(event); + const listener: typeof handler = event => savedHandler.current!(event); targetElement.addEventListener(eventName, listener, options); diff --git a/packages/uikit/src/hooks/useIsHovered.ts b/packages/uikit/src/hooks/useIsHovered.ts index 24450a094..569d07313 100644 --- a/packages/uikit/src/hooks/useIsHovered.ts +++ b/packages/uikit/src/hooks/useIsHovered.ts @@ -1,5 +1,8 @@ import { useCallback, useRef, useState } from 'react'; import { useEventListener } from './useEventListener'; +import { isTouchDevice } from '../libs/web'; + +const isTouchScreen = isTouchDevice(); export const useIsHovered = () => { const [isHovered, setIsHovered] = useState(false); @@ -8,8 +11,16 @@ export const useIsHovered = () => { const handleMouseEnter = useCallback(() => setIsHovered(true), []); const handleMouseLeave = useCallback(() => setIsHovered(false), []); - useEventListener('mouseenter', handleMouseEnter, ref); - useEventListener('mouseleave', handleMouseLeave, ref); + useEventListener( + ...((isTouchScreen ? [] : ['mouseenter', handleMouseEnter, ref]) as Parameters< + typeof useEventListener + >) + ); + useEventListener( + ...((isTouchScreen ? [] : ['mouseleave', handleMouseLeave, ref]) as Parameters< + typeof useEventListener + >) + ); return { isHovered, ref }; }; diff --git a/packages/uikit/src/libs/css.ts b/packages/uikit/src/libs/css.ts index b205e88bb..7c44a7561 100644 --- a/packages/uikit/src/libs/css.ts +++ b/packages/uikit/src/libs/css.ts @@ -9,3 +9,9 @@ export function hexToRGBA(hex: string, alpha?: string | number): string { return 'rgb(' + r + ', ' + g + ', ' + b + ')'; } } + +export const revertHoverForTouchscreens = `@media (pointer: coarse) { + a:hover { + all: revert-layer; + } + }`; diff --git a/packages/uikit/src/libs/web.ts b/packages/uikit/src/libs/web.ts index c77459d8d..28644bf36 100644 --- a/packages/uikit/src/libs/web.ts +++ b/packages/uikit/src/libs/web.ts @@ -1,3 +1,5 @@ +import { getWindow } from '@tonkeeper/core/dist/service/telegramOauth'; + export function getUserOS() { if (navigator.userAgent.includes('Win')) { return 'windows'; @@ -84,3 +86,7 @@ export function listenBroadcastMessages(channel: string, onMessage: (message: st console.error(e); } } + +export function isTouchDevice() { + return getWindow()?.matchMedia('(pointer: coarse)').matches; +} diff --git a/packages/uikit/src/pages/import/Subscribe.tsx b/packages/uikit/src/pages/import/Subscribe.tsx index 6ea793e5d..ad09ba4e3 100644 --- a/packages/uikit/src/pages/import/Subscribe.tsx +++ b/packages/uikit/src/pages/import/Subscribe.tsx @@ -7,6 +7,7 @@ import { useTranslation } from '../../hooks/translation'; import { signTonConnectMnemonicOver } from '../../state/mnemonic'; import { useSubscribeMutation } from '../../state/subscribe'; import { MnemonicType } from '@tonkeeper/core/dist/entries/password'; +import { useIsFullWidthMode } from '../../hooks/useIsFullWidthMode'; export const Subscribe: FC<{ wallet: TonContract; @@ -20,9 +21,12 @@ export const Subscribe: FC<{ signTonConnectMnemonicOver(mnemonic, mnemonicType), onDone ); + + const isFullWidthMode = useIsFullWidthMode(); + return ( } title={t('reminder_notifications_title')} description={t('reminder_notifications_caption')} diff --git a/packages/uikit/src/pages/settings/Battery.tsx b/packages/uikit/src/pages/settings/Battery.tsx index 9501c58ad..66c406d5b 100644 --- a/packages/uikit/src/pages/settings/Battery.tsx +++ b/packages/uikit/src/pages/settings/Battery.tsx @@ -25,10 +25,10 @@ import { ErrorBoundary } from 'react-error-boundary'; import { fallbackRenderOver } from '../../components/Error'; import { IconButton, IconButtonTransparentBackground } from '../../components/fields/IconButton'; import { useAppSdk } from '../../hooks/appSdk'; -import { useAppContext } from '../../hooks/appContext'; import { BatteryRechargeNotification } from '../../components/settings/battery/BatteryRechargeNotification'; import { TON_ASSET } from '@tonkeeper/core/dist/entries/crypto/asset/constants'; -import { AppRoute } from "../../libs/routes"; +import { AppRoute } from '../../libs/routes'; +import { HideOnReview } from '../../components/ios/HideOnReview'; export const BatteryPage = () => { const account = useActiveAccount(); @@ -40,7 +40,9 @@ export const BatteryPage = () => { return ( - + + + ); }; diff --git a/packages/uikit/src/pages/settings/Dev.tsx b/packages/uikit/src/pages/settings/Dev.tsx index dddb9acb8..e6947c99a 100644 --- a/packages/uikit/src/pages/settings/Dev.tsx +++ b/packages/uikit/src/pages/settings/Dev.tsx @@ -5,6 +5,7 @@ import { SettingsItem, SettingsList } from '../../components/settings/SettingsLi import { useAppSdk } from '../../hooks/appSdk'; import { CloseIcon, SpinnerIcon } from '../../components/Icon'; import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { AppKey } from '@tonkeeper/core/dist/Keys'; const CookieSettings = () => { const sdk = useAppSdk(); @@ -12,6 +13,7 @@ const CookieSettings = () => { const { mutate, isLoading } = useMutation(async () => { await sdk.cookie?.cleanUp(); + await sdk.storage.set(AppKey.PRO_AUTH_TOKEN, null); await client.invalidateQueries(); }); diff --git a/packages/uikit/src/pages/settings/Security.tsx b/packages/uikit/src/pages/settings/Security.tsx index 0d122b06e..52798633d 100644 --- a/packages/uikit/src/pages/settings/Security.tsx +++ b/packages/uikit/src/pages/settings/Security.tsx @@ -21,6 +21,7 @@ import { useTouchIdEnabled } from '../../state/password'; import { useIsActiveWalletWatchOnly, useIsPasswordSet } from '../../state/wallet'; +import styled from 'styled-components'; const LockSwitch = () => { const { t } = useTranslation(); @@ -46,6 +47,10 @@ const LockSwitch = () => { } }; +const Label1Capitalised = styled(Label1)` + text-transform: capitalize; +`; + const TouchIdSwitch = () => { const { t } = useTranslation(); const { data: canPrompt } = useCanPromptTouchId(); @@ -61,7 +66,7 @@ const TouchIdSwitch = () => { - {t('biometry_ios_fingerprint')} + {t('biometry_default')} diff --git a/packages/uikit/src/state/password.ts b/packages/uikit/src/state/password.ts index e51f0b112..54a997e89 100644 --- a/packages/uikit/src/state/password.ts +++ b/packages/uikit/src/state/password.ts @@ -37,20 +37,26 @@ export const useTouchIdEnabled = () => { }; const isTouchIdEnabled = async (sdk: IAppSdk): Promise => { - const canPrompt = await sdk.touchId?.canPrompt(); - if (!canPrompt) { - return false; - } - const touchId = await sdk.storage.get(AppKey.TOUCH_ID); - return touchId ?? true; + if (touchId !== null) { + return touchId; + } + + const canPrompt = Boolean(await sdk.touchId?.canPrompt()); + await sdk.storage.set(AppKey.TOUCH_ID, canPrompt); + return Boolean(canPrompt); }; export const useMutateTouchId = () => { const sdk = useAppSdk(); const client = useQueryClient(); + const { t } = useTranslation(); + return useMutation(async value => { + if (!value) { + await sdk.touchId?.prompt(lng => t('touch_id_unlock_wallet', { lng })); + } await sdk.storage.set(AppKey.TOUCH_ID, value); await client.invalidateQueries([QueryKey.touchId]); }); diff --git a/packages/uikit/src/state/pro.ts b/packages/uikit/src/state/pro.ts index ed7f2d150..1b248ca75 100644 --- a/packages/uikit/src/state/pro.ts +++ b/packages/uikit/src/state/pro.ts @@ -11,15 +11,16 @@ import { getProServiceTiers, getProState, logoutTonConsole, + ProAuthTokenService, retryProService, setBackupState, startProServiceTrial, waitProServiceInvoice } from '@tonkeeper/core/dist/service/proService'; -import { InvoicesInvoice } from '@tonkeeper/core/dist/tonConsoleApi'; +import { InvoicesInvoice, OpenAPI } from '@tonkeeper/core/dist/tonConsoleApi'; import { ProServiceTier } from '@tonkeeper/core/src/tonConsoleApi/models/ProServiceTier'; import { useMemo } from 'react'; -import { useAppContext } from '../hooks/appContext'; +import { useAppContext, useAppPlatform } from '../hooks/appContext'; import { useAppSdk } from '../hooks/appSdk'; import { useTranslation } from '../hooks/translation'; import { useAccountsStorage } from '../hooks/useStorage'; @@ -33,6 +34,7 @@ import { isAccountTonWalletStandard } from '@tonkeeper/core/dist/entries/account'; import { useActiveApi } from './wallet'; +import { AppKey } from '@tonkeeper/core/dist/Keys'; export const useProBackupState = () => { const sdk = useAppSdk(); @@ -43,11 +45,42 @@ export const useProBackupState = () => { ); }; +export const useProAuthTokenService = (): ProAuthTokenService => { + const appPlatform = useAppPlatform(); + const storage = useAppSdk().storage; + + return useMemo(() => { + if (appPlatform === 'tablet') { + return { + async attachToken() { + const token = await storage.get(AppKey.PRO_AUTH_TOKEN); + OpenAPI.TOKEN = token ?? undefined; + }, + async onTokenUpdated(token: string | null) { + await storage.set(AppKey.PRO_AUTH_TOKEN, token); + return this.attachToken(); + } + }; + } else { + return { + async attachToken() { + /* */ + }, + async onTokenUpdated() { + /* */ + } + }; + } + }, [appPlatform]); +}; + export const useProState = () => { const sdk = useAppSdk(); const client = useQueryClient(); + const authService = useProAuthTokenService(); + return useQuery([QueryKey.pro], async () => { - const state = await getProState(sdk.storage); + const state = await getProState(authService, sdk.storage); await setBackupState(sdk.storage, state.subscription); await client.invalidateQueries([QueryKey.proBackup]); return state; @@ -61,6 +94,7 @@ export const useSelectWalletForProMutation = () => { const { t } = useTranslation(); const { mutateAsync: checkTouchId } = useCheckTouchId(); const accountsStorage = useAccountsStorage(); + const authService = useProAuthTokenService(); return useMutation(async walletId => { const accounts = (await accountsStorage.getAccounts()).filter(isAccountTonWalletStandard); @@ -81,6 +115,7 @@ export const useSelectWalletForProMutation = () => { } await authViaTonConnect( + authService, api, wallet, signTonConnectOver({ sdk, accountId: account.id, wallet, t, checkTouchId }) @@ -92,8 +127,10 @@ export const useSelectWalletForProMutation = () => { export const useProLogout = () => { const client = useQueryClient(); + const authService = useProAuthTokenService(); + return useMutation(async () => { - await logoutTonConsole(); + await logoutTonConsole(authService); await client.invalidateQueries([QueryKey.pro]); }); }; @@ -160,9 +197,11 @@ export const useCreateInvoiceMutation = () => { export const useWaitInvoiceMutation = () => { const client = useQueryClient(); const sdk = useAppSdk(); + const authService = useProAuthTokenService(); + return useMutation(async data => { await waitProServiceInvoice(data.invoice); - await retryProService(sdk.storage); + await retryProService(authService, sdk.storage); await client.invalidateQueries([QueryKey.pro]); }); }; @@ -173,9 +212,11 @@ export const useActivateTrialMutation = () => { const { i18n: { language } } = useTranslation(); + const authService = useProAuthTokenService(); return useMutation(async () => { const result = await startProServiceTrial( + authService, (ctx.env as { tgAuthBotId: string }).tgAuthBotId, language ); diff --git a/yarn.lock b/yarn.lock index 35d14baeb..bae24abac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2340,6 +2340,15 @@ __metadata: languageName: node linkType: hard +"@capacitor/haptics@npm:^6.0.2": + version: 6.0.2 + resolution: "@capacitor/haptics@npm:6.0.2" + peerDependencies: + "@capacitor/core": ^6.0.0 + checksum: 10/986003d8327d914762f5c0a4f4b6e494654fa0c27344c2a1764f06d08895bce035d8105c0f2a571b8b8bd3bd2f72b08bdc2ad4e1167aa186632a7a16bb6118a2 + languageName: node + linkType: hard + "@capacitor/ios@npm:^6.1.2": version: 6.2.0 resolution: "@capacitor/ios@npm:6.2.0" @@ -7532,6 +7541,7 @@ __metadata: "@capacitor/clipboard": "npm:^6.0.1" "@capacitor/core": "npm:latest" "@capacitor/device": "npm:^6.0.2" + "@capacitor/haptics": "npm:^6.0.2" "@capacitor/ios": "npm:^6.1.2" "@capacitor/preferences": "npm:^6.0.2" "@capacitor/push-notifications": "npm:^6.0.3"