From 47eb0250981826ee00d117f18cac38e085db970a Mon Sep 17 00:00:00 2001 From: siandreev Date: Wed, 11 Dec 2024 14:24:34 +0100 Subject: [PATCH 01/19] chore: generate tonconsole api --- packages/core/package.json | 2 +- packages/core/src/Keys.ts | 1 + packages/core/src/service/proService.ts | 44 +++-- .../core/src/tonConsoleApi/core/ApiError.ts | 2 +- .../tonConsoleApi/core/ApiRequestOptions.ts | 2 +- .../core/src/tonConsoleApi/core/ApiResult.ts | 2 +- .../tonConsoleApi/core/CancelablePromise.ts | 8 +- .../core/src/tonConsoleApi/core/OpenAPI.ts | 2 +- .../core/src/tonConsoleApi/core/request.ts | 4 +- packages/core/src/tonConsoleApi/index.ts | 29 +++- .../core/src/tonConsoleApi/models/AppTier.ts | 2 +- .../core/src/tonConsoleApi/models/Balance.ts | 2 +- .../core/src/tonConsoleApi/models/Chain.ts | 2 +- .../core/src/tonConsoleApi/models/Charge.ts | 2 +- .../tonConsoleApi/models/CnftCollection.ts | 8 +- .../tonConsoleApi/models/CryptoCurrency.ts | 8 + .../core/src/tonConsoleApi/models/Deposit.ts | 2 +- .../core/src/tonConsoleApi/models/Error.ts | 2 +- .../tonConsoleApi/models/FiatCurrencies.ts | 2 +- .../tonConsoleApi/models/InvoiceFieldOrder.ts | 2 +- .../src/tonConsoleApi/models/InvoiceStatus.ts | 2 +- .../src/tonConsoleApi/models/InvoicesApp.ts | 2 +- .../models/InvoicesAppWebhooks.ts | 2 +- .../tonConsoleApi/models/InvoicesInvoice.ts | 4 +- .../core/src/tonConsoleApi/models/Lang.ts | 7 +- .../src/tonConsoleApi/models/LiteproxyKey.ts | 11 ++ .../models/LiteproxyPrivateKey.ts | 11 ++ .../src/tonConsoleApi/models/LiteproxyTier.ts | 11 ++ .../src/tonConsoleApi/models/MessagesApp.ts | 2 +- .../tonConsoleApi/models/MessagesPackage.ts | 2 +- .../tonConsoleApi/models/MintlessJetton.ts | 8 + packages/core/src/tonConsoleApi/models/Ok.ts | 2 +- .../src/tonConsoleApi/models/Participant.ts | 12 ++ .../tonConsoleApi/models/ProServiceAppTier.ts | 2 +- .../models/ProServiceDashboardCellAddress.ts | 2 +- .../ProServiceDashboardCellNumericCrypto.ts | 2 +- .../ProServiceDashboardCellNumericFiat.ts | 2 +- .../models/ProServiceDashboardCellString.ts | 2 +- .../models/ProServiceDashboardColumn.ts | 2 +- .../models/ProServiceDashboardColumnID.ts | 3 +- .../models/ProServiceDashboardColumnType.ts | 2 +- .../models/ProServiceInvoiceWebhook.ts | 2 +- .../tonConsoleApi/models/ProServiceState.ts | 2 +- .../tonConsoleApi/models/ProServiceTier.ts | 2 +- .../core/src/tonConsoleApi/models/Project.ts | 2 +- .../models/ProjectLiteproxyTierDetail.ts | 13 ++ .../models/ProjectTonApiToken.ts | 5 +- .../core/src/tonConsoleApi/models/Referral.ts | 11 ++ .../src/tonConsoleApi/models/ServiceName.ts | 4 +- .../core/src/tonConsoleApi/models/Stats.ts | 2 +- .../tonConsoleApi/models/StatsDashboard.ts | 2 +- .../models/StatsEstimateQuery.ts | 2 +- .../src/tonConsoleApi/models/StatsQuery.ts | 3 +- .../tonConsoleApi/models/StatsQueryResult.ts | 3 +- .../tonConsoleApi/models/StatsQueryStatus.ts | 2 +- .../tonConsoleApi/models/StatsQueryType.ts | 2 +- .../core/src/tonConsoleApi/models/TgAuth.ts | 3 +- .../core/src/tonConsoleApi/models/Tier.ts | 2 +- .../tonConsoleApi/models/TokenCapability.ts | 7 + .../tonConsoleApi/models/TonConnectProof.ts | 2 +- .../core/src/tonConsoleApi/models/TonSite.ts | 12 ++ .../tonConsoleApi/models/TonSiteReduced.ts | 10 ++ packages/core/src/tonConsoleApi/models/URL.ts | 8 + .../core/src/tonConsoleApi/models/User.ts | 9 +- .../core/src/tonConsoleApi/models/account.ts | 2 +- .../core/src/tonConsoleApi/models/appID.ts | 2 +- .../src/tonConsoleApi/models/dashboardID.ts | 2 +- .../src/tonConsoleApi/models/invoiceID.ts | 2 +- .../src/tonConsoleApi/models/projectID.ts | 2 +- .../src/tonConsoleApi/models/promoCode.ts | 2 +- .../src/tonConsoleApi/models/queryAddress.ts | 8 + .../tonConsoleApi/models/queryAddresses.ts | 2 +- .../src/tonConsoleApi/models/queryAppID.ts | 2 +- .../src/tonConsoleApi/models/queryChain.ts | 2 +- .../models/queryCryptoCurrency.ts | 9 + .../src/tonConsoleApi/models/queryCurrency.ts | 2 +- .../src/tonConsoleApi/models/queryDetailed.ts | 2 +- .../src/tonConsoleApi/models/queryEndDate.ts | 2 +- .../models/queryEndDateRequired.ts | 2 +- .../tonConsoleApi/models/queryFieldOrder.ts | 2 +- .../models/queryFilterOverpayment.ts | 2 +- .../tonConsoleApi/models/queryFilterStatus.ts | 2 +- .../models/queryGrafanaDashboard.ts | 8 + .../core/src/tonConsoleApi/models/queryID.ts | 2 +- .../models/queryInvoicesSearchID.ts | 2 +- .../src/tonConsoleApi/models/queryLang.ts | 2 +- .../src/tonConsoleApi/models/queryLimit.ts | 2 +- .../models/queryLiteproxyServer.ts | 8 + .../src/tonConsoleApi/models/queryOffset.ts | 2 +- .../tonConsoleApi/models/queryOnlyBetween.ts | 2 +- .../tonConsoleApi/models/queryProjectID.ts | 2 +- .../tonConsoleApi/models/queryPromoCode.ts | 2 +- .../models/queryRepeatInterval.ts | 2 +- .../tonConsoleApi/models/queryStartDate.ts | 2 +- .../models/queryStartDateRequired.ts | 2 +- .../models/queryStatsIsRepetitive.ts | 2 +- .../tonConsoleApi/models/queryStatsType.ts | 2 +- .../src/tonConsoleApi/models/queryStep.ts | 2 +- .../tonConsoleApi/models/queryTypeOrder.ts | 2 +- .../core/src/tonConsoleApi/models/siteID.ts | 8 + .../core/src/tonConsoleApi/models/tierID.ts | 2 +- .../core/src/tonConsoleApi/models/tokenID.ts | 2 +- .../core/src/tonConsoleApi/models/userID.ts | 8 + .../src/tonConsoleApi/models/webhookID.ts | 2 +- .../tonConsoleApi/services/AccountService.ts | 43 ++++- .../tonConsoleApi/services/AdminService.ts | 23 ++- .../src/tonConsoleApi/services/AuthService.ts | 4 +- .../services/CnftServiceService.ts | 24 +-- .../services/InvoicesServiceService.ts | 14 +- .../services/MessagesServiceService.ts | 2 +- .../services/MinterJettonMediaService.ts | 84 +++++++++ .../services/MintlessJettonServiceService.ts | 78 +++++++++ .../services/ProServiceService.ts | 38 ++-- .../tonConsoleApi/services/ProjectService.ts | 85 ++++++++- .../services/StatsServiceService.ts | 10 +- .../tonConsoleApi/services/SystemService.ts | 2 +- .../src/tonConsoleApi/services/TestService.ts | 27 +++ .../services/TestnetServiceService.ts | 2 +- .../services/TonSitesServiceService.ts | 127 ++++++++++++++ .../services/TonapiServiceService.ts | 162 +++++++++++++++++- .../tonConsoleApi/services/UtilsService.ts | 30 ++++ .../components/desktop/aside/AsideMenu.tsx | 6 +- 122 files changed, 1057 insertions(+), 152 deletions(-) create mode 100644 packages/core/src/tonConsoleApi/models/CryptoCurrency.ts create mode 100644 packages/core/src/tonConsoleApi/models/LiteproxyKey.ts create mode 100644 packages/core/src/tonConsoleApi/models/LiteproxyPrivateKey.ts create mode 100644 packages/core/src/tonConsoleApi/models/LiteproxyTier.ts create mode 100644 packages/core/src/tonConsoleApi/models/MintlessJetton.ts create mode 100644 packages/core/src/tonConsoleApi/models/Participant.ts create mode 100644 packages/core/src/tonConsoleApi/models/ProjectLiteproxyTierDetail.ts create mode 100644 packages/core/src/tonConsoleApi/models/Referral.ts create mode 100644 packages/core/src/tonConsoleApi/models/TokenCapability.ts create mode 100644 packages/core/src/tonConsoleApi/models/TonSite.ts create mode 100644 packages/core/src/tonConsoleApi/models/TonSiteReduced.ts create mode 100644 packages/core/src/tonConsoleApi/models/URL.ts create mode 100644 packages/core/src/tonConsoleApi/models/queryAddress.ts create mode 100644 packages/core/src/tonConsoleApi/models/queryCryptoCurrency.ts create mode 100644 packages/core/src/tonConsoleApi/models/queryGrafanaDashboard.ts create mode 100644 packages/core/src/tonConsoleApi/models/queryLiteproxyServer.ts create mode 100644 packages/core/src/tonConsoleApi/models/siteID.ts create mode 100644 packages/core/src/tonConsoleApi/models/userID.ts create mode 100644 packages/core/src/tonConsoleApi/services/MinterJettonMediaService.ts create mode 100644 packages/core/src/tonConsoleApi/services/MintlessJettonServiceService.ts create mode 100644 packages/core/src/tonConsoleApi/services/TestService.ts create mode 100644 packages/core/src/tonConsoleApi/services/TonSitesServiceService.ts create mode 100644 packages/core/src/tonConsoleApi/services/UtilsService.ts diff --git a/packages/core/package.json b/packages/core/package.json index dbf4cddcc..641fb1f75 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=GHSAT0AAAAAACJYQUODH27UDR7JHB2VQH3UZ2YJY5A' --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..e960808b7 100644 --- a/packages/core/src/service/proService.ts +++ b/packages/core/src/service/proService.ts @@ -17,13 +17,13 @@ import { FiatCurrencies as FiatCurrenciesGenerated, InvoiceStatus, InvoicesInvoice, - Lang, ProServiceDashboardCellAddress, ProServiceDashboardCellNumericCrypto, ProServiceDashboardCellNumericFiat, ProServiceDashboardCellString, ProServiceDashboardColumnType, - ProServiceService + ProServiceService, + OpenAPI } from '../tonConsoleApi'; import { delay } from '../utils/common'; import { Flatten } from '../utils/types'; @@ -81,7 +81,18 @@ export const walletVersionFromProServiceDTO = (value: string) => { } }; +const attachProAuthToken = async (storage: IStorage) => { + const token = await storage.get(AppKey.PRO_AUTH_TOKEN); + OpenAPI.TOKEN = token ?? undefined; +}; + +const updateProAuthToken = async (storage: IStorage, token: string | null) => { + await storage.set(AppKey.PRO_AUTH_TOKEN, token); + return attachProAuthToken(storage); +}; + export const loadProState = async (storage: IStorage): Promise => { + await attachProAuthToken(storage); 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 ( + storage: IStorage, 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 updateProAuthToken(storage, result.auth_token); }; -export const logoutTonConsole = async () => { +export const logoutTonConsole = async (storage: IStorage) => { const result = await ProServiceService.proServiceLogout(); if (!result.ok) { throw new Error('Unable to logout'); } + + await updateProAuthToken(storage, null); }; export const getProServiceTiers = async (lang?: Language | undefined, promoCode?: string) => { @@ -260,12 +267,16 @@ export const waitProServiceInvoice = async (invoice: InvoicesInvoice) => { } while (updated.status === InvoiceStatus.PENDING); }; -export async function startProServiceTrial(botId: string, lang?: string) { +export async function startProServiceTrial(storage: IStorage, 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 updateProAuthToken(storage, result.auth_token); + + return result.ok; } export async function getDashboardColumns(lang?: string): Promise { @@ -283,6 +294,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..ca65fddfc 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 } 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/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/account.ts b/packages/core/src/tonConsoleApi/models/account.ts index 0ea84ee4d..6849da24d 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 */ 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..556d40cae --- /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/uikit/src/components/desktop/aside/AsideMenu.tsx b/packages/uikit/src/components/desktop/aside/AsideMenu.tsx index 20a5b157f..ff70d3d02 100644 --- a/packages/uikit/src/components/desktop/aside/AsideMenu.tsx +++ b/packages/uikit/src/components/desktop/aside/AsideMenu.tsx @@ -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` @@ -166,12 +166,12 @@ export const AsideMenuDNDItem = forwardRef< ) : ( )} From 05a0614c926bcf8e7a6c24d362e5426327754a9c Mon Sep 17 00:00:00 2001 From: siandreev Date: Wed, 11 Dec 2024 14:25:44 +0100 Subject: [PATCH 02/19] fix: pro auth on iPad --- .../uikit/src/components/Notification.tsx | 11 ++++---- .../desktop/header/DesktopDashboardHeader.tsx | 25 +++++++++++-------- .../uikit/src/components/shared/AsideItem.tsx | 10 ++++---- packages/uikit/src/hooks/appContext.ts | 5 ++++ packages/uikit/src/hooks/appSdk.ts | 4 +-- .../blockchain/multisig/useDeployMultisig.ts | 5 +++- packages/uikit/src/hooks/useEventListener.ts | 11 +++++--- packages/uikit/src/hooks/useIsHovered.ts | 15 +++++++++-- packages/uikit/src/libs/css.ts | 6 +++++ packages/uikit/src/libs/web.ts | 6 +++++ packages/uikit/src/pages/settings/Dev.tsx | 2 ++ packages/uikit/src/state/pro.ts | 6 ++++- 12 files changed, 77 insertions(+), 29 deletions(-) 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/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' && ( + + )} From 1a494b26e7bc420a79668b4c5367f651e28a440c Mon Sep 17 00:00:00 2001 From: siandreev Date: Thu, 12 Dec 2024 14:09:00 +0100 Subject: [PATCH 15/19] fix: minor layout improvements --- .../uikit/src/components/create/AddWallet.tsx | 40 +++++++++--------- .../desktop/aside/WalletAsideMenu.tsx | 41 ++++++++++--------- .../desktop/header/DesktopWalletHeader.tsx | 18 ++++---- .../uikit/src/components/nft/NftAction.tsx | 27 ++++++------ .../desktop-pages/nft/DesktopCollectables.tsx | 7 +--- 5 files changed, 68 insertions(+), 65 deletions(-) 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/WalletAsideMenu.tsx b/packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx index 084511ea9..e006f3911 100644 --- a/packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx +++ b/packages/uikit/src/components/desktop/aside/WalletAsideMenu.tsx @@ -96,15 +96,16 @@ export const WalletAsideMenu = () => { )} + + + {({ isActive }) => ( + + + {t('wallet_aside_collectibles')} + + )} + - - {({ isActive }) => ( - - - {t('wallet_aside_collectibles')} - - )} - {({ 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/DesktopWalletHeader.tsx b/packages/uikit/src/components/desktop/header/DesktopWalletHeader.tsx index 1c0804589..58ae7a474 100644 --- a/packages/uikit/src/components/desktop/header/DesktopWalletHeader.tsx +++ b/packages/uikit/src/components/desktop/header/DesktopWalletHeader.tsx @@ -73,14 +73,16 @@ const DesktopWalletHeaderPayload = () => { {t('wallet_send')} )} - {!isReadOnly && isStandardTonWallet(activeWallet) && ( - - - - {t('wallet_multi_send')} - - - )} + + {!isReadOnly && isStandardTonWallet(activeWallet) && ( + + + + {t('wallet_multi_send')} + + + )} + { 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/desktop-pages/nft/DesktopCollectables.tsx b/packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx index 46e0f97bb..8b7ef4e94 100644 --- a/packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx +++ b/packages/uikit/src/desktop-pages/nft/DesktopCollectables.tsx @@ -15,7 +15,6 @@ import { useMemo } from 'react'; import { SlidersIcon } from '../../components/Icon'; import { IconButtonTransparentBackground } from '../../components/fields/IconButton'; import { useWalletFilteredNftList } from '../../state/nft'; -import { HideOnReview } from '../../components/ios/HideOnReview'; const gap = '10px'; const maxColumnsNumber = 4; @@ -72,11 +71,7 @@ const SettingsButtonStyled = styled(IconButtonTransparentBackground)` `; export const DesktopCollectables = () => { - return ( - - - - ); + return ; }; export const DesktopCollectablesContent = () => { From 0d910315b998dc73fde71d13bbc7c892d95f37c0 Mon Sep 17 00:00:00 2001 From: siandreev Date: Thu, 12 Dec 2024 15:45:44 +0100 Subject: [PATCH 16/19] fix: update pro auth --- packages/core/src/service/proService.ts | 48 +++++++++++---------- packages/uikit/src/state/pro.ts | 55 +++++++++++++++++++++---- 2 files changed, 72 insertions(+), 31 deletions(-) diff --git a/packages/core/src/service/proService.ts b/packages/core/src/service/proService.ts index e960808b7..4f5bdef18 100644 --- a/packages/core/src/service/proService.ts +++ b/packages/core/src/service/proService.ts @@ -22,8 +22,7 @@ import { ProServiceDashboardCellNumericFiat, ProServiceDashboardCellString, ProServiceDashboardColumnType, - ProServiceService, - OpenAPI + ProServiceService } from '../tonConsoleApi'; import { delay } from '../utils/common'; import { Flatten } from '../utils/types'; @@ -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,18 +83,16 @@ export const walletVersionFromProServiceDTO = (value: string) => { } }; -const attachProAuthToken = async (storage: IStorage) => { - const token = await storage.get(AppKey.PRO_AUTH_TOKEN); - OpenAPI.TOKEN = token ?? undefined; +export type ProAuthTokenService = { + attachToken: () => Promise; + onTokenUpdated: (token: string | null) => Promise; }; -const updateProAuthToken = async (storage: IStorage, token: string | null) => { - await storage.set(AppKey.PRO_AUTH_TOKEN, token); - return attachProAuthToken(storage); -}; - -export const loadProState = async (storage: IStorage): Promise => { - await attachProAuthToken(storage); +const loadProState = async ( + authService: ProAuthTokenService, + storage: IStorage +): Promise => { + await authService.attachToken(); const user = await ProServiceService.proServiceGetUserInfo(); let authorizedWallet: ProStateWallet | null = null; @@ -159,7 +159,7 @@ export const loadProState = async (storage: IStorage): Promise => { }; export const authViaTonConnect = async ( - storage: IStorage, + authService: ProAuthTokenService, api: APIConfig, wallet: TonWalletStandard, signProof: (bufferToSing: Buffer) => Promise @@ -191,16 +191,16 @@ export const authViaTonConnect = async ( throw new Error('Unable to authorize'); } - await updateProAuthToken(storage, result.auth_token); + await authService.onTokenUpdated(result.auth_token); }; -export const logoutTonConsole = async (storage: IStorage) => { +export const logoutTonConsole = async (authService: ProAuthTokenService) => { const result = await ProServiceService.proServiceLogout(); if (!result.ok) { throw new Error('Unable to logout'); } - await updateProAuthToken(storage, null); + await authService.onTokenUpdated(null); }; export const getProServiceTiers = async (lang?: Language | undefined, promoCode?: string) => { @@ -244,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; } @@ -267,14 +267,18 @@ export const waitProServiceInvoice = async (invoice: InvoicesInvoice) => { } while (updated.status === InvoiceStatus.PENDING); }; -export async function startProServiceTrial(storage: IStorage, botId: string, lang?: string) { +export async function startProServiceTrial( + authService: ProAuthTokenService, + botId: string, + lang?: string +) { const tgData = await loginViaTG(botId, lang); if (!tgData) { return false; } const result = await ProServiceService.proServiceTrial(tgData); - await updateProAuthToken(storage, result.auth_token); + await authService.onTokenUpdated(result.auth_token); return result.ok; } diff --git a/packages/uikit/src/state/pro.ts b/packages/uikit/src/state/pro.ts index 89a727db8..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,7 +115,7 @@ export const useSelectWalletForProMutation = () => { } await authViaTonConnect( - sdk.storage, + authService, api, wallet, signTonConnectOver({ sdk, accountId: account.id, wallet, t, checkTouchId }) @@ -93,9 +127,10 @@ export const useSelectWalletForProMutation = () => { export const useProLogout = () => { const client = useQueryClient(); - const sdk = useAppSdk(); + const authService = useProAuthTokenService(); + return useMutation(async () => { - await logoutTonConsole(sdk.storage); + await logoutTonConsole(authService); await client.invalidateQueries([QueryKey.pro]); }); }; @@ -162,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]); }); }; @@ -175,11 +212,11 @@ export const useActivateTrialMutation = () => { const { i18n: { language } } = useTranslation(); - const sdk = useAppSdk(); + const authService = useProAuthTokenService(); return useMutation(async () => { const result = await startProServiceTrial( - sdk.storage, + authService, (ctx.env as { tgAuthBotId: string }).tgAuthBotId, language ); From 441cd355a53daa7a59c295517590326b5519c052 Mon Sep 17 00:00:00 2001 From: siandreev Date: Thu, 12 Dec 2024 16:43:33 +0100 Subject: [PATCH 17/19] fix: security issue with biometrics --- apps/tablet/src/libs/appSdk.ts | 13 +++++++++++-- packages/uikit/src/pages/settings/Security.tsx | 7 ++++++- packages/uikit/src/state/password.ts | 17 +++++++++++------ 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/apps/tablet/src/libs/appSdk.ts b/apps/tablet/src/libs/appSdk.ts index 9cf9126a7..57af82a5c 100644 --- a/apps/tablet/src/libs/appSdk.ts +++ b/apps/tablet/src/libs/appSdk.ts @@ -38,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(); @@ -49,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; + } }; } @@ -63,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()); 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..2e57d08d8 100644 --- a/packages/uikit/src/state/password.ts +++ b/packages/uikit/src/state/password.ts @@ -37,20 +37,25 @@ 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 = await sdk.touchId?.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]); }); From c67a5d240735475ee54d8b438fc05ae9b5116e82 Mon Sep 17 00:00:00 2001 From: siandreev Date: Sat, 14 Dec 2024 16:10:45 +0100 Subject: [PATCH 18/19] fix: touch id vulnerability --- packages/uikit/src/state/password.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/uikit/src/state/password.ts b/packages/uikit/src/state/password.ts index 2e57d08d8..54a997e89 100644 --- a/packages/uikit/src/state/password.ts +++ b/packages/uikit/src/state/password.ts @@ -43,7 +43,8 @@ const isTouchIdEnabled = async (sdk: IAppSdk): Promise => { return touchId; } - const canPrompt = await sdk.touchId?.canPrompt(); + const canPrompt = Boolean(await sdk.touchId?.canPrompt()); + await sdk.storage.set(AppKey.TOUCH_ID, canPrompt); return Boolean(canPrompt); }; From 78eb9a6f310493d68ec32330b4d39301b00efe8d Mon Sep 17 00:00:00 2001 From: Nikita Kuznetsov Date: Tue, 17 Dec 2024 13:05:19 +0100 Subject: [PATCH 19/19] Update Table version --- apps/tablet/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/tablet/package.json b/apps/tablet/package.json index 15d2756f2..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",