21 Commits

Author SHA1 Message Date
72aece1cf4 fix of Message hierarchy 2026-04-30 11:23:10 +06:00
7c6e8ac655 fix messages hierarchy showing 2026-04-29 20:59:17 +06:00
446c6d7516 add updates section 2026-04-29 20:59:17 +06:00
b64117f829 Update index.md 2026-04-25 12:33:36 +06:00
527ad3f14d update docs to put sample in the end of list 2026-02-10 16:55:44 +06:00
c95f3251bb update dependnecies and add graph of microutils repo 2025-08-18 11:18:56 +06:00
7e886d5e65 Update index.md 2025-08-06 17:47:28 +06:00
a6097e6784 update dependencies 2025-06-30 14:02:57 +06:00
ec5bcaf058 update ktgbotapi index.md 2025-06-30 14:01:28 +06:00
2c97740abb Update index.md 2025-06-25 16:27:40 +06:00
a2798c3b2e update info about support telegram bot api 2025-02-15 20:57:47 +06:00
34abb664b9 Update index.md 2025-01-03 10:47:29 +06:00
1149abc79f Add sample link for navigation 2024-12-26 08:48:47 +06:00
faa3573546 Update index.md 2024-11-02 00:02:30 +06:00
6e7cf1cb0e small docs actualization 2024-09-23 00:47:59 +06:00
c7e552ebb5 update dependencies 2024-09-23 00:23:42 +06:00
329a9ba310 update info in tgbotapi supported telegram bot api 2024-08-26 08:31:45 +06:00
c74bafb4a3 update dependencies 2024-08-26 08:29:36 +06:00
256226044f Merge pull request #6 from InsanusMokrassar/renovate/configure
Configure Renovate
2024-08-26 08:11:54 +06:00
renovate[bot]
1b02e8a7e4 Add renovate.json 2024-08-26 02:11:20 +00:00
7b0a171bd3 Update supported version of tg bot api 2024-06-27 07:26:53 +06:00
11 changed files with 697 additions and 400 deletions

View File

@@ -1,4 +1,6 @@
# Colors [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/micro_utils.colors.common/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/micro_utils.colors.common)
# Colors
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/micro_utils.colors.common/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/micro_utils.colors.common)
* `Group`: `dev.inmo`
* `ArtifactId`: `micro_utils.colors.common`

View File

