Compare commits

..
Author SHA1 Message Date
phoenix 798e196b8d bump: swoosh
swoosh pr / Rustfmt (pull_request) Successful in 42s
swoosh pr / Check (pull_request) Successful in 1m45s
Release Tagging / release (pull_request) Successful in 1m6s
swoosh pr / Clippy (pull_request) Successful in 2m11s
2026-07-10 11:39:06 -04:00
phoenix 7d550f3759 bump: textsender_models 2026-07-10 11:38:36 -04:00
phoenix 19b3c6860c cargo update 2026-07-10 11:38:17 -04:00
phoenix 2d665535c6 bump: time 2026-07-10 11:37:26 -04:00
phoenix ccf16b24a1 bump: base64-ng 2026-07-10 11:37:05 -04:00
phoenix b64de661f6 bump: rust ci 2026-07-10 11:35:51 -04:00
phoenix 6e3951b2f2 bump: rust 2026-07-10 11:35:06 -04:00
5 changed files with 37 additions and 63 deletions
Generated
+28 -28
View File
@@ -132,9 +132,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
[[package]]
name = "cc"
version = "1.2.67"
version = "1.2.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38"
checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996"
dependencies = [
"find-msvc-tools",
"jobserver",
@@ -1527,9 +1527,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.42"
version = "0.23.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138"
checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f"
dependencies = [
"aws-lc-rs",
"once_cell",
@@ -1630,22 +1630,6 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "schedtxt_models"
version = "0.5.3"
source = "git+ssh://git@git.kundeng.us/phoenix/schedtxt_models.git?tag=v0.5.3#597af4e84c082bb437cc94817bb19592614681a5"
dependencies = [
"const_format",
"dotenvy",
"josekit",
"serde",
"serde_json",
"sqlx",
"time",
"utoipa",
"uuid",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
@@ -2037,13 +2021,13 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "swoosh"
version = "0.5.4"
version = "0.5.3"
dependencies = [
"base64-ng",
"reqwest",
"schedtxt_models",
"serde",
"serde_json",
"textsender_models",
"time",
]
@@ -2112,6 +2096,22 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "textsender_models"
version = "0.5.2"
source = "git+ssh://git@git.kundeng.us/phoenix/textsender_models.git?tag=v0.5.2#02061bf7a380657b7bc76d64d1824388bef8e55a"
dependencies = [
"const_format",
"dotenvy",
"josekit",
"serde",
"serde_json",
"sqlx",
"time",
"utoipa",
"uuid",
]
[[package]]
name = "thiserror"
version = "2.0.18"
@@ -2174,9 +2174,9 @@ dependencies = [
[[package]]
name = "tinyvec"
version = "1.12.0"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"
checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
dependencies = [
"tinyvec_macros",
]
@@ -2413,9 +2413,9 @@ dependencies = [
[[package]]
name = "uuid"
version = "1.23.5"
version = "1.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a"
checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53"
dependencies = [
"getrandom 0.4.3",
"js-sys",
@@ -2780,6 +2780,6 @@ dependencies = [
[[package]]
name = "zmij"
version = "1.0.23"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+2 -3
View File
@@ -1,9 +1,8 @@
[package]
name = "swoosh"
version = "0.5.4"
version = "0.5.3"
edition = "2024"
rust-version = "1.97"
license = "MIT"
description = "Library to send text messages"
[dependencies]
@@ -12,6 +11,6 @@ serde_json = { version = "1.0.150" }
reqwest = { version = "0.13.4", features = ["form", "json", "blocking", "multipart", "stream"] }
time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] }
base64-ng = { version = "1.3.7" }
schedtxt_models = { git = "ssh://git@git.kundeng.us/phoenix/schedtxt_models.git", tag = "v0.5.3", features = ["config", "contact", "message"] }
textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.5.2", features = ["config", "contact", "message"] }
[dev-dependencies]
-22
View File
@@ -1,22 +0,0 @@
Copyright (c) 2026 Kun Deng.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
-3
View File
@@ -1,3 +0,0 @@
# swoosh
A library used to send text messages and is used in conjunction of the `schedtxt`
project.
+7 -7
View File
@@ -14,10 +14,10 @@ pub use send_message as send_mssage;
/// Send a message
pub async fn send_message(
msg: &schedtxt_models::message::Message,
contact: &schedtxt_models::contact::Contact,
msg: &textsender_models::message::Message,
contact: &textsender_models::contact::Contact,
param: &crate::twilio::types::Parameters,
config: &schedtxt_models::config::auxiliary::TwilioConfig,
config: &textsender_models::config::auxiliary::TwilioConfig,
) -> Result<reqwest::Response, std::io::Error> {
if config.account_sid.is_empty() {
Err(std::io::Error::other("Account SID is empty"))
@@ -145,9 +145,9 @@ pub fn initial_params(
}
fn init_params(
contact: &schedtxt_models::contact::Contact,
message: &schedtxt_models::message::Message,
config: &schedtxt_models::config::auxiliary::TwilioConfig,
contact: &textsender_models::contact::Contact,
message: &textsender_models::message::Message,
config: &textsender_models::config::auxiliary::TwilioConfig,
param: &crate::twilio::types::Parameters,
) -> std::collections::HashMap<String, String> {
let now = time::OffsetDateTime::now_utc();
@@ -213,7 +213,7 @@ fn convert_time_to_iso(time: time::OffsetDateTime) -> Result<String, time::error
}
fn generate_auth(
config: &schedtxt_models::config::auxiliary::TwilioConfig,
config: &textsender_models::config::auxiliary::TwilioConfig,
) -> Result<String, base64_ng::EncodeError> {
let input = format!("{}:{}", config.account_sid, config.auth_token);
match base64_ng::encode(input.as_bytes()) {