Skip to content

Commit 2b102a6

Browse files
committed
Autodetect business methods
1 parent bb0f51e commit 2b102a6

11 files changed

Lines changed: 77 additions & 39 deletions

File tree

docs

Submodule docs updated 719 files

src/Namespace/Account.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ public function resetNotifySettings(?int $floodWaitLimit = null, ?string $queueI
7676
* @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self
7777
* @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID.
7878
* @param ?\Amp\Cancellation $cancellation Cancellation
79+
* @param ?string $businessConnectionId Business connection ID, received through an updateBotBusinessConnect update.
7980
* @return array|int|string @see https://docs.madelineproto.xyz/API_docs/types/User.html
8081
*/
81-
public function updateProfile(string|null $first_name = null, string|null $last_name = null, string|null $about = null, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array|int|string;
82+
public function updateProfile(string|null $first_name = null, string|null $last_name = null, string|null $about = null, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null, ?string $businessConnectionId = null): array|int|string;
8283

8384
/**
8485
* Updates online user status.
@@ -745,9 +746,10 @@ public function getGlobalPrivacySettings(?int $floodWaitLimit = null, ?string $q
745746
* @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self
746747
* @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID.
747748
* @param ?\Amp\Cancellation $cancellation Cancellation
749+
* @param ?string $businessConnectionId Business connection ID, received through an updateBotBusinessConnect update.
748750
* @return array{_: 'globalPrivacySettings', archive_and_mute_new_noncontact_peers: bool, keep_archived_unmuted: bool, keep_archived_folders: bool, hide_read_marks: bool, new_noncontact_peers_require_premium: bool, display_gifts_button: bool, noncontact_peers_paid_stars?: int, disallowed_gifts?: array{_: 'disallowedGiftsSettings', disallow_unlimited_stargifts: bool, disallow_limited_stargifts: bool, disallow_unique_stargifts: bool, disallow_premium_gifts: bool}} @see https://docs.madelineproto.xyz/API_docs/types/GlobalPrivacySettings.html
749751
*/
750-
public function setGlobalPrivacySettings(array $settings, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array;
752+
public function setGlobalPrivacySettings(array $settings, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null, ?string $businessConnectionId = null): array;
751753

752754
/**
753755
* Report a profile photo of a dialog.

src/Namespace/Messages.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ public function search(array $filter, array|int|string|null $peer = null, string
9191
* @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self
9292
* @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID.
9393
* @param ?\Amp\Cancellation $cancellation Cancellation
94+
* @param ?string $businessConnectionId Business connection ID, received through an updateBotBusinessConnect update.
9495
* @return array{_: 'messages.affectedMessages', pts: int, pts_count: int} @see https://docs.madelineproto.xyz/API_docs/types/messages.AffectedMessages.html
9596
*/
96-
public function readHistory(array|int|string|null $peer = null, int|null $max_id = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array;
97+
public function readHistory(array|int|string|null $peer = null, int|null $max_id = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null, ?string $businessConnectionId = null): array;
9798

9899
/**
99100
* Deletes communication history.
@@ -119,9 +120,10 @@ public function deleteHistory(bool|null $just_clear = null, bool|null $revoke =
119120
* @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self
120121
* @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID.
121122
* @param ?\Amp\Cancellation $cancellation Cancellation
123+
* @param ?string $businessConnectionId Business connection ID, received through an updateBotBusinessConnect update.
122124
* @return array{_: 'messages.affectedMessages', pts: int, pts_count: int} @see https://docs.madelineproto.xyz/API_docs/types/messages.AffectedMessages.html
123125
*/
124-
public function deleteMessages(bool|null $revoke = null, array $id = [], ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array;
126+
public function deleteMessages(bool|null $revoke = null, array $id = [], ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null, ?string $businessConnectionId = null): array;
125127

126128
/**
127129
* Confirms receipt of messages by a client, cancels PUSH-notification sending.
@@ -1253,9 +1255,10 @@ public function clearAllDrafts(?int $floodWaitLimit = null, ?string $queueId = n
12531255
* @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self
12541256
* @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID.
12551257
* @param ?\Amp\Cancellation $cancellation Cancellation
1258+
* @param ?string $businessConnectionId Business connection ID, received through an updateBotBusinessConnect update.
12561259
* @return array @see https://docs.madelineproto.xyz/API_docs/types/Updates.html
12571260
*/
1258-
public function updatePinnedMessage(bool|null $silent = null, bool|null $unpin = null, bool|null $pm_oneside = null, array|int|string|null $peer = null, int|null $id = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array;
1261+
public function updatePinnedMessage(bool|null $silent = null, bool|null $unpin = null, bool|null $pm_oneside = null, array|int|string|null $peer = null, int|null $id = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null, ?string $businessConnectionId = null): array;
12591262

12601263
/**
12611264
* Vote in a [poll](https://docs.madelineproto.xyz/API_docs/constructors/poll.html).

0 commit comments

Comments
 (0)