-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2b6a8b
commit 4dfe238
Showing
76 changed files
with
2,007 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
declare (strict_types = 1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
declare (strict_types = 1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare (strict_types = 1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
use Mateodioev\Bots\Telegram\Config\FieldType; | ||
|
||
/** | ||
* | ||
* @property int $day Day of the user's birth; 1-31 | ||
* @property int $month Month of the user's birth; 1-12 | ||
* @property int|null $year Optional. Year of the user's birth | ||
* | ||
* @method int day() | ||
* @method int month() | ||
* @method int|null year() | ||
* | ||
* @method static setDay(int $day) | ||
* @method static setMonth(int $month) | ||
* @method static setYear(int|null $year) | ||
* | ||
* @see https://core.telegram.org/bots/api#birthdate | ||
*/ | ||
class Birthdate extends abstractType | ||
{ | ||
protected function boot(): void | ||
{ | ||
$this->fields = [ | ||
'day' => FieldType::single('integer'), | ||
'month' => FieldType::single('integer'), | ||
'year' => FieldType::optional('integer'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
declare (strict_types = 1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
declare (strict_types = 1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
use Mateodioev\Bots\Telegram\Config\FieldType; | ||
|
||
/** | ||
* Describes the connection of the bot with a business account. | ||
* | ||
* @property string $id Unique identifier of the business connection | ||
* @property User $user Business account user that created the business connection | ||
* @property int $user_chat_id Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. | ||
* @property int $date Date the connection was established in Unix time | ||
* @property bool $can_reply True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours | ||
* @property bool $is_enabled True, if the connection is active | ||
* | ||
* @method string id() | ||
* @method User user() | ||
* @method int userChatId() | ||
* @method int date() | ||
* @method bool canReply() | ||
* @method bool isEnabled() | ||
* | ||
* @method static setId(string $id) | ||
* @method static setUser(User $user) | ||
* @method static setUserChatId(int $userChatId) | ||
* @method static setDate(int $date) | ||
* @method static setCanReply(bool $canReply) | ||
* @method static setIsEnabled(bool $isEnabled) | ||
* | ||
* @see https://core.telegram.org/bots/api#businessconnection | ||
*/ | ||
class BusinessConnection extends abstractType | ||
{ | ||
protected function boot(): void | ||
{ | ||
$this->fields = [ | ||
'id' => FieldType::single('string'), | ||
'user' => FieldType::single(User::class), | ||
'user_chat_id' => FieldType::single('integer'), | ||
'date' => FieldType::single('integer'), | ||
'can_reply' => FieldType::single('boolean'), | ||
'is_enabled' => FieldType::single('boolean'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
use Mateodioev\Bots\Telegram\Config\FieldType; | ||
|
||
/** | ||
* | ||
* @property string|null $title Optional. Title text of the business intro | ||
* @property string|null $message Optional. Message text of the business intro | ||
* @property Sticker|null $sticker Optional. Sticker of the business intro | ||
* | ||
* @method string|null title() | ||
* @method string|null message() | ||
* @method Sticker|null sticker() | ||
* | ||
* @method static setTitle(string|null $title) | ||
* @method static setMessage(string|null $message) | ||
* @method static setSticker(Sticker|null $sticker) | ||
* | ||
* @see https://core.telegram.org/bots/api#businessintro | ||
*/ | ||
class BusinessIntro extends abstractType | ||
{ | ||
protected function boot(): void | ||
{ | ||
$this->fields = [ | ||
'title' => FieldType::optional('string'), | ||
'message' => FieldType::optional('string'), | ||
'sticker' => FieldType::optional(Sticker::class), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
use Mateodioev\Bots\Telegram\Config\FieldType; | ||
|
||
/** | ||
* | ||
* @property string $address Address of the business | ||
* @property Location|null $location Optional. Location of the business | ||
* | ||
* @method string address() | ||
* @method Location|null location() | ||
* | ||
* @method static setAddress(string $address) | ||
* @method static setLocation(Location|null $location) | ||
* | ||
* @see https://core.telegram.org/bots/api#businesslocation | ||
*/ | ||
class BusinessLocation extends abstractType | ||
{ | ||
protected function boot(): void | ||
{ | ||
$this->fields = [ | ||
'address' => FieldType::single('string'), | ||
'location' => FieldType::optional(Location::class), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
use Mateodioev\Bots\Telegram\Config\FieldType; | ||
|
||
/** | ||
* This object is received when messages are deleted from a connected business account. | ||
* | ||
* @property string $business_connection_id Unique identifier of the business connection | ||
* @property Chat $chat Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. | ||
* @property int[] $message_ids A JSON-serialized list of identifiers of deleted messages in the chat of the business account | ||
* | ||
* @method string businessConnectionId() | ||
* @method Chat chat() | ||
* @method int[] messageIds() | ||
* | ||
* @method static setBusinessConnectionId(string $businessConnectionId) | ||
* @method static setChat(Chat $chat) | ||
* @method static setMessageIds(int[] $messageIds) | ||
* | ||
* @see https://core.telegram.org/bots/api#businessmessagesdeleted | ||
*/ | ||
class BusinessMessagesDeleted extends abstractType | ||
{ | ||
protected function boot(): void | ||
{ | ||
$this->fields = [ | ||
'business_connection_id' => FieldType::single('string'), | ||
'chat' => FieldType::single(Chat::class), | ||
'message_ids' => FieldType::multiple('integer'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
use Mateodioev\Bots\Telegram\Config\FieldType; | ||
|
||
/** | ||
* | ||
* @property string $time_zone_name Unique name of the time zone for which the opening hours are defined | ||
* @property BusinessOpeningHoursInterval[] $opening_hours List of time intervals describing business opening hours | ||
* | ||
* @method string timeZoneName() | ||
* @method BusinessOpeningHoursInterval[] openingHours() | ||
* | ||
* @method static setTimeZoneName(string $timeZoneName) | ||
* @method static setOpeningHours(BusinessOpeningHoursInterval[] $openingHours) | ||
* | ||
* @see https://core.telegram.org/bots/api#businessopeninghours | ||
*/ | ||
class BusinessOpeningHours extends abstractType | ||
{ | ||
protected function boot(): void | ||
{ | ||
$this->fields = [ | ||
'time_zone_name' => FieldType::single('string'), | ||
'opening_hours' => FieldType::multiple(BusinessOpeningHoursInterval::class), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mateodioev\Bots\Telegram\Types; | ||
|
||
use Mateodioev\Bots\Telegram\Config\FieldType; | ||
|
||
/** | ||
* | ||
* @property int $opening_minute The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 24 60 | ||
* @property int $closing_minute The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 24 60 | ||
* | ||
* @method int openingMinute() | ||
* @method int closingMinute() | ||
* | ||
* @method static setOpeningMinute(int $openingMinute) | ||
* @method static setClosingMinute(int $closingMinute) | ||
* | ||
* @see https://core.telegram.org/bots/api#businessopeninghoursinterval | ||
*/ | ||
class BusinessOpeningHoursInterval extends abstractType | ||
{ | ||
protected function boot(): void | ||
{ | ||
$this->fields = [ | ||
'opening_minute' => FieldType::single('integer'), | ||
'closing_minute' => FieldType::single('integer'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.