mirror of
https://github.com/System-End/slack-morphism-rust.git
synced 2026-04-19 22:05:15 +00:00
Release v1 (#137)
* Preparing release v1 * Feature rename * Updated docs * Updated docs * Example updates * GitHub actions fixes * Docs updates
This commit is contained in:
parent
1d65769677
commit
df4d69af0a
96 changed files with 240 additions and 326 deletions
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
|
@ -13,4 +13,4 @@ jobs:
|
|||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
- run: cargo fmt -- --check && cargo clippy -- -Dwarnings && cargo test
|
||||
- run: cargo fmt -- --check && cargo clippy --all-features -- -Dwarnings && cargo test --all-features
|
||||
|
|
|
|||
107
Cargo.toml
107
Cargo.toml
|
|
@ -1,7 +1,102 @@
|
|||
[workspace]
|
||||
[package]
|
||||
name = "slack-morphism"
|
||||
version = "1.0.0"
|
||||
authors = ["Abdulla Abdurakhmanov <me@abdolence.dev>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Slack Morphism is a modern client library for Slack Web/Events API/Socket Mode and Block Kit"
|
||||
homepage = "https://github.com/abdolence/slack-morphism-rust"
|
||||
repository = "https://github.com/abdolence/slack-morphism-rust"
|
||||
documentation = "https://docs.rs/slack_morphism"
|
||||
keywords = ["slack", "client"]
|
||||
categories = ["api-bindings"]
|
||||
readme = "README.md"
|
||||
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE", "SECURITY.md"]
|
||||
|
||||
members = [
|
||||
"src/models",
|
||||
"src/client",
|
||||
"src/hyper"
|
||||
]
|
||||
[badges]
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[lib]
|
||||
name = "slack_morphism"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
hyper = ["dep:tokio","dep:hyper", "dep:hyper-rustls", "dep:tokio-stream","dep:tokio-tungstenite", "dep:tokio-tungstenite", "dep:signal-hook", "dep:signal-hook-tokio"]
|
||||
axum = ["hyper", "dep:axum"]
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_with = { version = "1.14", features = ["json"] }
|
||||
rvstruct = "0.3"
|
||||
rsb_derive = "0.5"
|
||||
futures = "0.3"
|
||||
futures-util = "0.3"
|
||||
futures-locks = "0.7"
|
||||
base64 = "0.13"
|
||||
hex = "0.4"
|
||||
tracing = "0.1"
|
||||
ring = "0.16"
|
||||
lazy_static = "1.4"
|
||||
http = "0.2"
|
||||
async-trait = "0.1"
|
||||
bytes = "1.2"
|
||||
rand = "0.8"
|
||||
async-recursion="1.0"
|
||||
mime = "0.3"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
url = { version = "2.2", features = ["serde"]}
|
||||
hyper = { version ="0.14", features = ["full"], optional = true }
|
||||
tokio = { version = "1.20", features = ["full"], optional = true }
|
||||
tokio-stream = { version = "0.1.9", optional = true }
|
||||
hyper-rustls = { version="0.23", features = ["rustls-native-certs", "http2"], optional = true }
|
||||
tokio-tungstenite = { version = "0.17.2", features = ["rustls-tls-native-roots"], optional = true }
|
||||
signal-hook = { version = "0.3.14", features = ["extended-siginfo"], optional = true}
|
||||
signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"], optional = true }
|
||||
axum = { version = "0.5", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
cargo-husky = { version = "1", default-features = false, features = ["run-for-all", "prepush-hook", "run-cargo-fmt"] }
|
||||
cargo-audit = "0.17"
|
||||
tracing-subscriber = { version ="0.3", features = ["env-filter"] }
|
||||
hyper-proxy = "0.9"
|
||||
hyper = { version ="0.14", features = ["full"] }
|
||||
|
||||
[package.metadata.release]
|
||||
tag-prefix=""
|
||||
|
||||
[[example]]
|
||||
name = "client"
|
||||
path = "examples/client.rs"
|
||||
required-features = ["hyper"]
|
||||
|
||||
[[example]]
|
||||
name = "events_api_server"
|
||||
path = "examples/events_api_server.rs"
|
||||
required-features = ["hyper"]
|
||||
|
||||
[[example]]
|
||||
name = "proxy_client"
|
||||
path = "examples/proxy_client.rs"
|
||||
required-features = ["hyper"]
|
||||
|
||||
[[example]]
|
||||
name = "rate_control_client"
|
||||
path = "examples/rate_control_client.rs"
|
||||
required-features = ["hyper"]
|
||||
|
||||
[[example]]
|
||||
name = "socket_mode"
|
||||
path = "examples/socket_mode.rs"
|
||||
required-features = ["hyper"]
|
||||
|
||||
[[example]]
|
||||
name = "state_management"
|
||||
path = "examples/state_management.rs"
|
||||
required-features = ["hyper"]
|
||||
|
||||
[[example]]
|
||||
name = "webhook_message"
|
||||
path = "examples/webhook_message.rs"
|
||||
required-features = ["hyper"]
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Please follow to the official website: https://slack-rust.abdolence.dev.
|
|||
|
||||
## Examples
|
||||
|
||||
https://github.com/abdolence/slack-morphism-rust/tree/master/src/hyper/examples
|
||||
https://github.com/abdolence/slack-morphism-rust/tree/master/examples
|
||||
|
||||
The examples require to work the following environment variables (from your Slack bot profile in api.slack.com):
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Let’s take some very simple block example:
|
|||
Now, let’s look at how it looks with type-safe code using Slack Morphism Blocks macro support:
|
||||
|
||||
```rust,noplaypen
|
||||
use slack_morphism_models::*;
|
||||
use slack_morphism_models::blocks::*;
|
||||
use slack_morphism::prelude::*;
|
||||
|
||||
let blocks : Vec<SlackBlock> = slack_blocks![
|
||||
some_into(
|
||||
|
|
@ -39,12 +38,7 @@ Let’s look at another more complex example for welcoming message:
|
|||
|
||||
```rust,noplaypen
|
||||
|
||||
use slack_morphism::*;
|
||||
use slack_morphism::api::*;
|
||||
use slack_morphism_models::*;
|
||||
use slack_morphism_models::blocks::*;
|
||||
|
||||
use slack_morphism_hyper::*;
|
||||
use slack_morphism::prelude::*;
|
||||
|
||||
async fn example() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,7 @@ To create a server, you need hyper `make_service_fn` and `service_fn`.
|
|||
## Example
|
||||
```rust,noplaypen
|
||||
|
||||
use slack_morphism::api::*;
|
||||
use slack_morphism::listener::*;
|
||||
use slack_morphism::*;
|
||||
use slack_morphism_models::*;
|
||||
|
||||
// Slack Morphism Hyper/Tokio support
|
||||
use slack_morphism_hyper::*;
|
||||
use slack_morphism::prelude::*;
|
||||
|
||||
// Hyper imports
|
||||
use hyper::service::{make_service_fn, service_fn};
|
||||
|
|
|
|||
|
|
@ -4,28 +4,13 @@ Cargo.toml dependencies example:
|
|||
|
||||
```toml
|
||||
[dependencies]
|
||||
slack-morphism="0.41"
|
||||
slack-morphism-models="0.41"
|
||||
slack-morphism-hyper="0.41"
|
||||
slack-morphism= { version = "1.0", features = ["hyper"] }
|
||||
```
|
||||
|
||||
All imports you need:
|
||||
|
||||
```rust,noplaypen
|
||||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
```
|
||||
|
||||
or more granularly:
|
||||
```rust,noplaypen
|
||||
use slack_morphism::*; // access to network/client functions
|
||||
use slack_morphism::api::*; // Slack Web API methods (chat, users, views, etc)
|
||||
use slack_morphism::listener::*; // Slack Events API listener (routes) implementation
|
||||
use slack_morphism_models::*; // common Slack models like SlackUser, etc and macros
|
||||
use slack_morphism_models::blocks::*; // Slack Block Kit models
|
||||
use slack_morphism_models::events::*; // Slack Events Models
|
||||
|
||||
use slack_morphism_hyper::*; // Hyper/Tokio client implementation
|
||||
```
|
||||
|
||||
## Ready to use examples
|
||||
|
|
@ -33,4 +18,4 @@ use slack_morphism_hyper::*; // Hyper/Tokio client implementation
|
|||
- Events API server example
|
||||
- Slack Web API client with Socket Mode
|
||||
|
||||
You can find them on [github](https://github.com/abdolence/slack-morphism-rust/tree/master/src/hyper/examples)
|
||||
You can find them on [github](https://github.com/abdolence/slack-morphism-rust/tree/master/examples)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ in asynchronous manner.
|
|||
|
||||
## Modular design
|
||||
|
||||
This library provided as multiple modules:
|
||||
- `slack-morphism-models`, gives you access to all type/models definitions that used for Slack Web/Events APIs.
|
||||
- `slack-morphism`, base module to support frameworks-agnostic client, that doesn't have any dependency to any HTTP/async library itself, and you can implement binding to any library you want.
|
||||
- `slack-morphism-hyper`, Slack client support/binding for Hyper/Tokio/Tungstenite.
|
||||
Base crate to support frameworks-agnostic client and that doesn't have any dependency to any HTTP/async library itself, and you can implement binding to any library you want.
|
||||
Includes also all type/models definitions that used for Slack Web/Events APIs.
|
||||
|
||||
This library provided the following features:
|
||||
- `hyper`: Slack client support/binding for Hyper/Tokio/Tungstenite.
|
||||
- `axum`: Slack client support/binding for [axum framework](https://github.com/tokio-rs/axum) support (WIP, will be available in next releases).
|
||||
|
|
|
|||
|
|
@ -11,10 +11,8 @@ For example for `users.list`:
|
|||
|
||||
```rust,noplaypen
|
||||
|
||||
use slack_morphism::*;
|
||||
use slack_morphism::api::*;
|
||||
use slack_morphism_models::*;
|
||||
use slack_morphism_hyper::*;
|
||||
use slack_morphism::prelude::*;
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
async fn example() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ By default, throttler *isn't* enabled, so you should enable it explicitly:
|
|||
|
||||
```rust,noplaypen
|
||||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
|
||||
let client = SlackClient::new(
|
||||
SlackClientHyperConnector::new()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ You can use `client..post_webhook_message` to post [Slack Incoming Webhook](http
|
|||
```rust,noplaypen
|
||||
|
||||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
use url::Url;
|
||||
|
||||
let client = SlackClient::new(SlackClientHyperConnector::new());
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ and don't want to work with HTTP endpoints yourself.
|
|||
|
||||
```rust,noplaypen
|
||||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
|
||||
async fn test_interaction_events_function(
|
||||
event: SlackInteractionEvent,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
## Create a client instance
|
||||
|
||||
```rust,noplaypen
|
||||
use slack_morphism::*;
|
||||
// Slack Morphism Hyper/Tokio support
|
||||
use slack_morphism_hyper::*;
|
||||
use slack_morphism::prelude::*;
|
||||
|
||||
let client = SlackClient::new( SlackClientHyperConnector::new() );
|
||||
|
||||
|
|
@ -23,12 +21,7 @@ You should securely and properly store all of Slack tokens.
|
|||
|
||||
```rust,noplaypen
|
||||
|
||||
use slack_morphism::*;
|
||||
use slack_morphism::api::*;
|
||||
use slack_morphism_models::*;
|
||||
|
||||
// Slack Morphism Hyper/Tokio support
|
||||
use slack_morphism_hyper::*;
|
||||
use slack_morphism::prelude::*;
|
||||
|
||||
async fn example() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use chrono::prelude::*;
|
||||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
|
||||
use rsb_derive::Builder;
|
||||
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
|
||||
use hyper::service::{make_service_fn, service_fn};
|
||||
use hyper::{Body, Request, Response};
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
|
||||
use hyper_proxy::{Intercept, Proxy, ProxyConnector};
|
||||
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
use tracing::*;
|
||||
|
||||
async fn test_rate_control_client() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
use url::Url;
|
||||
|
||||
use slack_morphism::prelude::*;
|
||||
use slack_morphism_hyper::*;
|
||||
use url::Url;
|
||||
|
||||
async fn test_webhook_message() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
let client = SlackClient::new(SlackClientHyperConnector::new());
|
||||
|
|
@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
|
|||
use serde_with::skip_serializing_none;
|
||||
use url::Url;
|
||||
|
||||
use slack_morphism_models::*;
|
||||
use crate::*;
|
||||
|
||||
use crate::ratectl::*;
|
||||
use crate::SlackClientSession;
|
||||
|
|
@ -8,9 +8,9 @@ use serde_with::skip_serializing_none;
|
|||
|
||||
use crate::ratectl::*;
|
||||
use crate::SlackClientSession;
|
||||
use crate::*;
|
||||
use crate::{ClientResult, SlackClientHttpConnector};
|
||||
use lazy_static::lazy_static;
|
||||
use slack_morphism_models::*;
|
||||
|
||||
impl<'a, SCHC> SlackClientSession<'a, SCHC>
|
||||
where
|
||||
|
|
@ -8,8 +8,8 @@ use serde_with::skip_serializing_none;
|
|||
|
||||
use crate::ratectl::SLACK_TIER3_METHOD_CONFIG;
|
||||
use crate::SlackClientSession;
|
||||
use crate::*;
|
||||
use crate::{ClientResult, SlackClientHttpConnector};
|
||||
use slack_morphism_models::*;
|
||||
|
||||
impl<'a, SCHC> SlackClientSession<'a, SCHC>
|
||||
where
|
||||
|
|
@ -7,14 +7,14 @@ use rvstruct::*;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
use crate::models::blocks::{SlackBlock, SlackBlockText};
|
||||
use crate::models::*;
|
||||
use crate::ratectl::*;
|
||||
use crate::scroller::*;
|
||||
use crate::SlackClientSession;
|
||||
use crate::{ClientResult, SlackClientHttpConnector};
|
||||
use futures::future::{BoxFuture, FutureExt};
|
||||
use lazy_static::lazy_static;
|
||||
use slack_morphism_models::blocks::{SlackBlock, SlackBlockText};
|
||||
use slack_morphism_models::*;
|
||||
use std::collections::HashMap;
|
||||
use url::Url;
|
||||
|
||||
|
|
@ -7,10 +7,10 @@ use rvstruct::ValueStruct;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
use crate::models::*;
|
||||
use crate::ratectl::*;
|
||||
use crate::*;
|
||||
use futures::future::{BoxFuture, FutureExt};
|
||||
use slack_morphism_models::*;
|
||||
use std::collections::HashSet;
|
||||
|
||||
impl<'a, SCHC> SlackClientSession<'a, SCHC>
|
||||
|
|
@ -9,8 +9,8 @@ use serde_with::skip_serializing_none;
|
|||
use std::fmt;
|
||||
|
||||
use crate::client::*;
|
||||
use crate::models::*;
|
||||
use crate::token::*;
|
||||
use slack_morphism_models::*;
|
||||
use url::Url;
|
||||
|
||||
impl<SCHC> SlackClient<SCHC>
|
||||
|
|
@ -6,10 +6,10 @@ use rsb_derive::Builder;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
use crate::models::*;
|
||||
use crate::ratectl::*;
|
||||
use crate::SlackClientSession;
|
||||
use crate::{ClientResult, SlackClientHttpConnector};
|
||||
use slack_morphism_models::*;
|
||||
|
||||
impl<'a, SCHC> SlackClientSession<'a, SCHC>
|
||||
where
|
||||
|
|
@ -7,12 +7,12 @@ use rvstruct::ValueStruct;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
use crate::models::*;
|
||||
use crate::ratectl::*;
|
||||
use crate::scroller::*;
|
||||
use crate::SlackClientSession;
|
||||
use crate::{ClientResult, SlackClientHttpConnector};
|
||||
use futures::future::{BoxFuture, FutureExt};
|
||||
use slack_morphism_models::*;
|
||||
|
||||
impl<'a, SCHC> SlackClientSession<'a, SCHC>
|
||||
where
|
||||
|
|
@ -6,11 +6,11 @@ use rsb_derive::Builder;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
use crate::models::blocks::*;
|
||||
use crate::models::*;
|
||||
use crate::ratectl::*;
|
||||
use crate::SlackClientSession;
|
||||
use crate::{ClientResult, SlackClientHttpConnector};
|
||||
use slack_morphism_models::blocks::*;
|
||||
use slack_morphism_models::*;
|
||||
|
||||
impl<'a, SCHC> SlackClientSession<'a, SCHC>
|
||||
where
|
||||
|
|
@ -8,11 +8,11 @@ use serde::{Deserialize, Serialize};
|
|||
use serde_with::skip_serializing_none;
|
||||
use url::Url;
|
||||
|
||||
use crate::models::*;
|
||||
use crate::ratectl::*;
|
||||
use crate::SlackClient;
|
||||
use crate::{ClientResult, SlackClientHttpConnector};
|
||||
use rvstruct::ValueStruct;
|
||||
use slack_morphism_models::*;
|
||||
|
||||
impl<SCHC> SlackClient<SCHC>
|
||||
where
|
||||
0
src/axum_support/mod.rs
Normal file
0
src/axum_support/mod.rs
Normal file
|
|
@ -4,10 +4,10 @@ use std::sync::Arc;
|
|||
use crate::token::*;
|
||||
|
||||
use crate::errors::SlackClientError;
|
||||
use crate::models::*;
|
||||
use crate::ratectl::SlackApiMethodRateControlConfig;
|
||||
use futures_util::future::BoxFuture;
|
||||
use lazy_static::*;
|
||||
use slack_morphism_models::{SlackClientId, SlackClientSecret};
|
||||
use url::Url;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
[package]
|
||||
name = "slack-morphism"
|
||||
version = "0.42.0"
|
||||
authors = ["Abdulla Abdurakhmanov <me@abdolence.dev>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Slack Morphism is a modern client library for Slack Web/Events API/Socket Mode and Block Kit"
|
||||
homepage = "https://github.com/abdolence/slack-morphism-rust"
|
||||
repository = "https://github.com/abdolence/slack-morphism-rust"
|
||||
documentation = "https://docs.rs/slack_morphism"
|
||||
keywords = ["slack", "client"]
|
||||
categories = ["api-bindings"]
|
||||
readme = "../../README.md"
|
||||
include = ["Cargo.toml", "src/**/*.rs", "../../README.md", "../../LICENSE"]
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
|
||||
[lib]
|
||||
name = "slack_morphism"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
slack-morphism-models = { path = "../models", version = "^0.42.0"}
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_with = { version = "1.14", features = ["json"] }
|
||||
rvstruct = "0.3"
|
||||
rsb_derive = "0.5"
|
||||
url = "2.2"
|
||||
futures = "0.3"
|
||||
futures-util = "0.3"
|
||||
futures-locks = "0.7"
|
||||
base64 = "0.13"
|
||||
hex = "0.4"
|
||||
tracing = "0.1"
|
||||
ring = "0.16"
|
||||
lazy_static = "1.4"
|
||||
http = "0.2"
|
||||
async-trait = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
cargo-husky = { version = "1", default-features = false, features = ["run-for-all", "prepush-hook", "run-cargo-fmt"] }
|
||||
cargo-audit = "0.17"
|
||||
|
||||
[package.metadata.release]
|
||||
tag-prefix=""
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
pub use super::api::*; // Slack Web API methods (chat, users, views, etc)
|
||||
pub use super::listener::*;
|
||||
pub use super::ratectl::*;
|
||||
pub use super::*; // access to network/client functions // Slack Events API listener (routes) implementation
|
||||
|
||||
pub use slack_morphism_models::blocks::*; // Slack Block Kit models
|
||||
pub use slack_morphism_models::events::*;
|
||||
pub use slack_morphism_models::*; // common Slack models like SlackUser, etc and macros // Slack Events Models
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
[package]
|
||||
name = "slack-morphism-hyper"
|
||||
version = "0.42.0"
|
||||
authors = ["Abdulla Abdurakhmanov <me@abdolence.dev>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Slack Morphism Hyper/Tokio support library"
|
||||
homepage = "https://github.com/abdolence/slack-morphism-rust"
|
||||
repository = "https://github.com/abdolence/slack-morphism-rust"
|
||||
documentation = "https://docs.rs/slack_morphism"
|
||||
keywords = ["slack", "client"]
|
||||
categories = ["api-bindings"]
|
||||
readme = "../../README.md"
|
||||
include = ["Cargo.toml", "src/**/*.rs", "../../README.md", "../../LICENSE"]
|
||||
|
||||
[lib]
|
||||
name = "slack_morphism_hyper"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
slack-morphism = { path = "../client", version = "^0.42.0"}
|
||||
slack-morphism-models = { path = "../models", version = "^0.42.0"}
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_with = "1.14"
|
||||
rvstruct = "0.3"
|
||||
rsb_derive = "0.5"
|
||||
hyper = { version ="0.14", features = ["full"] }
|
||||
tokio = { version = "1.20", features = ["full"] }
|
||||
tokio-stream = { version = "0.1.9" }
|
||||
hyper-rustls = { version="0.23", features = ["rustls-native-certs", "http2"] }
|
||||
url = { version = "2.2", features = ["serde"]}
|
||||
mime = "0.3"
|
||||
futures = "0.3"
|
||||
futures-util = "0.3"
|
||||
bytes = "1.2"
|
||||
base64 = "0.13"
|
||||
hex = "0.4"
|
||||
tracing = "0.1"
|
||||
ring = "0.16"
|
||||
lazy_static = "1.4"
|
||||
async-trait = "0.1.56"
|
||||
http = "0.2"
|
||||
tokio-tungstenite = { version = "0.17.2", features = ["rustls-tls-native-roots"] }
|
||||
rand = "0.8.5"
|
||||
async-recursion="1.0.0"
|
||||
signal-hook = { version = "0.3.14", features = ["extended-siginfo"]}
|
||||
signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"] }
|
||||
|
||||
[dev-dependencies]
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
tracing-subscriber = { version ="0.3", features = ["env-filter"] }
|
||||
hyper-proxy = "0.9"
|
||||
cargo-audit = "0.17"
|
||||
|
||||
[package.metadata.release]
|
||||
disable-tag=true
|
||||
|
|
@ -1,4 +1,9 @@
|
|||
use crate::ratectl::SlackTokioRateController;
|
||||
use crate::errors::*;
|
||||
use crate::hyper_tokio::ratectl::SlackTokioRateController;
|
||||
use crate::models::{SlackClientId, SlackClientSecret};
|
||||
use crate::signature_verifier::SlackEventAbsentSignatureError;
|
||||
use crate::signature_verifier::SlackEventSignatureVerifier;
|
||||
use crate::*;
|
||||
use async_recursion::async_recursion;
|
||||
use bytes::Buf;
|
||||
use futures::future::TryFutureExt;
|
||||
|
|
@ -10,12 +15,8 @@ use hyper::{Body, Request, Response, Uri};
|
|||
use hyper_rustls::HttpsConnector;
|
||||
use mime::Mime;
|
||||
use rvstruct::ValueStruct;
|
||||
use slack_morphism::errors::*;
|
||||
use slack_morphism::prelude::{SlackApiMethodRateControlConfig, SlackApiRateControlConfig};
|
||||
use slack_morphism::signature_verifier::SlackEventAbsentSignatureError;
|
||||
use slack_morphism::signature_verifier::SlackEventSignatureVerifier;
|
||||
use slack_morphism::*;
|
||||
use slack_morphism_models::{SlackClientId, SlackClientSecret};
|
||||
|
||||
use crate::ratectl::{SlackApiMethodRateControlConfig, SlackApiRateControlConfig};
|
||||
use std::collections::HashMap;
|
||||
use std::io::Read;
|
||||
use std::sync::Arc;
|
||||
|
|
@ -1,17 +1,15 @@
|
|||
use crate::listener::SlackClientEventsHyperListener;
|
||||
|
||||
use crate::connector::SlackClientHyperConnector;
|
||||
use slack_morphism::errors::*;
|
||||
use slack_morphism::listener::*;
|
||||
use slack_morphism::signature_verifier::SlackEventSignatureVerifier;
|
||||
use crate::errors::*;
|
||||
use crate::hyper_tokio::connector::SlackClientHyperConnector;
|
||||
use crate::listener::*;
|
||||
use crate::signature_verifier::SlackEventSignatureVerifier;
|
||||
|
||||
use crate::hyper_tokio::*;
|
||||
pub use crate::models::events::*;
|
||||
pub use crate::models::SlackResponseUrl;
|
||||
use futures::future::{BoxFuture, FutureExt, TryFutureExt};
|
||||
use hyper::body::*;
|
||||
use hyper::client::connect::Connect;
|
||||
use hyper::{Method, Request, Response, StatusCode};
|
||||
use slack_morphism::UserCallbackResult;
|
||||
pub use slack_morphism_models::events::*;
|
||||
pub use slack_morphism_models::SlackResponseUrl;
|
||||
use std::collections::HashMap;
|
||||
use std::future::Future;
|
||||
use std::sync::Arc;
|
||||
|
|
@ -1,18 +1,14 @@
|
|||
use crate::listener::SlackClientEventsHyperListener;
|
||||
|
||||
pub use slack_morphism_models::events::*;
|
||||
|
||||
use crate::connector::SlackClientHyperConnector;
|
||||
|
||||
use slack_morphism::errors::*;
|
||||
use slack_morphism::listener::*;
|
||||
use slack_morphism::signature_verifier::SlackEventSignatureVerifier;
|
||||
use crate::errors::*;
|
||||
use crate::hyper_tokio::connector::SlackClientHyperConnector;
|
||||
use crate::listener::*;
|
||||
pub use crate::models::events::*;
|
||||
use crate::signature_verifier::SlackEventSignatureVerifier;
|
||||
|
||||
use crate::hyper_tokio::*;
|
||||
use futures::future::{BoxFuture, FutureExt, TryFutureExt};
|
||||
use hyper::body::*;
|
||||
use hyper::client::connect::Connect;
|
||||
use hyper::{Method, Request, Response, StatusCode};
|
||||
use slack_morphism::UserCallbackResult;
|
||||
use std::collections::HashMap;
|
||||
use std::future::Future;
|
||||
use std::sync::Arc;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::connector::SlackClientHyperConnector;
|
||||
use crate::hyper_tokio::connector::SlackClientHyperConnector;
|
||||
|
||||
use std::future::Future;
|
||||
|
||||
|
|
@ -6,12 +6,11 @@ use futures::future::{BoxFuture, FutureExt};
|
|||
use hyper::client::connect::Connect;
|
||||
use hyper::{Body, Request, Response};
|
||||
|
||||
use crate::listener::SlackClientEventsListenerEnvironment;
|
||||
pub use command_events::*;
|
||||
pub use interaction_events::*;
|
||||
pub use oauth::*;
|
||||
pub use push_events::*;
|
||||
use slack_morphism::listener::SlackClientEventsListenerEnvironment;
|
||||
pub use slack_morphism::signature_verifier::*;
|
||||
use std::sync::Arc;
|
||||
|
||||
mod command_events;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
use crate::connector::SlackClientHyperConnector;
|
||||
use crate::listener::SlackClientEventsHyperListener;
|
||||
use crate::hyper_tokio::connector::SlackClientHyperConnector;
|
||||
use crate::hyper_tokio::SlackClientEventsHyperListener;
|
||||
|
||||
use slack_morphism::api::*;
|
||||
use slack_morphism::errors::*;
|
||||
use slack_morphism::listener::*;
|
||||
use slack_morphism::{SlackClient, SlackClientHttpApiUri};
|
||||
use crate::api::*;
|
||||
use crate::errors::*;
|
||||
use crate::listener::*;
|
||||
use crate::{SlackClient, SlackClientHttpApiUri};
|
||||
|
||||
use futures::future::{BoxFuture, FutureExt};
|
||||
use hyper::body::*;
|
||||
|
|
@ -1,16 +1,13 @@
|
|||
use crate::connector::SlackClientHyperConnector;
|
||||
use crate::listener::SlackClientEventsHyperListener;
|
||||
|
||||
use slack_morphism::errors::*;
|
||||
use slack_morphism::listener::*;
|
||||
use slack_morphism::signature_verifier::SlackEventSignatureVerifier;
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::hyper_tokio::connector::SlackClientHyperConnector;
|
||||
use crate::hyper_tokio::*;
|
||||
use crate::listener::*;
|
||||
pub use crate::models::events::*;
|
||||
use crate::signature_verifier::SlackEventSignatureVerifier;
|
||||
use futures::future::{BoxFuture, FutureExt, TryFutureExt};
|
||||
use hyper::body::*;
|
||||
use hyper::client::connect::Connect;
|
||||
use hyper::{Method, Request, Response};
|
||||
use slack_morphism::UserCallbackResult;
|
||||
pub use slack_morphism_models::events::*;
|
||||
use std::future::Future;
|
||||
use std::sync::Arc;
|
||||
use tracing::*;
|
||||
|
|
@ -4,9 +4,11 @@
|
|||
|
||||
#![allow(clippy::new_without_default)]
|
||||
|
||||
pub use crate::connector::SlackClientHyperConnector;
|
||||
pub use crate::connector::SlackClientHyperHttpsConnector;
|
||||
use slack_morphism::SlackClient;
|
||||
pub use crate::hyper_tokio::connector::SlackClientHyperConnector;
|
||||
pub use crate::hyper_tokio::connector::SlackClientHyperHttpsConnector;
|
||||
use crate::SlackClient;
|
||||
|
||||
use crate::*;
|
||||
|
||||
pub mod connector;
|
||||
pub mod listener;
|
||||
|
|
@ -14,9 +16,9 @@ mod ratectl;
|
|||
pub mod scroller_ext;
|
||||
mod socket_mode;
|
||||
|
||||
pub type SlackHyperClient = SlackClient<SlackClientHyperHttpsConnector>;
|
||||
|
||||
pub use listener::chain_service_routes_fn;
|
||||
pub use listener::SlackClientEventsHyperListener;
|
||||
pub use scroller_ext::SlackApiResponseScrollerExt;
|
||||
pub use socket_mode::*;
|
||||
|
||||
pub type SlackHyperClient = SlackClient<SlackClientHyperHttpsConnector>;
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
use slack_morphism::prelude::*;
|
||||
use crate::models::*;
|
||||
use crate::ratectl::*;
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use tokio::sync::Mutex;
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
use crate::*;
|
||||
use futures::future::BoxFuture;
|
||||
use futures::stream::BoxStream;
|
||||
use futures::TryStreamExt;
|
||||
use slack_morphism::{
|
||||
ClientResult, SlackApiResponseScroller, SlackApiScrollableResponse, SlackClientHttpConnector,
|
||||
SlackClientSession,
|
||||
};
|
||||
use std::time::Duration;
|
||||
use tokio_stream::StreamExt;
|
||||
|
||||
|
|
@ -1,11 +1,8 @@
|
|||
use crate::socket_mode::tokio_clients_manager::SlackSocketModeTokioClientsManager;
|
||||
use crate::SlackClientHyperConnector;
|
||||
use crate::clients_manager::{SlackSocketModeClientsManager, SlackSocketModeClientsManagerFactory};
|
||||
use crate::hyper_tokio::connector::SlackClientHyperConnector;
|
||||
use crate::hyper_tokio::socket_mode::tokio_clients_manager::SlackSocketModeTokioClientsManager;
|
||||
use crate::listener::SlackClientEventsListenerEnvironment;
|
||||
use hyper::client::connect::Connect;
|
||||
use slack_morphism::clients_manager::{
|
||||
SlackSocketModeClientsManager, SlackSocketModeClientsManagerFactory,
|
||||
};
|
||||
use slack_morphism::listener::SlackClientEventsListenerEnvironment;
|
||||
use slack_morphism::SlackSocketModeWssClientId;
|
||||
use std::sync::Arc;
|
||||
|
||||
mod tokio_clients_manager;
|
||||
|
|
@ -3,19 +3,17 @@ use async_trait::async_trait;
|
|||
use hyper::client::connect::Connect;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::socket_mode::tungstenite_wss_client::SlackTungsteniteWssClient;
|
||||
use crate::hyper_tokio::socket_mode::tungstenite_wss_client::SlackTungsteniteWssClient;
|
||||
use crate::socket_mode::SlackSocketModeWssClientId;
|
||||
use futures::future;
|
||||
use futures::stream::StreamExt;
|
||||
use signal_hook::consts::TERM_SIGNALS;
|
||||
use signal_hook::iterator::exfiltrator::WithOrigin;
|
||||
use signal_hook_tokio::SignalsInfo;
|
||||
use slack_morphism::clients_manager::SlackSocketModeClientsManager;
|
||||
use slack_morphism::listener::SlackClientEventsListenerEnvironment;
|
||||
use slack_morphism::{
|
||||
ClientResult, SlackApiToken, SlackClientHttpConnector, SlackClientSocketModeConfig,
|
||||
SlackSocketModeClientListener,
|
||||
};
|
||||
|
||||
use crate::clients_manager::SlackSocketModeClientsManager;
|
||||
use crate::hyper_tokio::SlackClientHyperConnector;
|
||||
use crate::listener::SlackClientEventsListenerEnvironment;
|
||||
use tokio::sync::RwLock;
|
||||
use tracing::*;
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
use crate::api::SlackApiAppsConnectionOpenRequest;
|
||||
use crate::errors::*;
|
||||
use crate::listener::SlackClientEventsListenerEnvironment;
|
||||
use crate::*;
|
||||
use futures::{SinkExt, StreamExt};
|
||||
use rvstruct::*;
|
||||
use slack_morphism::api::SlackApiAppsConnectionOpenRequest;
|
||||
use slack_morphism::errors::*;
|
||||
use slack_morphism::listener::SlackClientEventsListenerEnvironment;
|
||||
use slack_morphism::*;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::time::SystemTime;
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
//! ### Create a client instance:
|
||||
//! ```ignore
|
||||
//! use slack_morphism::prelude::*;
|
||||
//! use slack_morphism_hyper::*;
|
||||
//!
|
||||
//! let client = SlackClient::new(SlackClientHyperConnector::new());
|
||||
//!
|
||||
|
|
@ -26,9 +25,6 @@
|
|||
//! ```ignore
|
||||
//!
|
||||
//! use slack_morphism::prelude::*;
|
||||
//! use slack_morphism_hyper::*;
|
||||
//! use slack_morphism_models::*;
|
||||
//!
|
||||
//!
|
||||
//!# async fn example() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
//!
|
||||
|
|
@ -82,8 +78,8 @@
|
|||
//!
|
||||
//! # Docs and examples
|
||||
//!
|
||||
//! Please follow to the official website: https://slack-rust.abdolence.dev
|
||||
//! Examples available at: https://github.com/abdolence/slack-morphism-rust/tree/master/src/hyper/examples
|
||||
//! Please follow to the official [website](https://slack-rust.abdolence.dev).
|
||||
//! Examples available on: [github](https://github.com/abdolence/slack-morphism-rust/tree/master/examples).
|
||||
//!
|
||||
|
||||
#![allow(clippy::new_without_default)]
|
||||
|
|
@ -93,6 +89,9 @@ pub use scroller::*;
|
|||
pub use socket_mode::*;
|
||||
pub use token::*;
|
||||
|
||||
mod models;
|
||||
pub use models::*;
|
||||
|
||||
pub mod api;
|
||||
mod client;
|
||||
pub mod errors;
|
||||
|
|
@ -103,4 +102,11 @@ pub mod signature_verifier;
|
|||
mod socket_mode;
|
||||
mod token;
|
||||
|
||||
#[cfg(feature = "hyper")]
|
||||
pub mod hyper_tokio;
|
||||
|
||||
// In next releases
|
||||
// #[cfg(feature = "axum")]
|
||||
// pub mod axum_support;
|
||||
|
||||
pub mod prelude;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
use crate::models::*;
|
||||
use crate::{ClientResult, SlackClient, SlackClientHttpConnector};
|
||||
use futures::executor::block_on;
|
||||
use futures::FutureExt;
|
||||
use rsb_derive::Builder;
|
||||
use slack_morphism_models::{SlackClientId, SlackClientSecret, SlackSigningSecret};
|
||||
use std::any::{Any, TypeId};
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::Debug;
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
[package]
|
||||
name = "slack-morphism-models"
|
||||
version = "0.42.0"
|
||||
authors = ["Abdulla Abdurakhmanov <me@abdolence.dev>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Slack Morphism Models"
|
||||
homepage = "https://github.com/abdolence/slack-morphism-rust"
|
||||
repository = "https://github.com/abdolence/slack-morphism-rust"
|
||||
documentation = "https://docs.rs/slack_morphism"
|
||||
keywords = ["slack", "client"]
|
||||
categories = ["api-bindings"]
|
||||
readme = "../../README.md"
|
||||
include = ["Cargo.toml", "src/**/*.rs", "../../README.md", "../../LICENSE"]
|
||||
|
||||
[lib]
|
||||
name = "slack_morphism_models"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_with = "1.14"
|
||||
rvstruct = "0.3"
|
||||
rsb_derive = "0.5"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
url = { version = "2.2", features = ["serde"]}
|
||||
|
||||
[package.metadata.release]
|
||||
disable-tag=true
|
||||
|
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
|||
use serde_with::skip_serializing_none;
|
||||
use url::Url;
|
||||
|
||||
use crate::common::*;
|
||||
use crate::*;
|
||||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Debug, PartialEq, Clone, Eq, Hash, Serialize, Deserialize, ValueStruct)]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
use crate::blocks::kit::SlackBlock;
|
||||
use crate::blocks::{SlackBlockId, SlackBlockPlainText, SlackBlockPlainTextOnly};
|
||||
use crate::common::SlackCallbackId;
|
||||
use crate::SlackCallbackId;
|
||||
use crate::*;
|
||||
use rsb_derive::Builder;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::common::*;
|
||||
use crate::*;
|
||||
|
||||
use rsb_derive::Builder;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
use crate::common::*;
|
||||
use crate::*;
|
||||
|
||||
use rsb_derive::Builder;
|
||||
use rvstruct::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::common::*;
|
||||
use crate::*;
|
||||
|
||||
use rsb_derive::Builder;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
use crate::common::*;
|
||||
use crate::*;
|
||||
|
||||
use rsb_derive::Builder;
|
||||
use rvstruct::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
use crate::common::*;
|
||||
use crate::*;
|
||||
|
||||
use crate::SlackUserId;
|
||||
use rsb_derive::Builder;
|
||||
use rvstruct::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
|
|
@ -3,8 +3,8 @@ use serde::{Deserialize, Serialize};
|
|||
use serde_with::skip_serializing_none;
|
||||
|
||||
use crate::blocks::*;
|
||||
use crate::common::*;
|
||||
use crate::messages::*;
|
||||
use crate::models::messages::*;
|
||||
use crate::*;
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -4,9 +4,9 @@ use serde_with::skip_serializing_none;
|
|||
use url::Url;
|
||||
|
||||
use crate::blocks::*;
|
||||
use crate::common::*;
|
||||
use crate::events::*;
|
||||
use crate::messages::*;
|
||||
use crate::models::messages::*;
|
||||
use crate::*;
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
use crate::blocks::*;
|
||||
use crate::common::*;
|
||||
use crate::events::SlackMessageEventType;
|
||||
use crate::*;
|
||||
use rsb_derive::Builder;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
|
@ -2,10 +2,10 @@ use rsb_derive::Builder;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
use crate::common::*;
|
||||
use crate::events::{
|
||||
SlackCommandEvent, SlackCommandEventResponse, SlackInteractionEvent, SlackPushEventCallback,
|
||||
};
|
||||
use crate::*;
|
||||
use rvstruct::*;
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
11
src/prelude.rs
Normal file
11
src/prelude.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
pub use super::api::*; // Slack Web API methods (chat, users, views, etc)
|
||||
pub use super::listener::*;
|
||||
pub use super::ratectl::*;
|
||||
pub use super::*; // access to network/client functions // Slack Events API listener (routes) implementation
|
||||
|
||||
pub use crate::models::blocks::*; // Slack Block Kit models
|
||||
pub use crate::models::events::*;
|
||||
pub use crate::models::*; // common Slack models like SlackUser, etc and macros // Slack Events Models
|
||||
|
||||
#[cfg(feature = "hyper")]
|
||||
pub use crate::hyper_tokio::*;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::models::SlackTeamId;
|
||||
use crate::ratectl::*;
|
||||
use slack_morphism_models::SlackTeamId;
|
||||
use std::collections::{BinaryHeap, HashMap};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
use crate::models::SlackSigningSecret;
|
||||
use ring::hmac;
|
||||
use rsb_derive::Builder;
|
||||
use rvstruct::*;
|
||||
use slack_morphism_models::SlackSigningSecret;
|
||||
use std::error::Error;
|
||||
use std::fmt::{Display, Formatter};
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
use crate::errors::*;
|
||||
use crate::listener::SlackClientEventsUserState;
|
||||
use crate::prelude::{SlackInteractionEvent, SlackPushEventCallback, UserCallbackFunction};
|
||||
use crate::events::*;
|
||||
use crate::listener::{SlackClientEventsUserState, UserCallbackFunction};
|
||||
use crate::models::events::{SlackCommandEvent, SlackCommandEventResponse};
|
||||
use crate::models::socket_mode::SlackSocketModeHelloEvent;
|
||||
use crate::{SlackClient, SlackClientHttpConnector, UserCallbackResult};
|
||||
use futures::future::BoxFuture;
|
||||
use slack_morphism_models::events::{SlackCommandEvent, SlackCommandEventResponse};
|
||||
use slack_morphism_models::socket_mode::SlackSocketModeHelloEvent;
|
||||
use std::future::Future;
|
||||
use std::sync::Arc;
|
||||
use tracing::*;
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
use crate::models::socket_mode::*;
|
||||
use crate::socket_mode::clients_manager::*;
|
||||
use crate::*;
|
||||
use async_trait::async_trait;
|
||||
use slack_morphism_models::socket_mode::*;
|
||||
use std::sync::{Arc, Weak};
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::listener::SlackClientEventsListenerEnvironment;
|
||||
use crate::socket_mode::wss_client_id::SlackSocketModeWssClientId;
|
||||
use slack_morphism_models::socket_mode::SlackSocketModeEvent;
|
||||
use tracing::*;
|
||||
|
||||
#[async_trait]
|
||||
|
|
@ -3,7 +3,7 @@ use rvstruct::ValueStruct;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
use slack_morphism_models::{SlackApiTokenScope, SlackTeamId};
|
||||
use crate::models::{SlackApiTokenScope, SlackTeamId};
|
||||
|
||||
#[derive(Eq, PartialEq, Hash, Clone, Serialize, Deserialize, ValueStruct)]
|
||||
pub struct SlackApiTokenValue(pub String);
|
||||
Loading…
Add table
Reference in a new issue