Co-authored-by: Alexander Zinchuk <alx.zinchuk@gmail.com>
This commit is contained in:
Alexander Zinchuk 2025-09-09 21:10:36 +02:00
parent ef4c20c96a
commit 037db327c4
29 changed files with 685 additions and 54 deletions

View File

@ -26,7 +26,7 @@ export function buildApiStarGift(starGift: GramJs.TypeStarGift): ApiStarGift {
if (starGift instanceof GramJs.StarGiftUnique) {
const {
id, num, ownerId, ownerName, title, attributes, availabilityIssued, availabilityTotal, slug, ownerAddress,
giftAddress, resellAmount, releasedBy, resaleTonOnly, requirePremium,
giftAddress, resellAmount, releasedBy, resaleTonOnly, requirePremium, valueCurrency, valueAmount, giftId,
} = starGift;
return {
@ -46,6 +46,9 @@ export function buildApiStarGift(starGift: GramJs.TypeStarGift): ApiStarGift {
releasedByPeerId: releasedBy && getApiChatIdFromMtpPeer(releasedBy),
requirePremium,
resaleTonOnly,
valueCurrency,
valueAmount: valueAmount?.toJSNumber(),
regularGiftId: giftId.toString(),
};
}

View File

@ -26,6 +26,7 @@ import type {
ApiStarsTransactionPeer,
ApiStarTopupOption,
ApiTypeCurrencyAmount,
ApiUniqueStarGiftValueInfo,
BoughtPaidMedia,
} from '../../types';
@ -630,3 +631,29 @@ export function buildApiStarTopupOption(option: GramJs.TypeStarsTopupOption): Ap
isExtended: extended,
};
}
export function buildApiUniqueStarGiftValueInfo(
info: GramJs.payments.UniqueStarGiftValueInfo): ApiUniqueStarGiftValueInfo {
const {
lastSaleOnFragment, currency, value, initialSaleDate, initialSaleStars, initialSalePrice,
lastSaleDate, lastSalePrice, floorPrice, averagePrice, listedCount, fragmentListedCount,
fragmentListedUrl, valueIsAverage,
} = info;
return {
isLastSaleOnFragment: lastSaleOnFragment,
isValueAverage: valueIsAverage,
currency,
value: value.toJSNumber(),
initialSaleDate,
initialSaleStars: initialSaleStars.toJSNumber(),
initialSalePrice: initialSalePrice.toJSNumber(),
lastSaleDate,
lastSalePrice: lastSalePrice?.toJSNumber(),
floorPrice: floorPrice?.toJSNumber(),
averagePrice: averagePrice?.toJSNumber(),
listedCount,
fragmentListedCount,
fragmentListedUrl,
};
}

View File

