Update API scheme on layer 142.

This commit is contained in:
John Preston 2022-05-05 10:01:15 +04:00
parent 5adf95fc28
commit 4665ea2854
2 changed files with 13 additions and 10 deletions

View File

@ -844,7 +844,7 @@ inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#1694761b flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm;
payments.paymentForm#b0133b37 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true test:flags.6?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
@ -1376,6 +1376,11 @@ attachMenuPeerTypePM#f146d31f = AttachMenuPeerType;
attachMenuPeerTypeChat#509113f = AttachMenuPeerType;
attachMenuPeerTypeBroadcast#7bfbdefc = AttachMenuPeerType;
inputInvoiceMessage#c5b56859 peer:InputPeer msg_id:int = InputInvoice;
inputInvoiceSlug#c326caef slug:string = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@ -1770,13 +1775,14 @@ bots.getBotMenuButton#9c60eb28 user_id:InputUser = BotMenuButton;
bots.setBotBroadcastDefaultAdminRights#788464e1 admin_rights:ChatAdminRights = Bool;
bots.setBotGroupDefaultAdminRights#925ec9ea admin_rights:ChatAdminRights = Bool;
payments.getPaymentForm#8a333c8d flags:# peer:InputPeer msg_id:int theme_params:flags.0?DataJSON = payments.PaymentForm;
payments.getPaymentForm#37148dbb flags:# invoice:InputInvoice theme_params:flags.0?DataJSON = payments.PaymentForm;
payments.getPaymentReceipt#2478d1cc peer:InputPeer msg_id:int = payments.PaymentReceipt;
payments.validateRequestedInfo#db103170 flags:# save:flags.0?true peer:InputPeer msg_id:int info:PaymentRequestedInfo = payments.ValidatedRequestedInfo;
payments.sendPaymentForm#30c3bc9d flags:# form_id:long peer:InputPeer msg_id:int requested_info_id:flags.0?string shipping_option_id:flags.1?string credentials:InputPaymentCredentials tip_amount:flags.2?long = payments.PaymentResult;
payments.validateRequestedInfo#b6c8f12b flags:# save:flags.0?true invoice:InputInvoice info:PaymentRequestedInfo = payments.ValidatedRequestedInfo;
payments.sendPaymentForm#2d03522f flags:# form_id:long invoice:InputInvoice requested_info_id:flags.0?string shipping_option_id:flags.1?string credentials:InputPaymentCredentials tip_amount:flags.2?long = payments.PaymentResult;
payments.getSavedInfo#227d824b = payments.SavedInfo;
payments.clearSavedInfo#d83d70c1 flags:# credentials:flags.0?true info:flags.1?true = Bool;
payments.getBankCardData#2e79d779 number:string = payments.BankCardData;
payments.exportInvoice#fa7b08fd user_id:InputUser invoice_media:InputMedia = payments.ExportedInvoice;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true animated:flags.1?true videos:flags.4?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;

View File

@ -241,8 +241,7 @@ void Form::requestForm() {
showProgress();
_api.request(MTPpayments_GetPaymentForm(
MTP_flags(MTPpayments_GetPaymentForm::Flag::f_theme_params),
_peer->input,
MTP_int(_msgId),
MTP_inputInvoiceMessage(_peer->input, MTP_int(_msgId)),
MTP_dataJSON(MTP_bytes(Window::Theme::WebViewParams().json))
)).done([=](const MTPpayments_PaymentForm &result) {
hideProgress();
@ -554,8 +553,7 @@ void Form::submit() {
: Flag::f_shipping_option_id)
| (_invoice.tipsMax > 0 ? Flag::f_tip_amount : Flag(0))),
MTP_long(_details.formId),
_peer->input,
MTP_int(_msgId),
MTP_inputInvoiceMessage(_peer->input, MTP_int(_msgId)),
MTP_string(_requestedInformationId),
MTP_string(_shippingOptions.selectedId),
(_paymentMethod.newCredentials
@ -626,8 +624,7 @@ void Form::validateInformation(const Ui::RequestedInformation &information) {
using Flag = MTPpayments_ValidateRequestedInfo::Flag;
_validateRequestId = _api.request(MTPpayments_ValidateRequestedInfo(
MTP_flags(information.save ? Flag::f_save : Flag(0)),
_peer->input,
MTP_int(_msgId),
MTP_inputInvoiceMessage(_peer->input, MTP_int(_msgId)),
Serialize(information)
)).done([=](const MTPpayments_ValidatedRequestedInfo &result) {
hideProgress();