diff --git a/src/api/gramjs/apiBuilders/gifts.ts b/src/api/gramjs/apiBuilders/gifts.ts index b75c20b57..349b8d3cd 100644 --- a/src/api/gramjs/apiBuilders/gifts.ts +++ b/src/api/gramjs/apiBuilders/gifts.ts @@ -55,7 +55,7 @@ export function buildApiStarGift(starGift: GramJs.TypeStarGift): ApiStarGift { const { id, limited, stars, availabilityRemains, availabilityTotal, convertStars, firstSaleDate, lastSaleDate, soldOut, birthday, upgradeStars, resellMinStars, title, availabilityResale, releasedBy, - requirePremium, limitedPerUser, perUserTotal, perUserRemains, + requirePremium, limitedPerUser, perUserTotal, perUserRemains, lockedUntilDate, } = starGift; addDocumentToLocalDb(starGift.sticker); @@ -84,6 +84,7 @@ export function buildApiStarGift(starGift: GramJs.TypeStarGift): ApiStarGift { limitedPerUser, perUserTotal, perUserRemains, + lockedUntilDate, }; } diff --git a/src/api/gramjs/methods/stars.ts b/src/api/gramjs/methods/stars.ts index cdc16a7f4..820057a38 100644 --- a/src/api/gramjs/methods/stars.ts +++ b/src/api/gramjs/methods/stars.ts @@ -12,6 +12,9 @@ import type { } from '../../types'; import { buildApiChatFromPreview } from '../apiBuilders/chats'; +import { + buildApiFormattedText, +} from '../apiBuilders/common'; import { buildApiResaleGifts, buildApiSavedStarGift, buildApiStarGift, buildApiStarGiftAttribute, buildApiStarGiftCollection, buildInputResaleGiftsAttributes } from '../apiBuilders/gifts'; import { @@ -24,7 +27,8 @@ import { buildApiUniqueStarGiftValueInfo, } from '../apiBuilders/payments'; import { buildApiUser } from '../apiBuilders/users'; -import { buildInputPeer, +import { + buildInputPeer, buildInputSavedStarGift, buildInputStarsAmount, buildInputUser, @@ -33,6 +37,26 @@ import { checkErrorType, wrapError } from '../helpers/misc'; import { invokeRequest } from './client'; import { getPassword } from './twoFaSettings'; +export async function fetchCheckCanSendGift({ giftId }: { giftId: string }) { + const result = await invokeRequest(new GramJs.payments.CheckCanSendGift({ + giftId: bigInt(giftId), + })); + + if (!result) { + return undefined; + } + + if (result instanceof GramJs.payments.CheckCanSendGiftResultOk) { + return { canSend: true }; + } + + if (result instanceof GramJs.payments.CheckCanSendGiftResultFail) { + return { canSend: false, reason: buildApiFormattedText(result.reason) }; + } + + return undefined; +} + export async function fetchStarsGiveawayOptions() { const result = await invokeRequest(new GramJs.payments.GetStarsGiveawayOptions()); diff --git a/src/api/types/stars.ts b/src/api/types/stars.ts index 4ede3dd26..7a7ee3271 100644 --- a/src/api/types/stars.ts +++ b/src/api/types/stars.ts @@ -26,6 +26,7 @@ export interface ApiStarGiftRegular { limitedPerUser?: true; perUserTotal?: number; perUserRemains?: number; + lockedUntilDate?: number; } export interface ApiStarGiftUnique { diff --git a/src/assets/localization/fallback.strings b/src/assets/localization/fallback.strings index ca8e5851e..fe343ff81 100644 --- a/src/assets/localization/fallback.strings +++ b/src/assets/localization/fallback.strings @@ -2281,4 +2281,6 @@ "GiftValueForSaleOnFragment" = "for sale on Fragment"; "GiftValueForSaleOnTelegram" = "for sale on Telegram"; "EmbeddedMessageNoCaption" = "Caption removed"; +"TitleGiftLocked" = "Gift Locked"; +"GiftLockedMessage" = "This gift is currently only available to earlier Telegram users. It will unlock for your account in about **{relativeDate}**."; "QuickPreview" = "Quick Preview"; diff --git a/src/bundles/stars.ts b/src/bundles/stars.ts index 169f00725..74c01cca3 100644 --- a/src/bundles/stars.ts +++ b/src/bundles/stars.ts @@ -9,6 +9,7 @@ export { default as GiftModal } from '../components/modals/gift/GiftModal'; export { default as GiftRecipientPicker } from '../components/modals/gift/recipient/GiftRecipientPicker'; export { default as GiftInfoModal } from '../components/modals/gift/info/GiftInfoModal'; export { default as GiftInfoValueModal } from '../components/modals/gift/value/GiftInfoValueModal'; +export { default as GiftLockedModal } from '../components/modals/gift/locked/GiftLockedModal'; export { default as GiftResalePriceComposerModal } from '../components/modals/gift/resale/GiftResalePriceComposerModal'; export { default as GiftUpgradeModal } from '../components/modals/gift/upgrade/GiftUpgradeModal'; export { default as GiftStatusInfoModal } from '../components/modals/gift/status/GiftStatusInfoModal'; diff --git a/src/components/modals/ModalContainer.tsx b/src/components/modals/ModalContainer.tsx index 1ca655a0c..4b791a7c0 100644 --- a/src/components/modals/ModalContainer.tsx +++ b/src/components/modals/ModalContainer.tsx @@ -21,6 +21,7 @@ import EmojiStatusAccessModal from './emojiStatusAccess/EmojiStatusAccessModal.a import FrozenAccountModal from './frozenAccount/FrozenAccountModal.async'; import PremiumGiftModal from './gift/GiftModal.async'; import GiftInfoModal from './gift/info/GiftInfoModal.async'; +import GiftLockedModal from './gift/locked/GiftLockedModal.async'; import GiftRecipientPicker from './gift/recipient/GiftRecipientPicker.async'; import GiftResalePriceComposerModal from './gift/resale/GiftResalePriceComposerModal.async'; import GiftStatusInfoModal from './gift/status/GiftStatusInfoModal.async'; @@ -81,6 +82,7 @@ type ModalKey = keyof Pick(); const stickerRef = useRef(); @@ -104,6 +106,14 @@ function GiftItemStar({ return; } + if (isLocked) { + checkCanSendGift({ + gift, + onSuccess: () => onClick(gift, isResale ? 'resell' : 'original'), + }); + return; + } + onClick(gift, isResale ? 'resell' : 'original'); }); @@ -128,6 +138,7 @@ function GiftItemStar({ }, [gift]); const giftNumber = isGiftUnique ? gift.number : 0; + const isLocked = Boolean(gift.type === 'starGift' && gift.lockedUntilDate); const giftRibbon = useMemo(() => { if (isGiftUnique) { @@ -214,6 +225,7 @@ function GiftItemStar({ : formatStarsAsIcon(lang, priceInStarsAsString || 0, { asFont: true, className: styles.star })} {giftRibbon} + {isLocked && } ); } diff --git a/src/components/modals/gift/locked/GiftLockedModal.async.tsx b/src/components/modals/gift/locked/GiftLockedModal.async.tsx new file mode 100644 index 000000000..657769936 --- /dev/null +++ b/src/components/modals/gift/locked/GiftLockedModal.async.tsx @@ -0,0 +1,16 @@ +import type { FC } from '../../../../lib/teact/teact'; + +import type { OwnProps } from './GiftLockedModal'; + +import { Bundles } from '../../../../util/moduleLoader'; + +import useModuleLoader from '../../../../hooks/useModuleLoader'; + +const GiftLockedModalAsync: FC = (props) => { + const { modal } = props; + const GiftLockedModal = useModuleLoader(Bundles.Stars, 'GiftLockedModal', !modal); + + return GiftLockedModal ? : undefined; +}; + +export default GiftLockedModalAsync; diff --git a/src/components/modals/gift/locked/GiftLockedModal.module.scss b/src/components/modals/gift/locked/GiftLockedModal.module.scss new file mode 100644 index 000000000..6bcd40686 --- /dev/null +++ b/src/components/modals/gift/locked/GiftLockedModal.module.scss @@ -0,0 +1,9 @@ +.header { + text-align: center; +} + +.message { + margin-bottom: 1.625rem; + color: var(--color-text); + text-align: center; +} diff --git a/src/components/modals/gift/locked/GiftLockedModal.tsx b/src/components/modals/gift/locked/GiftLockedModal.tsx new file mode 100644 index 000000000..37dfba4a3 --- /dev/null +++ b/src/components/modals/gift/locked/GiftLockedModal.tsx @@ -0,0 +1,73 @@ +import { memo, useCallback } from '../../../../lib/teact/teact'; +import { getActions } from '../../../../global'; + +import type { TabState } from '../../../../global/types'; + +import { formatShortDuration } from '../../../../util/dates/dateFormat'; +import { getServerTime } from '../../../../util/serverTime'; +import { renderTextWithEntities } from '../../../common/helpers/renderTextWithEntities'; + +import useLang from '../../../../hooks/useLang'; +import useLastCallback from '../../../../hooks/useLastCallback'; + +import Button from '../../../ui/Button'; +import Modal from '../../../ui/Modal'; + +import styles from './GiftLockedModal.module.scss'; + +export type OwnProps = { + modal: TabState['lockedGiftModal']; +}; + +const GiftLockedModal = ({ + modal, +}: OwnProps) => { + const { closeLockedGiftModal } = getActions(); + const lang = useLang(); + + const handleClose = useLastCallback(() => { + closeLockedGiftModal(); + }); + + const getMessageText = useCallback(() => { + if (!modal) return ''; + + if (modal.untilDate) { + const timeRemaining = modal.untilDate ? modal.untilDate - getServerTime() : 0; + return lang('GiftLockedMessage', { + relativeDate: formatShortDuration(lang, timeRemaining), + }, + { + withNodes: true, + withMarkdown: true, + }); + } + + if (modal.reason) { + return renderTextWithEntities(modal.reason); + } + + return lang('TitleGiftLocked'); + }, [modal, lang]); + + return ( + +

+ {getMessageText()} +

+ +
+ ); +}; + +export default memo(GiftLockedModal); diff --git a/src/components/ui/ListItem.scss b/src/components/ui/ListItem.scss index 073f62fcc..4e926cc71 100644 --- a/src/components/ui/ListItem.scss +++ b/src/components/ui/ListItem.scss @@ -225,9 +225,9 @@ &.chat-item-with-tags { .ListItem-button { + align-items: flex-start; height: 72px; padding: 0.375rem 0.5625rem; - align-items: flex-start; } } diff --git a/src/components/ui/Modal.tsx b/src/components/ui/Modal.tsx index 5664651fc..0a2e81e2a 100644 --- a/src/components/ui/Modal.tsx +++ b/src/components/ui/Modal.tsx @@ -30,6 +30,7 @@ export type OwnProps = { className?: string; contentClassName?: string; headerClassName?: string; + dialogClassName?: string; isOpen?: boolean; header?: TeactNode; isSlim?: boolean; @@ -72,6 +73,7 @@ const Modal: FC = ({ dialogStyle, isLowStackPriority, dialogContent, + dialogClassName, onClose, onCloseAnimationEnd, onEnter, @@ -178,6 +180,11 @@ const Modal: FC = ({ withBalanceBar && 'with-balance-bar', ); + const modalDialogClassName = buildClassName( + 'modal-dialog', + dialogClassName, + ); + return (
= ({ )}
-
+
{renderHeader()} {dialogContent}
diff --git a/src/global/actions/api/payments.ts b/src/global/actions/api/payments.ts index 684703dbb..9688574c5 100644 --- a/src/global/actions/api/payments.ts +++ b/src/global/actions/api/payments.ts @@ -546,6 +546,33 @@ addActionHandler('openGiveawayModal', async (global, actions, payload): Promise< setGlobal(global); }); +addActionHandler('checkCanSendGift', async (global, actions, payload): Promise => { + const { + gift, onSuccess, tabId = getCurrentTabId(), + } = payload; + + if (gift.type !== 'starGift' || !gift.lockedUntilDate) { + onSuccess(); + return; + } + + const result = await callApi('fetchCheckCanSendGift', { + giftId: gift.id, + }); + + if (!result) return; + + if (result?.canSend) { + onSuccess(); + } else { + actions.openLockedGiftModalInfo({ + untilDate: gift.type === 'starGift' ? gift.lockedUntilDate : undefined, + reason: result.reason, + tabId, + }); + } +}); + addActionHandler('openGiftModal', async (global, actions, payload): Promise => { const { forUserId, selectedResaleGift, tabId = getCurrentTabId(), diff --git a/src/global/actions/ui/stars.ts b/src/global/actions/ui/stars.ts index cee1d23dd..be58a4883 100644 --- a/src/global/actions/ui/stars.ts +++ b/src/global/actions/ui/stars.ts @@ -281,6 +281,21 @@ addActionHandler('openGiftInfoModal', (global, actions, payload): ActionReturnTy }, tabId); }); +addActionHandler('openLockedGiftModalInfo', (global, actions, payload): ActionReturnType => { + const { + untilDate, reason, tabId = getCurrentTabId(), + } = payload; + + return updateTabState(global, { + lockedGiftModal: { + untilDate, + reason, + }, + }, tabId); +}); + +addTabStateResetterAction('closeLockedGiftModal', 'lockedGiftModal'); + addActionHandler('openGiftResalePriceComposerModal', (global, actions, payload): ActionReturnType => { const { gift, peerId, tabId = getCurrentTabId(), diff --git a/src/global/types/actions.ts b/src/global/types/actions.ts index 7f44fa8a9..eafab1db1 100644 --- a/src/global/types/actions.ts +++ b/src/global/types/actions.ts @@ -2571,11 +2571,20 @@ export interface ActionPayloads { } | { gift: ApiStarGift; }) & WithTabId; + openLockedGiftModalInfo: { + untilDate?: number; + reason?: ApiFormattedText; + } & WithTabId; + checkCanSendGift: { + gift: ApiStarGift; + onSuccess: () => void; + } & WithTabId; openGiftResalePriceComposerModal: ({ peerId: string; gift: ApiSavedStarGift; }) & WithTabId; closeGiftInfoModal: WithTabId | undefined; + closeLockedGiftModal: WithTabId | undefined; closeGiftResalePriceComposerModal: WithTabId | undefined; openGiftInMarket: { gift: ApiStarGift; diff --git a/src/global/types/tabState.ts b/src/global/types/tabState.ts index 58e487800..eabeeb980 100644 --- a/src/global/types/tabState.ts +++ b/src/global/types/tabState.ts @@ -832,6 +832,11 @@ export type TabState = { gift: ApiStarGiftUnique; }; + lockedGiftModal?: { + untilDate?: number; + reason?: ApiFormattedText; + }; + giftResalePriceComposerModal?: { peerId?: string; gift: ApiSavedStarGift | ApiStarGift; diff --git a/src/lib/gramjs/tl/AllTLObjects.ts b/src/lib/gramjs/tl/AllTLObjects.ts index dadfb9945..8e8ac56af 100644 --- a/src/lib/gramjs/tl/AllTLObjects.ts +++ b/src/lib/gramjs/tl/AllTLObjects.ts @@ -12,6 +12,6 @@ for (const tl of Object.values(Api)) { } } -export const LAYER = 212; +export const LAYER = 213; export { tlobjects }; diff --git a/src/lib/gramjs/tl/api.d.ts b/src/lib/gramjs/tl/api.d.ts index c526a6515..b10bebfe4 100644 --- a/src/lib/gramjs/tl/api.d.ts +++ b/src/lib/gramjs/tl/api.d.ts @@ -401,6 +401,7 @@ namespace Api { export type TypeStarGiftCollection = StarGiftCollection; export type TypeStoryAlbum = StoryAlbum; export type TypeSearchPostsFlood = SearchPostsFlood; + export type TypeProfileTab = ProfileTabPosts | ProfileTabGifts | ProfileTabMedia | ProfileTabFiles | ProfileTabMusic | ProfileTabVoice | ProfileTabLinks | ProfileTabGifs; export type TypeResPQ = ResPQ; export type TypeP_Q_inner_data = PQInnerData | PQInnerDataDc | PQInnerDataTemp | PQInnerDataTempDc; export type TypeServer_DH_Params = ServerDHParamsFail | ServerDHParamsOk; @@ -584,6 +585,7 @@ namespace Api { export type TypeBusinessChatLinks = account.BusinessChatLinks; export type TypeResolvedBusinessChatLinks = account.ResolvedBusinessChatLinks; export type TypePaidMessagesRevenue = account.PaidMessagesRevenue; + export type TypeSavedMusicIds = account.SavedMusicIdsNotModified | account.SavedMusicIds; } export namespace channels { @@ -618,6 +620,7 @@ namespace Api { export type TypeResaleStarGifts = payments.ResaleStarGifts; export type TypeStarGiftCollections = payments.StarGiftCollectionsNotModified | payments.StarGiftCollections; export type TypeUniqueStarGiftValueInfo = payments.UniqueStarGiftValueInfo; + export type TypeCheckCanSendGiftResult = payments.CheckCanSendGiftResultOk | payments.CheckCanSendGiftResultFail; } export namespace phone { @@ -645,6 +648,7 @@ namespace Api { export namespace users { export type TypeUserFull = users.UserFull; export type TypeUsers = users.Users | users.UsersSlice; + export type TypeSavedMusic = users.SavedMusicNotModified | users.SavedMusic; } export namespace chatlists { @@ -1948,6 +1952,7 @@ namespace Api { botVerification?: Api.TypeBotVerification; stargiftsCount?: int; sendPaidMessagesStars?: long; + mainTab?: Api.TypeProfileTab; }> { // flags: Api.Type; canViewParticipants?: true; @@ -2016,7 +2021,8 @@ namespace Api { botVerification?: Api.TypeBotVerification; stargiftsCount?: int; sendPaidMessagesStars?: long; - CONSTRUCTOR_ID: 3765709278; + mainTab?: Api.TypeProfileTab; + CONSTRUCTOR_ID: 3839931037; SUBCLASS_OF_ID: 3566872215; className: 'ChannelFull'; @@ -3201,6 +3207,7 @@ namespace Api { refunded?: true; canUpgrade?: true; prepaidUpgrade?: true; + upgradeSeparate?: true; gift: Api.TypeStarGift; message?: Api.TypeTextWithEntities; convertStars?: long; @@ -3220,6 +3227,7 @@ namespace Api { refunded?: true; canUpgrade?: true; prepaidUpgrade?: true; + upgradeSeparate?: true; gift: Api.TypeStarGift; message?: Api.TypeTextWithEntities; convertStars?: long; @@ -3936,6 +3944,8 @@ namespace Api { starsRating?: Api.TypeStarsRating; starsMyPendingRating?: Api.TypeStarsRating; starsMyPendingRatingDate?: int; + mainTab?: Api.TypeProfileTab; + savedMusic?: Api.TypeDocument; }> { // flags: Api.Type; blocked?: true; @@ -3990,7 +4000,9 @@ namespace Api { starsRating?: Api.TypeStarsRating; starsMyPendingRating?: Api.TypeStarsRating; starsMyPendingRatingDate?: int; - CONSTRUCTOR_ID: 2120470047; + mainTab?: Api.TypeProfileTab; + savedMusic?: Api.TypeDocument; + CONSTRUCTOR_ID: 1071128104; SUBCLASS_OF_ID: 524706233; className: 'UserFull'; @@ -14390,14 +14402,18 @@ namespace Api { static fromReader(reader: Reader): InputStorePaymentPremiumGiveaway; } export class InputStorePaymentStarsTopup extends VirtualClass<{ + // flags: Api.Type; stars: long; currency: string; amount: long; + spendPurposePeer?: Api.TypeInputPeer; }> { + // flags: Api.Type; stars: long; currency: string; amount: long; - CONSTRUCTOR_ID: 3722252118; + spendPurposePeer?: Api.TypeInputPeer; + CONSTRUCTOR_ID: 4188186315; SUBCLASS_OF_ID: 3886290765; className: 'InputStorePaymentStarsTopup'; @@ -16828,6 +16844,7 @@ namespace Api { releasedBy?: Api.TypePeer; perUserTotal?: int; perUserRemains?: int; + lockedUntilDate?: int; }> { // flags: Api.Type; limited?: true; @@ -16850,7 +16867,8 @@ namespace Api { releasedBy?: Api.TypePeer; perUserTotal?: int; perUserRemains?: int; - CONSTRUCTOR_ID: 12386139; + lockedUntilDate?: int; + CONSTRUCTOR_ID: 2158777283; SUBCLASS_OF_ID: 3273414923; className: 'StarGift'; @@ -17142,6 +17160,7 @@ namespace Api { refunded?: true; canUpgrade?: true; pinnedToTop?: true; + upgradeSeparate?: true; fromId?: Api.TypePeer; date: int; gift: Api.TypeStarGift; @@ -17163,6 +17182,7 @@ namespace Api { refunded?: true; canUpgrade?: true; pinnedToTop?: true; + upgradeSeparate?: true; fromId?: Api.TypePeer; date: int; gift: Api.TypeStarGift; @@ -17533,6 +17553,62 @@ namespace Api { static fromReader(reader: Reader): SearchPostsFlood; } + export class ProfileTabPosts extends VirtualClass { + CONSTRUCTOR_ID: 3113014934; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabPosts'; + + static fromReader(reader: Reader): ProfileTabPosts; + } + export class ProfileTabGifts extends VirtualClass { + CONSTRUCTOR_ID: 1296815210; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabGifts'; + + static fromReader(reader: Reader): ProfileTabGifts; + } + export class ProfileTabMedia extends VirtualClass { + CONSTRUCTOR_ID: 1925597525; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabMedia'; + + static fromReader(reader: Reader): ProfileTabMedia; + } + export class ProfileTabFiles extends VirtualClass { + CONSTRUCTOR_ID: 2872286208; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabFiles'; + + static fromReader(reader: Reader): ProfileTabFiles; + } + export class ProfileTabMusic extends VirtualClass { + CONSTRUCTOR_ID: 2670187118; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabMusic'; + + static fromReader(reader: Reader): ProfileTabMusic; + } + export class ProfileTabVoice extends VirtualClass { + CONSTRUCTOR_ID: 3833006382; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabVoice'; + + static fromReader(reader: Reader): ProfileTabVoice; + } + export class ProfileTabLinks extends VirtualClass { + CONSTRUCTOR_ID: 3546637465; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabLinks'; + + static fromReader(reader: Reader): ProfileTabLinks; + } + export class ProfileTabGifs extends VirtualClass { + CONSTRUCTOR_ID: 2730555029; + SUBCLASS_OF_ID: 2924007860; + className: 'ProfileTabGifs'; + + static fromReader(reader: Reader): ProfileTabGifs; + } export class ResPQ extends VirtualClass<{ nonce: int128; serverNonce: int128; @@ -18220,10 +18296,14 @@ namespace Api { export class SentCodePaymentRequired extends VirtualClass<{ storeProduct: string; phoneCodeHash: string; + supportEmailAddress: string; + supportEmailSubject: string; }> { storeProduct: string; phoneCodeHash: string; - CONSTRUCTOR_ID: 3620665728; + supportEmailAddress: string; + supportEmailSubject: string; + CONSTRUCTOR_ID: 3617783033; SUBCLASS_OF_ID: 1827172481; className: 'SentCodePaymentRequired'; @@ -19853,11 +19933,13 @@ namespace Api { } export class WebPagePreview extends VirtualClass<{ media: Api.TypeMessageMedia; + chats: Api.TypeChat[]; users: Api.TypeUser[]; }> { media: Api.TypeMessageMedia; + chats: Api.TypeChat[]; users: Api.TypeUser[]; - CONSTRUCTOR_ID: 3040774945; + CONSTRUCTOR_ID: 2358937772; SUBCLASS_OF_ID: 3801354434; className: 'WebPagePreview'; @@ -20954,6 +21036,23 @@ namespace Api { static fromReader(reader: Reader): PaidMessagesRevenue; } + export class SavedMusicIdsNotModified extends VirtualClass { + CONSTRUCTOR_ID: 1338514798; + SUBCLASS_OF_ID: 1263203986; + className: 'SavedMusicIdsNotModified'; + + static fromReader(reader: Reader): SavedMusicIdsNotModified; + } + export class SavedMusicIds extends VirtualClass<{ + ids: long[]; + }> { + ids: long[]; + CONSTRUCTOR_ID: 2576180790; + SUBCLASS_OF_ID: 1263203986; + className: 'SavedMusicIds'; + + static fromReader(reader: Reader): SavedMusicIds; + } } export namespace channels { @@ -21474,11 +21573,13 @@ namespace Api { } export class UniqueStarGift extends VirtualClass<{ gift: Api.TypeStarGift; + chats: Api.TypeChat[]; users: Api.TypeUser[]; }> { gift: Api.TypeStarGift; + chats: Api.TypeChat[]; users: Api.TypeUser[]; - CONSTRUCTOR_ID: 3399677451; + CONSTRUCTOR_ID: 1097619176; SUBCLASS_OF_ID: 2024850939; className: 'UniqueStarGift'; @@ -21597,6 +21698,23 @@ namespace Api { static fromReader(reader: Reader): UniqueStarGiftValueInfo; } + export class CheckCanSendGiftResultOk extends VirtualClass { + CONSTRUCTOR_ID: 927967149; + SUBCLASS_OF_ID: 1664023088; + className: 'CheckCanSendGiftResultOk'; + + static fromReader(reader: Reader): CheckCanSendGiftResultOk; + } + export class CheckCanSendGiftResultFail extends VirtualClass<{ + reason: Api.TypeTextWithEntities; + }> { + reason: Api.TypeTextWithEntities; + CONSTRUCTOR_ID: 3588588148; + SUBCLASS_OF_ID: 1664023088; + className: 'CheckCanSendGiftResultFail'; + + static fromReader(reader: Reader): CheckCanSendGiftResultFail; + } } export namespace phone { @@ -21889,6 +22007,28 @@ namespace Api { static fromReader(reader: Reader): UsersSlice; } + export class SavedMusicNotModified extends VirtualClass<{ + count: int; + }> { + count: int; + CONSTRUCTOR_ID: 3817310884; + SUBCLASS_OF_ID: 4162039351; + className: 'SavedMusicNotModified'; + + static fromReader(reader: Reader): SavedMusicNotModified; + } + export class SavedMusic extends VirtualClass<{ + count: int; + documents: Api.TypeDocument[]; + }> { + count: int; + documents: Api.TypeDocument[]; + CONSTRUCTOR_ID: 883094167; + SUBCLASS_OF_ID: 4162039351; + className: 'SavedMusic'; + + static fromReader(reader: Reader): SavedMusic; + } } export namespace chatlists { @@ -23396,6 +23536,27 @@ namespace Api { parentPeer?: Api.TypeInputPeer; userId: Api.TypeInputUser; } + export class SetMainProfileTab extends Request<{ + tab: Api.TypeProfileTab; + }, Bool> { + tab: Api.TypeProfileTab; + } + export class SaveMusic extends Request<{ + // flags: Api.Type; + unsave?: true; + id: Api.TypeInputDocument; + afterId?: Api.TypeInputDocument; + }, Bool> { + // flags: Api.Type; + unsave?: true; + id: Api.TypeInputDocument; + afterId?: Api.TypeInputDocument; + } + export class GetSavedMusicIds extends Request<{ + hash: long; + }, account.TypeSavedMusicIds> { + hash: long; + } } export namespace users { @@ -23421,6 +23582,24 @@ namespace Api { }, Api.TypeRequirementToContact[]> { id: Api.TypeInputUser[]; } + export class GetSavedMusic extends Request<{ + id: Api.TypeInputUser; + offset: int; + limit: int; + hash: long; + }, users.TypeSavedMusic> { + id: Api.TypeInputUser; + offset: int; + limit: int; + hash: long; + } + export class GetSavedMusicByID extends Request<{ + id: Api.TypeInputUser; + documents: Api.TypeInputDocument[]; + }, users.TypeSavedMusic> { + id: Api.TypeInputUser; + documents: Api.TypeInputDocument[]; + } } export namespace contacts { @@ -26787,6 +26966,13 @@ namespace Api { // flags: Api.Type; query?: string; } + export class SetMainProfileTab extends Request<{ + channel: Api.TypeInputChannel; + tab: Api.TypeProfileTab; + }, Bool> { + channel: Api.TypeInputChannel; + tab: Api.TypeProfileTab; + } } export namespace bots { @@ -27501,6 +27687,11 @@ namespace Api { }, payments.TypeUniqueStarGiftValueInfo> { slug: string; } + export class CheckCanSendGift extends Request<{ + giftId: long; + }, payments.TypeCheckCanSendGiftResult> { + giftId: long; + } } export namespace stickers { @@ -28546,17 +28737,17 @@ namespace Api { export type AnyRequest = InvokeAfterMsg | InvokeAfterMsgs | InitConnection | InvokeWithLayer | InvokeWithoutUpdates | InvokeWithMessagesRange | InvokeWithTakeout | InvokeWithBusinessConnection | InvokeWithGooglePlayIntegrity | InvokeWithApnsSecret | InvokeWithReCaptcha | ReqPq | ReqPqMulti | ReqPqMultiNew | ReqDHParams | SetClientDHParams | DestroyAuthKey | RpcDropAnswer | GetFutureSalts | Ping | PingDelayDisconnect | DestroySession | auth.SendCode | auth.SignUp | auth.SignIn | auth.LogOut | auth.ResetAuthorizations | auth.ExportAuthorization | auth.ImportAuthorization | auth.BindTempAuthKey | auth.ImportBotAuthorization | auth.CheckPassword | auth.RequestPasswordRecovery | auth.RecoverPassword | auth.ResendCode | auth.CancelCode | auth.DropTempAuthKeys | auth.ExportLoginToken | auth.ImportLoginToken | auth.AcceptLoginToken | auth.CheckRecoveryPassword | auth.ImportWebTokenAuthorization | auth.RequestFirebaseSms | auth.ResetLoginEmail | auth.ReportMissingCode - | account.RegisterDevice | account.UnregisterDevice | account.UpdateNotifySettings | account.GetNotifySettings | account.ResetNotifySettings | account.UpdateProfile | account.UpdateStatus | account.GetWallPapers | account.ReportPeer | account.CheckUsername | account.UpdateUsername | account.GetPrivacy | account.SetPrivacy | account.DeleteAccount | account.GetAccountTTL | account.SetAccountTTL | account.SendChangePhoneCode | account.ChangePhone | account.UpdateDeviceLocked | account.GetAuthorizations | account.ResetAuthorization | account.GetPassword | account.GetPasswordSettings | account.UpdatePasswordSettings | account.SendConfirmPhoneCode | account.ConfirmPhone | account.GetTmpPassword | account.GetWebAuthorizations | account.ResetWebAuthorization | account.ResetWebAuthorizations | account.GetAllSecureValues | account.GetSecureValue | account.SaveSecureValue | account.DeleteSecureValue | account.GetAuthorizationForm | account.AcceptAuthorization | account.SendVerifyPhoneCode | account.VerifyPhone | account.SendVerifyEmailCode | account.VerifyEmail | account.InitTakeoutSession | account.FinishTakeoutSession | account.ConfirmPasswordEmail | account.ResendPasswordEmail | account.CancelPasswordEmail | account.GetContactSignUpNotification | account.SetContactSignUpNotification | account.GetNotifyExceptions | account.GetWallPaper | account.UploadWallPaper | account.SaveWallPaper | account.InstallWallPaper | account.ResetWallPapers | account.GetAutoDownloadSettings | account.SaveAutoDownloadSettings | account.UploadTheme | account.CreateTheme | account.UpdateTheme | account.SaveTheme | account.InstallTheme | account.GetTheme | account.GetThemes | account.SetContentSettings | account.GetContentSettings | account.GetMultiWallPapers | account.GetGlobalPrivacySettings | account.SetGlobalPrivacySettings | account.ReportProfilePhoto | account.ResetPassword | account.DeclinePasswordReset | account.GetChatThemes | account.SetAuthorizationTTL | account.ChangeAuthorizationSettings | account.GetSavedRingtones | account.SaveRingtone | account.UploadRingtone | account.UpdateEmojiStatus | account.GetDefaultEmojiStatuses | account.GetRecentEmojiStatuses | account.ClearRecentEmojiStatuses | account.ReorderUsernames | account.ToggleUsername | account.GetDefaultProfilePhotoEmojis | account.GetDefaultGroupPhotoEmojis | account.GetAutoSaveSettings | account.SaveAutoSaveSettings | account.DeleteAutoSaveExceptions | account.InvalidateSignInCodes | account.UpdateColor | account.GetDefaultBackgroundEmojis | account.GetChannelDefaultEmojiStatuses | account.GetChannelRestrictedStatusEmojis | account.UpdateBusinessWorkHours | account.UpdateBusinessLocation | account.UpdateBusinessGreetingMessage | account.UpdateBusinessAwayMessage | account.UpdateConnectedBot | account.GetConnectedBots | account.GetBotBusinessConnection | account.UpdateBusinessIntro | account.ToggleConnectedBotPaused | account.DisablePeerConnectedBot | account.UpdateBirthday | account.CreateBusinessChatLink | account.EditBusinessChatLink | account.DeleteBusinessChatLink | account.GetBusinessChatLinks | account.ResolveBusinessChatLink | account.UpdatePersonalChannel | account.ToggleSponsoredMessages | account.GetReactionsNotifySettings | account.SetReactionsNotifySettings | account.GetCollectibleEmojiStatuses | account.GetPaidMessagesRevenue | account.ToggleNoPaidMessagesException - | users.GetUsers | users.GetFullUser | users.SetSecureValueErrors | users.GetRequirementsToContact + | account.RegisterDevice | account.UnregisterDevice | account.UpdateNotifySettings | account.GetNotifySettings | account.ResetNotifySettings | account.UpdateProfile | account.UpdateStatus | account.GetWallPapers | account.ReportPeer | account.CheckUsername | account.UpdateUsername | account.GetPrivacy | account.SetPrivacy | account.DeleteAccount | account.GetAccountTTL | account.SetAccountTTL | account.SendChangePhoneCode | account.ChangePhone | account.UpdateDeviceLocked | account.GetAuthorizations | account.ResetAuthorization | account.GetPassword | account.GetPasswordSettings | account.UpdatePasswordSettings | account.SendConfirmPhoneCode | account.ConfirmPhone | account.GetTmpPassword | account.GetWebAuthorizations | account.ResetWebAuthorization | account.ResetWebAuthorizations | account.GetAllSecureValues | account.GetSecureValue | account.SaveSecureValue | account.DeleteSecureValue | account.GetAuthorizationForm | account.AcceptAuthorization | account.SendVerifyPhoneCode | account.VerifyPhone | account.SendVerifyEmailCode | account.VerifyEmail | account.InitTakeoutSession | account.FinishTakeoutSession | account.ConfirmPasswordEmail | account.ResendPasswordEmail | account.CancelPasswordEmail | account.GetContactSignUpNotification | account.SetContactSignUpNotification | account.GetNotifyExceptions | account.GetWallPaper | account.UploadWallPaper | account.SaveWallPaper | account.InstallWallPaper | account.ResetWallPapers | account.GetAutoDownloadSettings | account.SaveAutoDownloadSettings | account.UploadTheme | account.CreateTheme | account.UpdateTheme | account.SaveTheme | account.InstallTheme | account.GetTheme | account.GetThemes | account.SetContentSettings | account.GetContentSettings | account.GetMultiWallPapers | account.GetGlobalPrivacySettings | account.SetGlobalPrivacySettings | account.ReportProfilePhoto | account.ResetPassword | account.DeclinePasswordReset | account.GetChatThemes | account.SetAuthorizationTTL | account.ChangeAuthorizationSettings | account.GetSavedRingtones | account.SaveRingtone | account.UploadRingtone | account.UpdateEmojiStatus | account.GetDefaultEmojiStatuses | account.GetRecentEmojiStatuses | account.ClearRecentEmojiStatuses | account.ReorderUsernames | account.ToggleUsername | account.GetDefaultProfilePhotoEmojis | account.GetDefaultGroupPhotoEmojis | account.GetAutoSaveSettings | account.SaveAutoSaveSettings | account.DeleteAutoSaveExceptions | account.InvalidateSignInCodes | account.UpdateColor | account.GetDefaultBackgroundEmojis | account.GetChannelDefaultEmojiStatuses | account.GetChannelRestrictedStatusEmojis | account.UpdateBusinessWorkHours | account.UpdateBusinessLocation | account.UpdateBusinessGreetingMessage | account.UpdateBusinessAwayMessage | account.UpdateConnectedBot | account.GetConnectedBots | account.GetBotBusinessConnection | account.UpdateBusinessIntro | account.ToggleConnectedBotPaused | account.DisablePeerConnectedBot | account.UpdateBirthday | account.CreateBusinessChatLink | account.EditBusinessChatLink | account.DeleteBusinessChatLink | account.GetBusinessChatLinks | account.ResolveBusinessChatLink | account.UpdatePersonalChannel | account.ToggleSponsoredMessages | account.GetReactionsNotifySettings | account.SetReactionsNotifySettings | account.GetCollectibleEmojiStatuses | account.GetPaidMessagesRevenue | account.ToggleNoPaidMessagesException | account.SetMainProfileTab | account.SaveMusic | account.GetSavedMusicIds + | users.GetUsers | users.GetFullUser | users.SetSecureValueErrors | users.GetRequirementsToContact | users.GetSavedMusic | users.GetSavedMusicByID | contacts.GetContactIDs | contacts.GetStatuses | contacts.GetContacts | contacts.ImportContacts | contacts.DeleteContacts | contacts.DeleteByPhones | contacts.Block | contacts.Unblock | contacts.GetBlocked | contacts.Search | contacts.ResolveUsername | contacts.GetTopPeers | contacts.ResetTopPeerRating | contacts.ResetSaved | contacts.GetSaved | contacts.ToggleTopPeers | contacts.AddContact | contacts.AcceptContact | contacts.GetLocated | contacts.BlockFromReplies | contacts.ResolvePhone | contacts.ExportContactToken | contacts.ImportContactToken | contacts.EditCloseFriends | contacts.SetBlocked | contacts.GetBirthdays | contacts.GetSponsoredPeers | messages.GetMessages | messages.GetDialogs | messages.GetHistory | messages.Search | messages.ReadHistory | messages.DeleteHistory | messages.DeleteMessages | messages.ReceivedMessages | messages.SetTyping | messages.SendMessage | messages.SendMedia | messages.ForwardMessages | messages.ReportSpam | messages.GetPeerSettings | messages.Report | messages.GetChats | messages.GetFullChat | messages.EditChatTitle | messages.EditChatPhoto | messages.AddChatUser | messages.DeleteChatUser | messages.CreateChat | messages.GetDhConfig | messages.RequestEncryption | messages.AcceptEncryption | messages.DiscardEncryption | messages.SetEncryptedTyping | messages.ReadEncryptedHistory | messages.SendEncrypted | messages.SendEncryptedFile | messages.SendEncryptedService | messages.ReceivedQueue | messages.ReportEncryptedSpam | messages.ReadMessageContents | messages.GetStickers | messages.GetAllStickers | messages.GetWebPagePreview | messages.ExportChatInvite | messages.CheckChatInvite | messages.ImportChatInvite | messages.GetStickerSet | messages.InstallStickerSet | messages.UninstallStickerSet | messages.StartBot | messages.GetMessagesViews | messages.EditChatAdmin | messages.MigrateChat | messages.SearchGlobal | messages.ReorderStickerSets | messages.GetDocumentByHash | messages.GetSavedGifs | messages.SaveGif | messages.GetInlineBotResults | messages.SetInlineBotResults | messages.SendInlineBotResult | messages.GetMessageEditData | messages.EditMessage | messages.EditInlineBotMessage | messages.GetBotCallbackAnswer | messages.SetBotCallbackAnswer | messages.GetPeerDialogs | messages.SaveDraft | messages.GetAllDrafts | messages.GetFeaturedStickers | messages.ReadFeaturedStickers | messages.GetRecentStickers | messages.SaveRecentSticker | messages.ClearRecentStickers | messages.GetArchivedStickers | messages.GetMaskStickers | messages.GetAttachedStickers | messages.SetGameScore | messages.SetInlineGameScore | messages.GetGameHighScores | messages.GetInlineGameHighScores | messages.GetCommonChats | messages.GetWebPage | messages.ToggleDialogPin | messages.ReorderPinnedDialogs | messages.GetPinnedDialogs | messages.SetBotShippingResults | messages.SetBotPrecheckoutResults | messages.UploadMedia | messages.SendScreenshotNotification | messages.GetFavedStickers | messages.FaveSticker | messages.GetUnreadMentions | messages.ReadMentions | messages.GetRecentLocations | messages.SendMultiMedia | messages.UploadEncryptedFile | messages.SearchStickerSets | messages.GetSplitRanges | messages.MarkDialogUnread | messages.GetDialogUnreadMarks | messages.ClearAllDrafts | messages.UpdatePinnedMessage | messages.SendVote | messages.GetPollResults | messages.GetOnlines | messages.EditChatAbout | messages.EditChatDefaultBannedRights | messages.GetEmojiKeywords | messages.GetEmojiKeywordsDifference | messages.GetEmojiKeywordsLanguages | messages.GetEmojiURL | messages.GetSearchCounters | messages.RequestUrlAuth | messages.AcceptUrlAuth | messages.HidePeerSettingsBar | messages.GetScheduledHistory | messages.GetScheduledMessages | messages.SendScheduledMessages | messages.DeleteScheduledMessages | messages.GetPollVotes | messages.ToggleStickerSets | messages.GetDialogFilters | messages.GetSuggestedDialogFilters | messages.UpdateDialogFilter | messages.UpdateDialogFiltersOrder | messages.GetOldFeaturedStickers | messages.GetReplies | messages.GetDiscussionMessage | messages.ReadDiscussion | messages.UnpinAllMessages | messages.DeleteChat | messages.DeletePhoneCallHistory | messages.CheckHistoryImport | messages.InitHistoryImport | messages.UploadImportedMedia | messages.StartHistoryImport | messages.GetExportedChatInvites | messages.GetExportedChatInvite | messages.EditExportedChatInvite | messages.DeleteRevokedExportedChatInvites | messages.DeleteExportedChatInvite | messages.GetAdminsWithInvites | messages.GetChatInviteImporters | messages.SetHistoryTTL | messages.CheckHistoryImportPeer | messages.SetChatTheme | messages.GetMessageReadParticipants | messages.GetSearchResultsCalendar | messages.GetSearchResultsPositions | messages.HideChatJoinRequest | messages.HideAllChatJoinRequests | messages.ToggleNoForwards | messages.SaveDefaultSendAs | messages.SendReaction | messages.GetMessagesReactions | messages.GetMessageReactionsList | messages.SetChatAvailableReactions | messages.GetAvailableReactions | messages.SetDefaultReaction | messages.TranslateText | messages.GetUnreadReactions | messages.ReadReactions | messages.SearchSentMedia | messages.GetAttachMenuBots | messages.GetAttachMenuBot | messages.ToggleBotInAttachMenu | messages.RequestWebView | messages.ProlongWebView | messages.RequestSimpleWebView | messages.SendWebViewResultMessage | messages.SendWebViewData | messages.TranscribeAudio | messages.RateTranscribedAudio | messages.GetCustomEmojiDocuments | messages.GetEmojiStickers | messages.GetFeaturedEmojiStickers | messages.ReportReaction | messages.GetTopReactions | messages.GetRecentReactions | messages.ClearRecentReactions | messages.GetExtendedMedia | messages.SetDefaultHistoryTTL | messages.GetDefaultHistoryTTL | messages.SendBotRequestedPeer | messages.GetEmojiGroups | messages.GetEmojiStatusGroups | messages.GetEmojiProfilePhotoGroups | messages.SearchCustomEmoji | messages.TogglePeerTranslations | messages.GetBotApp | messages.RequestAppWebView | messages.SetChatWallPaper | messages.SearchEmojiStickerSets | messages.GetSavedDialogs | messages.GetSavedHistory | messages.DeleteSavedHistory | messages.GetPinnedSavedDialogs | messages.ToggleSavedDialogPin | messages.ReorderPinnedSavedDialogs | messages.GetSavedReactionTags | messages.UpdateSavedReactionTag | messages.GetDefaultTagReactions | messages.GetOutboxReadDate | messages.GetQuickReplies | messages.ReorderQuickReplies | messages.CheckQuickReplyShortcut | messages.EditQuickReplyShortcut | messages.DeleteQuickReplyShortcut | messages.GetQuickReplyMessages | messages.SendQuickReplyMessages | messages.DeleteQuickReplyMessages | messages.ToggleDialogFilterTags | messages.GetMyStickers | messages.GetEmojiStickerGroups | messages.GetAvailableEffects | messages.EditFactCheck | messages.DeleteFactCheck | messages.GetFactCheck | messages.RequestMainWebView | messages.SendPaidReaction | messages.TogglePaidReactionPrivacy | messages.GetPaidReactionPrivacy | messages.ViewSponsoredMessage | messages.ClickSponsoredMessage | messages.ReportSponsoredMessage | messages.GetSponsoredMessages | messages.SavePreparedInlineMessage | messages.GetPreparedInlineMessage | messages.SearchStickers | messages.ReportMessagesDelivery | messages.GetSavedDialogsByID | messages.ReadSavedHistory | messages.ToggleTodoCompleted | messages.AppendTodoList | messages.ToggleSuggestedPostApproval | updates.GetState | updates.GetDifference | updates.GetChannelDifference | photos.UpdateProfilePhoto | photos.UploadProfilePhoto | photos.DeletePhotos | photos.GetUserPhotos | photos.UploadContactProfilePhoto | upload.SaveFilePart | upload.GetFile | upload.SaveBigFilePart | upload.GetWebFile | upload.GetCdnFile | upload.ReuploadCdnFile | upload.GetCdnFileHashes | upload.GetFileHashes | help.GetConfig | help.GetNearestDc | help.GetAppUpdate | help.GetInviteText | help.GetSupport | help.SetBotUpdatesStatus | help.GetCdnConfig | help.GetRecentMeUrls | help.GetTermsOfServiceUpdate | help.AcceptTermsOfService | help.GetDeepLinkInfo | help.GetAppConfig | help.SaveAppLog | help.GetPassportConfig | help.GetSupportName | help.GetUserInfo | help.EditUserInfo | help.GetPromoData | help.HidePromoData | help.DismissSuggestion | help.GetCountriesList | help.GetPremiumPromo | help.GetPeerColors | help.GetPeerProfileColors | help.GetTimezonesList - | channels.ReadHistory | channels.DeleteMessages | channels.ReportSpam | channels.GetMessages | channels.GetParticipants | channels.GetParticipant | channels.GetChannels | channels.GetFullChannel | channels.CreateChannel | channels.EditAdmin | channels.EditTitle | channels.EditPhoto | channels.CheckUsername | channels.UpdateUsername | channels.JoinChannel | channels.LeaveChannel | channels.InviteToChannel | channels.DeleteChannel | channels.ExportMessageLink | channels.ToggleSignatures | channels.GetAdminedPublicChannels | channels.EditBanned | channels.GetAdminLog | channels.SetStickers | channels.ReadMessageContents | channels.DeleteHistory | channels.TogglePreHistoryHidden | channels.GetLeftChannels | channels.GetGroupsForDiscussion | channels.SetDiscussionGroup | channels.EditCreator | channels.EditLocation | channels.ToggleSlowMode | channels.GetInactiveChannels | channels.ConvertToGigagroup | channels.GetSendAs | channels.DeleteParticipantHistory | channels.ToggleJoinToSend | channels.ToggleJoinRequest | channels.ReorderUsernames | channels.ToggleUsername | channels.DeactivateAllUsernames | channels.ToggleForum | channels.CreateForumTopic | channels.GetForumTopics | channels.GetForumTopicsByID | channels.EditForumTopic | channels.UpdatePinnedForumTopic | channels.DeleteTopicHistory | channels.ReorderPinnedForumTopics | channels.ToggleAntiSpam | channels.ReportAntiSpamFalsePositive | channels.ToggleParticipantsHidden | channels.UpdateColor | channels.ToggleViewForumAsMessages | channels.GetChannelRecommendations | channels.UpdateEmojiStatus | channels.SetBoostsToUnblockRestrictions | channels.SetEmojiStickers | channels.RestrictSponsoredMessages | channels.SearchPosts | channels.UpdatePaidMessagesPrice | channels.ToggleAutotranslation | channels.GetMessageAuthor | channels.CheckSearchPostsFlood + | channels.ReadHistory | channels.DeleteMessages | channels.ReportSpam | channels.GetMessages | channels.GetParticipants | channels.GetParticipant | channels.GetChannels | channels.GetFullChannel | channels.CreateChannel | channels.EditAdmin | channels.EditTitle | channels.EditPhoto | channels.CheckUsername | channels.UpdateUsername | channels.JoinChannel | channels.LeaveChannel | channels.InviteToChannel | channels.DeleteChannel | channels.ExportMessageLink | channels.ToggleSignatures | channels.GetAdminedPublicChannels | channels.EditBanned | channels.GetAdminLog | channels.SetStickers | channels.ReadMessageContents | channels.DeleteHistory | channels.TogglePreHistoryHidden | channels.GetLeftChannels | channels.GetGroupsForDiscussion | channels.SetDiscussionGroup | channels.EditCreator | channels.EditLocation | channels.ToggleSlowMode | channels.GetInactiveChannels | channels.ConvertToGigagroup | channels.GetSendAs | channels.DeleteParticipantHistory | channels.ToggleJoinToSend | channels.ToggleJoinRequest | channels.ReorderUsernames | channels.ToggleUsername | channels.DeactivateAllUsernames | channels.ToggleForum | channels.CreateForumTopic | channels.GetForumTopics | channels.GetForumTopicsByID | channels.EditForumTopic | channels.UpdatePinnedForumTopic | channels.DeleteTopicHistory | channels.ReorderPinnedForumTopics | channels.ToggleAntiSpam | channels.ReportAntiSpamFalsePositive | channels.ToggleParticipantsHidden | channels.UpdateColor | channels.ToggleViewForumAsMessages | channels.GetChannelRecommendations | channels.UpdateEmojiStatus | channels.SetBoostsToUnblockRestrictions | channels.SetEmojiStickers | channels.RestrictSponsoredMessages | channels.SearchPosts | channels.UpdatePaidMessagesPrice | channels.ToggleAutotranslation | channels.GetMessageAuthor | channels.CheckSearchPostsFlood | channels.SetMainProfileTab | bots.SendCustomRequest | bots.AnswerWebhookJSONQuery | bots.SetBotCommands | bots.ResetBotCommands | bots.GetBotCommands | bots.SetBotMenuButton | bots.GetBotMenuButton | bots.SetBotBroadcastDefaultAdminRights | bots.SetBotGroupDefaultAdminRights | bots.SetBotInfo | bots.GetBotInfo | bots.ReorderUsernames | bots.ToggleUsername | bots.CanSendMessage | bots.AllowSendMessage | bots.InvokeWebViewCustomMethod | bots.GetPopularAppBots | bots.AddPreviewMedia | bots.EditPreviewMedia | bots.DeletePreviewMedia | bots.ReorderPreviewMedias | bots.GetPreviewInfo | bots.GetPreviewMedias | bots.UpdateUserEmojiStatus | bots.ToggleUserEmojiStatusPermission | bots.CheckDownloadFileParams | bots.GetAdminedBots | bots.UpdateStarRefProgram | bots.SetCustomVerification | bots.GetBotRecommendations - | payments.GetPaymentForm | payments.GetPaymentReceipt | payments.ValidateRequestedInfo | payments.SendPaymentForm | payments.GetSavedInfo | payments.ClearSavedInfo | payments.GetBankCardData | payments.ExportInvoice | payments.AssignAppStoreTransaction | payments.AssignPlayMarketTransaction | payments.GetPremiumGiftCodeOptions | payments.CheckGiftCode | payments.ApplyGiftCode | payments.GetGiveawayInfo | payments.LaunchPrepaidGiveaway | payments.GetStarsTopupOptions | payments.GetStarsStatus | payments.GetStarsTransactions | payments.SendStarsForm | payments.RefundStarsCharge | payments.GetStarsRevenueStats | payments.GetStarsRevenueWithdrawalUrl | payments.GetStarsRevenueAdsAccountUrl | payments.GetStarsTransactionsByID | payments.GetStarsGiftOptions | payments.GetStarsSubscriptions | payments.ChangeStarsSubscription | payments.FulfillStarsSubscription | payments.GetStarsGiveawayOptions | payments.GetStarGifts | payments.SaveStarGift | payments.ConvertStarGift | payments.BotCancelStarsSubscription | payments.GetConnectedStarRefBots | payments.GetConnectedStarRefBot | payments.GetSuggestedStarRefBots | payments.ConnectStarRefBot | payments.EditConnectedStarRefBot | payments.GetStarGiftUpgradePreview | payments.UpgradeStarGift | payments.TransferStarGift | payments.GetUniqueStarGift | payments.GetSavedStarGifts | payments.GetSavedStarGift | payments.GetStarGiftWithdrawalUrl | payments.ToggleChatStarGiftNotifications | payments.ToggleStarGiftsPinnedToTop | payments.CanPurchaseStore | payments.GetResaleStarGifts | payments.UpdateStarGiftPrice | payments.CreateStarGiftCollection | payments.UpdateStarGiftCollection | payments.ReorderStarGiftCollections | payments.DeleteStarGiftCollection | payments.GetStarGiftCollections | payments.GetUniqueStarGiftValueInfo + | payments.GetPaymentForm | payments.GetPaymentReceipt | payments.ValidateRequestedInfo | payments.SendPaymentForm | payments.GetSavedInfo | payments.ClearSavedInfo | payments.GetBankCardData | payments.ExportInvoice | payments.AssignAppStoreTransaction | payments.AssignPlayMarketTransaction | payments.GetPremiumGiftCodeOptions | payments.CheckGiftCode | payments.ApplyGiftCode | payments.GetGiveawayInfo | payments.LaunchPrepaidGiveaway | payments.GetStarsTopupOptions | payments.GetStarsStatus | payments.GetStarsTransactions | payments.SendStarsForm | payments.RefundStarsCharge | payments.GetStarsRevenueStats | payments.GetStarsRevenueWithdrawalUrl | payments.GetStarsRevenueAdsAccountUrl | payments.GetStarsTransactionsByID | payments.GetStarsGiftOptions | payments.GetStarsSubscriptions | payments.ChangeStarsSubscription | payments.FulfillStarsSubscription | payments.GetStarsGiveawayOptions | payments.GetStarGifts | payments.SaveStarGift | payments.ConvertStarGift | payments.BotCancelStarsSubscription | payments.GetConnectedStarRefBots | payments.GetConnectedStarRefBot | payments.GetSuggestedStarRefBots | payments.ConnectStarRefBot | payments.EditConnectedStarRefBot | payments.GetStarGiftUpgradePreview | payments.UpgradeStarGift | payments.TransferStarGift | payments.GetUniqueStarGift | payments.GetSavedStarGifts | payments.GetSavedStarGift | payments.GetStarGiftWithdrawalUrl | payments.ToggleChatStarGiftNotifications | payments.ToggleStarGiftsPinnedToTop | payments.CanPurchaseStore | payments.GetResaleStarGifts | payments.UpdateStarGiftPrice | payments.CreateStarGiftCollection | payments.UpdateStarGiftCollection | payments.ReorderStarGiftCollections | payments.DeleteStarGiftCollection | payments.GetStarGiftCollections | payments.GetUniqueStarGiftValueInfo | payments.CheckCanSendGift | stickers.CreateStickerSet | stickers.RemoveStickerFromSet | stickers.ChangeStickerPosition | stickers.AddStickerToSet | stickers.SetStickerSetThumb | stickers.CheckShortName | stickers.SuggestShortName | stickers.ChangeSticker | stickers.RenameStickerSet | stickers.DeleteStickerSet | stickers.ReplaceSticker | phone.GetCallConfig | phone.RequestCall | phone.AcceptCall | phone.ConfirmCall | phone.ReceivedCall | phone.DiscardCall | phone.SetCallRating | phone.SaveCallDebug | phone.SendSignalingData | phone.CreateGroupCall | phone.JoinGroupCall | phone.LeaveGroupCall | phone.InviteToGroupCall | phone.DiscardGroupCall | phone.ToggleGroupCallSettings | phone.GetGroupCall | phone.GetGroupParticipants | phone.CheckGroupCall | phone.ToggleGroupCallRecord | phone.EditGroupCallParticipant | phone.EditGroupCallTitle | phone.GetGroupCallJoinAs | phone.ExportGroupCallInvite | phone.ToggleGroupCallStartSubscription | phone.StartScheduledGroupCall | phone.SaveDefaultGroupCallJoinAs | phone.JoinGroupCallPresentation | phone.LeaveGroupCallPresentation | phone.GetGroupCallStreamChannels | phone.GetGroupCallStreamRtmpUrl | phone.SaveCallLog | phone.CreateConferenceCall | phone.DeleteConferenceCallParticipants | phone.SendConferenceCallBroadcast | phone.InviteConferenceCallParticipant | phone.DeclineConferenceCallInvite | phone.GetGroupCallChainBlocks | langpack.GetLangPack | langpack.GetStrings | langpack.GetDifference | langpack.GetLanguages | langpack.GetLanguage diff --git a/src/lib/gramjs/tl/apiTl.ts b/src/lib/gramjs/tl/apiTl.ts index 1e49aba07..1b98bb515 100644 --- a/src/lib/gramjs/tl/apiTl.ts +++ b/src/lib/gramjs/tl/apiTl.ts @@ -84,7 +84,7 @@ chatForbidden#6592a1a7 id:long title:string = Chat; channel#fe685355 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# stories_hidden:flags2.1?true stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true signature_profiles:flags2.12?true autotranslation:flags2.15?true broadcast_messages_allowed:flags2.16?true monoforum:flags2.17?true forum_tabs:flags2.19?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector stories_max_id:flags2.4?int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor emoji_status:flags2.9?EmojiStatus level:flags2.10?int subscription_until_date:flags2.11?int bot_verification_icon:flags2.13?long send_paid_messages_stars:flags2.14?long linked_monoforum_id:flags2.18?long = Chat; channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat; chatFull#2633421b flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector available_reactions:flags.18?ChatReactions reactions_limit:flags.20?int = ChatFull; -channelFull#e07429de flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true paid_reactions_available:flags2.16?true stargifts_available:flags2.19?true paid_messages_available:flags2.20?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet bot_verification:flags2.17?BotVerification stargifts_count:flags2.18?int send_paid_messages_stars:flags2.21?long = ChatFull; +channelFull#e4e0b29d flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true paid_reactions_available:flags2.16?true stargifts_available:flags2.19?true paid_messages_available:flags2.20?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet bot_verification:flags2.17?BotVerification stargifts_count:flags2.18?int send_paid_messages_stars:flags2.21?long main_tab:flags2.22?ProfileTab = ChatFull; chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant; chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant; chatParticipantAdmin#a0933f5b user_id:long inviter_id:long date:int = ChatParticipant; @@ -159,7 +159,7 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector boost_peer:flags.0?InputPeer currency:string amount:long message:flags.1?TextWithEntities = InputStorePaymentPurpose; inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector countries_iso2:flags.2?Vector prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose; -inputStorePaymentStarsTopup#dddd0f56 stars:long currency:string amount:long = InputStorePaymentPurpose; +inputStorePaymentStarsTopup#f9a2a6cb flags:# stars:long currency:string amount:long spend_purpose_peer:flags.0?InputPeer = InputStorePaymentPurpose; inputStorePaymentStarsGift#1d741ef7 user_id:InputUser stars:long currency:string amount:long = InputStorePaymentPurpose; inputStorePaymentStarsGiveaway#751f08fa flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true stars:long boost_peer:InputPeer additional_peers:flags.1?Vector countries_iso2:flags.2?Vector prize_description:flags.4?string random_id:long until_date:int currency:string amount:long users:int = InputStorePaymentPurpose; inputStorePaymentAuthCode#9bb2636d flags:# restore:flags.0?true phone_number:string phone_code_hash:string currency:string amount:long = InputStorePaymentPurpose; @@ -1388,7 +1388,7 @@ starsSubscription#2e6eab1a flags:# canceled:flags.0?true can_refulfill:flags.1?t messageReactor#4ba3a95a flags:# top:flags.0?true my:flags.1?true anonymous:flags.2?true peer_id:flags.3?Peer count:int = MessageReactor; starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true stars:long yearly_boosts:int store_product:flags.2?string currency:string amount:long winners:Vector = StarsGiveawayOption; starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption; -starGift#bcff5b flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int = StarGift; +starGift#80ac53c3 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int locked_until_date:flags.9?int = StarGift; starGiftUnique#26a5553e flags:# require_premium:flags.6?true resale_ton_only:flags.7?true id:long gift_id:long title:string slug:string num:int owner_id:flags.0?Peer owner_name:flags.1?string owner_address:flags.2?string attributes:Vector availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector released_by:flags.5?Peer value_amount:flags.8?long value_currency:flags.8?string = StarGift; payments.starGiftsNotModified#a388a368 = payments.StarGifts; payments.starGifts#2ed82995 hash:int gifts:Vector chats:Vector users:Vector = payments.StarGifts; @@ -1416,9 +1416,9 @@ starGiftAttributeOriginalDetails#e0bff26c flags:# sender_id:flags.0?Peer recipie payments.starGiftUpgradePreview#167bd90b sample_attributes:Vector = payments.StarGiftUpgradePreview; users.users#62d706b8 users:Vector = users.Users; users.usersSlice#315a4974 count:int users:Vector = users.Users; -payments.uniqueStarGift#caa2f60b gift:StarGift users:Vector = payments.UniqueStarGift; -messages.webPagePreview#b53e8b21 media:MessageMedia users:Vector = messages.WebPagePreview; -savedStarGift#19a9b572 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector prepaid_upgrade_hash:flags.16?string = SavedStarGift; +payments.uniqueStarGift#416c56e8 gift:StarGift chats:Vector users:Vector = payments.UniqueStarGift; +messages.webPagePreview#8c9a88ac media:MessageMedia chats:Vector users:Vector = messages.WebPagePreview; +savedStarGift#19a9b572 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true upgrade_separate:flags.17?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector prepaid_upgrade_hash:flags.16?string = SavedStarGift; payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector next_offset:flags.0?string chats:Vector users:Vector = payments.SavedStarGifts; inputSavedStarGiftUser#69279795 msg_id:int = InputSavedStarGift; inputSavedStarGiftChat#f101aa7f peer:InputPeer saved_id:long = InputSavedStarGift; @@ -1456,6 +1456,20 @@ stories.albumsNotModified#564edaeb = stories.Albums; stories.albums#c3987a3a hash:long albums:Vector = stories.Albums; searchPostsFlood#3e0b5b6a flags:# query_is_free:flags.0?true total_daily:int remains:int wait_till:flags.1?int stars_amount:long = SearchPostsFlood; payments.uniqueStarGiftValueInfo#512fe446 flags:# last_sale_on_fragment:flags.1?true value_is_average:flags.6?true currency:string value:long initial_sale_date:int initial_sale_stars:long initial_sale_price:long last_sale_date:flags.0?int last_sale_price:flags.0?long floor_price:flags.2?long average_price:flags.3?long listed_count:flags.4?int fragment_listed_count:flags.5?int fragment_listed_url:flags.5?string = payments.UniqueStarGiftValueInfo; +profileTabPosts#b98cd696 = ProfileTab; +profileTabGifts#4d4bd46a = ProfileTab; +profileTabMedia#72c64955 = ProfileTab; +profileTabFiles#ab339c00 = ProfileTab; +profileTabMusic#9f27d26e = ProfileTab; +profileTabVoice#e477092e = ProfileTab; +profileTabLinks#d3656499 = ProfileTab; +profileTabGifs#a2c0f695 = ProfileTab; +users.savedMusicNotModified#e3878aa4 count:int = users.SavedMusic; +users.savedMusic#34a2f297 count:int documents:Vector = users.SavedMusic; +account.savedMusicIdsNotModified#4fc81d6e = account.SavedMusicIds; +account.savedMusicIds#998d6636 ids:Vector = account.SavedMusicIds; +payments.checkCanSendGiftResultOk#374fa7ad = payments.CheckCanSendGiftResult; +payments.checkCanSendGiftResultFail#d5e58274 reason:TextWithEntities = payments.CheckCanSendGiftResult; ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; initConnection#c1cd5ea9 {X:Type} flags:# api_id:int device_model:string system_version:string app_version:string system_lang_code:string lang_pack:string lang_code:string proxy:flags.0?InputClientProxy params:flags.1?JSONValue query:!X = X; @@ -1800,6 +1814,7 @@ payments.getResaleStarGifts#7a5fa236 flags:# sort_by_price:flags.1?true sort_by_ payments.updateStarGiftPrice#edbe6ccb stargift:InputSavedStarGift resell_amount:StarsAmount = Updates; payments.getStarGiftCollections#981b91dd peer:InputPeer hash:long = payments.StarGiftCollections; payments.getUniqueStarGiftValueInfo#4365af6b slug:string = payments.UniqueStarGiftValueInfo; +payments.checkCanSendGift#c0c4edc9 gift_id:long = payments.CheckCanSendGiftResult; phone.requestCall#42ff96ed flags:# video:flags.0?true user_id:InputUser random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall; phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtocol = phone.PhoneCall; phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall; diff --git a/src/lib/gramjs/tl/static/api.json b/src/lib/gramjs/tl/static/api.json index d1120f423..5e1949382 100644 --- a/src/lib/gramjs/tl/static/api.json +++ b/src/lib/gramjs/tl/static/api.json @@ -320,6 +320,7 @@ "payments.refundStarsCharge", "payments.getStarsGiftOptions", "payments.getStarGifts", + "payments.checkCanSendGift", "payments.getSavedStarGifts", "payments.saveStarGift", "payments.convertStarGift", diff --git a/src/lib/gramjs/tl/static/api.tl b/src/lib/gramjs/tl/static/api.tl index 49e51b7d8..4ebda3ace 100644 --- a/src/lib/gramjs/tl/static/api.tl +++ b/src/lib/gramjs/tl/static/api.tl @@ -104,7 +104,7 @@ channel#fe685355 flags:# creator:flags.0?true left:flags.2?true broadcast:flags. channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat; chatFull#2633421b flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector available_reactions:flags.18?ChatReactions reactions_limit:flags.20?int = ChatFull; -channelFull#e07429de flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true paid_reactions_available:flags2.16?true stargifts_available:flags2.19?true paid_messages_available:flags2.20?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet bot_verification:flags2.17?BotVerification stargifts_count:flags2.18?int send_paid_messages_stars:flags2.21?long = ChatFull; +channelFull#e4e0b29d flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true paid_reactions_available:flags2.16?true stargifts_available:flags2.19?true paid_messages_available:flags2.20?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet bot_verification:flags2.17?BotVerification stargifts_count:flags2.18?int send_paid_messages_stars:flags2.21?long main_tab:flags2.22?ProfileTab = ChatFull; chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant; chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant; @@ -185,7 +185,7 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector boost_peer:flags.0?InputPeer currency:string amount:long message:flags.1?TextWithEntities = InputStorePaymentPurpose; inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector countries_iso2:flags.2?Vector prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose; -inputStorePaymentStarsTopup#dddd0f56 stars:long currency:string amount:long = InputStorePaymentPurpose; +inputStorePaymentStarsTopup#f9a2a6cb flags:# stars:long currency:string amount:long spend_purpose_peer:flags.0?InputPeer = InputStorePaymentPurpose; inputStorePaymentStarsGift#1d741ef7 user_id:InputUser stars:long currency:string amount:long = InputStorePaymentPurpose; inputStorePaymentStarsGiveaway#751f08fa flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true stars:long boost_peer:InputPeer additional_peers:flags.1?Vector countries_iso2:flags.2?Vector prize_description:flags.4?string random_id:long until_date:int currency:string amount:long users:int = InputStorePaymentPurpose; inputStorePaymentAuthCode#9bb2636d flags:# restore:flags.0?true phone_number:string phone_code_hash:string currency:string amount:long = InputStorePaymentPurpose; @@ -1892,7 +1892,7 @@ starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption; -starGift#bcff5b flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int = StarGift; +starGift#80ac53c3 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int locked_until_date:flags.9?int = StarGift; starGiftUnique#26a5553e flags:# require_premium:flags.6?true resale_ton_only:flags.7?true id:long gift_id:long title:string slug:string num:int owner_id:flags.0?Peer owner_name:flags.1?string owner_address:flags.2?string attributes:Vector availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector released_by:flags.5?Peer value_amount:flags.8?long value_currency:flags.8?string = StarGift; payments.starGiftsNotModified#a388a368 = payments.StarGifts; @@ -1938,11 +1938,11 @@ payments.starGiftUpgradePreview#167bd90b sample_attributes:Vector = users.Users; users.usersSlice#315a4974 count:int users:Vector = users.Users; -payments.uniqueStarGift#caa2f60b gift:StarGift users:Vector = payments.UniqueStarGift; +payments.uniqueStarGift#416c56e8 gift:StarGift chats:Vector users:Vector = payments.UniqueStarGift; -messages.webPagePreview#b53e8b21 media:MessageMedia users:Vector = messages.WebPagePreview; +messages.webPagePreview#8c9a88ac media:MessageMedia chats:Vector users:Vector = messages.WebPagePreview; -savedStarGift#19a9b572 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector prepaid_upgrade_hash:flags.16?string = SavedStarGift; +savedStarGift#19a9b572 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true upgrade_separate:flags.17?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector prepaid_upgrade_hash:flags.16?string = SavedStarGift; payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector next_offset:flags.0?string chats:Vector users:Vector = payments.SavedStarGifts; @@ -2007,6 +2007,24 @@ searchPostsFlood#3e0b5b6a flags:# query_is_free:flags.0?true total_daily:int rem payments.uniqueStarGiftValueInfo#512fe446 flags:# last_sale_on_fragment:flags.1?true value_is_average:flags.6?true currency:string value:long initial_sale_date:int initial_sale_stars:long initial_sale_price:long last_sale_date:flags.0?int last_sale_price:flags.0?long floor_price:flags.2?long average_price:flags.3?long listed_count:flags.4?int fragment_listed_count:flags.5?int fragment_listed_url:flags.5?string = payments.UniqueStarGiftValueInfo; +profileTabPosts#b98cd696 = ProfileTab; +profileTabGifts#4d4bd46a = ProfileTab; +profileTabMedia#72c64955 = ProfileTab; +profileTabFiles#ab339c00 = ProfileTab; +profileTabMusic#9f27d26e = ProfileTab; +profileTabVoice#e477092e = ProfileTab; +profileTabLinks#d3656499 = ProfileTab; +profileTabGifs#a2c0f695 = ProfileTab; + +users.savedMusicNotModified#e3878aa4 count:int = users.SavedMusic; +users.savedMusic#34a2f297 count:int documents:Vector = users.SavedMusic; + +account.savedMusicIdsNotModified#4fc81d6e = account.SavedMusicIds; +account.savedMusicIds#998d6636 ids:Vector = account.SavedMusicIds; + +payments.checkCanSendGiftResultOk#374fa7ad = payments.CheckCanSendGiftResult; +payments.checkCanSendGiftResultFail#d5e58274 reason:TextWithEntities = payments.CheckCanSendGiftResult; + ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; @@ -2160,11 +2178,16 @@ account.setReactionsNotifySettings#316ce548 settings:ReactionsNotifySettings = R account.getCollectibleEmojiStatuses#2e7b4543 hash:long = account.EmojiStatuses; account.getPaidMessagesRevenue#19ba4a67 flags:# parent_peer:flags.0?InputPeer user_id:InputUser = account.PaidMessagesRevenue; account.toggleNoPaidMessagesException#fe2eda76 flags:# refund_charged:flags.0?true require_payment:flags.2?true parent_peer:flags.1?InputPeer user_id:InputUser = Bool; +account.setMainProfileTab#5dee78b0 tab:ProfileTab = Bool; +account.saveMusic#b26732a9 flags:# unsave:flags.0?true id:InputDocument after_id:flags.1?InputDocument = Bool; +account.getSavedMusicIds#e09d5faf hash:long = account.SavedMusicIds; users.getUsers#d91a548 id:Vector = Vector; users.getFullUser#b60f5918 id:InputUser = users.UserFull; users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector = Bool; users.getRequirementsToContact#d89a83a3 id:Vector = Vector; +users.getSavedMusic#788d7fe3 id:InputUser offset:int limit:int hash:long = users.SavedMusic; +users.getSavedMusicByID#7573a4e9 id:InputUser documents:Vector = users.SavedMusic; contacts.getContactIDs#7adc669d hash:long = Vector; contacts.getStatuses#c4a353ee = Vector; @@ -2535,6 +2558,7 @@ channels.updatePaidMessagesPrice#4b12327b flags:# broadcast_messages_allowed:fla channels.toggleAutotranslation#167fc0a1 channel:InputChannel enabled:Bool = Updates; channels.getMessageAuthor#ece2a0e6 channel:InputChannel id:int = User; channels.checkSearchPostsFlood#22567115 flags:# query:flags.0?string = SearchPostsFlood; +channels.setMainProfileTab#3583fcb1 channel:InputChannel tab:ProfileTab = Bool; bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON; bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool; @@ -2623,6 +2647,7 @@ payments.reorderStarGiftCollections#c32af4cc peer:InputPeer order:Vector = payments.deleteStarGiftCollection#ad5648e8 peer:InputPeer collection_id:int = Bool; payments.getStarGiftCollections#981b91dd peer:InputPeer hash:long = payments.StarGiftCollections; payments.getUniqueStarGiftValueInfo#4365af6b slug:string = payments.UniqueStarGiftValueInfo; +payments.checkCanSendGift#c0c4edc9 gift_id:long = payments.CheckCanSendGiftResult; stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet; stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet; diff --git a/src/types/language.d.ts b/src/types/language.d.ts index 18e7d5684..c65c5f4ff 100644 --- a/src/types/language.d.ts +++ b/src/types/language.d.ts @@ -1705,6 +1705,7 @@ export interface LangPair { 'GiftValueForSaleOnFragment': undefined; 'GiftValueForSaleOnTelegram': undefined; 'EmbeddedMessageNoCaption': undefined; + 'TitleGiftLocked': undefined; 'QuickPreview': undefined; } @@ -2929,6 +2930,9 @@ export interface LangPairWithVariables { 'RatingLevel': { 'level': V; }; + 'GiftLockedMessage': { + 'relativeDate': V; + }; } export interface LangPairPlural {