@ -21,6 +21,7 @@ import {
buildApiStarsSubscription,
buildApiStarsTransaction,
buildApiStarTopupOption,
buildApiUniqueStarGiftValueInfo,
} from '../apiBuilders/payments';
import { buildApiUser } from '../apiBuilders/users';
import { buildInputPeer,
@ -130,7 +131,8 @@ export async function fetchSavedStarGifts({
...(filter && {
sortByValue: filter.sortType === 'byValue' || undefined,
excludeUnlimited: !filter.shouldIncludeUnlimited || undefined,
excludeLimited: !filter.shouldIncludeLimited || undefined,
excludeUpgradable: !filter.shouldIncludeUpgradable || undefined,
excludeUnupgradable: !filter.shouldIncludeLimited || undefined,
excludeUnique: !filter.shouldIncludeUnique || undefined,
excludeSaved: !filter.shouldIncludeDisplayed || undefined,
excludeUnsaved: !filter.shouldIncludeHidden || undefined,
@ -441,6 +443,18 @@ export function updateStarGiftPrice({
});
}
export async function fetchUniqueStarGiftValueInfo({ slug }: { slug: string }) {
const result = await invokeRequest(new GramJs.payments.GetUniqueStarGiftValueInfo({
slug,
}));
if (!result) {
return undefined;
}
return buildApiUniqueStarGiftValueInfo(result);
}
export async function fetchStarGiftWithdrawalUrl({
inputGift,
password,

View File

@ -477,3 +477,20 @@ export type ApiRequestInputInvoice = ApiRequestInputInvoiceMessage | ApiRequestI
| ApiRequestInputInvoiceChatInviteSubscription | ApiRequestInputInvoiceStarGift
| ApiRequestInputInvoiceStarGiftUpgrade | ApiRequestInputInvoiceStarGiftTransfer
| ApiRequestInputInvoicePremiumGiftStars | ApiRequestInputInvoiceStarGiftResale;
export interface ApiUniqueStarGiftValueInfo {
isLastSaleOnFragment?: true;
isValueAverage?: true;
currency: string;
value: number;
initialSaleDate: number;
initialSaleStars: number;
initialSalePrice: number;
lastSaleDate?: number;
lastSalePrice?: number;
floorPrice?: number;
averagePrice?: number;
listedCount?: number;
fragmentListedCount?: number;
fragmentListedUrl?: string;
}

View File

@ -31,6 +31,7 @@ export interface ApiStarGiftRegular {
export interface ApiStarGiftUnique {
type: 'starGiftUnique';
id: string;
regularGiftId: string;
title: string;
number: number;
ownerId?: string;
@ -45,6 +46,8 @@ export interface ApiStarGiftUnique {
releasedByPeerId?: string;
requirePremium?: true;
resaleTonOnly?: true;
valueCurrency?: string;
valueAmount?: number;
}
export type ApiStarGift = ApiStarGiftRegular | ApiStarGiftUnique;

View File

@ -1507,10 +1507,18 @@
"GiftInfoTonText" = "This gift is on the TON Blockchain. {link}";
"GiftInfoTonLinkText" = "View >";
"GiftInfoAvailability" = "Availability";
"GiftInfoValueLinkMore" = "Learn More";
"GiftInfoAvailabilityValue_one" = "{count} of {total} left";
"GiftInfoAvailabilityValue_other" = "{count} of {total} left";
"GiftInfoFirstSale" = "First Sale";
"GiftInfoLastSale" = "Last Sale";
"GiftValueTitleInitialSale" = "Initial Sale";
"GiftValueTitleInitialPrice" = "Initial Price";
"GiftValueTitleLastSale" = "Last Sale";
"GiftValueTitleLastPrice" = "Last Price";
"GiftValueTitleMinimumPrice" = "Minimum Price";
"GiftValueTitleAveragePrice" = "Average Price";
"GiftValueDescription" = "This is average sale price of **{giftName}** on Telegram and Fragment over the past month.";
"GiftInfoSoldOutTitle" = "Unavailable";
"GiftInfoSoldOutDescription" = "This gift has been sold out";
"GiftInfoSenderHidden" = "Only you can see the sender's name and message.";
@ -1736,6 +1744,7 @@
"GiftFilterUnique" = "Unique";
"GiftFilterDisplayed" = "Displayed";
"GiftFilterHidden" = "Hidden";
"GiftFilterUpgradable" = "Upgradable";
"GiftSearchEmpty" = "No matching gifts";
"GiftSearchReset" = "View All Gifts";
"SetUp2FA" = "Set up Two-Step Verification";
@ -2271,4 +2280,5 @@
"ErrorFocusInaccessibleMessage" = "Unfortunately, you can't access this message. You aren't a member of the chat where it was posted.";
"ContextMenuHintMouse" = "To edit or reply, close this menu. Then right click on a message.";
"ContextMenuHintTouch" = "To edit or reply, close this menu. Then long tap on a message.";
"GiftValueForSaleOnFragment" = "for sale on Fragment";
"GiftValueForSaleOnTelegram" = "for sale on Telegram";

View File

@ -8,6 +8,7 @@ export { default as PaidReactionModal } from '../components/modals/paidReaction/
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 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';

View File

@ -26,6 +26,7 @@ import GiftResalePriceComposerModal from './gift/resale/GiftResalePriceComposerM
import GiftStatusInfoModal from './gift/status/GiftStatusInfoModal.async';
import GiftTransferModal from './gift/transfer/GiftTransferModal.async';
import GiftUpgradeModal from './gift/upgrade/GiftUpgradeModal.async';
import GiftInfoValueModal from './gift/value/GiftInfoValueModal.async';
import GiftWithdrawModal from './gift/withdraw/GiftWithdrawModal.async';
import GiftCodeModal from './giftcode/GiftCodeModal.async';
import InviteViaLinkModal from './inviteViaLink/InviteViaLinkModal.async';
@ -78,6 +79,7 @@ type ModalKey = keyof Pick<TabState,
'isGiftRecipientPickerOpen' |
'isWebAppsCloseConfirmationModalOpen' |
'giftInfoModal' |
'giftInfoValueModal' |
'giftResalePriceComposerModal' |
'suggestedStatusModal' |
'emojiStatusAccessModal' |
@ -136,6 +138,7 @@ const MODALS: ModalRegistry = {
isGiftRecipientPickerOpen: GiftRecipientPicker,
isWebAppsCloseConfirmationModalOpen: WebAppsCloseConfirmationModal,
giftInfoModal: GiftInfoModal,
giftInfoValueModal: GiftInfoValueModal,
giftResalePriceComposerModal: GiftResalePriceComposerModal,
suggestedStatusModal: SuggestedStatusModal,
emojiStatusAccessModal: EmojiStatusAccessModal,

View File

@ -62,6 +62,8 @@ type StateProps = {
disallowedGifts?: ApiDisallowedGifts;
resaleGiftsCount?: number;
areResaleGiftsLoading?: boolean;
selectedResaleGift?: ApiStarGift;
tabId: number;
};
const AVATAR_SIZE = 100;
@ -81,9 +83,11 @@ const GiftModal: FC<OwnProps & StateProps> = ({
disallowedGifts,
resaleGiftsCount,
areResaleGiftsLoading,
selectedResaleGift,
tabId,
}) => {
const {
closeGiftModal, openGiftInfoModal, resetResaleGifts, loadResaleGifts,
closeGiftModal, openGiftInfoModal, resetResaleGifts, loadResaleGifts, openGiftInMarket, closeResaleGiftsMarket,
} = getActions();
const dialogRef = useRef<HTMLDivElement>();
const transitionRef = useRef<HTMLDivElement>();
@ -98,7 +102,6 @@ const GiftModal: FC<OwnProps & StateProps> = ({
const chat = peer && isApiPeerChat(peer) ? peer : undefined;
const [selectedGift, setSelectedGift] = useState<GiftOption | undefined>();
const [selectedResellGift, setSelectedResellGift] = useState<ApiStarGift | undefined>();
const [shouldShowMainScreenHeader, setShouldShowMainScreenHeader] = useState(false);
const [isMainScreenHeaderForStarGifts, setIsMainScreenHeaderForStarGifts] = useState(false);
const [isGiftScreenHeaderForStarGifts, setIsGiftScreenHeaderForStarGifts] = useState(false);
@ -154,25 +157,27 @@ const GiftModal: FC<OwnProps & StateProps> = ({
observe: observeIntersection,
} = useIntersectionObserver({ rootRef: scrollerRef, throttleMs: INTERSECTION_THROTTLE, isDisabled: !isOpen });
const isResaleScreen = Boolean(selectedResellGift) && !selectedGift;
const isResaleScreen = Boolean(selectedResaleGift) && !selectedGift;
const isGiftScreen = Boolean(selectedGift);
const shouldShowHeader = isResaleScreen || isGiftScreen || shouldShowMainScreenHeader;
const isHeaderForStarGifts = isGiftScreen ? isGiftScreenHeaderForStarGifts : isMainScreenHeaderForStarGifts;
useEffect(() => {
if (selectedResellGift) {
loadResaleGifts({ giftId: selectedResellGift.id });
if (selectedResaleGift) {
const giftId = 'regularGiftId' in selectedResaleGift
? selectedResaleGift.regularGiftId
: selectedResaleGift.id;
loadResaleGifts({ giftId });
}
}, [selectedResellGift]);
}, [selectedResaleGift]);
useEffect(() => {
if (!isOpen) {
setShouldShowMainScreenHeader(false);
setSelectedGift(undefined);
setSelectedResellGift(undefined);
setSelectedCategory('all');
}
}, [isOpen]);
}, [isOpen, tabId, closeResaleGiftsMarket]);
const handleScroll = useLastCallback((e: React.UIEvent<HTMLDivElement>) => {
if (isGiftScreen) return;
@ -256,7 +261,7 @@ const GiftModal: FC<OwnProps & StateProps> = ({
openGiftInfoModal({ gift, recipientId: renderingModal?.forPeerId });
return;
}
setSelectedResellGift(gift);
openGiftInMarket({ gift, tabId });
return;
}
setSelectedGift(gift);
@ -340,15 +345,13 @@ const GiftModal: FC<OwnProps & StateProps> = ({
const handleCloseModal = useLastCallback(() => {
setSelectedGift(undefined);
setSelectedResellGift(undefined);
resetResaleGifts();
closeGiftModal();
});
const handleCloseButtonClick = useLastCallback(() => {
if (isResaleScreen) {
setSelectedResellGift(undefined);
resetResaleGifts();
closeResaleGiftsMarket({ tabId });
return;
}
if (isGiftScreen) {
@ -426,7 +429,7 @@ const GiftModal: FC<OwnProps & StateProps> = ({
return (
<div className={styles.resaleHeaderContentContainer}>
<h2 className={styles.resaleHeaderText}>
{selectedResellGift.title}
{selectedResaleGift.title}
</h2>
{isFirstLoading
&& (
@ -494,7 +497,7 @@ const GiftModal: FC<OwnProps & StateProps> = ({
activeKey={isGiftScreen ? 1 : isResaleScreen ? 2 : 0}
>
{!isGiftScreen && !isResaleScreen && renderMainScreen()}
{isResaleScreen && selectedResellGift
{isResaleScreen && selectedResaleGift
&& (
<GiftModalResaleScreen
onGiftClick={handleGiftClick}
@ -526,6 +529,7 @@ export default memo(withGlobal<OwnProps>((global, { modal }): StateProps => {
const { resaleGifts } = selectTabState(global);
const resaleGiftsCount = resaleGifts.count;
const areResaleGiftsLoading = resaleGifts.isLoading !== false;
const selectedResaleGift = modal?.selectedResaleGift;
return {
boostPerSentGift: global.appConfig.boostsPerSentGift,
@ -537,6 +541,8 @@ export default memo(withGlobal<OwnProps>((global, { modal }): StateProps => {
disallowedGifts: userFullInfo?.disallowedGifts,
resaleGiftsCount,
areResaleGiftsLoading,
selectedResaleGift,
tabId: selectTabState(global).id,
};
})(GiftModal));

View File

@ -69,7 +69,10 @@ const GiftModalResaleScreen: FC<OwnProps & StateProps> = ({
const handleLoadMoreResellGifts = useLastCallback(() => {
if (gift) {
loadResaleGifts({ giftId: gift.id });
const giftId = 'regularGiftId' in gift
? gift.regularGiftId
: gift.id;
loadResaleGifts({ giftId });
}
});

View File

@ -138,12 +138,23 @@
line-height: 1;
}
.uniqueValue,
.uniqueAttribute {
display: flex;
gap: 0.25rem;
align-items: center;
}
.attributeName {
cursor: pointer;
color: var(--color-primary);
transition: opacity 0.15s;
&:hover {
opacity: 0.75;
}
}
/* stylelint-disable-next-line plugin/stylelint-group-selectors */
.uniqueGift {
margin-bottom: 0;

View File

@ -17,6 +17,7 @@ import { selectPeer, selectUser } from '../../../../global/selectors';
import buildClassName from '../../../../util/buildClassName';
import { copyTextToClipboard } from '../../../../util/clipboard';
import { formatDateTimeToString } from '../../../../util/dates/dateFormat';
import { formatCurrencyAsString } from '../../../../util/formatCurrency';
import {
formatStarsAsIcon, formatStarsAsText, formatTonAsIcon, formatTonAsText,
} from '../../../../util/localization/format';
@ -93,6 +94,9 @@ const GiftInfoModal = ({
showNotification,
buyStarGift,
closeGiftModal,
openGiftInfoValueModal,
updateResaleGiftsFilter,
openGiftInMarket,
} = getActions();
const [isConvertConfirmOpen, openConvertConfirm, closeConvertConfirm] = useFlag();
@ -102,6 +106,57 @@ const GiftInfoModal = ({
const [isConfirmModalOpen, setIsConfirmModalOpen] = useState<boolean>(false);
const [shouldPayInTon, setShouldPayInTon] = useState<boolean>(false);
const handleSymbolClick = useLastCallback(() => {
if (!gift || !giftAttributes?.pattern) return;
openGiftInMarket({ gift });
updateResaleGiftsFilter({
filter: {
sortType: 'byDate',
modelAttributes: [],
backdropAttributes: [],
patternAttributes: [{
type: 'pattern',
documentId: giftAttributes.pattern.sticker.id,
}],
},
});
});
const handleBackdropClick = useLastCallback(() => {
if (!gift || !giftAttributes?.backdrop) return;
openGiftInMarket({ gift });
updateResaleGiftsFilter({
filter: {
sortType: 'byDate',
modelAttributes: [],
backdropAttributes: [{
type: 'backdrop',
backdropId: giftAttributes.backdrop.backdropId,
}],
patternAttributes: [],
},
});
});
const handleModelClick = useLastCallback(() => {
if (!gift || !giftAttributes?.model) return;
openGiftInMarket({ gift });
updateResaleGiftsFilter({
filter: {
sortType: 'byDate',
modelAttributes: [{
type: 'model',
documentId: giftAttributes.model.sticker.id,
}],
backdropAttributes: [],
patternAttributes: [],
},
});
});
const isOpen = Boolean(modal);
const renderingModal = useCurrentOrPrev(modal);
const renderingFromPeer = useCurrentOrPrev(fromPeer);
@ -236,6 +291,14 @@ const GiftInfoModal = ({
buyStarGift({ peerId: peer.id, slug: gift.slug, price });
});
const handleOpenValueModal = useLastCallback(() => {
if (!gift || gift.type !== 'starGiftUnique') return;
openGiftInfoValueModal({
gift,
});
});
const giftAttributes = useMemo(() => {
return gift && getGiftAttributes(gift);
}, [gift]);
@ -623,7 +686,12 @@ const GiftInfoModal = ({
tableData.push([
lang('GiftAttributeModel'),
<span className={styles.uniqueAttribute}>
{model.name}
<span
className={styles.attributeName}
onClick={handleModelClick}
>
{model.name}
</span>
<BadgeButton>{formatPercent(model.rarityPercent)}</BadgeButton>
</span>,
]);
@ -633,7 +701,12 @@ const GiftInfoModal = ({
tableData.push([
lang('GiftAttributeBackdrop'),
<span className={styles.uniqueAttribute}>
{backdrop.name}
<span
className={styles.attributeName}
onClick={handleBackdropClick}
>
{backdrop.name}
</span>
<BadgeButton>{formatPercent(backdrop.rarityPercent)}</BadgeButton>
</span>,
]);
@ -643,7 +716,12 @@ const GiftInfoModal = ({
tableData.push([
lang('GiftAttributeSymbol'),
<span className={styles.uniqueAttribute}>
{pattern.name}
<span
className={styles.attributeName}
onClick={handleSymbolClick}
>
{pattern.name}
</span>
<BadgeButton>{formatPercent(pattern.rarityPercent)}</BadgeButton>
</span>,
]);
@ -657,6 +735,24 @@ const GiftInfoModal = ({
}),
]);
if (gift.valueAmount && gift.valueCurrency) {
tableData.push([
lang('GiftInfoValue'),
<span className={styles.uniqueValue}>
~
{' '}
{formatCurrencyAsString(
gift.valueAmount,
gift.valueCurrency,
lang.code,
)}
<BadgeButton onClick={handleOpenValueModal}>
{lang('GiftInfoValueLinkMore')}
</BadgeButton>
</span>,
]);
}
if (originalDetails) {
const {
date, recipientId, message, senderId,
@ -782,7 +878,7 @@ const GiftInfoModal = ({
SettingsMenuButton, isGiftUnique, renderingModal,
collectibleEmojiStatuses, currentUserEmojiStatus, saleDateInfo,
canBuyGift, giftOwnerTitle, isOpen, resellPrice, giftSubtitle,
releasedByPeer,
releasedByPeer, handleSymbolClick, handleBackdropClick, handleModelClick,
]);
return (

View File

@ -0,0 +1,16 @@
import type { FC } from '../../../../lib/teact/teact';
import type { OwnProps } from './GiftInfoValueModal';
import { Bundles } from '../../../../util/moduleLoader';
import useModuleLoader from '../../../../hooks/useModuleLoader';
const GiftInfoValueModalAsync: FC<OwnProps> = (props) => {
const { modal } = props;
const GiftInfoValueModal = useModuleLoader(Bundles.Stars, 'GiftInfoValueModal', !modal);
return GiftInfoValueModal ? <GiftInfoValueModal {...props} /> : undefined;
};
export default GiftInfoValueModalAsync;

View File

@ -0,0 +1,39 @@
.header {
display: flex;
flex-direction: column;
align-items: center;
padding-inline: 1rem;
text-align: center;
}
.sticker {
margin-bottom: 0.75rem;
}
.description {
margin-top: 0.75rem;
font-size: 0.875rem;
text-align: center;
}
.initialPrice {
display: flex;
align-items: center;
line-height: 1;
}
.starIcon {
margin-inline-start: 0 !important;
}
.footer {
display: flex;
flex-direction: column;
gap: 0.125rem;
}
.footerSticker {
margin-inline: 0.25rem;
}

View File

@ -0,0 +1,190 @@
import type { FC } from '../../../../lib/teact/teact';
import { memo, useMemo } from '../../../../lib/teact/teact';
import { getActions } from '../../../../global';
import type { TabState } from '../../../../global/types';
import { formatDateToString } from '../../../../util/dates/dateFormat';
import { formatCurrencyAsString } from '../../../../util/formatCurrency';
import { formatStarsAsIcon } from '../../../../util/localization/format';
import { getGiftAttributes } from '../../../common/helpers/gifts';
import useCurrentOrPrev from '../../../../hooks/useCurrentOrPrev';
import useLang from '../../../../hooks/useLang';
import useLastCallback from '../../../../hooks/useLastCallback';
import AnimatedIconFromSticker from '../../../common/AnimatedIconFromSticker';
import Button from '../../../ui/Button';
import TableInfoModal, { type TableData } from '../../common/TableInfoModal';
import styles from './GiftInfoValueModal.module.scss';
export type OwnProps = {
modal: TabState['giftInfoValueModal'];
};
const HEADER_STICKER_SIZE = 120;
const FOOTER_STICKER_SIZE = 24;
const GiftInfoValueModal: FC<OwnProps> = ({
modal,
}) => {
const { closeGiftInfoValueModal, openUrl, openGiftInMarket } = getActions();
const lang = useLang();
const isOpen = Boolean(modal);
const renderingModal = useCurrentOrPrev(modal);
const handleOpenFragment = useLastCallback(() => {
if (modal?.valueInfo.fragmentListedUrl) {
openUrl({ url: modal.valueInfo.fragmentListedUrl });
}
});
const handleOpenTelegramMarket = useLastCallback(() => {
if (modal?.gift) {
openGiftInMarket({ gift: modal.gift });
}
});
const modalData = useMemo(() => {
if (!renderingModal) return undefined;
const { gift, valueInfo } = renderingModal;
const giftAttributes = getGiftAttributes(gift);
if (!giftAttributes) return undefined;
const header = (
<div className={styles.header}>
<AnimatedIconFromSticker
className={styles.sticker}
sticker={giftAttributes.model!.sticker}
size={HEADER_STICKER_SIZE}
/>
<Button
pill
size="tiny"
fluid
nonInteractive
>
{formatCurrencyAsString(valueInfo.value, valueInfo.currency, lang.code)}
</Button>
<div className={styles.description}>
{lang('GiftValueDescription', { giftName: gift.title }, {
withMarkdown: true,
withNodes: true,
})}
</div>
</div>
);
const tableData: TableData = [];
tableData.push([
lang('GiftValueTitleInitialSale'),
formatDateToString(valueInfo.initialSaleDate * 1000, lang.code),
]);
tableData.push([
lang('GiftValueTitleInitialPrice'),
<span className={styles.initialPrice}>
{formatStarsAsIcon(lang, valueInfo.initialSaleStars, { className: styles.starIcon })}
{' (~ '}
{formatCurrencyAsString(valueInfo.initialSalePrice, valueInfo.currency, lang.code)}
)
</span>,
]);
if (valueInfo.lastSaleDate) {
tableData.push([
lang('GiftValueTitleLastSale'),
formatDateToString(valueInfo.lastSaleDate * 1000, lang.code),
]);
}
if (valueInfo.lastSalePrice) {
tableData.push([
lang('GiftValueTitleLastPrice'),
formatCurrencyAsString(valueInfo.lastSalePrice, valueInfo.currency, lang.code),
]);
}
if (valueInfo.floorPrice) {
tableData.push([
lang('GiftValueTitleMinimumPrice'),
formatCurrencyAsString(valueInfo.floorPrice, valueInfo.currency, lang.code),
]);
}
if (valueInfo.averagePrice) {
tableData.push([
lang('GiftValueTitleAveragePrice'),
formatCurrencyAsString(valueInfo.averagePrice, valueInfo.currency, lang.code),
]);
}
const canBuyOnFragment = Boolean(valueInfo.fragmentListedUrl && valueInfo.fragmentListedCount);
const canBuyOnTelegram = Boolean(valueInfo.listedCount && valueInfo.listedCount);
const hasFooter = canBuyOnFragment || canBuyOnTelegram;
const footer = hasFooter && (
<div className={styles.footer}>
{canBuyOnFragment && (
<Button
isText
onClick={handleOpenFragment}
noForcedUpperCase
size="tiny"
>
{lang.number(valueInfo.fragmentListedCount!)}
<AnimatedIconFromSticker
className={styles.footerSticker}
sticker={giftAttributes.model!.sticker}
size={FOOTER_STICKER_SIZE}
/>
{lang('GiftValueForSaleOnFragment')}
</Button>
)}
{canBuyOnTelegram && (
<Button
isText
noForcedUpperCase
size="tiny"
onClick={handleOpenTelegramMarket}
>
{lang.number(valueInfo.listedCount!)}
<AnimatedIconFromSticker
className={styles.footerSticker}
sticker={giftAttributes.model!.sticker}
size={FOOTER_STICKER_SIZE}
/>
{lang('GiftValueForSaleOnTelegram')}
</Button>
)}
</div>
);
return {
header,
tableData,
footer,
};
}, [lang, renderingModal, handleOpenFragment, handleOpenTelegramMarket]);
if (!modalData) return undefined;
return (
<TableInfoModal
isOpen={isOpen}
onClose={closeGiftInfoValueModal}
header={modalData.header}
tableData={modalData.tableData}
footer={modalData.footer}
/>
);
};
export default memo(GiftInfoValueModal);

View File

@ -199,6 +199,7 @@ const RightHeader: FC<OwnProps & StateProps> = ({
sortType: giftsSortType,
shouldIncludeUnlimited: shouldIncludeUnlimitedGifts,
shouldIncludeLimited: shouldIncludeLimitedGifts,
shouldIncludeUpgradable: shouldIncludeUpgradableGifts,
shouldIncludeUnique: shouldIncludeUniqueGifts,
shouldIncludeDisplayed: shouldIncludeDisplayedGifts,
shouldIncludeHidden: shouldIncludeHiddenGifts,
@ -546,12 +547,26 @@ const RightHeader: FC<OwnProps & StateProps> = ({
icon={shouldIncludeLimitedGifts ? 'check' : 'placeholder'}
onClick={() => updateGiftProfileFilter(
{ peerId: chatId, filter: { shouldIncludeLimited: !shouldIncludeLimitedGifts } },
{ peerId: chatId, filter: {
shouldIncludeLimited: !shouldIncludeLimitedGifts,
} },
)}
>
{lang('GiftFilterLimited')}
</MenuItem>
<MenuItem
icon={shouldIncludeUpgradableGifts ? 'check' : 'placeholder'}
onClick={() => updateGiftProfileFilter(
{ peerId: chatId, filter: {
shouldIncludeUpgradable: !shouldIncludeUpgradableGifts,
} },
)}
>
{lang('GiftFilterUpgradable')}
</MenuItem>
<MenuItem
icon={shouldIncludeUniqueGifts ? 'check' : 'placeholder'}

View File

@ -443,6 +443,7 @@ export const DEFAULT_GIFT_PROFILE_FILTER_OPTIONS: GiftProfileFilterOptions = {
shouldIncludeUnique: true,
shouldIncludeDisplayed: true,
shouldIncludeHidden: true,
shouldIncludeUpgradable: true,
} as const;
export const DEFAULT_RESALE_GIFTS_FILTER_OPTIONS: ResaleGiftsFilterOptions = {

View File

@ -548,7 +548,7 @@ addActionHandler('openGiveawayModal', async (global, actions, payload): Promise<
addActionHandler('openGiftModal', async (global, actions, payload): Promise<void> => {
const {
forUserId, tabId = getCurrentTabId(),
forUserId, selectedResaleGift, tabId = getCurrentTabId(),
} = payload;
if (selectIsCurrentUserFrozen(global)) {
@ -564,6 +564,7 @@ addActionHandler('openGiftModal', async (global, actions, payload): Promise<void
giftModal: {
forPeerId: forUserId,
gifts,
selectedResaleGift,
},
}, tabId);
setGlobal(global);

View File

@ -81,12 +81,14 @@ addActionHandler('updateGiftProfileFilter', (global, actions, payload): ActionRe
if (!updatedFilter.shouldIncludeUnlimited
&& !updatedFilter.shouldIncludeLimited
&& !updatedFilter.shouldIncludeUnique) {
&& !updatedFilter.shouldIncludeUnique
&& !updatedFilter.shouldIncludeUpgradable) {
updatedFilter = {
...prevFilter,
shouldIncludeUnlimited: true,
shouldIncludeLimited: true,
shouldIncludeUnique: true,
shouldIncludeUpgradable: true,
...filter,
};
}

View File

@ -4,9 +4,10 @@ import type { ActionReturnType } from '../../types';
import { STARS_CURRENCY_CODE } from '../../../config';
import { getCurrentTabId } from '../../../util/establishMultitabRole';
import * as langProvider from '../../../util/oldLangProvider';
import { callApi } from '../../../api/gramjs';
import { addTabStateResetterAction } from '../../helpers/meta';
import { getPrizeStarsTransactionFromGiveaway, getStarsTransactionFromGift } from '../../helpers/payments';
import { addActionHandler, setGlobal } from '../../index';
import { addActionHandler, getGlobal, setGlobal } from '../../index';
import {
clearStarPayment, openStarsTransactionModal,
} from '../../reducers';
@ -283,8 +284,71 @@ addActionHandler('openGiftResalePriceComposerModal', (global, actions, payload):
}, tabId);
});
addActionHandler('openGiftInMarket', (global, actions, payload): ActionReturnType => {
const { gift, tabId = getCurrentTabId() } = payload;
const giftModal = selectTabState(global, tabId).giftModal;
actions.closeGiftInfoValueModal({ tabId });
actions.closeGiftInfoModal({ tabId });
if (giftModal) {
return updateTabState(global, {
giftModal: {
...giftModal,
selectedResaleGift: gift,
},
}, tabId);
}
actions.openGiftModal({
forUserId: global.currentUserId!,
selectedResaleGift: gift,
tabId,
});
return global;
});
addActionHandler('closeResaleGiftsMarket', (global, actions, payload): ActionReturnType => {
const { tabId = getCurrentTabId() } = payload || {};
actions.resetResaleGifts({ tabId });
const giftModal = selectTabState(global, tabId).giftModal;
if (giftModal) {
return updateTabState(global, {
giftModal: {
...giftModal,
selectedResaleGift: undefined,
},
}, tabId);
}
return global;
});
addActionHandler('openGiftInfoValueModal', async (global, actions, payload): Promise<void> => {
const { gift, tabId = getCurrentTabId() } = payload;
const result = await callApi('fetchUniqueStarGiftValueInfo', { slug: gift.slug });
if (!result) return;
global = getGlobal();
global = updateTabState(global, {
giftInfoValueModal: {
valueInfo: result,
gift,
},
}, tabId);
setGlobal(global);
});
addTabStateResetterAction('closeGiftInfoModal', 'giftInfoModal');
addTabStateResetterAction('closeGiftInfoValueModal', 'giftInfoValueModal');
addTabStateResetterAction('closeGiftResalePriceComposerModal', 'giftResalePriceComposerModal');
addTabStateResetterAction('closeGiftUpgradeModal', 'giftUpgradeModal');

View File

@ -44,6 +44,7 @@ import type {
ApiSendMessageAction,
ApiSessionData,
ApiStarGift,
ApiStarGiftUnique,
ApiStarsSubscription,
ApiStarsTransaction,
ApiSticker,
@ -2541,6 +2542,7 @@ export interface ActionPayloads {
openGiftModal: {
forUserId: string;
selectedResaleGift?: ApiStarGift;
} & WithTabId;
closeGiftModal: WithTabId | undefined;
sendStarGift: StarGiftInfo & WithTabId;
@ -2573,6 +2575,10 @@ export interface ActionPayloads {
}) & WithTabId;
closeGiftInfoModal: WithTabId | undefined;
closeGiftResalePriceComposerModal: WithTabId | undefined;
openGiftInMarket: {
gift: ApiStarGift;
} & WithTabId;
closeResaleGiftsMarket: WithTabId | undefined;
openGiftUpgradeModal: {
giftId: string;
@ -2595,6 +2601,10 @@ export interface ActionPayloads {
emojiStatus: ApiEmojiStatusCollectible;
} & WithTabId;
closeGiftStatusInfoModal: WithTabId | undefined;
openGiftInfoValueModal: {
gift: ApiStarGiftUnique;
} & WithTabId;
closeGiftInfoValueModal: WithTabId | undefined;
processStarGiftWithdrawal: {
gift: ApiInputSavedStarGift;
password: string;

View File

@ -41,6 +41,7 @@ import type {
ApiStarGift,
ApiStarGiftAttribute,
ApiStarGiftAttributeCounter,
ApiStarGiftUnique,
ApiStarGiveawayOption,
ApiStarsSubscription,
ApiStarsTransaction,
@ -49,6 +50,7 @@ import type {
ApiTypeCurrencyAmount,
ApiTypePrepaidGiveaway,
ApiTypeStoryView,
ApiUniqueStarGiftValueInfo,
ApiUser,
ApiVideo,
} from '../../api/types';
@ -692,6 +694,7 @@ export type TabState = {
giftModal?: {
forPeerId: string;
gifts?: ApiPremiumGiftCodeOption[];
selectedResaleGift?: ApiStarGift;
};
chatRefundModal?: {
userId: string;
@ -823,6 +826,11 @@ export type TabState = {
gift: ApiSavedStarGift | ApiStarGift;
};
giftInfoValueModal?: {
valueInfo: ApiUniqueStarGiftValueInfo;
gift: ApiStarGiftUnique;
};
giftResalePriceComposerModal?: {
peerId?: string;
gift: ApiSavedStarGift | ApiStarGift;

View File

@ -12,6 +12,6 @@ for (const tl of Object.values(Api)) {
}
}
export const LAYER = 211;
export const LAYER = 212;
export { tlobjects };

View File

@ -277,7 +277,7 @@ namespace Api {
export type TypeBotMenuButton = BotMenuButtonDefault | BotMenuButtonCommands | BotMenuButton;
export type TypeNotificationSound = NotificationSoundDefault | NotificationSoundNone | NotificationSoundLocal | NotificationSoundRingtone;
export type TypeAttachMenuPeerType = AttachMenuPeerTypeSameBotPM | AttachMenuPeerTypeBotPM | AttachMenuPeerTypePM | AttachMenuPeerTypeChat | AttachMenuPeerTypeBroadcast;
export type TypeInputInvoice = InputInvoiceMessage | InputInvoiceSlug | InputInvoicePremiumGiftCode | InputInvoiceStars | InputInvoiceChatInviteSubscription | InputInvoiceStarGift | InputInvoiceStarGiftUpgrade | InputInvoiceStarGiftTransfer | InputInvoicePremiumGiftStars | InputInvoiceBusinessBotTransferStars | InputInvoiceStarGiftResale;
export type TypeInputInvoice = InputInvoiceMessage | InputInvoiceSlug | InputInvoicePremiumGiftCode | InputInvoiceStars | InputInvoiceChatInviteSubscription | InputInvoiceStarGift | InputInvoiceStarGiftUpgrade | InputInvoiceStarGiftTransfer | InputInvoicePremiumGiftStars | InputInvoiceBusinessBotTransferStars | InputInvoiceStarGiftResale | InputInvoiceStarGiftPrepaidUpgrade;
export type TypeInputStorePaymentPurpose = InputStorePaymentPremiumSubscription | InputStorePaymentGiftPremium | InputStorePaymentPremiumGiftCode | InputStorePaymentPremiumGiveaway | InputStorePaymentStarsTopup | InputStorePaymentStarsGift | InputStorePaymentStarsGiveaway | InputStorePaymentAuthCode;
export type TypePaymentFormMethod = PaymentFormMethod;
export type TypeEmojiStatus = EmojiStatusEmpty | EmojiStatus | EmojiStatusCollectible | InputEmojiStatusCollectible;
@ -617,6 +617,7 @@ namespace Api {
export type TypeStarGiftWithdrawalUrl = payments.StarGiftWithdrawalUrl;
export type TypeResaleStarGifts = payments.ResaleStarGifts;
export type TypeStarGiftCollections = payments.StarGiftCollectionsNotModified | payments.StarGiftCollections;
export type TypeUniqueStarGiftValueInfo = payments.UniqueStarGiftValueInfo;
}
export namespace phone {
@ -3199,6 +3200,7 @@ namespace Api {
upgraded?: true;
refunded?: true;
canUpgrade?: true;
prepaidUpgrade?: true;
gift: Api.TypeStarGift;
message?: Api.TypeTextWithEntities;
convertStars?: long;
@ -3207,6 +3209,8 @@ namespace Api {
fromId?: Api.TypePeer;
peer?: Api.TypePeer;
savedId?: long;
prepaidUpgradeHash?: string;
giftMsgId?: int;
}> {
// flags: Api.Type;
nameHidden?: true;
@ -3215,6 +3219,7 @@ namespace Api {
upgraded?: true;
refunded?: true;
canUpgrade?: true;
prepaidUpgrade?: true;
gift: Api.TypeStarGift;
message?: Api.TypeTextWithEntities;
convertStars?: long;
@ -3223,7 +3228,9 @@ namespace Api {
fromId?: Api.TypePeer;
peer?: Api.TypePeer;
savedId?: long;
CONSTRUCTOR_ID: 1192749220;
prepaidUpgradeHash?: string;
giftMsgId?: int;
CONSTRUCTOR_ID: 4065191930;
SUBCLASS_OF_ID: 2256589094;
className: 'MessageActionStarGift';
@ -3235,6 +3242,7 @@ namespace Api {
transferred?: true;
saved?: true;
refunded?: true;
prepaidUpgrade?: true;
gift: Api.TypeStarGift;
canExportAt?: int;
transferStars?: long;
@ -3250,6 +3258,7 @@ namespace Api {
transferred?: true;
saved?: true;
refunded?: true;
prepaidUpgrade?: true;
gift: Api.TypeStarGift;
canExportAt?: int;
transferStars?: long;
@ -14290,6 +14299,18 @@ namespace Api {
static fromReader(reader: Reader): InputInvoiceStarGiftResale;
}
export class InputInvoiceStarGiftPrepaidUpgrade extends VirtualClass<{
peer: Api.TypeInputPeer;
hash: string;
}> {
peer: Api.TypeInputPeer;
hash: string;
CONSTRUCTOR_ID: 2584430776;
SUBCLASS_OF_ID: 1919851518;
className: 'InputInvoiceStarGiftPrepaidUpgrade';
static fromReader(reader: Reader): InputInvoiceStarGiftPrepaidUpgrade;
}
export class InputStorePaymentPremiumSubscription extends VirtualClass<{
// flags: Api.Type;
restore?: true;
@ -16516,6 +16537,7 @@ namespace Api {
businessTransfer?: true;
stargiftResale?: true;
postsSearch?: true;
stargiftPrepaidUpgrade?: true;
id: string;
amount: Api.TypeStarsAmount;
date: int;
@ -16550,6 +16572,7 @@ namespace Api {
businessTransfer?: true;
stargiftResale?: true;
postsSearch?: true;
stargiftPrepaidUpgrade?: true;
id: string;
amount: Api.TypeStarsAmount;
date: int;
@ -16838,6 +16861,7 @@ namespace Api {
requirePremium?: true;
resaleTonOnly?: true;
id: long;
giftId: long;
title: string;
slug: string;
num: int;
@ -16850,11 +16874,14 @@ namespace Api {
giftAddress?: string;
resellAmount?: Api.TypeStarsAmount[];
releasedBy?: Api.TypePeer;
valueAmount?: long;
valueCurrency?: string;
}> {
// flags: Api.Type;
requirePremium?: true;
resaleTonOnly?: true;
id: long;
giftId: long;
title: string;
slug: string;
num: int;
@ -16867,7 +16894,9 @@ namespace Api {
giftAddress?: string;
resellAmount?: Api.TypeStarsAmount[];
releasedBy?: Api.TypePeer;
CONSTRUCTOR_ID: 975654224;
valueAmount?: long;
valueCurrency?: string;
CONSTRUCTOR_ID: 648369470;
SUBCLASS_OF_ID: 3273414923;
className: 'StarGiftUnique';
@ -17126,6 +17155,7 @@ namespace Api {
canTransferAt?: int;
canResellAt?: int;
collectionId?: int[];
prepaidUpgradeHash?: string;
}> {
// flags: Api.Type;
nameHidden?: true;
@ -17146,7 +17176,8 @@ namespace Api {
canTransferAt?: int;
canResellAt?: int;
collectionId?: int[];
CONSTRUCTOR_ID: 514213599;
prepaidUpgradeHash?: string;
CONSTRUCTOR_ID: 430552434;
SUBCLASS_OF_ID: 2385198100;
className: 'SavedStarGift';
@ -21528,6 +21559,44 @@ namespace Api {
static fromReader(reader: Reader): StarGiftCollections;
}
export class UniqueStarGiftValueInfo extends VirtualClass<{
// flags: Api.Type;
lastSaleOnFragment?: true;
valueIsAverage?: true;
currency: string;
value: long;
initialSaleDate: int;
initialSaleStars: long;
initialSalePrice: long;
lastSaleDate?: int;
lastSalePrice?: long;
floorPrice?: long;
averagePrice?: long;
listedCount?: int;
fragmentListedCount?: int;
fragmentListedUrl?: string;
}> {
// flags: Api.Type;
lastSaleOnFragment?: true;
valueIsAverage?: true;
currency: string;
value: long;
initialSaleDate: int;
initialSaleStars: long;
initialSalePrice: long;
lastSaleDate?: int;
lastSalePrice?: long;
floorPrice?: long;
averagePrice?: long;
listedCount?: int;
fragmentListedCount?: int;
fragmentListedUrl?: string;
CONSTRUCTOR_ID: 1362093126;
SUBCLASS_OF_ID: 372595652;
className: 'UniqueStarGiftValueInfo';
static fromReader(reader: Reader): UniqueStarGiftValueInfo;
}
}
export namespace phone {
@ -24829,11 +24898,6 @@ namespace Api {
}, Bool> {
order: int[];
}
export class ToggleDialogFilterTags extends Request<{
enabled: Bool;
}, Bool> {
enabled: Bool;
}
export class GetOldFeaturedStickers extends Request<{
offset: int;
limit: int;
@ -27304,9 +27368,10 @@ namespace Api {
excludeUnsaved?: true;
excludeSaved?: true;
excludeUnlimited?: true;
excludeLimited?: true;
excludeUnique?: true;
sortByValue?: true;
excludeUpgradable?: true;
excludeUnupgradable?: true;
peer: Api.TypeInputPeer;
collectionId?: int;
offset: string;
@ -27316,9 +27381,10 @@ namespace Api {
excludeUnsaved?: true;
excludeSaved?: true;
excludeUnlimited?: true;
excludeLimited?: true;
excludeUnique?: true;
sortByValue?: true;
excludeUpgradable?: true;
excludeUnupgradable?: true;
peer: Api.TypeInputPeer;
collectionId?: int;
offset: string;
@ -27430,6 +27496,11 @@ namespace Api {
peer: Api.TypeInputPeer;
hash: long;
}
export class GetUniqueStarGiftValueInfo extends Request<{
slug: string;
}, payments.TypeUniqueStarGiftValueInfo> {
slug: string;
}
}
export namespace stickers {
@ -28485,7 +28556,7 @@ namespace Api {
| 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
| 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.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
| 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

View File

@ -159,8 +159,8 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector<RequestedPe
messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_amount:long payload:flags.0?bytes charge:PaymentCharge = MessageAction;
messageActionGiftStars#45d5b021 flags:# currency:string amount:long stars:long crypto_currency:flags.0?string crypto_amount:flags.0?long transaction_id:flags.1?string = MessageAction;
messageActionPrizeStars#b00c47a2 flags:# unclaimed:flags.0?true stars:long transaction_id:string boost_peer:Peer giveaway_msg_id:int = MessageAction;
messageActionStarGift#4717e8a4 flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long = MessageAction;
messageActionStarGiftUnique#34f762f3 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int = MessageAction;
messageActionStarGift#f24de7fa flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true prepaid_upgrade:flags.13?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long prepaid_upgrade_hash:flags.14?string gift_msg_id:flags.15?int = MessageAction;
messageActionStarGiftUnique#34f762f3 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true prepaid_upgrade:flags.11?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int = MessageAction;
messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long = MessageAction;
messageActionPaidMessagesPrice#84b88578 flags:# broadcast_messages_allowed:flags.0?true stars:long = MessageAction;
messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction;
@ -1153,6 +1153,7 @@ inputInvoiceStarGiftTransfer#4a5f5bd9 stargift:InputSavedStarGift to_id:InputPee
inputInvoicePremiumGiftStars#dabab2ef flags:# user_id:InputUser months:int message:flags.0?TextWithEntities = InputInvoice;
inputInvoiceBusinessBotTransferStars#f4997e42 bot:InputUser stars:long = InputInvoice;
inputInvoiceStarGiftResale#c39f5324 flags:# ton:flags.0?true slug:string to_id:InputPeer = InputInvoice;
inputInvoiceStarGiftPrepaidUpgrade#9a0b48b8 peer:InputPeer hash:string = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
messages.transcribedAudio#cfb9d957 flags:# pending:flags.0?true transcription_id:long text:string trial_remains_num:flags.1?int trial_remains_until_date:flags.1?int = messages.TranscribedAudio;
help.premiumPromo#5334759c status_text:string status_entities:Vector<MessageEntity> video_sections:Vector<string> videos:Vector<Document> period_options:Vector<PremiumSubscriptionOption> users:Vector<User> = help.PremiumPromo;
@ -1368,7 +1369,7 @@ starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
starsTransactionPeerAds#60682812 = StarsTransactionPeer;
starsTransactionPeerAPI#f9677aad = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true id:string amount:StarsAmount date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction;
starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true stargift_prepaid_upgrade:flags.25?true id:string amount:StarsAmount date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction;
payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount subscriptions:flags.1?Vector<StarsSubscription> subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
foundStory#e87acbc0 peer:Peer story:StoryItem = FoundStory;
stories.foundStories#e2de7737 flags:# count:int stories:Vector<FoundStory> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stories.FoundStories;
@ -1388,7 +1389,7 @@ messageReactor#4ba3a95a flags:# top:flags.0?true my:flags.1?true anonymous:flags
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<StarsGiveawayWinnersOption> = 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;
starGiftUnique#3a274d50 flags:# require_premium:flags.6?true resale_ton_only:flags.7?true 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<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> released_by:flags.5?Peer = 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<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> 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<StarGift> chats:Vector<Chat> users:Vector<User> = payments.StarGifts;
messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
@ -1417,7 +1418,7 @@ users.users#62d706b8 users:Vector<User> = users.Users;
users.usersSlice#315a4974 count:int users:Vector<User> = users.Users;
payments.uniqueStarGift#caa2f60b gift:StarGift users:Vector<User> = payments.UniqueStarGift;
messages.webPagePreview#b53e8b21 media:MessageMedia users:Vector<User> = messages.WebPagePreview;
savedStarGift#1ea646df 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<int> = 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 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<int> prepaid_upgrade_hash:flags.16?string = SavedStarGift;
payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.SavedStarGifts;
inputSavedStarGiftUser#69279795 msg_id:int = InputSavedStarGift;
inputSavedStarGiftChat#f101aa7f peer:InputPeer saved_id:long = InputSavedStarGift;
@ -1454,6 +1455,7 @@ storyAlbum#9325705a flags:# album_id:int title:string icon_photo:flags.0?Photo i
stories.albumsNotModified#564edaeb = stories.Albums;
stories.albums#c3987a3a hash:long albums:Vector<StoryAlbum> = 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;
---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;
@ -1616,7 +1618,6 @@ messages.getDialogFilters#efd48c89 = messages.DialogFilters;
messages.getSuggestedDialogFilters#a29cd42c = Vector<DialogFilterSuggested>;
messages.updateDialogFilter#1ad4a04a flags:# id:int filter:flags.0?DialogFilter = Bool;
messages.updateDialogFiltersOrder#c563c1e4 order:Vector<int> = Bool;
messages.toggleDialogFilterTags#fd2dda49 enabled:Bool = Bool;
messages.getReplies#22ddd30c peer:InputPeer msg_id:int offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.getDiscussionMessage#446972fd peer:InputPeer msg_id:int = messages.DiscussionMessage;
messages.readDiscussion#f731a9f4 peer:InputPeer msg_id:int read_max_id:int = Bool;
@ -1791,11 +1792,12 @@ payments.getStarGiftUpgradePreview#9c9abcb1 gift_id:long = payments.StarGiftUpgr
payments.upgradeStarGift#aed6e4f5 flags:# keep_original_details:flags.0?true stargift:InputSavedStarGift = Updates;
payments.transferStarGift#7f18176a stargift:InputSavedStarGift to_id:InputPeer = Updates;
payments.getUniqueStarGift#a1974d72 slug:string = payments.UniqueStarGift;
payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_limited:flags.3?true exclude_unique:flags.4?true sort_by_value:flags.5?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;
payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_unique:flags.4?true sort_by_value:flags.5?true exclude_upgradable:flags.7?true exclude_unupgradable:flags.8?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;
payments.getStarGiftWithdrawalUrl#d06e93a8 stargift:InputSavedStarGift password:InputCheckPasswordSRP = payments.StarGiftWithdrawalUrl;
payments.toggleStarGiftsPinnedToTop#1513e7b0 peer:InputPeer stargift:Vector<InputSavedStarGift> = Bool;
payments.getResaleStarGifts#7a5fa236 flags:# sort_by_price:flags.1?true sort_by_num:flags.2?true attributes_hash:flags.0?long gift_id:long attributes:flags.3?Vector<StarGiftAttributeId> offset:string limit:int = payments.ResaleStarGifts;
payments.updateStarGiftPrice#edbe6ccb stargift:InputSavedStarGift resell_amount:StarsAmount = Updates;
payments.getUniqueStarGiftValueInfo#4365af6b slug:string = payments.UniqueStarGiftValueInfo;
payments.getStarGiftCollections#981b91dd peer:InputPeer hash:long = payments.StarGiftCollections;
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;

View File

@ -326,6 +326,7 @@
"payments.upgradeStarGift",
"payments.transferStarGift",
"payments.getUniqueStarGift",
"payments.getUniqueStarGiftValueInfo",
"payments.getStarGiftWithdrawalUrl",
"payments.toggleStarGiftsPinnedToTop",
"payments.getResaleStarGifts",

View File

@ -185,8 +185,8 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector<RequestedPe
messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_amount:long payload:flags.0?bytes charge:PaymentCharge = MessageAction;
messageActionGiftStars#45d5b021 flags:# currency:string amount:long stars:long crypto_currency:flags.0?string crypto_amount:flags.0?long transaction_id:flags.1?string = MessageAction;
messageActionPrizeStars#b00c47a2 flags:# unclaimed:flags.0?true stars:long transaction_id:string boost_peer:Peer giveaway_msg_id:int = MessageAction;
messageActionStarGift#4717e8a4 flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long = MessageAction;
messageActionStarGiftUnique#34f762f3 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int = MessageAction;
messageActionStarGift#f24de7fa flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true prepaid_upgrade:flags.13?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long prepaid_upgrade_hash:flags.14?string gift_msg_id:flags.15?int = MessageAction;
messageActionStarGiftUnique#34f762f3 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true prepaid_upgrade:flags.11?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int = MessageAction;
messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long = MessageAction;
messageActionPaidMessagesPrice#84b88578 flags:# broadcast_messages_allowed:flags.0?true stars:long = MessageAction;
messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction;
@ -1504,6 +1504,7 @@ inputInvoiceStarGiftTransfer#4a5f5bd9 stargift:InputSavedStarGift to_id:InputPee
inputInvoicePremiumGiftStars#dabab2ef flags:# user_id:InputUser months:int message:flags.0?TextWithEntities = InputInvoice;
inputInvoiceBusinessBotTransferStars#f4997e42 bot:InputUser stars:long = InputInvoice;
inputInvoiceStarGiftResale#c39f5324 flags:# ton:flags.0?true slug:string to_id:InputPeer = InputInvoice;
inputInvoiceStarGiftPrepaidUpgrade#9a0b48b8 peer:InputPeer hash:string = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
@ -1853,7 +1854,7 @@ starsTransactionPeerAPI#f9677aad = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true id:string amount:StarsAmount date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction;
starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true stargift_prepaid_upgrade:flags.25?true id:string amount:StarsAmount date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction;
payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount subscriptions:flags.1?Vector<StarsSubscription> subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
@ -1892,7 +1893,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;
starGiftUnique#3a274d50 flags:# require_premium:flags.6?true resale_ton_only:flags.7?true 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<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> released_by:flags.5?Peer = 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<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> 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<StarGift> chats:Vector<Chat> users:Vector<User> = payments.StarGifts;
@ -1941,7 +1942,7 @@ payments.uniqueStarGift#caa2f60b gift:StarGift users:Vector<User> = payments.Uni
messages.webPagePreview#b53e8b21 media:MessageMedia users:Vector<User> = messages.WebPagePreview;
savedStarGift#1ea646df 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<int> = 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 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<int> prepaid_upgrade_hash:flags.16?string = SavedStarGift;
payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.SavedStarGifts;
@ -2004,6 +2005,8 @@ stories.albums#c3987a3a hash:long albums:Vector<StoryAlbum> = 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;
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@ -2311,7 +2314,6 @@ messages.getDialogFilters#efd48c89 = messages.DialogFilters;
messages.getSuggestedDialogFilters#a29cd42c = Vector<DialogFilterSuggested>;
messages.updateDialogFilter#1ad4a04a flags:# id:int filter:flags.0?DialogFilter = Bool;
messages.updateDialogFiltersOrder#c563c1e4 order:Vector<int> = Bool;
messages.toggleDialogFilterTags#fd2dda49 enabled:Bool = Bool;
messages.getOldFeaturedStickers#7ed094a1 offset:int limit:int hash:long = messages.FeaturedStickers;
messages.getReplies#22ddd30c peer:InputPeer msg_id:int offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.getDiscussionMessage#446972fd peer:InputPeer msg_id:int = messages.DiscussionMessage;
@ -2607,7 +2609,7 @@ payments.getStarGiftUpgradePreview#9c9abcb1 gift_id:long = payments.StarGiftUpgr
payments.upgradeStarGift#aed6e4f5 flags:# keep_original_details:flags.0?true stargift:InputSavedStarGift = Updates;
payments.transferStarGift#7f18176a stargift:InputSavedStarGift to_id:InputPeer = Updates;
payments.getUniqueStarGift#a1974d72 slug:string = payments.UniqueStarGift;
payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_limited:flags.3?true exclude_unique:flags.4?true sort_by_value:flags.5?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;
payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_unique:flags.4?true sort_by_value:flags.5?true exclude_upgradable:flags.7?true exclude_unupgradable:flags.8?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;
payments.getSavedStarGift#b455a106 stargift:Vector<InputSavedStarGift> = payments.SavedStarGifts;
payments.getStarGiftWithdrawalUrl#d06e93a8 stargift:InputSavedStarGift password:InputCheckPasswordSRP = payments.StarGiftWithdrawalUrl;
payments.toggleChatStarGiftNotifications#60eaefa1 flags:# enabled:flags.0?true peer:InputPeer = Bool;
@ -2620,6 +2622,7 @@ payments.updateStarGiftCollection#4fddbee7 flags:# peer:InputPeer collection_id:
payments.reorderStarGiftCollections#c32af4cc peer:InputPeer order:Vector<int> = Bool;
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;
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<InputStickerSetItem> software:flags.3?string = messages.StickerSet;
stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
@ -2746,4 +2749,4 @@ smsjobs.getStatus#10a698e8 = smsjobs.Status;
smsjobs.getSmsJob#778d902f job_id:string = SmsJob;
smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;

View File

@ -681,6 +681,7 @@ export type GiftProfileFilterOptions = {
sortType: 'byDate' | 'byValue';
shouldIncludeUnlimited: boolean;
shouldIncludeLimited: boolean;
shouldIncludeUpgradable: boolean;
shouldIncludeUnique: boolean;
shouldIncludeDisplayed: boolean;
shouldIncludeHidden: boolean;

View File

@ -1254,8 +1254,15 @@ export interface LangPair {
'GiftActionHide': undefined;
'GiftInfoTonLinkText': undefined;
'GiftInfoAvailability': undefined;
'GiftInfoValueLinkMore': undefined;
'GiftInfoFirstSale': undefined;
'GiftInfoLastSale': undefined;
'GiftValueTitleInitialSale': undefined;
'GiftValueTitleInitialPrice': undefined;
'GiftValueTitleLastSale': undefined;
'GiftValueTitleLastPrice': undefined;
'GiftValueTitleMinimumPrice': undefined;
'GiftValueTitleAveragePrice': undefined;
'GiftInfoSoldOutTitle': undefined;
'GiftInfoSoldOutDescription': undefined;
'GiftInfoSenderHidden': undefined;
@ -1417,6 +1424,7 @@ export interface LangPair {
'GiftFilterUnique': undefined;
'GiftFilterDisplayed': undefined;
'GiftFilterHidden': undefined;
'GiftFilterUpgradable': undefined;
'GiftSearchEmpty': undefined;
'GiftSearchReset': undefined;
'SetUp2FA': undefined;
@ -1693,6 +1701,8 @@ export interface LangPair {
'ErrorFocusInaccessibleMessage': undefined;
'ContextMenuHintMouse': undefined;
'ContextMenuHintTouch': undefined;
'GiftValueForSaleOnFragment': undefined;
'GiftValueForSaleOnTelegram': undefined;
}
export interface LangPairWithVariables<V = LangVariable> {
@ -2109,6 +2119,9 @@ export interface LangPairWithVariables<V = LangVariable> {
'GiftInfoTonText': {
'link': V;
};
'GiftValueDescription': {
'giftName': V;
};
'GiftInfoIssued': {
'issued': V;
'total': V;