diff --git a/CHANGELOG.md b/CHANGELOG.md index 972fcd5adf..4f605551a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,344 +1,343 @@ -# Telegram-bot (KtGram) changelog +# Telegram-bot (KtGram) Changelog + +## 7.3.0 + +* Supported Telegram API [7.10](https://core.telegram.org/bots/api-changelog#september-6-2024) +* Added option to auto clean state in `@InputChain` as annotation parameter [🔬]. +* Added option to set chaining strategy for `@InputChain` links, to have more control over flow. +* Added option to set custom argument parser for specific activities (`@CommandHandler`, `@CommonHandler`). +* Removed special deeplink case handling, now will need to use the basic mechanism (can be caught by ordered parameters). ### 7.2.2 -* Added option to define custom keys for stateful links. +* Added an option to define custom keys for stateful links. ### 7.2.1 -* Fix ksp applying flow in plugin. +* Fixed KSP applying flow in the plugin. ## 7.2.0 -* Added new plugin for a more convenient installation of the library. -* Moved from `ChainStateManager` to `StatefulLink` flow, since it's more convenient. +* Introduced a new plugin for more convenient library installation. +* Transitioned from `ChainStateManager` to `StatefulLink` flow for improved convenience. ## 7.1.0 -* Cover Telegram API [7.9](https://core.telegram.org/bots/api#august-14-2024) version. -* Added `ChainStateManager.getState` extension to give option get state by passing link itself. +* Supported Telegram API [7.9](https://core.telegram.org/bots/api-changelog#august-14-2024). +* Added `ChainStateManager.getState` extension to retrieve state via a link. ### 7.0.1 -* Fix ksp generation artifact +* Fixed KSP generation artifact. -# 7.0.0** +# 7.0.0 #### Common -* Reorganized internal structure (mostly interfaces and some types), imports may break. -* Added experimental method `TelegramBot.getInstance` to get instance through defined `ClassManager`. -* Removed `EnvConfigLoader` from the main module, since it seems not much in demand. +* Reorganized internal structure (mostly interfaces and some types), potentially breaking imports. +* Added experimental method `TelegramBot.getInstance` to obtain an instance through `ClassManager`. +* Removed `EnvConfigLoader` from the main module due to low demand. * Added bot parameter to `spring-starter`'s `onInit` hook. -* Exposed companion objects for `TelegramBot`, `TgUpdateHandler` to give option for static custom extensions. -* Upgraded jvm target version from `11` > `17`. +* Exposed companion objects for `TelegramBot` and `TgUpdateHandler` for static custom extensions. +* Upgraded JVM target version from `11` to `17`. #### BotContext -* Reworked base methods of `BotContext`, now they're more strongly typed. -* Renamed `chatData` > `classData` since it's more appropriate functionally. -* Decoupled `BotContext` (`userData`, `classData`) from bot itself, to set your own implementation there's new - annotation `@CtxProvider`. -* Added operator extensions `get`, `set` for `User` class that coupled with `userData`, i.e., now you - can use `user["key"] = "value"`. +* Reworked base methods of `BotContext` for stronger typing. +* Renamed `chatData` to `classData` for functional appropriateness. +* Decoupled `BotContext` (`userData`, `classData`) from the bot. + New annotation `@CtxProvider` allows custom implementation. +* Added operator extensions `get` and `set` for `User` class with `userData`, enabling usage like + `user["key"] = "value"`. -#### Fail state handling +#### Fail State Handling -* Added `exceptionHandlingStrategy` to the `configuration` to have more control over exception handling. -* Added `throwExOnActionsFailure` to the `configuration` to throw exceptions on api request sending failures. -* Added `retryOnTooManyRequests()` to the httpClient `configuration`, which returns a `RetryStrategy` that retries on an - api request with status `429` given its delay status. +* Added `exceptionHandlingStrategy` to `configuration` for more control over exception handling. +* Added `throwExOnActionsFailure` to `configuration` to throw exceptions on API request failures. +* Added `retryOnTooManyRequests()` to httpClient `configuration`, offering a `RetryStrategy` for API requests with + status `429`. #### Modules -* Updated the method extensions to `TelegramBot` from `ktgram-utils` module, removing the `Sc` postfix and adding all - method variations. -* Added experimental module (jvmOnly) `ktgram-botctx-redis`, `Redis` implementation - of `BotContext` (`userData`, `classData`). -* Added experimental module `ktgram-config-env`, same as removed `EnvConfigLoader` but for all supported platforms. -* Added experimental module `ktgram-config-toml`, gives an option to configure `TelegramBot` through toml file. +* Updated method extensions to `TelegramBot` from `ktgram-utils` module, removing `Sc` postfix and adding all + variations. +* Added experimental module (jvmOnly) `ktgram-botctx-redis`, a `Redis` implementation of `BotContext` (`userData`, + `classData`). +* Added experimental module `ktgram-config-env`, similar to the removed `EnvConfigLoader` but for all supported + platforms. +* Added experimental module `ktgram-config-toml`, allowing `TelegramBot` configuration through a TOML file. #### Other -* Added `logger` to `LoggingConfiguration` where can be any `Logger` interface implementation passed. -* Added `@InputChain` state manager that will save selected state from update automatically. -* Added additional api validation for the entire api, fixed typos in several parameters. +* Added `logger` to `LoggingConfiguration` for any `Logger` interface implementation. +* Added `@InputChain` state manager for automatic state selection from updates. +* Enhanced API validation across the project and corrected parameter typos. ## 6.6.0 -* Covered 7.8 telegram api. +* Supported Telegram API [7.8](https://core.telegram.org/bots/api-changelog#july-31-2024). ### 6.5.1 -* Fixed `httpClient` wrong initialization exception in spring starter. +* Fixed `httpClient` initialization exception in the spring starter. ### 6.5.0 -* Added `button(...)` function to define button in `answerInlineQuery` options. -* Added method `toWebhookResponse` to actions to give an option to respond to webhook. -* Added separate `bot.update.parse(...)`, helpful if you're using webhook responses. -* Fixed incorrect request url resolution when using multiple bot instances. -* Added ability to share `httpClient` between instances in ktor starter, spring starter will also use the httClient, if - bean is defined. +* Added `button(...)` function for defining a button in `answerInlineQuery` options. +* Added `toWebhookResponse` method to actions for webhook responses. +* Added separate `bot.update.parse(...)` for webhook responses. +* Fixed incorrect request URL resolution with multiple bot instances. +* Enabled `httpClient` sharing between instances in ktor starter; spring starter also uses `httpClient` if a bean is + defined. ### 6.4.1 -* Fix `SuccessfulPayment` absence of `orderInfo` nullability bug. +* Fixed `SuccessfulPayment` `orderInfo` nullability bug. ## 6.4.0 -* Change a request url forming scheme, now you can set protocol, plus added `isTestEnv` parameter to turn testing env. -* Added `bot.update.runExceptionHandler {}` to run ex. handling loop. -* Added secondary constructors for places where `ImplicitFile` used with `String`, `InputFile` options. -* Added `.sendReturning()` method (same as `sendAsync()`) for a more understandable flow. -* Moved `user_id` parameter from `send*` method to constructor - in `createNewStickerSet`, `setStickerSetThumbnail`, `uploadStickerFile`, `addStickerToSet`, - it wasn't obvious and didn't reflect the telegram api. -* Improved optional `thumbnail` passing for media (photo, document, etc.) actions. +* Changed a request URL forming scheme, allowing protocol setting and adding `isTestEnv` parameter for testing + environments. +* Added `bot.update.runExceptionHandler {}` for exception handling loops. +* Added secondary constructors for `ImplicitFile` with `String` and `InputFile` options. +* Added `.sendReturning()` method (similar to `sendAsync()`) for clearer flow. +* Moved `user_id` parameter to constructor in methods like `createNewStickerSet`, reflecting Telegram API more + accurately. +* Improved optional `thumbnail` passing for media actions (photo, document, etc.). ### 6.3.1 * Fixed `webapp` onEvent handling. -* Changed `Update` usage in processes to `ProcessedUpdate` (changed also - in `bot.handleUpdates()`, `bot.update.caughtExceptions`). -* Changed in `replyKeyboardMarkup {}` webApp right operand to url string. +* Changed `Update` usage to `ProcessedUpdate` in processes (also in `bot.handleUpdates()`, + `bot.update.caughtExceptions`). +* Changed `replyKeyboardMarkup {}` webApp right operand to URL string. ## 6.3.0 -* Covered 7.7 api. +* Supported Telegram API [7.7](https://core.telegram.org/bots/api-changelog#july-7-2024). ## 6.2.0 -* Covered 7.6 telegram api. +* Supported Telegram API [7.6](https://core.telegram.org/bots/api-changelog#july-1-2024). * Added `onInit` hook in spring-boot starter. -* Fixed a rare issue with sealed structures serialization. -* Changed parameter for source update in `ProcessedUpdate` from `update` to `origin`, old one is still remains but - deprecated. +* Fixed a rare issue with sealed structure serialization. +* Changed `ProcessedUpdate` source update parameter from `update` to `origin`; the old one remains but is deprecated. ### 6.1.1 -* Fix `String` always non-nullability issue in ksp processor. -* Fix `chatData` wrong clearing behavior, even within same class. -* Change `date` type from long to `Instant` in `RevenueWithdrawalState`, `StarTransaction`. -* Change `TransactionPartner.User` to `TransactionPartner.UserPartner`, to not confuse base `User` resolving. -* Added experimental `Collection<>.joinToInlineKeyboard` function to use basic pagination. +* Fixed `String` non-nullability issue in KSP processor. +* Fixed `chatData` clearing behavior within the same class. +* Changed `date` type from long to `Instant` in `RevenueWithdrawalState` and `StarTransaction`. +* Changed `TransactionPartner.User` to `TransactionPartner.UserPartner` to avoid confusion with base `User` resolution. +* Added experimental `Collection<>.joinToInlineKeyboard` function for basic pagination. ## 6.1.0 -* Covered 7.5 Telegram api. +* Supported Telegram API [7.5](https://core.telegram.org/bots/api-changelog#june-18-2024). ### 6.0.1 -* Fix webapp `setParams` immutability. -* Fix ksp `UpdateType` resolving problem. -* Fix `photoHeight` missing in `InlineQueryResult`. +* Fixed webapp `setParams` immutability. +* Fixed KSP `UpdateType` resolution problem. +* Fixed `photoHeight` missing in `InlineQueryResult`. # 6.0.0 -* Introduced new `@CommonHandler` which have nested annotations `@CommonHandler.Text`, `@CommonHandler.Regex` - with rich configuration. -* Removed `@RegexCommandHandler` since it can be fully replaced with `@CommonHandler.Regex`. -* Changed guard interface from `Filter` to `Guard` since `@CommonHandler` have filtering mechanics. +* Introduced `@CommonHandler` with nested annotations `@CommonHandler.Text` and `@CommonHandler.Regex` for rich + configuration. +* Removed `@RegexCommandHandler`, replaced by `@CommonHandler.Regex`. +* Changed guard interface from `Filter` to `Guard` due to `@CommonHandler` filtering mechanics. ## 5.5.0 -* Added new guard mechanism to `@CommandHandler` (+`@CallbackQuery`), `@InputHandler` to make checks before processing. +* Added new guard mechanism to `@CommandHandler` (+`@CallbackQuery`) and `@InputHandler` for pre-processing checks. * Added `beforeAction` and `afterAction` hooks to `ChainLink`. #153 -* Added `ksp2` support, add `ksp.useKSP2=true` in gradle.properties to turn on. -* Fixed missing `chatId` in action `BusinessExt`. -* Fixed `TgUpdateHandler` logging level mismatching. #149 +* Added `ksp2` support; enable with `ksp.useKSP2=true` in gradle.properties. +* Fixed missing `chatId` in `BusinessExt` action. +* Fixed `TgUpdateHandler` logging level mismatch. #149 * Fixed `replyKeyboardMarkup` missing option changes. #152 -* Covered Telegram `7.4` api version. +* Supported Telegram API [7.4](https://core.telegram.org/bots/api-changelog#may-28-2024). ## 5.4.0 -* Covered 7.3 telegram api. -* Added ability to use own implementation of `ChainLink` in `InputChain`. +* Supported Telegram API [7.3](https://core.telegram.org/bots/api-changelog#may-6-2024). +* Enabled custom `ChainLink` implementation in `InputChain`. * Improved Spring starter configuration. -* Removed old methods of `ListingBuilder` for multiple elements, now use `addAll()`. +* Removed old `ListingBuilder` methods for multiple elements; use `addAll()`. * Added new builder for `sendPoll`/`poll` options. ### 5.3.2 -* Fix `EntitiesContextualBuilder` bug. +* Fixed `EntitiesContextualBuilder` bug. ### 5.3.1 -* Fixed the wrong class manager passed to spring starter configuration. -* Added ability to manually configure instances. +* Fixed incorrect class manager in spring starter configuration. +* Enabled manual instance configuration. ## 5.3.0 -* Fixed bug with throwing exception in ActionExt(Inline, Business). -* Added parameter to `@RegexCommandHandler` to pass regex options. -* Added experimental Spring starter. +* Fixed exception throwing bug in `ActionExt(Inline, Business)`. +* Added parameter to `@RegexCommandHandler` for regex options. +* Introduced experimental Spring starter. ## 5.2.0 -* Added `ktor-starter` module for a quick webhook server setup. +* Added `ktor-starter` module for quick webhook server setup. * Added `identifier` parameter for `TelegramBot` instance. -* Changed `kotlinx-datetime` to transitive dependency, since its entities used in parameters. -* Returned a missing inline mode action extension for `getGameHighScores` method. -* Added `inputAutoRemoval` parameter to configuration, for more precise control of inputListener flow. -* Added missing 7.2 api `BiometricManager` to webapps. +* Changed `kotlinx-datetime` to transitive dependency due to its use in parameters. +* Restored a missing inline mode action extension for `getGameHighScores` method. +* Added `inputAutoRemoval` parameter to configuration for precise `inputListener` flow control. +* Added missing 7.2 API `BiometricManager` to webapps. ## 5.1.0 -* Fixed multipart requests data redundant quotation. -* Returned `logback` as logger for `jvm` target. +* Fixed redundant quotation in multipart requests. +* Restored `logback` as logger for JVM target. * Moved inline mode methods to extension interface from separate `InlinableAction`. -* Added `Any` upperbounds for `Autowiring` interface to avoid wrong behavior. -* Covered 7.2 TelegramApi changes. +* Added `Any` upper bounds for `Autowiring` interface to prevent incorrect behavior. +* Supported Telegram API [7.2](https://core.telegram.org/bots/api-changelog#march-31-2024) changes. ### 5.0.5 -* Fix nullable type resolving issue for `Autowiring` mechanics. -* Changed default ktor engine to java-http. +* Fixed nullable type resolution issue in `Autowiring` mechanics. +* Changed default Ktor engine to java-http. ### 5.0.4 -* Remove lazy structures that cause performance issues +* Removed lazy structures causing performance issues. ### 5.0.3 -* Fix `user` parameter missing in functional handlers. +* Fixed missing `user` parameter in functional handlers. ### 5.0.2 -* Fix ksp processor for regex handlers. #106 -* Fix ksp processor InputHandler and RegexHandler RateLimits collecting. +* Fixed KSP processor for regex handlers. #106 +* Fixed KSP processor `InputHandler` and `RegexHandler` rate limits collection. ### 5.0.1 * Changed internal modifier for `context {}` config section. #103 -* Fixed annotation processing error in ksp processor for non-jvm modules. +* Fixed annotation processing error in KSP processor for non-JVM modules. * Added basic `ClassManager` for Kotlin Native target. # 5.0.0 -* Moved the library to kotlin multiplatform with `jvm`/`js`/`native` goals. Experimental at the moment. -* Serialization library replaced with `kotlinx-serialization`. -* Logging utility changed. +* Transitioned a library to Kotlin Multiplatform with `jvm`/`js`/`native` goals (experimental). +* Replaced a serialization library with `kotlinx-serialization`. +* Updated logging utility. * Added webapp module. -* Moved message-related methods to a separate package (your imports could be broken). +* Moved message-related methods to a separate package (imports may be broken). ### 4.3.1 -* Fix coroutines space overconsumption bug. +* Fixed coroutines space overconsumption bug. ## 4.3.0 -* Changed naming of internal components. - * `Action` (annotated entities) is now `Activity`, not to be confused with actions that form requests. - * `ManualHandling` > `FunctionalHandling` - for better understanding. -* Added shortcut to `onFailure` method on `Deferred`, for consistency of approach. -* Added logging of the `Activity` list during the initialization phase. -* Internal structure of `FunctionalHandling` has been improved. -* Improved flow of coroutines in long polling mode, added request timeout in configuration, \ - see `updatesListener` block in configuration. -* Retry processing in the client has been improved, so it doesn't repeat all requests (e.g., 400 status), - only the necessary ones. -* The type of the parameter `messageThreadId` has been changed to `Int`, as it better represents the data. -* The base scope of commands for friendliness towards beginners and better understanding has been - changed to just `UpdateType.Message`. In other words, by default, it will have similar behavior to other types of - libraries. +* Renamed internal components: + * `Action` (annotated entities) is now `Activity`, to avoid confusion with request-forming actions. + * `ManualHandling` is now `FunctionalHandling` for clarity. +* Added `onFailure` shortcut method on `Deferred` for consistency. +* Logged `Activity` list during initialization. +* Improved internal structure of `FunctionalHandling`. +* Enhanced coroutine flow in long polling mode; added request timeout in configuration (`updatesListener` block). +* Improved retry processing in a client to avoid unnecessary request repetition (e.g., status 400). +* Changed `messageThreadId` parameter type to `Int` for better data representation. +* Simplified base scope of commands to `UpdateType.Message` for beginner friendliness. ### 4.2.1 * Removed unnecessary `bot.addAutowiringObject` method. -* Enhanced `userData`/`chatData` get method with generic wrapped with catching for safety. -* Added `allowedUpdates` for long-polling since it necessary for getting special type updates. -* Fixed `giveawayMessageId` type: `Int` > `Long`. -* Added `replyParameters(messageId, block: ReplyParameters.() -> Unit)` fun-shortcut for changing replyParameters. -* Optimized action internal type inference. +* Enhanced `userData`/`chatData` get method with generic wrapping for safety. +* Added `allowedUpdates` for long-polling to receive special updates. +* Fixed `giveawayMessageId` type: `Int` to `Long`. +* Added `replyParameters(messageId, block: ReplyParameters.() -> Unit)` shortcut for modifying reply parameters. +* Optimized internal type inference for actions. ## 4.2.0 * Added `send` method for `Chat` to `Action<>`. -* Changed ambiguous for `User`/`Chat` - names: `MessageOrigin` (`User` > `UserOrigin`, `Chat` > `ChatOrigin`), `BotCommandScope.Chat` > - `BotCommandScope.ChatScope`. -* Enhanced `linkPreviewOptions`: Introduced `disableWebPagePreview()` for easier disabling, and `linkPreviewOptions{}` - for setting through lambda. -* Improved sealed class structure for better accessibility to general - parameters (`MaybeInaccessibleMessage`, `MessageOrigin`, `ChatBoostSource`, `ChatMember`). -* Removed ReflectionHandler as CodegenHandler has proven effective. -* Changed long-polling handling, separated updates collecting and handling. -* Returned `coroutines` dependency as transitive, since it makes inconvenience in `sendAsync` methods process. -* Add `getOrNull()` method for `Deferred>` to lower verbosity for handling. -* Set default names for media methods using ByteArray and File to prevent incorrect API behavior when unset. -* Changed `botLogLevel` type to new proxy enum `LogLvl` since `logback` it's not transitive more. +* Renamed ambiguous `User`/`Chat` names: + * `MessageOrigin` (`User` to `UserOrigin`, `Chat` to `ChatOrigin`) + * `BotCommandScope.Chat` to `BotCommandScope.ChatScope` +* Enhanced `linkPreviewOptions`: Introduced `disableWebPagePreview()` and `linkPreviewOptions{}` for lambda setting. +* Improved sealed class structure for better accessibility to general parameters (`MaybeInaccessibleMessage`, + `MessageOrigin`, `ChatBoostSource`, `ChatMember`). +* Removed `ReflectionHandler` as `CodegenHandler` is effective. +* Separated updates collection and handling in long-polling. +* Restored `coroutines` dependency as transitive for `sendAsync` methods. +* Added `getOrNull()` method for `Deferred>` to reduce verbosity. +* Set default names for media methods using `ByteArray` and `File` to prevent incorrect API behavior. +* Changed `botLogLevel` type to new proxy enum `LogLvl` since `logback` is not transitive. ## 4.1.0 -* Added shortcut annotation for `CallbackQuery` handling > `@CommandHandler.CallbackQuery` (or you can import it and use - without a prefix). -* Changed all date fields that represent timestamp to `Instant` and `Duration` when it's period. -* Changed structure of `caughtExceptions` event from `Pair` to `FailedUpdate`. -* Changed `logback`, `coroutines` from api-dependency to implementation-dependency (i.e., not transitive now). -* Covered Telegram API `7.0` version. +* Introduced `@CommandHandler.CallbackQuery` shortcut annotation (or import without a prefix). +* Changed all date fields representing timestamps to `Instant` and periods to `Duration`. +* Changed `caughtExceptions` event structure from `Pair` to `FailedUpdate`. +* Changed `logback` and `coroutines` from API dependency to implementation-dependency (non-transitive). +* Supported Telegram API 7.0. ### 4.0.1 -* Fix parsing annotations bug when parameters are not well-ordered. +* Fixed parsing annotations bug with unordered parameters. # 4.0.0 -* Added the ability to collect actions in compile time. -* Improved support of input chains in annotation mode. -* Added support for all scopes for commands. -* Added ability to pass all subclasses of `ProcessedUpdate` in new codegen update handler. -* Improved signature of `copyMessage`, `forwardMessage`, `banChatSenderChat`, `unbanChatSenderChat` methods. +* Enable an action collection at compile time. +* Enhanced support for input chains in annotation mode. +* Supported all command scopes. +* Allowed all `ProcessedUpdate` subclasses in new codegen update handler. +* Improved signatures of methods like `copyMessage`, `forwardMessage`, `banChatSenderChat`, `unbanChatSenderChat`. ## 3.5.0 -* Added infix functions to `EntitiesBuilder` (which is used in features by `caption {}` and `entities {}`). -* Added infix function to the builder used in `setMyCommands` for ease of adding a command. -* Changed the function for methods `answerInlineQuery`, `answerShippingQuery`, `poll`, `setPassportDataErrors` that - used `array`/`list` to collect elements, added a new `ListingBuilder`, for convenience of adding enumerable elements. -* Wherever `userId` is used in function-methods, shortcuts using `User` have been added. -* For those methods where the `send*` keyword in the function name was omitted, the method shortcuts are added. -* Refactored the internal structure of actions and features. +* Added infix functions to `EntitiesBuilder` (used in `caption {}` and `entities {}`). +* Added infix function to builder used in `setMyCommands` for easier command addition. +* Changed methods like `answerInlineQuery`, `answerShippingQuery`, `poll`, `setPassportDataErrors` to use + `ListingBuilder` for convenience. +* Added `User` shortcuts where `userId` is used in function-methods. +* Added method shortcuts where the `send*` keyword was omitted. +* Refactored internal structure of actions and features. ## 3.4.0 -* Added `InputChaining` in annotation mode as experimental feature. -* Added `additionalHeaders` that will be applied to requests to `HttpConfiguration` - * (maybe useful for authorization via socks proxy) -* Added `Deffered>.foldResponse()` function to handle async responses. +* Added `InputChaining` in annotation mode as an experimental feature. +* Added `additionalHeaders` for requests in `HttpConfiguration` (useful for socks proxy authorization). +* Added `Deffered>.foldResponse()` function for async responses. ### 3.3.1 -* Added ability to use proxy. See `httpClient{}` section in bot configuration. +* Enabled proxy usage. See `httpClient{}` section in bot configuration. ## 3.3.0 -* Fixed bug with missing media within an input handling process. -* Moved rate limit mechanism setting and its general limits to one configuration section `rateLimiter{}`, also now you - can set rate exceeded action in configuration. -* Added new convenient shortcuts for `InputListener` and `BotContext` interfaces. -* Little internal code optimizations + lib versions bumps. +* Fixed missing media in an input handling process. +* Consolidated rate limit mechanism settings into `rateLimiter{}` configuration; set rate exceeded action in + configuration. +* Added convenient shortcuts for `InputListener` and `BotContext` interfaces. +* Minor internal code optimizations and library version updates. ## 3.2.0 -* Added the fields `fromRequest` and `fromAttachmentMenu` to the class `WriteAccessAllowed`. -* Added the new administrator privileges `canPostStories`, `canEditStories` and `canDeleteStories` to the - classes `ChatMember.Administrator` and `ChatAdministratorRights`. -* Added the parameters `canPostStories`, `canEditStories` and `canDeleteStories` to the method `promoteChatMember()`. +* Added `fromRequest` and `fromAttachmentMenu` fields to `WriteAccessAllowed`. +* Added new admin privileges `canPostStories`, `canEditStories`, and `canDeleteStories` to `ChatMember.Administrator` + and `ChatAdministratorRights`. +* Added `canPostStories`, `canEditStories`, and `canDeleteStories` parameters to `promoteChatMember()`. ## 3.1.0 -* Changed `Autowiring` and `ClassManager` interfaces to fun interfaces. -* Added extensions to `ProcessedUpdate` class. - * parameter `userOrNull` which returns `User` or `null` :) - * function `getUser` which returns `User` or throws NPE. - (it's actually nullable only in rare cases, but anyway, use it - with caution) +* Changed `Autowiring` and `ClassManager` interfaces to functional interfaces. +* Added extensions to `ProcessedUpdate` class: + * `userOrNull` returns `User` or `null`. + * `getUser` returns `User` or throws NPE (nullable in rare cases; use with caution). * Added shortcut functions to `Markup` interfaces for `InlineKeyboardMarkup`, `ReplyKeyboardMarkup`, `ForceReply`. ### 3.0.4 -* Improved signatures of some sticker-set and chat related methods. +* Improved signatures of some sticker-set and chat-related methods. ### 3.0.3 @@ -346,173 +345,163 @@ ### 3.0.2 -* Make manual handling flow similar to annotation regarding regex processing. +* Aligned manual handling flow with annotation regarding regex processing. ### 3.0.1 -* Fixed behavior when no action was found and regex processing threw an exception if the received message did not match. +* Fixed behavior when no action was found, and regex processing threw an exception if the message did not match. # 3.0.0 -* Added ability for lib to catch actions in top level functions and object functions. -* Fixed wrong action bugs in forum related actions. +* Enabled lib to catch actions in top-level and object functions. +* Fixed wrong action bugs in forum-related actions. * Fixed `GetGameHighScores`, `GetMyShortDescription` methods. -* Changed `Recipient` class that used in some action to `Identifier` -* Covered `6.8` version of Tg Api. - * Added new method `unpinAllGeneralForumTopicMessages.`. - * Added new field `story` to `Message`. - * Added new field `emojiStatusExpirationDate` to `Chat`. - * Added new field `voterChat` to `PollAnswer`. +* Changed `Recipient` class to `Identifier`. +* Supported `6.8` version of Telegram API: + * Added `unpinAllGeneralForumTopicMessages` method. + * Added `story` field to `Message`. + * Added `emojiStatusExpirationDate` to `Chat`. + * Added `voterChat` to `PollAnswer`. ## 2.9.0 -* Added new annotation `RegexCommandHandler` for handling regex commands. -* Changed `MagicObject` into `Autowiring` for better understanding. -* Added ability for passing `MessageUpdate` and `CallbackQueryUpdate` into function (instead more - generic `ProcessedUpdate`, passing which is also possible). +* Added `RegexCommandHandler` annotation for regex commands. +* Changed `MagicObject` to `Autowiring` for clarity. +* Enabled passing `MessageUpdate` and `CallbackQueryUpdate` into function (in addition to `ProcessedUpdate`). ### 2.8.1 -* Bumped dependencies versions -* Little internal logic improvements +* Updated dependencies versions. +* Minor internal logic improvements. ## 2.8.0 -#### Telegram Api related changes +#### Telegram API Changes -* Change `switchPmText` `switchPmParameter` to `button` with `InlineQueryResultsButton` in `answerInlineQuery`. -* Added the field `webAppName` to the class `WriteAccessAllowed`. -* Added the ability to set different bot names for different user languages using the method `setMyName`. -* Added the ability to get the current bot name in the given language as the class `BotName` using the - method `getMyName`. -* Added the field `switchInlineQueryChosenChat` of the type `SwitchInlineQueryChosenChat` to the - class `InlineKeyboardButton`. -* Added the field `viaChatFolderInviteLink` to the class `ChatMemberUpdated`. +* Changed `switchPmText` and `switchPmParameter` to `button` with `InlineQueryResultsButton` in `answerInlineQuery`. +* Added `webAppName` field to `WriteAccessAllowed`. +* Enabled setting different bot names for different user languages using `setMyName`. +* Added method `getMyName` to retrieve current bot name in a given language as `BotName`. +* Added `switchInlineQueryChosenChat` field to `InlineKeyboardButton`. +* Added `viaChatFolderInviteLink` field to `ChatMemberUpdated`. -#### Bot improvements +#### Bot Improvements -* Deleted deprecated `Bot*` prefix for Context interfaces. #22 +* Removed deprecated `Bot*` prefix from Context interfaces. #22 * Added default implementation for context interfaces based on `ConcurrentHashMap`. #25 -* Make `MagicObject.get` function suspendable. #19 -* Add scope parameter for manual commands. #20 -* Add additional parsing for a deeplink case. +* Made `MagicObject.get` function suspendable. #19 +* Added scope parameter for manual commands. #20 +* Added additional parsing for deeplink cases. ### 2.7.4 -* Fix `Voice` wrong parameter type. -* Fix `ForceReply` wrong parameter name. +* Fixed `Voice` wrong parameter type. +* Fixed `ForceReply` wrong parameter name. ### 2.7.3 -* Swap parameters in `chatAction` method for better interface. +* Swapped parameters in `chatAction` method for better interface. * Exposed `Update.processUpdate()` method. -* Improved logging (better layer separation, error notification even in silent mode). -* Make `restrictSpacesInCommands` - `false` by default. -* Add missing `switchInlineQueryCurrentChat` parameter to `InlineKeyboardButton`. +* Enhanced logging (better layer separation, error notification even in silent mode). +* Made `restrictSpacesInCommands` `false` by default. +* Added missing `switchInlineQueryCurrentChat` parameter to `InlineKeyboardButton`. * Fixed `ManualDsl.whenNotHandled`. * Fixed `InputChaining` logic. -* Refactor and improve commandParsing logic. +* Refactored and improved command parsing logic. ### 2.7.2 -* Reworked `ProcessedUpdate` to sealed structure for more consistency. -* Deprecated Bot* prefix of contextual interfaces to use them without prefix. -* Added new `scope` parameter to `@CommandHandler` annotation, to be able to isolate the processing. +* Reworked `ProcessedUpdate` to a sealed structure for consistency. +* Deprecated `Bot*` prefix for contextual interfaces. +* Added new `scope` parameter to `@CommandHandler` annotation for isolated processing. ### 2.7.1 -* Added new `ConfigLoader` interface and ability to initialize a `TelegramBot` instance through it. - The default implementation of configuring via environment variables is present. -* A lowered version of the reflection library, due to problems with finding actions on some environments. +* Added `ConfigLoader` interface and ability to initialize a `TelegramBot` instance through it. +* Lowered reflection library version due to action-finding issues in some environments. ## 2.7.0 -#### Telegram Api related changes +#### Telegram API Changes -* Add `setMyDescription`, `getMyDescription`, `setMyShortDescription`, `getMyShortDescription` methods. -* Add `emoji` parameter to `sendSticker`. -* Add sticker set related methods and add support of `webp` format. -* Renamed `thumb` to `thumbnail` in places where it was present. +* Added methods `setMyDescription`, `getMyDescription`, `setMyShortDescription`, `getMyShortDescription`. +* Added `emoji` parameter to `sendSticker`. +* Added sticker set related methods and `webp` format support. +* Renamed `thumb` to `thumbnail` where applicable. -#### Bot improvements +#### Bot Improvements -* Add new contextual entities building. +* Added new contextual entities building. * Renamed `CallbackParam` annotation to `ParamMapping`. -* Reorganized types structure (some imports may have broken because of it). -* Unnecessary elements (parameters, options etc.) from actions have been hidden from the user interface. +* Reorganized types structure (some imports may be broken). +* Hid unnecessary elements (parameters, options, etc.) from the user interface. ## 2.6.0 -#### Telegram Api related changes +#### Telegram API Changes -* Added the class `KeyboardButtonRequestUser` and the field `requestUser` to the class `KeyboardButton`. -* Added the class `KeyboardButtonRequestChat` and the field `requestChat` to the class `KeyboardButton`. -* Added the classes `UserShared`, `ChatShared` and the fields `userShared`, and `chatShared` to the class `Message`. -* Replaced the fields `canSendMediaMessages` in the classes `ChatMemberRestricted` and `ChatPermissions` - with separate fields `canSendAudios`, `canSendDocuments`, `canSendPhotos`, `canSendVideos`, `canSendVideoNotes`, - and `canSendVoiceNotes` for different media types. -* Added the parameter `useIndependentChatPermissions` to the methods `restrictChatMember` and `setChatPermissions`. -* Added the field `userChatId` to the class `ChatJoinRequest`. +* Added `KeyboardButtonRequestUser` class and `requestUser` field to `KeyboardButton`. +* Added `KeyboardButtonRequestChat` class and `requestChat` field to `KeyboardButton`. +* Added `UserShared`, `ChatShared` classes and `userShared`, `chatShared` fields to `Message`. +* Replaced `canSendMediaMessages` in `ChatMemberRestricted` and `ChatPermissions` with separate fields for different + media types. +* Added `useIndependentChatPermissions` parameter to `restrictChatMember` and `setChatPermissions`. +* Added `userChatId` field to `ChatJoinRequest`. -#### Bot internal improvements +#### Bot Internal Improvements -* Add new `UpdateHandler` annotation to handle update events. -* Improved command parsing mechanism and make it more flexible and configurable. - See `commandParsing` section of bot configuration. -* Upgrade dependencies versions: +* Added `UpdateHandler` annotation for update events. +* Improved command parsing mechanism for flexibility and configurability (see `commandParsing` in bot configuration). +* Updated dependencies: * `Jackson`: `2.14.1` -> `2.14.2` * `Ktor`: `2.2.1` -> `2.2.3` * `Kotlin`: `1.8.0` -> `1.8.10` ### 2.5.4 -* Fix test and improve `inputChain` logic. +* Fixed and improved `inputChain` logic. ### 2.5.3 -* Add repeat parameter for `InputChain.breakIf()` +* Added repeat parameter for `InputChain.breakIf()`. ### 2.5.2 -* Add a new method for defining behavior of update processing. - to avoid redefining in webhook processing. +* Added method for update processing behavior definition to avoid redefinition in webhook processing. ### 2.5.1 -* Add method for only text buttons into `replyKeyboardButton()` builder. -* Fix not passing isPersistent parameter in `replyKeyboardMarkup()` builder. -* Pass `Update` next to exception in `TelegramUpdateHandler.caughtExceptions`. +* Added text button method to `replyKeyboardButton()` builder. +* Fixed `isPersistent` parameter passing in `replyKeyboardMarkup()` builder. +* Passed `Update` next to exception in `TelegramUpdateHandler.caughtExceptions`. ## 2.5.0 -#### Telegram Api related changes - -* Add the field `isPersistent` to the class `ReplyKeyboardMarkup`. -* Add `hasSpoiler` to `photo()` `video()` `animation()` options and into `InputMedia.Photo` `InputMedia.Video` - `InputMedia.Animation`. Also `hasMediaSpoiler` to `Message`. -* Add `hasHiddenMembers`, `hasAggressiveAntiSpamEnabled` parameters to `Chat`. -* Add messageThreadId parameter to `chatAction()`. -* Add `forumTopicEdited`, `generalForumTopicHidden`, `generalForumTopicUnhidden`, `writeAccessAllowed` to `Message`. -* Add topic management methods. - -#### Bot internal improvements - -* Deleted some too verbose constructors of `ReplyKeyboardMarkup`. -* Created new convenient DSL for creating markup - `replyKeyboardMarkup()`, similar to an inline keyboard version, see - examples in wiki. -* A new parameter `TelegramUpdateHandler.caughtExceptions` was introduced, where centralized caught errors will be sent. - Exceptions that occurred during manual update processing are now also intercepted. -* Changed `invoice()`(`sendInvoice`), `createInvoiceLink`(`createInvoiceLink`) parameters defining by moving it to - lambda. For more convenience and less verbosity. -* Changed `createNewStickerSet()`(`createNewStickerSet`) parameters defining by moving it to lambda. -* Improved entity defining in `EntitiesBuilder` moving optional parameters to lambda. -* Add generics to `BotContext`(`chatData`, `userData`) interfaces. -* Deleted private `Update` extensions for handling and move string update handling to new - function `TelegramUpdateHandler.parseAndHandle`. -* Add some update listener configuring variables to `TelegramBot.botConfiguration` - `updatesListener()`. -* Moved `BotContext`(`chatData`, `userData`) configuring to `TelegramBot.botConfiguration` - `context()`. - And now they are not null, but you can get an exception if you try to access without setting. -* Upgrade dependencies versions: +#### Telegram API Changes + +* Added `isPersistent` field to `ReplyKeyboardMarkup`. +* Added `hasSpoiler` to `photo()`, `video()`, `animation()` options and `InputMedia.Photo`, `InputMedia.Video`, + `InputMedia.Animation`. Also added `hasMediaSpoiler` to `Message`. +* Added `hasHiddenMembers`, `hasAggressiveAntiSpamEnabled` parameters to `Chat`. +* Added `messageThreadId` parameter to `chatAction()`. +* Added `forumTopicEdited`, `generalForumTopicHidden`, `generalForumTopicUnhidden`, `writeAccessAllowed` to `Message`. +* Added topic management methods. + +#### Bot Internal Improvements + +* Deleted verbose `ReplyKeyboardMarkup` constructors. +* Created `replyKeyboardMarkup()` DSL for markup creation, similar to an inline keyboard version (see wiki for + examples). +* Introduced `TelegramUpdateHandler.caughtExceptions` for centralized error handling. +* Changed `invoice()` (`sendInvoice`) and `createInvoiceLink` (`createInvoiceLink`) parameters to lambda for + convenience. +* Changed `createNewStickerSet()` (`createNewStickerSet`) parameters to lambda. +* Improved entity definition in `EntitiesBuilder` by moving optional parameters to lambda. +* Added generics to `BotContext` (`chatData`, `userData`) interfaces. +* Deleted private `Update` extensions for handling and created `TelegramUpdateHandler.parseAndHandle`. +* Added update listener configuration variables to `TelegramBot.botConfiguration` - `updatesListener()`. +* Moved `BotContext` (`chatData`, `userData`) configuration to `TelegramBot.botConfiguration` - `context()`. +* Updated dependencies: * `Gradle`: `7.5.0` -> `7.6.0` * `Jackson`: `2.14.0` -> `2.14.1` * `Ktor`: `2.1.3` -> `2.2.1` @@ -520,47 +509,46 @@ ### 2.4.2 -* Fix bug when in the media request additional options violates the query itself. -* Refactor MediaGroup action, implement a separate processing mechanism from usual media actions that takes into account - the possibility of sending different types of attachments (string, bytearray, file). +* Fixed the media request bug where additional options violated the query. +* Refactored `MediaGroup` action, implementing separate processing for different attachment types (string, bytearray, + file). ### 2.4.1 -* Fix annotation limits not working +* Fixed annotation limits not working. ## 2.4.0 -* Added a new mechanism to limit requests from users, both general requests and specifically for commands/inputs in both - modes (annotations, manual). -* Long data types are replaced by shorter ones using aliases. -* Upgrade dependencies versions: +* Introduced a request limiting mechanism for both general and specific command/input requests in both modes ( + annotations, manual). +* Replaced long data types with shorter aliases. +* Updated dependencies: * `Logback`: `1.4.4` -> `1.4.5` * `Kotlin`: `1.7.20` -> `1.7.21` ### 2.3.2 -* Fix class initialization bug. +* Fixed class initialization bug. ### 2.3.1 -* Returned `inputListener` parameter to bot instance. -* Add `HttpLogLevel` proxy class for http logs managing. +* Restored `inputListener` parameter to bot instance. +* Added `HttpLogLevel` proxy class for HTTP log management. ## 2.3.0 -* Add `messageThreadId`,`isTopicMessage`, `forumTopicCreated`, `forumTopicClosed`, `forumTopicReopened` to `Message` -* Created new related types `ForumTopicCreated`, `ForumTopicClosed`, `ForumTopicReopened` -* Add `isForum`, `activeUsernames`, `emojiStatusCustomEmojiId` to `Chat` -* Add `canManageTopics` to `PromoteChatMemberOptions`, `ChatAdministratorRights`, `ChatMember`, `ChatPermissions` -* Add `messageThreadId` to `OptionsCommon` interface and all related options - - -* Fixed a bug throwing `IllegalArgumentException` caused by `ClassManagerImpl` -* Added saving instances to the `ClassManagerImpl`, to improve memory handling -* Made `ChatPermissions` mutable to fix some functions wrong logic. -* Added handling of commands containing at character, i.e., such as `/command@bot` -* Expanded and moved configuration of `TelegramBot` instance to more handy variant, see `BotConfiguration` in docs. -* Upgrade dependencies versions: +* Added `messageThreadId`, `isTopicMessage`, `forumTopicCreated`, `forumTopicClosed`, `forumTopicReopened` to `Message`. +* Created related types `ForumTopicCreated`, `ForumTopicClosed`, `ForumTopicReopened`. +* Added `isForum`, `activeUsernames`, `emojiStatusCustomEmojiId` to `Chat`. +* Added `canManageTopics` to `PromoteChatMemberOptions`, `ChatAdministratorRights`, `ChatMember`, `ChatPermissions`. +* Added `messageThreadId` to `OptionsCommon` interface and related options. + +* Fixed `IllegalArgumentException` in `ClassManagerImpl`. +* Improved memory handling by saving instances in `ClassManagerImpl`. +* Made `ChatPermissions` mutable to fix logic issues. +* Handled commands with `@` character, e.g., `/command@bot`. +* Expanded and moved `TelegramBot` instance configuration to `BotConfiguration` (see docs). +* Updated dependencies: * `Logback`: `1.4.0` -> `1.4.4` * `Jackson`: `2.13.4` -> `2.14.0` * `Ktor`: `2.1.0` -> `2.1.3` @@ -568,108 +556,106 @@ ### 2.2.2 -* Change ActionRecipientRef class to Recipient and add universal `from` method -* Fix `forwardMessage`, `copyMessage` methods, add required chatId parameters +* Changed `ActionRecipientRef` class to `Recipient` and added universal `from` method. +* Fixed `forwardMessage` and `copyMessage` methods; added required `chatId` parameters. ### 2.2.1 -* Process actions from callback requests in manual mode. -* Upgrade dependencies versions: +* Processed actions from callback requests in manual mode. +* Updated dependencies: * `Logback`: `1.2.11` -> `1.4.0` * `Jackson`: `2.13.3` -> `2.13.4` * `Ktor`: `2.0.3` -> `2.1.0` ## 2.2.0 -* Fixed error response additional parameter name and its parameters optionality bug. -* Move parameters from `Feature` interface to separate `ParametersBase` interface so as not to overload unnecessary - entities. -* Remove `isInline` parameter from `send` methods and moved it \ - to separate interface `InlineMode` to leave it only at the necessary - methods and not to overload the methods that do not have an inline mode. -* Make ManualHandlingBehaviour parameter lazy, is made to optimize cases where only annotation processing is used. -* Moved option saving mechanism from helper functions to mapper, for more consistency. -* Improved and optimized `MediaAction` mechanism, make it less verbose. -* Moved samples to separate repository. +* Fixed error response parameter name and optionality bug. +* Moved parameters from `Feature` interface to `ParametersBase` to avoid unnecessary entities. +* Removed `isInline` parameter from `send` methods; moved to `InlineMode` interface for necessary methods. +* Made `ManualHandlingBehaviour` parameter lazy for optimization when only annotation processing is used. +* Move an option saving mechanism to mapper for consistency. +* Optimized `MediaAction` mechanism for verbosity reduction. +* Moved samples to a separate repository. ## 2.1.0 -* Remove `containMasks` and add `stickerType` to `StickerSet`, `CreateNewStickerSet`. -* Add new `CustomEmoji` to `EntityType`. -* Add `customEmojiId` to `MessageEntity`. -* Add `hasRestrictedVoiceAndVideoMessages` to `Chat`. -* Add new api method `getCustomEmojiStickers`. -* Fixed bug in `InputMedia` with nonNullability of `thumb` and `parseMode` in `String` type. +* Removed `containMasks` and added `stickerType` to `StickerSet` and `CreateNewStickerSet`. +* Added `CustomEmoji` to `EntityType`. +* Added `customEmojiId` to `MessageEntity`. +* Added `hasRestrictedVoiceAndVideoMessages` to `Chat`. +* Added new API method `getCustomEmojiStickers`. +* Fixed `InputMedia` bug with non-nullability of `thumb` and `parseMode` in `String` type. ### 2.0.1 -* Upgrade `Kotlin`: `1.6.21` -> `1.7.10`. +* Updated `Kotlin`: `1.6.21` -> `1.7.10`. * `Dokka`: `1.6.21` -> `1.7.10`. -* Upgrade `kotlinx-coroutines-core`: `1.6.2` -> `1.6.4`. -* Changed in `ManualHandlingDsl` input context from just Update to `InputContext`. +* Updated `kotlinx-coroutines-core`: `1.6.2` -> `1.6.4`. +* Changed `ManualHandlingDsl` input context from `Update` to `InputContext`. # 2.0.0 -* Change annotations name from `TelegramCommand`, `TelegramInput`, `TelegramUnhandled`, `TelegramParameter` \ - to `CommandHandler`, `InputHandler`, `UnprocessedHandler`, `CallbackParam`. -* Change `bot.input` to `bot.inputListener`. -* Change `BotWaitingInput` to `BotInputListener`. -* Move serde logic from ktor setting to manual. -* Improved and reworked `ManualHandlingDsl`, added the ability to input chaining. -* The concept of contexts has been added to the manual processing. +* Renamed annotations: + * `TelegramCommand` to `CommandHandler` + * `TelegramInput` to `InputHandler` + * `TelegramUnhandled` to `UnprocessedHandler` + * `TelegramParameter` to `CallbackParam` +* Changed `bot.input` to `bot.inputListener`. +* Renamed `BotWaitingInput` to `BotInputListener`. +* Moved serde logic from Ktor setting to manual. +* Improved and reworked `ManualHandlingDsl` with input chaining. +* Introduced contexts to manual processing. ### 1.5.2 -* Returned single update parsing method. +* Restored single update parsing method. ### 1.5.1 -* Improved structure of `Response` type. -* Fixed `List<>` serialized error. +* Improved `Response` type structure. +* Fixed `List<>` serialization error. ## 1.5.0 -* Delete old deprecated methods. -* Added shortcuts to process updates `handleUpdates()`(for annotation handling) and `handleUpdates{}`(for manual - handling). \ - Before that, only a more verbose and detailed mechanism was available via `bot.update.setListener{}` & - `bot.update.handle`(which is still available for more detailed process control.). -* Now the action search path has become nullable to be able to use the bot only in manual mode. +* Deleted deprecated methods. +* Added shortcuts for processing updates: `handleUpdates()` (annotation handling) and `handleUpdates{}` (manual + handling). +* Made action search path nullable for manual-only bot usage. ### 1.4.2 -* Add `sender` to `ChatType`. -* Improved and optimized `MediaAction` mechanism. -* Add new `ImplicitFile` type so as not to create constructors with double input parameters. -* Fixed bug with sending optional parameters in media requests. +* Added `sender` to `ChatType`. +* Optimized `MediaAction` mechanism. +* Added `ImplicitFile` type to avoid double input parameter constructors. +* Fixed optional parameters sending bug in media requests. ### 1.4.1 -* Make coroutines dependency transitive. -* Fix parameter name in `VideoNoteOptions`. +* Made coroutines dependency transitive. +* Fixed parameter name in `VideoNoteOptions`. ## 1.4.0 -* Add new api method `createInvoiceLink`. -* Change name of interface `IOptionsCommon`, `IFileOption` to `OptionsCommon`, `FileOptions`. -* Change `fileSize` type from `Int` to `Long` due to api changes. -* Add `joinToSendMessages`, `joinByRequest` parameters to `Chat`. -* Add `premiumAnimation` parameter to `Sticker`. -* Add `isPremium`, `addedToAttachmentMenu` parameter to `User`. -* Add `secretToken` parameter to `SetWebhookOptions`. +* Added new API method `createInvoiceLink`. +* Renamed interfaces `IOptionsCommon` and `IFileOption` to `OptionsCommon` and `FileOptions`. +* Changed `fileSize` type from `Int` to `Long` due to API changes. +* Added `joinToSendMessages` and `joinByRequest` parameters to `Chat`. +* Added `premiumAnimation` parameter to `Sticker`. +* Added `isPremium` and `addedToAttachmentMenu` parameters to `User`. +* Added `secretToken` parameter to `SetWebhookOptions`. ### 1.3.6 -* Add update parsing method `parseUpdate` in `TelegramUpdateHandler`. -* Add async methods to `BotChatData`, `BotUserData`, `BotWaitingInput`. +* Added `parseUpdate` method in `TelegramUpdateHandler`. +* Added async methods to `BotChatData`, `BotUserData`, `BotWaitingInput`. ### 1.3.5 -* Fix bug with content-type when sending media request. +* Fixed media request content-type bug. ### 1.3.4 -* Fix `MediaAction` wrong recipient bug. +* Fixed `MediaAction` wrong recipient bug. ### 1.3.3 @@ -677,46 +663,45 @@ ### 1.3.2 -* Fix `captionEntities` ambiguity. +* Fixed `captionEntities` ambiguity. ### 1.3.1 -* Move package from `com.github.vendelieu` to `eu.vendeli` -* Change target repository from `jitpack` to `mavenCentral`. -* Add trace logging at some points -* Improve some documentation +* Moved package from `com.github.vendelieu` to `eu.vendeli`. +* Changed target repository from `jitpack` to `mavenCentral`. +* Added trace logging at some points. +* Improved documentation. ## 1.3.0 -* Added the ability to process requests manually with `ManualHandlingDsl`. -* Upgrade `Ktor`: `2.0.1` -> `2.0.2`. +* Added manual request processing with `ManualHandlingDsl`. +* Updated `Ktor`: `2.0.1` -> `2.0.2`. ## 1.2.2 -* Added functionality for adding a user-defined "magic" objects. -* Improved `SetMyCommands` method by adding a more convenient dsl to add commands with `BotCommandsBuilder`. -* To add an `MessageEntity` in `EntityInterface`, an additional method has also been added that works. - through `EntityBuilder`. -* Upgrade `reflections`: `0.9.12` -> `0.10.2`. +* Added functionality for user-defined "magic" objects. +* Improved `SetMyCommands` method with `BotCommandsBuilder` DSL. +* Added method for `MessageEntity` addition through `EntityBuilder`. +* Updated `reflections`: `0.9.12` -> `0.10.2`. ### 1.1.2 -* Fix serde process of sealed classes `BotCommandScope`, `ChatMember`, `InlineQueryResult`, `InputMedia`, `MenuButton` - , `PassportElementError`. +* Fixed serde process of sealed classes like `BotCommandScope`, `ChatMember`, `InlineQueryResult`, `InputMedia`, + `MenuButton`, `PassportElementError`. ### 1.1.1 -* Change commands/inputs search path declaring from `Package` to `String`. -* Optimize code, make some parts reusable. +* Changed commands/inputs search a path from `Package` to `String`. +* Optimized code and made reusable parts. ## 1.1.0 -* Make parameters value nullable. -* Change `bot.updateHandler` to `bot.update`, to avoid tautology when calling `bot.updateHandler.handleUpdate`, etc. -* Change `bot.inputHandler` to `bot.input` for same reason. +* Made parameters values nullable. +* Changed `bot.updateHandler` to `bot.update` to avoid tautology. +* Changed `bot.inputHandler` to `bot.input`. # 1.0.0 -* The initial public version. +* Initial public version. -Before that, the library was written for personal purposes and started with a couple of wrapper methods and as needed. \ No newline at end of file +Before this, the library was developed for personal use, starting with a few wrapper methods and expanding as needed. \ No newline at end of file diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000000..f108790160 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,10 @@ +# Adding new Update part + +1. Add new field to [Update](./telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/Update.kt) +2. Add new entry to [UpdateType](telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/UpdateType.kt) +3. Add new [ProcessedUpdate](telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ProcessedUpdate.kt) + subclass +4. Add new clause to [processUpdate()](telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ProcessUpdate.kt) +5. Add [TypeRef](ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/HelperUtils.kt) to ksp and + to [lambda builder](ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InvocationLambdaBuilder.kt) +6. Run helper ksp to add a new section for [FunctionalDSLUtils](telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/FunctionalDSLUtils.kt) \ No newline at end of file diff --git a/README.md b/README.md index e8c1500601..260f527270 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ build.gradle.kts example: ```gradle plugins { // ... - id("com.google.devtools.ksp") version "2.0.10-1.0.24" + id("com.google.devtools.ksp") version "2.0.20-1.0.25" id("eu.vendeli.telegram-bot") version "7.2.2" } ``` @@ -32,7 +32,7 @@ To set up the project without using the plugin, you need to add a dependency and ```gradle plugins { // ... - id("com.google.devtools.ksp") version "2.0.10-1.0.24" + id("com.google.devtools.ksp") version "2.0.20-1.0.24" } dependencies { diff --git a/build.gradle.kts b/build.gradle.kts index 04a0e98277..01526d7050 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,6 +13,10 @@ plugins { } tasks.create("prepareRelease") { + dependsOn("telegram-bot:clean") + dependsOn("telegram-bot:kspCommonMainKotlinMetadata") + dependsOn("telegram-bot:apiCheck") + dependsOn("telegram-bot:kdocUpdate") dependsOn("telegram-bot:formatKotlin") dependsOn("ktgram-gradle-plugin:formatKotlin") @@ -20,8 +24,4 @@ tasks.create("prepareRelease") { dependsOn("ksp:detekt") dependsOn("telegram-bot:detekt") - - dependsOn("telegram-bot:clean") - dependsOn("telegram-bot:kspCommonMainKotlinMetadata") - dependsOn("telegram-bot:apiCheck") } diff --git a/buildSrc/src/main/kotlin/ConfiguredKotlinExt.kt b/buildSrc/src/main/kotlin/ConfiguredKotlinExt.kt index 2f06b65811..75926effe8 100644 --- a/buildSrc/src/main/kotlin/ConfiguredKotlinExt.kt +++ b/buildSrc/src/main/kotlin/ConfiguredKotlinExt.kt @@ -1,26 +1,31 @@ - import org.gradle.api.Project +import org.gradle.kotlin.dsl.assign import org.gradle.kotlin.dsl.configure import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension private val jvmTargetVer = JvmTarget.JVM_17 +private fun KotlinMultiplatformExtension.configureJvm() { + jvm { + withJava() + compilations.all { + compileTaskProvider.configure { + compilerOptions { + jvmTarget.set(jvmTargetVer) + freeCompilerArgs = listOf("-Xjsr305=strict") + } + } + } + } + jvmToolchain(jvmTargetVer.target.toInt()) +} + fun Project.onlyJvmConfiguredKotlin(block: KotlinMultiplatformExtension.() -> Unit) { plugins.apply("kotlin-multiplatform") configure { - jvm { - withJava() - compilations.all { - compileTaskProvider.configure { - compilerOptions { - jvmTarget.set(jvmTargetVer) - } - } - } - } - jvmToolchain(jvmTargetVer.target.toInt()) + configureJvm() block() } } @@ -29,20 +34,10 @@ fun Project.configuredKotlin(block: KotlinMultiplatformExtension.() -> Unit) { plugins.apply("kotlin-multiplatform") configure { - jvm { - withJava() - compilations.all { - compileTaskProvider.configure { - compilerOptions { - jvmTarget.set(jvmTargetVer) - } - } - } - } + configureJvm() js { nodejs() } mingwX64() linuxX64() - jvmToolchain(jvmTargetVer.target.toInt()) block() } } diff --git a/buildSrc/src/main/resources/api.json b/buildSrc/src/main/resources/api.json index 96ebb87bb7..a31f5ffcb9 100644 --- a/buildSrc/src/main/resources/api.json +++ b/buildSrc/src/main/resources/api.json @@ -1,7 +1,7 @@ { - "version": "Bot API 7.9", - "release_date": "August 14, 2024", - "changelog": "https://core.telegram.org/bots/api#august-14-2024", + "version": "Bot API 7.10", + "release_date": "September 6, 2024", + "changelog": "https://core.telegram.org/bots/api#september-6-2024", "methods": { "getUpdates": { "name": "getUpdates", @@ -1601,7 +1601,7 @@ "Integer" ], "required": true, - "description": "The number of Telegram Stars that must be paid to buy access to the media" + "description": "The number of Telegram Stars that must be paid to buy access to the media; 1-2500" }, { "name": "media", @@ -1611,6 +1611,14 @@ "required": true, "description": "A JSON-serialized array describing the media to be sent; up to 10 items" }, + { + "name": "payload", + "types": [ + "String" + ], + "required": false, + "description": "Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes." + }, { "name": "caption", "types": [ @@ -5709,7 +5717,7 @@ "String" ], "required": true, - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes." + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes." }, { "name": "provider_token", @@ -5929,7 +5937,7 @@ "String" ], "required": true, - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes." + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes." }, { "name": "provider_token", @@ -6569,6 +6577,14 @@ "required": false, "description": "Optional. New incoming pre-checkout query. Contains full information about checkout" }, + { + "name": "purchased_paid_media", + "types": [ + "PaidMediaPurchased" + ], + "required": false, + "description": "Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat" + }, { "name": "poll", "types": [ @@ -10328,7 +10344,17 @@ "name": "GiveawayCreated", "href": "https://core.telegram.org/bots/api#giveawaycreated", "description": [ - "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information." + "This object represents a service message about the creation of a scheduled giveaway." + ], + "fields": [ + { + "name": "prize_star_count", + "types": [ + "Integer" + ], + "required": false, + "description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only" + } ] }, "Giveaway": { @@ -10394,13 +10420,21 @@ "required": false, "description": "Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways." }, + { + "name": "prize_star_count", + "types": [ + "Integer" + ], + "required": false, + "description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only" + }, { "name": "premium_subscription_month_count", "types": [ "Integer" ], "required": false, - "description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for" + "description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only" } ] }, @@ -10459,13 +10493,21 @@ "required": false, "description": "Optional. The number of other chats the user had to join in order to be eligible for the giveaway" }, + { + "name": "prize_star_count", + "types": [ + "Integer" + ], + "required": false, + "description": "Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only" + }, { "name": "premium_subscription_month_count", "types": [ "Integer" ], "required": false, - "description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for" + "description": "Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only" }, { "name": "unclaimed_prize_count", @@ -10531,6 +10573,14 @@ ], "required": false, "description": "Optional. Message with the giveaway that was completed, if it wasn't deleted" + }, + { + "name": "is_star_giveaway", + "types": [ + "Boolean" + ], + "required": false, + "description": "Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway." } ] }, @@ -11407,6 +11457,22 @@ ], "required": false, "description": "Optional. Number of pending join requests created using this link" + }, + { + "name": "subscription_period", + "types": [ + "Integer" + ], + "required": false, + "description": "Optional. The number of seconds the subscription will be active for before the next payment" + }, + { + "name": "subscription_price", + "types": [ + "Integer" + ], + "required": false, + "description": "Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link" } ] }, @@ -13145,7 +13211,7 @@ "name": "ChatBoostSourceGiveaway", "href": "https://core.telegram.org/bots/api#chatboostsourcegiveaway", "description": [ - "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription." + "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways." ], "fields": [ { @@ -13170,7 +13236,15 @@ "User" ], "required": false, - "description": "Optional. User that won the prize in the giveaway if any" + "description": "Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only" + }, + { + "name": "prize_star_count", + "types": [ + "Integer" + ], + "required": false, + "description": "Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only" }, { "name": "is_unclaimed", @@ -16705,7 +16779,7 @@ "String" ], "required": true, - "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes." + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes." }, { "name": "provider_token", @@ -17340,6 +17414,31 @@ } ] }, + "PaidMediaPurchased": { + "name": "PaidMediaPurchased", + "href": "https://core.telegram.org/bots/api#paidmediapurchased", + "description": [ + "This object contains information about a paid media purchase." + ], + "fields": [ + { + "name": "from", + "types": [ + "User" + ], + "required": true, + "description": "User who purchased the media" + }, + { + "name": "paid_media_payload", + "types": [ + "String" + ], + "required": true, + "description": "Bot-specified paid media payload" + } + ] + }, "RevenueWithdrawalState": { "name": "RevenueWithdrawalState", "href": "https://core.telegram.org/bots/api#revenuewithdrawalstate", @@ -17486,6 +17585,14 @@ ], "required": false, "description": "Optional. Information about the paid media bought by the user" + }, + { + "name": "paid_media_payload", + "types": [ + "String" + ], + "required": false, + "description": "Optional. Bot-specified paid media payload" } ], "subtype_of": [ diff --git a/buildSrc/src/main/resources/scrape.py b/buildSrc/src/main/resources/scrape.py index fc26638079..ef188d36be 100644 --- a/buildSrc/src/main/resources/scrape.py +++ b/buildSrc/src/main/resources/scrape.py @@ -1,4 +1,5 @@ import json +import os import re import string @@ -24,6 +25,10 @@ ['Message', 'Boolean'] # Edit returns either the new message, or an OK to confirm the edit. ] +# Construct the full path for the output file +def output_path(filename: str) -> str: + return os.path.join(os.path.dirname(os.path.abspath(__file__)), filename + ".json") + def retrieve_info(url: str) -> dict: r = requests.get(url) @@ -358,7 +363,7 @@ def main(): print("Failed to validate schema. View logs above for more information.") exit(1) - with open(f"{filename}.json", "w") as f: + with open(output_path(filename), "w") as f: json.dump(items, f, indent=2) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1b2d2f416d..6ce373420f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,13 +2,13 @@ ktor = "2.3.12" redis = "6.4.0.RELEASE" logging = "2.0.4" -logback = "1.5.7" +logback = "1.5.8" datetime = "0.6.0" -serialization = "1.7.1" -stately = "2.0.7" +serialization = "1.7.2" +stately = "2.1.0" -kotlin = "2.0.10" +kotlin = "2.0.20" coroutines = "1.8.1" dokka = "1.9.20" kotlinter = "4.4.1" @@ -20,14 +20,14 @@ mockk = "1.13.12" kover = "0.8.3" krypto = "4.0.10" sslcontext = "8.3.6" -spring = "3.3.2" +spring = "3.3.3" -ksp = "2.0.10-1.0.24" +ksp = "2.0.20-1.0.25" poet = "1.18.1" binvalid = "0.16.3" publisher = "0.29.0" -gradle-publish = "1.2.1" +gradle-publish = "1.2.2" env = "1.0.4" [libraries] diff --git a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiProcessor.kt b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiProcessor.kt index 400d62f0b0..ed70ec5012 100644 --- a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiProcessor.kt +++ b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiProcessor.kt @@ -10,14 +10,21 @@ import com.google.devtools.ksp.symbol.KSAnnotated import com.google.devtools.ksp.symbol.KSClassDeclaration import com.google.devtools.ksp.symbol.KSFunctionDeclaration import com.squareup.kotlinpoet.AnnotationSpec +import com.squareup.kotlinpoet.ClassName import com.squareup.kotlinpoet.FileSpec import com.squareup.kotlinpoet.FunSpec import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.LambdaTypeName import com.squareup.kotlinpoet.ParameterSpec +import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy +import com.squareup.kotlinpoet.UNIT import com.squareup.kotlinpoet.asTypeName import com.squareup.kotlinpoet.ksp.toTypeName import eu.vendeli.tgbot.TelegramBot import eu.vendeli.tgbot.annotations.internal.TgAPI +import eu.vendeli.tgbot.core.FunctionalHandlingDsl +import eu.vendeli.tgbot.types.internal.ActivityCtx +import eu.vendeli.tgbot.types.internal.UpdateType import eu.vendeli.tgbot.utils.fullName import kotlinx.serialization.json.Json import java.io.File @@ -26,7 +33,7 @@ class ApiProcessor( internal val logger: KSPLogger, options: Map, ) : SymbolProcessor { - private val apiDir = options["apiDir"]!! + private val tgBaseDir = options["tgBaseDir"]!! private val utilsDir = options["utilsDir"]!! private val apiFile = options["apiFile"]!! @@ -50,7 +57,7 @@ class ApiProcessor( fileSpec.build().writeTo(File(utilsDir)) resolver - .resolveSymbolsFromDir(apiDir.substringBefore("/types") + "/api") + .resolveSymbolsFromDir("$tgBaseDir/api") .filter { i -> i.annotations.firstOrNull { it.shortName.getShortName() == "TgAPI" } == null }.forEach { @@ -62,12 +69,14 @@ class ApiProcessor( @Suppress("UNCHECKED_CAST") val types = ( - resolver.resolveSymbolsFromDir(apiDir) { + resolver.resolveSymbolsFromDir("$tgBaseDir/types") { it is KSClassDeclaration && it.classKind != ClassKind.ENUM_CLASS } as List ).asSequence() validateTypes(types, apiJson) + addUpdateEvent2FDSL() + return emptyList() } @@ -98,4 +107,40 @@ class ApiProcessor( .build(), ) } + + private fun addUpdateEvent2FDSL() { + FileSpec + .builder("eu.vendeli.tgbot.utils", "FunctionalDSLUtils") + .apply { + val fdslType = FunctionalHandlingDsl::class.asTypeName() + val blockType = ActivityCtx::class.asTypeName() + addImport("eu.vendeli.tgbot.types.internal", "UpdateType") + addImport("eu.vendeli.tgbot.utils", "cast") + + UpdateType.entries.forEach { type -> + val funName = type.name + .lowercase() + .snakeToCamelCase() + .beginWithUpperCase() + .replace("EditMessage", "EditedMessage") + val pUpdateType = funName + "Update" + addImport("eu.vendeli.tgbot.types.internal", pUpdateType) + + val pUpdateTypeClass = ClassName("eu.vendeli.tgbot.types.internal", pUpdateType) + val activityCtxType = blockType.parameterizedBy(pUpdateTypeClass) + val blockTypeRef = LambdaTypeName.get(activityCtxType, returnType = UNIT).copy(suspending = true) + + addFunction( + FunSpec + .builder("on$funName") + .receiver(fdslType) + .addKdoc("Action that is performed on the presence of $funName in the Update.") + .addParameter(ParameterSpec.builder("block", blockTypeRef).build()) + .addCode("functionalActivities.onUpdateActivities[$type] = block.cast()") + .build(), + ) + } + }.build() + .writeTo(File(tgBaseDir.replace("eu/vendeli/tgbot", ""))) + } } diff --git a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiValidator.kt b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiValidator.kt index 206504d93f..4479c5cfb0 100644 --- a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiValidator.kt +++ b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/ApiValidator.kt @@ -16,6 +16,7 @@ import eu.vendeli.tgbot.interfaces.features.MarkupFeature import eu.vendeli.tgbot.utils.fullName import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.JsonPrimitive +import kotlinx.serialization.json.boolean import kotlinx.serialization.json.jsonArray import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive @@ -85,7 +86,9 @@ internal fun ApiProcessor.validateApi(classes: Sequence, api // find json info for method val method = allMethods[methodName] if (method == null) { - logger.exception(IllegalStateException("Api validation gone wrong, no data for method: $methodName")) + logger.invalid { + "Api validation gone wrong, no data for method: $methodName" + } return } method.jsonObject["returns"]!!.jsonArray.let { returns -> @@ -118,16 +121,24 @@ internal fun ApiProcessor.validateApi(classes: Sequence, api ) } - method.jsonObject["fields"]?.jsonArray?.forEach { + method.jsonObject["fields"]?.jsonArray?.forEach params@{ val origParameterName = it.jsonObject["name"]!! .jsonPrimitive.content val camelParamName = origParameterName.snakeToCamelCase() - if (camelParamName != "chatId" && camelParamName !in parameters) { + val targetParam = parameters[camelParamName] + val isRequired = it.jsonObject["required"]!!.jsonPrimitive.boolean + val apiRefLink = method.jsonObject["href"]!!.jsonPrimitive.content + + if (camelParamName != "chatId" && targetParam == null) { logger.warn( "Api parameter `$origParameterName`($camelParamName) " + - "is possibly not present in class $classFullname (method: `$methodName`)\n" + - method.jsonObject["href"]!!.jsonPrimitive.content, + "is probably not present in class $classFullname (method: `$methodName`)\n$apiRefLink", ) + return@params + } + + if (isRequired && targetParam?.isNullable == true) logger.invalid { + "Wrong nullability for `$camelParamName` in $classFullname\n$apiRefLink" } } if (!visitedMethods.add(methodName)) logger.warn("Duplicate processing of a method $methodName") diff --git a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/TypesValidator.kt b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/TypesValidator.kt index 4bf5d8406d..639558391a 100644 --- a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/TypesValidator.kt +++ b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/TypesValidator.kt @@ -2,7 +2,9 @@ package eu.vendeli.ksp import com.google.devtools.ksp.getDeclaredProperties import com.google.devtools.ksp.symbol.KSClassDeclaration +import com.google.devtools.ksp.symbol.KSType import kotlinx.serialization.json.JsonElement +import kotlinx.serialization.json.boolean import kotlinx.serialization.json.jsonArray import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive @@ -27,7 +29,7 @@ internal fun ApiProcessor.validateTypes(classes: Sequence, a sealedSubclasses.forEach sealedLoop@{ s -> val sealedName = s.simpleName.getShortName() val sealedFullName = s.qualifiedName!!.asString() - val sealedParams = s.getAllProperties().map { it.simpleName.asString() }.toSet() + val sealedParams = s.getAllProperties().associate { it.simpleName.asString() to it.type.resolve() } val apiName = s.annotations .firstOrNull { it.shortName.getShortName() == "Name" @@ -43,7 +45,7 @@ internal fun ApiProcessor.validateTypes(classes: Sequence, a } val classFullName = cls.qualifiedName!!.asString() - val classParams = cls.getDeclaredProperties().map { it.simpleName.asString() }.toSet() + val classParams = cls.getDeclaredProperties().associate { it.simpleName.asString() to it.type.resolve() } processClass(types, classParams, className, classFullName, visitedTypes) } @@ -53,7 +55,7 @@ internal fun ApiProcessor.validateTypes(classes: Sequence, a private fun ApiProcessor.processClass( types: Map, - params: Set, + params: Map, name: String, fullName: String, visitedTypesRef: MutableSet, @@ -69,12 +71,19 @@ private fun ApiProcessor.processClass( ?.jsonPrimitive ?.content ?.snakeToCamelCase() - if (paramName !in params) - logger.exception( - IllegalStateException( - "Parameter $paramName is not present in $fullName\n${typeInfo["href"]!!.jsonPrimitive.content}", - ), - ) + val isRequired = it.jsonObject["required"]!!.jsonPrimitive.boolean + val targetParam = params[paramName] + + if (targetParam == null) { + logger.invalid { + "Parameter $paramName is not present in $fullName\n${typeInfo["href"]!!.jsonPrimitive.content}" + } + return@forEach + } + + if (isRequired && targetParam.isMarkedNullable) logger.invalid { + "Wrong nullability for `$paramName` in $fullName\n${typeInfo["href"]!!.jsonPrimitive.content}" + } } visitedTypesRef.add(name) } diff --git a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/Utils.kt b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/Utils.kt index c191e962a0..6ab46125e1 100644 --- a/helper/src/jvmMain/kotlin/eu/vendeli/ksp/Utils.kt +++ b/helper/src/jvmMain/kotlin/eu/vendeli/ksp/Utils.kt @@ -1,6 +1,7 @@ package eu.vendeli.ksp import com.google.devtools.ksp.KspExperimental +import com.google.devtools.ksp.processing.KSPLogger import com.google.devtools.ksp.processing.Resolver import com.google.devtools.ksp.symbol.KSClassDeclaration import com.google.devtools.ksp.symbol.KSDeclaration @@ -15,6 +16,8 @@ import java.io.FileFilter internal val replyMarkupType = Keyboard::class.asTypeName() internal val entitiesType = LIST.parameterizedBy(MessageEntity::class.asTypeName()) +internal inline fun KSPLogger.invalid(message: () -> String) = exception(IllegalStateException(message())) + internal fun String.beginWithUpperCase(): String = when (this.length) { 0 -> "" 1 -> uppercase() diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 9c8b5c93bd..3b6646d8a7 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -2,257 +2,11 @@ # yarn lockfile v1 -"@colors/colors@1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" - integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== - -"@discoveryjs/json-ext@^0.5.0": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" - integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - -"@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/source-map@^0.3.3": - version "0.3.6" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" - integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - "@js-joda/core@3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-3.2.0.tgz#3e61e21b7b2b8a6be746df1335cf91d70db2a273" integrity sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg== -"@socket.io/component-emitter@~3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" - integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== - -"@types/cookie@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" - integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== - -"@types/cors@^2.8.12": - version "2.8.17" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b" - integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA== - dependencies: - "@types/node" "*" - -"@types/eslint-scope@^3.7.3": - version "3.7.7" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" - integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.56.10" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d" - integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== - -"@types/json-schema@*", "@types/json-schema@^7.0.8": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - -"@types/node@*", "@types/node@>=10.0.0": - version "20.12.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" - integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== - dependencies: - undici-types "~5.26.4" - -"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" - integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - -"@webassemblyjs/floating-point-hex-parser@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" - integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== - -"@webassemblyjs/helper-api-error@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" - integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== - -"@webassemblyjs/helper-buffer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" - integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== - -"@webassemblyjs/helper-numbers@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" - integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.6" - "@webassemblyjs/helper-api-error" "1.11.6" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" - integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== - -"@webassemblyjs/helper-wasm-section@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" - integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.12.1" - -"@webassemblyjs/ieee754@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" - integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" - integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" - integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== - -"@webassemblyjs/wasm-edit@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" - integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-opt" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - "@webassemblyjs/wast-printer" "1.12.1" - -"@webassemblyjs/wasm-gen@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" - integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wasm-opt@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" - integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - -"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" - integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-api-error" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wast-printer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" - integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@xtuc/long" "4.2.2" - -"@webpack-cli/configtest@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" - integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== - -"@webpack-cli/info@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" - integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== - -"@webpack-cli/serve@^2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" - integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - abort-controller@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -260,43 +14,10 @@ abort-controller@3.0.0: dependencies: event-target-shim "^5.0.0" -accepts@~1.3.4: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== - -acorn@^8.7.1, acorn@^8.8.2: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== - -ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-colors@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-regex@^5.0.1: version "5.0.1" @@ -328,42 +49,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64id@2.0.0, base64id@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" - integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -body-parser@^1.19.0: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - brace-expansion@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" @@ -371,13 +61,6 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -385,52 +68,21 @@ braces@~3.0.2: dependencies: fill-range "^7.0.1" -browser-stdout@1.3.1: +browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserslist@^4.21.10: - version "4.23.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" - integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== - dependencies: - caniuse-lite "^1.0.30001587" - electron-to-chromium "^1.4.668" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - set-function-length "^1.2.1" - camelcase@^6.0.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001587: - version "1.0.30001621" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz#4adcb443c8b9c8303e04498318f987616b8fea2e" - integrity sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA== - chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -439,22 +91,7 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chokidar@^3.5.1: +chokidar@^3.5.3: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -469,11 +106,6 @@ chokidar@^3.5.1: optionalDependencies: fsevents "~2.3.2" -chrome-trace-event@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" - integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== - cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -483,15 +115,6 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -504,84 +127,10 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^2.0.14: - version "2.0.20" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" - integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== - -commander@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" - integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -connect@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" - integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== - dependencies: - debug "2.6.9" - finalhandler "1.1.2" - parseurl "~1.3.3" - utils-merge "1.0.1" - -content-type@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - -cookie@~0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - -cors@~2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -custom-event@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" - integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== - -date-format@^4.0.14: - version "4.0.14" - resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" - integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@4.3.4, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@^4.3.5: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -590,196 +139,31 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -di@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" - integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -dom-serialize@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" - integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== - dependencies: - custom-event "~1.0.0" - ent "~2.2.0" - extend "^3.0.0" - void-elements "^2.0.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -electron-to-chromium@^1.4.668: - version "1.4.783" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.783.tgz#933887165b8b6025a81663d2d97cf4b85cde27b2" - integrity sha512-bT0jEz/Xz1fahQpbZ1D7LgmPYZ3iHVY39NcWWro1+hA2IvjiPeaXtfSqrQ+nXjApMvQRE2ASt1itSLRrebHMRQ== +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -engine.io-parser@~5.2.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.2.tgz#37b48e2d23116919a3453738c5720455e64e1c49" - integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== - -engine.io@~6.5.2: - version "6.5.4" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.4.tgz#6822debf324e781add2254e912f8568508850cdc" - integrity sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg== - dependencies: - "@types/cookie" "^0.4.1" - "@types/cors" "^2.8.12" - "@types/node" ">=10.0.0" - accepts "~1.3.4" - base64id "2.0.0" - cookie "~0.4.1" - cors "~2.8.5" - debug "~4.3.1" - engine.io-parser "~5.2.1" - ws "~8.11.0" - -enhanced-resolve@^5.16.0: - version "5.16.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" - integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -ent@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== - -envinfo@^7.7.3: - version "7.13.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" - integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== - -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" - -es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -es-module-lexer@^1.2.1: - version "1.5.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.3.tgz#25969419de9c0b1fbe54279789023e8a9a788412" - integrity sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg== - -escalade@^3.1.1, escalade@^3.1.2: +escalade@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@4.0.0: +escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -events@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -extend@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fastest-levenshtein@^1.0.12: - version "1.0.16" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" - integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -787,27 +171,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -find-up@5.0.0: +find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -815,43 +179,16 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@^3.2.7: - version "3.3.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - -follow-redirects@^1.0.0: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - format-util@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -862,27 +199,11 @@ fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" - glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -890,12 +211,7 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@8.1.0: +glob@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -906,106 +222,16 @@ glob@8.1.0: minimatch "^5.0.1" once "^1.3.0" -glob@^7.1.3, glob@^7.1.7: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - -has-proto@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -hasown@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -he@1.2.0: +he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1014,16 +240,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4: +inherits@2: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -interpret@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" - integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -1031,13 +252,6 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.13.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - dependencies: - hasown "^2.0.0" - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -1065,143 +279,18 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -isbinaryfile@^4.0.8: - version "4.0.10" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" - integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -js-yaml@4.1.0: +js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" -json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - optionalDependencies: - graceful-fs "^4.1.6" - -karma-chrome-launcher@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" - integrity sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q== - dependencies: - which "^1.2.1" - -karma-mocha@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-2.0.1.tgz#4b0254a18dfee71bdbe6188d9a6861bf86b0cd7d" - integrity sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ== - dependencies: - minimist "^1.2.3" - -karma-sourcemap-loader@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.4.0.tgz#b01d73f8f688f533bcc8f5d273d43458e13b5488" - integrity sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA== - dependencies: - graceful-fs "^4.2.10" - -karma-webpack@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-5.0.1.tgz#4eafd31bbe684a747a6e8f3e4ad373e53979ced4" - integrity sha512-oo38O+P3W2mSPCSUrQdySSPv1LvPpXP+f+bBimNomS5sW+1V4SuhCuW8TfJzV+rDv921w2fDSDw0xJbPe6U+kQ== - dependencies: - glob "^7.1.3" - minimatch "^9.0.3" - webpack-merge "^4.1.5" - -karma@6.4.3: - version "6.4.3" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.3.tgz#763e500f99597218bbb536de1a14acc4ceea7ce8" - integrity sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q== - dependencies: - "@colors/colors" "1.5.0" - body-parser "^1.19.0" - braces "^3.0.2" - chokidar "^3.5.1" - connect "^3.7.0" - di "^0.0.1" - dom-serialize "^2.2.1" - glob "^7.1.7" - graceful-fs "^4.2.6" - http-proxy "^1.18.1" - isbinaryfile "^4.0.8" - lodash "^4.17.21" - log4js "^6.4.1" - mime "^2.5.2" - minimatch "^3.0.4" - mkdirp "^0.5.5" - qjobs "^1.2.0" - range-parser "^1.2.1" - rimraf "^3.0.2" - socket.io "^4.7.2" - source-map "^0.6.1" - tmp "^0.2.1" - ua-parser-js "^0.7.30" - yargs "^16.1.1" - -kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -1209,12 +298,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash@^4.17.15, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@4.1.0: +log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -1222,135 +306,49 @@ log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -log4js@^6.4.1: - version "6.9.1" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" - integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== - dependencies: - date-format "^4.0.14" - debug "^4.3.4" - flatted "^3.2.7" - rfdc "^1.3.0" - streamroller "^3.1.5" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.27, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@^2.5.2: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" - integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== - -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.3: - version "9.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" - integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.3, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -mkdirp@^0.5.5: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mocha@10.3.0: - version "10.3.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.3.0.tgz#0e185c49e6dccf582035c05fa91084a4ff6e3fe9" - integrity sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "8.1.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== +mocha@10.7.0: + version "10.7.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a" + integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3: +ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -1358,40 +356,11 @@ node-fetch@2.6.7: dependencies: whatwg-url "^5.0.0" -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -object-assign@^4: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== - dependencies: - ee-first "1.1.1" - once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1399,13 +368,6 @@ once@^1.3.0: dependencies: wrappy "1" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -1413,13 +375,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -1427,70 +382,16 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== - picomatch@^2.0.4, picomatch@^2.2.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -punycode@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -qjobs@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" - integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -1498,21 +399,6 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -1520,178 +406,24 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -rechoir@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" - integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== - dependencies: - resolve "^1.20.0" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -rfdc@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" - integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - safe-buffer@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -schema-utils@^3.1.1, schema-utils@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" - integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serialize-javascript@^6.0.1: +serialize-javascript@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" -set-function-length@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" - integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -side-channel@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" - integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== - dependencies: - call-bind "^1.0.7" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - object-inspect "^1.13.1" - -socket.io-adapter@~2.5.2: - version "2.5.4" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz#4fdb1358667f6d68f25343353bd99bd11ee41006" - integrity sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg== - dependencies: - debug "~4.3.4" - ws "~8.11.0" - -socket.io-parser@~4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" - integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -socket.io@^4.7.2: - version "4.7.5" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" - integrity sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA== - dependencies: - accepts "~1.3.4" - base64id "~2.0.0" - cors "~2.8.5" - debug "~4.3.2" - engine.io "~6.5.2" - socket.io-adapter "~2.5.2" - socket.io-parser "~4.2.4" - -source-map-js@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" - integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== - -source-map-loader@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-5.0.0.tgz#f593a916e1cc54471cfc8851b905c8a845fc7e38" - integrity sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA== - dependencies: - iconv-lite "^0.6.3" - source-map-js "^1.0.2" - -source-map-support@0.5.21, source-map-support@~0.5.20: +source-map-support@0.5.21: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -1699,30 +431,11 @@ source-map-support@0.5.21, source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - -streamroller@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" - integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== - dependencies: - date-format "^4.0.14" - debug "^4.3.4" - fs-extra "^8.1.0" - string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -1739,18 +452,11 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-json-comments@3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@8.1.1, supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -1758,41 +464,12 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -terser-webpack-plugin@^5.3.10: - version "5.3.10" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" - integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== - dependencies: - "@jridgewell/trace-mapping" "^0.3.20" - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.26.0" - -terser@^5.26.0: - version "5.31.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.0.tgz#06eef86f17007dbad4593f11a574c7f5eb02c6a1" - integrity sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg== +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -tmp@^0.2.1: - version "0.2.3" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" - integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + has-flag "^4.0.0" to-regex-range@^5.0.1: version "5.0.1" @@ -1801,162 +478,21 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typescript@5.4.3: - version "5.4.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" - integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== - -ua-parser-js@^0.7.30: - version "0.7.37" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.37.tgz#e464e66dac2d33a7a1251d7d7a99d6157ec27832" - integrity sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA== - -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -update-browserslist-db@^1.0.13: - version "1.0.16" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== - dependencies: - escalade "^3.1.2" - picocolors "^1.0.1" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -vary@^1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -void-elements@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== - -watchpack@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff" - integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" +typescript@5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webpack-cli@5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" - integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== - dependencies: - "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^2.1.1" - "@webpack-cli/info" "^2.0.2" - "@webpack-cli/serve" "^2.0.5" - colorette "^2.0.14" - commander "^10.0.1" - cross-spawn "^7.0.3" - envinfo "^7.7.3" - fastest-levenshtein "^1.0.12" - import-local "^3.0.2" - interpret "^3.1.1" - rechoir "^0.8.0" - webpack-merge "^5.7.3" - -webpack-merge@^4.1.5: - version "4.2.2" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" - integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== - dependencies: - lodash "^4.17.15" - -webpack-merge@^5.7.3: - version "5.10.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" - integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== - dependencies: - clone-deep "^4.0.1" - flat "^5.0.2" - wildcard "^2.0.0" - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack@5.91.0: - version "5.91.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" - integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-assertions "^1.9.0" - browserslist "^4.21.10" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.16.0" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.2.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.10" - watchpack "^2.4.1" - webpack-sources "^3.2.3" - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -1965,29 +501,10 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@^1.2.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wildcard@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" - integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== - -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== wrap-ansi@^7.0.0: version "7.0.0" @@ -2008,27 +525,17 @@ ws@8.5.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== -ws@~8.11.0: - version "8.11.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" - integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: +yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-unparser@2.0.0: +yargs-unparser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== @@ -2038,7 +545,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0, yargs@^16.1.1: +yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityCollectors.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityCollectors.kt index 34c3b80e52..7aefed6ac8 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityCollectors.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityCollectors.kt @@ -14,6 +14,7 @@ import com.squareup.kotlinpoet.buildCodeBlock import eu.vendeli.ksp.dto.CollectorsContext import eu.vendeli.ksp.dto.CommonAnnotationData import eu.vendeli.ksp.utils.addMap +import eu.vendeli.ksp.utils.addVarStatement import eu.vendeli.ksp.utils.commonMatcherClass import eu.vendeli.ksp.utils.invocableType import eu.vendeli.ksp.utils.parseAsCommandHandler @@ -24,7 +25,10 @@ import eu.vendeli.tgbot.annotations.CommandHandler import eu.vendeli.tgbot.annotations.CommandHandler.CallbackQuery import eu.vendeli.tgbot.annotations.InputHandler import eu.vendeli.tgbot.annotations.UpdateHandler +import eu.vendeli.tgbot.implementations.DefaultArgParser +import eu.vendeli.tgbot.implementations.DefaultGuard import eu.vendeli.tgbot.types.internal.UpdateType +import eu.vendeli.tgbot.utils.fullName internal fun collectCommandActivities( symbols: Sequence, @@ -59,15 +63,24 @@ internal fun collectCommandActivities( annotationData.scope.forEach { updT -> logger.info("Command: $it UpdateType: ${updT.name} --> ${function.qualifiedName?.asString()}") - addStatement( - "(\"$it\" to %L) to (%L to InvocationMeta(\"%L\", \"%L\", %L, %L::class)),", - updT, - activitiesFile.buildInvocationLambdaCodeBlock(function, injectableTypes, pkg), - function.qualifiedName!!.getQualifier(), - function.simpleName.asString(), - annotationData.rateLimits.toRateLimits(), - annotationData.guardClass, - ) + addVarStatement(postFix = "\n)),") { + add("(\"$it\" to %L)" to updT) + add( + " to (%L to InvocationMeta(\n" to activitiesFile.buildInvocationLambdaCodeBlock( + function, + injectableTypes, + pkg, + ), + ) + add("qualifier = \"%L\"" to function.qualifiedName!!.getQualifier()) + add(",\n function = \"%L\"" to function.simpleName.asString()) + if (annotationData.rateLimits.first > 0 || annotationData.rateLimits.second > 0) + add(",\n rateLimits = %L" to annotationData.rateLimits.toRateLimits()) + if (annotationData.guardClass != DefaultGuard::class.fullName) + add(",\n guard = %L::class" to annotationData.guardClass) + if (annotationData.argParserClass != DefaultArgParser::class.fullName) + add(",\n argParser = %L::class" to annotationData.argParserClass) + } } } } @@ -94,14 +107,21 @@ internal fun collectInputActivities( .parseAsInputHandler() annotationData.first.forEach { logger.info("Input: $it --> ${function.qualifiedName?.asString()}") - addStatement( - "\"$it\" to (%L to InvocationMeta(\"%L\", \"%L\", %L, %L::class)),", - activitiesFile.buildInvocationLambdaCodeBlock(function, injectableTypes, pkg), - function.qualifiedName!!.getQualifier(), - function.simpleName.asString(), - annotationData.second.toRateLimits(), - annotationData.third, - ) + addVarStatement(postFix = "\n)),") { + add( + "\"$it\" to (%L to InvocationMeta(\n" to activitiesFile.buildInvocationLambdaCodeBlock( + function, + injectableTypes, + pkg, + ), + ) + add("qualifier = \"%L\"" to function.qualifiedName!!.getQualifier()) + add(",\n function = \"%L\"" to function.simpleName.asString()) + if (annotationData.second.first > 0 || annotationData.second.second > 0) + add(",\n rateLimits = %L" to annotationData.second.toRateLimits()) + if (annotationData.third != DefaultGuard::class.fullName) + add(",\n guard = %L::class" to annotationData.third) + } } } } @@ -151,22 +171,22 @@ internal fun collectCommonActivities( .apply { add("mapOf(\n") data.forEach { - addStatement( - "%L to (%L to InvocationMeta(\"%L\", \"%L\", %L)),", - it.value.toCommonMatcher(it.filter, it.scope), - activitiesFile.buildInvocationLambdaCodeBlock( - it.funDeclaration, - injectableTypes, - pkg, - ), - it.funQualifier, - it.funSimpleName, - it.rateLimits.let { l -> - if (l.rate == 0L && - l.period == 0L - ) "zeroRateLimits" else l - }, - ) + addVarStatement(postFix = "\n)),") { + add("%L to " to it.value.toCommonMatcher(it.filter, it.scope)) + add( + "(%L to InvocationMeta(\n" to activitiesFile.buildInvocationLambdaCodeBlock( + it.funDeclaration, + injectableTypes, + pkg, + ), + ) + add("qualifier = \"%L\"" to it.funQualifier) + add(",\n function = \"%L\"" to it.funSimpleName) + if (it.rateLimits.rate > 0 || it.rateLimits.period > 0) + add(",\n rateLimits = %L" to it.rateLimits) + if (it.argParser != DefaultArgParser::class.fullName) + add(",\n argParser = %L::class" to it.argParser) + } } add(")\n") }.build(), diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityProcessor.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityProcessor.kt index 6b44b1aae3..7d4e5d50c6 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityProcessor.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ActivityProcessor.kt @@ -24,7 +24,6 @@ import eu.vendeli.ksp.dto.CollectorsContext import eu.vendeli.ksp.utils.CommonAnnotationHandler import eu.vendeli.ksp.utils.FileBuilder import eu.vendeli.ksp.utils.activitiesType -import eu.vendeli.ksp.utils.addZeroLimitsProp import eu.vendeli.ksp.utils.autoWiringClassName import eu.vendeli.ksp.utils.getAnnotatedClassSymbols import eu.vendeli.ksp.utils.getAnnotatedFnSymbols @@ -54,7 +53,7 @@ class ActivityProcessor( addImport("eu.vendeli.tgbot.types.internal.configuration", "RateLimits") addSuspendCallFun() - addZeroLimitsProp() + addImport("eu.vendeli.tgbot.utils", "getInstance") } targetPackage?.forEachIndexed { idx, pkg -> diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ChainStateBindingsBuilder.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ChainStateBindingsBuilder.kt index a5d00f88dd..66d81ed604 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ChainStateBindingsBuilder.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/ChainStateBindingsBuilder.kt @@ -46,10 +46,15 @@ fun buildChainStateBindings( .toTypeName() .copy(true) - val stateKeyType = l.getAllProperties() + val stateKeyType = l + .getAllProperties() .first { it.simpleName.getShortName() == "state" - }.type.resolve().arguments.first().toTypeName() + }.type + .resolve() + .arguments + .first() + .toTypeName() keyClasses.add(stateKeyType) @@ -83,11 +88,11 @@ fun buildChainStateBindings( addFunction( FunSpec - .builder("getAllState").also { + .builder("getAllState") + .also { if (keyClass == idLongClass) it.receiver(idLongClass) else it.addParameter("key", keyClass) - } - .returns(ClassName(packageName, providerName)) + }.returns(ClassName(packageName, providerName)) .addParameter("chain", chainType) .addCode("return $providerName(${if (keyClass == idLongClass) "this" else "key"})") .build(), diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InputChainCollector.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InputChainCollector.kt index 9cf6baf201..480034d336 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InputChainCollector.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InputChainCollector.kt @@ -1,13 +1,17 @@ package eu.vendeli.ksp import com.google.devtools.ksp.getAllSuperTypes +import com.google.devtools.ksp.getDeclaredProperties import com.google.devtools.ksp.symbol.KSClassDeclaration import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.ParameterizedTypeName import com.squareup.kotlinpoet.buildCodeBlock +import com.squareup.kotlinpoet.ksp.toTypeName import eu.vendeli.ksp.dto.CollectorsContext +import eu.vendeli.ksp.utils.ChainingStrategyDefault import eu.vendeli.ksp.utils.cast import eu.vendeli.ksp.utils.linkQName -import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.annotations.InputChain import eu.vendeli.tgbot.types.internal.chain.StatefulLink internal fun collectInputChains( @@ -20,6 +24,14 @@ internal fun collectInputChains( return null } symbols.forEach { chain -> + val isAutoCleanChain = chain.annotations + .first { + it.shortName.asString() == InputChain::class.simpleName + }.arguments + .firstOrNull() + ?.value + ?.cast() ?: false + val links = chain.declarations .filter { i -> i is KSClassDeclaration && @@ -29,14 +41,12 @@ internal fun collectInputChains( }.toList() .cast>() - val statefulLinks = chain.declarations - .filter { d -> - d is KSClassDeclaration && - d - .getAllSuperTypes() - .find { it.declaration.simpleName.asString() == StatefulLink::class.simpleName } != null - }.cast>() - .toHashSet() + val statefulLinks = links + .filter { l -> + l + .getAllSuperTypes() + .find { it.declaration.simpleName.asString() == StatefulLink::class.simpleName } != null + }.toHashSet() if (statefulLinks.isNotEmpty()) buildChainStateBindings(ctx.botCtxFile, chain, statefulLinks, logger) @@ -46,21 +56,34 @@ internal fun collectInputChains( val name = link.simpleName.asString() val reference = "$qualifier.$name" - val nextLink = if (idx < links.lastIndex) { - links.getOrNull(idx + 1) - } else { - null - }?.qualifiedName?.asString() - val isStatefulLink = statefulLinks.contains(link) + val chainingStrategy = link + .getDeclaredProperties() + .find { + it.simpleName.asString() == "chainingStrategy" + }?.type + ?.resolve() + ?.toTypeName() ?: ChainingStrategyDefault + + val nextLink = when { + chainingStrategy == ChainingStrategyDefault && idx < links.lastIndex -> { + links.getOrNull(idx + 1)?.qualifiedName?.asString() + } + chainingStrategy is ParameterizedTypeName -> { // linkTo + chainingStrategy.typeArguments.firstOrNull()?.toString() + } + else -> null // DoNothing | lastChain + } + + val isStatefulLink = link in statefulLinks val block = buildCodeBlock { indent() beginControlFlow("suspendCall { classManager, update, user, bot, parameters ->") .apply { add("if(user == null) return@suspendCall Unit\n") - add("val inst = classManager.getInstance($reference::class) as $reference\n") + add("val inst = classManager.getInstance<$reference>()!!\n") add("inst.beforeAction?.invoke(user, update, bot)\n") - add("val nextLink: String? = %P\n", nextLink) + add("val breakPoint = inst.breakCondition?.invoke(user, update, bot) ?: false\n") add( "if (breakPoint && inst.retryAfterBreak){\nbot.inputListener[user] = \"%L\"\n}\n", @@ -79,18 +102,30 @@ internal fun collectInputChains( } else { add("inst.action(user, update, bot)\n") } - add("if (nextLink != null) bot.inputListener[user] = nextLink\n") + if (nextLink != null) add("bot.inputListener[user] = %P\n", nextLink) + + if (idx == links.lastIndex && isAutoCleanChain) { + add("\n// clearing state\n") + statefulLinks.forEachIndexed { stateIdx, statefulLink -> + val keyParam = "stateKey$stateIdx" + add( + "val inst$stateIdx = classManager.getInstance<${statefulLink.qualifiedName!!.asString()}>()!!\n", + ) + add("val $keyParam = inst$stateIdx.state.stateKey.select(update)\n") + add("if($keyParam != null)\n") + add("inst$stateIdx.state.del($keyParam)\n\n") + } + } add("inst.afterAction?.invoke(user, update, bot)\n") }.endControlFlow() } add( - "\"$curLinkId\" to (%L to InvocationMeta(\"%L\", \"%L\", %L, %L::class)),\n", + "\"$curLinkId\" to (%L to InvocationMeta(\"%L\", \"%L\", %L)),\n", block, qualifier, name, "zeroRateLimits", - DefaultGuard::class.qualifiedName, ) } } diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InvocationLambdaBuilder.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InvocationLambdaBuilder.kt index 7fa79d4573..04d4bae4bd 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InvocationLambdaBuilder.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/InvocationLambdaBuilder.kt @@ -40,6 +40,7 @@ import eu.vendeli.ksp.utils.myChatMemberUpdateClass import eu.vendeli.ksp.utils.pollAnswerUpdateClass import eu.vendeli.ksp.utils.pollUpdateClass import eu.vendeli.ksp.utils.preCheckoutQueryUpdateClass +import eu.vendeli.ksp.utils.purchasedPaidMediaUpdateClass import eu.vendeli.ksp.utils.removedChatBoostUpdateClass import eu.vendeli.ksp.utils.shippingQueryUpdateClass import eu.vendeli.ksp.utils.shortPrimitiveType @@ -66,6 +67,7 @@ import eu.vendeli.tgbot.types.internal.PollAnswerUpdate import eu.vendeli.tgbot.types.internal.PollUpdate import eu.vendeli.tgbot.types.internal.PreCheckoutQueryUpdate import eu.vendeli.tgbot.types.internal.ProcessedUpdate +import eu.vendeli.tgbot.types.internal.PurchasedPaidMediaUpdate import eu.vendeli.tgbot.types.internal.RemovedChatBoostUpdate import eu.vendeli.tgbot.types.internal.ShippingQueryUpdate import kotlin.reflect.KClass @@ -150,11 +152,11 @@ internal fun FileBuilder.buildInvocationLambdaCodeBlock( businessMessageUpdateClass -> addUpdate(BusinessMessageUpdate::class, nullabilityMark) editedBusinessMessageClass -> addUpdate(EditedBusinessMessageUpdate::class, nullabilityMark) deletedBusinessMessagesClass -> addUpdate(DeletedBusinessMessagesUpdate::class, nullabilityMark) + purchasedPaidMediaUpdateClass -> addUpdate(PurchasedPaidMediaUpdate::class, nullabilityMark) in injectableTypes.keys -> { val type = injectableTypes[typeName]!! - addImport(type.packageName, type.simpleName) - "(classManager.getInstance(${type.simpleName}::class) as ${type.simpleName}).get(update, bot)" + "classManager.getInstance<${type.canonicalName}>()!!.get(update, bot)" } else -> "null" @@ -165,13 +167,13 @@ internal fun FileBuilder.buildInvocationLambdaCodeBlock( } if (pkg != null) add( - "if (\n\t" + + "\nif (\n\t" + (if (isUserNullable) "user != null\n && " else "") + "bot.update.userClassSteps[user.id] != %S\n) %L.____clearClassData(user.id)\n", funQualifier, pkg, ) - add("%L.invoke(\n\t%L\n)\n", funName, parametersEnumeration) + add("\n%L.invoke(\n\t%L\n)\n", funName, parametersEnumeration) }.endControlFlow() .build() } diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/AnnotationData.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/AnnotationData.kt index e5eb6e9569..4f0f22a1e1 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/AnnotationData.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/AnnotationData.kt @@ -7,4 +7,5 @@ internal data class AnnotationData( val rateLimits: Pair, val scope: List, val guardClass: String, + val argParserClass: String, ) diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/CommonAnnotationData.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/CommonAnnotationData.kt index abba532997..6ce7caddf5 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/CommonAnnotationData.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/dto/CommonAnnotationData.kt @@ -28,6 +28,7 @@ data class CommonAnnotationData( val funSimpleName: String, val value: CommonAnnotationValue, val filter: String, + val argParser: String, val priority: Int, val rateLimits: RateLimits, val scope: List, diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/HelperUtils.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/HelperUtils.kt index c5a0b4c0f7..f7803270a2 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/HelperUtils.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/HelperUtils.kt @@ -13,6 +13,7 @@ import com.squareup.kotlinpoet.ParameterizedTypeName import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy import com.squareup.kotlinpoet.PropertySpec import com.squareup.kotlinpoet.STRING +import com.squareup.kotlinpoet.TypeName import com.squareup.kotlinpoet.TypeVariableName import com.squareup.kotlinpoet.asClassName import com.squareup.kotlinpoet.asTypeName @@ -46,9 +47,11 @@ import eu.vendeli.tgbot.types.internal.PollAnswerUpdate import eu.vendeli.tgbot.types.internal.PollUpdate import eu.vendeli.tgbot.types.internal.PreCheckoutQueryUpdate import eu.vendeli.tgbot.types.internal.ProcessedUpdate +import eu.vendeli.tgbot.types.internal.PurchasedPaidMediaUpdate import eu.vendeli.tgbot.types.internal.RemovedChatBoostUpdate import eu.vendeli.tgbot.types.internal.ShippingQueryUpdate import eu.vendeli.tgbot.types.internal.UpdateType +import eu.vendeli.tgbot.types.internal.chain.ChainingStrategy import eu.vendeli.tgbot.types.internal.chain.Link import eu.vendeli.tgbot.types.internal.configuration.RateLimits import eu.vendeli.tgbot.utils.fullName @@ -63,7 +66,6 @@ internal val activitiesType = Map::class.asTypeName().parameterizedBy( internal val invocableType = TypeVariableName("Invocable") internal val linkQName = Link::class.fullName internal val autoWiringClassName = Autowiring::class.asClassName() -internal val rateLimitsClass = RateLimits::class.asTypeName() internal val intPrimitiveType = TypeVariableName("int") internal val longPrimitiveType = TypeVariableName("long") @@ -99,6 +101,7 @@ internal val businessConnectionUpdateClass = BusinessConnectionUpdate::class.asT internal val businessMessageUpdateClass = BusinessMessageUpdate::class.asTypeName() internal val editedBusinessMessageClass = EditedBusinessMessageUpdate::class.asTypeName() internal val deletedBusinessMessagesClass = DeletedBusinessMessagesUpdate::class.asTypeName() +internal val purchasedPaidMediaUpdateClass = PurchasedPaidMediaUpdate::class.asTypeName() internal val commonMatcherClass = CommonMatcher::class.asTypeName() internal val userDataCtx = UserData::class.asTypeName() @@ -110,18 +113,7 @@ internal val callbackQueryList = listOf(UpdateType.CALLBACK_QUERY) internal val messageList = listOf(UpdateType.MESSAGE) internal val notLimitedRateLimits = 0L to 0L -internal fun FileBuilder.addZeroLimitsProp() { - addProperty( - PropertySpec - .builder( - "zeroRateLimits", - rateLimitsClass, - KModifier.PRIVATE, - ).apply { - initializer("RateLimits(0, 0)") - }.build(), - ) -} +internal val ChainingStrategyDefault: TypeName = ChainingStrategy.Default::class.asTypeName() @Suppress("UNCHECKED_CAST", "NOTHING_TO_INLINE") internal inline fun Any?.cast(): R = this as R @@ -129,8 +121,7 @@ internal inline fun Any?.cast(): R = this as R @Suppress("UNCHECKED_CAST", "NOTHING_TO_INLINE") internal inline fun Any?.safeCast(): R? = this as? R -internal fun Pair.toRateLimits(): Any = - if (first == 0L && second == 0L) "zeroRateLimits" else RateLimits(first, second) +internal fun Pair.toRateLimits(): RateLimits = RateLimits(first, second) internal fun Resolver.getAnnotatedFnSymbols( targetPackage: String? = null, @@ -151,6 +142,23 @@ internal fun Resolver.getAnnotatedFnSymbols( } } +internal fun CodeBlock.Builder.addVarStatement( + prefix: String? = null, + postFix: String? = null, + builder: MutableList>.() -> Unit, +) { + val pairList = buildList(builder) + + val format = buildString { + prefix?.also(::append) + pairList.forEach { + append(it.first) + } + postFix?.also(::append) + } + addStatement(format, *pairList.map { it.second }.toTypedArray()) +} + internal fun Resolver.getAnnotatedClassSymbols(clazz: KClass, targetPackage: String? = null) = if (targetPackage == null) getSymbolsWithAnnotation(clazz.qualifiedName!!).filterIsInstance() else getSymbolsWithAnnotation(clazz.qualifiedName!!) diff --git a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/ParseUtils.kt b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/ParseUtils.kt index ef1bd15d9b..6ca285e781 100644 --- a/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/ParseUtils.kt +++ b/ksp/src/jvmMain/kotlin/eu/vendeli/ksp/utils/ParseUtils.kt @@ -8,16 +8,18 @@ import com.google.devtools.ksp.symbol.KSValueArgument import eu.vendeli.ksp.dto.AnnotationData import eu.vendeli.ksp.dto.CommonAnnotationData import eu.vendeli.ksp.dto.CommonAnnotationValue +import eu.vendeli.tgbot.implementations.DefaultArgParser import eu.vendeli.tgbot.implementations.DefaultFilter +import eu.vendeli.tgbot.implementations.DefaultGuard import eu.vendeli.tgbot.types.internal.UpdateType import eu.vendeli.tgbot.types.internal.configuration.RateLimits -import eu.vendeli.tgbot.implementations.DefaultGuard internal fun List.parseAsCommandHandler(isCallbackQ: Boolean) = AnnotationData( value = parseValueList(), rateLimits = parseRateLimits(), scope = parseScopes() ?: if (isCallbackQ) callbackQueryList else messageList, guardClass = parseGuard(), + argParserClass = parseArgParser(), ) internal fun List.parseAsInputHandler() = Triple( @@ -26,12 +28,6 @@ internal fun List.parseAsInputHandler() = Triple( parseGuard(), ) -internal fun List.parseAsRegexHandler() = Triple( - first { it.name?.asString() == "value" }.value.cast(), - parseRateLimits(), - parseRegexOptions(), -) - object CommonAnnotationHandler { private var commonAnnotations = mutableListOf() @@ -46,6 +42,7 @@ object CommonAnnotationHandler { val priority = arguments.firstOrNull { it.name?.asString() == "priority" }?.value?.safeCast() ?: 0 val rateLimits = arguments.parseRateLimits() val scope = arguments.parseScopes() ?: messageList + val argParser = arguments.parseArgParser() if (value is List<*>) { value.forEach { @@ -55,6 +52,7 @@ object CommonAnnotationHandler { funSimpleName = simpleName, value = CommonAnnotationValue.String(it.cast()), filter = filter, + argParser = argParser, priority = priority, rateLimits = RateLimits(rateLimits.first, rateLimits.second), scope = scope, @@ -72,6 +70,7 @@ object CommonAnnotationHandler { funSimpleName = simpleName, value = CommonAnnotationValue.Regex(value.toRegex(regexOptions.toSet())), filter = filter, + argParser = argParser, priority = priority, rateLimits = RateLimits(rateLimits.first, rateLimits.second), scope = scope, @@ -119,6 +118,11 @@ internal fun List.parseGuard(): String = it.declaration.qualifiedName!!.asString() } ?: DefaultGuard::class.qualifiedName!! +internal fun List.parseArgParser(): String = + firstOrNull { it.name?.asString() == "argParser" }?.value?.safeCast()?.let { + it.declaration.qualifiedName!!.asString() + } ?: DefaultArgParser::class.qualifiedName!! + internal fun List.parseAsUpdateHandler() = first().value.cast>().map { i -> when (i) { is KSType -> i.declaration.toString() diff --git a/spring-ktgram-starter/src/jvmMain/kotlin/eu/vendeli/spring/starter/SpringClassManager.kt b/spring-ktgram-starter/src/jvmMain/kotlin/eu/vendeli/spring/starter/SpringClassManager.kt index 2839a942a6..80ab4b09f7 100644 --- a/spring-ktgram-starter/src/jvmMain/kotlin/eu/vendeli/spring/starter/SpringClassManager.kt +++ b/spring-ktgram-starter/src/jvmMain/kotlin/eu/vendeli/spring/starter/SpringClassManager.kt @@ -10,5 +10,5 @@ open class SpringClassManager( private val applicationContext: ApplicationContext ) : ClassManager { override fun getInstance(kClass: KClass<*>, vararg initParams: Any?): Any = - applicationContext.getBean(kClass.java) + applicationContext.getBean(kClass.java, *initParams) } diff --git a/telegram-bot/api/telegram-bot.api b/telegram-bot/api/telegram-bot.api index 9b4423c24f..b4f6ceb785 100644 --- a/telegram-bot/api/telegram-bot.api +++ b/telegram-bot/api/telegram-bot.api @@ -20,6 +20,7 @@ public final class eu/vendeli/tgbot/TelegramBot$Companion { } public abstract interface annotation class eu/vendeli/tgbot/annotations/CommandHandler : java/lang/annotation/Annotation { + public abstract fun argParser ()Ljava/lang/Class; public abstract fun guard ()Ljava/lang/Class; public abstract fun rateLimits ()Leu/vendeli/tgbot/annotations/RateLimits; public abstract fun scope ()[Leu/vendeli/tgbot/types/internal/UpdateType; @@ -27,6 +28,7 @@ public abstract interface annotation class eu/vendeli/tgbot/annotations/CommandH } public abstract interface annotation class eu/vendeli/tgbot/annotations/CommandHandler$CallbackQuery : java/lang/annotation/Annotation { + public abstract fun argParser ()Ljava/lang/Class; public abstract fun guard ()Ljava/lang/Class; public abstract fun rateLimits ()Leu/vendeli/tgbot/annotations/RateLimits; public abstract fun value ()[Ljava/lang/String; @@ -36,6 +38,7 @@ public abstract interface annotation class eu/vendeli/tgbot/annotations/CommonHa } public abstract interface annotation class eu/vendeli/tgbot/annotations/CommonHandler$Regex : java/lang/annotation/Annotation { + public abstract fun argParser ()Ljava/lang/Class; public abstract fun filter ()Ljava/lang/Class; public abstract fun options ()[Lkotlin/text/RegexOption; public abstract fun priority ()I @@ -45,6 +48,7 @@ public abstract interface annotation class eu/vendeli/tgbot/annotations/CommonHa } public abstract interface annotation class eu/vendeli/tgbot/annotations/CommonHandler$Text : java/lang/annotation/Annotation { + public abstract fun argParser ()Ljava/lang/Class; public abstract fun filter ()Ljava/lang/Class; public abstract fun priority ()I public abstract fun rateLimits ()Leu/vendeli/tgbot/annotations/RateLimits; @@ -59,6 +63,7 @@ public abstract interface annotation class eu/vendeli/tgbot/annotations/Injectab } public abstract interface annotation class eu/vendeli/tgbot/annotations/InputChain : java/lang/annotation/Annotation { + public abstract fun autoClean ()Z } public abstract interface annotation class eu/vendeli/tgbot/annotations/InputHandler : java/lang/annotation/Annotation { @@ -2208,40 +2213,18 @@ public final class eu/vendeli/tgbot/core/FunctionalHandlingDsl { public static synthetic fun andThen$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Leu/vendeli/tgbot/types/internal/SingleInputChain;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/SingleInputChain; public final fun breakIf (Leu/vendeli/tgbot/types/internal/SingleInputChain;Lkotlin/jvm/functions/Function1;ZLkotlin/jvm/functions/Function2;)Leu/vendeli/tgbot/types/internal/SingleInputChain; public static synthetic fun breakIf$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Leu/vendeli/tgbot/types/internal/SingleInputChain;Lkotlin/jvm/functions/Function1;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/SingleInputChain; - public final fun common (Ljava/lang/String;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/jvm/functions/Function2;)V - public final fun common (Lkotlin/text/Regex;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/jvm/functions/Function2;)V - public static synthetic fun common$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Ljava/lang/String;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V - public static synthetic fun common$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/text/Regex;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V + public final fun common (Ljava/lang/String;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)V + public final fun common (Lkotlin/text/Regex;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)V + public static synthetic fun common$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Ljava/lang/String;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V + public static synthetic fun common$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/text/Regex;Lkotlin/reflect/KClass;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V public final fun inputChain (Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)Leu/vendeli/tgbot/types/internal/SingleInputChain; public static synthetic fun inputChain$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/SingleInputChain; - public final fun onBusinessConnection (Lkotlin/jvm/functions/Function2;)V - public final fun onBusinessMessage (Lkotlin/jvm/functions/Function2;)V - public final fun onCallbackQuery (Lkotlin/jvm/functions/Function2;)V - public final fun onChannelPost (Lkotlin/jvm/functions/Function2;)V - public final fun onChatBoost (Lkotlin/jvm/functions/Function2;)V - public final fun onChatJoinRequest (Lkotlin/jvm/functions/Function2;)V - public final fun onChatMember (Lkotlin/jvm/functions/Function2;)V - public final fun onChosenInlineResult (Lkotlin/jvm/functions/Function2;)V - public final fun onCommand (Ljava/lang/String;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)V - public final fun onCommand (Lkotlin/text/Regex;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)V - public static synthetic fun onCommand$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Ljava/lang/String;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V - public static synthetic fun onCommand$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/text/Regex;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V - public final fun onDeletedBusinessMessages (Lkotlin/jvm/functions/Function2;)V - public final fun onEditedBusinessMessage (Lkotlin/jvm/functions/Function2;)V - public final fun onEditedChannelPost (Lkotlin/jvm/functions/Function2;)V - public final fun onEditedMessage (Lkotlin/jvm/functions/Function2;)V - public final fun onInlineQuery (Lkotlin/jvm/functions/Function2;)V + public final fun onCommand (Ljava/lang/String;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)V + public final fun onCommand (Lkotlin/text/Regex;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)V + public static synthetic fun onCommand$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Ljava/lang/String;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V + public static synthetic fun onCommand$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/text/Regex;Ljava/util/Set;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V public final fun onInput (Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;)V public static synthetic fun onInput$default (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V - public final fun onMessage (Lkotlin/jvm/functions/Function2;)V - public final fun onMessageReaction (Lkotlin/jvm/functions/Function2;)V - public final fun onMessageReactionCount (Lkotlin/jvm/functions/Function2;)V - public final fun onMyChatMember (Lkotlin/jvm/functions/Function2;)V - public final fun onPoll (Lkotlin/jvm/functions/Function2;)V - public final fun onPollAnswer (Lkotlin/jvm/functions/Function2;)V - public final fun onPreCheckoutQuery (Lkotlin/jvm/functions/Function2;)V - public final fun onRemovedChatBoost (Lkotlin/jvm/functions/Function2;)V - public final fun onShippingQuery (Lkotlin/jvm/functions/Function2;)V public final fun whenNotHandled (Lkotlin/jvm/functions/Function2;)V } @@ -2285,6 +2268,12 @@ public final class eu/vendeli/tgbot/implementations/ClassManagerImpl : eu/vendel public fun getInstance (Lkotlin/reflect/KClass;[Ljava/lang/Object;)Ljava/lang/Object; } +public final class eu/vendeli/tgbot/implementations/DefaultArgParser : eu/vendeli/tgbot/interfaces/helper/ArgumentParser { + public static final field INSTANCE Leu/vendeli/tgbot/implementations/DefaultArgParser; + public fun parse (Ljava/lang/String;)Ljava/lang/Void; + public synthetic fun parse (Ljava/lang/String;)Ljava/util/Map; +} + public final class eu/vendeli/tgbot/implementations/DefaultFilter : eu/vendeli/tgbot/interfaces/helper/Filter { public static final field INSTANCE Leu/vendeli/tgbot/implementations/DefaultFilter; public fun match (Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/types/internal/ProcessedUpdate;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -2320,18 +2309,18 @@ public final class eu/vendeli/tgbot/implementations/UserDataMapImpl : eu/vendeli public abstract class eu/vendeli/tgbot/interfaces/action/Action : eu/vendeli/tgbot/interfaces/action/TgAction { public fun ()V - public fun send (JLeu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun send (Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun send (Leu/vendeli/tgbot/types/chat/Chat;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun send (Ljava/lang/String;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendAsync (JLeu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendAsync (Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendAsync (Leu/vendeli/tgbot/types/chat/Chat;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendAsync (Ljava/lang/String;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendReturning (JLeu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendReturning (Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendReturning (Leu/vendeli/tgbot/types/chat/Chat;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun sendReturning (Ljava/lang/String;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun send (JLeu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun send (Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun send (Leu/vendeli/tgbot/types/chat/Chat;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun send (Ljava/lang/String;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendAsync (JLeu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendAsync (Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendAsync (Leu/vendeli/tgbot/types/chat/Chat;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendAsync (Ljava/lang/String;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendReturning (JLeu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendReturning (Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendReturning (Leu/vendeli/tgbot/types/chat/Chat;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendReturning (Ljava/lang/String;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; } public abstract interface class eu/vendeli/tgbot/interfaces/action/BusinessActionExt : eu/vendeli/tgbot/interfaces/action/Request { @@ -2515,6 +2504,10 @@ public final class eu/vendeli/tgbot/interfaces/features/OptionsFeature$DefaultIm public static fun options (Leu/vendeli/tgbot/interfaces/features/OptionsFeature;Lkotlin/jvm/functions/Function1;)Leu/vendeli/tgbot/interfaces/action/TgAction; } +public abstract interface class eu/vendeli/tgbot/interfaces/helper/ArgumentParser { + public abstract fun parse (Ljava/lang/String;)Ljava/util/Map; +} + public abstract interface class eu/vendeli/tgbot/interfaces/helper/ConfigLoader { public abstract fun getCommandsPackage ()Ljava/lang/String; public abstract fun getToken ()Ljava/lang/String; @@ -2616,16 +2609,15 @@ public final class eu/vendeli/tgbot/types/BackgroundFill$FreeformGradient$Compan public final class eu/vendeli/tgbot/types/BackgroundFill$Gradient : eu/vendeli/tgbot/types/BackgroundFill { public static final field Companion Leu/vendeli/tgbot/types/BackgroundFill$Gradient$Companion; - public fun (IILjava/lang/Integer;)V - public synthetic fun (IILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (III)V public final fun component1 ()I public final fun component2 ()I - public final fun component3 ()Ljava/lang/Integer; - public final fun copy (IILjava/lang/Integer;)Leu/vendeli/tgbot/types/BackgroundFill$Gradient; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundFill$Gradient;IILjava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundFill$Gradient; + public final fun component3 ()I + public final fun copy (III)Leu/vendeli/tgbot/types/BackgroundFill$Gradient; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundFill$Gradient;IIIILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundFill$Gradient; public fun equals (Ljava/lang/Object;)Z public final fun getBottomColor ()I - public final fun getRotationAngle ()Ljava/lang/Integer; + public final fun getRotationAngle ()I public final fun getTopColor ()I public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -2714,14 +2706,13 @@ public final class eu/vendeli/tgbot/types/BackgroundType$Companion { public final class eu/vendeli/tgbot/types/BackgroundType$Fill : eu/vendeli/tgbot/types/BackgroundType { public static final field Companion Leu/vendeli/tgbot/types/BackgroundType$Fill$Companion; - public fun (Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;)V - public synthetic fun (Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Leu/vendeli/tgbot/types/BackgroundFill;I)V public final fun component1 ()Leu/vendeli/tgbot/types/BackgroundFill; - public final fun component2 ()Ljava/lang/Integer; - public final fun copy (Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;)Leu/vendeli/tgbot/types/BackgroundType$Fill; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundType$Fill;Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundType$Fill; + public final fun component2 ()I + public final fun copy (Leu/vendeli/tgbot/types/BackgroundFill;I)Leu/vendeli/tgbot/types/BackgroundType$Fill; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundType$Fill;Leu/vendeli/tgbot/types/BackgroundFill;IILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundType$Fill; public fun equals (Ljava/lang/Object;)Z - public final fun getDarkThemeDimming ()Ljava/lang/Integer; + public final fun getDarkThemeDimming ()I public final fun getFill ()Leu/vendeli/tgbot/types/BackgroundFill; public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -2744,19 +2735,19 @@ public final class eu/vendeli/tgbot/types/BackgroundType$Fill$Companion { public final class eu/vendeli/tgbot/types/BackgroundType$Pattern : eu/vendeli/tgbot/types/BackgroundType { public static final field Companion Leu/vendeli/tgbot/types/BackgroundType$Pattern$Companion; - public fun (Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V - public synthetic fun (Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;ILjava/lang/Boolean;Ljava/lang/Boolean;)V + public synthetic fun (Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;ILjava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Leu/vendeli/tgbot/types/media/Document; public final fun component2 ()Leu/vendeli/tgbot/types/BackgroundFill; - public final fun component3 ()Ljava/lang/Integer; + public final fun component3 ()I public final fun component4 ()Ljava/lang/Boolean; public final fun component5 ()Ljava/lang/Boolean; - public final fun copy (Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/BackgroundType$Pattern; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundType$Pattern;Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundType$Pattern; + public final fun copy (Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;ILjava/lang/Boolean;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/BackgroundType$Pattern; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundType$Pattern;Leu/vendeli/tgbot/types/media/Document;Leu/vendeli/tgbot/types/BackgroundFill;ILjava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundType$Pattern; public fun equals (Ljava/lang/Object;)Z public final fun getDocument ()Leu/vendeli/tgbot/types/media/Document; public final fun getFill ()Leu/vendeli/tgbot/types/BackgroundFill; - public final fun getIntensity ()Ljava/lang/Integer; + public final fun getIntensity ()I public fun hashCode ()I public final fun isInverted ()Ljava/lang/Boolean; public final fun isMoving ()Ljava/lang/Boolean; @@ -2780,16 +2771,16 @@ public final class eu/vendeli/tgbot/types/BackgroundType$Pattern$Companion { public final class eu/vendeli/tgbot/types/BackgroundType$Wallpaper : eu/vendeli/tgbot/types/BackgroundType { public static final field Companion Leu/vendeli/tgbot/types/BackgroundType$Wallpaper$Companion; - public fun (Leu/vendeli/tgbot/types/media/Document;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V - public synthetic fun (Leu/vendeli/tgbot/types/media/Document;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Leu/vendeli/tgbot/types/media/Document;ILjava/lang/Boolean;Ljava/lang/Boolean;)V + public synthetic fun (Leu/vendeli/tgbot/types/media/Document;ILjava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Leu/vendeli/tgbot/types/media/Document; - public final fun component2 ()Ljava/lang/Integer; + public final fun component2 ()I public final fun component3 ()Ljava/lang/Boolean; public final fun component4 ()Ljava/lang/Boolean; - public final fun copy (Leu/vendeli/tgbot/types/media/Document;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/BackgroundType$Wallpaper; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundType$Wallpaper;Leu/vendeli/tgbot/types/media/Document;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundType$Wallpaper; + public final fun copy (Leu/vendeli/tgbot/types/media/Document;ILjava/lang/Boolean;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/BackgroundType$Wallpaper; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/BackgroundType$Wallpaper;Leu/vendeli/tgbot/types/media/Document;ILjava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/BackgroundType$Wallpaper; public fun equals (Ljava/lang/Object;)Z - public final fun getDarkThemeDimming ()Ljava/lang/Integer; + public final fun getDarkThemeDimming ()I public final fun getDocument ()Leu/vendeli/tgbot/types/media/Document; public fun hashCode ()I public final fun isBlurred ()Ljava/lang/Boolean; @@ -3759,8 +3750,8 @@ public final class eu/vendeli/tgbot/types/TextQuote$Companion { public final class eu/vendeli/tgbot/types/Update : eu/vendeli/tgbot/interfaces/marker/MultipleResponse { public static final field Companion Leu/vendeli/tgbot/types/Update$Companion; - public fun (ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;)V - public synthetic fun (ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;)V + public synthetic fun (ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()I public final fun component10 ()Leu/vendeli/tgbot/types/msg/MessageReactionUpdated; public final fun component11 ()Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated; @@ -3769,14 +3760,15 @@ public final class eu/vendeli/tgbot/types/Update : eu/vendeli/tgbot/interfaces/m public final fun component14 ()Leu/vendeli/tgbot/types/CallbackQuery; public final fun component15 ()Leu/vendeli/tgbot/types/payment/ShippingQuery; public final fun component16 ()Leu/vendeli/tgbot/types/payment/PreCheckoutQuery; - public final fun component17 ()Leu/vendeli/tgbot/types/poll/Poll; - public final fun component18 ()Leu/vendeli/tgbot/types/PollAnswer; - public final fun component19 ()Leu/vendeli/tgbot/types/chat/ChatMemberUpdated; + public final fun component17 ()Leu/vendeli/tgbot/types/media/PaidMediaPurchased; + public final fun component18 ()Leu/vendeli/tgbot/types/poll/Poll; + public final fun component19 ()Leu/vendeli/tgbot/types/PollAnswer; public final fun component2 ()Leu/vendeli/tgbot/types/msg/Message; public final fun component20 ()Leu/vendeli/tgbot/types/chat/ChatMemberUpdated; - public final fun component21 ()Leu/vendeli/tgbot/types/chat/ChatJoinRequest; - public final fun component22 ()Leu/vendeli/tgbot/types/boost/ChatBoostUpdated; - public final fun component23 ()Leu/vendeli/tgbot/types/boost/ChatBoostRemoved; + public final fun component21 ()Leu/vendeli/tgbot/types/chat/ChatMemberUpdated; + public final fun component22 ()Leu/vendeli/tgbot/types/chat/ChatJoinRequest; + public final fun component23 ()Leu/vendeli/tgbot/types/boost/ChatBoostUpdated; + public final fun component24 ()Leu/vendeli/tgbot/types/boost/ChatBoostRemoved; public final fun component3 ()Leu/vendeli/tgbot/types/msg/Message; public final fun component4 ()Leu/vendeli/tgbot/types/msg/Message; public final fun component5 ()Leu/vendeli/tgbot/types/msg/Message; @@ -3784,8 +3776,8 @@ public final class eu/vendeli/tgbot/types/Update : eu/vendeli/tgbot/interfaces/m public final fun component7 ()Leu/vendeli/tgbot/types/msg/Message; public final fun component8 ()Leu/vendeli/tgbot/types/msg/Message; public final fun component9 ()Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted; - public final fun copy (ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;)Leu/vendeli/tgbot/types/Update; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/Update;ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;ILjava/lang/Object;)Leu/vendeli/tgbot/types/Update; + public final fun copy (ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;)Leu/vendeli/tgbot/types/Update; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/Update;ILeu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessConnection;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/business/BusinessMessagesDeleted;Leu/vendeli/tgbot/types/msg/MessageReactionUpdated;Leu/vendeli/tgbot/types/msg/MessageReactionCountUpdated;Leu/vendeli/tgbot/types/inline/InlineQuery;Leu/vendeli/tgbot/types/inline/ChosenInlineResult;Leu/vendeli/tgbot/types/CallbackQuery;Leu/vendeli/tgbot/types/payment/ShippingQuery;Leu/vendeli/tgbot/types/payment/PreCheckoutQuery;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;Leu/vendeli/tgbot/types/poll/Poll;Leu/vendeli/tgbot/types/PollAnswer;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatMemberUpdated;Leu/vendeli/tgbot/types/chat/ChatJoinRequest;Leu/vendeli/tgbot/types/boost/ChatBoostUpdated;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;ILjava/lang/Object;)Leu/vendeli/tgbot/types/Update; public fun equals (Ljava/lang/Object;)Z public final fun getBusinessConnection ()Leu/vendeli/tgbot/types/business/BusinessConnection; public final fun getBusinessMessage ()Leu/vendeli/tgbot/types/msg/Message; @@ -3807,6 +3799,7 @@ public final class eu/vendeli/tgbot/types/Update : eu/vendeli/tgbot/interfaces/m public final fun getPoll ()Leu/vendeli/tgbot/types/poll/Poll; public final fun getPollAnswer ()Leu/vendeli/tgbot/types/PollAnswer; public final fun getPreCheckoutQuery ()Leu/vendeli/tgbot/types/payment/PreCheckoutQuery; + public final fun getPurchasedPaidMedia ()Leu/vendeli/tgbot/types/media/PaidMediaPurchased; public final fun getRemovedChatBoost ()Leu/vendeli/tgbot/types/boost/ChatBoostRemoved; public final fun getShippingQuery ()Leu/vendeli/tgbot/types/payment/ShippingQuery; public final fun getUpdateId ()I @@ -4191,15 +4184,17 @@ public final class eu/vendeli/tgbot/types/boost/ChatBoostSource$GiftCode$Compani public final class eu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway : eu/vendeli/tgbot/types/boost/ChatBoostSource { public static final field Companion Leu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway$Companion; - public fun (JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;)V - public synthetic fun (JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;Ljava/lang/Integer;)V + public synthetic fun (JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()J public final fun component2 ()Leu/vendeli/tgbot/types/User; public final fun component3 ()Ljava/lang/Boolean; - public final fun copy (JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway;JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway; + public final fun component4 ()Ljava/lang/Integer; + public final fun copy (JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;Ljava/lang/Integer;)Leu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway;JLeu/vendeli/tgbot/types/User;Ljava/lang/Boolean;Ljava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/boost/ChatBoostSource$Giveaway; public fun equals (Ljava/lang/Object;)Z public final fun getGiveawayMessageId ()J + public final fun getPrizeStarCount ()Ljava/lang/Integer; public fun getUser ()Leu/vendeli/tgbot/types/User; public fun hashCode ()I public final fun isUnclaimed ()Ljava/lang/Boolean; @@ -4843,15 +4838,15 @@ public final class eu/vendeli/tgbot/types/chat/ChatAction$Companion { public final class eu/vendeli/tgbot/types/chat/ChatAdministratorRights { public static final field Companion Leu/vendeli/tgbot/types/chat/ChatAdministratorRights$Companion; - public fun (ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V - public synthetic fun (ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZ)V + public synthetic fun (ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Z public final fun component10 ()Ljava/lang/Boolean; - public final fun component11 ()Ljava/lang/Boolean; + public final fun component11 ()Z public final fun component12 ()Ljava/lang/Boolean; - public final fun component13 ()Ljava/lang/Boolean; - public final fun component14 ()Ljava/lang/Boolean; - public final fun component15 ()Ljava/lang/Boolean; + public final fun component13 ()Z + public final fun component14 ()Z + public final fun component15 ()Z public final fun component2 ()Z public final fun component3 ()Z public final fun component4 ()Z @@ -4860,21 +4855,21 @@ public final class eu/vendeli/tgbot/types/chat/ChatAdministratorRights { public final fun component7 ()Z public final fun component8 ()Ljava/lang/Boolean; public final fun component9 ()Ljava/lang/Boolean; - public final fun copy (ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/chat/ChatAdministratorRights; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatAdministratorRights;ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatAdministratorRights; + public final fun copy (ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZ)Leu/vendeli/tgbot/types/chat/ChatAdministratorRights; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatAdministratorRights;ZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatAdministratorRights; public fun equals (Ljava/lang/Object;)Z public final fun getCanChangeInfo ()Z public final fun getCanDeleteMessages ()Z - public final fun getCanDeleteStories ()Ljava/lang/Boolean; + public final fun getCanDeleteStories ()Z public final fun getCanEditMessages ()Ljava/lang/Boolean; - public final fun getCanEditStories ()Ljava/lang/Boolean; + public final fun getCanEditStories ()Z public final fun getCanInviteUsers ()Z public final fun getCanManageChat ()Z public final fun getCanManageTopics ()Ljava/lang/Boolean; - public final fun getCanManageVideoChats ()Ljava/lang/Boolean; + public final fun getCanManageVideoChats ()Z public final fun getCanPinMessages ()Ljava/lang/Boolean; public final fun getCanPostMessages ()Ljava/lang/Boolean; - public final fun getCanPostStories ()Ljava/lang/Boolean; + public final fun getCanPostStories ()Z public final fun getCanPromoteMembers ()Z public final fun getCanRestrictMembers ()Z public fun hashCode ()I @@ -4926,8 +4921,8 @@ public final class eu/vendeli/tgbot/types/chat/ChatBackground$Companion { public final class eu/vendeli/tgbot/types/chat/ChatFullInfo { public static final field Companion Leu/vendeli/tgbot/types/chat/ChatFullInfo$Companion; - public fun (JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Leu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;)V - public synthetic fun (JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Leu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;IILeu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;)V + public synthetic fun (JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;IILeu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;IILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()J public final fun component10 ()Leu/vendeli/tgbot/types/chat/ChatPhoto; public final fun component11 ()Ljava/util/List; @@ -4970,12 +4965,12 @@ public final class eu/vendeli/tgbot/types/chat/ChatFullInfo { public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/Boolean; - public final fun component8 ()Ljava/lang/Integer; - public final fun component9 ()Ljava/lang/Integer; - public final fun copy (JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Leu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;)Leu/vendeli/tgbot/types/chat/ChatFullInfo; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatFullInfo;JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Leu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;IILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatFullInfo; + public final fun component8 ()I + public final fun component9 ()I + public final fun copy (JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;IILeu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;)Leu/vendeli/tgbot/types/chat/ChatFullInfo; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatFullInfo;JLeu/vendeli/tgbot/types/chat/ChatType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;IILeu/vendeli/tgbot/types/chat/ChatPhoto;Ljava/util/List;Leu/vendeli/tgbot/types/Birthdate;Leu/vendeli/tgbot/types/business/BusinessIntro;Leu/vendeli/tgbot/types/business/BusinessLocation;Leu/vendeli/tgbot/types/business/BusinessOpeningHours;Leu/vendeli/tgbot/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/msg/Message;Leu/vendeli/tgbot/types/chat/ChatPermissions;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Long;Leu/vendeli/tgbot/types/chat/ChatLocation;IILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatFullInfo; public fun equals (Ljava/lang/Object;)Z - public final fun getAccentColorId ()Ljava/lang/Integer; + public final fun getAccentColorId ()I public final fun getActiveUsernames ()Ljava/util/List; public final fun getAvailableReactions ()Ljava/util/List; public final fun getBackgroundCustomEmojiId ()Ljava/lang/String; @@ -5004,7 +4999,7 @@ public final class eu/vendeli/tgbot/types/chat/ChatFullInfo { public final fun getLastName ()Ljava/lang/String; public final fun getLinkedChatId ()Ljava/lang/Long; public final fun getLocation ()Leu/vendeli/tgbot/types/chat/ChatLocation; - public final fun getMaxReactionCount ()Ljava/lang/Integer; + public final fun getMaxReactionCount ()I public final fun getMessageAutoDeleteTime ()Ljava/lang/Integer; public final fun getPermissions ()Leu/vendeli/tgbot/types/chat/ChatPermissions; public final fun getPersonalChat ()Leu/vendeli/tgbot/types/chat/Chat; @@ -5040,9 +5035,11 @@ public final class eu/vendeli/tgbot/types/chat/ChatFullInfo$Companion { public final class eu/vendeli/tgbot/types/chat/ChatInviteLink { public static final field Companion Leu/vendeli/tgbot/types/chat/ChatInviteLink$Companion; - public fun (Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;)V - public synthetic fun (Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlin/time/Duration;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlin/time/Duration;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; + public final fun component10-FghU774 ()Lkotlin/time/Duration; + public final fun component11 ()Ljava/lang/Integer; public final fun component2 ()Leu/vendeli/tgbot/types/User; public final fun component3 ()Z public final fun component4 ()Z @@ -5051,8 +5048,8 @@ public final class eu/vendeli/tgbot/types/chat/ChatInviteLink { public final fun component7 ()Lkotlinx/datetime/Instant; public final fun component8 ()Ljava/lang/Integer; public final fun component9 ()Ljava/lang/Integer; - public final fun copy (Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;)Leu/vendeli/tgbot/types/chat/ChatInviteLink; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatInviteLink;Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatInviteLink; + public final fun copy-qXX5FS0 (Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlin/time/Duration;Ljava/lang/Integer;)Leu/vendeli/tgbot/types/chat/ChatInviteLink; + public static synthetic fun copy-qXX5FS0$default (Leu/vendeli/tgbot/types/chat/ChatInviteLink;Ljava/lang/String;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/String;Lkotlinx/datetime/Instant;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlin/time/Duration;Ljava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatInviteLink; public fun equals (Ljava/lang/Object;)Z public final fun getCreatesJoinRequest ()Z public final fun getCreator ()Leu/vendeli/tgbot/types/User; @@ -5061,6 +5058,8 @@ public final class eu/vendeli/tgbot/types/chat/ChatInviteLink { public final fun getMemberLimit ()Ljava/lang/Integer; public final fun getName ()Ljava/lang/String; public final fun getPendingJoinRequestCount ()Ljava/lang/Integer; + public final fun getSubscriptionPeriod-FghU774 ()Lkotlin/time/Duration; + public final fun getSubscriptionPrice ()Ljava/lang/Integer; public fun hashCode ()I public final fun isPrimary ()Z public final fun isRevoked ()Z @@ -5160,17 +5159,17 @@ public abstract class eu/vendeli/tgbot/types/chat/ChatMember : eu/vendeli/tgbot/ public final class eu/vendeli/tgbot/types/chat/ChatMember$Administrator : eu/vendeli/tgbot/types/chat/ChatMember { public static final field Companion Leu/vendeli/tgbot/types/chat/ChatMember$Administrator$Companion; - public fun (Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)V - public synthetic fun (Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZLjava/lang/String;)V + public synthetic fun (Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Leu/vendeli/tgbot/types/User; public final fun component10 ()Ljava/lang/Boolean; public final fun component11 ()Ljava/lang/Boolean; public final fun component12 ()Ljava/lang/Boolean; - public final fun component13 ()Ljava/lang/Boolean; + public final fun component13 ()Z public final fun component14 ()Ljava/lang/Boolean; - public final fun component15 ()Ljava/lang/Boolean; - public final fun component16 ()Ljava/lang/Boolean; - public final fun component17 ()Ljava/lang/Boolean; + public final fun component15 ()Z + public final fun component16 ()Z + public final fun component17 ()Z public final fun component18 ()Ljava/lang/String; public final fun component2 ()Z public final fun component3 ()Z @@ -5180,22 +5179,22 @@ public final class eu/vendeli/tgbot/types/chat/ChatMember$Administrator : eu/ven public final fun component7 ()Z public final fun component8 ()Z public final fun component9 ()Z - public final fun copy (Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)Leu/vendeli/tgbot/types/chat/ChatMember$Administrator; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatMember$Administrator;Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatMember$Administrator; + public final fun copy (Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZLjava/lang/String;)Leu/vendeli/tgbot/types/chat/ChatMember$Administrator; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatMember$Administrator;Leu/vendeli/tgbot/types/User;ZZZZZZZZLjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ZLjava/lang/Boolean;ZZZLjava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatMember$Administrator; public fun equals (Ljava/lang/Object;)Z public final fun getCanBeEdited ()Z public final fun getCanChangeInfo ()Z public final fun getCanDeleteMessages ()Z - public final fun getCanDeleteStories ()Ljava/lang/Boolean; + public final fun getCanDeleteStories ()Z public final fun getCanEditMessages ()Ljava/lang/Boolean; - public final fun getCanEditStories ()Ljava/lang/Boolean; + public final fun getCanEditStories ()Z public final fun getCanInviteUsers ()Z public final fun getCanManageChat ()Z public final fun getCanManageTopics ()Ljava/lang/Boolean; - public final fun getCanManageVideoChats ()Ljava/lang/Boolean; + public final fun getCanManageVideoChats ()Z public final fun getCanPinMessages ()Ljava/lang/Boolean; public final fun getCanPostMessages ()Ljava/lang/Boolean; - public final fun getCanPostStories ()Ljava/lang/Boolean; + public final fun getCanPostStories ()Z public final fun getCanPromoteMembers ()Z public final fun getCanRestrictMembers ()Z public final fun getCustomTitle ()Ljava/lang/String; @@ -5344,8 +5343,7 @@ public final class eu/vendeli/tgbot/types/chat/ChatMember$Owner$Companion { public final class eu/vendeli/tgbot/types/chat/ChatMember$Restricted : eu/vendeli/tgbot/types/chat/ChatMember { public static final field Companion Leu/vendeli/tgbot/types/chat/ChatMember$Restricted$Companion; - public fun (Leu/vendeli/tgbot/types/User;ZZZLjava/lang/Boolean;ZZZZZZZZZZLjava/lang/Boolean;Lkotlinx/datetime/Instant;)V - public synthetic fun (Leu/vendeli/tgbot/types/User;ZZZLjava/lang/Boolean;ZZZZZZZZZZLjava/lang/Boolean;Lkotlinx/datetime/Instant;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Leu/vendeli/tgbot/types/User;ZZZZZZZZZZZZZZZLkotlinx/datetime/Instant;)V public final fun component1 ()Leu/vendeli/tgbot/types/User; public final fun component10 ()Z public final fun component11 ()Z @@ -5353,24 +5351,24 @@ public final class eu/vendeli/tgbot/types/chat/ChatMember$Restricted : eu/vendel public final fun component13 ()Z public final fun component14 ()Z public final fun component15 ()Z - public final fun component16 ()Ljava/lang/Boolean; + public final fun component16 ()Z public final fun component17 ()Lkotlinx/datetime/Instant; public final fun component2 ()Z public final fun component3 ()Z public final fun component4 ()Z - public final fun component5 ()Ljava/lang/Boolean; + public final fun component5 ()Z public final fun component6 ()Z public final fun component7 ()Z public final fun component8 ()Z public final fun component9 ()Z - public final fun copy (Leu/vendeli/tgbot/types/User;ZZZLjava/lang/Boolean;ZZZZZZZZZZLjava/lang/Boolean;Lkotlinx/datetime/Instant;)Leu/vendeli/tgbot/types/chat/ChatMember$Restricted; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatMember$Restricted;Leu/vendeli/tgbot/types/User;ZZZLjava/lang/Boolean;ZZZZZZZZZZLjava/lang/Boolean;Lkotlinx/datetime/Instant;ILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatMember$Restricted; + public final fun copy (Leu/vendeli/tgbot/types/User;ZZZZZZZZZZZZZZZLkotlinx/datetime/Instant;)Leu/vendeli/tgbot/types/chat/ChatMember$Restricted; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/chat/ChatMember$Restricted;Leu/vendeli/tgbot/types/User;ZZZZZZZZZZZZZZZLkotlinx/datetime/Instant;ILjava/lang/Object;)Leu/vendeli/tgbot/types/chat/ChatMember$Restricted; public fun equals (Ljava/lang/Object;)Z public final fun getCanAddWebPagePreviews ()Z public final fun getCanChangeInfo ()Z public final fun getCanInviteUsers ()Z - public final fun getCanManageTopics ()Ljava/lang/Boolean; - public final fun getCanPinMessages ()Ljava/lang/Boolean; + public final fun getCanManageTopics ()Z + public final fun getCanPinMessages ()Z public final fun getCanSendAudios ()Z public final fun getCanSendDocuments ()Z public final fun getCanSendMessages ()Z @@ -5852,8 +5850,8 @@ public final class eu/vendeli/tgbot/types/game/GameHighScore$Companion { public final class eu/vendeli/tgbot/types/giveaway/Giveaway { public static final field Companion Leu/vendeli/tgbot/types/giveaway/Giveaway$Companion; - public fun (Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;)V - public synthetic fun (Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;)V + public synthetic fun (Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/util/List; public final fun component2 ()Lkotlinx/datetime/Instant; public final fun component3 ()I @@ -5862,8 +5860,9 @@ public final class eu/vendeli/tgbot/types/giveaway/Giveaway { public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/util/List; public final fun component8 ()Ljava/lang/Integer; - public final fun copy (Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;)Leu/vendeli/tgbot/types/giveaway/Giveaway; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/giveaway/Giveaway;Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/giveaway/Giveaway; + public final fun component9 ()Ljava/lang/Integer; + public final fun copy (Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;)Leu/vendeli/tgbot/types/giveaway/Giveaway; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/giveaway/Giveaway;Ljava/util/List;Lkotlinx/datetime/Instant;ILjava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/giveaway/Giveaway; public fun equals (Ljava/lang/Object;)Z public final fun getChats ()Ljava/util/List; public final fun getCountryCodes ()Ljava/util/List; @@ -5871,6 +5870,7 @@ public final class eu/vendeli/tgbot/types/giveaway/Giveaway { public final fun getOnlyNewMembers ()Ljava/lang/Boolean; public final fun getPremiumSubscriptionMonthCount ()Ljava/lang/Integer; public final fun getPrizeDescription ()Ljava/lang/String; + public final fun getPrizeStarCount ()Ljava/lang/Integer; public final fun getWinnerCount ()I public final fun getWinnersSelectionDate ()Lkotlinx/datetime/Instant; public fun hashCode ()I @@ -5894,18 +5894,20 @@ public final class eu/vendeli/tgbot/types/giveaway/Giveaway$Companion { public final class eu/vendeli/tgbot/types/giveaway/GiveawayCompleted { public static final field Companion Leu/vendeli/tgbot/types/giveaway/GiveawayCompleted$Companion; - public fun (ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;)V - public synthetic fun (ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;Ljava/lang/Boolean;)V + public synthetic fun (ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()I public final fun component2 ()Ljava/lang/Integer; public final fun component3 ()Leu/vendeli/tgbot/types/msg/Message; - public final fun copy (ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;)Leu/vendeli/tgbot/types/giveaway/GiveawayCompleted; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/giveaway/GiveawayCompleted;ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;ILjava/lang/Object;)Leu/vendeli/tgbot/types/giveaway/GiveawayCompleted; + public final fun component4 ()Ljava/lang/Boolean; + public final fun copy (ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/giveaway/GiveawayCompleted; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/giveaway/GiveawayCompleted;ILjava/lang/Integer;Leu/vendeli/tgbot/types/msg/Message;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/giveaway/GiveawayCompleted; public fun equals (Ljava/lang/Object;)Z public final fun getGiveawayMessage ()Leu/vendeli/tgbot/types/msg/Message; public final fun getUnclaimedPrizeCount ()Ljava/lang/Integer; public final fun getWinnerCount ()I public fun hashCode ()I + public final fun isStarGiveaway ()Ljava/lang/Boolean; public fun toString ()Ljava/lang/String; } @@ -5925,20 +5927,42 @@ public final class eu/vendeli/tgbot/types/giveaway/GiveawayCompleted$Companion { } public final class eu/vendeli/tgbot/types/giveaway/GiveawayCreated { - public static final field INSTANCE Leu/vendeli/tgbot/types/giveaway/GiveawayCreated; + public static final field Companion Leu/vendeli/tgbot/types/giveaway/GiveawayCreated$Companion; + public fun ()V + public fun (Ljava/lang/Integer;)V + public synthetic fun (Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/Integer; + public final fun copy (Ljava/lang/Integer;)Leu/vendeli/tgbot/types/giveaway/GiveawayCreated; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/giveaway/GiveawayCreated;Ljava/lang/Integer;ILjava/lang/Object;)Leu/vendeli/tgbot/types/giveaway/GiveawayCreated; public fun equals (Ljava/lang/Object;)Z + public final fun getPrizeStarCount ()Ljava/lang/Integer; public fun hashCode ()I - public final fun serializer ()Lkotlinx/serialization/KSerializer; public fun toString ()Ljava/lang/String; } +public synthetic class eu/vendeli/tgbot/types/giveaway/GiveawayCreated$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Leu/vendeli/tgbot/types/giveaway/GiveawayCreated$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Leu/vendeli/tgbot/types/giveaway/GiveawayCreated; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Leu/vendeli/tgbot/types/giveaway/GiveawayCreated;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class eu/vendeli/tgbot/types/giveaway/GiveawayCreated$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class eu/vendeli/tgbot/types/giveaway/GiveawayWinners { public static final field Companion Leu/vendeli/tgbot/types/giveaway/GiveawayWinners$Companion; - public fun (Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)V - public synthetic fun (Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)V + public synthetic fun (Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Leu/vendeli/tgbot/types/chat/Chat; public final fun component10 ()Ljava/lang/Boolean; - public final fun component11 ()Ljava/lang/String; + public final fun component11 ()Ljava/lang/Boolean; + public final fun component12 ()Ljava/lang/String; public final fun component2 ()J public final fun component3 ()Lkotlinx/datetime/Instant; public final fun component4 ()I @@ -5946,9 +5970,9 @@ public final class eu/vendeli/tgbot/types/giveaway/GiveawayWinners { public final fun component6 ()Ljava/lang/Integer; public final fun component7 ()Ljava/lang/Integer; public final fun component8 ()Ljava/lang/Integer; - public final fun component9 ()Ljava/lang/Boolean; - public final fun copy (Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)Leu/vendeli/tgbot/types/giveaway/GiveawayWinners; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/giveaway/GiveawayWinners;Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/types/giveaway/GiveawayWinners; + public final fun component9 ()Ljava/lang/Integer; + public final fun copy (Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)Leu/vendeli/tgbot/types/giveaway/GiveawayWinners; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/giveaway/GiveawayWinners;Leu/vendeli/tgbot/types/chat/Chat;JLkotlinx/datetime/Instant;ILjava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/types/giveaway/GiveawayWinners; public fun equals (Ljava/lang/Object;)Z public final fun getAdditionalChatCount ()Ljava/lang/Integer; public final fun getChat ()Leu/vendeli/tgbot/types/chat/Chat; @@ -5956,6 +5980,7 @@ public final class eu/vendeli/tgbot/types/giveaway/GiveawayWinners { public final fun getOnlyNewMembers ()Ljava/lang/Boolean; public final fun getPremiumSubscriptionMonthCount ()Ljava/lang/Integer; public final fun getPrizeDescription ()Ljava/lang/String; + public final fun getPrizeStarCount ()Ljava/lang/Integer; public final fun getUnclaimedPrizeCount ()Ljava/lang/Integer; public final fun getWasRefunded ()Ljava/lang/Boolean; public final fun getWinnerCount ()I @@ -7142,6 +7167,7 @@ public abstract class eu/vendeli/tgbot/types/internal/ChainLink : eu/vendeli/tgb public fun getAfterAction ()Leu/vendeli/tgbot/types/internal/Action; public fun getBeforeAction ()Leu/vendeli/tgbot/types/internal/Action; public fun getBreakCondition ()Leu/vendeli/tgbot/types/internal/BreakCondition; + public fun getChainingStrategy ()Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy; public fun getRetryAfterBreak ()Z } @@ -7641,15 +7667,17 @@ public final class eu/vendeli/tgbot/types/internal/InputFile$Companion { } public final class eu/vendeli/tgbot/types/internal/InvocationMeta { - public fun (Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Leu/vendeli/tgbot/types/internal/configuration/RateLimits; public final fun component4 ()Lkotlin/reflect/KClass; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;)Leu/vendeli/tgbot/types/internal/InvocationMeta; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/internal/InvocationMeta;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/InvocationMeta; + public final fun component5 ()Lkotlin/reflect/KClass; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;)Leu/vendeli/tgbot/types/internal/InvocationMeta; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/internal/InvocationMeta;Ljava/lang/String;Ljava/lang/String;Leu/vendeli/tgbot/types/internal/configuration/RateLimits;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/InvocationMeta; public fun equals (Ljava/lang/Object;)Z + public final fun getArgParser ()Lkotlin/reflect/KClass; public final fun getFunction ()Ljava/lang/String; public final fun getGuard ()Lkotlin/reflect/KClass; public final fun getQualifier ()Ljava/lang/String; @@ -7797,6 +7825,21 @@ public final class eu/vendeli/tgbot/types/internal/ProcessedUpdateKt { public static final fun getUserOrNull (Leu/vendeli/tgbot/types/internal/ProcessedUpdate;)Leu/vendeli/tgbot/types/User; } +public final class eu/vendeli/tgbot/types/internal/PurchasedPaidMediaUpdate : eu/vendeli/tgbot/types/internal/ProcessedUpdate { + public fun (ILeu/vendeli/tgbot/types/Update;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;)V + public final fun component1 ()I + public final fun component2 ()Leu/vendeli/tgbot/types/Update; + public final fun component3 ()Leu/vendeli/tgbot/types/media/PaidMediaPurchased; + public final fun copy (ILeu/vendeli/tgbot/types/Update;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;)Leu/vendeli/tgbot/types/internal/PurchasedPaidMediaUpdate; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/internal/PurchasedPaidMediaUpdate;ILeu/vendeli/tgbot/types/Update;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/PurchasedPaidMediaUpdate; + public fun equals (Ljava/lang/Object;)Z + public fun getOrigin ()Leu/vendeli/tgbot/types/Update; + public final fun getPurchasedPaidMedia ()Leu/vendeli/tgbot/types/media/PaidMediaPurchased; + public fun getUpdateId ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + public final class eu/vendeli/tgbot/types/internal/RemovedChatBoostUpdate : eu/vendeli/tgbot/types/internal/ProcessedUpdate { public fun (ILeu/vendeli/tgbot/types/Update;Leu/vendeli/tgbot/types/boost/ChatBoostRemoved;)V public final fun component1 ()I @@ -7949,6 +7992,7 @@ public final class eu/vendeli/tgbot/types/internal/UpdateType : java/lang/Enum { public static final field POLL Leu/vendeli/tgbot/types/internal/UpdateType; public static final field POLL_ANSWER Leu/vendeli/tgbot/types/internal/UpdateType; public static final field PRE_CHECKOUT_QUERY Leu/vendeli/tgbot/types/internal/UpdateType; + public static final field PURCHASED_PAID_MEDIA Leu/vendeli/tgbot/types/internal/UpdateType; public static final field REMOVED_CHAT_BOOST Leu/vendeli/tgbot/types/internal/UpdateType; public static final field SHIPPING_QUERY Leu/vendeli/tgbot/types/internal/UpdateType; public static fun getEntries ()Lkotlin/enums/EnumEntries; @@ -7984,6 +8028,34 @@ public abstract class eu/vendeli/tgbot/types/internal/chain/BaseStatefulLink : e public fun getState ()Leu/vendeli/tgbot/types/internal/chain/LinkStateManager; } +public abstract class eu/vendeli/tgbot/types/internal/chain/ChainingStrategy { +} + +public final class eu/vendeli/tgbot/types/internal/chain/ChainingStrategy$Default : eu/vendeli/tgbot/types/internal/chain/ChainingStrategy { + public static final field INSTANCE Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy$Default; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class eu/vendeli/tgbot/types/internal/chain/ChainingStrategy$DoNothing : eu/vendeli/tgbot/types/internal/chain/ChainingStrategy { + public static final field INSTANCE Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy$DoNothing; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class eu/vendeli/tgbot/types/internal/chain/ChainingStrategy$LinkTo : eu/vendeli/tgbot/types/internal/chain/ChainingStrategy { + public fun (Lkotlin/jvm/functions/Function0;)V + public final fun component1 ()Lkotlin/jvm/functions/Function0; + public final fun copy (Lkotlin/jvm/functions/Function0;)Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy$LinkTo; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy$LinkTo;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy$LinkTo; + public fun equals (Ljava/lang/Object;)Z + public final fun getTarget ()Lkotlin/jvm/functions/Function0; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + public abstract interface class eu/vendeli/tgbot/types/internal/chain/KeySelector { public abstract fun select (Leu/vendeli/tgbot/types/internal/ProcessedUpdate;)Ljava/lang/Object; } @@ -7994,11 +8066,13 @@ public abstract interface class eu/vendeli/tgbot/types/internal/chain/Link { public abstract fun getAfterAction ()Leu/vendeli/tgbot/types/internal/Action; public abstract fun getBeforeAction ()Leu/vendeli/tgbot/types/internal/Action; public abstract fun getBreakCondition ()Leu/vendeli/tgbot/types/internal/BreakCondition; + public abstract fun getChainingStrategy ()Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy; public abstract fun getRetryAfterBreak ()Z } public final class eu/vendeli/tgbot/types/internal/chain/Link$DefaultImpls { public static fun breakAction (Leu/vendeli/tgbot/types/internal/chain/Link;Leu/vendeli/tgbot/types/User;Leu/vendeli/tgbot/types/internal/ProcessedUpdate;Leu/vendeli/tgbot/TelegramBot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static fun getChainingStrategy (Leu/vendeli/tgbot/types/internal/chain/Link;)Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy; } public abstract interface class eu/vendeli/tgbot/types/internal/chain/LinkStateManager { @@ -8014,6 +8088,7 @@ public abstract class eu/vendeli/tgbot/types/internal/chain/StatefulLink : eu/ve public fun getAfterAction ()Leu/vendeli/tgbot/types/internal/Action; public fun getBeforeAction ()Leu/vendeli/tgbot/types/internal/Action; public fun getBreakCondition ()Leu/vendeli/tgbot/types/internal/BreakCondition; + public fun getChainingStrategy ()Leu/vendeli/tgbot/types/internal/chain/ChainingStrategy; public fun getRetryAfterBreak ()Z public abstract fun getState ()Leu/vendeli/tgbot/types/internal/chain/LinkStateManager; } @@ -9425,20 +9500,22 @@ public abstract interface class eu/vendeli/tgbot/types/internal/options/OptionsP public final class eu/vendeli/tgbot/types/internal/options/PaidMediaOptions : eu/vendeli/tgbot/types/internal/options/OptionsCommon, eu/vendeli/tgbot/types/internal/options/OptionsParseMode, eu/vendeli/tgbot/types/internal/options/ShowCaptionAboveMediaProp { public static final field Companion Leu/vendeli/tgbot/types/internal/options/PaidMediaOptions$Companion; public fun ()V - public fun (Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;)V - public synthetic fun (Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/Boolean; + public fun (Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/Boolean; - public final fun component3 ()Leu/vendeli/tgbot/types/ReplyParameters; - public final fun component4 ()Ljava/lang/Integer; - public final fun component5 ()Leu/vendeli/tgbot/types/ParseMode; - public final fun component6 ()Ljava/lang/Boolean; - public final fun copy (Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/internal/options/PaidMediaOptions; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/internal/options/PaidMediaOptions;Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/options/PaidMediaOptions; + public final fun component3 ()Ljava/lang/Boolean; + public final fun component4 ()Leu/vendeli/tgbot/types/ReplyParameters; + public final fun component5 ()Ljava/lang/Integer; + public final fun component6 ()Leu/vendeli/tgbot/types/ParseMode; + public final fun component7 ()Ljava/lang/Boolean; + public final fun copy (Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;)Leu/vendeli/tgbot/types/internal/options/PaidMediaOptions; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/internal/options/PaidMediaOptions;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Leu/vendeli/tgbot/types/ReplyParameters;Ljava/lang/Integer;Leu/vendeli/tgbot/types/ParseMode;Ljava/lang/Boolean;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/options/PaidMediaOptions; public fun equals (Ljava/lang/Object;)Z public fun getDisableNotification ()Ljava/lang/Boolean; public fun getMessageThreadId ()Ljava/lang/Integer; public fun getParseMode ()Leu/vendeli/tgbot/types/ParseMode; + public final fun getPayload ()Ljava/lang/String; public fun getProtectContent ()Ljava/lang/Boolean; public fun getReplyParameters ()Leu/vendeli/tgbot/types/ReplyParameters; public fun getReplyToMessageId ()Ljava/lang/Long; @@ -9448,6 +9525,7 @@ public final class eu/vendeli/tgbot/types/internal/options/PaidMediaOptions : eu public fun setDisableNotification (Ljava/lang/Boolean;)V public fun setMessageThreadId (Ljava/lang/Integer;)V public fun setParseMode (Leu/vendeli/tgbot/types/ParseMode;)V + public final fun setPayload (Ljava/lang/String;)V public fun setProtectContent (Ljava/lang/Boolean;)V public fun setReplyParameters (Leu/vendeli/tgbot/types/ReplyParameters;)V public fun setReplyToMessageId (Ljava/lang/Long;)V @@ -10521,7 +10599,6 @@ public final class eu/vendeli/tgbot/types/keyboard/ReplyKeyboardRemove$Companion public final class eu/vendeli/tgbot/types/keyboard/WebAppData { public static final field Companion Leu/vendeli/tgbot/types/keyboard/WebAppData$Companion; public fun (Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun copy (Ljava/lang/String;Ljava/lang/String;)Leu/vendeli/tgbot/types/keyboard/WebAppData; @@ -11293,6 +11370,35 @@ public final class eu/vendeli/tgbot/types/media/PaidMediaInfo$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class eu/vendeli/tgbot/types/media/PaidMediaPurchased { + public static final field Companion Leu/vendeli/tgbot/types/media/PaidMediaPurchased$Companion; + public fun (Leu/vendeli/tgbot/types/User;Ljava/lang/String;)V + public final fun component1 ()Leu/vendeli/tgbot/types/User; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Leu/vendeli/tgbot/types/User;Ljava/lang/String;)Leu/vendeli/tgbot/types/media/PaidMediaPurchased; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/media/PaidMediaPurchased;Leu/vendeli/tgbot/types/User;Ljava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/types/media/PaidMediaPurchased; + public fun equals (Ljava/lang/Object;)Z + public final fun getFrom ()Leu/vendeli/tgbot/types/User; + public final fun getPaidMediaPayload ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class eu/vendeli/tgbot/types/media/PaidMediaPurchased$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Leu/vendeli/tgbot/types/media/PaidMediaPurchased$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Leu/vendeli/tgbot/types/media/PaidMediaPurchased; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Leu/vendeli/tgbot/types/media/PaidMediaPurchased;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class eu/vendeli/tgbot/types/media/PaidMediaPurchased$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class eu/vendeli/tgbot/types/media/PhotoSize { public static final field Companion Leu/vendeli/tgbot/types/media/PhotoSize$Companion; public fun (Ljava/lang/String;Ljava/lang/String;IILjava/lang/Integer;)V @@ -13350,16 +13456,18 @@ public final class eu/vendeli/tgbot/types/stars/TransactionPartner$TelegramAds : public final class eu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner : eu/vendeli/tgbot/types/stars/TransactionPartner { public static final field Companion Leu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner$Companion; - public fun (Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V + public synthetic fun (Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Leu/vendeli/tgbot/types/User; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/util/List; - public final fun copy (Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;)Leu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner; - public static synthetic fun copy$default (Leu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner;Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Leu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner; + public final fun component4 ()Ljava/lang/String; + public final fun copy (Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Leu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner; + public static synthetic fun copy$default (Leu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner;Leu/vendeli/tgbot/types/User;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/types/stars/TransactionPartner$UserPartner; public fun equals (Ljava/lang/Object;)Z public final fun getInvoicePayload ()Ljava/lang/String; public final fun getPaidMedia ()Ljava/util/List; + public final fun getPaidMediaPayload ()Ljava/lang/String; public final fun getUser ()Leu/vendeli/tgbot/types/User; public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -13414,6 +13522,32 @@ public final class eu/vendeli/tgbot/utils/FileExtHelpers_jvmKt { public static synthetic fun toInputFile$default (Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/types/internal/InputFile; } +public final class eu/vendeli/tgbot/utils/FunctionalDSLUtilsKt { + public static final fun onBusinessConnection (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onBusinessMessage (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onCallbackQuery (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onChannelPost (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onChatBoost (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onChatJoinRequest (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onChatMember (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onChosenInlineResult (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onDeletedBusinessMessages (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onEditedBusinessMessage (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onEditedChannelPost (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onEditedMessage (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onInlineQuery (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onMessage (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onMessageReaction (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onMessageReactionCount (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onMyChatMember (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onPoll (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onPollAnswer (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onPreCheckoutQuery (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onPurchasedPaidMedia (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onRemovedChatBoost (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V + public static final fun onShippingQuery (Leu/vendeli/tgbot/core/FunctionalHandlingDsl;Lkotlin/jvm/functions/Function2;)V +} + public final class eu/vendeli/tgbot/utils/LoggingWrapper { public fun (Leu/vendeli/tgbot/types/internal/configuration/LoggingConfiguration;Ljava/lang/String;)V public final fun debug (Lkotlin/jvm/functions/Function0;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -13455,20 +13589,12 @@ public final class eu/vendeli/tgbot/utils/builders/EntitiesBuilder { public final class eu/vendeli/tgbot/utils/builders/EntitiesBuilder$EntityData { public fun ()V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Leu/vendeli/tgbot/types/User; - public final fun component3 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Leu/vendeli/tgbot/types/User;Ljava/lang/String;)Leu/vendeli/tgbot/utils/builders/EntitiesBuilder$EntityData; - public static synthetic fun copy$default (Leu/vendeli/tgbot/utils/builders/EntitiesBuilder$EntityData;Ljava/lang/String;Leu/vendeli/tgbot/types/User;Ljava/lang/String;ILjava/lang/Object;)Leu/vendeli/tgbot/utils/builders/EntitiesBuilder$EntityData; - public fun equals (Ljava/lang/Object;)Z public final fun getLanguage ()Ljava/lang/String; public final fun getUrl ()Ljava/lang/String; public final fun getUser ()Leu/vendeli/tgbot/types/User; - public fun hashCode ()I public final fun setLanguage (Ljava/lang/String;)V public final fun setUrl (Ljava/lang/String;)V public final fun setUser (Leu/vendeli/tgbot/types/User;)V - public fun toString ()Ljava/lang/String; } public abstract interface class eu/vendeli/tgbot/utils/builders/EntitiesCtxBuilder : eu/vendeli/tgbot/utils/builders/EntitiesExtBuilder { diff --git a/telegram-bot/build.gradle.kts b/telegram-bot/build.gradle.kts index a2783cfc50..f7feb37fdc 100644 --- a/telegram-bot/build.gradle.kts +++ b/telegram-bot/build.gradle.kts @@ -91,8 +91,8 @@ ksp { rootDir.resolve("ktgram-utils/src/commonMain/kotlin/").absolutePath, ) arg( - "apiDir", - rootDir.resolve("telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types").absolutePath, + "tgBaseDir", + rootDir.resolve("telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot").absolutePath, ) arg( "apiFile", diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommandHandler.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommandHandler.kt index 07928da637..ad49e23eb6 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommandHandler.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommandHandler.kt @@ -1,6 +1,8 @@ package eu.vendeli.tgbot.annotations +import eu.vendeli.tgbot.implementations.DefaultArgParser import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.interfaces.helper.ArgumentParser import eu.vendeli.tgbot.interfaces.helper.Guard import eu.vendeli.tgbot.types.internal.UpdateType import kotlin.reflect.KClass @@ -11,24 +13,30 @@ import kotlin.reflect.KClass * @property value Keywords of the command. * @property rateLimits Query limits for this particular command. * @property scope Scope in which the command will be checked. + * @property guard Guard condition that will be checked. + * @property argParser Custom argument parser. */ @Target(AnnotationTarget.FUNCTION) -@Retention(AnnotationRetention.RUNTIME) +@Retention(AnnotationRetention.SOURCE) annotation class CommandHandler( val value: Array, val rateLimits: RateLimits = RateLimits(0, 0), val scope: Array = [UpdateType.MESSAGE], val guard: KClass = DefaultGuard::class, + val argParser: KClass = DefaultArgParser::class, ) { /** * Shortcut [CommandHandler] annotation with specified scope for [UpdateType.CALLBACK_QUERY]. * * @property value Keywords of the command. * @property rateLimits Query limits for this particular command. + * @property guard Guard condition that will be checked. + * @property argParser Custom argument parser. */ annotation class CallbackQuery( val value: Array, val rateLimits: RateLimits = RateLimits(0, 0), val guard: KClass = DefaultGuard::class, + val argParser: KClass = DefaultArgParser::class, ) } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommonHandler.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommonHandler.kt index bb9adedc3c..d290e62bfc 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommonHandler.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/CommonHandler.kt @@ -1,6 +1,8 @@ package eu.vendeli.tgbot.annotations +import eu.vendeli.tgbot.implementations.DefaultArgParser import eu.vendeli.tgbot.implementations.DefaultFilter +import eu.vendeli.tgbot.interfaces.helper.ArgumentParser import eu.vendeli.tgbot.interfaces.helper.Filter import eu.vendeli.tgbot.types.internal.UpdateType import kotlin.reflect.KClass @@ -21,6 +23,7 @@ annotation class CommonHandler { * @property priority priority of activity. (0 is highest) * @property scope scope `UpdateType` in which the command will be checked. * @property rateLimits query limits for this particular command. + * @property argParser Custom argument parser. */ @Target(AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.SOURCE) @@ -30,6 +33,7 @@ annotation class CommonHandler { val priority: Int = 0, val scope: Array = [UpdateType.MESSAGE], val rateLimits: RateLimits = RateLimits(0, 0), + val argParser: KClass = DefaultArgParser::class, ) /** @@ -41,6 +45,7 @@ annotation class CommonHandler { * @property priority priority of activity. (0 is highest) * @property scope scope `UpdateType` in which the command will be checked. * @property rateLimits query limits for this particular command. + * @property argParser Custom argument parser. */ @Target(AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.SOURCE) @@ -51,5 +56,6 @@ annotation class CommonHandler { val priority: Int = 0, val scope: Array = [UpdateType.MESSAGE], val rateLimits: RateLimits = RateLimits(0, 0), + val argParser: KClass = DefaultArgParser::class, ) } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputChain.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputChain.kt index d715a19050..0d34bde196 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputChain.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputChain.kt @@ -1,8 +1,13 @@ package eu.vendeli.tgbot.annotations /** - * Label the class that implements the input chain, for [CodegenUpdateHandler]. + * Label the class that implements the input chain, for [TgUpdateHandler]. + * + * @property autoClean Flag to clean state automatically after the last step successfully proceeded, + * last chain update is used to select key. */ @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) -annotation class InputChain +annotation class InputChain( + val autoClean: Boolean = false, +) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputHandler.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputHandler.kt index 098f773540..bf4e85291a 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputHandler.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/InputHandler.kt @@ -1,7 +1,7 @@ package eu.vendeli.tgbot.annotations -import eu.vendeli.tgbot.interfaces.helper.Guard import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.interfaces.helper.Guard import kotlin.reflect.KClass /** @@ -9,9 +9,10 @@ import kotlin.reflect.KClass * * @property value Keywords of the input. * @property rateLimits Query limits for this particular command. + * @property guard Guard condition that will be checked. */ @Target(AnnotationTarget.FUNCTION) -@Retention(AnnotationRetention.RUNTIME) +@Retention(AnnotationRetention.SOURCE) annotation class InputHandler( val value: Array, val rateLimits: RateLimits = RateLimits(0, 0), diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/ParamMapping.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/ParamMapping.kt index 64b6ecec79..fcd203b1dc 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/ParamMapping.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/ParamMapping.kt @@ -7,7 +7,7 @@ package eu.vendeli.tgbot.annotations * @property name Parameter name representation in the callback. */ @Target(AnnotationTarget.VALUE_PARAMETER) -@Retention(AnnotationRetention.RUNTIME) +@Retention(AnnotationRetention.SOURCE) annotation class ParamMapping( val name: String, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/RateLimits.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/RateLimits.kt index 221c6ce917..edead9e2f4 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/RateLimits.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/RateLimits.kt @@ -7,7 +7,7 @@ package eu.vendeli.tgbot.annotations * @property rate The number of requests for a certain period. */ @Target(AnnotationTarget.ANNOTATION_CLASS) -@Retention(AnnotationRetention.RUNTIME) +@Retention(AnnotationRetention.SOURCE) annotation class RateLimits( val period: Long = 0L, val rate: Long = 0L, diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UnprocessedHandler.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UnprocessedHandler.kt index e78f53c1f8..366a5db05e 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UnprocessedHandler.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UnprocessedHandler.kt @@ -5,5 +5,5 @@ package eu.vendeli.tgbot.annotations * Only one processing point is possible. */ @Target(AnnotationTarget.FUNCTION) -@Retention(AnnotationRetention.RUNTIME) +@Retention(AnnotationRetention.SOURCE) annotation class UnprocessedHandler diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UpdateHandler.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UpdateHandler.kt index 672a664f7d..50782b74ec 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UpdateHandler.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/annotations/UpdateHandler.kt @@ -8,7 +8,7 @@ import eu.vendeli.tgbot.types.internal.UpdateType * @property type Type of update. */ @Target(AnnotationTarget.FUNCTION) -@Retention(AnnotationRetention.RUNTIME) +@Retention(AnnotationRetention.SOURCE) annotation class UpdateHandler( val type: Array, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/Invoice.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/Invoice.kt index 970f7ba00e..907da4c59f 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/Invoice.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/Invoice.kt @@ -48,7 +48,7 @@ class SendInvoiceAction( * @param messageThreadId Unique identifier for the target message thread (topic) of the forum; for forum supergroups only * @param title Product name, 1-32 characters * @param description Product description, 1-255 characters - * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. * @param providerToken Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. * @param currency Three-letter ISO 4217 currency code, see more on currencies. Pass "XTR" for payments in Telegram Stars. * @param prices Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/botactions/CreateInvoiceLink.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/botactions/CreateInvoiceLink.kt index a6a6d24858..9908ef036d 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/botactions/CreateInvoiceLink.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/botactions/CreateInvoiceLink.kt @@ -44,7 +44,7 @@ class CreateInvoiceLinkAction( * [Api reference](https://core.telegram.org/bots/api#createinvoicelink) * @param title Product name, 1-32 characters * @param description Product description, 1-255 characters - * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. * @param providerToken Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. * @param currency Three-letter ISO 4217 currency code, see more on currencies. Pass "XTR" for payments in Telegram Stars. * @param prices Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/media/SendPaidMedia.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/media/SendPaidMedia.kt index 164d0541e9..abe1070bfa 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/media/SendPaidMedia.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/api/media/SendPaidMedia.kt @@ -42,8 +42,9 @@ class SendPaidMediaAction( * [Api reference](https://core.telegram.org/bots/api#sendpaidmedia) * @param businessConnectionId Unique identifier of the business connection on behalf of which the message will be sent * @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance. - * @param starCount The number of Telegram Stars that must be paid to buy access to the media + * @param starCount The number of Telegram Stars that must be paid to buy access to the media; 1-2500 * @param media A JSON-serialized array describing the media to be sent; up to 10 items + * @param payload Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. * @param caption Media caption, 0-1024 characters after entities parsing * @param parseMode Mode for parsing entities in the media caption. See formatting options for more details. * @param captionEntities A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/FunctionalHandlingDsl.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/FunctionalHandlingDsl.kt index 33266b0b56..cb1a574983 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/FunctionalHandlingDsl.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/FunctionalHandlingDsl.kt @@ -1,8 +1,10 @@ package eu.vendeli.tgbot.core import eu.vendeli.tgbot.TelegramBot +import eu.vendeli.tgbot.implementations.DefaultArgParser import eu.vendeli.tgbot.implementations.DefaultFilter import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.interfaces.helper.ArgumentParser import eu.vendeli.tgbot.interfaces.helper.Filter import eu.vendeli.tgbot.interfaces.helper.Guard import eu.vendeli.tgbot.types.internal.ActivityCtx @@ -16,32 +18,9 @@ import eu.vendeli.tgbot.types.internal.UpdateType import eu.vendeli.tgbot.types.internal.configuration.RateLimits import eu.vendeli.tgbot.utils.DEFAULT_COMMAND_SCOPE import eu.vendeli.tgbot.utils.LoggingWrapper -import eu.vendeli.tgbot.utils.OnBusinessConnectionActivity -import eu.vendeli.tgbot.utils.OnBusinessMessageActivity -import eu.vendeli.tgbot.utils.OnCallbackQueryActivity -import eu.vendeli.tgbot.utils.OnChannelPostActivity -import eu.vendeli.tgbot.utils.OnChatBoostActivity -import eu.vendeli.tgbot.utils.OnChatJoinRequestActivity -import eu.vendeli.tgbot.utils.OnChatMemberActivity -import eu.vendeli.tgbot.utils.OnChosenInlineResultActivity import eu.vendeli.tgbot.utils.OnCommandActivity -import eu.vendeli.tgbot.utils.OnDeletedBusinessMessagesActivity -import eu.vendeli.tgbot.utils.OnEditedBusinessMessageActivity -import eu.vendeli.tgbot.utils.OnEditedChannelPostActivity -import eu.vendeli.tgbot.utils.OnEditedMessageActivity -import eu.vendeli.tgbot.utils.OnInlineQueryActivity import eu.vendeli.tgbot.utils.OnInputActivity -import eu.vendeli.tgbot.utils.OnMessageActivity -import eu.vendeli.tgbot.utils.OnMessageReactionActivity -import eu.vendeli.tgbot.utils.OnMessageReactionCountActivity -import eu.vendeli.tgbot.utils.OnMyChatMemberActivity -import eu.vendeli.tgbot.utils.OnPollActivity -import eu.vendeli.tgbot.utils.OnPollAnswerActivity -import eu.vendeli.tgbot.utils.OnPreCheckoutQueryActivity -import eu.vendeli.tgbot.utils.OnRemovedChatBoostActivity -import eu.vendeli.tgbot.utils.OnShippingQueryActivity import eu.vendeli.tgbot.utils.WhenNotHandledActivity -import eu.vendeli.tgbot.utils.cast import kotlin.reflect.KClass /** @@ -56,160 +35,6 @@ class FunctionalHandlingDsl internal constructor( internal val functionalActivities = FunctionalActivities() internal val logger = LoggingWrapper(bot.config.logging, "eu.vendeli.FunctionalHandler") - /** - * Action that is performed on the presence of Message in the Update. - */ - fun onMessage(block: OnMessageActivity) { - functionalActivities.onUpdateActivities[UpdateType.MESSAGE] = block.cast() - } - - /** - * Action that is performed on the presence of EditedMessage in the Update. - */ - fun onEditedMessage(block: OnEditedMessageActivity) { - functionalActivities.onUpdateActivities[UpdateType.EDIT_MESSAGE] = block.cast() - } - - /** - * Action that is performed on the presence of PollAnswer in the Update. - */ - fun onPollAnswer(block: OnPollAnswerActivity) { - functionalActivities.onUpdateActivities[UpdateType.POLL_ANSWER] = block.cast() - } - - /** - * Action that is performed on the presence of CallbackQuery in the Update. - */ - fun onCallbackQuery(block: OnCallbackQueryActivity) { - functionalActivities.onUpdateActivities[UpdateType.CALLBACK_QUERY] = block.cast() - } - - /** - * Action that is performed on the presence of Poll in the Update. - */ - fun onPoll(block: OnPollActivity) { - functionalActivities.onUpdateActivities[UpdateType.POLL] = block.cast() - } - - /** - * Action that is performed on the presence of ChatJoinRequest in the Update. - */ - fun onChatJoinRequest(block: OnChatJoinRequestActivity) { - functionalActivities.onUpdateActivities[UpdateType.CHAT_JOIN_REQUEST] = block.cast() - } - - /** - * Action that is performed on the presence of ChatMember in the Update. - */ - fun onChatMember(block: OnChatMemberActivity) { - functionalActivities.onUpdateActivities[UpdateType.CHAT_MEMBER] = block.cast() - } - - /** - * Action that is performed on the presence of MyChatMember in the Update. - */ - fun onMyChatMember(block: OnMyChatMemberActivity) { - functionalActivities.onUpdateActivities[UpdateType.MY_CHAT_MEMBER] = block.cast() - } - - /** - * Action that is performed on the presence of ChannelPost in the Update. - */ - fun onChannelPost(block: OnChannelPostActivity) { - functionalActivities.onUpdateActivities[UpdateType.CHANNEL_POST] = block.cast() - } - - /** - * Action that is performed on the presence of EditedChannelPost in the Update. - */ - fun onEditedChannelPost(block: OnEditedChannelPostActivity) { - functionalActivities.onUpdateActivities[UpdateType.EDITED_CHANNEL_POST] = block.cast() - } - - /** - * Action that is performed on the presence of ChosenInlineResult in the Update. - */ - fun onChosenInlineResult(block: OnChosenInlineResultActivity) { - functionalActivities.onUpdateActivities[UpdateType.CHOSEN_INLINE_RESULT] = block.cast() - } - - /** - * Action that is performed on the presence of InlineQuery in the Update. - */ - fun onInlineQuery(block: OnInlineQueryActivity) { - functionalActivities.onUpdateActivities[UpdateType.INLINE_QUERY] = block.cast() - } - - /** - * Action that is performed on the presence of PreCheckoutQuery in the Update. - */ - fun onPreCheckoutQuery(block: OnPreCheckoutQueryActivity) { - functionalActivities.onUpdateActivities[UpdateType.PRE_CHECKOUT_QUERY] = block.cast() - } - - /** - * Action that is performed on the presence of ShippingQuery in the Update. - */ - fun onShippingQuery(block: OnShippingQueryActivity) { - functionalActivities.onUpdateActivities[UpdateType.SHIPPING_QUERY] = block.cast() - } - - /** - * Action that is performed on the presence of MessageReaction in the Update. - */ - fun onMessageReaction(block: OnMessageReactionActivity) { - functionalActivities.onUpdateActivities[UpdateType.MESSAGE_REACTION] = block.cast() - } - - /** - * Action that is performed on the presence of MessageReactionCount in the Update. - */ - fun onMessageReactionCount(block: OnMessageReactionCountActivity) { - functionalActivities.onUpdateActivities[UpdateType.MESSAGE_REACTION_COUNT] = block.cast() - } - - /** - * Action that is performed on the presence of ChatBoost in the Update. - */ - fun onChatBoost(block: OnChatBoostActivity) { - functionalActivities.onUpdateActivities[UpdateType.CHAT_BOOST] = block.cast() - } - - /** - * Action that is performed on the presence of RemovedChatBoost in the Update. - */ - fun onRemovedChatBoost(block: OnRemovedChatBoostActivity) { - functionalActivities.onUpdateActivities[UpdateType.REMOVED_CHAT_BOOST] = block.cast() - } - - /** - * Action that is performed on the presence of BusinessConnection in the Update. - */ - fun onBusinessConnection(block: OnBusinessConnectionActivity) { - functionalActivities.onUpdateActivities[UpdateType.BUSINESS_CONNECTION] = block.cast() - } - - /** - * Action that is performed on the presence of BusinessMessage in the Update. - */ - fun onBusinessMessage(block: OnBusinessMessageActivity) { - functionalActivities.onUpdateActivities[UpdateType.BUSINESS_MESSAGE] = block.cast() - } - - /** - * Action that is performed on the presence of EditedBusinessMessage in the Update. - */ - fun onEditedBusinessMessage(block: OnEditedBusinessMessageActivity) { - functionalActivities.onUpdateActivities[UpdateType.EDITED_BUSINESS_MESSAGE] = block.cast() - } - - /** - * Action that is performed on the presence of DeletedBusinessMessages in the Update. - */ - fun onDeletedBusinessMessages(block: OnDeletedBusinessMessagesActivity) { - functionalActivities.onUpdateActivities[UpdateType.DELETED_BUSINESS_MESSAGES] = block.cast() - } - /** * The action that is performed when the command is matched. * @@ -223,11 +48,12 @@ class FunctionalHandlingDsl internal constructor( scope: Set = DEFAULT_COMMAND_SCOPE, rateLimits: RateLimits = RateLimits.NOT_LIMITED, guard: KClass = DefaultGuard::class, + argParser: KClass = DefaultArgParser::class, block: OnCommandActivity, ) { scope.forEach { functionalActivities.commands[command to it] = - FunctionalInvocation(command, block, scope, rateLimits, guard) + FunctionalInvocation(command, block, scope, rateLimits, guard, argParser = argParser) } } @@ -243,10 +69,11 @@ class FunctionalHandlingDsl internal constructor( scope: Set = DEFAULT_COMMAND_SCOPE, rateLimits: RateLimits = RateLimits.NOT_LIMITED, guard: KClass = DefaultGuard::class, + argParser: KClass = DefaultArgParser::class, block: OnCommandActivity, ) { functionalActivities.regexActivities[command] = - FunctionalInvocation(command.pattern, block, scope, rateLimits, guard) + FunctionalInvocation(command.pattern, block, scope, rateLimits, guard, argParser = argParser) } /** @@ -286,10 +113,11 @@ class FunctionalHandlingDsl internal constructor( filter: KClass = DefaultFilter::class, scope: Set = DEFAULT_COMMAND_SCOPE, rateLimits: RateLimits = RateLimits.NOT_LIMITED, + argParser: KClass = DefaultArgParser::class, block: OnCommandActivity, ) { functionalActivities.commonActivities[CommonMatcher.String(value, filter, scope)] = - FunctionalInvocation(value, block, scope, rateLimits, filter = filter) + FunctionalInvocation(value, block, scope, rateLimits, filter = filter, argParser = argParser) } /** @@ -306,10 +134,11 @@ class FunctionalHandlingDsl internal constructor( filter: KClass = DefaultFilter::class, scope: Set = DEFAULT_COMMAND_SCOPE, rateLimits: RateLimits = RateLimits.NOT_LIMITED, + argParser: KClass = DefaultArgParser::class, block: OnCommandActivity, ) { functionalActivities.commonActivities[CommonMatcher.Regex(value, filter, scope)] = - FunctionalInvocation(value.pattern, block, scope, rateLimits, filter = filter) + FunctionalInvocation(value.pattern, block, scope, rateLimits, filter = filter, argParser = argParser) } /** diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/TgUpdateHandler.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/TgUpdateHandler.kt index e1f67e2608..68a106dc8e 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/TgUpdateHandler.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/core/TgUpdateHandler.kt @@ -19,6 +19,7 @@ import eu.vendeli.tgbot.utils.asyncAction import eu.vendeli.tgbot.utils.checkIsGuarded import eu.vendeli.tgbot.utils.checkIsLimited import eu.vendeli.tgbot.utils.coHandle +import eu.vendeli.tgbot.utils.getParameters import eu.vendeli.tgbot.utils.handleFailure import eu.vendeli.tgbot.utils.parseCommand import eu.vendeli.tgbot.utils.process @@ -187,8 +188,6 @@ class TgUpdateHandler internal constructor( activityId = it.key.value.toString() }?.value - logger.debug { "Result of finding action - ${invocation?.second}" } - // check guard condition if (invocation?.second?.guard?.checkIsGuarded(user, this, bot) == false) { logger.debug { "Invocation guarded: ${invocation.second}" } @@ -199,15 +198,20 @@ class TgUpdateHandler internal constructor( if (invocation != null && checkIsLimited(invocation.second.rateLimits, user?.id, activityId)) return@run + val params = getParameters(invocation?.second?.argParser, request) + + logger.debug { "Result of parsing text: ${request.command} with parameters $params" } + logger.debug { "Result of finding action - ${invocation?.second}" } + // invoke update type handler if there's - activities.updateTypeHandlers[type]?.invokeCatching(this, request.params, true) + activities.updateTypeHandlers[type]?.invokeCatching(this, params, true) when { - invocation != null -> invocation.invokeCatching(this, user, request.params) + invocation != null -> invocation.invokeCatching(this, user, params) activities.unprocessedHandler != null -> activities.unprocessedHandler!! - .invokeCatching(this, request.params) + .invokeCatching(this, params) else -> logger.warn { "update: $update not handled." } } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/implementations/DefaultArgParser.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/implementations/DefaultArgParser.kt new file mode 100644 index 0000000000..0802198810 --- /dev/null +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/implementations/DefaultArgParser.kt @@ -0,0 +1,11 @@ +package eu.vendeli.tgbot.implementations + +import eu.vendeli.tgbot.interfaces.helper.ArgumentParser + +/** + * Stub for a default argument parsing mechanism + * with [eu.vendeli.utils.defaultArgParser] using defined commandParsing configuration. + */ +object DefaultArgParser : ArgumentParser { + override fun parse(text: String) = TODO() +} diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/action/Action.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/action/Action.kt index d699e8c587..c306d31edd 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/action/Action.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/action/Action.kt @@ -21,25 +21,19 @@ abstract class Action : TgAction() { * @param to Recipient * @param via Instance of the bot through which the request will be made. */ - open suspend fun send(to: String, via: TelegramBot) { + suspend fun send(to: String, via: TelegramBot) { parameters["chat_id"] = to.toJsonElement() doRequest(via) } - open suspend fun send(to: Long, via: TelegramBot) { + suspend fun send(to: Long, via: TelegramBot) { parameters["chat_id"] = to.toJsonElement() doRequest(via) } - open suspend fun send(to: User, via: TelegramBot) { - parameters["chat_id"] = to.id.toJsonElement() - doRequest(via) - } + suspend inline fun send(to: User, via: TelegramBot): Unit = send(to.id, via) - open suspend fun send(to: Chat, via: TelegramBot) { - parameters["chat_id"] = to.id.toJsonElement() - doRequest(via) - } + suspend inline fun send(to: Chat, via: TelegramBot): Unit = send(to.id, via) /** * Make a request for action returning its [Response]. @@ -47,61 +41,49 @@ abstract class Action : TgAction() { * @param to Recipient * @param via Instance of the bot through which the request will be made. */ - open suspend fun sendAsync( - to: Long, + suspend fun sendAsync( + to: String, via: TelegramBot, ): Deferred> { parameters["chat_id"] = to.toJsonElement() return doRequestReturning(via) } - /** - * Make a request for action returning its [Response]. - * - * @param to Recipient - * @param via Instance of the bot through which the request will be made. - */ - open suspend fun sendReturning( + suspend fun sendAsync( to: Long, via: TelegramBot, - ): Deferred> = sendAsync(to, via) - - open suspend fun sendAsync( - to: String, - via: TelegramBot, ): Deferred> { parameters["chat_id"] = to.toJsonElement() return doRequestReturning(via) } - open suspend fun sendReturning( - to: String, + suspend inline fun sendAsync( + to: User, via: TelegramBot, - ): Deferred> = sendAsync(to, via) + ): Deferred> = sendAsync(to.id, via) - open suspend fun sendAsync( - to: User, + suspend inline fun sendAsync( + to: Chat, via: TelegramBot, - ): Deferred> { - parameters["chat_id"] = to.id.toJsonElement() - return doRequestReturning(via) - } + ): Deferred> = sendAsync(to.id, via) - open suspend fun sendReturning( - to: User, + suspend inline fun sendReturning( + to: String, via: TelegramBot, ): Deferred> = sendAsync(to, via) - open suspend fun sendAsync( - to: Chat, + suspend inline fun sendReturning( + to: Long, via: TelegramBot, - ): Deferred> { - parameters["chat_id"] = to.id.toJsonElement() - return doRequestReturning(via) - } + ): Deferred> = sendAsync(to, via) - open suspend fun sendReturning( + suspend inline fun sendReturning( + to: User, + via: TelegramBot, + ): Deferred> = sendAsync(to.id, via) + + suspend inline fun sendReturning( to: Chat, via: TelegramBot, - ): Deferred> = sendAsync(to, via) + ): Deferred> = sendAsync(to.id, via) } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/ArgumentParser.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/ArgumentParser.kt new file mode 100644 index 0000000000..54eb7d69b8 --- /dev/null +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/ArgumentParser.kt @@ -0,0 +1,9 @@ +package eu.vendeli.tgbot.interfaces.helper + +/** + * Custom argument parsing mechanism defining interface, + * you can use [eu.vendeli.utils.defaultArgParser] with specific configuration. + */ +fun interface ArgumentParser { + fun parse(text: String): Map +} diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Filter.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Filter.kt index 10c8bfb4ad..123df0cebe 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Filter.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Filter.kt @@ -4,6 +4,9 @@ import eu.vendeli.tgbot.TelegramBot import eu.vendeli.tgbot.types.User import eu.vendeli.tgbot.types.internal.ProcessedUpdate +/** + * Helper interface used for `@CommonHandler` filtering mechanics. + */ interface Filter { suspend fun match(user: User?, update: ProcessedUpdate, bot: TelegramBot): Boolean } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Guard.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Guard.kt index 26624039b8..2c8421ba87 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Guard.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Guard.kt @@ -4,6 +4,9 @@ import eu.vendeli.tgbot.TelegramBot import eu.vendeli.tgbot.types.User import eu.vendeli.tgbot.types.internal.ProcessedUpdate +/** + * Helper interface used with guard mechanics for several handlers. + */ interface Guard { suspend fun condition(user: User?, update: ProcessedUpdate, bot: TelegramBot): Boolean } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Logger.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Logger.kt index 229931da2e..ed5b8c6e09 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Logger.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/interfaces/helper/Logger.kt @@ -2,6 +2,9 @@ package eu.vendeli.tgbot.interfaces.helper import eu.vendeli.tgbot.types.internal.LogLvl +/** + * Interface to pass a global logging mechanism. + */ fun interface Logger { suspend fun log(lvl: LogLvl, tag: String?, message: String, throwable: Throwable?) } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundFill.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundFill.kt index 4385eaa628..1a004a4b45 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundFill.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundFill.kt @@ -27,7 +27,7 @@ sealed class BackgroundFill( data class Gradient( val topColor: Int, val bottomColor: Int, - val rotationAngle: Int? = null, + val rotationAngle: Int, ) : BackgroundFill("gradient") @Serializable diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundType.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundType.kt index 598d4f663f..29fe048a88 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundType.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/BackgroundType.kt @@ -22,14 +22,14 @@ sealed class BackgroundType( @SerialName("fill") data class Fill( val fill: BackgroundFill, - val darkThemeDimming: Int? = null, + val darkThemeDimming: Int, ) : BackgroundType("fill") @Serializable @SerialName("wallpaper") data class Wallpaper( val document: Document, - val darkThemeDimming: Int? = null, + val darkThemeDimming: Int, val isBlurred: Boolean? = null, val isMoving: Boolean? = null, ) : BackgroundType("wallpaper") @@ -39,7 +39,7 @@ sealed class BackgroundType( data class Pattern( val document: Document, val fill: BackgroundFill, - val intensity: Int? = null, + val intensity: Int, val isInverted: Boolean? = null, val isMoving: Boolean? = null, ) : BackgroundType("pattern") diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/Update.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/Update.kt index 56de8a70e5..4a8c8089c2 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/Update.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/Update.kt @@ -9,6 +9,7 @@ import eu.vendeli.tgbot.types.chat.ChatJoinRequest import eu.vendeli.tgbot.types.chat.ChatMemberUpdated import eu.vendeli.tgbot.types.inline.ChosenInlineResult import eu.vendeli.tgbot.types.inline.InlineQuery +import eu.vendeli.tgbot.types.media.PaidMediaPurchased import eu.vendeli.tgbot.types.msg.Message import eu.vendeli.tgbot.types.msg.MessageReactionCountUpdated import eu.vendeli.tgbot.types.msg.MessageReactionUpdated @@ -38,6 +39,7 @@ import kotlinx.serialization.Serializable * @property callbackQuery Optional. New incoming callback query * @property shippingQuery Optional. New incoming shipping query. Only for invoices with flexible price * @property preCheckoutQuery Optional. New incoming pre-checkout query. Contains full information about checkout + * @property purchasedPaidMedia Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat * @property poll Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot * @property pollAnswer Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. * @property myChatMember Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. @@ -64,6 +66,7 @@ data class Update( val callbackQuery: CallbackQuery? = null, val shippingQuery: ShippingQuery? = null, val preCheckoutQuery: PreCheckoutQuery? = null, + val purchasedPaidMedia: PaidMediaPurchased? = null, val poll: Poll? = null, val pollAnswer: PollAnswer? = null, val myChatMember: ChatMemberUpdated? = null, diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/boost/ChatBoostSource.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/boost/ChatBoostSource.kt index cd0e92fd76..9e4b423b84 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/boost/ChatBoostSource.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/boost/ChatBoostSource.kt @@ -32,5 +32,6 @@ sealed class ChatBoostSource( val giveawayMessageId: Long, override val user: User? = null, val isUnclaimed: Boolean? = null, + val prizeStarCount: Int? = null, ) : ChatBoostSource("giveaway") } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatAdministratorRights.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatAdministratorRights.kt index 66cd95a5a6..7d0a7e19f7 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatAdministratorRights.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatAdministratorRights.kt @@ -34,9 +34,9 @@ data class ChatAdministratorRights( val canPostMessages: Boolean? = null, val canEditMessages: Boolean? = null, val canPinMessages: Boolean? = null, - val canManageVideoChats: Boolean? = null, + val canManageVideoChats: Boolean, val canManageTopics: Boolean? = null, - val canPostStories: Boolean? = null, - val canEditStories: Boolean? = null, - val canDeleteStories: Boolean? = null, + val canPostStories: Boolean, + val canEditStories: Boolean, + val canDeleteStories: Boolean, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatFullInfo.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatFullInfo.kt index 4740322c56..6a377ae0df 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatFullInfo.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatFullInfo.kt @@ -1,11 +1,11 @@ package eu.vendeli.tgbot.types.chat import eu.vendeli.tgbot.types.Birthdate -import eu.vendeli.tgbot.types.msg.Message import eu.vendeli.tgbot.types.ReactionType import eu.vendeli.tgbot.types.business.BusinessIntro import eu.vendeli.tgbot.types.business.BusinessLocation import eu.vendeli.tgbot.types.business.BusinessOpeningHours +import eu.vendeli.tgbot.types.msg.Message import kotlinx.serialization.Serializable /** @@ -66,8 +66,8 @@ data class ChatFullInfo( val firstName: String? = null, val lastName: String? = null, val isForum: Boolean? = null, - val accentColorId: Int? = null, - val maxReactionCount: Int? = null, + val accentColorId: Int, + val maxReactionCount: Int, val photo: ChatPhoto? = null, val activeUsernames: List? = null, val birthdate: Birthdate? = null, diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatInviteLink.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatInviteLink.kt index 2e9d346b13..298dc85ab1 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatInviteLink.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatInviteLink.kt @@ -1,9 +1,11 @@ package eu.vendeli.tgbot.types.chat import eu.vendeli.tgbot.types.User +import eu.vendeli.tgbot.utils.serde.DurationSerializer import eu.vendeli.tgbot.utils.serde.InstantSerializer import kotlinx.datetime.Instant import kotlinx.serialization.Serializable +import kotlin.time.Duration /** * Represents an invite link for a chat. @@ -18,6 +20,8 @@ import kotlinx.serialization.Serializable * @property expireDate Optional. Point in time (Unix timestamp) when the link will expire or has been expired * @property memberLimit Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 * @property pendingJoinRequestCount Optional. Number of pending join requests created using this link + * @property subscriptionPeriod Optional. The number of seconds the subscription will be active for before the next payment + * @property subscriptionPrice Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link */ @Serializable data class ChatInviteLink( @@ -31,4 +35,7 @@ data class ChatInviteLink( val expireDate: Instant? = null, val memberLimit: Int? = null, val pendingJoinRequestCount: Int? = null, + @Serializable(DurationSerializer::class) + val subscriptionPeriod: Duration? = null, + val subscriptionPrice: Int? = null, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatMember.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatMember.kt index b579988fa1..ce7e6a0486 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatMember.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/chat/ChatMember.kt @@ -40,11 +40,11 @@ sealed class ChatMember( val canPostMessages: Boolean? = null, val canEditMessages: Boolean? = null, val canPinMessages: Boolean? = null, - val canManageVideoChats: Boolean? = null, + val canManageVideoChats: Boolean, val canManageTopics: Boolean? = null, - val canPostStories: Boolean? = null, - val canEditStories: Boolean? = null, - val canDeleteStories: Boolean? = null, + val canPostStories: Boolean, + val canEditStories: Boolean, + val canDeleteStories: Boolean, val customTitle: String? = null, ) : ChatMember("administrator") @@ -63,7 +63,7 @@ sealed class ChatMember( val isMember: Boolean, val canChangeInfo: Boolean, val canInviteUsers: Boolean, - val canPinMessages: Boolean? = null, + val canPinMessages: Boolean, val canSendMessages: Boolean, val canSendAudios: Boolean, val canSendDocuments: Boolean, @@ -74,7 +74,7 @@ sealed class ChatMember( val canSendPolls: Boolean, val canSendOtherMessages: Boolean, val canAddWebPagePreviews: Boolean, - val canManageTopics: Boolean? = null, + val canManageTopics: Boolean, @Serializable(InstantSerializer::class) val untilDate: Instant, ) : ChatMember("restricted") diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/Giveaway.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/Giveaway.kt index 2778abcb78..200fc122db 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/Giveaway.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/Giveaway.kt @@ -16,7 +16,8 @@ import kotlinx.serialization.Serializable * @property hasPublicWinners Optional. True, if the list of giveaway winners will be visible to everyone * @property prizeDescription Optional. Description of additional giveaway prize * @property countryCodes Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways. - * @property premiumSubscriptionMonthCount Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for + * @property prizeStarCount Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only + * @property premiumSubscriptionMonthCount Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only */ @Serializable data class Giveaway( @@ -28,5 +29,6 @@ data class Giveaway( val hasPublicWinners: Boolean? = null, val prizeDescription: String? = null, val countryCodes: List? = null, + val prizeStarCount: Int? = null, val premiumSubscriptionMonthCount: Int? = null, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCompleted.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCompleted.kt index 607f96f05e..0bc90535ad 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCompleted.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCompleted.kt @@ -10,10 +10,12 @@ import kotlinx.serialization.Serializable * @property winnerCount Number of winners in the giveaway * @property unclaimedPrizeCount Optional. Number of undistributed prizes * @property giveawayMessage Optional. Message with the giveaway that was completed, if it wasn't deleted + * @property isStarGiveaway Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway. */ @Serializable data class GiveawayCompleted( val winnerCount: Int, val unclaimedPrizeCount: Int? = null, val giveawayMessage: Message? = null, + val isStarGiveaway: Boolean? = null, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCreated.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCreated.kt index c4c5c1371d..ca855dde01 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCreated.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayCreated.kt @@ -2,5 +2,13 @@ package eu.vendeli.tgbot.types.giveaway import kotlinx.serialization.Serializable +/** + * This object represents a service message about the creation of a scheduled giveaway. + * + * [Api reference](https://core.telegram.org/bots/api#giveawaycreated) + * @property prizeStarCount Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only + */ @Serializable -data object GiveawayCreated +data class GiveawayCreated( + val prizeStarCount: Int? = null, +) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayWinners.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayWinners.kt index afb1b52b21..b55568d068 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayWinners.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/giveaway/GiveawayWinners.kt @@ -16,7 +16,8 @@ import kotlinx.serialization.Serializable * @property winnerCount Total number of winners in the giveaway * @property winners List of up to 100 winners of the giveaway * @property additionalChatCount Optional. The number of other chats the user had to join in order to be eligible for the giveaway - * @property premiumSubscriptionMonthCount Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for + * @property prizeStarCount Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only + * @property premiumSubscriptionMonthCount Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only * @property unclaimedPrizeCount Optional. Number of undistributed prizes * @property onlyNewMembers Optional. True, if only users who had joined the chats after the giveaway started were eligible to win * @property wasRefunded Optional. True, if the giveaway was canceled because the payment for it was refunded @@ -31,6 +32,7 @@ data class GiveawayWinners( val winnerCount: Int, val winners: List, val additionalChatCount: Int? = null, + val prizeStarCount: Int? = null, val premiumSubscriptionMonthCount: Int? = null, val unclaimedPrizeCount: Int? = null, val onlyNewMembers: Boolean? = null, diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/FunctionalInvocation.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/FunctionalInvocation.kt index 94b40d9056..b381eb7a61 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/FunctionalInvocation.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/FunctionalInvocation.kt @@ -1,7 +1,9 @@ package eu.vendeli.tgbot.types.internal +import eu.vendeli.tgbot.implementations.DefaultArgParser import eu.vendeli.tgbot.implementations.DefaultFilter import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.interfaces.helper.ArgumentParser import eu.vendeli.tgbot.interfaces.helper.Filter import eu.vendeli.tgbot.interfaces.helper.Guard import eu.vendeli.tgbot.types.internal.configuration.RateLimits @@ -15,9 +17,10 @@ internal data class FunctionalInvocation( val rateLimits: RateLimits, val guard: KClass = DefaultGuard::class, val filter: KClass = DefaultFilter::class, + val argParser: KClass = DefaultArgParser::class, ) { override fun toString(): String = "FunctionalInvocation[" + "id = $id, CommandContext, scope = $scope, rateLimits = $rateLimits, guard = $guard, filter = $filter" + - "]" + ", argParser = $argParser]" } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/InvocationMeta.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/InvocationMeta.kt index 367c44397b..ff44a05968 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/InvocationMeta.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/InvocationMeta.kt @@ -1,15 +1,23 @@ package eu.vendeli.tgbot.types.internal +import eu.vendeli.tgbot.implementations.DefaultArgParser +import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.interfaces.helper.ArgumentParser import eu.vendeli.tgbot.interfaces.helper.Guard import eu.vendeli.tgbot.types.internal.configuration.RateLimits -import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.utils.fullName import kotlin.reflect.KClass data class InvocationMeta( val qualifier: String, val function: String, - val rateLimits: RateLimits, + val rateLimits: RateLimits = RateLimits.NOT_LIMITED, val guard: KClass = DefaultGuard::class, + val argParser: KClass = DefaultArgParser::class, ) { - override fun toString(): String = "$qualifier::$function $rateLimits | \uD83D\uDEE1\uFE0F ${guard.simpleName}" + override fun toString(): String = buildString { + append("$qualifier::$function $rateLimits") + if (guard.fullName != DefaultGuard::class.fullName) append(" | \uD83D\uDEE1\uFE0F ${guard.simpleName}") + if (argParser.fullName != DefaultArgParser::class.fullName) append(" | \uD83D\uDEE0 ${argParser.simpleName}") + } } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ParsedText.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ParsedText.kt index f7e6e59064..6639c46bec 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ParsedText.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ParsedText.kt @@ -2,5 +2,5 @@ package eu.vendeli.tgbot.types.internal internal data class ParsedText( val command: String, - val params: Map, + val tail: String, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ProcessedUpdate.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ProcessedUpdate.kt index 7c7084a345..d34247c40f 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ProcessedUpdate.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/ProcessedUpdate.kt @@ -2,9 +2,6 @@ package eu.vendeli.tgbot.types.internal import eu.vendeli.tgbot.interfaces.marker.MultipleResponse import eu.vendeli.tgbot.types.CallbackQuery -import eu.vendeli.tgbot.types.msg.Message -import eu.vendeli.tgbot.types.msg.MessageReactionCountUpdated -import eu.vendeli.tgbot.types.msg.MessageReactionUpdated import eu.vendeli.tgbot.types.PollAnswer import eu.vendeli.tgbot.types.Update import eu.vendeli.tgbot.types.User @@ -16,6 +13,10 @@ import eu.vendeli.tgbot.types.chat.ChatJoinRequest import eu.vendeli.tgbot.types.chat.ChatMemberUpdated import eu.vendeli.tgbot.types.inline.ChosenInlineResult import eu.vendeli.tgbot.types.inline.InlineQuery +import eu.vendeli.tgbot.types.media.PaidMediaPurchased +import eu.vendeli.tgbot.types.msg.Message +import eu.vendeli.tgbot.types.msg.MessageReactionCountUpdated +import eu.vendeli.tgbot.types.msg.MessageReactionUpdated import eu.vendeli.tgbot.types.payment.PreCheckoutQuery import eu.vendeli.tgbot.types.payment.ShippingQuery import eu.vendeli.tgbot.types.poll.Poll @@ -303,8 +304,16 @@ data class RemovedChatBoostUpdate( internal companion object : UpdateSerializer() } +@Serializable(PurchasedPaidMediaUpdate.Companion::class) +data class PurchasedPaidMediaUpdate( + override val updateId: Int, + override val origin: Update, + val purchasedPaidMedia: PaidMediaPurchased, +) : ProcessedUpdate(updateId, origin, UpdateType.PURCHASED_PAID_MEDIA) { + internal companion object : UpdateSerializer() +} + inline val ProcessedUpdate.userOrNull: User? get() = (this as? UserReference)?.user @Suppress("NOTHING_TO_INLINE") -inline fun ProcessedUpdate.getUser(): User = (this as? UserReference)?.user - ?: throw NullPointerException("User not found.") +inline fun ProcessedUpdate.getUser(): User = userOrNull ?: throw NullPointerException("User not found.") diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/UpdateType.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/UpdateType.kt index a1afe8ef4e..b7a5a79418 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/UpdateType.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/UpdateType.kt @@ -71,6 +71,9 @@ enum class UpdateType { @SerialName("removed_chat_boost") REMOVED_CHAT_BOOST, + @SerialName("purchased_paid_media") + PURCHASED_PAID_MEDIA, + ; override fun toString(): String = "UpdateType.$name" diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/chain/ChainingStrategy.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/chain/ChainingStrategy.kt new file mode 100644 index 0000000000..d0fb0dd95d --- /dev/null +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/chain/ChainingStrategy.kt @@ -0,0 +1,23 @@ +package eu.vendeli.tgbot.types.internal.chain + +/** + * Define `@InputChain` link chaining strategy. + */ +sealed class ChainingStrategy { + /** + * Chain by declaration. + */ + data object Default : ChainingStrategy() + + /** + * Chain to a specified link. + */ + data class LinkTo>( + val target: () -> T, + ) : ChainingStrategy() + + /** + * Don't chain, maybe convenient for more custom logic. + */ + data object DoNothing : ChainingStrategy() +} diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/chain/Link.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/chain/Link.kt index d2e7f6005b..0a9bbfb646 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/chain/Link.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/chain/Link.kt @@ -11,6 +11,8 @@ interface Link { val breakCondition: BreakCondition? val beforeAction: Action? val afterAction: Action? + val chainingStrategy: ChainingStrategy + get() = ChainingStrategy.Default suspend fun action(user: User, update: ProcessedUpdate, bot: TelegramBot): T diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/options/PaidMediaOptions.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/options/PaidMediaOptions.kt index dfd93844ec..48125df141 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/options/PaidMediaOptions.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/internal/options/PaidMediaOptions.kt @@ -6,6 +6,7 @@ import kotlinx.serialization.Serializable @Serializable data class PaidMediaOptions( + var payload: String? = null, override var disableNotification: Boolean? = null, override var protectContent: Boolean? = null, override var replyParameters: ReplyParameters? = null, diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/keyboard/WebAppData.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/keyboard/WebAppData.kt index 22158b3a98..716d88df17 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/keyboard/WebAppData.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/keyboard/WebAppData.kt @@ -11,6 +11,6 @@ import kotlinx.serialization.Serializable */ @Serializable data class WebAppData( - val data: String? = null, + val data: String, val buttonText: String, ) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/media/PaidMediaPurchased.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/media/PaidMediaPurchased.kt new file mode 100644 index 0000000000..4812cde44c --- /dev/null +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/media/PaidMediaPurchased.kt @@ -0,0 +1,17 @@ +package eu.vendeli.tgbot.types.media + +import eu.vendeli.tgbot.types.User +import kotlinx.serialization.Serializable + +/** + * This object contains information about a paid media purchase. + * + * [Api reference](https://core.telegram.org/bots/api#paidmediapurchased) + * @property from User who purchased the media + * @property paidMediaPayload Bot-specified paid media payload + */ +@Serializable +data class PaidMediaPurchased( + val from: User, + val paidMediaPayload: String, +) diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/stars/TransactionPartner.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/stars/TransactionPartner.kt index 00f06a4232..be9e2f59f2 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/stars/TransactionPartner.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/types/stars/TransactionPartner.kt @@ -33,6 +33,7 @@ sealed class TransactionPartner( val user: User, val invoicePayload: String? = null, val paidMedia: List? = null, + val paidMediaPayload: String? = null, ) : TransactionPartner("user") @Serializable diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/CommandParser.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ActivityParser.kt similarity index 51% rename from telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/CommandParser.kt rename to telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ActivityParser.kt index daab2af3a9..741eb3fca3 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/CommandParser.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ActivityParser.kt @@ -1,5 +1,6 @@ package eu.vendeli.tgbot.utils +import eu.vendeli.tgbot.annotations.internal.InternalApi import eu.vendeli.tgbot.core.TgUpdateHandler import eu.vendeli.tgbot.types.internal.ParsedText @@ -7,24 +8,27 @@ import eu.vendeli.tgbot.types.internal.ParsedText internal fun TgUpdateHandler.parseCommand( text: String, ): ParsedText = with(bot.config.commandParsing) { - var state = ParserState.READING_COMMAND + var state = CommandParserState.READING_COMMAND var command = "" - val params = mutableMapOf() - - var paramNameBuffer = "" - var paramValBuffer = "" var commandAt = "" - text.forEach { i -> + var parsedIndex = 0 + for ((idx, i) in text.withIndex()) { + parsedIndex = idx when (state) { - ParserState.READING_COMMAND -> { + CommandParserState.READING_COMMAND -> { when { + commandDelimiter != ' ' && !restrictSpacesInCommands && command == "/start" -> { + // deeplink case + if (i == ' ') break + } + i == commandDelimiter || restrictSpacesInCommands && i == ' ' -> { - state = ParserState.READING_PARAM_NAME + break } i == '@' -> { - state = ParserState.MATCHING_IDENTIFIER + state = CommandParserState.MATCHING_IDENTIFIER } else -> { @@ -33,23 +37,44 @@ internal fun TgUpdateHandler.parseCommand( } } - ParserState.MATCHING_IDENTIFIER -> { + CommandParserState.MATCHING_IDENTIFIER -> { if (i == commandDelimiter || (restrictSpacesInCommands && i == ' ')) { if (useIdentifierInGroupCommands && bot.config.identifier != commandAt) - return@with ParsedText(text, emptyMap()) - state = ParserState.READING_PARAM_NAME + return@with ParsedText(text, "") + break } else { commandAt += i } } + } + } + + return ParsedText(command, text.drop(parsedIndex + 1)) +} - ParserState.READING_PARAM_NAME -> { +@InternalApi +@Suppress("CyclomaticComplexMethod", "NestedBlockDepth") +fun defaultArgParser( + text: String, + parameterDelimiter: Char, + valueDelimiter: Char, +): Map { + if (text.isEmpty()) return emptyMap() + var state = ParameterParserState.READING_PARAM_NAME + val params = mutableMapOf() + + var paramNameBuffer = "" + var paramValBuffer = "" + + text.forEach { i -> + when (state) { + ParameterParserState.READING_PARAM_NAME -> { when (i) { - parameterValueDelimiter -> { - state = ParserState.READING_PARAM_VALUE + valueDelimiter -> { + state = ParameterParserState.READING_PARAM_VALUE } - parametersDelimiter -> { + parameterDelimiter -> { params["param_${params.size + 1}"] = paramNameBuffer paramNameBuffer = "" } @@ -58,35 +83,34 @@ internal fun TgUpdateHandler.parseCommand( } } - ParserState.READING_PARAM_VALUE -> { - if (i == parametersDelimiter) { + ParameterParserState.READING_PARAM_VALUE -> { + if (i == parameterDelimiter) { params[paramNameBuffer] = paramValBuffer paramNameBuffer = "" paramValBuffer = "" - state = ParserState.READING_PARAM_NAME + state = ParameterParserState.READING_PARAM_NAME } else { paramValBuffer += i } } } } - if (state == ParserState.READING_PARAM_VALUE) { + + if (state == ParameterParserState.READING_PARAM_VALUE) { params[paramNameBuffer] = paramValBuffer - } else if (state == ParserState.READING_PARAM_NAME) { + } else if (state == ParameterParserState.READING_PARAM_NAME) { params["param_${params.size + 1}"] = paramNameBuffer } - if (params.isEmpty() && command.startsWith("/start ")) { - params += "deepLink" to command.substringAfter("/start ") - command = "/start" - } - - return ParsedText(command = command, params = params) + return params } -private enum class ParserState { +private enum class CommandParserState { READING_COMMAND, MATCHING_IDENTIFIER, +} + +private enum class ParameterParserState { READING_PARAM_NAME, READING_PARAM_VALUE, } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/BotUtils.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/BotUtils.kt index e1238c3f7d..898a274d49 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/BotUtils.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/BotUtils.kt @@ -4,6 +4,7 @@ package eu.vendeli.tgbot.utils import eu.vendeli.tgbot.annotations.internal.InternalApi import eu.vendeli.tgbot.core.TgUpdateHandler +import eu.vendeli.tgbot.interfaces.ctx.ClassManager import eu.vendeli.tgbot.types.internal.ExceptionHandlingStrategy import eu.vendeli.tgbot.types.internal.FailedUpdate import eu.vendeli.tgbot.types.internal.ProcessedUpdate @@ -19,7 +20,14 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.plus import kotlin.reflect.KClass -internal suspend inline fun TgUpdateHandler.coHandle( +inline fun ClassManager.getInstance(vararg initParams: Any?): T? = + getInstance(T::class, *initParams) as? T + +@InternalApi +@Suppress("ObjectPropertyName", "ktlint:standard:backing-property-naming") +expect val _OperatingActivities: Map> + +internal inline fun TgUpdateHandler.coHandle( dispatcher: CoroutineDispatcher = Dispatchers.Default, crossinline block: suspend CoroutineScope.() -> Unit, ) = (handlerScope + Job(handlerScope.coroutineContext[Job])).launch(dispatcher) { block() } @@ -60,8 +68,4 @@ internal suspend inline fun asyncAction(crossinline block: suspend () -> T): @Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST") internal inline fun Any?.cast() = this as T -@InternalApi -@Suppress("ObjectPropertyName", "ktlint:standard:backing-property-naming") -expect val _OperatingActivities: Map> - internal expect val KClass<*>.fullName: String diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/FunctionalDSLUtils.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/FunctionalDSLUtils.kt new file mode 100644 index 0000000000..96f71f62e1 --- /dev/null +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/FunctionalDSLUtils.kt @@ -0,0 +1,210 @@ +package eu.vendeli.tgbot.utils + +import eu.vendeli.tgbot.core.FunctionalHandlingDsl +import eu.vendeli.tgbot.types.internal.ActivityCtx +import eu.vendeli.tgbot.types.internal.BusinessConnectionUpdate +import eu.vendeli.tgbot.types.internal.BusinessMessageUpdate +import eu.vendeli.tgbot.types.internal.CallbackQueryUpdate +import eu.vendeli.tgbot.types.internal.ChannelPostUpdate +import eu.vendeli.tgbot.types.internal.ChatBoostUpdate +import eu.vendeli.tgbot.types.internal.ChatJoinRequestUpdate +import eu.vendeli.tgbot.types.internal.ChatMemberUpdate +import eu.vendeli.tgbot.types.internal.ChosenInlineResultUpdate +import eu.vendeli.tgbot.types.internal.DeletedBusinessMessagesUpdate +import eu.vendeli.tgbot.types.internal.EditedBusinessMessageUpdate +import eu.vendeli.tgbot.types.internal.EditedChannelPostUpdate +import eu.vendeli.tgbot.types.internal.EditedMessageUpdate +import eu.vendeli.tgbot.types.internal.InlineQueryUpdate +import eu.vendeli.tgbot.types.internal.MessageReactionCountUpdate +import eu.vendeli.tgbot.types.internal.MessageReactionUpdate +import eu.vendeli.tgbot.types.internal.MessageUpdate +import eu.vendeli.tgbot.types.internal.MyChatMemberUpdate +import eu.vendeli.tgbot.types.internal.PollAnswerUpdate +import eu.vendeli.tgbot.types.internal.PollUpdate +import eu.vendeli.tgbot.types.internal.PreCheckoutQueryUpdate +import eu.vendeli.tgbot.types.internal.PurchasedPaidMediaUpdate +import eu.vendeli.tgbot.types.internal.RemovedChatBoostUpdate +import eu.vendeli.tgbot.types.internal.ShippingQueryUpdate +import eu.vendeli.tgbot.types.internal.UpdateType + +/** + * Action that is performed on the presence of Message in the Update. + */ +public fun FunctionalHandlingDsl.onMessage(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.MESSAGE] = block.cast() +} + +/** + * Action that is performed on the presence of EditedMessage in the Update. + */ +public + fun FunctionalHandlingDsl.onEditedMessage(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.EDIT_MESSAGE] = block.cast() +} + +/** + * Action that is performed on the presence of ChannelPost in the Update. + */ +public + fun FunctionalHandlingDsl.onChannelPost(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.CHANNEL_POST] = block.cast() +} + +/** + * Action that is performed on the presence of EditedChannelPost in the Update. + */ +public + fun FunctionalHandlingDsl.onEditedChannelPost(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.EDITED_CHANNEL_POST] = block.cast() +} + +/** + * Action that is performed on the presence of BusinessConnection in the Update. + */ +public + fun FunctionalHandlingDsl.onBusinessConnection(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.BUSINESS_CONNECTION] = block.cast() +} + +/** + * Action that is performed on the presence of BusinessMessage in the Update. + */ +public + fun FunctionalHandlingDsl.onBusinessMessage(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.BUSINESS_MESSAGE] = block.cast() +} + +/** + * Action that is performed on the presence of EditedBusinessMessage in the Update. + */ +public + fun FunctionalHandlingDsl.onEditedBusinessMessage(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.EDITED_BUSINESS_MESSAGE] = block.cast() +} + +/** + * Action that is performed on the presence of DeletedBusinessMessages in the Update. + */ +public + fun FunctionalHandlingDsl.onDeletedBusinessMessages(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.DELETED_BUSINESS_MESSAGES] = block.cast() +} + +/** + * Action that is performed on the presence of MessageReaction in the Update. + */ +public + fun FunctionalHandlingDsl.onMessageReaction(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.MESSAGE_REACTION] = block.cast() +} + +/** + * Action that is performed on the presence of MessageReactionCount in the Update. + */ +public + fun FunctionalHandlingDsl.onMessageReactionCount(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.MESSAGE_REACTION_COUNT] = block.cast() +} + +/** + * Action that is performed on the presence of InlineQuery in the Update. + */ +public + fun FunctionalHandlingDsl.onInlineQuery(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.INLINE_QUERY] = block.cast() +} + +/** + * Action that is performed on the presence of ChosenInlineResult in the Update. + */ +public + fun FunctionalHandlingDsl.onChosenInlineResult(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.CHOSEN_INLINE_RESULT] = block.cast() +} + +/** + * Action that is performed on the presence of CallbackQuery in the Update. + */ +public + fun FunctionalHandlingDsl.onCallbackQuery(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.CALLBACK_QUERY] = block.cast() +} + +/** + * Action that is performed on the presence of ShippingQuery in the Update. + */ +public + fun FunctionalHandlingDsl.onShippingQuery(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.SHIPPING_QUERY] = block.cast() +} + +/** + * Action that is performed on the presence of PreCheckoutQuery in the Update. + */ +public + fun FunctionalHandlingDsl.onPreCheckoutQuery(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.PRE_CHECKOUT_QUERY] = block.cast() +} + +/** + * Action that is performed on the presence of Poll in the Update. + */ +public fun FunctionalHandlingDsl.onPoll(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.POLL] = block.cast() +} + +/** + * Action that is performed on the presence of PollAnswer in the Update. + */ +public + fun FunctionalHandlingDsl.onPollAnswer(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.POLL_ANSWER] = block.cast() +} + +/** + * Action that is performed on the presence of MyChatMember in the Update. + */ +public + fun FunctionalHandlingDsl.onMyChatMember(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.MY_CHAT_MEMBER] = block.cast() +} + +/** + * Action that is performed on the presence of ChatMember in the Update. + */ +public + fun FunctionalHandlingDsl.onChatMember(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.CHAT_MEMBER] = block.cast() +} + +/** + * Action that is performed on the presence of ChatJoinRequest in the Update. + */ +public + fun FunctionalHandlingDsl.onChatJoinRequest(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.CHAT_JOIN_REQUEST] = block.cast() +} + +/** + * Action that is performed on the presence of ChatBoost in the Update. + */ +public + fun FunctionalHandlingDsl.onChatBoost(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.CHAT_BOOST] = block.cast() +} + +/** + * Action that is performed on the presence of RemovedChatBoost in the Update. + */ +public + fun FunctionalHandlingDsl.onRemovedChatBoost(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.REMOVED_CHAT_BOOST] = block.cast() +} + +/** + * Action that is performed on the presence of PurchasedPaidMedia in the Update. + */ +public + fun FunctionalHandlingDsl.onPurchasedPaidMedia(block: suspend ActivityCtx.() -> Unit) { + functionalActivities.onUpdateActivities[UpdateType.PURCHASED_PAID_MEDIA] = block.cast() +} diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ProcessUpdate.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ProcessUpdate.kt index 16786327dd..641ea2e1a6 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ProcessUpdate.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/ProcessUpdate.kt @@ -22,12 +22,14 @@ import eu.vendeli.tgbot.types.internal.MyChatMemberUpdate import eu.vendeli.tgbot.types.internal.PollAnswerUpdate import eu.vendeli.tgbot.types.internal.PollUpdate import eu.vendeli.tgbot.types.internal.PreCheckoutQueryUpdate +import eu.vendeli.tgbot.types.internal.ProcessedUpdate +import eu.vendeli.tgbot.types.internal.PurchasedPaidMediaUpdate import eu.vendeli.tgbot.types.internal.RemovedChatBoostUpdate import eu.vendeli.tgbot.types.internal.ShippingQueryUpdate @InternalApi @Suppress("CyclomaticComplexMethod") -fun Update.processUpdate() = when { +fun Update.processUpdate(): ProcessedUpdate = when { message != null -> MessageUpdate(updateId, this, message) editedMessage != null -> EditedMessageUpdate(updateId, this, editedMessage) channelPost != null -> ChannelPostUpdate(updateId, this, channelPost) @@ -50,5 +52,6 @@ fun Update.processUpdate() = when { businessMessage != null -> BusinessMessageUpdate(updateId, this, businessMessage) editedBusinessMessage != null -> EditedBusinessMessageUpdate(updateId, this, editedBusinessMessage) deletedBusinessMessages != null -> DeletedBusinessMessagesUpdate(updateId, this, deletedBusinessMessages) + purchasedPaidMedia != null -> PurchasedPaidMediaUpdate(updateId, this, purchasedPaidMedia) else -> throw IllegalArgumentException("Unknown type of update.") } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/TypeAliases.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/TypeAliases.kt index 0aa34e3190..4c852e78ad 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/TypeAliases.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/TypeAliases.kt @@ -31,6 +31,7 @@ import eu.vendeli.tgbot.types.internal.PollAnswerUpdate import eu.vendeli.tgbot.types.internal.PollUpdate import eu.vendeli.tgbot.types.internal.PreCheckoutQueryUpdate import eu.vendeli.tgbot.types.internal.ProcessedUpdate +import eu.vendeli.tgbot.types.internal.PurchasedPaidMediaUpdate import eu.vendeli.tgbot.types.internal.RemovedChatBoostUpdate import eu.vendeli.tgbot.types.internal.ShippingQueryUpdate import eu.vendeli.tgbot.types.internal.SingleInputChain @@ -62,6 +63,7 @@ typealias OnBusinessConnectionActivity = suspend ActivityCtx.() -> Unit typealias OnEditedBusinessMessageActivity = suspend ActivityCtx.() -> Unit typealias OnDeletedBusinessMessagesActivity = suspend ActivityCtx.() -> Unit +typealias OnPurchasedPaidMediaActivity = suspend ActivityCtx.() -> Unit typealias WhenNotHandledActivity = suspend ProcessedUpdate.() -> Unit typealias OnCommandActivity = suspend CommandContext.() -> Unit diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/UpdateHandlingExtensions.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/UpdateHandlingExtensions.kt index 0d51a986af..5c8532e509 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/UpdateHandlingExtensions.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/UpdateHandlingExtensions.kt @@ -1,14 +1,19 @@ package eu.vendeli.tgbot.utils import eu.vendeli.tgbot.TelegramBot +import eu.vendeli.tgbot.annotations.internal.InternalApi import eu.vendeli.tgbot.core.FunctionalHandlingDsl +import eu.vendeli.tgbot.core.TgUpdateHandler +import eu.vendeli.tgbot.implementations.DefaultArgParser import eu.vendeli.tgbot.implementations.DefaultFilter import eu.vendeli.tgbot.implementations.DefaultGuard +import eu.vendeli.tgbot.interfaces.helper.ArgumentParser import eu.vendeli.tgbot.interfaces.helper.Filter import eu.vendeli.tgbot.interfaces.helper.Guard import eu.vendeli.tgbot.types.User import eu.vendeli.tgbot.types.internal.ActivityCtx import eu.vendeli.tgbot.types.internal.CommandContext +import eu.vendeli.tgbot.types.internal.ParsedText import eu.vendeli.tgbot.types.internal.ProcessedUpdate import eu.vendeli.tgbot.types.internal.SingleInputChain import eu.vendeli.tgbot.types.internal.UpdateType @@ -33,9 +38,15 @@ internal suspend inline fun KClass.checkIsGuarded( return bot.config.classManager .getInstance(this) .cast() - .condition(user, update, bot) + .checkIsGuarded(user, update, bot) } +internal suspend inline fun Guard.checkIsGuarded( + user: User?, + update: ProcessedUpdate, + bot: TelegramBot, +): Boolean = condition(user, update, bot) + internal suspend inline fun KClass.checkIsFiltered( user: User?, update: ProcessedUpdate, @@ -45,9 +56,35 @@ internal suspend inline fun KClass.checkIsFiltered( return bot.config.classManager .getInstance(this) .cast() - .match(user, update, bot) + .checkIsFiltered(user, update, bot) } +internal suspend inline fun Filter.checkIsFiltered( + user: User?, + update: ProcessedUpdate, + bot: TelegramBot, +): Boolean = match(user, update, bot) + +@OptIn(InternalApi::class) +@Suppress("NOTHING_TO_INLINE") +internal fun TgUpdateHandler.getParameters( + parser: KClass?, + request: ParsedText, +): Map = parser + ?.let { + if (it.fullName == DefaultArgParser::class.fullName) bot.config.commandParsing.run { + defaultArgParser( + request.tail, + parametersDelimiter, + parameterValueDelimiter, + ) + } + else bot.config.classManager + .getInstance(it) + .cast() + .parse(request.tail) + } ?: emptyMap() + /** * Method that tries to find activity in given text and invoke it. * @@ -56,10 +93,9 @@ internal suspend inline fun KClass.checkIsFiltered( @Suppress("CyclomaticComplexMethod", "NestedBlockDepth", "ReturnCount") private suspend fun FunctionalHandlingDsl.checkMessageForActivities(update: ProcessedUpdate): Boolean = update.run { // parse text to chosen format - val parsedText = text.let { bot.update.parseCommand(it) } + val parsedText = bot.update.parseCommand(text) logger.debug { "Parsed text - $text to $parsedText" } val user = userOrNull - val cmdCtx = CommandContext(update, parsedText.params) // find activity that matches command and invoke it functionalActivities.commands[parsedText.command to type]?.run { @@ -73,6 +109,7 @@ private suspend fun FunctionalHandlingDsl.checkMessageForActivities(update: Proc // check for limit exceed if (bot.update.checkIsLimited(rateLimits, user?.id, parsedText.command)) return false logger.info { "Invoking command $id" } + val cmdCtx = CommandContext(update, bot.update.getParameters(argParser, parsedText)) invocation.invoke(cmdCtx) return true } @@ -129,6 +166,7 @@ private suspend fun FunctionalHandlingDsl.checkMessageForActivities(update: Proc // check for limit exceed if (bot.update.checkIsLimited(rateLimits, user?.id, parsedText.command)) return false logger.info { "Invoking command $id" } + val cmdCtx = CommandContext(update, bot.update.getParameters(argParser, parsedText)) invocation.invoke(cmdCtx) return true } diff --git a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/builders/EntitiesBuilder.kt b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/builders/EntitiesBuilder.kt index 147b4790ab..82332e3643 100644 --- a/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/builders/EntitiesBuilder.kt +++ b/telegram-bot/src/commonMain/kotlin/eu/vendeli/tgbot/utils/builders/EntitiesBuilder.kt @@ -1,8 +1,8 @@ package eu.vendeli.tgbot.utils.builders +import eu.vendeli.tgbot.types.User import eu.vendeli.tgbot.types.msg.EntityType import eu.vendeli.tgbot.types.msg.MessageEntity -import eu.vendeli.tgbot.types.User /** * Entities builder which is used in EntitiesFeature @@ -17,7 +17,7 @@ class EntitiesBuilder { * @property user User Optional. For “text_mention” only, the mentioned user * @property language String Optional. For “pre” only, the programming language of the entity text */ - data class EntityData internal constructor( + class EntityData internal constructor( var url: String? = null, var user: User? = null, var language: String? = null, diff --git a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/FunctionalHandlingTest.kt b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/FunctionalHandlingTest.kt index da0cac6a59..d20f292a7b 100644 --- a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/FunctionalHandlingTest.kt +++ b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/FunctionalHandlingTest.kt @@ -12,6 +12,29 @@ import eu.vendeli.tgbot.types.internal.UpdateType import eu.vendeli.tgbot.types.internal.configuration.RateLimits import eu.vendeli.tgbot.types.internal.userOrNull import eu.vendeli.tgbot.types.msg.Message +import eu.vendeli.tgbot.utils.onBusinessConnection +import eu.vendeli.tgbot.utils.onBusinessMessage +import eu.vendeli.tgbot.utils.onCallbackQuery +import eu.vendeli.tgbot.utils.onChannelPost +import eu.vendeli.tgbot.utils.onChatBoost +import eu.vendeli.tgbot.utils.onChatJoinRequest +import eu.vendeli.tgbot.utils.onChatMember +import eu.vendeli.tgbot.utils.onChosenInlineResult +import eu.vendeli.tgbot.utils.onDeletedBusinessMessages +import eu.vendeli.tgbot.utils.onEditedBusinessMessage +import eu.vendeli.tgbot.utils.onEditedChannelPost +import eu.vendeli.tgbot.utils.onEditedMessage +import eu.vendeli.tgbot.utils.onInlineQuery +import eu.vendeli.tgbot.utils.onMessage +import eu.vendeli.tgbot.utils.onMessageReaction +import eu.vendeli.tgbot.utils.onMessageReactionCount +import eu.vendeli.tgbot.utils.onMyChatMember +import eu.vendeli.tgbot.utils.onPoll +import eu.vendeli.tgbot.utils.onPollAnswer +import eu.vendeli.tgbot.utils.onPreCheckoutQuery +import eu.vendeli.tgbot.utils.onPurchasedPaidMedia +import eu.vendeli.tgbot.utils.onRemovedChatBoost +import eu.vendeli.tgbot.utils.onShippingQuery import eu.vendeli.tgbot.utils.processUpdate import eu.vendeli.utils.MockUpdate import io.kotest.assertions.throwables.shouldNotThrowAny @@ -200,6 +223,7 @@ class FunctionalHandlingTest : BotTestContext(true, true) { onBusinessMessage { onUpdateInvocationsCount++ } onEditedBusinessMessage { onUpdateInvocationsCount++ } onDeletedBusinessMessages { onUpdateInvocationsCount++ } + onPurchasedPaidMedia { onUpdateInvocationsCount++ } } UpdateType.entries.forEach { diff --git a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/RateLimitingTest.kt b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/RateLimitingTest.kt index db687946fb..36393937e9 100644 --- a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/RateLimitingTest.kt +++ b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/RateLimitingTest.kt @@ -5,6 +5,7 @@ import eu.vendeli.tgbot.annotations.internal.ExperimentalFeature import eu.vendeli.tgbot.implementations.TokenBucketLimiterImpl import eu.vendeli.tgbot.types.internal.LogLvl import eu.vendeli.tgbot.types.internal.configuration.RateLimits +import eu.vendeli.tgbot.utils.onMessage import io.kotest.core.spec.IsolationMode import io.kotest.matchers.shouldBe import java.util.concurrent.atomic.AtomicInteger diff --git a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/TelegramUpdateHandlerTest.kt b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/TelegramUpdateHandlerTest.kt index 4c3e1cac2e..7f3eb3e9a0 100644 --- a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/TelegramUpdateHandlerTest.kt +++ b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/TelegramUpdateHandlerTest.kt @@ -2,14 +2,18 @@ package eu.vendeli import BotTestContext import eu.vendeli.tgbot.annotations.internal.InternalApi +import eu.vendeli.tgbot.implementations.DefaultArgParser import eu.vendeli.tgbot.types.Update import eu.vendeli.tgbot.types.chat.Chat import eu.vendeli.tgbot.types.chat.ChatType import eu.vendeli.tgbot.types.internal.MessageUpdate import eu.vendeli.tgbot.types.internal.ProcessedUpdate import eu.vendeli.tgbot.types.internal.Response +import eu.vendeli.tgbot.types.internal.configuration.CommandParsingConfiguration import eu.vendeli.tgbot.types.media.Document import eu.vendeli.tgbot.types.msg.Message +import eu.vendeli.tgbot.utils.getParameters +import eu.vendeli.tgbot.utils.onMessage import eu.vendeli.tgbot.utils.parseCommand import eu.vendeli.tgbot.utils.processUpdate import eu.vendeli.tgbot.utils.serde @@ -18,7 +22,6 @@ import io.kotest.assertions.throwables.shouldNotThrowAny import io.kotest.common.ExperimentalKotest import io.kotest.core.spec.IsolationMode import io.kotest.matchers.booleans.shouldBeTrue -import io.kotest.matchers.maps.shouldBeEmpty import io.kotest.matchers.maps.shouldContainExactly import io.kotest.matchers.nulls.shouldBeNull import io.kotest.matchers.nulls.shouldNotBeNull @@ -128,24 +131,26 @@ class TelegramUpdateHandlerTest : BotTestContext() { @Test fun `valid command parsing`() { - bot.config.apply { - commandParsing.restrictSpacesInCommands = true - } - val deeplinkParse = bot.update.parseCommand("/start deeplinkcode") - deeplinkParse.command shouldBe "/start" - deeplinkParse.params shouldContainExactly (mapOf("param_1" to "deeplinkcode")) - val commandParseWithNoParams = bot.update.parseCommand("/command") + val commandParseWithNoParamsParams = bot.update.getParameters(DefaultArgParser::class, commandParseWithNoParams) commandParseWithNoParams.command shouldBe "/command" - commandParseWithNoParams.params.size shouldBe 0 + commandParseWithNoParamsParams.size shouldBe 0 - val commandParseWithOneEmptyParam = bot.update.parseCommand("/command?") + val commandParseWithOneEmptyParam = bot.update.parseCommand("/command? ") + val commandParseWithOneEmptyParamParams = bot.update.getParameters( + DefaultArgParser::class, + commandParseWithOneEmptyParam, + ) commandParseWithOneEmptyParam.command shouldBe "/command" - commandParseWithOneEmptyParam.params shouldContainExactly (mapOf("param_1" to "")) + commandParseWithOneEmptyParamParams shouldContainExactly mapOf("param_1" to " ") val commandParseWithMixedParams = bot.update.parseCommand("command?p1=v1&v2&p3=&p4=v4&p5=") + val commandParseWithMixedParamsParams = bot.update.getParameters( + DefaultArgParser::class, + commandParseWithMixedParams, + ) commandParseWithMixedParams.command shouldBe "command" - commandParseWithMixedParams.params shouldContainExactly mapOf( + commandParseWithMixedParamsParams shouldContainExactly mapOf( "p1" to "v1", "param_2" to "v2", "p3" to "", @@ -154,16 +159,31 @@ class TelegramUpdateHandlerTest : BotTestContext() { ) val commandParseForLastFullPair = bot.update.parseCommand("last_pair_command?v1&p2=v2") + val commandParseForLastFullPairParams = bot.update.getParameters( + DefaultArgParser::class, + commandParseForLastFullPair, + ) commandParseForLastFullPair.command shouldBe "last_pair_command" - commandParseForLastFullPair.params shouldContainExactly (mapOf("param_1" to "v1", "p2" to "v2")) + commandParseForLastFullPairParams shouldContainExactly (mapOf("param_1" to "v1", "p2" to "v2")) bot.config.commandParsing.apply { commandDelimiter = '_' } val underscoreCommand = bot.update.parseCommand("/test_123") + val underscoreCommandParams = bot.update.getParameters(DefaultArgParser::class, underscoreCommand) underscoreCommand.command shouldBe "/test" - underscoreCommand.params shouldContainExactly (mapOf("param_1" to "123")) + underscoreCommandParams shouldContainExactly (mapOf("param_1" to "123")) + + // deeplink checks + + bot.config.apply { + commandParsing.restrictSpacesInCommands = true + } + val deeplinkParse = bot.update.parseCommand("/start deeplinkcode") + val deeplinkParams = bot.update.getParameters(DefaultArgParser::class, deeplinkParse) + deeplinkParse.command shouldBe "/start" + deeplinkParams shouldContainExactly (mapOf("param_1" to "deeplinkcode")) bot.config.commandParsing.apply { commandDelimiter = ' ' @@ -172,20 +192,30 @@ class TelegramUpdateHandlerTest : BotTestContext() { restrictSpacesInCommands = false } val deeplinkCheck = bot.update.parseCommand("/start bafefdf0-64cb-47da-97f0-4a1f11d469a2") + val deeplinkCheckParams = bot.update.getParameters(DefaultArgParser::class, deeplinkCheck) deeplinkCheck.command shouldBe "/start" - deeplinkCheck.params shouldContainExactly (mapOf("param_1" to "bafefdf0-64cb-47da-97f0-4a1f11d469a2")) + deeplinkCheckParams shouldContainExactly (mapOf("param_1" to "bafefdf0-64cb-47da-97f0-4a1f11d469a2")) + + bot.config.commandParsing = CommandParsingConfiguration() + val defaultDeeplinkCheck = bot.update.parseCommand("/start default") + val defaultDeeplinkCheckParams = bot.update.getParameters(DefaultArgParser::class, defaultDeeplinkCheck) + defaultDeeplinkCheck.command shouldBe "/start" + defaultDeeplinkCheckParams shouldContainExactly (mapOf("param_1" to "default")) } @Test suspend fun `deeplink test`() { doMockHttp(MockUpdate.SINGLE("/start test")) + var commandReached = false bot.handleUpdates { onCommand("/start") { - parameters shouldContainExactly mapOf("deepLink" to "test") + commandReached = true + parameters shouldContainExactly mapOf("param_1" to "test") } bot.update.stopListener() } + commandReached shouldBe true } @Test @@ -195,20 +225,18 @@ class TelegramUpdateHandlerTest : BotTestContext() { bot.update.parseCommand(text).run { command shouldBe "/test" - params.size shouldBe 1 - params.entries.first().toPair() shouldBe Pair("param_1", "param1") + tail shouldBe "param1" } bot.update.parseCommand("/test@KtGram1?param1").run { command shouldBe "/test@KtGram1?param1" - params.shouldBeEmpty() + tail shouldBe "" } bot.config.commandParsing.useIdentifierInGroupCommands = false bot.update.parseCommand("/test@KtGram1?param1").run { command shouldBe "/test" - params.size shouldBe 1 - params.entries.first().toPair() shouldBe Pair("param_1", "param1") + tail shouldBe "param1" } } diff --git a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/api/botactions/SetMyActionsTest.kt b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/api/botactions/SetMyActionsTest.kt index 755bd07181..550bcf5031 100644 --- a/telegram-bot/src/jvmTest/kotlin/eu/vendeli/api/botactions/SetMyActionsTest.kt +++ b/telegram-bot/src/jvmTest/kotlin/eu/vendeli/api/botactions/SetMyActionsTest.kt @@ -37,6 +37,10 @@ class SetMyActionsTest : BotTestContext() { canEditMessages = false, canPinMessages = false, canManageTopics = false, + canManageVideoChats = false, + canPostStories = false, + canEditStories = false, + canDeleteStories = false, ), ).send(bot) @@ -59,6 +63,10 @@ class SetMyActionsTest : BotTestContext() { canEditMessages = false, canPinMessages = false, canManageTopics = false, + canPostStories = false, + canEditStories = false, + canDeleteStories = false, + canManageVideoChats = false, ), ).send(bot) } diff --git a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/button/BottomButton.kt b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/button/BottomButton.kt new file mode 100644 index 0000000000..cf5ef8aca3 --- /dev/null +++ b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/button/BottomButton.kt @@ -0,0 +1,56 @@ +package eu.vendeli.webapps.button + +import kotlin.js.Json + +@Suppress("EnumEntryName") +enum class BottomButtonType { + main, secondary +} + +external class BottomButton { + val type: BottomButtonType + val text: String + fun setText(text: String): BottomButton + + var color: String + var textColor: String + + var hasShineEffect: Boolean + + val isVisible: Boolean + fun show(): BottomButton + fun hide(): BottomButton + + val isActive: Boolean + fun enable(): BottomButton + fun disable(): BottomButton + + val isProgressVisible: Boolean + fun showProgress(leaveActive: Boolean = definedExternally): BottomButton + fun hideProgress(): BottomButton + + fun onClick(eventHandler: () -> Unit): BottomButton + fun offClick(eventHandler: () -> Unit): BottomButton + + internal fun setParams(params: Json): BottomButton +} + +class MainButtonParams( + var text: String? = null, + var color: String? = null, + @JsName("text_color") + var textColor: String? = null, + @JsName("has_shine_effect") + var hasShineEffect: Boolean? = null, + @JsName("is_active") + var isActive: Boolean? = null, + @JsName("is_visible") + var isVisible: Boolean? = null, +) + +fun BottomButton.setParams(block: MainButtonParams.() -> Unit): BottomButton = MainButtonParams().apply(block).let { + @Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") + this.setParams(it.asDynamic() as Json) +} + + diff --git a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/button/MainButton.kt b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/button/MainButton.kt deleted file mode 100644 index a1bf581920..0000000000 --- a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/button/MainButton.kt +++ /dev/null @@ -1,46 +0,0 @@ -package eu.vendeli.webapps.button - -import kotlin.js.Json - -external class MainButton { - val text: String - fun setText(text: String): MainButton - - var color: String - var textColor: String - - val isVisible: Boolean - fun show(): MainButton - fun hide(): MainButton - - val isActive: Boolean - fun enable(): MainButton - fun disable(): MainButton - - val isProgressVisible: Boolean - fun showProgress(leaveActive: Boolean = definedExternally): MainButton - fun hideProgress(): MainButton - - fun onClick(eventHandler: () -> Unit): MainButton - fun offClick(eventHandler: () -> Unit): MainButton - - internal fun setParams(params: Json): MainButton -} - -class MainButtonParams( - var text: String? = null, - var color: String? = null, - @JsName("text_color") - var textColor: String? = null, - @JsName("is_active") - var isActive: Boolean? = null, - @JsName("is_visible") - var isVisible: Boolean? = null, -) - -fun MainButton.setParams(block: MainButtonParams.() -> Unit): MainButton = MainButtonParams().apply(block).let { - @Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") - this.setParams(it.asDynamic() as Json) -} - - diff --git a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/EventType.kt b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/EventType.kt index 9539fd6436..0b9f69c56e 100644 --- a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/EventType.kt +++ b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/EventType.kt @@ -4,6 +4,7 @@ sealed class EventType(val name: String) { data object ThemeChanged : EventType("themeChanged") data object ViewportChanged : EventType("viewportChanged") data object MainButtonClicked : EventType("mainButtonClicked") + data object SecondaryButtonClicked : EventType("secondaryButtonClicked") data object BackButtonClicked : EventType("backButtonClicked") data object SettingsButtonClicked : EventType("settingsButtonClicked") data object InvoiceClosed : EventType("invoiceClosed") diff --git a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/WebApp.kt b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/WebApp.kt index 0d9d6bb0c0..c48d1f089d 100644 --- a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/WebApp.kt +++ b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/core/WebApp.kt @@ -1,7 +1,7 @@ package eu.vendeli.webapps.core import eu.vendeli.webapps.button.BackButton -import eu.vendeli.webapps.button.MainButton +import eu.vendeli.webapps.button.BottomButton import eu.vendeli.webapps.button.SettingsButton import eu.vendeli.webapps.haptic.HapticFeedback import eu.vendeli.webapps.invoice.InvoiceClosedInfo @@ -21,8 +21,9 @@ external class WebApp { val platform: String val initData: String val initDataUnsafe: WebAppInitData - val headerColor: String? - val backgroundColor: String? + val headerColor: String + val backgroundColor: String + val bottomBarColor: String val colorScheme: String val themeParams: ThemeParams val isExpanded: Boolean @@ -33,6 +34,7 @@ external class WebApp { fun setHeaderColor(color: String) fun setBackgroundColor(color: String) + fun setBottomBarColor(color: String) fun enableClosingConfirmation() fun disableClosingConfirmation() fun enableVerticalSwipes() @@ -47,7 +49,10 @@ external class WebApp { fun shareToStory(mediaUrl: String, params: StoryShareParams? = definedExternally) @JsName("MainButton") - val mainButton: MainButton + val mainButton: BottomButton + + @JsName("SecondaryButton") + val secondaryButton: BottomButton @JsName("BackButton") val backButton: BackButton diff --git a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/ui/ThemeParams.kt b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/ui/ThemeParams.kt index 3ceee860f9..9b17babac9 100644 --- a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/ui/ThemeParams.kt +++ b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/ui/ThemeParams.kt @@ -25,6 +25,9 @@ external interface ThemeParams { @JsName("header_bg_color") val headerBgColor: String? + @JsName("bottom_bar_bg_color") + val bottomBarBgColor: String? + @JsName("accent_text_color") val accentTextColor: String? diff --git a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/EventHandlerExtUtils.kt b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/EventHandlerExtUtils.kt index 12a82f0e4d..b0d60edddb 100644 --- a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/EventHandlerExtUtils.kt +++ b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/EventHandlerExtUtils.kt @@ -9,6 +9,9 @@ fun WebApp.onThemeChanged(eventHandler: NoParamsEventHandler) = fun WebApp.onMainButtonClicked(eventHandler: NoParamsEventHandler) = onEvent(EventType.MainButtonClicked, EventHandler.NoParams(eventHandler)) +fun WebApp.onSecondaryButtonClicked(eventHandler: NoParamsEventHandler) = + onEvent(EventType.SecondaryButtonClicked, EventHandler.NoParams(eventHandler)) + fun WebApp.onViewportChanged(eventHandler: ViewportChangedEventHandler) = onEvent(EventType.ViewportChanged, EventHandler.ViewportChanged(eventHandler)) diff --git a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/WebAppExtUtils.kt b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/WebAppExtUtils.kt index e87f7b38df..68c3952c96 100644 --- a/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/WebAppExtUtils.kt +++ b/webapps/src/jsMain/kotlin/eu/vendeli/webapps/utils/WebAppExtUtils.kt @@ -22,52 +22,56 @@ sealed interface EventHandler { value class NoParams(override val block: NoParamsEventHandler) : EventHandler } -fun WebApp.onEvent(type: EventType.ViewportChanged, eventHandler: EventHandler.ViewportChanged) { +internal inline fun WebApp.onEvent(type: EventType.ViewportChanged, eventHandler: EventHandler.ViewportChanged) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.InvoiceClosed, eventHandler: EventHandler.InvoiceClosed) { +internal inline fun WebApp.onEvent(type: EventType.InvoiceClosed, eventHandler: EventHandler.InvoiceClosed) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.PopupClosed, eventHandler: EventHandler.PopupClosed) { +internal inline fun WebApp.onEvent(type: EventType.PopupClosed, eventHandler: EventHandler.PopupClosed) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.QRTextReceived, eventHandler: EventHandler.QRTextReceived) { +internal inline fun WebApp.onEvent(type: EventType.QRTextReceived, eventHandler: EventHandler.QRTextReceived) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.ClipboardTextReceived, eventHandler: EventHandler.ClipboardTextReceived) { +internal inline fun WebApp.onEvent(type: EventType.ClipboardTextReceived, eventHandler: EventHandler.ClipboardTextReceived) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.WriteAccessRequested, eventHandler: EventHandler.WriteAccessRequested) { +internal inline fun WebApp.onEvent(type: EventType.WriteAccessRequested, eventHandler: EventHandler.WriteAccessRequested) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.ContactRequested, eventHandler: EventHandler.ContactRequested) { +internal inline fun WebApp.onEvent(type: EventType.ContactRequested, eventHandler: EventHandler.ContactRequested) { onEvent(type.name, eventHandler.block) } // no param events -fun WebApp.onEvent(type: EventType.ThemeChanged, eventHandler: EventHandler.NoParams) { +internal inline fun WebApp.onEvent(type: EventType.ThemeChanged, eventHandler: EventHandler.NoParams) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.MainButtonClicked, eventHandler: EventHandler.NoParams) { +internal inline fun WebApp.onEvent(type: EventType.MainButtonClicked, eventHandler: EventHandler.NoParams) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.BackButtonClicked, eventHandler: EventHandler.NoParams) { +internal inline fun WebApp.onEvent(type: EventType.SecondaryButtonClicked, eventHandler: EventHandler.NoParams) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.SettingsButtonClicked, eventHandler: EventHandler.NoParams) { +internal inline fun WebApp.onEvent(type: EventType.BackButtonClicked, eventHandler: EventHandler.NoParams) { onEvent(type.name, eventHandler.block) } -fun WebApp.onEvent(type: EventType.ScanQrPopupClosed, eventHandler: EventHandler.NoParams) { +internal inline fun WebApp.onEvent(type: EventType.SettingsButtonClicked, eventHandler: EventHandler.NoParams) { + onEvent(type.name, eventHandler.block) +} + +internal inline fun WebApp.onEvent(type: EventType.ScanQrPopupClosed, eventHandler: EventHandler.NoParams) { onEvent(type.name, eventHandler.block) } @@ -110,6 +114,6 @@ var WebApp.requireClosingConfirmation } } -fun WebApp.toggleClosingConfirmation() { +internal inline fun WebApp.toggleClosingConfirmation() { requireClosingConfirmation = !requireClosingConfirmation }