@@ -17,3 +17,183 @@ First of all, this library collection is oriented to use next technologies:
> Me and the users of this library will try hard to keep its docs as actual as possible, but in case
> you will find some inconsistency of docs and library work (signatures, behaviour, API) you may write
> me directly in my [telegram](https://t.me/InsanusMokrassar)
```mermaid
flowchart LR
%% Project Build & Infrastructure
subgraph "Project Build & Infrastructure"
gradleWrapper("Gradle Wrapper & Plugins"):::buildInfra
CI("CI Workflows"):::buildInfra
templates("Gradle Templates"):::buildInfra
end
%% Core Utility Layer
subgraph "Core Utility Layer"
common("common"):::core
colors("colors"):::core
safe_wrapper("safe_wrapper"):::core
resources("resources"):::core
end
%% Feature-Specific Modules
subgraph "Feature-Specific Modules"
crypto("crypto"):::feature
mime_types("mime_types"):::feature
language_codes("language_codes"):::feature
matrix("matrix"):::feature
selector("selector"):::feature
transactions("transactions"):::feature
end
%% Asynchronous Helpers
subgraph "Asynchronous Helpers"
coroutines("coroutines"):::async
compose("coroutines/compose"):::async
end
%% Serialization Helpers
subgraph "Serialization Helpers"
base64("serialization/base64"):::serialization
encapsulator("serialization/encapsulator"):::serialization
mapper("serialization/mapper"):::serialization
typed_serializer("serialization/typed_serializer"):::serialization
end
%% Repository Abstractions
subgraph "Repository Abstractions"
repos_common("repos/common (API)"):::repos
repos_inmemory("repos/inmemory"):::repos
repos_cache("repos/cache"):::repos
repos_exposed("repos/exposed"):::repos
repos_ktor_client("repos/ktor/client"):::repos
repos_ktor_common("repos/ktor/common"):::repos
repos_ktor_server("repos/ktor/server"):::repos
end
%% Ktor Extensions
subgraph "Ktor Extensions"
ktor_common("ktor/common"):::ktor
ktor_client("ktor/client"):::ktor
ktor_server("ktor/server"):::ktor
end
%% Dependency Injection (Koin)
subgraph "Dependency Injection (Koin)"
koin_api("koin/src"):::di
koin_generator("koin/generator"):::di
end
%% KSP Code-Generation Modules
subgraph "KSP Code-Generation Modules"
ksp_classcasts("ksp/classcasts"):::ksp
ksp_sealed("ksp/sealed"):::ksp
ksp_variations("ksp/variations"):::ksp
ksp_generator("ksp/generator"):::ksp
end
%% Android UI Wrappers
subgraph "Android UI Wrappers"
alerts("android/alerts"):::android
pickers("android/pickers"):::android
recyclerview("android/recyclerview"):::android
smalltextfield("android/smalltextfield"):::android
end
%% Startup Plugins & Templates
subgraph "Startup Plugins & Templates"
startup_plugin("startup/plugin"):::startup
startup_launcher("startup/launcher"):::startup
startup_template("startup/template"):::startup
end
%% Dependencies Arrows
common -->|feeds into| crypto
common -->|feeds into| mime_types
common -->|feeds into| language_codes
common -->|feeds into| matrix
common -->|feeds into| selector
common -->|feeds into| transactions
common -->|feeds into| coroutines
coroutines -->|extends| compose
common -->|feeds into| base64
common -->|feeds into| encapsulator
common -->|feeds into| mapper
common -->|feeds into| typed_serializer
common -->|feeds into| repos_common
repos_common -->|implemented by| repos_inmemory
repos_common -->|implemented by| repos_cache
repos_common -->|implemented by| repos_exposed
repos_common -->|implemented by| repos_ktor_client
repos_common -->|implemented by| repos_ktor_common
repos_common -->|implemented by| repos_ktor_server
ktor_common -->|used by| ktor_client
ktor_common -->|used by| ktor_server
ksp_generator -->|used by| koin_generator
ksp_generator -->|used by| ksp_classcasts
ksp_generator -->|used by| ksp_sealed
ksp_generator -->|used by| ksp_variations
common -->|feeds into| alerts
common -->|feeds into| pickers
common -->|feeds into| recyclerview
common -->|feeds into| smalltextfield
%% Click Events
click templates "https://github.com/insanusmokrassar/microutils/tree/master/gradle/templates/"
click common "https://github.com/insanusmokrassar/microutils/tree/master/common/"
click colors "https://github.com/insanusmokrassar/microutils/tree/master/colors/"
click safe_wrapper "https://github.com/insanusmokrassar/microutils/tree/master/safe_wrapper/"
click resources "https://github.com/insanusmokrassar/microutils/tree/master/resources/"
click crypto "https://github.com/insanusmokrassar/microutils/tree/master/crypto/"
click mime_types "https://github.com/insanusmokrassar/microutils/tree/master/mime_types/"
click language_codes "https://github.com/insanusmokrassar/microutils/tree/master/language_codes/"
click matrix "https://github.com/insanusmokrassar/microutils/tree/master/matrix/"
click selector "https://github.com/insanusmokrassar/microutils/tree/master/selector/"
click transactions "https://github.com/insanusmokrassar/microutils/tree/master/transactions/"
click coroutines "https://github.com/insanusmokrassar/microutils/tree/master/coroutines/"
click compose "https://github.com/insanusmokrassar/microutils/tree/master/coroutines/compose/"
click base64 "https://github.com/insanusmokrassar/microutils/tree/master/serialization/base64/"
click encapsulator "https://github.com/insanusmokrassar/microutils/tree/master/serialization/encapsulator/"
click mapper "https://github.com/insanusmokrassar/microutils/tree/master/serialization/mapper/"
click typed_serializer "https://github.com/insanusmokrassar/microutils/tree/master/serialization/typed_serializer/"
click repos_common "https://github.com/insanusmokrassar/microutils/tree/master/repos/common/"
click repos_inmemory "https://github.com/insanusmokrassar/microutils/tree/master/repos/inmemory/"
click repos_cache "https://github.com/insanusmokrassar/microutils/tree/master/repos/cache/"
click repos_exposed "https://github.com/insanusmokrassar/microutils/tree/master/repos/exposed/"
click repos_ktor_client "https://github.com/insanusmokrassar/microutils/tree/master/repos/ktor/client/"
click repos_ktor_common "https://github.com/insanusmokrassar/microutils/tree/master/repos/ktor/common/"
click repos_ktor_server "https://github.com/insanusmokrassar/microutils/tree/master/repos/ktor/server/"
click koin_api "https://github.com/insanusmokrassar/microutils/tree/master/koin/src/"
click koin_generator "https://github.com/insanusmokrassar/microutils/tree/master/koin/generator/"
click ksp_classcasts "https://github.com/insanusmokrassar/microutils/tree/master/ksp/classcasts/"
click ksp_sealed "https://github.com/insanusmokrassar/microutils/tree/master/ksp/sealed/"
click ksp_variations "https://github.com/insanusmokrassar/microutils/tree/master/ksp/variations/"
click ksp_generator "https://github.com/insanusmokrassar/microutils/tree/master/ksp/generator/"
click alerts "https://github.com/insanusmokrassar/microutils/tree/master/android/alerts/"
click pickers "https://github.com/insanusmokrassar/microutils/tree/master/android/pickers/"
click recyclerview "https://github.com/insanusmokrassar/microutils/tree/master/android/recyclerview/"
click smalltextfield "https://github.com/insanusmokrassar/microutils/tree/master/android/smalltextfield/"
click startup_plugin "https://github.com/insanusmokrassar/microutils/tree/master/startup/plugin/"
click startup_launcher "https://github.com/insanusmokrassar/microutils/tree/master/startup/launcher/"
click startup_template "https://github.com/insanusmokrassar/microutils/tree/master/startup/template/"
%% Styles
%% classDef buildInfra fill:#eee,stroke:#666,stroke-width:1px;
%% classDef core fill:#cce5ff,stroke:#004085,stroke-width:1px;
%% classDef feature fill:#e2e3e5,stroke:#636f83,stroke-width:1px;
%% classDef async fill:#d1ecf1,stroke:#0c5460,stroke-width:1px;
%% classDef serialization fill:#fff3cd,stroke:#856404,stroke-width:1px;
%% classDef repos fill:#d4edda,stroke:#155724,stroke-width:1px;
%% classDef ktor fill:#ffe5b4,stroke:#ff8c00,stroke-width:1px;
%% classDef di fill:#f5c6cb,stroke:#721c24,stroke-width:1px;
%% classDef ksp fill:#f8d7da,stroke:#721c24,stroke-width:1px;
%% classDef android fill:#e2e7ec,stroke:#1f2a36,stroke-width:1px;
%% classDef startup fill:#f0f3bd,stroke:#a2a04f,stroke-width:1px;
```
Generated with [gitdiagram](https://gitdiagram.com/insanusmokrassar/microutils) and edited then

View File

@@ -1,10 +1,40 @@
# Startup [![Maven Central](https://img.shields.io/maven-central/v/dev.inmo/micro_utils.common?label=latest_version&style=flat-square)](https://github.com/InsanusMokrassar/MicroUtils)
# Startup
[![Maven Central](https://img.shields.io/maven-central/v/dev.inmo/micro_utils.common?label=latest_version&style=flat-square)](https://github.com/InsanusMokrassar/MicroUtils)
* **Plugins Package**: `dev.inmo:micro_utils.startup.plugin`
* **Launcher Package**: `dev.inmo:micro_utils.startup.launcher`
This package contains unified simple `Plugin`/`Launcher` tools for separating of your apps parts
Launching logic:
```mermaid
flowchart TB
StartLauncherPlugin.startAsync
StartLauncherPlugin.startAsync --> KoinInit["Koin.init"]
KoinInit --> StartLauncherPlugin.setupDI
subgraph StartLauncherPlugin.setupDI
direction LR
AddDefaultDependencies["Default dependencies: config as JsonObject, config as object, CoroutineScope, Json"]
SubPluginsSetupDI["Calling setupDI in subplugins"]
AddDefaultDependencies --> SubPluginsSetupDI
end
StartLauncherPlugin.setupDI --> startKoin
startKoin --> StartLauncherPlugin.startPlugin
subgraph StartLauncherPlugin.startPlugin
direction LR
LaunchSubplugins["Asynchronously (in CoroutineScope from Koin) start subplugins"]
end
StartLauncherPlugin.startPlugin --> ReturnKoinAppAndLaunchJob["Return koinApp and laucnhing job"]
```
## Plugin
To define plugin, you must use `StartPlugin` as supertype for your plugin. Restrictions are simple: plugins must be an `object` or `class` with empty constructor. Basic sample is here:

View File

@@ -9,8 +9,10 @@
Plugin is a partially independent part of bot. Plugin have several parts:
* `setupDI` - this method should be used to configure DI part of module
* `setupBotPlugin` - method to start/configure your bot actions
* `setupBotClient` - method to configure telegram bot in case you need it. Called synchronously when `TelegramBot`
initializing in `single` in `setupDI` of `PlaguBot`
* `setupBotPlugin` - method to start/configure your **bot** actions. Called asynchronously in `buildBehaviourWithFSM`
in `startPlugin` of `PlaguBot`
Plugin realization should be an `object` or `class` with empty constructor.
@@ -20,6 +22,11 @@ Most important of bot is `main` function (full reference: `dev.inmo.plagubot.App
Bot is initializing with the next algorithm:
---
**OLD**
```mermaid
flowchart TB
main["Main"]

View File

@@ -1,6 +1,6 @@
# TelegramBotAPI
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-7.4-blue)](https://core.telegram.org/bots/api-changelog#may-28-2024)
[![Maven Central Version](https://img.shields.io/maven-central/v/dev.inmo/tgbotapi)](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-9.6-blue)](https://core.telegram.org/bots/api-changelog#april-3-2026)
<!--- [![Telegram Channel](./resources/tg_channel_qr.jpg)](https://t.me/ktgbotapi) --->

View File

@@ -1,6 +1,108 @@
# Types conversations
One of the most important topics in context of tgbotapi is types conversations. This library is very strong-typed and a lot of things are based on types hierarchy. Lets look into the hierarchy of classes for the [Message](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt#L12) in 0.35.8: [![Message Diagram.png](https://bookstack.inmo.dev/uploads/images/gallery/2021-09/scaled-1680-/message-diagram.png)](https://bookstack.inmo.dev/uploads/images/gallery/2021-09/message-diagram.png)
# Types conversations
One of the most important topics in context of tgbotapi is types conversations. This library is very strong-typed and a lot of things are based on types hierarchy. Lets look into the hierarchy of classes for the [Message](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/Message.kt#L12) in 0.35.8:
```mermaid
%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%
classDiagram
Message <|-- AccessibleMessage
AccessibleMessage <|-- ChatEventMessage
ChatEventMessage <|-- ChannelEventMessage
ChatEventMessage <|-- GroupEventMessage
GroupEventMessage <|-- ChannelDirectMessagesEventMessage
ChannelDirectMessagesEventMessage <|-- CommonChannelDirectMessagesEventMessage
GroupEventMessage <|-- CommonGroupEventMessage
GroupEventMessage <|-- SupergroupEventMessage
SupergroupEventMessage <|-- CommonSupergroupEventMessage
ChatEventMessage <|-- PrivateEventMessage
ChatEventMessage <|-- PrivateForumEventMessage
AccessibleMessage <|-- CommonMessage
CommonMessage <|-- PossiblySentViaBotCommonMessage
PossiblySentViaBotCommonMessage <|-- BusinessContentMessage
BusinessContentMessage <|-- BusinessContentMessageImpl
PossiblySentViaBotCommonMessage <|-- ChannelContentMessage
ChannelContentMessage <|-- ChannelContentMessageImpl
ChannelContentMessage <|-- ChannelPaidPost
ChannelPaidPost <|-- ChannelPaidPostImpl
PossiblySentViaBotCommonMessage <|-- PrivateContentMessage
PrivateContentMessage <|-- PrivateContentMessageImpl
PrivateContentMessage <|-- PrivateForumContentMessage
PrivateForumContentMessage <|-- PrivateForumContentMessageImpl
PossiblySentViaBotCommonMessage <|-- PublicContentMessage
PublicContentMessage <|-- GroupContentMessage
GroupContentMessage <|-- AnonymousGroupContentMessage
AnonymousGroupContentMessage <|-- AnonymousGroupContentMessageImpl
GroupContentMessage <|-- ChannelDirectMessagesContentMessage
ChannelDirectMessagesContentMessage <|-- CommonChannelDirectMessagesContentMessage
CommonChannelDirectMessagesContentMessage <|-- CommonChannelDirectMessagesContentMessageImpl
ChannelDirectMessagesContentMessage <|-- FromChannelChannelDirectMessagesContentMessage
FromChannelChannelDirectMessagesContentMessage <|-- FromChannelChannelDirectMessagesContentMessageImpl
ChannelDirectMessagesContentMessage <|-- SuggestedChannelDirectMessagesContentMessage
SuggestedChannelDirectMessagesContentMessage <|-- CommonSuggestedChannelDirectMessagesContentMessage
CommonSuggestedChannelDirectMessagesContentMessage <|-- CommonSuggestedChannelDirectMessagesContentMessageImpl
SuggestedChannelDirectMessagesContentMessage <|-- FromChannelSuggestedChannelDirectMessagesContentMessage
FromChannelSuggestedChannelDirectMessagesContentMessage <|-- FromChannelSuggestedChannelDirectMessagesContentMessageImpl
GroupContentMessage <|-- CommonGroupContentMessage
CommonGroupContentMessage <|-- CommonGroupContentMessageImpl
GroupContentMessage <|-- ForumContentMessage
ForumContentMessage <|-- AnonymousForumContentMessage
AnonymousForumContentMessage <|-- AnonymousForumContentMessageImpl
ForumContentMessage <|-- CommonForumContentMessage
CommonForumContentMessage <|-- CommonForumContentMessageImpl
ForumContentMessage <|-- FromChannelForumContentMessage
FromChannelForumContentMessage <|-- FromChannelForumContentMessageImpl
GroupContentMessage <|-- FromChannelGroupContentMessage
FromChannelGroupContentMessage <|-- ConnectedFromChannelGroupContentMessage
ConnectedFromChannelGroupContentMessage <|-- ConnectedFromChannelGroupContentMessageImpl
FromChannelGroupContentMessage <|-- FromChannelChannelDirectMessagesContentMessage
FromChannelGroupContentMessage <|-- FromChannelForumContentMessage
FromChannelGroupContentMessage <|-- FromChannelSuggestedChannelDirectMessagesContentMessage
FromChannelGroupContentMessage <|-- UnconnectedFromChannelGroupContentMessage
UnconnectedFromChannelGroupContentMessage <|-- UnconnectedFromChannelGroupContentMessageImpl
GroupContentMessage <|-- PotentiallyFromUserGroupContentMessage
PotentiallyFromUserGroupContentMessage <|-- CommonChannelDirectMessagesContentMessage
PotentiallyFromUserGroupContentMessage <|-- CommonForumContentMessage
PotentiallyFromUserGroupContentMessage <|-- CommonGroupContentMessage
PotentiallyFromUserGroupContentMessage <|-- CommonSuggestedChannelDirectMessagesContentMessage
AccessibleMessage <|-- ContentMessage
ContentMessage <|-- CommonMessage
ContentMessage <|-- PossiblyMediaGroupMessage
PossiblyMediaGroupMessage <|-- CommonMessage
AccessibleMessage <|-- OptionallyFromUserMessage
OptionallyFromUserMessage <|-- ChannelContentMessage
OptionallyFromUserMessage <|-- FromUserMessage
FromUserMessage <|-- BusinessContentMessage
FromUserMessage <|-- CommonChannelDirectMessagesContentMessage
FromUserMessage <|-- CommonForumContentMessage
FromUserMessage <|-- CommonGroupContentMessage
FromUserMessage <|-- CommonSuggestedChannelDirectMessagesContentMessage
FromUserMessage <|-- GroupEventMessage
FromUserMessage <|-- PassportMessage
FromUserMessage <|-- PrivateContentMessage
AccessibleMessage <|-- PassportMessage
AccessibleMessage <|-- PossiblyEditedMessage
PossiblyEditedMessage <|-- CommonMessage
AccessibleMessage <|-- PossiblyForwardedMessage
PossiblyForwardedMessage <|-- CommonMessage
AccessibleMessage <|-- PossiblyPaymentMessage
AccessibleMessage <|-- PossiblyTopicMessage
PossiblyTopicMessage <|-- ForumContentMessage
PossiblyTopicMessage <|-- PrivateForumContentMessage
AccessibleMessage <|-- SignedMessage
SignedMessage <|-- AnonymousForumContentMessage
SignedMessage <|-- AnonymousGroupContentMessage
SignedMessage <|-- ChannelContentMessage
SignedMessage <|-- FromChannelGroupContentMessage
AccessibleMessage <|-- UnknownMessageType
Message <|-- InaccessibleMessage
Message <|-- PossiblyOfflineMessage
PossiblyOfflineMessage <|-- CommonMessage
PossiblyOfflineMessage <|-- PrivateContentMessage
Message <|-- PossiblyPaidMessage
PossiblyPaidMessage <|-- CommonMessage
Message <|-- PossiblyWithEffectMessage
PossiblyWithEffectMessage <|-- PrivateContentMessage
```
As you may see, it is a little bit complex and require several tools for types conversation.

View File

@@ -0,0 +1 @@
This secion contains information about way of getting updates and additional info related to it.

View File

@@ -30,6 +30,7 @@ nav:
- Guides:
- 'tgbotapi/guides/keyboards.md'
- Updates retrieving:
- 'tgbotapi/updates/index.md'
- 'tgbotapi/updates/updates-filters.md'
- 'tgbotapi/updates/long-polling.md'
- 'tgbotapi/updates/webhooks.md'
@@ -57,6 +58,7 @@ nav:
- 'Navigation':
- 'navigation/index.md'
- 'navigation/getting-started.md'
- Sample: 'https://insanusmokrassar.github.io/navigation/'
- 'Services':
- 'services/index.md'

741
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,13 +6,13 @@ authors = ["InsanusMokrassar"]
[tool.poetry.dependencies]
python = "^3.8"
mkdocs = "^1.5.3"
mkdocs = "^1.6.1"
markdown-callouts = "^0.4.0"
mkdocs-autorefs = "^0.5.0"
mkdocs-autorefs = "^1.2.0"
mkdocs-include-dir-to-nav = "^1.2.0"
mkdocs-material = "^9.5.13"
pymdown-extensions = "^10.7"
mkdocs-mermaid2-plugin = "^1.1.1"
mkdocs-material = "^9.6.17"
pymdown-extensions = "^10.6.1"
mkdocs-mermaid2-plugin = "^1.2.1"
[tool.poetry.dev-dependencies]

6
renovate.json Normal file
View File

@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}