2022-05-24 01:21:03 +03:00
|
|
|
//
|
2024-01-01 03:07:21 +03:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
2022-05-24 01:21:03 +03:00
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
//
|
|
|
|
#pragma once
|
|
|
|
|
2023-09-28 21:26:33 +03:00
|
|
|
#include "td/telegram/DialogId.h"
|
2023-10-06 18:28:02 +03:00
|
|
|
#include "td/telegram/MessageFullId.h"
|
2022-05-24 01:36:55 +03:00
|
|
|
#include "td/telegram/td_api.h"
|
2023-10-03 18:27:56 +03:00
|
|
|
#include "td/telegram/telegram_api.h"
|
2022-05-24 01:36:55 +03:00
|
|
|
|
2022-05-24 01:21:03 +03:00
|
|
|
#include "td/utils/common.h"
|
2022-06-27 13:30:18 +03:00
|
|
|
#include "td/utils/Promise.h"
|
2022-05-24 01:21:03 +03:00
|
|
|
#include "td/utils/Slice.h"
|
2023-10-03 18:27:56 +03:00
|
|
|
#include "td/utils/Status.h"
|
2022-05-24 01:21:03 +03:00
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
2022-05-24 15:42:46 +03:00
|
|
|
class Td;
|
|
|
|
|
2023-10-03 18:27:56 +03:00
|
|
|
Result<telegram_api::object_ptr<telegram_api::InputPeer>> get_boost_input_peer(Td *td, DialogId dialog_id);
|
|
|
|
|
2022-05-24 01:21:03 +03:00
|
|
|
const vector<Slice> &get_premium_limit_keys();
|
|
|
|
|
2022-05-24 02:55:03 +03:00
|
|
|
void get_premium_limit(const td_api::object_ptr<td_api::PremiumLimitType> &limit_type,
|
|
|
|
Promise<td_api::object_ptr<td_api::premiumLimit>> &&promise);
|
|
|
|
|
2022-05-24 15:42:46 +03:00
|
|
|
void get_premium_features(Td *td, const td_api::object_ptr<td_api::PremiumSource> &source,
|
2022-05-24 02:19:30 +03:00
|
|
|
Promise<td_api::object_ptr<td_api::premiumFeatures>> &&promise);
|
2022-05-24 01:36:55 +03:00
|
|
|
|
2024-03-29 03:17:46 +03:00
|
|
|
void get_business_features(Td *td, const td_api::object_ptr<td_api::BusinessFeature> &source,
|
|
|
|
Promise<td_api::object_ptr<td_api::businessFeatures>> &&promise);
|
|
|
|
|
2022-05-24 20:45:03 +03:00
|
|
|
void view_premium_feature(Td *td, const td_api::object_ptr<td_api::PremiumFeature> &feature, Promise<Unit> &&promise);
|
|
|
|
|
2022-05-25 15:34:36 +03:00
|
|
|
void click_premium_subscription_button(Td *td, Promise<Unit> &&promise);
|
|
|
|
|
2022-06-01 15:14:09 +03:00
|
|
|
void get_premium_state(Td *td, Promise<td_api::object_ptr<td_api::premiumState>> &&promise);
|
|
|
|
|
2023-09-28 21:26:33 +03:00
|
|
|
void get_premium_gift_code_options(Td *td, DialogId boosted_dialog_id,
|
|
|
|
Promise<td_api::object_ptr<td_api::premiumGiftCodePaymentOptions>> &&promise);
|
|
|
|
|
2023-09-28 22:21:25 +03:00
|
|
|
void check_premium_gift_code(Td *td, const string &code,
|
|
|
|
Promise<td_api::object_ptr<td_api::premiumGiftCodeInfo>> &&promise);
|
|
|
|
|
2023-09-28 22:35:57 +03:00
|
|
|
void apply_premium_gift_code(Td *td, const string &code, Promise<Unit> &&promise);
|
|
|
|
|
2023-10-12 18:19:08 +03:00
|
|
|
void launch_prepaid_premium_giveaway(Td *td, int64 giveaway_id,
|
|
|
|
td_api::object_ptr<td_api::premiumGiveawayParameters> &¶meters,
|
|
|
|
Promise<Unit> &&promise);
|
|
|
|
|
2023-10-06 18:28:02 +03:00
|
|
|
void get_premium_giveaway_info(Td *td, MessageFullId message_full_id,
|
|
|
|
Promise<td_api::object_ptr<td_api::PremiumGiveawayInfo>> &&promise);
|
|
|
|
|
2024-05-16 16:21:52 +03:00
|
|
|
void get_star_payment_options(Td *td, Promise<td_api::object_ptr<td_api::starPaymentOptions>> &&promise);
|
|
|
|
|
2024-05-16 20:45:05 +03:00
|
|
|
void get_star_transactions(Td *td, const string &offset,
|
|
|
|
td_api::object_ptr<td_api::StarTransactionDirection> &&direction,
|
|
|
|
Promise<td_api::object_ptr<td_api::starTransactions>> &&promise);
|
|
|
|
|
2022-07-15 14:09:37 +03:00
|
|
|
void can_purchase_premium(Td *td, td_api::object_ptr<td_api::StorePaymentPurpose> &&purpose, Promise<Unit> &&promise);
|
2022-06-24 17:07:10 +03:00
|
|
|
|
2022-07-01 19:27:59 +03:00
|
|
|
void assign_app_store_transaction(Td *td, const string &receipt,
|
|
|
|
td_api::object_ptr<td_api::StorePaymentPurpose> &&purpose, Promise<Unit> &&promise);
|
2022-06-24 18:14:00 +03:00
|
|
|
|
2022-07-18 15:17:01 +03:00
|
|
|
void assign_play_market_transaction(Td *td, const string &package_name, const string &store_product_id,
|
|
|
|
const string &purchase_token,
|
2022-07-01 19:27:59 +03:00
|
|
|
td_api::object_ptr<td_api::StorePaymentPurpose> &&purpose, Promise<Unit> &&promise);
|
2022-06-24 17:27:03 +03:00
|
|
|
|
2022-05-24 01:21:03 +03:00
|
|
|
} // namespace td
|