diff --git a/Cargo.lock b/Cargo.lock index 30eb871a67f0..4897549b1929 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9,12 +9,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ "bitflags 2.6.0", - "bytes 1.6.0", + "bytes 1.7.1", "futures-core", "futures-sink", "memchr", "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", "tracing", ] @@ -36,9 +36,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.6.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d223b13fd481fc0d1f83bb12659ae774d9e3601814c68a0bc539731698cca743" +checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" dependencies = [ "actix-codec", "actix-rt", @@ -46,16 +46,16 @@ dependencies = [ "actix-tls", "actix-utils", "ahash 0.8.11", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "brotli", - "bytes 1.6.0", + "bytes 1.7.1", "bytestring", "derive_more", "encoding_rs", "flate2", "futures-core", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "httparse", "httpdate", @@ -68,7 +68,7 @@ dependencies = [ "rand", "sha1", "smallvec 1.13.2", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", "tracing", "zstd", @@ -81,19 +81,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "actix-multipart" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b960e2aea75f49c8f069108063d12a48d329fc8b60b786dfc7552a9d5918d2d" +checksum = "d974dd6c4f78d102d057c672dcf6faa618fafa9df91d44f9c466688fc1275a3a" dependencies = [ "actix-multipart-derive", "actix-utils", "actix-web", - "bytes 1.6.0", + "bytes 1.7.1", "derive_more", "futures-core", "futures-util", @@ -102,11 +102,12 @@ dependencies = [ "log", "memchr", "mime", + "rand", "serde", "serde_json", "serde_plain", "tempfile", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -119,47 +120,49 @@ dependencies = [ "parse-size", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "actix-router" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", + "cfg-if 1.0.0", "http 0.2.12", "regex", + "regex-lite", "serde", "tracing", ] [[package]] name = "actix-rt" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" +checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" dependencies = [ "actix-macros", "futures-core", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] name = "actix-server" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" +checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" dependencies = [ "actix-rt", "actix-service", "actix-utils", "futures-core", "futures-util", - "mio 0.8.11", + "mio 1.0.2", "socket2", - "tokio 1.37.0", + "tokio 1.40.0", "tracing", ] @@ -176,9 +179,9 @@ dependencies = [ [[package]] name = "actix-tls" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4cce60a2f2b477bc72e5cde0af1812a6e82d8fd85b5570a5dcf2a5bf2c5be5f" +checksum = "ac453898d866cdbecdbc2334fe1738c747b4eba14a677261f2b768ba05329389" dependencies = [ "actix-rt", "actix-service", @@ -189,7 +192,7 @@ dependencies = [ "impl-more", "pin-project-lite", "rustls-pki-types", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-rustls 0.23.4", "tokio-rustls 0.25.0", "tokio-util", @@ -209,9 +212,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.5.1" +version = "4.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a6556ddebb638c2358714d853257ed226ece6023ef9364f23f0c70737ea984" +checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" dependencies = [ "actix-codec", "actix-http", @@ -224,7 +227,7 @@ dependencies = [ "actix-utils", "actix-web-codegen", "ahash 0.8.11", - "bytes 1.6.0", + "bytes 1.7.1", "bytestring", "cfg-if 1.0.0", "cookie 0.16.2", @@ -232,6 +235,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", + "impl-more", "itoa", "language-tags", "log", @@ -239,6 +243,7 @@ dependencies = [ "once_cell", "pin-project-lite", "regex", + "regex-lite", "serde", "serde_json", "serde_urlencoded", @@ -250,21 +255,21 @@ dependencies = [ [[package]] name = "actix-web-codegen" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -275,6 +280,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "ahash" version = "0.7.8" @@ -336,9 +347,9 @@ dependencies = [ "actix-web", "api_models", "async-trait", - "aws-config 1.1.9", + "aws-config 1.5.5", "aws-sdk-lambda", - "aws-smithy-types 1.1.8", + "aws-smithy-types 1.2.4", "bigdecimal", "common_enums", "common_utils", @@ -350,16 +361,16 @@ dependencies = [ "masking", "once_cell", "opensearch", - "reqwest", + "reqwest 0.11.27", "router_env", "serde", "serde_json", "sqlx", "storage_impl", - "strum 0.26.2", + "strum 0.26.3", "thiserror", "time", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -385,9 +396,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -400,33 +411,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -434,9 +445,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "api_models" @@ -448,16 +459,16 @@ dependencies = [ "common_utils", "error-stack", "euclid", - "indexmap 2.4.0", + "indexmap 2.5.0", "masking", "mime", "nutype", - "reqwest", + "reqwest 0.11.27", "router_derive", "rustc-hash", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "time", "url", "utoipa", @@ -483,21 +494,21 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "asn1-rs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -511,13 +522,13 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", "synstructure 0.13.1", ] @@ -529,7 +540,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -551,30 +562,32 @@ dependencies = [ "bb8", "diesel", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", "tracing", ] [[package]] name = "async-compression" -version = "0.4.6" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "flate2", "futures-core", "memchr", "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] name = "async-lock" -version = "2.8.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 2.5.3", + "event-listener", + "event-listener-strategy", + "pin-project-lite", ] [[package]] @@ -596,18 +609,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -620,10 +633,10 @@ dependencies = [ ] [[package]] -name = "atomic" -version = "0.5.3" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -633,9 +646,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "awc" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68c09cc97310b926f01621faee652f3d1b0962545a3cec6c9ac07def9ea36c2c" +checksum = "79049b2461279b886e46f1107efc347ebecc7b88d74d023dda010551a124967b" dependencies = [ "actix-codec", "actix-http", @@ -643,14 +656,14 @@ dependencies = [ "actix-service", "actix-tls", "actix-utils", - "base64 0.21.7", - "bytes 1.6.0", + "base64 0.22.1", + "bytes 1.7.1", "cfg-if 1.0.0", "cookie 0.16.2", "derive_more", "futures-core", "futures-util", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "itoa", "log", @@ -662,7 +675,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -682,14 +695,14 @@ dependencies = [ "aws-smithy-json 0.55.3", "aws-smithy-types 0.55.3", "aws-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "fastrand 1.9.0", "hex", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.30", "ring 0.16.20", "time", - "tokio 1.37.0", + "tokio 1.40.0", "tower", "tracing", "zeroize", @@ -697,30 +710,29 @@ dependencies = [ [[package]] name = "aws-config" -version = "1.1.9" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297b64446175a73987cedc3c438d79b2a654d0fff96f65ff530fbe039347644c" +checksum = "4e95816a168520d72c0e7680c405a5a8c1fb6a035b4bc4b9d7b0de8e1a941697" dependencies = [ - "aws-credential-types 1.1.8", + "aws-credential-types 1.2.1", "aws-runtime", - "aws-sdk-sso 1.18.0", + "aws-sdk-sso 1.40.0", "aws-sdk-ssooidc", - "aws-sdk-sts 1.18.0", - "aws-smithy-async 1.2.0", - "aws-smithy-http 0.60.7", + "aws-sdk-sts 1.40.0", + "aws-smithy-async 1.2.1", + "aws-smithy-http 0.60.10", "aws-smithy-json 0.60.7", "aws-smithy-runtime", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "aws-types 1.1.8", - "bytes 1.6.0", - "fastrand 2.0.2", + "aws-smithy-types 1.2.4", + "aws-types 1.3.3", + "bytes 1.7.1", + "fastrand 2.1.1", "hex", "http 0.2.12", - "hyper 0.14.28", "ring 0.17.8", "time", - "tokio 1.37.0", + "tokio 1.40.0", "tracing", "url", "zeroize", @@ -735,20 +747,20 @@ dependencies = [ "aws-smithy-async 0.55.3", "aws-smithy-types 0.55.3", "fastrand 1.9.0", - "tokio 1.37.0", + "tokio 1.40.0", "tracing", "zeroize", ] [[package]] name = "aws-credential-types" -version = "1.1.8" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8587ae17c8e967e4b05a62d495be2fb7701bec52a97f7acfe8a29f938384c8" +checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" dependencies = [ - "aws-smithy-async 1.2.0", + "aws-smithy-async 1.2.1", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", + "aws-smithy-types 1.2.4", "zeroize", ] @@ -776,7 +788,7 @@ dependencies = [ "aws-smithy-http 0.55.3", "aws-smithy-types 0.55.3", "aws-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "http-body 0.4.6", "lazy_static", @@ -787,22 +799,24 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.1.8" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13dc54b4b49f8288532334bba8f87386a40571c47c37b1304979b556dc613c8" +checksum = "2424565416eef55906f9f8cece2072b6b6a76075e3ff81483ebe938a89a4c05f" dependencies = [ - "aws-credential-types 1.1.8", - "aws-sigv4 1.2.0", - "aws-smithy-async 1.2.0", + "aws-credential-types 1.2.1", + "aws-sigv4 1.2.3", + "aws-smithy-async 1.2.1", "aws-smithy-eventstream 0.60.4", - "aws-smithy-http 0.60.7", + "aws-smithy-http 0.60.10", + "aws-smithy-runtime", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "aws-types 1.1.8", - "bytes 1.6.0", - "fastrand 2.0.2", + "aws-smithy-types 1.2.4", + "aws-types 1.3.3", + "bytes 1.7.1", + "fastrand 2.1.1", "http 0.2.12", "http-body 0.4.6", + "once_cell", "percent-encoding", "pin-project-lite", "tracing", @@ -826,7 +840,7 @@ dependencies = [ "aws-smithy-json 0.55.3", "aws-smithy-types 0.55.3", "aws-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "regex", "tokio-stream", @@ -836,21 +850,21 @@ dependencies = [ [[package]] name = "aws-sdk-lambda" -version = "1.18.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c5446405655a27f8f98974668f6e10b6740902afd5ab56045b464b9b9a845a" +checksum = "fd9e398f83bbd720e4bf785b9638f8c2189093da50edc2001966c53bf6d87b0c" dependencies = [ - "aws-credential-types 1.1.8", + "aws-credential-types 1.2.1", "aws-runtime", - "aws-smithy-async 1.2.0", + "aws-smithy-async 1.2.1", "aws-smithy-eventstream 0.60.4", - "aws-smithy-http 0.60.7", + "aws-smithy-http 0.60.10", "aws-smithy-json 0.60.7", "aws-smithy-runtime", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "aws-types 1.1.8", - "bytes 1.6.0", + "aws-smithy-types 1.2.4", + "aws-types 1.3.3", + "bytes 1.7.1", "http 0.2.12", "once_cell", "regex-lite", @@ -878,7 +892,7 @@ dependencies = [ "aws-smithy-types 0.55.3", "aws-smithy-xml 0.55.3", "aws-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "http-body 0.4.6", "once_cell", @@ -907,7 +921,7 @@ dependencies = [ "aws-smithy-json 0.55.3", "aws-smithy-types 0.55.3", "aws-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "regex", "tokio-stream", @@ -932,7 +946,7 @@ dependencies = [ "aws-smithy-json 0.55.3", "aws-smithy-types 0.55.3", "aws-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "regex", "tokio-stream", @@ -942,20 +956,20 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.18.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "019a07902c43b03167ea5df0182f0cb63fae89f9a9682c44d18cf2e4a042cb34" +checksum = "e5879bec6e74b648ce12f6085e7245417bc5f6d672781028384d2e494be3eb6d" dependencies = [ - "aws-credential-types 1.1.8", + "aws-credential-types 1.2.1", "aws-runtime", - "aws-smithy-async 1.2.0", - "aws-smithy-http 0.60.7", + "aws-smithy-async 1.2.1", + "aws-smithy-http 0.60.10", "aws-smithy-json 0.60.7", "aws-smithy-runtime", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "aws-types 1.1.8", - "bytes 1.6.0", + "aws-smithy-types 1.2.4", + "aws-types 1.3.3", + "bytes 1.7.1", "http 0.2.12", "once_cell", "regex-lite", @@ -964,20 +978,20 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.18.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c46ee08a48a7f4eaa4ad201dcc1dd537b49c50859d14d4510e00ad9d3f9af2" +checksum = "4ef4cd9362f638c22a3b959fd8df292e7e47fdf170270f86246b97109b5f2f7d" dependencies = [ - "aws-credential-types 1.1.8", + "aws-credential-types 1.2.1", "aws-runtime", - "aws-smithy-async 1.2.0", - "aws-smithy-http 0.60.7", + "aws-smithy-async 1.2.1", + "aws-smithy-http 0.60.10", "aws-smithy-json 0.60.7", "aws-smithy-runtime", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "aws-types 1.1.8", - "bytes 1.6.0", + "aws-smithy-types 1.2.4", + "aws-types 1.3.3", + "bytes 1.7.1", "http 0.2.12", "once_cell", "regex-lite", @@ -1003,7 +1017,7 @@ dependencies = [ "aws-smithy-types 0.55.3", "aws-smithy-xml 0.55.3", "aws-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "regex", "tower", @@ -1012,21 +1026,21 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.18.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f752ac730125ca6017f72f9db5ec1772c9ecc664f87aa7507a7d81b023c23713" +checksum = "0b1e2735d2ab28b35ecbb5496c9d41857f52a0d6a0075bbf6a8af306045ea6f6" dependencies = [ - "aws-credential-types 1.1.8", + "aws-credential-types 1.2.1", "aws-runtime", - "aws-smithy-async 1.2.0", - "aws-smithy-http 0.60.7", + "aws-smithy-async 1.2.1", + "aws-smithy-http 0.60.10", "aws-smithy-json 0.60.7", "aws-smithy-query 0.60.7", "aws-smithy-runtime", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "aws-smithy-xml 0.60.7", - "aws-types 1.1.8", + "aws-smithy-types 1.2.4", + "aws-smithy-xml 0.60.8", + "aws-types 1.3.3", "http 0.2.12", "once_cell", "regex-lite", @@ -1056,7 +1070,7 @@ checksum = "9d2ce6f507be68e968a33485ced670111d1cbad161ddbbab1e313c03d37d8f4c" dependencies = [ "aws-smithy-eventstream 0.55.3", "aws-smithy-http 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "form_urlencoded", "hex", "hmac", @@ -1071,16 +1085,16 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.0" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d6f29688a4be9895c0ba8bef861ad0c0dac5c15e9618b9b7a6c233990fc263" +checksum = "5df1b0fa6be58efe9d4ccc257df0a53b89cd8909e86591a13ca54817c87517be" dependencies = [ - "aws-credential-types 1.1.8", + "aws-credential-types 1.2.1", "aws-smithy-eventstream 0.60.4", - "aws-smithy-http 0.60.7", + "aws-smithy-http 0.60.10", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "bytes 1.6.0", + "aws-smithy-types 1.2.4", + "bytes 1.7.1", "form_urlencoded", "hex", "hmac", @@ -1101,19 +1115,19 @@ checksum = "13bda3996044c202d75b91afeb11a9afae9db9a721c6a7a427410018e286b880" dependencies = [ "futures-util", "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-stream", ] [[package]] name = "aws-smithy-async" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a41ccd6b74401a49ca828617049e5c23d83163d330a4f90a8081aadee0ac45" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" dependencies = [ "futures-util", "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -1124,7 +1138,7 @@ checksum = "07ed8b96d95402f3f6b8b57eb4e0e45ee365f78b1a924faf20ff6e97abf1eae6" dependencies = [ "aws-smithy-http 0.55.3", "aws-smithy-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "crc32c", "crc32fast", "hex", @@ -1147,16 +1161,16 @@ dependencies = [ "aws-smithy-http 0.55.3", "aws-smithy-http-tower", "aws-smithy-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "fastrand 1.9.0", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "hyper-rustls 0.23.2", "lazy_static", "pin-project-lite", "rustls 0.20.9", - "tokio 1.37.0", + "tokio 1.40.0", "tower", "tracing", ] @@ -1168,7 +1182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460c8da5110835e3d9a717c61f5556b20d03c32a1dec57f8fc559b360f733bb8" dependencies = [ "aws-smithy-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "crc32fast", ] @@ -1178,8 +1192,8 @@ version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6363078f927f612b970edf9d1903ef5cef9a64d1e8423525ebb1f0a1633c858" dependencies = [ - "aws-smithy-types 1.1.8", - "bytes 1.6.0", + "aws-smithy-types 1.2.4", + "bytes 1.7.1", "crc32fast", ] @@ -1191,31 +1205,31 @@ checksum = "2b3b693869133551f135e1f2c77cb0b8277d9e3e17feaf2213f735857c4f0d28" dependencies = [ "aws-smithy-eventstream 0.55.3", "aws-smithy-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "bytes-utils", "futures-core", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", "tracing", ] [[package]] name = "aws-smithy-http" -version = "0.60.7" +version = "0.60.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f10fa66956f01540051b0aa7ad54574640f748f9839e843442d99b970d3aff9" +checksum = "01dbcb6e2588fd64cfb6d7529661b06466419e4c54ed1c62d6510d2d0350a728" dependencies = [ "aws-smithy-eventstream 0.60.4", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "bytes 1.6.0", + "aws-smithy-types 1.2.4", + "bytes 1.7.1", "bytes-utils", "futures-core", "http 0.2.12", @@ -1235,7 +1249,7 @@ checksum = "3ae4f6c5798a247fac98a867698197d9ac22643596dc3777f0c76b91917616b9" dependencies = [ "aws-smithy-http 0.55.3", "aws-smithy-types 0.55.3", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "http-body 0.4.6", "pin-project-lite", @@ -1258,7 +1272,7 @@ version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" dependencies = [ - "aws-smithy-types 1.1.8", + "aws-smithy-types 1.2.4", ] [[package]] @@ -1277,48 +1291,50 @@ version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb" dependencies = [ - "aws-smithy-types 1.1.8", + "aws-smithy-types 1.2.4", "urlencoding", ] [[package]] name = "aws-smithy-runtime" -version = "1.1.8" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec81002d883e5a7fd2bb063d6fb51c4999eb55d404f4fff3dd878bf4733b9f01" +checksum = "d1ce695746394772e7000b39fe073095db6d45a862d0767dd5ad0ac0d7f8eb87" dependencies = [ - "aws-smithy-async 1.2.0", - "aws-smithy-http 0.60.7", + "aws-smithy-async 1.2.1", + "aws-smithy-http 0.60.10", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "bytes 1.6.0", - "fastrand 2.0.2", - "h2 0.3.25", + "aws-smithy-types 1.2.4", + "bytes 1.7.1", + "fastrand 2.1.1", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "http-body 1.0.1", + "httparse", + "hyper 0.14.30", "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls 0.21.10", - "tokio 1.37.0", + "rustls 0.21.12", + "tokio 1.40.0", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "1.2.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9acb931e0adaf5132de878f1398d83f8677f90ba70f01f65ff87f6d7244be1c5" +checksum = "e086682a53d3aa241192aa110fa8dfce98f2f5ac2ead0de84d41582c7e8fdb96" dependencies = [ - "aws-smithy-async 1.2.0", - "aws-smithy-types 1.1.8", - "bytes 1.6.0", + "aws-smithy-async 1.2.1", + "aws-smithy-types 1.2.4", + "bytes 1.7.1", "http 0.2.12", "http 1.1.0", "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", "tracing", "zeroize", ] @@ -1338,16 +1354,19 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.1.8" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe14dceea1e70101d38fbf2a99e6a34159477c0fb95e68e05c66bd7ae4c3729" +checksum = "273dcdfd762fae3e1650b8024624e7cd50e484e37abdab73a7a706188ad34543" dependencies = [ "base64-simd", - "bytes 1.6.0", + "bytes 1.7.1", "bytes-utils", "futures-core", "http 0.2.12", + "http 1.1.0", "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", "itoa", "num-integer", "pin-project-lite", @@ -1355,7 +1374,7 @@ dependencies = [ "ryu", "serde", "time", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", ] @@ -1370,9 +1389,9 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.7" +version = "0.60.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872c68cf019c0e4afc5de7753c4f7288ce4b71663212771bf5e4542eb9346ca9" +checksum = "d123fbc2a4adc3c301652ba8e149bf4bc1d1725affb9784eb20c953ace06bf55" dependencies = [ "xmlparser", ] @@ -1389,22 +1408,21 @@ dependencies = [ "aws-smithy-http 0.55.3", "aws-smithy-types 0.55.3", "http 0.2.12", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "tracing", ] [[package]] name = "aws-types" -version = "1.1.8" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dbf2f3da841a8930f159163175cf6a3d16ddde517c1b0fba7aa776822800f40" +checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" dependencies = [ - "aws-credential-types 1.1.8", - "aws-smithy-async 1.2.0", + "aws-credential-types 1.2.1", + "aws-smithy-async 1.2.1", "aws-smithy-runtime-api", - "aws-smithy-types 1.1.8", - "http 0.2.12", - "rustc_version 0.4.0", + "aws-smithy-types 1.2.4", + "rustc_version 0.4.1", "tracing", ] @@ -1417,11 +1435,11 @@ dependencies = [ "async-trait", "axum-core", "bitflags 1.3.2", - "bytes 1.6.0", + "bytes 1.7.1", "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -1430,7 +1448,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 0.1.2", "tower", "tower-layer", "tower-service", @@ -1443,7 +1461,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", - "bytes 1.6.0", + "bytes 1.7.1", "futures-util", "http 0.2.12", "http-body 0.4.6", @@ -1455,15 +1473,15 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -1500,9 +1518,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64-simd" @@ -1522,15 +1540,14 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bb8" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7c2093d15d6a1d33b1f972e1c5ea3177748742b97a5f392aa83a65262c6780" +checksum = "b10cf871f3ff2ce56432fddc2615ac7acc3aa22ca321f8fea800846fbb32f188" dependencies = [ "async-trait", - "futures-channel", "futures-util", "parking_lot 0.12.3", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -1609,15 +1626,15 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.1" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if 1.0.0", - "constant_time_eq 0.3.0", + "constant_time_eq 0.3.1", "serde", ] @@ -1632,9 +1649,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.3.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ "borsh-derive", "cfg_aliases", @@ -1642,23 +1659,23 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", "syn_derive", ] [[package]] name = "brotli" -version = "3.5.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1667,9 +1684,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.5.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1677,9 +1694,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -1713,17 +1730,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bytecount" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" - [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" [[package]] name = "byteorder" @@ -1731,6 +1742,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + [[package]] name = "bytes" version = "0.4.12" @@ -1743,9 +1760,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bytes-utils" @@ -1753,7 +1770,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "either", ] @@ -1763,14 +1780,14 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", ] [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -1791,24 +1808,11 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.14.2" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.22", "serde", - "serde_json", ] [[package]] @@ -1819,7 +1823,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -1833,9 +1837,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.14" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", @@ -1867,15 +1871,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1888,9 +1892,9 @@ dependencies = [ [[package]] name = "chrono-tz" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" +checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", "chrono-tz-build", @@ -1899,9 +1903,9 @@ dependencies = [ [[package]] name = "chrono-tz-build" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" +checksum = "0c088aee841df9c3041febbb73934cfc39708749bf96dc827e3359cd39ef11b1" dependencies = [ "parse-zoneinfo", "phf", @@ -1937,9 +1941,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -1947,33 +1951,33 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.10.0", + "strsim 0.11.1", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cloudabi" @@ -1986,9 +1990,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "common_enums" @@ -1998,7 +2002,7 @@ dependencies = [ "router_derive", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "thiserror", "utoipa", ] @@ -2008,9 +2012,9 @@ name = "common_utils" version = "0.1.0" dependencies = [ "async-trait", - "base64 0.22.0", + "base64 0.22.1", "blake3", - "bytes 1.6.0", + "bytes 1.7.1", "common_enums", "diesel", "error-stack", @@ -2026,25 +2030,25 @@ dependencies = [ "once_cell", "phonenumber", "proptest", - "quick-xml 0.31.0", + "quick-xml", "rand", "regex", - "reqwest", + "reqwest 0.11.27", "ring 0.17.8", "router_env", "rust_decimal", "rustc-hash", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "serde_urlencoded", "signal-hook", "signal-hook-tokio", - "strum 0.26.2", + "strum 0.26.3", "test-case", "thiserror", "time", - "tokio 1.37.0", + "tokio 1.40.0", "url", "utoipa", "uuid", @@ -2056,7 +2060,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", ] [[package]] @@ -2075,7 +2079,7 @@ dependencies = [ "rust-ini", "serde", "serde_json", - "toml 0.8.12", + "toml 0.8.19", "yaml-rust", ] @@ -2085,10 +2089,10 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_json", - "toml 0.8.12", + "toml 0.8.19", ] [[package]] @@ -2099,7 +2103,7 @@ dependencies = [ "common_utils", "serde", "serde_with", - "toml 0.8.12", + "toml 0.8.19", "utoipa", ] @@ -2137,9 +2141,9 @@ checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -2198,24 +2202,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] @@ -2234,18 +2238,18 @@ checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff" [[package]] name = "crc32c" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89254598aa9b9fa608de44b3ae54c810f0f06d755e24c50177f1f8f31ff50ce2" +checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" dependencies = [ - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if 1.0.0", ] @@ -2288,11 +2292,11 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", ] [[package]] @@ -2313,7 +2317,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ "crossbeam-epoch 0.9.18", - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", ] [[package]] @@ -2337,7 +2341,7 @@ version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", ] [[package]] @@ -2357,7 +2361,7 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", ] [[package]] @@ -2373,9 +2377,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -2448,7 +2452,7 @@ dependencies = [ "curve25519-dalek-derive", "digest", "fiat-crypto", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "subtle", "zeroize", ] @@ -2461,7 +2465,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -2509,7 +2513,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -2531,7 +2535,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -2549,9 +2553,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "deadpool" @@ -2562,20 +2566,20 @@ dependencies = [ "async-trait", "deadpool-runtime", "num_cpus", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] name = "deadpool-runtime" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" +checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468", @@ -2650,22 +2654,22 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 1.0.109", + "rustc_version 0.4.1", + "syn 2.0.77", ] [[package]] name = "deunicode" -version = "1.4.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e854126756c496b8c81dec88f9a706b15b875c5849d4097a3854476b9fdf94" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" [[package]] name = "diesel" @@ -2693,7 +2697,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -2722,7 +2726,7 @@ dependencies = [ "rustc-hash", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "thiserror", "time", ] @@ -2733,7 +2737,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -2750,13 +2754,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -2809,13 +2813,13 @@ dependencies = [ "mime", "once_cell", "redis_interface", - "reqwest", + "reqwest 0.11.27", "router_env", "serde", "serde_json", "serde_path_to_error", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -2829,7 +2833,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -2908,9 +2912,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if 1.0.0", ] @@ -2932,32 +2936,24 @@ dependencies = [ [[package]] name = "erased-serde" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b73807008a3c7f171cc40312f37d95ef0396e048b5848d775f54b1a4dd4a0d3" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" dependencies = [ "serde", + "typeid", ] [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", ] -[[package]] -name = "error-chain" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" -dependencies = [ - "version_check", -] - [[package]] name = "error-stack" version = "0.4.1" @@ -2965,7 +2961,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27a72baa257b5e0e2de241967bc5ee8f855d6072351042688621081d66b2a76b" dependencies = [ "anyhow", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "serde", ] @@ -2994,7 +2990,7 @@ dependencies = [ "rustc-hash", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "thiserror", "utoipa", ] @@ -3006,8 +3002,8 @@ dependencies = [ "proc-macro2", "quote", "rustc-hash", - "strum 0.26.2", - "syn 2.0.75", + "strum 0.26.3", + "syn 2.0.77", ] [[package]] @@ -3026,16 +3022,10 @@ dependencies = [ "ron-parser", "serde", "serde-wasm-bindgen 0.6.5", - "strum 0.26.2", + "strum 0.26.3", "wasm-bindgen", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "event-listener" version = "5.3.1" @@ -3047,6 +3037,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] + [[package]] name = "events" version = "0.1.0" @@ -3071,12 +3071,12 @@ dependencies = [ "aws-sdk-sesv2", "aws-sdk-sts 0.28.0", "aws-smithy-client", - "base64 0.22.0", + "base64 0.22.1", "common_utils", "dyn-clone", "error-stack", "hex", - "hyper 0.14.28", + "hyper 0.14.30", "hyper-proxy", "hyperswitch_interfaces", "masking", @@ -3084,7 +3084,7 @@ dependencies = [ "router_env", "serde", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", "vaultrs", ] @@ -3109,13 +3109,13 @@ dependencies = [ "futures-core", "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.30", "hyper-rustls 0.23.2", "mime", "serde", "serde_json", "time", - "tokio 1.37.0", + "tokio 1.40.0", "url", "webdriver", ] @@ -3131,9 +3131,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fdeflate" @@ -3160,20 +3160,14 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -3234,7 +3228,7 @@ checksum = "b99c2b48934cd02a81032dd7428b7ae831a27794275bc94eba367418db8a9e55" dependencies = [ "arc-swap", "async-trait", - "bytes 1.6.0", + "bytes 1.7.1", "bytes-utils", "float-cmp", "futures 0.3.30", @@ -3243,9 +3237,9 @@ dependencies = [ "parking_lot 0.12.3", "rand", "redis-protocol", - "semver 1.0.22", + "semver 1.0.23", "socket2", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-stream", "tokio-util", "tracing", @@ -3349,7 +3343,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -3418,15 +3412,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "git2" -version = "0.18.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ "bitflags 2.6.0", "libc", @@ -3450,8 +3444,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -3465,6 +3459,17 @@ dependencies = [ "walkdir", ] +[[package]] +name = "globwalk" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" +dependencies = [ + "bitflags 2.6.0", + "ignore", + "walkdir", +] + [[package]] name = "graphviz-rust" version = "0.6.6" @@ -3494,47 +3499,47 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "fnv", "futures-core", "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.4.0", + "indexmap 2.5.0", "slab", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", "tracing", ] [[package]] name = "h2" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ - "bytes 1.6.0", + "atomic-waker", + "bytes 1.7.1", "fnv", "futures-core", "futures-sink", - "futures-util", "http 1.1.0", - "indexmap 2.4.0", + "indexmap 2.5.0", "slab", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", "tracing", ] [[package]] name = "half" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if 1.0.0", "crunchy", @@ -3581,7 +3586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ "base64 0.21.7", - "bytes 1.6.0", + "bytes 1.7.1", "headers-core", "http 0.2.12", "httpdate", @@ -3616,6 +3621,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -3666,7 +3677,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "fnv", "itoa", ] @@ -3677,7 +3688,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "fnv", "itoa", ] @@ -3688,39 +3699,39 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "http 1.1.0", ] [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes 1.6.0", - "futures-core", + "bytes 1.7.1", + "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -3739,15 +3750,15 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "futures-channel", "futures-core", "futures-util", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -3755,7 +3766,7 @@ dependencies = [ "itoa", "pin-project-lite", "socket2", - "tokio 1.37.0", + "tokio 1.40.0", "tower-service", "tracing", "want", @@ -3763,22 +3774,22 @@ dependencies = [ [[package]] name = "hyper" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "futures-channel", "futures-util", - "h2 0.4.3", + "h2 0.4.6", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", "smallvec 1.13.2", - "tokio 1.37.0", + "tokio 1.40.0", "want", ] @@ -3788,14 +3799,14 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "futures 0.3.30", "headers", "http 0.2.12", - "hyper 0.14.28", - "hyper-tls", + "hyper 0.14.30", + "hyper-tls 0.5.0", "native-tls", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-native-tls", "tower-service", ] @@ -3807,11 +3818,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.30", "log", "rustls 0.20.9", "rustls-native-certs", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-rustls 0.23.4", ] @@ -3823,11 +3834,11 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.30", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-rustls 0.24.1", ] @@ -3837,9 +3848,9 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.28", + "hyper 0.14.30", "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-io-timeout", ] @@ -3849,27 +3860,47 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.6.0", - "hyper 0.14.28", + "bytes 1.7.1", + "hyper 0.14.30", "native-tls", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-native-tls", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes 1.7.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "native-tls", + "tokio 1.40.0", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", + "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", - "hyper 1.2.0", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", "socket2", - "tokio 1.37.0", + "tokio 1.40.0", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -3880,7 +3911,7 @@ dependencies = [ "actix-web", "api_models", "async-trait", - "base64 0.22.0", + "base64 0.22.1", "cards", "common_enums", "common_utils", @@ -3897,7 +3928,7 @@ dependencies = [ "router_env", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "time", "url", "uuid", @@ -3950,7 +3981,7 @@ dependencies = [ "actix-web", "api_models", "async-trait", - "bytes 1.6.0", + "bytes 1.7.1", "common_enums", "common_utils", "dyn-clone", @@ -3960,12 +3991,12 @@ dependencies = [ "masking", "mime", "once_cell", - "reqwest", + "reqwest 0.11.27", "router_derive", "router_env", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "thiserror", "time", ] @@ -4019,7 +4050,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.7", "same-file", "walkdir", "winapi-util", @@ -4027,12 +4058,12 @@ dependencies = [ [[package]] name = "image" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" +checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "num-traits", "png", ] @@ -4056,9 +4087,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -4076,9 +4107,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if 1.0.0", ] @@ -4122,20 +4153,20 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "iso_country" @@ -4209,12 +4240,12 @@ dependencies = [ [[package]] name = "josekit" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0953340cf63354cec4a385f1fbcb3f409a5823778cae236078892f6030ed4565" +checksum = "54b85e2125819afc4fd2ae57416207e792c7e12797858e5db2a6c6f24a166829" dependencies = [ "anyhow", - "base64 0.21.7", + "base64 0.22.1", "flate2", "once_cell", "openssl", @@ -4227,9 +4258,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -4247,9 +4278,9 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "9.2.0" +version = "9.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" dependencies = [ "base64 0.21.7", "js-sys", @@ -4283,7 +4314,7 @@ dependencies = [ "masking", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "thiserror", ] @@ -4305,7 +4336,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -4316,24 +4347,24 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin 0.9.8", ] [[package]] name = "libc" -version = "0.2.157" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374af5f94e54fa97cf75e945cce8a6b201e88a1a07e688b47dfd2a59c66dbd86" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libgit2-sys" -version = "0.16.2+1.7.2" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", @@ -4349,9 +4380,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libmimalloc-sys" -version = "0.1.35" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" +checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" dependencies = [ "cc", "libc", @@ -4376,9 +4407,9 @@ checksum = "64804cc6a5042d4f05379909ba25b503ec04e2c082151d62122d5dcaa274b961" [[package]] name = "libz-sys" -version = "1.1.16" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -4394,9 +4425,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "local-channel" @@ -4453,9 +4484,9 @@ dependencies = [ name = "masking" version = "0.1.0" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "diesel", - "erased-serde 0.4.4", + "erased-serde 0.4.5", "serde", "serde_json", "subtle", @@ -4500,7 +4531,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -4547,7 +4578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", - "toml 0.8.12", + "toml 0.8.19", ] [[package]] @@ -4563,9 +4594,9 @@ dependencies = [ [[package]] name = "mimalloc" -version = "0.1.39" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" +checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" dependencies = [ "libmimalloc-sys", ] @@ -4578,9 +4609,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -4594,14 +4625,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", "simd-adler32", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "0.6.23" @@ -4623,14 +4663,15 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "log", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4658,21 +4699,21 @@ dependencies = [ [[package]] name = "moka" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1911e88d5831f748a4097a43862d129e3c6fca831eecac9b8db6d01d93c9de2" +checksum = "9e0d88686dc561d743b40de8269b26eaf0dc58781bde087b0984646602021d08" dependencies = [ "async-lock", "async-trait", "crossbeam-channel", "crossbeam-epoch 0.9.18", - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", + "event-listener", "futures-util", "once_cell", "parking_lot 0.12.3", "quanta", - "rustc_version 0.4.0", - "skeptic", + "rustc_version 0.4.1", "smallvec 1.13.2", "tagptr", "thiserror", @@ -4697,11 +4738,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -4755,11 +4795,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -4798,9 +4837,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -4823,7 +4862,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] @@ -4859,24 +4898,24 @@ dependencies = [ [[package]] name = "nutype" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801187d4ee2f03db47daf0f5fc335a7b1b94f60f47942293060b762641b83f2e" +checksum = "362399c4581483ed2813c9b05dd6bcd903c60e61005c4b838c65ae755be69dd6" dependencies = [ "nutype_macros", ] [[package]] name = "nutype_macros" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96467936d36285839340d692fcd974106d9bc203e36f55a477e0243737a8af7" +checksum = "0625bcc0c714bdf12a451c4f6510b949abb095d98cc3cc8fe3812a8100ca6592" dependencies = [ "cfg-if 1.0.0", "kinded", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", "urlencoding", ] @@ -4891,7 +4930,7 @@ dependencies = [ "getrandom", "http 0.2.12", "rand", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "serde_path_to_error", @@ -4902,18 +4941,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] [[package]] name = "oid-registry" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ "asn1-rs", ] @@ -4932,9 +4971,9 @@ checksum = "44d11de466f4a3006fe8a5e7ec84e93b79c70cb992ae0aa0eb631ad2df8abfe2" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openapi" @@ -4981,21 +5020,21 @@ dependencies = [ [[package]] name = "opensearch" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd2846759315751e04d8b45a0bdbd89ce442282ffb916cf54f6b0adf8df4b44c" +checksum = "a62b025c3503d3d53eaba3b6f14adb955af9f69fc71141b4d030a4e5331f5d42" dependencies = [ - "aws-credential-types 1.1.8", - "aws-sigv4 1.2.0", + "aws-credential-types 1.2.1", + "aws-sigv4 1.2.3", "aws-smithy-runtime-api", - "aws-types 1.1.8", - "base64 0.21.7", - "bytes 1.6.0", + "aws-types 1.3.3", + "base64 0.22.1", + "bytes 1.7.1", "dyn-clone", "lazy_static", "percent-encoding", - "reqwest", - "rustc_version 0.4.0", + "reqwest 0.12.7", + "rustc_version 0.4.1", "serde", "serde_json", "serde_with", @@ -5005,9 +5044,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if 1.0.0", @@ -5026,7 +5065,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -5037,9 +5076,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -5071,7 +5110,7 @@ dependencies = [ "opentelemetry-proto", "prost", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", "tonic", ] @@ -5122,7 +5161,7 @@ dependencies = [ "percent-encoding", "rand", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-stream", ] @@ -5244,9 +5283,9 @@ checksum = "944553dd59c802559559161f9816429058b869003836120e262e8caec061b7ae" [[package]] name = "parse-zoneinfo" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" dependencies = [ "regex", ] @@ -5264,9 +5303,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -5276,11 +5315,11 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" [[package]] name = "pem" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "serde", ] @@ -5301,9 +5340,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.8" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -5312,9 +5351,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.8" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -5322,22 +5361,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.8" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "pest_meta" -version = "2.7.8" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -5384,22 +5423,22 @@ dependencies = [ [[package]] name = "phonenumber" -version = "0.3.3+8.13.9" +version = "0.3.6+8.13.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "635f3e6288e4f01c049d89332a031bd74f25d64b6fb94703ca966e819488cd06" +checksum = "11756237b57b8cc5e97dc8b1e70ea436324d30e7075de63b14fd15073a8f692a" dependencies = [ "bincode", "either", "fnv", - "itertools 0.11.0", + "itertools 0.12.1", "lazy_static", "nom", - "quick-xml 0.28.2", + "quick-xml", "regex", "regex-cache", "serde", "serde_derive", - "strum 0.24.1", + "strum 0.26.3", "thiserror", ] @@ -5420,7 +5459,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -5464,9 +5503,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" dependencies = [ "num-traits", "plotters-backend", @@ -5477,15 +5516,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" dependencies = [ "plotters-backend", ] @@ -5496,7 +5535,7 @@ version = "0.1.0" dependencies = [ "api_models", "async-trait", - "bytes 1.6.0", + "bytes 1.7.1", "common_enums", "common_utils", "error-stack", @@ -5505,7 +5544,7 @@ dependencies = [ "mime", "serde", "serde_json", - "strum 0.26.2", + "strum 0.26.3", "thiserror", ] @@ -5519,7 +5558,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.4", ] [[package]] @@ -5530,9 +5569,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pq-sys" @@ -5564,11 +5606,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -5606,9 +5648,9 @@ dependencies = [ [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", @@ -5618,7 +5660,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "rusty-fork", "tempfile", "unarray", @@ -5630,7 +5672,7 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "prost-derive", ] @@ -5667,33 +5709,22 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "pulldown-cmark" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" -dependencies = [ - "bitflags 2.6.0", - "memchr", - "unicase", -] - [[package]] name = "qrcode" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e719ca51966ff9f5a8436edb00d6115b3c606a0bb27c8f8ca74a38ff2b036d" +checksum = "d68782463e408eb1e668cf6152704bd856c78c5b6417adaee3203d8f4c1fc9ec" dependencies = [ "image", ] [[package]] name = "quanta" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" dependencies = [ - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", "libc", "once_cell", "raw-cpuid", @@ -5708,15 +5739,6 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-xml" -version = "0.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.31.0" @@ -5729,9 +5751,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -5794,9 +5816,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.0.1" +version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" +checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" dependencies = [ "bitflags 2.6.0", ] @@ -5818,7 +5840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque 0.8.5", - "crossbeam-utils 0.8.19", + "crossbeam-utils 0.8.20", ] [[package]] @@ -5836,7 +5858,7 @@ dependencies = [ "serde_derive", "serde_json", "slab", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -5857,7 +5879,7 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c31deddf734dc0a39d3112e73490e88b61a05e83e074d211f348404cee4d2c6" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "bytes-utils", "cookie-factory", "crc16", @@ -5875,7 +5897,7 @@ dependencies = [ "futures 0.3.30", "serde", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-stream", "tracing", ] @@ -5906,14 +5928,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -5927,13 +5949,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -5950,9 +5972,9 @@ dependencies = [ [[package]] name = "regex-lite" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" @@ -5962,9 +5984,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rend" @@ -5983,16 +6005,16 @@ checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "async-compression", "base64 0.21.7", - "bytes 1.6.0", + "bytes 1.7.1", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "hyper-rustls 0.24.2", - "hyper-tls", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -6002,14 +6024,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-native-tls", "tokio-rustls 0.24.1", "tokio-util", @@ -6022,6 +6044,47 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +dependencies = [ + "async-compression", + "base64 0.22.1", + "bytes 1.7.1", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.1.3", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio 1.40.0", + "tokio-native-tls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -6064,13 +6127,13 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", - "bytes 1.6.0", + "bytes 1.7.1", "hashbrown 0.12.3", "ptr_meta", "rend", @@ -6082,9 +6145,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -6131,10 +6194,10 @@ dependencies = [ "async-bb8-diesel", "async-trait", "awc", - "base64 0.22.0", + "base64 0.22.1", "bb8", "blake3", - "bytes 1.6.0", + "bytes 1.7.1", "cards", "clap", "common_enums", @@ -6156,7 +6219,7 @@ dependencies = [ "futures 0.3.30", "hex", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.30", "hyperswitch_connectors", "hyperswitch_constraint_graph", "hyperswitch_domain_models", @@ -6180,13 +6243,13 @@ dependencies = [ "openssl", "pm_auth", "qrcode", - "quick-xml 0.31.0", + "quick-xml", "rand", "rand_chacha", "rdkafka", "redis_interface", "regex", - "reqwest", + "reqwest 0.11.27", "ring 0.17.8", "router_derive", "router_env", @@ -6195,7 +6258,7 @@ dependencies = [ "rust_decimal", "rustc-hash", "rustls 0.22.4", - "rustls-pemfile 2.1.2", + "rustls-pemfile 2.1.3", "scheduler", "serde", "serde_json", @@ -6207,12 +6270,12 @@ dependencies = [ "serial_test", "sha1", "storage_impl", - "strum 0.26.2", + "strum 0.26.3", "tera", "test_utils", "thiserror", "time", - "tokio 1.37.0", + "tokio 1.40.0", "totp-rs", "tracing-futures", "unicode-segmentation", @@ -6232,13 +6295,13 @@ dependencies = [ "common_utils", "diesel", "error-stack", - "indexmap 2.4.0", + "indexmap 2.5.0", "proc-macro2", "quote", "serde", "serde_json", - "strum 0.26.2", - "syn 2.0.75", + "strum 0.26.3", + "syn 2.0.77", "utoipa", ] @@ -6246,7 +6309,7 @@ dependencies = [ name = "router_env" version = "0.1.0" dependencies = [ - "cargo_metadata 0.18.1", + "cargo_metadata", "config", "error-stack", "gethostname", @@ -6257,9 +6320,9 @@ dependencies = [ "serde", "serde_json", "serde_path_to_error", - "strum 0.26.2", + "strum 0.26.3", "time", - "tokio 1.37.0", + "tokio 1.40.0", "tracing", "tracing-actix-web", "tracing-appender", @@ -6300,7 +6363,7 @@ name = "rust-i18n" version = "3.1.1" source = "git+https://github.com/kashif-m/rust-i18n?rev=f2d8096aaaff7a87a847c35a5394c269f75e077a#f2d8096aaaff7a87a847c35a5394c269f75e077a" dependencies = [ - "globwalk", + "globwalk 0.8.1", "once_cell", "regex", "rust-i18n-macro", @@ -6321,7 +6384,7 @@ dependencies = [ "serde", "serde_json", "serde_yml", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -6331,7 +6394,7 @@ source = "git+https://github.com/kashif-m/rust-i18n?rev=f2d8096aaaff7a87a847c35a dependencies = [ "arc-swap", "base62", - "globwalk", + "globwalk 0.8.1", "itertools 0.11.0", "lazy_static", "normpath", @@ -6358,13 +6421,13 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "borsh", - "bytes 1.6.0", + "bytes 1.7.1", "num-traits", "rand", "rkyv", @@ -6374,9 +6437,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -6395,11 +6458,11 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.22", + "semver 1.0.23", ] [[package]] @@ -6419,9 +6482,9 @@ checksum = "e9c02e25271068de581e03ac3bb44db60165ff1a10d92b9530192ccb898bc706" dependencies = [ "anyhow", "async-trait", - "bytes 1.6.0", + "bytes 1.7.1", "http 0.2.12", - "reqwest", + "reqwest 0.11.27", "rustify_derive", "serde", "serde_json", @@ -6433,9 +6496,9 @@ dependencies = [ [[package]] name = "rustify_derive" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58135536c18c04f4634bedad182a3f41baf33ef811cc38a3ec7b7061c57134c8" +checksum = "7345f32672da54338227b727bd578c897859ddfaad8952e0b0d787fb4e58f07d" dependencies = [ "proc-macro2", "quote", @@ -6447,9 +6510,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -6472,9 +6535,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", @@ -6491,7 +6554,7 @@ dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.5", + "rustls-webpki 0.102.7", "subtle", "zeroize", ] @@ -6519,19 +6582,19 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -6545,9 +6608,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -6556,9 +6619,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rusty-fork" @@ -6595,6 +6658,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scc" +version = "2.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb7ac86243095b70a7920639507b71d51a63390d1ba26c4f60a552fbb914a37" +dependencies = [ + "sdd", +] + [[package]] name = "schannel" version = "0.1.23" @@ -6632,10 +6704,10 @@ dependencies = [ "serde", "serde_json", "storage_impl", - "strum 0.26.2", + "strum 0.26.3", "thiserror", "time", - "tokio 1.37.0", + "tokio 1.40.0", "uuid", ] @@ -6655,6 +6727,12 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "sdd" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0495e4577c672de8254beb68d01a9b62d0e8a13c099edecdbedccce3223cd29f" + [[package]] name = "seahash" version = "4.1.0" @@ -6677,11 +6755,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -6690,9 +6768,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -6709,9 +6787,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -6724,9 +6802,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -6765,22 +6843,22 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.125" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "itoa", "memchr", "ryu", @@ -6825,14 +6903,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -6851,15 +6929,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.7.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_derive", "serde_json", @@ -6869,14 +6947,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.7.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -6885,7 +6963,7 @@ version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e76bab63c3fd98d27c17f9cbce177f64a91f5e69ac04cafe04e1bb25d1dc3c" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "itoa", "libyml", "log", @@ -6898,27 +6976,27 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.0.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ad9342b3aaca7cb43c45c097dd008d4907070394bd0751a0aa8817e5a018d" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" dependencies = [ - "dashmap", "futures 0.3.30", - "lazy_static", "log", + "once_cell", "parking_lot 0.12.3", + "scc", "serial_test_derive", ] [[package]] name = "serial_test_derive" -version = "3.0.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -6970,9 +7048,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -6986,7 +7064,7 @@ dependencies = [ "futures-core", "libc", "signal-hook", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -7035,21 +7113,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" -[[package]] -name = "skeptic" -version = "0.13.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" -dependencies = [ - "bytecount", - "cargo_metadata 0.14.2", - "error-chain", - "glob", - "pulldown-cmark", - "tempfile", - "walkdir", -] - [[package]] name = "slab" version = "0.4.9" @@ -7061,9 +7124,9 @@ dependencies = [ [[package]] name = "slug" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" dependencies = [ "deunicode", "wasm-bindgen", @@ -7089,9 +7152,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -7124,11 +7187,10 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" dependencies = [ - "itertools 0.12.1", "nom", "unicode_categories", ] @@ -7155,11 +7217,11 @@ dependencies = [ "atoi", "bigdecimal", "byteorder", - "bytes 1.6.0", + "bytes 1.7.1", "crc", "crossbeam-queue 0.3.11", "either", - "event-listener 5.3.1", + "event-listener", "futures-channel", "futures-core", "futures-intrusive", @@ -7168,7 +7230,7 @@ dependencies = [ "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 2.4.0", + "indexmap 2.5.0", "log", "memchr", "native-tls", @@ -7182,7 +7244,7 @@ dependencies = [ "sqlformat", "thiserror", "time", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-stream", "tracing", "url", @@ -7198,7 +7260,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -7221,9 +7283,9 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.75", + "syn 2.0.77", "tempfile", - "tokio 1.37.0", + "tokio 1.40.0", "url", ] @@ -7234,11 +7296,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "936cac0ab331b14cb3921c62156d913e4c15b74fb6ec0f3146bd4ef6e4fb3c12" dependencies = [ "atoi", - "base64 0.22.0", + "base64 0.22.1", "bigdecimal", "bitflags 2.6.0", "byteorder", - "bytes 1.6.0", + "bytes 1.7.1", "crc", "digest", "dotenvy", @@ -7278,7 +7340,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9734dbce698c67ecf67c442f768a5e90a49b2a4d61a9f1d59f73874bd4cf0710" dependencies = [ "atoi", - "base64 0.22.0", + "base64 0.22.1", "bigdecimal", "bitflags 2.6.0", "byteorder", @@ -7350,7 +7412,7 @@ dependencies = [ "async-bb8-diesel", "async-trait", "bb8", - "bytes 1.6.0", + "bytes 1.7.1", "common_enums", "common_utils", "config", @@ -7370,7 +7432,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -7384,13 +7446,13 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -7405,15 +7467,6 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros 0.24.3", -] - [[package]] name = "strum" version = "0.25.0" @@ -7425,24 +7478,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.2", -] - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", + "strum_macros 0.26.4", ] [[package]] @@ -7455,27 +7495,27 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -7490,9 +7530,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -7508,7 +7548,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -7517,6 +7557,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -7537,7 +7586,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -7575,25 +7624,26 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if 1.0.0", - "fastrand 2.0.2", + "fastrand 2.1.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "tera" -version = "1.19.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970dff17c11e884a4a09bc76e3a17ef71e01bb13447a11e85226e254fe6d10b8" +checksum = "ab9d851b45e865f178319da0abdbfe6acbc4328759ff18dafc3a41c16b4cd2ee" dependencies = [ "chrono", "chrono-tz", - "globwalk", + "globwalk 0.9.1", "humansize", "lazy_static", "percent-encoding", @@ -7625,7 +7675,7 @@ dependencies = [ "cfg-if 1.0.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -7636,7 +7686,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", "test-case-core", ] @@ -7646,20 +7696,20 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "base64 0.22.0", + "base64 0.22.1", "clap", "masking", "rand", "regex", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "serde_urlencoded", "serial_test", "thirtyfour", "time", - "tokio 1.37.0", - "toml 0.8.12", + "tokio 1.40.0", + "toml 0.8.19", ] [[package]] @@ -7683,41 +7733,40 @@ dependencies = [ "stringmatch", "thirtyfour-macros", "thiserror", - "tokio 1.37.0", + "tokio 1.40.0", "url", "urlparse", ] [[package]] name = "thirtyfour-macros" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cae91d1c7c61ec65817f1064954640ee350a50ae6548ff9a1bdd2489d6ffbb0" +checksum = "b72d056365e368fc57a56d0cec9e41b02fb4a3474a61c8735262b1cfebe67425" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -7784,9 +7833,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -7823,21 +7872,20 @@ dependencies = [ [[package]] name = "tokio" -version = "1.37.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", - "bytes 1.6.0", + "bytes 1.7.1", "libc", - "mio 0.8.11", - "num_cpus", + "mio 1.0.2", "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7900,18 +7948,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -7921,7 +7969,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -7950,7 +7998,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ "rustls 0.20.9", - "tokio 1.37.0", + "tokio 1.40.0", "webpki", ] @@ -7960,8 +8008,8 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", - "tokio 1.37.0", + "rustls 0.21.12", + "tokio 1.40.0", ] [[package]] @@ -7972,7 +8020,7 @@ checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ "rustls 0.22.4", "rustls-pki-types", - "tokio 1.37.0", + "tokio 1.40.0", ] [[package]] @@ -7983,7 +8031,7 @@ checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", ] @@ -8075,16 +8123,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ - "bytes 1.6.0", + "bytes 1.7.1", "futures-core", "futures-sink", "pin-project-lite", - "tokio 1.37.0", - "tracing", + "tokio 1.40.0", ] [[package]] @@ -8110,22 +8157,22 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.9", + "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -8136,7 +8183,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -8145,26 +8192,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.4.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" -dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.5", + "winnow 0.6.18", ] [[package]] @@ -8177,19 +8213,19 @@ dependencies = [ "async-trait", "axum", "base64 0.13.1", - "bytes 1.6.0", + "bytes 1.7.1", "futures-core", "futures-util", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.30", "hyper-timeout", "percent-encoding", "pin-project", "prost", "prost-derive", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-stream", "tokio-util", "tower", @@ -8201,9 +8237,9 @@ dependencies = [ [[package]] name = "totp-rs" -version = "5.5.1" +version = "5.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4ae9724c5888c0417d2396037ed3b60665925624766416e3e342b6ba5dbd3f" +checksum = "17b2f27dad992486c26b4e7455f38aa487e838d6d61b57e72906ee2b8c287a90" dependencies = [ "base32", "constant_time_eq 0.2.6", @@ -8228,7 +8264,7 @@ dependencies = [ "pin-project-lite", "rand", "slab", - "tokio 1.37.0", + "tokio 1.40.0", "tokio-util", "tower-layer", "tower-service", @@ -8237,15 +8273,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -8261,9 +8297,9 @@ dependencies = [ [[package]] name = "tracing-actix-web" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa069bd1503dd526ee793bb3fce408895136c95fc86d2edb2acf1c646d7f0684" +checksum = "4ee9e39a66d9b615644893ffc1704d2a89b5b315b7fd0228ad3182ca9a306b19" dependencies = [ "actix-web", "mutually_exclusive_features", @@ -8294,7 +8330,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] @@ -8387,9 +8423,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" dependencies = [ "arc-swap", "serde", @@ -8402,6 +8438,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typeid" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" + [[package]] name = "typenum" version = "1.17.0" @@ -8500,6 +8542,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" + [[package]] name = "unicode-segmentation" version = "1.11.0" @@ -8508,9 +8556,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "unicode_categories" @@ -8538,9 +8586,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -8562,17 +8610,17 @@ checksum = "110352d4e9076c67839003c7788d8604e24dcded13e0b375af3efaa8cf468517" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "utoipa" -version = "4.2.0" +version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "272ebdfbc99111033031d2f10e018836056e4d2c8e2acda76450ec7974269fa7" +checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_json", "utoipa-gen", @@ -8580,23 +8628,22 @@ dependencies = [ [[package]] name = "utoipa-gen" -version = "4.2.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c9f4d08338c1bfa70dde39412a040a884c6f318b3d09aaaf3437a1e52027fc" +checksum = "7bf0e16c02bc4bf5322ab65f10ab1149bdbcaa782cba66dc7057370a3f8190be" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ - "atomic", "getrandom", ] @@ -8628,10 +8675,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb996bb053adadc767f8b0bda2a80bc2b67d24fe89f2b959ae919e200d79a19" dependencies = [ "async-trait", - "bytes 1.6.0", + "bytes 1.7.1", "derive_builder", "http 0.2.12", - "reqwest", + "reqwest 0.11.27", "rustify", "rustify_derive", "serde", @@ -8649,16 +8696,16 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.3.1" +version = "8.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" dependencies = [ "anyhow", - "cargo_metadata 0.18.1", + "cargo_metadata", "cfg-if 1.0.0", "git2", "regex", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "rustversion", "time", ] @@ -8723,34 +8770,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if 1.0.0", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -8760,9 +8808,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8770,28 +8818,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -8804,7 +8852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9973cb72c8587d5ad5efdb91e663d36177dc37725e6c90ca86c626b0cc45c93f" dependencies = [ "base64 0.13.1", - "bytes 1.6.0", + "bytes 1.7.1", "cookie 0.16.2", "http 0.2.12", "log", @@ -8881,11 +8929,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi 0.3.9", + "windows-sys 0.59.0", ] [[package]] @@ -8903,6 +8951,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -9062,9 +9140,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -9081,9 +9159,9 @@ dependencies = [ [[package]] name = "wiremock" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec874e1eef0df2dcac546057fe5e29186f09c378181cd7b635b4b7bcc98e9d81" +checksum = "6a59f8ae78a4737fb724f20106fb35ccb7cfe61ff335665d3042b3aa98e34717" dependencies = [ "assert-json-diff", "async-trait", @@ -9092,14 +9170,14 @@ dependencies = [ "futures 0.3.30", "http 1.1.0", "http-body-util", - "hyper 1.2.0", + "hyper 1.4.1", "hyper-util", "log", "once_cell", "regex", "serde", "serde_json", - "tokio 1.37.0", + "tokio 1.40.0", "url", ] @@ -9160,6 +9238,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -9171,38 +9250,38 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.77", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json index 42fb5dad5464..bd86855dcef6 100644 --- a/api-reference-v2/openapi_spec.json +++ b/api-reference-v2/openapi_spec.json @@ -26,7 +26,7 @@ "Organization" ], "summary": "Organization - Create", - "description": "Organization - Create\n\nCreate a new organization", + "description": "Create a new organization", "operationId": "Create an Organization", "requestBody": { "content": { @@ -73,7 +73,7 @@ "Organization" ], "summary": "Organization - Retrieve", - "description": "Organization - Retrieve\n\nRetrieve an existing organization", + "description": "Retrieve an existing organization", "operationId": "Retrieve an Organization", "parameters": [ { @@ -112,7 +112,7 @@ "Organization" ], "summary": "Organization - Update", - "description": "Organization - Update\n\nCreate a new organization for .", + "description": "Create a new organization for .", "operationId": "Update an Organization", "parameters": [ { @@ -170,7 +170,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Create", - "description": "Merchant Connector - Create\n\nCreates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.", + "description": "Creates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.", "operationId": "Create a Merchant Connector", "requestBody": { "content": { @@ -247,7 +247,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Retrieve", - "description": "Merchant Connector - Retrieve\n\nRetrieves details of a Connector account", + "description": "Retrieves details of a Connector account", "operationId": "Retrieve a Merchant Connector", "parameters": [ { @@ -290,7 +290,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Update", - "description": "Merchant Connector - Update\n\nTo update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector", + "description": "To update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector", "operationId": "Update a Merchant Connector", "parameters": [ { @@ -362,7 +362,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Delete", - "description": "Merchant Connector - Delete\n\nDelete or Detach a Merchant Connector from Merchant Account", + "description": "Delete or Detach a Merchant Connector from Merchant Account", "operationId": "Delete a Merchant Connector", "parameters": [ { @@ -407,7 +407,7 @@ "Merchant Account" ], "summary": "Merchant Account - Create", - "description": "Merchant Account - Create\n\nCreate a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.\n\nBefore creating the merchant account, it is mandatory to create an organization.", + "description": "Create a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.\n\nBefore creating the merchant account, it is mandatory to create an organization.", "operationId": "Create a Merchant Account", "requestBody": { "content": { @@ -475,7 +475,7 @@ "Merchant Account" ], "summary": "Merchant Account - Retrieve", - "description": "Merchant Account - Retrieve\n\nRetrieve a *merchant* account details.", + "description": "Retrieve a *merchant* account details.", "operationId": "Retrieve a Merchant Account", "parameters": [ { @@ -514,7 +514,7 @@ "Merchant Account" ], "summary": "Merchant Account - Update", - "description": "Merchant Account - Update\n\nUpdates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc", + "description": "Updates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc", "operationId": "Update a Merchant Account", "parameters": [ { @@ -581,7 +581,7 @@ "Business Profile" ], "summary": "Business Profile - Create", - "description": "Business Profile - Create\n\nCreates a new *business profile* for a merchant", + "description": "Creates a new *business profile* for a merchant", "operationId": "Create A Business Profile", "requestBody": { "content": { @@ -628,7 +628,7 @@ "Business Profile" ], "summary": "Business Profile - Retrieve", - "description": "Business Profile - Retrieve\n\nRetrieve existing *business profile*", + "description": "Retrieve existing *business profile*", "operationId": "Retrieve a Business Profile", "parameters": [ { @@ -667,7 +667,7 @@ "Business Profile" ], "summary": "Business Profile - Update", - "description": "Business Profile - Update\n\nUpdate the *business profile*", + "description": "Update the *business profile*", "operationId": "Update a Business Profile", "parameters": [ { @@ -725,7 +725,7 @@ "Business Profile" ], "summary": "Business Profile - Activate routing algorithm", - "description": "Business Profile - Activate routing algorithm\n\nActivates a routing algorithm under a business profile", + "description": "Activates a routing algorithm under a business profile", "operationId": "Activates a routing algorithm under a business profile", "parameters": [ { @@ -792,7 +792,7 @@ "Business Profile" ], "summary": "Business Profile - Deactivate routing algorithm", - "description": "Business Profile - Deactivate routing algorithm\n\nDeactivates a routing algorithm under a business profile", + "description": "Deactivates a routing algorithm under a business profile", "operationId": " Deactivates a routing algorithm under a business profile", "parameters": [ { @@ -845,7 +845,7 @@ "Business Profile" ], "summary": "Business Profile - Update Default Fallback Routing Algorithm", - "description": "Business Profile - Update Default Fallback Routing Algorithm\n\nUpdate the default fallback routing algorithm for the business profile", + "description": "Update the default fallback routing algorithm for the business profile", "operationId": "Update the default fallback routing algorithm for the business profile", "parameters": [ { @@ -909,7 +909,7 @@ "Business Profile" ], "summary": "Business Profile - Retrieve Default Fallback Routing Algorithm", - "description": "Business Profile - Retrieve Default Fallback Routing Algorithm\n\nRetrieve the default fallback routing algorithm for the business profile", + "description": "Retrieve the default fallback routing algorithm for the business profile", "operationId": "Retrieve the default fallback routing algorithm for the business profile", "parameters": [ { @@ -956,7 +956,7 @@ "Business Profile" ], "summary": "Business Profile - Retrieve Active Routing Algorithm", - "description": "Business Profile - Retrieve Active Routing Algorithm\n\nRetrieve active routing algorithm under the business profile", + "description": "Retrieve active routing algorithm under the business profile", "operationId": "Retrieve the active routing algorithm under the business profile", "parameters": [ { @@ -1030,7 +1030,7 @@ "Routing" ], "summary": "Routing - Create", - "description": "Routing - Create\n\nCreate a routing algorithm", + "description": "Create a routing algorithm", "operationId": "Create a routing algprithm", "requestBody": { "content": { @@ -1085,7 +1085,7 @@ "Routing" ], "summary": "Routing - Retrieve", - "description": "Routing - Retrieve\n\nRetrieve a routing algorithm with its algorithm id", + "description": "Retrieve a routing algorithm with its algorithm id", "operationId": "Retrieve a routing algorithm with its algorithm id", "parameters": [ { @@ -1135,7 +1135,7 @@ "API Key" ], "summary": "API Key - Create", - "description": "API Key - Create\n\nCreate a new API Key for accessing our APIs from your servers. The plaintext API Key will be\ndisplayed only once on creation, so ensure you store it securely.", + "description": "Create a new API Key for accessing our APIs from your servers. The plaintext API Key will be\ndisplayed only once on creation, so ensure you store it securely.", "operationId": "Create an API Key", "requestBody": { "content": { @@ -1175,7 +1175,7 @@ "API Key" ], "summary": "API Key - Retrieve", - "description": "API Key - Retrieve\n\nRetrieve information about the specified API Key.", + "description": "Retrieve information about the specified API Key.", "operationId": "Retrieve an API Key", "parameters": [ { @@ -1214,7 +1214,7 @@ "API Key" ], "summary": "API Key - Update", - "description": "API Key - Update\n\nUpdate information for the specified API Key.", + "description": "Update information for the specified API Key.", "operationId": "Update an API Key", "parameters": [ { @@ -1263,7 +1263,7 @@ "API Key" ], "summary": "API Key - Revoke", - "description": "API Key - Revoke\n\nRevoke the specified API Key. Once revoked, the API Key can no longer be used for\nauthenticating with our APIs.", + "description": "Revoke the specified API Key. Once revoked, the API Key can no longer be used for\nauthenticating with our APIs.", "operationId": "Revoke an API Key", "parameters": [ { diff --git a/api-reference/openapi_spec.json b/api-reference/openapi_spec.json index df713aa14a9e..1b65621fab99 100644 --- a/api-reference/openapi_spec.json +++ b/api-reference/openapi_spec.json @@ -26,7 +26,7 @@ "Payments" ], "summary": "Payments - Create", - "description": "Payments - Create\n\n**Creates a payment object when amount and currency are passed.**\n\nThis API is also used to create a mandate by passing the `mandate_object`.\n\nDepending on the user journey you wish to achieve, you may opt to complete all the steps in a single request **by attaching a payment method, setting `confirm=true` and `capture_method = automatic`** in the *Payments/Create API* request.\n\nOtherwise, To completely process a payment you will have to **create a payment, attach a payment method, confirm and capture funds**. For that you could use the following sequence of API requests -\n\n1. Payments - Create\n\n2. Payments - Update\n\n3. Payments - Confirm\n\n4. Payments - Capture.\n\nYou will require the 'API - Key' from the Hyperswitch dashboard to make the first call, and use the 'client secret' returned in this API along with your 'publishable key' to make subsequent API calls from your client.\n\nThis page lists the various combinations in which the Payments - Create API can be used and the details about the various fields in the requests and responses.", + "description": "**Creates a payment object when amount and currency are passed.**\n\nThis API is also used to create a mandate by passing the `mandate_object`.\n\nDepending on the user journey you wish to achieve, you may opt to complete all the steps in a single request **by attaching a payment method, setting `confirm=true` and `capture_method = automatic`** in the *Payments/Create API* request.\n\nOtherwise, To completely process a payment you will have to **create a payment, attach a payment method, confirm and capture funds**. For that you could use the following sequence of API requests -\n\n1. Payments - Create\n\n2. Payments - Update\n\n3. Payments - Confirm\n\n4. Payments - Capture.\n\nYou will require the 'API - Key' from the Hyperswitch dashboard to make the first call, and use the 'client secret' returned in this API along with your 'publishable key' to make subsequent API calls from your client.\n\nThis page lists the various combinations in which the Payments - Create API can be used and the details about the various fields in the requests and responses.", "operationId": "Create a Payment", "requestBody": { "content": { @@ -221,7 +221,7 @@ "Payments" ], "summary": "Payments - Update", - "description": "Payments - Update\n\nTo update the properties of a *PaymentIntent* object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created", + "description": "To update the properties of a *PaymentIntent* object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created", "operationId": "Update a Payment", "parameters": [ { @@ -301,7 +301,7 @@ "Payments" ], "summary": "Payments - Retrieve", - "description": "Payments - Retrieve\n\nRetrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment", + "description": "Retrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment", "operationId": "Retrieve a Payment", "parameters": [ { @@ -355,7 +355,7 @@ "Payments" ], "summary": "Payments - Confirm", - "description": "Payments - Confirm\n\n**Use this API to confirm the payment and forward the payment to the payment processor.**\n\nAlternatively you can confirm the payment within the *Payments/Create* API by setting `confirm=true`. After confirmation, the payment could either:\n\n1. fail with `failed` status or\n\n2. transition to a `requires_customer_action` status with a `next_action` block or\n\n3. succeed with either `succeeded` in case of automatic capture or `requires_capture` in case of manual capture", + "description": "**Use this API to confirm the payment and forward the payment to the payment processor.**\n\nAlternatively you can confirm the payment within the *Payments/Create* API by setting `confirm=true`. After confirmation, the payment could either:\n\n1. fail with `failed` status or\n\n2. transition to a `requires_customer_action` status with a `next_action` block or\n\n3. succeed with either `succeeded` in case of automatic capture or `requires_capture` in case of manual capture", "operationId": "Confirm a Payment", "parameters": [ { @@ -434,7 +434,7 @@ "Payments" ], "summary": "Payments - Capture", - "description": "Payments - Capture\n\nTo capture the funds for an uncaptured payment", + "description": "To capture the funds for an uncaptured payment", "operationId": "Capture a Payment", "parameters": [ { @@ -495,7 +495,7 @@ "Payments" ], "summary": "Payments - Session token", - "description": "Payments - Session token\n\nCreates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.", + "description": "Creates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.", "operationId": "Create Session tokens for a Payment", "requestBody": { "content": { @@ -535,7 +535,7 @@ "Payments" ], "summary": "Payments - Cancel", - "description": "Payments - Cancel\n\nA Payment could can be cancelled when it is in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_customer_action`.", + "description": "A Payment could can be cancelled when it is in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_customer_action`.", "operationId": "Cancel a Payment", "parameters": [ { @@ -589,7 +589,7 @@ "Payments" ], "summary": "Payments - List", - "description": "Payments - List\n\nTo list the *payments*", + "description": "To list the *payments*", "operationId": "List all Payments", "parameters": [ { @@ -711,7 +711,7 @@ "Payments" ], "summary": "Payments - Incremental Authorization", - "description": "Payments - Incremental Authorization\n\nAuthorized amount for a payment can be incremented if it is in status: requires_capture", + "description": "Authorized amount for a payment can be incremented if it is in status: requires_capture", "operationId": "Increment authorized amount for a Payment", "parameters": [ { @@ -762,7 +762,7 @@ "Payments" ], "summary": "Payments Link - Retrieve", - "description": "Payments Link - Retrieve\n\nTo retrieve the properties of a Payment Link. This may be used to get the status of a previously initiated payment or next action for an ongoing payment", + "description": "To retrieve the properties of a Payment Link. This may be used to get the status of a previously initiated payment or next action for an ongoing payment", "operationId": "Retrieve a Payment Link", "parameters": [ { @@ -816,7 +816,7 @@ "Payments" ], "summary": "Payments - External 3DS Authentication", - "description": "Payments - External 3DS Authentication\n\nExternal 3DS Authentication is performed and returns the AuthenticationResponse", + "description": "External 3DS Authentication is performed and returns the AuthenticationResponse", "operationId": "Initiate external authentication for a Payment", "parameters": [ { @@ -867,7 +867,7 @@ "Payments" ], "summary": "Payments - Complete Authorize", - "description": "Payments - Complete Authorize\n\n", + "description": "\n", "operationId": "Complete Authorize a Payment", "parameters": [ { @@ -918,7 +918,7 @@ "Refunds" ], "summary": "Refunds - Create", - "description": "Refunds - Create\n\nCreates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded", + "description": "Creates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded", "operationId": "Create a Refund", "requestBody": { "content": { @@ -981,7 +981,7 @@ "Refunds" ], "summary": "Refunds - Retrieve", - "description": "Refunds - Retrieve\n\nRetrieves a Refund. This may be used to get the status of a previously initiated refund", + "description": "Retrieves a Refund. This may be used to get the status of a previously initiated refund", "operationId": "Retrieve a Refund", "parameters": [ { @@ -1020,7 +1020,7 @@ "Refunds" ], "summary": "Refunds - Update", - "description": "Refunds - Update\n\nUpdates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields", + "description": "Updates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields", "operationId": "Update a Refund", "parameters": [ { @@ -1078,7 +1078,7 @@ "Refunds" ], "summary": "Refunds - List", - "description": "Refunds - List\n\nLists all the refunds associated with the merchant or a payment_id if payment_id is not provided", + "description": "Lists all the refunds associated with the merchant or a payment_id if payment_id is not provided", "operationId": "List all Refunds", "requestBody": { "content": { @@ -1115,7 +1115,7 @@ "Organization" ], "summary": "Organization - Create", - "description": "Organization - Create\n\nCreate a new organization", + "description": "Create a new organization", "operationId": "Create an Organization", "requestBody": { "content": { @@ -1162,7 +1162,7 @@ "Organization" ], "summary": "Organization - Retrieve", - "description": "Organization - Retrieve\n\nRetrieve an existing organization", + "description": "Retrieve an existing organization", "operationId": "Retrieve an Organization", "parameters": [ { @@ -1201,7 +1201,7 @@ "Organization" ], "summary": "Organization - Update", - "description": "Organization - Update\n\nCreate a new organization for .", + "description": "Create a new organization for .", "operationId": "Update an Organization", "parameters": [ { @@ -1259,7 +1259,7 @@ "Merchant Account" ], "summary": "Merchant Account - Create", - "description": "Merchant Account - Create\n\nCreate a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.", + "description": "Create a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.", "operationId": "Create a Merchant Account", "requestBody": { "content": { @@ -1320,7 +1320,7 @@ "Merchant Account" ], "summary": "Merchant Account - Retrieve", - "description": "Merchant Account - Retrieve\n\nRetrieve a *merchant* account details.", + "description": "Retrieve a *merchant* account details.", "operationId": "Retrieve a Merchant Account", "parameters": [ { @@ -1359,7 +1359,7 @@ "Merchant Account" ], "summary": "Merchant Account - Update", - "description": "Merchant Account - Update\n\nUpdates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc", + "description": "Updates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc", "operationId": "Update a Merchant Account", "parameters": [ { @@ -1430,7 +1430,7 @@ "Merchant Account" ], "summary": "Merchant Account - Delete", - "description": "Merchant Account - Delete\n\nDelete a *merchant* account", + "description": "Delete a *merchant* account", "operationId": "Delete a Merchant Account", "parameters": [ { @@ -1471,7 +1471,7 @@ "Merchant Account" ], "summary": "Merchant Account - KV Status", - "description": "Merchant Account - KV Status\n\nToggle KV mode for the Merchant Account", + "description": "Toggle KV mode for the Merchant Account", "operationId": "Enable/Disable KV for a Merchant Account", "parameters": [ { @@ -1537,7 +1537,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Create", - "description": "Merchant Connector - Create\n\nCreates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.", + "description": "Creates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.", "operationId": "Create a Merchant Connector", "requestBody": { "content": { @@ -1612,7 +1612,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - List", - "description": "Merchant Connector - List\n\nList Merchant Connector Details for the merchant", + "description": "List Merchant Connector Details for the merchant", "operationId": "List all Merchant Connectors", "parameters": [ { @@ -1659,7 +1659,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Retrieve", - "description": "Merchant Connector - Retrieve\n\nRetrieves details of a Connector account", + "description": "Retrieves details of a Connector account", "operationId": "Retrieve a Merchant Connector", "parameters": [ { @@ -1711,7 +1711,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Update", - "description": "Merchant Connector - Update\n\nTo update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector", + "description": "To update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector", "operationId": "Update a Merchant Connector", "parameters": [ { @@ -1792,7 +1792,7 @@ "Merchant Connector Account" ], "summary": "Merchant Connector - Delete", - "description": "Merchant Connector - Delete\n\nDelete or Detach a Merchant Connector from Merchant Account", + "description": "Delete or Detach a Merchant Connector from Merchant Account", "operationId": "Delete a Merchant Connector", "parameters": [ { @@ -1846,7 +1846,7 @@ "Gsm" ], "summary": "Gsm - Create", - "description": "Gsm - Create\n\nCreates a GSM (Global Status Mapping) Rule. A GSM rule is used to map a connector's error message/error code combination during a particular payments flow/sub-flow to Hyperswitch's unified status/error code/error message combination. It is also used to decide the next action in the flow - retry/requeue/do_default", + "description": "Creates a GSM (Global Status Mapping) Rule. A GSM rule is used to map a connector's error message/error code combination during a particular payments flow/sub-flow to Hyperswitch's unified status/error code/error message combination. It is also used to decide the next action in the flow - retry/requeue/do_default", "operationId": "Create Gsm Rule", "requestBody": { "content": { @@ -1886,7 +1886,7 @@ "Gsm" ], "summary": "Gsm - Get", - "description": "Gsm - Get\n\nRetrieves a Gsm Rule", + "description": "Retrieves a Gsm Rule", "operationId": "Retrieve Gsm Rule", "requestBody": { "content": { @@ -1926,7 +1926,7 @@ "Gsm" ], "summary": "Gsm - Update", - "description": "Gsm - Update\n\nUpdates a Gsm Rule", + "description": "Updates a Gsm Rule", "operationId": "Update Gsm Rule", "requestBody": { "content": { @@ -1966,7 +1966,7 @@ "Gsm" ], "summary": "Gsm - Delete", - "description": "Gsm - Delete\n\nDeletes a Gsm Rule", + "description": "Deletes a Gsm Rule", "operationId": "Delete Gsm Rule", "requestBody": { "content": { @@ -2006,7 +2006,7 @@ "Mandates" ], "summary": "Mandates - Retrieve Mandate", - "description": "Mandates - Retrieve Mandate\n\nRetrieves a mandate created using the Payments/Create API", + "description": "Retrieves a mandate created using the Payments/Create API", "operationId": "Retrieve a Mandate", "parameters": [ { @@ -2047,7 +2047,7 @@ "Mandates" ], "summary": "Mandates - Revoke Mandate", - "description": "Mandates - Revoke Mandate\n\nRevokes a mandate created using the Payments/Create API", + "description": "Revokes a mandate created using the Payments/Create API", "operationId": "Revoke a Mandate", "parameters": [ { @@ -2088,7 +2088,7 @@ "Mandates" ], "summary": "Mandates - Customer Mandates List", - "description": "Mandates - Customer Mandates List\n\nLists all the mandates for a particular customer id.", + "description": "Lists all the mandates for a particular customer id.", "operationId": "List Mandates for a Customer", "responses": { "200": { @@ -2121,7 +2121,7 @@ "Customers" ], "summary": "Customers - Create", - "description": "Customers - Create\n\nCreates a customer object and stores the customer details to be reused for future payments.\nIncase the customer already exists in the system, this API will respond with the customer details.", + "description": "Creates a customer object and stores the customer details to be reused for future payments.\nIncase the customer already exists in the system, this API will respond with the customer details.", "operationId": "Create a Customer", "requestBody": { "content": { @@ -2169,7 +2169,7 @@ "Customers" ], "summary": "Customers - Retrieve", - "description": "Customers - Retrieve\n\nRetrieves a customer's details.", + "description": "Retrieves a customer's details.", "operationId": "Retrieve a Customer", "parameters": [ { @@ -2211,7 +2211,7 @@ "Customers" ], "summary": "Customers - Update", - "description": "Customers - Update\n\nUpdates the customer's details in a customer object.", + "description": "Updates the customer's details in a customer object.", "operationId": "Update a Customer", "parameters": [ { @@ -2268,7 +2268,7 @@ "Customers" ], "summary": "Customers - Delete", - "description": "Customers - Delete\n\nDelete a customer record.", + "description": "Delete a customer record.", "operationId": "Delete a Customer", "parameters": [ { @@ -2309,7 +2309,7 @@ "Customers" ], "summary": "Customers - List", - "description": "Customers - List\n\nLists all the customers for a particular merchant id.", + "description": "Lists all the customers for a particular merchant id.", "operationId": "List all Customers for a Merchant", "responses": { "200": { @@ -2342,7 +2342,7 @@ "Payment Methods" ], "summary": "PaymentMethods - Create", - "description": "PaymentMethods - Create\n\nCreates and stores a payment method against a customer.\nIn case of cards, this API should be used only by PCI compliant merchants.", + "description": "Creates and stores a payment method against a customer.\nIn case of cards, this API should be used only by PCI compliant merchants.", "operationId": "Create a Payment Method", "requestBody": { "content": { @@ -2398,7 +2398,7 @@ "Payment Methods" ], "summary": "List payment methods for a Merchant", - "description": "List payment methods for a Merchant\n\nLists the applicable payment methods for a particular Merchant ID.\nUse the client secret and publishable key authorization to list all relevant payment methods of the merchant for the payment corresponding to the client secret.", + "description": "Lists the applicable payment methods for a particular Merchant ID.\nUse the client secret and publishable key authorization to list all relevant payment methods of the merchant for the payment corresponding to the client secret.", "operationId": "List all Payment Methods for a Merchant", "parameters": [ { @@ -2507,7 +2507,7 @@ "Payment Methods" ], "summary": "List payment methods for a Customer", - "description": "List payment methods for a Customer\n\nLists all the applicable payment methods for a particular Customer ID.", + "description": "Lists all the applicable payment methods for a particular Customer ID.", "operationId": "List all Payment Methods for a Customer", "parameters": [ { @@ -2613,7 +2613,7 @@ "Payment Methods" ], "summary": "List customer saved payment methods for a Payment", - "description": "List customer saved payment methods for a Payment\n\nLists all the applicable payment methods for a particular payment tied to the `client_secret`.", + "description": "Lists all the applicable payment methods for a particular payment tied to the `client_secret`.", "operationId": "List all Payment Methods for a Customer", "parameters": [ { @@ -2728,7 +2728,7 @@ "Payment Methods" ], "summary": "Payment Method - Set Default Payment Method for Customer", - "description": "Payment Method - Set Default Payment Method for Customer\n\nSet the Payment Method as Default for the Customer.", + "description": "Set the Payment Method as Default for the Customer.", "operationId": "Set the Payment Method as Default", "parameters": [ { @@ -2781,7 +2781,7 @@ "Payment Methods" ], "summary": "Payment Method - Retrieve", - "description": "Payment Method - Retrieve\n\nRetrieves a payment method of a customer.", + "description": "Retrieves a payment method of a customer.", "operationId": "Retrieve a Payment method", "parameters": [ { @@ -2820,7 +2820,7 @@ "Payment Methods" ], "summary": "Payment Method - Delete", - "description": "Payment Method - Delete\n\nDeletes a payment method of a customer.", + "description": "Deletes a payment method of a customer.", "operationId": "Delete a Payment method", "parameters": [ { @@ -2861,7 +2861,7 @@ "Payment Methods" ], "summary": "Payment Method - Update", - "description": "Payment Method - Update\n\nUpdate an existing payment method of a customer.\nThis API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments.", + "description": "Update an existing payment method of a customer.\nThis API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments.", "operationId": "Update a Payment method", "parameters": [ { @@ -2915,7 +2915,7 @@ "Business Profile" ], "summary": "Business Profile - Create", - "description": "Business Profile - Create\n\nCreates a new *business profile* for a merchant", + "description": "Creates a new *business profile* for a merchant", "operationId": "Create A Business Profile", "parameters": [ { @@ -2974,7 +2974,7 @@ "Business Profile" ], "summary": "Business Profile - List", - "description": "Business Profile - List\n\nLists all the *business profiles* under a merchant", + "description": "Lists all the *business profiles* under a merchant", "operationId": "List Business Profiles", "parameters": [ { @@ -3015,7 +3015,7 @@ "Business Profile" ], "summary": "Business Profile - Retrieve", - "description": "Business Profile - Retrieve\n\nRetrieve existing *business profile*", + "description": "Retrieve existing *business profile*", "operationId": "Retrieve a Business Profile", "parameters": [ { @@ -3063,7 +3063,7 @@ "Business Profile" ], "summary": "Business Profile - Update", - "description": "Business Profile - Update\n\nUpdate the *business profile*", + "description": "Update the *business profile*", "operationId": "Update a Business Profile", "parameters": [ { @@ -3128,7 +3128,7 @@ "Business Profile" ], "summary": "Business Profile - Delete", - "description": "Business Profile - Delete\n\nDelete the *business profile*", + "description": "Delete the *business profile*", "operationId": "Delete the Business Profile", "parameters": [ { @@ -3178,7 +3178,7 @@ "Disputes" ], "summary": "Disputes - Retrieve Dispute", - "description": "Disputes - Retrieve Dispute\nRetrieves a dispute", + "description": "Retrieves a dispute", "operationId": "Retrieve a Dispute", "parameters": [ { @@ -3219,7 +3219,7 @@ "Disputes" ], "summary": "Disputes - List Disputes", - "description": "Disputes - List Disputes\nLists all the Disputes for a merchant", + "description": "Lists all the Disputes for a merchant", "operationId": "List Disputes", "parameters": [ { @@ -3368,7 +3368,7 @@ "Routing" ], "summary": "Routing - Create", - "description": "Routing - Create\n\nCreate a routing config", + "description": "Create a routing config", "operationId": "Create a routing config", "requestBody": { "content": { @@ -3421,7 +3421,7 @@ "Routing" ], "summary": "Routing - List", - "description": "Routing - List\n\nList all routing configs", + "description": "List all routing configs", "operationId": "List routing configs", "parameters": [ { @@ -3493,7 +3493,7 @@ "Routing" ], "summary": "Routing - Activate config", - "description": "Routing - Activate config\n\nActivate a routing config", + "description": "Activate a routing config", "operationId": "Activate a routing config", "parameters": [ { @@ -3543,7 +3543,7 @@ "Routing" ], "summary": "Routing - Retrieve", - "description": "Routing - Retrieve\n\nRetrieve a routing algorithm", + "description": "Retrieve a routing algorithm", "operationId": "Retrieve a routing config", "parameters": [ { @@ -3593,7 +3593,7 @@ "Routing" ], "summary": "Routing - Deactivate", - "description": "Routing - Deactivate\n\nDeactivates a routing config", + "description": "Deactivates a routing config", "operationId": "Deactivate a routing config", "requestBody": { "content": { @@ -3645,7 +3645,7 @@ "Routing" ], "summary": "Routing - Update Default Config", - "description": "Routing - Update Default Config\n\nUpdate default fallback config", + "description": "Update default fallback config", "operationId": "Update default fallback config", "requestBody": { "content": { @@ -3698,7 +3698,7 @@ "Routing" ], "summary": "Routing - Retrieve Default Config", - "description": "Routing - Retrieve Default Config\n\nRetrieve default fallback config", + "description": "Retrieve default fallback config", "operationId": "Retrieve default fallback config", "responses": { "200": { @@ -3734,7 +3734,7 @@ "Routing" ], "summary": "Routing - Retrieve Config", - "description": "Routing - Retrieve Config\n\nRetrieve active config", + "description": "Retrieve active config", "operationId": "Retrieve active config", "parameters": [ { @@ -3785,7 +3785,7 @@ "Routing" ], "summary": "Routing - Retrieve Default For Profile", - "description": "Routing - Retrieve Default For Profile\n\nRetrieve default config for profiles", + "description": "Retrieve default config for profiles", "operationId": "Retrieve default configs for all profiles", "responses": { "200": { @@ -3821,7 +3821,7 @@ "Routing" ], "summary": "Routing - Update Default For Profile", - "description": "Routing - Update Default For Profile\n\nUpdate default config for profiles", + "description": "Update default config for profiles", "operationId": "Update default configs for all profiles", "parameters": [ { @@ -4040,7 +4040,6 @@ "Payouts" ], "summary": "Payouts - Create", - "description": "Payouts - Create", "operationId": "Create a Payout", "requestBody": { "content": { @@ -4080,7 +4079,6 @@ "Payouts" ], "summary": "Payouts - Retrieve", - "description": "Payouts - Retrieve", "operationId": "Retrieve a Payout", "parameters": [ { @@ -4129,7 +4127,6 @@ "Payouts" ], "summary": "Payouts - Update", - "description": "Payouts - Update", "operationId": "Update a Payout", "parameters": [ { @@ -4180,7 +4177,6 @@ "Payouts" ], "summary": "Payouts - Cancel", - "description": "Payouts - Cancel", "operationId": "Cancel a Payout", "parameters": [ { @@ -4231,7 +4227,6 @@ "Payouts" ], "summary": "Payouts - Fulfill", - "description": "Payouts - Fulfill", "operationId": "Fulfill a Payout", "parameters": [ { @@ -4282,7 +4277,6 @@ "Payouts" ], "summary": "Payouts - List", - "description": "Payouts - List", "operationId": "List payouts using generic constraints", "parameters": [ { @@ -4366,7 +4360,6 @@ "Payouts" ], "summary": "Payouts - List using filters", - "description": "Payouts - List using filters", "operationId": "Filter payouts using specific constraints", "requestBody": { "content": { @@ -4406,7 +4399,6 @@ "Payouts" ], "summary": "Payouts - Confirm", - "description": "Payouts - Confirm", "operationId": "Confirm a Payout", "parameters": [ { @@ -4457,7 +4449,6 @@ "Payouts" ], "summary": "Payouts - List available filters", - "description": "Payouts - List available filters", "operationId": "List available payout filters", "requestBody": { "content": { @@ -4494,7 +4485,7 @@ "API Key" ], "summary": "API Key - Create", - "description": "API Key - Create\n\nCreate a new API Key for accessing our APIs from your servers. The plaintext API Key will be\ndisplayed only once on creation, so ensure you store it securely.", + "description": "Create a new API Key for accessing our APIs from your servers. The plaintext API Key will be\ndisplayed only once on creation, so ensure you store it securely.", "operationId": "Create an API Key", "parameters": [ { @@ -4545,7 +4536,7 @@ "API Key" ], "summary": "API Key - Retrieve", - "description": "API Key - Retrieve\n\nRetrieve information about the specified API Key.", + "description": "Retrieve information about the specified API Key.", "operationId": "Retrieve an API Key", "parameters": [ { @@ -4593,7 +4584,7 @@ "API Key" ], "summary": "API Key - Update", - "description": "API Key - Update\n\nUpdate information for the specified API Key.", + "description": "Update information for the specified API Key.", "operationId": "Update an API Key", "parameters": [ { @@ -4651,7 +4642,7 @@ "API Key" ], "summary": "API Key - Revoke", - "description": "API Key - Revoke\n\nRevoke the specified API Key. Once revoked, the API Key can no longer be used for\nauthenticating with our APIs.", + "description": "Revoke the specified API Key. Once revoked, the API Key can no longer be used for\nauthenticating with our APIs.", "operationId": "Revoke an API Key", "parameters": [ { @@ -4701,7 +4692,7 @@ "Event" ], "summary": "Events - List", - "description": "Events - List\n\nList all Events associated with a Merchant Account or Business Profile.", + "description": "List all Events associated with a Merchant Account or Business Profile.", "operationId": "List all Events associated with a Merchant Account or Business Profile", "parameters": [ { @@ -4806,7 +4797,7 @@ "Event" ], "summary": "Events - Delivery Attempt List", - "description": "Events - Delivery Attempt List\n\nList all delivery attempts for the specified Event.", + "description": "List all delivery attempts for the specified Event.", "operationId": "List all delivery attempts for an Event", "parameters": [ { @@ -4856,7 +4847,7 @@ "Event" ], "summary": "Events - Manual Retry", - "description": "Events - Manual Retry\n\nManually retry the delivery of the specified Event.", + "description": "Manually retry the delivery of the specified Event.", "operationId": "Manually retry the delivery of an Event", "parameters": [ { @@ -4903,7 +4894,6 @@ "Poll" ], "summary": "Poll - Retrieve Poll Status", - "description": "Poll - Retrieve Poll Status", "operationId": "Retrieve Poll Status", "parameters": [ { diff --git a/config/dashboard.toml b/config/dashboard.toml index bd922b835191..4cafdd49ab3c 100644 --- a/config/dashboard.toml +++ b/config/dashboard.toml @@ -25,7 +25,7 @@ test_processors=true feedback=false mixpanel=false generate_report=false -user_journey_analytics=true +user_journey_analytics=false authentication_analytics=true surcharge=false dispute_evidence_upload=false @@ -35,5 +35,5 @@ global_search=true dispute_analytics=true configure_pmts=false branding=false -totp=false -live_users_counter=true \ No newline at end of file +totp=true +live_users_counter=false \ No newline at end of file diff --git a/crates/analytics/src/api_event/core.rs b/crates/analytics/src/api_event/core.rs index 305de7e69c86..f3a7b154b907 100644 --- a/crates/analytics/src/api_event/core.rs +++ b/crates/analytics/src/api_event/core.rs @@ -21,6 +21,7 @@ use super::{ metrics::ApiEventMetricRow, }; use crate::{ + enums::AuthInfo, errors::{AnalyticsError, AnalyticsResult}, metrics, types::FiltersError, @@ -51,7 +52,7 @@ pub async fn api_events_core( pub async fn get_filters( pool: &AnalyticsProvider, req: GetApiEventFiltersRequest, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, ) -> AnalyticsResult { use api_models::analytics::{api_event::ApiEventDimensions, ApiEventFilterValue}; @@ -68,8 +69,7 @@ pub async fn get_filters( AnalyticsProvider::Clickhouse(ckh_pool) | AnalyticsProvider::CombinedSqlx(_, ckh_pool) | AnalyticsProvider::CombinedCkh(_, ckh_pool) => { - get_api_event_filter_for_dimension(dim, merchant_id, &req.time_range, ckh_pool) - .await + get_api_event_filter_for_dimension(dim, auth, &req.time_range, ckh_pool).await } } .switch()? @@ -92,7 +92,7 @@ pub async fn get_filters( #[instrument(skip_all)] pub async fn get_api_event_metrics( pool: &AnalyticsProvider, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, req: GetApiEventMetricRequest, ) -> AnalyticsResult> { let mut metrics_accumulator: HashMap = @@ -109,14 +109,14 @@ pub async fn get_api_event_metrics( // TODO: lifetime issues with joinset, // can be optimized away if joinset lifetime requirements are relaxed - let merchant_id_scoped = merchant_id.to_owned(); + let auth_scoped = auth.to_owned(); set.spawn( async move { let data = pool .get_api_event_metrics( &metric_type, &req.group_by_names.clone(), - &merchant_id_scoped, + &auth_scoped, &req.filters, &req.time_series.map(|t| t.granularity), &req.time_range, diff --git a/crates/analytics/src/api_event/filters.rs b/crates/analytics/src/api_event/filters.rs index 62fd87890180..5c8136805c93 100644 --- a/crates/analytics/src/api_event/filters.rs +++ b/crates/analytics/src/api_event/filters.rs @@ -4,6 +4,7 @@ use error_stack::ResultExt; use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, FiltersError, FiltersResult, LoadRow}, }; @@ -12,7 +13,7 @@ pub trait ApiEventFilterAnalytics: LoadRow {} pub async fn get_api_event_filter_for_dimension( dimension: ApiEventDimensions, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, time_range: &TimeRange, pool: &T, ) -> FiltersResult> @@ -32,9 +33,7 @@ where .attach_printable("Error filtering time range") .switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; query_builder.set_distinct(); diff --git a/crates/analytics/src/api_event/metrics.rs b/crates/analytics/src/api_event/metrics.rs index ac29ec15169f..48e95b6b5cdf 100644 --- a/crates/analytics/src/api_event/metrics.rs +++ b/crates/analytics/src/api_event/metrics.rs @@ -7,6 +7,7 @@ use api_models::analytics::{ use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, LoadRow, MetricsResult}, }; @@ -43,7 +44,7 @@ where async fn load_metrics( &self, dimensions: &[ApiEventDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &ApiEventFilters, granularity: &Option, time_range: &TimeRange, @@ -64,7 +65,7 @@ where async fn load_metrics( &self, dimensions: &[ApiEventDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &ApiEventFilters, granularity: &Option, time_range: &TimeRange, @@ -73,38 +74,17 @@ where match self { Self::Latency => { MaxLatency - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::ApiCount => { ApiCount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::StatusCodeCount => { StatusCodeCount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } } diff --git a/crates/analytics/src/api_event/metrics/api_count.rs b/crates/analytics/src/api_event/metrics/api_count.rs index f00c01bbf381..3973870a4556 100644 --- a/crates/analytics/src/api_event/metrics/api_count.rs +++ b/crates/analytics/src/api_event/metrics/api_count.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::ApiEventMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -30,7 +31,7 @@ where async fn load_metrics( &self, _dimensions: &[ApiEventDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &ApiEventFilters, granularity: &Option, time_range: &TimeRange, @@ -69,9 +70,7 @@ where .switch()?; } - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) diff --git a/crates/analytics/src/api_event/metrics/latency.rs b/crates/analytics/src/api_event/metrics/latency.rs index 5d71da2a0aa1..c9a62abe6761 100644 --- a/crates/analytics/src/api_event/metrics/latency.rs +++ b/crates/analytics/src/api_event/metrics/latency.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::ApiEventMetricRow; use crate::{ + enums::AuthInfo, query::{ Aggregate, FilterTypes, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window, @@ -33,7 +34,7 @@ where async fn load_metrics( &self, _dimensions: &[ApiEventDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &ApiEventFilters, granularity: &Option, time_range: &TimeRange, @@ -76,9 +77,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) diff --git a/crates/analytics/src/api_event/metrics/status_code_count.rs b/crates/analytics/src/api_event/metrics/status_code_count.rs index b4fff367b629..190f38999c93 100644 --- a/crates/analytics/src/api_event/metrics/status_code_count.rs +++ b/crates/analytics/src/api_event/metrics/status_code_count.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::ApiEventMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -30,7 +31,7 @@ where async fn load_metrics( &self, _dimensions: &[ApiEventDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &ApiEventFilters, granularity: &Option, time_range: &TimeRange, @@ -47,9 +48,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) diff --git a/crates/analytics/src/clickhouse.rs b/crates/analytics/src/clickhouse.rs index ffca5487137a..37a011c9a5a6 100644 --- a/crates/analytics/src/clickhouse.rs +++ b/crates/analytics/src/clickhouse.rs @@ -13,7 +13,7 @@ use super::{ health_check::HealthCheck, payment_intents::{filters::PaymentIntentFilterRow, metrics::PaymentIntentMetricRow}, payments::{ - distribution::PaymentDistributionRow, filters::FilterRow, metrics::PaymentMetricRow, + distribution::PaymentDistributionRow, filters::PaymentFilterRow, metrics::PaymentMetricRow, }, query::{Aggregate, ToSql, Window}, refunds::{filters::RefundFilterRow, metrics::RefundMetricRow}, @@ -244,10 +244,10 @@ impl TryInto for serde_json::Value { } } -impl TryInto for serde_json::Value { +impl TryInto for serde_json::Value { type Error = Report; - fn try_into(self) -> Result { + fn try_into(self) -> Result { serde_json::from_value(self).change_context(ParsingError::StructParseFailure( "Failed to parse FilterRow in clickhouse results", )) @@ -415,15 +415,7 @@ impl TryInto for serde_json::Value { impl ToSql for PrimitiveDateTime { fn to_sql(&self, _table_engine: &TableEngine) -> error_stack::Result { - let format = - time::format_description::parse("[year]-[month]-[day] [hour]:[minute]:[second]") - .change_context(ParsingError::DateTimeParsingError) - .attach_printable("Failed to parse format description")?; - self.format(&format) - .change_context(ParsingError::EncodeError( - "failed to encode to clickhouse date-time format", - )) - .attach_printable("Failed to format date time") + Ok(self.assume_utc().unix_timestamp().to_string()) } } diff --git a/crates/analytics/src/disputes/core.rs b/crates/analytics/src/disputes/core.rs index b67716291b6d..b8b44a757dec 100644 --- a/crates/analytics/src/disputes/core.rs +++ b/crates/analytics/src/disputes/core.rs @@ -21,13 +21,14 @@ use super::{ }; use crate::{ disputes::DisputeMetricAccumulator, + enums::AuthInfo, errors::{AnalyticsError, AnalyticsResult}, metrics, AnalyticsProvider, }; pub async fn get_metrics( pool: &AnalyticsProvider, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, req: GetDisputeMetricRequest, ) -> AnalyticsResult> { let mut metrics_accumulator: HashMap< @@ -44,14 +45,14 @@ pub async fn get_metrics( ); // Currently JoinSet works with only static lifetime references even if the task pool does not outlive the given reference // We can optimize away this clone once that is fixed - let merchant_id_scoped = merchant_id.to_owned(); + let auth_scoped = auth.to_owned(); set.spawn( async move { let data = pool .get_dispute_metrics( &metric_type, &req.group_by_names.clone(), - &merchant_id_scoped, + &auth_scoped, &req.filters, &req.time_series.map(|t| t.granularity), &req.time_range, @@ -123,30 +124,30 @@ pub async fn get_metrics( pub async fn get_filters( pool: &AnalyticsProvider, req: GetDisputeFilterRequest, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, ) -> AnalyticsResult { let mut res = DisputeFiltersResponse::default(); for dim in req.group_by_names { let values = match pool { AnalyticsProvider::Sqlx(pool) => { - get_dispute_filter_for_dimension(dim, merchant_id, &req.time_range, pool) + get_dispute_filter_for_dimension(dim, auth, &req.time_range, pool) .await } AnalyticsProvider::Clickhouse(pool) => { - get_dispute_filter_for_dimension(dim, merchant_id, &req.time_range, pool) + get_dispute_filter_for_dimension(dim, auth, &req.time_range, pool) .await } AnalyticsProvider::CombinedCkh(sqlx_pool, ckh_pool) => { let ckh_result = get_dispute_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, ckh_pool, ) .await; let sqlx_result = get_dispute_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, sqlx_pool, ) @@ -162,14 +163,14 @@ pub async fn get_filters( AnalyticsProvider::CombinedSqlx(sqlx_pool, ckh_pool) => { let ckh_result = get_dispute_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, ckh_pool, ) .await; let sqlx_result = get_dispute_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, sqlx_pool, ) diff --git a/crates/analytics/src/disputes/filters.rs b/crates/analytics/src/disputes/filters.rs index e9b6d26bee72..cd60b5022577 100644 --- a/crates/analytics/src/disputes/filters.rs +++ b/crates/analytics/src/disputes/filters.rs @@ -4,6 +4,7 @@ use error_stack::ResultExt; use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, FiltersError, FiltersResult, LoadRow}, }; @@ -11,7 +12,7 @@ pub trait DisputeFilterAnalytics: LoadRow {} pub async fn get_dispute_filter_for_dimension( dimension: DisputeDimensions, - merchant: &common_utils::id_type::MerchantId, + auth: &AuthInfo, time_range: &TimeRange, pool: &T, ) -> FiltersResult> @@ -31,9 +32,7 @@ where .attach_printable("Error filtering time range") .switch()?; - query_builder - .add_filter_clause("merchant_id", merchant) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; query_builder.set_distinct(); diff --git a/crates/analytics/src/disputes/metrics.rs b/crates/analytics/src/disputes/metrics.rs index d2ae23d0ace3..401c606ccf90 100644 --- a/crates/analytics/src/disputes/metrics.rs +++ b/crates/analytics/src/disputes/metrics.rs @@ -21,6 +21,7 @@ use self::{ total_dispute_lost_amount::TotalDisputeLostAmount, }; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, DBEnumWrapper, LoadRow, MetricsResult}, }; @@ -52,7 +53,7 @@ where async fn load_metrics( &self, dimensions: &[DisputeDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &DisputeFilters, granularity: &Option, time_range: &TimeRange, @@ -73,7 +74,7 @@ where async fn load_metrics( &self, dimensions: &[DisputeDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &DisputeFilters, granularity: &Option, time_range: &TimeRange, @@ -82,38 +83,17 @@ where match self { Self::TotalAmountDisputed => { TotalAmountDisputed::default() - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::DisputeStatusMetric => { DisputeStatusMetric::default() - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::TotalDisputeLostAmount => { TotalDisputeLostAmount::default() - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } } diff --git a/crates/analytics/src/disputes/metrics/dispute_status_metric.rs b/crates/analytics/src/disputes/metrics/dispute_status_metric.rs index 776f94282ce1..bbce460e475c 100644 --- a/crates/analytics/src/disputes/metrics/dispute_status_metric.rs +++ b/crates/analytics/src/disputes/metrics/dispute_status_metric.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::DisputeMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -29,7 +30,7 @@ where async fn load_metrics( &self, dimensions: &[DisputeDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &DisputeFilters, granularity: &Option, time_range: &TimeRange, @@ -67,9 +68,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range.set_filter_clause(&mut query_builder).switch()?; diff --git a/crates/analytics/src/disputes/metrics/total_amount_disputed.rs b/crates/analytics/src/disputes/metrics/total_amount_disputed.rs index 8b45dab3950e..5b9d0f54622f 100644 --- a/crates/analytics/src/disputes/metrics/total_amount_disputed.rs +++ b/crates/analytics/src/disputes/metrics/total_amount_disputed.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::DisputeMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -29,7 +30,7 @@ where async fn load_metrics( &self, dimensions: &[DisputeDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &DisputeFilters, granularity: &Option, time_range: &TimeRange, @@ -65,9 +66,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) diff --git a/crates/analytics/src/disputes/metrics/total_dispute_lost_amount.rs b/crates/analytics/src/disputes/metrics/total_dispute_lost_amount.rs index f72ca914e63c..e13f3a0f5305 100644 --- a/crates/analytics/src/disputes/metrics/total_dispute_lost_amount.rs +++ b/crates/analytics/src/disputes/metrics/total_dispute_lost_amount.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::DisputeMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -29,7 +30,7 @@ where async fn load_metrics( &self, dimensions: &[DisputeDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &DisputeFilters, granularity: &Option, time_range: &TimeRange, @@ -65,9 +66,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) diff --git a/crates/analytics/src/enums.rs b/crates/analytics/src/enums.rs new file mode 100644 index 000000000000..090902350814 --- /dev/null +++ b/crates/analytics/src/enums.rs @@ -0,0 +1 @@ +pub use common_utils::types::authentication::AuthInfo; diff --git a/crates/analytics/src/errors.rs b/crates/analytics/src/errors.rs index da0b2f239cd7..0e39a4ddd928 100644 --- a/crates/analytics/src/errors.rs +++ b/crates/analytics/src/errors.rs @@ -10,6 +10,8 @@ pub enum AnalyticsError { NotImplemented(&'static str), #[error("Unknown Analytics Error")] UnknownError, + #[error("Access Forbidden Analytics Error")] + AccessForbiddenError, } impl ErrorSwitch for AnalyticsError { @@ -27,6 +29,9 @@ impl ErrorSwitch for AnalyticsError { "Something went wrong", None, )), + Self::AccessForbiddenError => { + ApiErrorResponse::Unauthorized(ApiError::new("IR", 0, "Access Forbidden", None)) + } } } } diff --git a/crates/analytics/src/lib.rs b/crates/analytics/src/lib.rs index 8fb38b35d991..66005a61b754 100644 --- a/crates/analytics/src/lib.rs +++ b/crates/analytics/src/lib.rs @@ -1,21 +1,21 @@ +pub mod active_payments; +pub mod api_event; +pub mod auth_events; mod clickhouse; +pub mod connector_events; pub mod core; pub mod disputes; +pub mod enums; pub mod errors; pub mod frm; +pub mod health_check; pub mod metrics; +pub mod opensearch; +pub mod outgoing_webhook_event; pub mod payment_intents; pub mod payments; mod query; pub mod refunds; - -pub mod active_payments; -pub mod api_event; -pub mod auth_events; -pub mod connector_events; -pub mod health_check; -pub mod opensearch; -pub mod outgoing_webhook_event; pub mod sdk_events; pub mod search; mod sqlx; @@ -23,6 +23,7 @@ mod types; use api_event::metrics::{ApiEventMetric, ApiEventMetricRow}; use common_utils::errors::CustomResult; use disputes::metrics::{DisputeMetric, DisputeMetricRow}; +use enums::AuthInfo; use hyperswitch_interfaces::secrets_interface::{ secret_handler::SecretsHandler, secret_state::{RawSecret, SecretStateContainer, SecuredSecret}, @@ -112,7 +113,7 @@ impl AnalyticsProvider { &self, metric: &PaymentMetrics, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -125,7 +126,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -137,7 +138,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -149,7 +150,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!(metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -158,7 +159,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -178,7 +179,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!(metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -187,7 +188,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -216,7 +217,7 @@ impl AnalyticsProvider { &self, distribution: &Distribution, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -230,7 +231,7 @@ impl AnalyticsProvider { .load_distribution( distribution, dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -243,7 +244,7 @@ impl AnalyticsProvider { .load_distribution( distribution, dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -256,7 +257,7 @@ impl AnalyticsProvider { .load_distribution( distribution, dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -266,7 +267,7 @@ impl AnalyticsProvider { .load_distribution( distribution, dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -287,7 +288,7 @@ impl AnalyticsProvider { .load_distribution( distribution, dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -297,7 +298,7 @@ impl AnalyticsProvider { .load_distribution( distribution, dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -326,7 +327,7 @@ impl AnalyticsProvider { &self, metric: &PaymentIntentMetrics, dimensions: &[PaymentIntentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentIntentFilters, granularity: &Option, time_range: &TimeRange, @@ -340,7 +341,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -352,7 +353,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -364,7 +365,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!(metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -373,7 +374,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -393,7 +394,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!(metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -402,7 +403,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -431,7 +432,7 @@ impl AnalyticsProvider { &self, metric: &RefundMetrics, dimensions: &[RefundDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &RefundFilters, granularity: &Option, time_range: &TimeRange, @@ -444,7 +445,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -456,7 +457,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -468,7 +469,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!( metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -476,7 +477,7 @@ impl AnalyticsProvider { ), metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -495,7 +496,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!( metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -503,7 +504,7 @@ impl AnalyticsProvider { ), metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -631,7 +632,7 @@ impl AnalyticsProvider { &self, metric: &DisputeMetrics, dimensions: &[DisputeDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &DisputeFilters, granularity: &Option, time_range: &TimeRange, @@ -644,7 +645,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -656,7 +657,7 @@ impl AnalyticsProvider { metric .load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -668,7 +669,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!( metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -676,7 +677,7 @@ impl AnalyticsProvider { ), metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -695,7 +696,7 @@ impl AnalyticsProvider { let (ckh_result, sqlx_result) = tokio::join!( metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -703,7 +704,7 @@ impl AnalyticsProvider { ), metric.load_metrics( dimensions, - merchant_id, + auth, filters, granularity, time_range, @@ -827,7 +828,7 @@ impl AnalyticsProvider { &self, metric: &ApiEventMetrics, dimensions: &[ApiEventDimensions], - pub_key: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &ApiEventFilters, granularity: &Option, time_range: &TimeRange, @@ -839,14 +840,7 @@ impl AnalyticsProvider { | Self::CombinedSqlx(_, ckh_pool) => { // Since API events are ckh only use ckh here metric - .load_metrics( - dimensions, - pub_key, - filters, - granularity, - time_range, - ckh_pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, ckh_pool) .await } } diff --git a/crates/analytics/src/outgoing_webhook_event/events.rs b/crates/analytics/src/outgoing_webhook_event/events.rs index c7b4c80cfd82..05fd9afd5248 100644 --- a/crates/analytics/src/outgoing_webhook_event/events.rs +++ b/crates/analytics/src/outgoing_webhook_event/events.rs @@ -29,6 +29,7 @@ where query_builder .add_filter_clause("merchant_id", merchant_id) .switch()?; + query_builder .add_filter_clause("payment_id", &query_param.payment_id) .switch()?; diff --git a/crates/analytics/src/payment_intents/core.rs b/crates/analytics/src/payment_intents/core.rs index 96e77be19b5c..f8a5c48986ab 100644 --- a/crates/analytics/src/payment_intents/core.rs +++ b/crates/analytics/src/payment_intents/core.rs @@ -23,6 +23,7 @@ use super::{ PaymentIntentMetricsAccumulator, }; use crate::{ + enums::AuthInfo, errors::{AnalyticsError, AnalyticsResult}, metrics, payment_intents::PaymentIntentMetricAccumulator, @@ -43,7 +44,7 @@ pub enum TaskType { #[instrument(skip_all)] pub async fn get_metrics( pool: &AnalyticsProvider, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, req: GetPaymentIntentMetricRequest, ) -> AnalyticsResult> { let mut metrics_accumulator: HashMap< @@ -62,14 +63,14 @@ pub async fn get_metrics( // TODO: lifetime issues with joinset, // can be optimized away if joinset lifetime requirements are relaxed - let merchant_id_scoped = merchant_id.to_owned(); + let auth_scoped = auth.to_owned(); set.spawn( async move { let data = pool .get_payment_intent_metrics( &metric_type, &req.group_by_names.clone(), - &merchant_id_scoped, + &auth_scoped, &req.filters, &req.time_series.map(|t| t.granularity), &req.time_range, @@ -215,6 +216,7 @@ pub async fn get_filters( .filter_map(|fil: PaymentIntentFilterRow| match dim { PaymentIntentDimensions::PaymentIntentStatus => fil.status.map(|i| i.as_ref().to_string()), PaymentIntentDimensions::Currency => fil.currency.map(|i| i.as_ref().to_string()), + PaymentIntentDimensions::ProfileId => fil.profile_id, }) .collect::>(); res.query_data.push(PaymentIntentFilterValue { diff --git a/crates/analytics/src/payment_intents/filters.rs b/crates/analytics/src/payment_intents/filters.rs index 29eb8f95d754..e81b050214c5 100644 --- a/crates/analytics/src/payment_intents/filters.rs +++ b/crates/analytics/src/payment_intents/filters.rs @@ -53,4 +53,5 @@ where pub struct PaymentIntentFilterRow { pub status: Option>, pub currency: Option>, + pub profile_id: Option, } diff --git a/crates/analytics/src/payment_intents/metrics.rs b/crates/analytics/src/payment_intents/metrics.rs index b314b8635610..f27a02368aec 100644 --- a/crates/analytics/src/payment_intents/metrics.rs +++ b/crates/analytics/src/payment_intents/metrics.rs @@ -11,6 +11,7 @@ use diesel_models::enums as storage_enums; use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, DBEnumWrapper, LoadRow, MetricsResult}, }; @@ -29,6 +30,7 @@ use total_smart_retries::TotalSmartRetries; pub struct PaymentIntentMetricRow { pub status: Option>, pub currency: Option>, + pub profile_id: Option, pub total: Option, pub count: Option, #[serde(with = "common_utils::custom_serde::iso8601::option")] @@ -47,7 +49,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentIntentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentIntentFilters, granularity: &Option, time_range: &TimeRange, @@ -68,7 +70,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentIntentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentIntentFilters, granularity: &Option, time_range: &TimeRange, @@ -78,50 +80,22 @@ where match self { Self::SuccessfulSmartRetries => { SuccessfulSmartRetries - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::TotalSmartRetries => { TotalSmartRetries - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::SmartRetriedAmount => { SmartRetriedAmount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::PaymentIntentCount => { PaymentIntentCount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } } diff --git a/crates/analytics/src/payment_intents/metrics/payment_intent_count.rs b/crates/analytics/src/payment_intents/metrics/payment_intent_count.rs index c3443902f0cc..4632cbe9f370 100644 --- a/crates/analytics/src/payment_intents/metrics/payment_intent_count.rs +++ b/crates/analytics/src/payment_intents/metrics/payment_intent_count.rs @@ -12,6 +12,7 @@ use time::PrimitiveDateTime; use super::PaymentIntentMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -32,7 +33,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentIntentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentIntentFilters, granularity: &Option, time_range: &TimeRange, @@ -67,9 +68,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -101,6 +100,7 @@ where PaymentIntentMetricsBucketIdentifier::new( i.status.as_ref().map(|i| i.0), i.currency.as_ref().map(|i| i.0), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs b/crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs index d14174338c85..e1df9fe50d35 100644 --- a/crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs +++ b/crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs @@ -15,6 +15,7 @@ use time::PrimitiveDateTime; use super::PaymentIntentMetricRow; use crate::{ + enums::AuthInfo, query::{ Aggregate, FilterTypes, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window, @@ -38,7 +39,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentIntentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentIntentFilters, granularity: &Option, time_range: &TimeRange, @@ -72,9 +73,8 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; + query_builder .add_custom_filter_clause("attempt_count", "1", FilterTypes::Gt) .switch()?; @@ -111,6 +111,7 @@ where PaymentIntentMetricsBucketIdentifier::new( i.status.as_ref().map(|i| i.0), i.currency.as_ref().map(|i| i.0), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs b/crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs index 27d54256b14f..4fe5f3a26f51 100644 --- a/crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs +++ b/crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs @@ -15,6 +15,7 @@ use time::PrimitiveDateTime; use super::PaymentIntentMetricRow; use crate::{ + enums::AuthInfo, query::{ Aggregate, FilterTypes, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window, @@ -38,7 +39,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentIntentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentIntentFilters, granularity: &Option, time_range: &TimeRange, @@ -72,9 +73,8 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; + query_builder .add_custom_filter_clause("attempt_count", "1", FilterTypes::Gt) .switch()?; @@ -110,6 +110,7 @@ where PaymentIntentMetricsBucketIdentifier::new( i.status.as_ref().map(|i| i.0), i.currency.as_ref().map(|i| i.0), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payment_intents/metrics/total_smart_retries.rs b/crates/analytics/src/payment_intents/metrics/total_smart_retries.rs index ee63d15ee427..e98efa9f6abc 100644 --- a/crates/analytics/src/payment_intents/metrics/total_smart_retries.rs +++ b/crates/analytics/src/payment_intents/metrics/total_smart_retries.rs @@ -12,6 +12,7 @@ use time::PrimitiveDateTime; use super::PaymentIntentMetricRow; use crate::{ + enums::AuthInfo, query::{ Aggregate, FilterTypes, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window, @@ -35,7 +36,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentIntentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentIntentFilters, granularity: &Option, time_range: &TimeRange, @@ -69,9 +70,8 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; + query_builder .add_custom_filter_clause("attempt_count", "1", FilterTypes::Gt) .switch()?; @@ -105,6 +105,7 @@ where PaymentIntentMetricsBucketIdentifier::new( i.status.as_ref().map(|i| i.0), i.currency.as_ref().map(|i| i.0), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payment_intents/types.rs b/crates/analytics/src/payment_intents/types.rs index 9b1e7b8674d1..03f2a196c20e 100644 --- a/crates/analytics/src/payment_intents/types.rs +++ b/crates/analytics/src/payment_intents/types.rs @@ -25,6 +25,11 @@ where .add_filter_in_range_clause(PaymentIntentDimensions::Currency, &self.currency) .attach_printable("Error adding currency filter")?; } + if !self.profile_id.is_empty() { + builder + .add_filter_in_range_clause(PaymentIntentDimensions::ProfileId, &self.profile_id) + .attach_printable("Error adding profile id filter")?; + } Ok(()) } } diff --git a/crates/analytics/src/payments/core.rs b/crates/analytics/src/payments/core.rs index 1a27fa067a56..dca42b6802e3 100644 --- a/crates/analytics/src/payments/core.rs +++ b/crates/analytics/src/payments/core.rs @@ -19,11 +19,12 @@ use router_env::{ use super::{ distribution::PaymentDistributionRow, - filters::{get_payment_filter_for_dimension, FilterRow}, + filters::{get_payment_filter_for_dimension, PaymentFilterRow}, metrics::PaymentMetricRow, PaymentMetricsAccumulator, }; use crate::{ + enums::AuthInfo, errors::{AnalyticsError, AnalyticsResult}, metrics, payments::{PaymentDistributionAccumulator, PaymentMetricAccumulator}, @@ -45,7 +46,7 @@ pub enum TaskType { #[instrument(skip_all)] pub async fn get_metrics( pool: &AnalyticsProvider, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, req: GetPaymentMetricRequest, ) -> AnalyticsResult> { let mut metrics_accumulator: HashMap< @@ -64,14 +65,14 @@ pub async fn get_metrics( // TODO: lifetime issues with joinset, // can be optimized away if joinset lifetime requirements are relaxed - let merchant_id_scoped = merchant_id.to_owned(); + let auth_scoped = auth.to_owned(); set.spawn( async move { let data = pool .get_payment_metrics( &metric_type, &req.group_by_names.clone(), - &merchant_id_scoped, + &auth_scoped, &req.filters, &req.time_series.map(|t| t.granularity), &req.time_range, @@ -92,14 +93,14 @@ pub async fn get_metrics( payment_distribution = distribution.distribution_for.as_ref() ); - let merchant_id_scoped = merchant_id.to_owned(); + let auth_scoped = auth.to_owned(); set.spawn( async move { let data = pool .get_payment_distribution( &distribution, &req.group_by_names.clone(), - &merchant_id_scoped, + &auth_scoped, &req.filters, &req.time_series.map(|t| t.granularity), &req.time_range, @@ -222,31 +223,31 @@ pub async fn get_metrics( pub async fn get_filters( pool: &AnalyticsProvider, req: GetPaymentFiltersRequest, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, ) -> AnalyticsResult { let mut res = PaymentFiltersResponse::default(); for dim in req.group_by_names { let values = match pool { AnalyticsProvider::Sqlx(pool) => { - get_payment_filter_for_dimension(dim, merchant_id, &req.time_range, pool) + get_payment_filter_for_dimension(dim, auth, &req.time_range, pool) .await } AnalyticsProvider::Clickhouse(pool) => { - get_payment_filter_for_dimension(dim, merchant_id, &req.time_range, pool) + get_payment_filter_for_dimension(dim, auth, &req.time_range, pool) .await } AnalyticsProvider::CombinedCkh(sqlx_poll, ckh_pool) => { let ckh_result = get_payment_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, ckh_pool, ) .await; let sqlx_result = get_payment_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, sqlx_poll, ) @@ -262,14 +263,14 @@ pub async fn get_filters( AnalyticsProvider::CombinedSqlx(sqlx_poll, ckh_pool) => { let ckh_result = get_payment_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, ckh_pool, ) .await; let sqlx_result = get_payment_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, sqlx_poll, ) @@ -285,7 +286,7 @@ pub async fn get_filters( } .change_context(AnalyticsError::UnknownError)? .into_iter() - .filter_map(|fil: FilterRow| match dim { + .filter_map(|fil: PaymentFilterRow| match dim { PaymentDimensions::Currency => fil.currency.map(|i| i.as_ref().to_string()), PaymentDimensions::PaymentStatus => fil.status.map(|i| i.as_ref().to_string()), PaymentDimensions::Connector => fil.connector, @@ -294,6 +295,7 @@ pub async fn get_filters( PaymentDimensions::PaymentMethodType => fil.payment_method_type, PaymentDimensions::ClientSource => fil.client_source, PaymentDimensions::ClientVersion => fil.client_version, + PaymentDimensions::ProfileId => fil.profile_id, }) .collect::>(); res.query_data.push(FilterValue { diff --git a/crates/analytics/src/payments/distribution.rs b/crates/analytics/src/payments/distribution.rs index 17c29828ebaf..3bd8e5f78157 100644 --- a/crates/analytics/src/payments/distribution.rs +++ b/crates/analytics/src/payments/distribution.rs @@ -8,6 +8,7 @@ use diesel_models::enums as storage_enums; use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, DBEnumWrapper, LoadRow, MetricsResult}, }; @@ -26,6 +27,7 @@ pub struct PaymentDistributionRow { pub payment_method_type: Option, pub client_source: Option, pub client_version: Option, + pub profile_id: Option, pub total: Option, pub count: Option, pub error_message: Option, @@ -47,7 +49,7 @@ where &self, distribution: &Distribution, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -69,7 +71,7 @@ where &self, distribution: &Distribution, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -81,7 +83,7 @@ where .load_distribution( distribution, dimensions, - merchant_id, + auth, filters, granularity, time_range, diff --git a/crates/analytics/src/payments/distribution/payment_error_message.rs b/crates/analytics/src/payments/distribution/payment_error_message.rs index 90869356debf..087ec5a640e8 100644 --- a/crates/analytics/src/payments/distribution/payment_error_message.rs +++ b/crates/analytics/src/payments/distribution/payment_error_message.rs @@ -9,6 +9,7 @@ use time::PrimitiveDateTime; use super::{PaymentDistribution, PaymentDistributionRow}; use crate::{ + enums::AuthInfo, query::{ Aggregate, GroupByClause, Order, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window, }, @@ -32,7 +33,7 @@ where &self, distribution: &Distribution, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -69,9 +70,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -155,6 +154,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/filters.rs b/crates/analytics/src/payments/filters.rs index b25c3fcba2d6..8e62c77a81f0 100644 --- a/crates/analytics/src/payments/filters.rs +++ b/crates/analytics/src/payments/filters.rs @@ -5,6 +5,7 @@ use error_stack::ResultExt; use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, ToSql, Window}, types::{ AnalyticsCollection, AnalyticsDataSource, DBEnumWrapper, FiltersError, FiltersResult, @@ -12,14 +13,14 @@ use crate::{ }, }; -pub trait PaymentFilterAnalytics: LoadRow {} +pub trait PaymentFilterAnalytics: LoadRow {} pub async fn get_payment_filter_for_dimension( dimension: PaymentDimensions, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, time_range: &TimeRange, pool: &T, -) -> FiltersResult> +) -> FiltersResult> where T: AnalyticsDataSource + PaymentFilterAnalytics, PrimitiveDateTime: ToSql, @@ -36,21 +37,19 @@ where .attach_printable("Error filtering time range") .switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; query_builder.set_distinct(); query_builder - .execute_query::(pool) + .execute_query::(pool) .await .change_context(FiltersError::QueryBuildingError)? .change_context(FiltersError::QueryExecutionFailure) } #[derive(Debug, serde::Serialize, Eq, PartialEq, serde::Deserialize)] -pub struct FilterRow { +pub struct PaymentFilterRow { pub currency: Option>, pub status: Option>, pub connector: Option, @@ -59,4 +58,5 @@ pub struct FilterRow { pub payment_method_type: Option, pub client_source: Option, pub client_version: Option, + pub profile_id: Option, } diff --git a/crates/analytics/src/payments/metrics.rs b/crates/analytics/src/payments/metrics.rs index b5e0a487920c..731f03a247a2 100644 --- a/crates/analytics/src/payments/metrics.rs +++ b/crates/analytics/src/payments/metrics.rs @@ -8,6 +8,7 @@ use diesel_models::enums as storage_enums; use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, DBEnumWrapper, LoadRow, MetricsResult}, }; @@ -39,6 +40,7 @@ pub struct PaymentMetricRow { pub payment_method_type: Option, pub client_source: Option, pub client_version: Option, + pub profile_id: Option, pub total: Option, pub count: Option, #[serde(with = "common_utils::custom_serde::iso8601::option")] @@ -57,7 +59,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -78,7 +80,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -87,86 +89,37 @@ where match self { Self::PaymentSuccessRate => { PaymentSuccessRate - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::PaymentCount => { PaymentCount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::PaymentSuccessCount => { PaymentSuccessCount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::PaymentProcessedAmount => { PaymentProcessedAmount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::AvgTicketSize => { AvgTicketSize - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::RetriesCount => { RetriesCount - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::ConnectorSuccessRate => { ConnectorSuccessRate - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } } diff --git a/crates/analytics/src/payments/metrics/avg_ticket_size.rs b/crates/analytics/src/payments/metrics/avg_ticket_size.rs index b09e2b2365a1..ec76bfc86dcc 100644 --- a/crates/analytics/src/payments/metrics/avg_ticket_size.rs +++ b/crates/analytics/src/payments/metrics/avg_ticket_size.rs @@ -11,6 +11,7 @@ use time::PrimitiveDateTime; use super::{PaymentMetric, PaymentMetricRow}; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -31,7 +32,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -70,9 +71,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -117,6 +116,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/metrics/connector_success_rate.rs b/crates/analytics/src/payments/metrics/connector_success_rate.rs index eb2ff1e3aa8d..e44e87a7e5f2 100644 --- a/crates/analytics/src/payments/metrics/connector_success_rate.rs +++ b/crates/analytics/src/payments/metrics/connector_success_rate.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::PaymentMetricRow; use crate::{ + enums::AuthInfo, query::{ Aggregate, FilterTypes, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window, @@ -33,7 +34,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -69,9 +70,8 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; + query_builder .add_custom_filter_clause(PaymentDimensions::Connector, "NULL", FilterTypes::IsNotNull) .switch()?; @@ -111,6 +111,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/metrics/payment_count.rs b/crates/analytics/src/payments/metrics/payment_count.rs index 9a8b3157d7a3..642ba9ef0359 100644 --- a/crates/analytics/src/payments/metrics/payment_count.rs +++ b/crates/analytics/src/payments/metrics/payment_count.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::PaymentMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -30,7 +31,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -63,9 +64,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -103,6 +102,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/metrics/payment_processed_amount.rs b/crates/analytics/src/payments/metrics/payment_processed_amount.rs index a3be7a9662e7..c31b8873cb8c 100644 --- a/crates/analytics/src/payments/metrics/payment_processed_amount.rs +++ b/crates/analytics/src/payments/metrics/payment_processed_amount.rs @@ -11,6 +11,7 @@ use time::PrimitiveDateTime; use super::PaymentMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -31,7 +32,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -64,9 +65,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -111,6 +110,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/metrics/payment_success_count.rs b/crates/analytics/src/payments/metrics/payment_success_count.rs index e2c3834a449d..a45a4557c523 100644 --- a/crates/analytics/src/payments/metrics/payment_success_count.rs +++ b/crates/analytics/src/payments/metrics/payment_success_count.rs @@ -11,6 +11,7 @@ use time::PrimitiveDateTime; use super::PaymentMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -31,7 +32,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -64,9 +65,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -110,6 +109,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/metrics/retries_count.rs b/crates/analytics/src/payments/metrics/retries_count.rs index f0e4084c65eb..c3c7d40e3214 100644 --- a/crates/analytics/src/payments/metrics/retries_count.rs +++ b/crates/analytics/src/payments/metrics/retries_count.rs @@ -13,6 +13,7 @@ use time::PrimitiveDateTime; use super::PaymentMetricRow; use crate::{ + enums::AuthInfo, query::{ Aggregate, FilterTypes, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window, @@ -36,7 +37,7 @@ where async fn load_metrics( &self, _dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, _filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -68,9 +69,8 @@ where alias: Some("end_bucket"), }) .switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; + query_builder .add_custom_filter_clause("attempt_count", "1", FilterTypes::Gt) .switch()?; @@ -106,6 +106,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/metrics/success_rate.rs b/crates/analytics/src/payments/metrics/success_rate.rs index 70fb1814a8e9..b8e840c2203b 100644 --- a/crates/analytics/src/payments/metrics/success_rate.rs +++ b/crates/analytics/src/payments/metrics/success_rate.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::PaymentMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -30,7 +31,7 @@ where async fn load_metrics( &self, dimensions: &[PaymentDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &PaymentFilters, granularity: &Option, time_range: &TimeRange, @@ -66,9 +67,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -106,6 +105,7 @@ where i.payment_method_type.clone(), i.client_source.clone(), i.client_version.clone(), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/payments/types.rs b/crates/analytics/src/payments/types.rs index b44446c66a94..f5139a9ea2bd 100644 --- a/crates/analytics/src/payments/types.rs +++ b/crates/analytics/src/payments/types.rs @@ -60,6 +60,11 @@ where .add_filter_in_range_clause(PaymentDimensions::ClientVersion, &self.client_version) .attach_printable("Error adding client version filter")?; } + if !self.profile_id.is_empty() { + builder + .add_filter_in_range_clause(PaymentDimensions::ProfileId, &self.profile_id) + .attach_printable("Error adding profile id filter")?; + } Ok(()) } } diff --git a/crates/analytics/src/query.rs b/crates/analytics/src/query.rs index 7e2fdd1244f2..5f8a2f4a3304 100644 --- a/crates/analytics/src/query.rs +++ b/crates/analytics/src/query.rs @@ -19,13 +19,16 @@ use api_models::{ }, refunds::RefundStatus, }; -use common_utils::errors::{CustomResult, ParsingError}; +use common_utils::{ + errors::{CustomResult, ParsingError}, + id_type::{MerchantId, OrganizationId, ProfileId}, +}; use diesel_models::{enums as storage_enums, enums::FraudCheckStatus}; use error_stack::ResultExt; use router_env::{logger, Flow}; use super::types::{AnalyticsCollection, AnalyticsDataSource, LoadRow, TableEngine}; -use crate::types::QueryExecutionError; +use crate::{enums::AuthInfo, types::QueryExecutionError}; pub type QueryResult = error_stack::Result; pub trait QueryFilter where @@ -354,7 +357,25 @@ pub trait ToSql { fn to_sql(&self, table_engine: &TableEngine) -> error_stack::Result; } -impl ToSql for &common_utils::id_type::MerchantId { +impl ToSql for &MerchantId { + fn to_sql(&self, _table_engine: &TableEngine) -> error_stack::Result { + Ok(self.get_string_repr().to_owned()) + } +} + +impl ToSql for MerchantId { + fn to_sql(&self, _table_engine: &TableEngine) -> error_stack::Result { + Ok(self.get_string_repr().to_owned()) + } +} + +impl ToSql for &OrganizationId { + fn to_sql(&self, _table_engine: &TableEngine) -> error_stack::Result { + Ok(self.get_string_repr().to_owned()) + } +} + +impl ToSql for ProfileId { fn to_sql(&self, _table_engine: &TableEngine) -> error_stack::Result { Ok(self.get_string_repr().to_owned()) } @@ -772,3 +793,46 @@ where Ok(store.load_results(query.as_str()).await) } } + +impl QueryFilter for AuthInfo +where + T: AnalyticsDataSource, + AnalyticsCollection: ToSql, +{ + fn set_filter_clause(&self, builder: &mut QueryBuilder) -> QueryResult<()> { + match self { + Self::OrgLevel { org_id } => { + builder + .add_filter_clause("organization_id", org_id) + .attach_printable("Error adding organization_id filter")?; + } + Self::MerchantLevel { + org_id, + merchant_ids, + } => { + builder + .add_filter_clause("organization_id", org_id) + .attach_printable("Error adding organization_id filter")?; + builder + .add_filter_in_range_clause("merchant_id", merchant_ids) + .attach_printable("Error adding merchant_id filter")?; + } + Self::ProfileLevel { + org_id, + merchant_id, + profile_ids, + } => { + builder + .add_filter_clause("organization_id", org_id) + .attach_printable("Error adding organization_id filter")?; + builder + .add_filter_clause("merchant_id", merchant_id) + .attach_printable("Error adding merchant_id filter")?; + builder + .add_filter_in_range_clause("profile_id", profile_ids) + .attach_printable("Error adding profile_id filter")?; + } + } + Ok(()) + } +} diff --git a/crates/analytics/src/refunds/core.rs b/crates/analytics/src/refunds/core.rs index c1fc83da76a0..9c4770c79eee 100644 --- a/crates/analytics/src/refunds/core.rs +++ b/crates/analytics/src/refunds/core.rs @@ -20,6 +20,7 @@ use super::{ RefundMetricsAccumulator, }; use crate::{ + enums::AuthInfo, errors::{AnalyticsError, AnalyticsResult}, metrics, refunds::RefundMetricAccumulator, @@ -28,7 +29,7 @@ use crate::{ pub async fn get_metrics( pool: &AnalyticsProvider, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, req: GetRefundMetricRequest, ) -> AnalyticsResult> { let mut metrics_accumulator: HashMap = @@ -43,14 +44,14 @@ pub async fn get_metrics( ); // Currently JoinSet works with only static lifetime references even if the task pool does not outlive the given reference // We can optimize away this clone once that is fixed - let merchant_id_scoped = merchant_id.to_owned(); + let auth_scoped = auth.to_owned(); set.spawn( async move { let data = pool .get_refund_metrics( &metric_type, &req.group_by_names.clone(), - &merchant_id_scoped, + &auth_scoped, &req.filters, &req.time_series.map(|t| t.granularity), &req.time_range, @@ -125,30 +126,30 @@ pub async fn get_metrics( pub async fn get_filters( pool: &AnalyticsProvider, req: GetRefundFilterRequest, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, ) -> AnalyticsResult { let mut res = RefundFiltersResponse::default(); for dim in req.group_by_names { let values = match pool { AnalyticsProvider::Sqlx(pool) => { - get_refund_filter_for_dimension(dim, merchant_id, &req.time_range, pool) + get_refund_filter_for_dimension(dim, auth, &req.time_range, pool) .await } AnalyticsProvider::Clickhouse(pool) => { - get_refund_filter_for_dimension(dim, merchant_id, &req.time_range, pool) + get_refund_filter_for_dimension(dim, auth, &req.time_range, pool) .await } AnalyticsProvider::CombinedCkh(sqlx_pool, ckh_pool) => { let ckh_result = get_refund_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, ckh_pool, ) .await; let sqlx_result = get_refund_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, sqlx_pool, ) @@ -164,14 +165,14 @@ pub async fn get_filters( AnalyticsProvider::CombinedSqlx(sqlx_pool, ckh_pool) => { let ckh_result = get_refund_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, ckh_pool, ) .await; let sqlx_result = get_refund_filter_for_dimension( dim, - merchant_id, + auth, &req.time_range, sqlx_pool, ) @@ -192,6 +193,7 @@ pub async fn get_filters( RefundDimensions::RefundStatus => fil.refund_status.map(|i| i.as_ref().to_string()), RefundDimensions::Connector => fil.connector, RefundDimensions::RefundType => fil.refund_type.map(|i| i.as_ref().to_string()), + RefundDimensions::ProfileId => fil.profile_id, }) .collect::>(); res.query_data.push(RefundFilterValue { diff --git a/crates/analytics/src/refunds/filters.rs b/crates/analytics/src/refunds/filters.rs index 138c4b86ead4..d87a778ebf39 100644 --- a/crates/analytics/src/refunds/filters.rs +++ b/crates/analytics/src/refunds/filters.rs @@ -8,6 +8,7 @@ use error_stack::ResultExt; use time::PrimitiveDateTime; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, ToSql, Window}, types::{ AnalyticsCollection, AnalyticsDataSource, DBEnumWrapper, FiltersError, FiltersResult, @@ -18,7 +19,7 @@ pub trait RefundFilterAnalytics: LoadRow {} pub async fn get_refund_filter_for_dimension( dimension: RefundDimensions, - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, time_range: &TimeRange, pool: &T, ) -> FiltersResult> @@ -38,9 +39,7 @@ where .attach_printable("Error filtering time range") .switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; query_builder.set_distinct(); @@ -56,4 +55,5 @@ pub struct RefundFilterRow { pub refund_status: Option>, pub connector: Option, pub refund_type: Option>, + pub profile_id: Option, } diff --git a/crates/analytics/src/refunds/metrics.rs b/crates/analytics/src/refunds/metrics.rs index e8e6d149039e..6ecfd8aeb293 100644 --- a/crates/analytics/src/refunds/metrics.rs +++ b/crates/analytics/src/refunds/metrics.rs @@ -18,6 +18,7 @@ use refund_success_count::RefundSuccessCount; use refund_success_rate::RefundSuccessRate; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, DBEnumWrapper, LoadRow, MetricsResult}, }; @@ -28,6 +29,7 @@ pub struct RefundMetricRow { pub refund_status: Option>, pub connector: Option, pub refund_type: Option>, + pub profile_id: Option, pub total: Option, pub count: Option, #[serde(with = "common_utils::custom_serde::iso8601::option")] @@ -51,7 +53,7 @@ where async fn load_metrics( &self, dimensions: &[RefundDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &RefundFilters, granularity: &Option, time_range: &TimeRange, @@ -72,7 +74,7 @@ where async fn load_metrics( &self, dimensions: &[RefundDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &RefundFilters, granularity: &Option, time_range: &TimeRange, @@ -81,50 +83,22 @@ where match self { Self::RefundSuccessRate => { RefundSuccessRate::default() - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::RefundCount => { RefundCount::default() - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::RefundSuccessCount => { RefundSuccessCount::default() - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } Self::RefundProcessedAmount => { RefundProcessedAmount::default() - .load_metrics( - dimensions, - merchant_id, - filters, - granularity, - time_range, - pool, - ) + .load_metrics(dimensions, auth, filters, granularity, time_range, pool) .await } } diff --git a/crates/analytics/src/refunds/metrics/refund_count.rs b/crates/analytics/src/refunds/metrics/refund_count.rs index 1ce6ed464286..07de04c58983 100644 --- a/crates/analytics/src/refunds/metrics/refund_count.rs +++ b/crates/analytics/src/refunds/metrics/refund_count.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::RefundMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -30,7 +31,7 @@ where async fn load_metrics( &self, dimensions: &[RefundDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &RefundFilters, granularity: &Option, time_range: &TimeRange, @@ -63,9 +64,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -99,6 +98,7 @@ where i.refund_status.as_ref().map(|i| i.0.to_string()), i.connector.clone(), i.refund_type.as_ref().map(|i| i.0.to_string()), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/refunds/metrics/refund_processed_amount.rs b/crates/analytics/src/refunds/metrics/refund_processed_amount.rs index c03e85caadb4..f0f51a21fe0f 100644 --- a/crates/analytics/src/refunds/metrics/refund_processed_amount.rs +++ b/crates/analytics/src/refunds/metrics/refund_processed_amount.rs @@ -11,6 +11,7 @@ use time::PrimitiveDateTime; use super::RefundMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -30,7 +31,7 @@ where async fn load_metrics( &self, dimensions: &[RefundDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &RefundFilters, granularity: &Option, time_range: &TimeRange, @@ -66,9 +67,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range .set_filter_clause(&mut query_builder) @@ -105,6 +104,7 @@ where None, i.connector.clone(), i.refund_type.as_ref().map(|i| i.0.to_string()), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/refunds/metrics/refund_success_count.rs b/crates/analytics/src/refunds/metrics/refund_success_count.rs index ae7b39f1e92f..642cf70580d4 100644 --- a/crates/analytics/src/refunds/metrics/refund_success_count.rs +++ b/crates/analytics/src/refunds/metrics/refund_success_count.rs @@ -11,6 +11,7 @@ use time::PrimitiveDateTime; use super::RefundMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -31,7 +32,7 @@ where async fn load_metrics( &self, dimensions: &[RefundDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &RefundFilters, granularity: &Option, time_range: &TimeRange, @@ -67,9 +68,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range.set_filter_clause(&mut query_builder).switch()?; @@ -102,6 +101,7 @@ where None, i.connector.clone(), i.refund_type.as_ref().map(|i| i.0.to_string()), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/refunds/metrics/refund_success_rate.rs b/crates/analytics/src/refunds/metrics/refund_success_rate.rs index b42641df4d86..7b5716ba41a1 100644 --- a/crates/analytics/src/refunds/metrics/refund_success_rate.rs +++ b/crates/analytics/src/refunds/metrics/refund_success_rate.rs @@ -10,6 +10,7 @@ use time::PrimitiveDateTime; use super::RefundMetricRow; use crate::{ + enums::AuthInfo, query::{Aggregate, GroupByClause, QueryBuilder, QueryFilter, SeriesBucket, ToSql, Window}, types::{AnalyticsCollection, AnalyticsDataSource, MetricsError, MetricsResult}, }; @@ -29,7 +30,7 @@ where async fn load_metrics( &self, dimensions: &[RefundDimensions], - merchant_id: &common_utils::id_type::MerchantId, + auth: &AuthInfo, filters: &RefundFilters, granularity: &Option, time_range: &TimeRange, @@ -68,9 +69,7 @@ where filters.set_filter_clause(&mut query_builder).switch()?; - query_builder - .add_filter_clause("merchant_id", merchant_id) - .switch()?; + auth.set_filter_clause(&mut query_builder).switch()?; time_range.set_filter_clause(&mut query_builder).switch()?; @@ -97,6 +96,7 @@ where None, i.connector.clone(), i.refund_type.as_ref().map(|i| i.0.to_string()), + i.profile_id.clone(), TimeRange { start_time: match (granularity, i.start_bucket) { (Some(g), Some(st)) => g.clip_to_start(st)?, diff --git a/crates/analytics/src/refunds/types.rs b/crates/analytics/src/refunds/types.rs index d7d739e1aba7..3f22081a69d1 100644 --- a/crates/analytics/src/refunds/types.rs +++ b/crates/analytics/src/refunds/types.rs @@ -36,6 +36,12 @@ where .attach_printable("Error adding auth type filter")?; } + if !self.profile_id.is_empty() { + builder + .add_filter_in_range_clause(RefundDimensions::ProfileId, &self.profile_id) + .attach_printable("Error adding profile id filter")?; + } + Ok(()) } } diff --git a/crates/analytics/src/sqlx.rs b/crates/analytics/src/sqlx.rs index a7817e0cc6d4..76a5f5a09188 100644 --- a/crates/analytics/src/sqlx.rs +++ b/crates/analytics/src/sqlx.rs @@ -210,6 +210,10 @@ impl<'a> FromRow<'a, PgRow> for super::refunds::metrics::RefundMetricRow { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), })?; + let profile_id: Option = row.try_get("profile_id").or_else(|e| match e { + ColumnNotFound(_) => Ok(Default::default()), + e => Err(e), + })?; let total: Option = row.try_get("total").or_else(|e| match e { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), @@ -230,6 +234,7 @@ impl<'a> FromRow<'a, PgRow> for super::refunds::metrics::RefundMetricRow { refund_status, connector, refund_type, + profile_id, total, count, start_bucket, @@ -321,6 +326,10 @@ impl<'a> FromRow<'a, PgRow> for super::payments::metrics::PaymentMetricRow { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), })?; + let profile_id: Option = row.try_get("profile_id").or_else(|e| match e { + ColumnNotFound(_) => Ok(Default::default()), + e => Err(e), + })?; let total: Option = row.try_get("total").or_else(|e| match e { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), @@ -345,6 +354,7 @@ impl<'a> FromRow<'a, PgRow> for super::payments::metrics::PaymentMetricRow { payment_method_type, client_source, client_version, + profile_id, total, count, start_bucket, @@ -393,6 +403,10 @@ impl<'a> FromRow<'a, PgRow> for super::payments::distribution::PaymentDistributi ColumnNotFound(_) => Ok(Default::default()), e => Err(e), })?; + let profile_id: Option = row.try_get("profile_id").or_else(|e| match e { + ColumnNotFound(_) => Ok(Default::default()), + e => Err(e), + })?; let total: Option = row.try_get("total").or_else(|e| match e { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), @@ -421,6 +435,7 @@ impl<'a> FromRow<'a, PgRow> for super::payments::distribution::PaymentDistributi payment_method_type, client_source, client_version, + profile_id, total, count, error_message, @@ -430,7 +445,7 @@ impl<'a> FromRow<'a, PgRow> for super::payments::distribution::PaymentDistributi } } -impl<'a> FromRow<'a, PgRow> for super::payments::filters::FilterRow { +impl<'a> FromRow<'a, PgRow> for super::payments::filters::PaymentFilterRow { fn from_row(row: &'a PgRow) -> sqlx::Result { let currency: Option> = row.try_get("currency").or_else(|e| match e { @@ -470,6 +485,10 @@ impl<'a> FromRow<'a, PgRow> for super::payments::filters::FilterRow { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), })?; + let profile_id: Option = row.try_get("profile_id").or_else(|e| match e { + ColumnNotFound(_) => Ok(Default::default()), + e => Err(e), + })?; Ok(Self { currency, status, @@ -479,6 +498,7 @@ impl<'a> FromRow<'a, PgRow> for super::payments::filters::FilterRow { payment_method_type, client_source, client_version, + profile_id, }) } } @@ -495,6 +515,10 @@ impl<'a> FromRow<'a, PgRow> for super::payment_intents::metrics::PaymentIntentMe ColumnNotFound(_) => Ok(Default::default()), e => Err(e), })?; + let profile_id: Option = row.try_get("profile_id").or_else(|e| match e { + ColumnNotFound(_) => Ok(Default::default()), + e => Err(e), + })?; let total: Option = row.try_get("total").or_else(|e| match e { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), @@ -513,6 +537,7 @@ impl<'a> FromRow<'a, PgRow> for super::payment_intents::metrics::PaymentIntentMe Ok(Self { status, currency, + profile_id, total, count, start_bucket, @@ -533,7 +558,16 @@ impl<'a> FromRow<'a, PgRow> for super::payment_intents::filters::PaymentIntentFi ColumnNotFound(_) => Ok(Default::default()), e => Err(e), })?; - Ok(Self { status, currency }) + let profile_id: Option = row.try_get("profile_id").or_else(|e| match e { + ColumnNotFound(_) => Ok(Default::default()), + e => Err(e), + })?; + + Ok(Self { + status, + currency, + profile_id, + }) } } @@ -558,11 +592,16 @@ impl<'a> FromRow<'a, PgRow> for super::refunds::filters::RefundFilterRow { ColumnNotFound(_) => Ok(Default::default()), e => Err(e), })?; + let profile_id: Option = row.try_get("profile_id").or_else(|e| match e { + ColumnNotFound(_) => Ok(Default::default()), + e => Err(e), + })?; Ok(Self { currency, refund_status, connector, refund_type, + profile_id, }) } } diff --git a/crates/api_models/src/analytics.rs b/crates/api_models/src/analytics.rs index 9f95eda6a7f9..7abef4720688 100644 --- a/crates/api_models/src/analytics.rs +++ b/crates/api_models/src/analytics.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; -use common_utils::{events::ApiEventMetric, pii::EmailStrategy}; +use common_utils::{events::ApiEventMetric, pii::EmailStrategy, types::authentication::AuthInfo}; use masking::Secret; use self::{ @@ -114,7 +114,8 @@ pub struct ReportRequest { #[serde(rename_all = "camelCase")] pub struct GenerateReportRequest { pub request: ReportRequest, - pub merchant_id: common_utils::id_type::MerchantId, + pub merchant_id: Option, + pub auth: AuthInfo, pub email: Secret, } diff --git a/crates/api_models/src/analytics/connector_events.rs b/crates/api_models/src/analytics/connector_events.rs index 7d7e4ae2a8bc..c72d7d6e51af 100644 --- a/crates/api_models/src/analytics/connector_events.rs +++ b/crates/api_models/src/analytics/connector_events.rs @@ -1,6 +1,6 @@ #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] pub struct ConnectorEventsRequest { - pub payment_id: String, + pub payment_id: common_utils::id_type::PaymentId, pub refund_id: Option, pub dispute_id: Option, } diff --git a/crates/api_models/src/analytics/payment_intents.rs b/crates/api_models/src/analytics/payment_intents.rs index e7affa94e08a..61e336185b67 100644 --- a/crates/api_models/src/analytics/payment_intents.rs +++ b/crates/api_models/src/analytics/payment_intents.rs @@ -3,6 +3,8 @@ use std::{ hash::{Hash, Hasher}, }; +use common_utils::id_type; + use super::{NameDescription, TimeRange}; use crate::enums::{Currency, IntentStatus}; @@ -12,6 +14,8 @@ pub struct PaymentIntentFilters { pub status: Vec, #[serde(default)] pub currency: Vec, + #[serde(default)] + pub profile_id: Vec, } #[derive( @@ -35,6 +39,7 @@ pub enum PaymentIntentDimensions { #[serde(rename = "status")] PaymentIntentStatus, Currency, + ProfileId, } #[derive( @@ -94,6 +99,7 @@ impl From for NameDescription { pub struct PaymentIntentMetricsBucketIdentifier { pub status: Option, pub currency: Option, + pub profile_id: Option, #[serde(rename = "time_range")] pub time_bucket: TimeRange, #[serde(rename = "time_bucket")] @@ -106,11 +112,13 @@ impl PaymentIntentMetricsBucketIdentifier { pub fn new( status: Option, currency: Option, + profile_id: Option, normalized_time_range: TimeRange, ) -> Self { Self { status, currency, + profile_id, time_bucket: normalized_time_range, start_time: normalized_time_range.start_time, } @@ -121,6 +129,7 @@ impl Hash for PaymentIntentMetricsBucketIdentifier { fn hash(&self, state: &mut H) { self.status.map(|i| i.to_string()).hash(state); self.currency.hash(state); + self.profile_id.hash(state); self.time_bucket.hash(state); } } diff --git a/crates/api_models/src/analytics/payments.rs b/crates/api_models/src/analytics/payments.rs index 61b88c8fc545..40ff4bf26074 100644 --- a/crates/api_models/src/analytics/payments.rs +++ b/crates/api_models/src/analytics/payments.rs @@ -3,6 +3,8 @@ use std::{ hash::{Hash, Hasher}, }; +use common_utils::id_type; + use super::{NameDescription, TimeRange}; use crate::enums::{ AttemptStatus, AuthenticationType, Connector, Currency, PaymentMethod, PaymentMethodType, @@ -26,6 +28,8 @@ pub struct PaymentFilters { pub client_source: Vec, #[serde(default)] pub client_version: Vec, + #[serde(default)] + pub profile_id: Vec, } #[derive( @@ -59,6 +63,7 @@ pub enum PaymentDimensions { PaymentStatus, ClientSource, ClientVersion, + ProfileId, } #[derive( @@ -149,6 +154,7 @@ pub struct PaymentMetricsBucketIdentifier { pub payment_method_type: Option, pub client_source: Option, pub client_version: Option, + pub profile_id: Option, #[serde(rename = "time_range")] pub time_bucket: TimeRange, // Coz FE sucks @@ -168,6 +174,7 @@ impl PaymentMetricsBucketIdentifier { payment_method_type: Option, client_source: Option, client_version: Option, + profile_id: Option, normalized_time_range: TimeRange, ) -> Self { Self { @@ -179,6 +186,7 @@ impl PaymentMetricsBucketIdentifier { payment_method_type, client_source, client_version, + profile_id, time_bucket: normalized_time_range, start_time: normalized_time_range.start_time, } @@ -195,6 +203,7 @@ impl Hash for PaymentMetricsBucketIdentifier { self.payment_method_type.hash(state); self.client_source.hash(state); self.client_version.hash(state); + self.profile_id.hash(state); self.time_bucket.hash(state); } } diff --git a/crates/api_models/src/analytics/refunds.rs b/crates/api_models/src/analytics/refunds.rs index 32e3abaf37ac..8acb51e764c0 100644 --- a/crates/api_models/src/analytics/refunds.rs +++ b/crates/api_models/src/analytics/refunds.rs @@ -3,6 +3,8 @@ use std::{ hash::{Hash, Hasher}, }; +use common_utils::id_type; + use crate::{enums::Currency, refunds::RefundStatus}; #[derive( @@ -39,6 +41,8 @@ pub struct RefundFilters { pub connector: Vec, #[serde(default)] pub refund_type: Vec, + #[serde(default)] + pub profile_id: Vec, } #[derive( @@ -62,6 +66,7 @@ pub enum RefundDimensions { RefundStatus, Connector, RefundType, + ProfileId, } #[derive( @@ -117,6 +122,7 @@ pub struct RefundMetricsBucketIdentifier { pub connector: Option, pub refund_type: Option, + pub profile_id: Option, #[serde(rename = "time_range")] pub time_bucket: TimeRange, #[serde(rename = "time_bucket")] @@ -130,6 +136,7 @@ impl Hash for RefundMetricsBucketIdentifier { self.refund_status.hash(state); self.connector.hash(state); self.refund_type.hash(state); + self.profile_id.hash(state); self.time_bucket.hash(state); } } @@ -149,6 +156,7 @@ impl RefundMetricsBucketIdentifier { refund_status: Option, connector: Option, refund_type: Option, + profile_id: Option, normalized_time_range: TimeRange, ) -> Self { Self { @@ -156,6 +164,7 @@ impl RefundMetricsBucketIdentifier { refund_status, connector, refund_type, + profile_id, time_bucket: normalized_time_range, start_time: normalized_time_range.start_time, } diff --git a/crates/common_utils/src/types.rs b/crates/common_utils/src/types.rs index f0ecb7085901..7f2f844b03f4 100644 --- a/crates/common_utils/src/types.rs +++ b/crates/common_utils/src/types.rs @@ -1,6 +1,9 @@ //! Types that can be used in other crates pub mod keymanager; +/// Enum for Authentication Level +pub mod authentication; + use std::{ fmt::Display, ops::{Add, Sub}, diff --git a/crates/common_utils/src/types/authentication.rs b/crates/common_utils/src/types/authentication.rs new file mode 100644 index 000000000000..2df81b2d3d46 --- /dev/null +++ b/crates/common_utils/src/types/authentication.rs @@ -0,0 +1,37 @@ +use crate::id_type; + +/// Enum for different levels of authentication +#[derive( + Clone, + Debug, + Hash, + Eq, + PartialEq, + serde::Deserialize, + serde::Serialize, + strum::Display, + strum::EnumString, +)] +pub enum AuthInfo { + /// OrgLevel: Authentication at the organization level + OrgLevel { + /// org_id: OrganizationId + org_id: id_type::OrganizationId, + }, + /// MerchantLevel: Authentication at the merchant level + MerchantLevel { + /// org_id: OrganizationId + org_id: id_type::OrganizationId, + /// merchant_ids: Vec + merchant_ids: Vec, + }, + /// ProfileLevel: Authentication at the profile level + ProfileLevel { + /// org_id: OrganizationId + org_id: id_type::OrganizationId, + /// merchant_id: MerchantId + merchant_id: id_type::MerchantId, + /// profile_ids: Vec + profile_ids: Vec, + }, +} diff --git a/crates/hyperswitch_domain_models/src/merchant_account.rs b/crates/hyperswitch_domain_models/src/merchant_account.rs index 50b1effd27f2..666b6bfeea58 100644 --- a/crates/hyperswitch_domain_models/src/merchant_account.rs +++ b/crates/hyperswitch_domain_models/src/merchant_account.rs @@ -204,6 +204,11 @@ impl MerchantAccount { pub fn get_id(&self) -> &common_utils::id_type::MerchantId { &self.id } + + /// Get the organization_id from MerchantAccount + pub fn get_org_id(&self) -> &common_utils::id_type::OrganizationId { + &self.organization_id + } } #[cfg(all( diff --git a/crates/router/src/analytics.rs b/crates/router/src/analytics.rs index b7e89929a8a8..a6e94ed294a0 100644 --- a/crates/router/src/analytics.rs +++ b/crates/router/src/analytics.rs @@ -3,12 +3,13 @@ pub use analytics::*; pub mod routes { use actix_web::{web, Responder, Scope}; use analytics::{ - api_event::api_events_core, connector_events::connector_events_core, + api_event::api_events_core, connector_events::connector_events_core, enums::AuthInfo, errors::AnalyticsError, lambda_utils::invoke_lambda, opensearch::OpenSearchError, outgoing_webhook_event::outgoing_webhook_events_core, sdk_events::sdk_events_core, AnalyticsFlow, }; use api_models::analytics::{ + api_event::QueryType, search::{ GetGlobalSearchRequest, GetSearchRequest, GetSearchRequestWithIndex, SearchIndex, }, @@ -19,11 +20,11 @@ pub mod routes { GetRefundFilterRequest, GetRefundMetricRequest, GetSdkEventFiltersRequest, GetSdkEventMetricRequest, ReportRequest, }; - use error_stack::ResultExt; + use error_stack::{report, ResultExt}; use crate::{ consts::opensearch::OPENSEARCH_INDEX_PERMISSIONS, - core::{api_locking, errors::user::UserErrors}, + core::{api_locking, errors::user::UserErrors, verification::utils}, db::user::UserInterface, routes::AppState, services::{ @@ -45,35 +46,35 @@ pub mod routes { web::scope("/v1") .service( web::resource("metrics/payments") - .route(web::post().to(get_payment_metrics)), + .route(web::post().to(get_merchant_payment_metrics)), ) .service( web::resource("metrics/refunds") - .route(web::post().to(get_refunds_metrics)), + .route(web::post().to(get_merchant_refund_metrics)), ) .service( web::resource("filters/payments") - .route(web::post().to(get_payment_filters)), + .route(web::post().to(get_merchant_payment_filters)), ) .service( web::resource("filters/frm").route(web::post().to(get_frm_filters)), ) .service( web::resource("filters/refunds") - .route(web::post().to(get_refund_filters)), + .route(web::post().to(get_merchant_refund_filters)), ) .service(web::resource("{domain}/info").route(web::get().to(get_info))) .service( web::resource("report/dispute") - .route(web::post().to(generate_dispute_report)), + .route(web::post().to(generate_merchant_dispute_report)), ) .service( web::resource("report/refunds") - .route(web::post().to(generate_refund_report)), + .route(web::post().to(generate_merchant_refund_report)), ) .service( web::resource("report/payments") - .route(web::post().to(generate_payment_report)), + .route(web::post().to(generate_merchant_payment_report)), ) .service( web::resource("metrics/sdk_events") @@ -95,26 +96,28 @@ pub mod routes { web::resource("metrics/frm").route(web::post().to(get_frm_metrics)), ) .service( - web::resource("api_event_logs").route(web::get().to(get_api_events)), + web::resource("api_event_logs") + .route(web::get().to(get_profile_api_events)), ) .service( - web::resource("sdk_event_logs").route(web::post().to(get_sdk_events)), + web::resource("sdk_event_logs") + .route(web::post().to(get_profile_sdk_events)), ) .service( web::resource("connector_event_logs") - .route(web::get().to(get_connector_events)), + .route(web::get().to(get_profile_connector_events)), ) .service( web::resource("outgoing_webhook_event_logs") - .route(web::get().to(get_outgoing_webhook_events)), + .route(web::get().to(get_profile_outgoing_webhook_events)), ) .service( - web::resource("filters/api_events") - .route(web::post().to(get_api_event_filters)), + web::resource("metrics/api_events") + .route(web::post().to(get_merchant_api_events_metrics)), ) .service( - web::resource("metrics/api_events") - .route(web::post().to(get_api_events_metrics)), + web::resource("filters/api_events") + .route(web::post().to(get_merchant_api_event_filters)), ) .service( web::resource("search") @@ -124,24 +127,213 @@ pub mod routes { web::resource("search/{domain}") .route(web::post().to(get_search_results)), ) + .service( + web::resource("metrics/disputes") + .route(web::post().to(get_merchant_dispute_metrics)), + ) .service( web::resource("filters/disputes") - .route(web::post().to(get_dispute_filters)), + .route(web::post().to(get_merchant_dispute_filters)), ) .service( - web::resource("metrics/disputes") - .route(web::post().to(get_dispute_metrics)), + web::scope("/merchant") + .service( + web::resource("metrics/payments") + .route(web::post().to(get_merchant_payment_metrics)), + ) + .service( + web::resource("metrics/refunds") + .route(web::post().to(get_merchant_refund_metrics)), + ) + .service( + web::resource("filters/payments") + .route(web::post().to(get_merchant_payment_filters)), + ) + .service( + web::resource("filters/refunds") + .route(web::post().to(get_merchant_refund_filters)), + ) + .service( + web::resource("{domain}/info").route(web::get().to(get_info)), + ) + .service( + web::resource("report/dispute") + .route(web::post().to(generate_merchant_dispute_report)), + ) + .service( + web::resource("report/refunds") + .route(web::post().to(generate_merchant_refund_report)), + ) + .service( + web::resource("report/payments") + .route(web::post().to(generate_merchant_payment_report)), + ) + .service( + web::resource("metrics/api_events") + .route(web::post().to(get_merchant_api_events_metrics)), + ) + .service( + web::resource("filters/api_events") + .route(web::post().to(get_merchant_api_event_filters)), + ) + .service( + web::resource("metrics/disputes") + .route(web::post().to(get_merchant_dispute_metrics)), + ) + .service( + web::resource("filters/disputes") + .route(web::post().to(get_merchant_dispute_filters)), + ), + ) + .service( + web::scope("/org") + .service( + web::resource("{domain}/info").route(web::get().to(get_info)), + ) + .service( + web::resource("metrics/payments") + .route(web::post().to(get_org_payment_metrics)), + ) + .service( + web::resource("filters/payments") + .route(web::post().to(get_org_payment_filters)), + ) + .service( + web::resource("metrics/refunds") + .route(web::post().to(get_org_refund_metrics)), + ) + .service( + web::resource("filters/refunds") + .route(web::post().to(get_org_refund_filters)), + ) + .service( + web::resource("metrics/disputes") + .route(web::post().to(get_org_dispute_metrics)), + ) + .service( + web::resource("filters/disputes") + .route(web::post().to(get_org_dispute_filters)), + ) + .service( + web::resource("filters/api_events") + .route(web::post().to(get_org_api_event_filters)), + ) + .service( + web::resource("metrics/api_events") + .route(web::post().to(get_org_api_events_metrics)), + ) + .service( + web::resource("report/dispute") + .route(web::post().to(generate_org_dispute_report)), + ) + .service( + web::resource("report/refunds") + .route(web::post().to(generate_org_refund_report)), + ) + .service( + web::resource("report/payments") + .route(web::post().to(generate_org_payment_report)), + ), + ) + .service( + web::scope("/profile") + .service( + web::resource("{domain}/info").route(web::get().to(get_info)), + ) + .service( + web::resource("metrics/payments") + .route(web::post().to(get_profile_payment_metrics)), + ) + .service( + web::resource("filters/payments") + .route(web::post().to(get_profile_payment_filters)), + ) + .service( + web::resource("metrics/refunds") + .route(web::post().to(get_profile_refund_metrics)), + ) + .service( + web::resource("filters/refunds") + .route(web::post().to(get_profile_refund_filters)), + ) + .service( + web::resource("metrics/api_events") + .route(web::post().to(get_profile_api_events_metrics)), + ) + .service( + web::resource("filters/api_events") + .route(web::post().to(get_profile_api_event_filters)), + ) + .service( + web::resource("metrics/disputes") + .route(web::post().to(get_profile_dispute_metrics)), + ) + .service( + web::resource("filters/disputes") + .route(web::post().to(get_profile_dispute_filters)), + ) + .service( + web::resource("connector_event_logs") + .route(web::get().to(get_profile_connector_events)), + ) + .service( + web::resource("outgoing_webhook_event_logs") + .route(web::get().to(get_profile_outgoing_webhook_events)), + ) + .service( + web::resource("report/dispute") + .route(web::post().to(generate_profile_dispute_report)), + ) + .service( + web::resource("report/refunds") + .route(web::post().to(generate_profile_refund_report)), + ) + .service( + web::resource("report/payments") + .route(web::post().to(generate_profile_payment_report)), + ) + .service( + web::resource("api_event_logs") + .route(web::get().to(get_profile_api_events)), + ) + .service( + web::resource("sdk_event_logs") + .route(web::post().to(get_profile_sdk_events)), + ), ), ) .service( web::scope("/v2") .service( web::resource("/metrics/payments") - .route(web::post().to(get_payment_intents_metrics)), + .route(web::post().to(get_merchant_payment_intent_metrics)), ) .service( web::resource("/filters/payments") .route(web::post().to(get_payment_intents_filters)), + ) + .service( + web::scope("/merchant") + .service( + web::resource("/metrics/payments") + .route(web::post().to(get_merchant_payment_intent_metrics)), + ) + .service( + web::resource("/filters/payments") + .route(web::post().to(get_payment_intents_filters)), + ), + ) + .service( + web::scope("/org").service( + web::resource("/metrics/payments") + .route(web::post().to(get_org_payment_intent_metrics)), + ), + ) + .service( + web::scope("/profile").service( + web::resource("/metrics/payments") + .route(web::post().to(get_profile_payment_intent_metrics)), + ), ), ) } @@ -172,7 +364,81 @@ pub mod routes { /// # Panics /// /// Panics if `json_payload` array does not contain one `GetPaymentMetricRequest` element. - pub async fn get_payment_metrics( + pub async fn get_merchant_payment_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetPaymentMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetPaymentMetricRequest"); + let flow = AnalyticsFlow::GetPaymentMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::payments::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetPaymentMetricRequest` element. + pub async fn get_org_payment_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetPaymentMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetPaymentMetricRequest"); + let flow = AnalyticsFlow::GetPaymentMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::payments::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetPaymentMetricRequest` element. + pub async fn get_profile_payment_metrics( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json<[GetPaymentMetricRequest; 1]>, @@ -191,7 +457,18 @@ pub mod routes { &req, payload, |state, auth: AuthenticationData, req, _| async move { - analytics::payments::get_metrics(&state.pool, auth.merchant_account.get_id(), req) + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::payments::get_metrics(&state.pool, &auth, req) .await .map(ApplicationResponse::Json) }, @@ -204,7 +481,7 @@ pub mod routes { /// # Panics /// /// Panics if `json_payload` array does not contain one `GetPaymentIntentMetricRequest` element. - pub async fn get_payment_intents_metrics( + pub async fn get_merchant_payment_intent_metrics( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json<[GetPaymentIntentMetricRequest; 1]>, @@ -223,13 +500,168 @@ pub mod routes { &req, payload, |state, auth: AuthenticationData, req, _| async move { - analytics::payment_intents::get_metrics( - &state.pool, - auth.merchant_account.get_id(), - req, - ) - .await - .map(ApplicationResponse::Json) + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::payment_intents::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetPaymentIntentMetricRequest` element. + pub async fn get_org_payment_intent_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetPaymentIntentMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetPaymentIntentMetricRequest"); + let flow = AnalyticsFlow::GetPaymentIntentMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::payment_intents::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetPaymentIntentMetricRequest` element. + pub async fn get_profile_payment_intent_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetPaymentIntentMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetPaymentIntentMetricRequest"); + let flow = AnalyticsFlow::GetPaymentIntentMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::payment_intents::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetRefundMetricRequest` element. + pub async fn get_merchant_refund_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetRefundMetricRequest; 1]>, + ) -> impl Responder { + #[allow(clippy::expect_used)] + // safety: This shouldn't panic owing to the data type + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetRefundMetricRequest"); + let flow = AnalyticsFlow::GetRefundsMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::refunds::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetRefundMetricRequest` element. + pub async fn get_org_refund_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetRefundMetricRequest; 1]>, + ) -> impl Responder { + #[allow(clippy::expect_used)] + // safety: This shouldn't panic owing to the data type + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetRefundMetricRequest"); + let flow = AnalyticsFlow::GetRefundsMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::refunds::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) }, &auth::JWTAuth(Permission::Analytics), api_locking::LockAction::NotApplicable, @@ -240,7 +672,7 @@ pub mod routes { /// # Panics /// /// Panics if `json_payload` array does not contain one `GetRefundMetricRequest` element. - pub async fn get_refunds_metrics( + pub async fn get_profile_refund_metrics( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json<[GetRefundMetricRequest; 1]>, @@ -259,7 +691,18 @@ pub mod routes { &req, payload, |state, auth: AuthenticationData, req, _| async move { - analytics::refunds::get_metrics(&state.pool, auth.merchant_account.get_id(), req) + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::refunds::get_metrics(&state.pool, &auth, req) .await .map(ApplicationResponse::Json) }, @@ -411,7 +854,7 @@ pub mod routes { .await } - pub async fn get_payment_filters( + pub async fn get_merchant_payment_filters( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json, @@ -423,7 +866,13 @@ pub mod routes { &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { - analytics::payments::get_filters(&state.pool, req, auth.merchant_account.get_id()) + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::payments::get_filters(&state.pool, req, &auth) .await .map(ApplicationResponse::Json) }, @@ -433,25 +882,25 @@ pub mod routes { .await } - pub async fn get_payment_intents_filters( + pub async fn get_org_payment_filters( state: web::Data, req: actix_web::HttpRequest, - json_payload: web::Json, + json_payload: web::Json, ) -> impl Responder { - let flow = AnalyticsFlow::GetPaymentIntentFilters; + let flow = AnalyticsFlow::GetPaymentFilters; Box::pin(api::server_wrap( flow, state, &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { - analytics::payment_intents::get_filters( - &state.pool, - req, - auth.merchant_account.get_id(), - ) - .await - .map(ApplicationResponse::Json) + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::payments::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) }, &auth::JWTAuth(Permission::Analytics), api_locking::LockAction::NotApplicable, @@ -459,19 +908,30 @@ pub mod routes { .await } - pub async fn get_refund_filters( + pub async fn get_profile_payment_filters( state: web::Data, req: actix_web::HttpRequest, - json_payload: web::Json, + json_payload: web::Json, ) -> impl Responder { - let flow = AnalyticsFlow::GetRefundFilters; + let flow = AnalyticsFlow::GetPaymentFilters; Box::pin(api::server_wrap( flow, state, &req, json_payload.into_inner(), - |state, auth: AuthenticationData, req: GetRefundFilterRequest, _| async move { - analytics::refunds::get_filters(&state.pool, req, auth.merchant_account.get_id()) + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::payments::get_filters(&state.pool, req, &auth) .await .map(ApplicationResponse::Json) }, @@ -481,21 +941,134 @@ pub mod routes { .await } - pub async fn get_frm_filters( + pub async fn get_payment_intents_filters( state: web::Data, req: actix_web::HttpRequest, - json_payload: web::Json, + json_payload: web::Json, ) -> impl Responder { - let flow = AnalyticsFlow::GetFrmFilters; + let flow = AnalyticsFlow::GetPaymentIntentFilters; Box::pin(api::server_wrap( flow, state, &req, json_payload.into_inner(), - |state, auth: AuthenticationData, req: GetFrmFilterRequest, _| async move { - analytics::frm::get_filters(&state.pool, req, auth.merchant_account.get_id()) - .await - .map(ApplicationResponse::Json) + |state, auth: AuthenticationData, req, _| async move { + analytics::payment_intents::get_filters( + &state.pool, + req, + auth.merchant_account.get_id(), + ) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_merchant_refund_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetRefundFilters; + Box::pin(api::server_wrap( + flow, + state, + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req: GetRefundFilterRequest, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::refunds::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_org_refund_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetRefundFilters; + Box::pin(api::server_wrap( + flow, + state, + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req: GetRefundFilterRequest, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::refunds::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_profile_refund_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetRefundFilters; + Box::pin(api::server_wrap( + flow, + state, + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req: GetRefundFilterRequest, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::refunds::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_frm_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetFrmFilters; + Box::pin(api::server_wrap( + flow, + state, + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req: GetFrmFilterRequest, _| async move { + analytics::frm::get_filters(&state.pool, req, auth.merchant_account.get_id()) + .await + .map(ApplicationResponse::Json) }, &auth::JWTAuth(Permission::Analytics), api_locking::LockAction::NotApplicable, @@ -529,7 +1102,7 @@ pub mod routes { .await } - pub async fn get_api_events( + pub async fn get_profile_api_events( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Query, @@ -541,6 +1114,14 @@ pub mod routes { &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { + let payment_id = match req.query_param.clone() { + QueryType::Payment { payment_id } => payment_id, + QueryType::Refund { payment_id, .. } => payment_id, + QueryType::Dispute { payment_id, .. } => payment_id, + }; + utils::check_if_profile_id_is_present_in_payment_intent(payment_id, &state, &auth) + .await + .change_context(AnalyticsError::AccessForbiddenError)?; api_events_core(&state.pool, req, auth.merchant_account.get_id()) .await .map(ApplicationResponse::Json) @@ -551,7 +1132,7 @@ pub mod routes { .await } - pub async fn get_outgoing_webhook_events( + pub async fn get_profile_outgoing_webhook_events( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Query< @@ -565,6 +1146,13 @@ pub mod routes { &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { + utils::check_if_profile_id_is_present_in_payment_intent( + req.payment_id.clone(), + &state, + &auth, + ) + .await + .change_context(AnalyticsError::AccessForbiddenError)?; outgoing_webhook_events_core(&state.pool, req, auth.merchant_account.get_id()) .await .map(ApplicationResponse::Json) @@ -575,7 +1163,7 @@ pub mod routes { .await } - pub async fn get_sdk_events( + pub async fn get_profile_sdk_events( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json, @@ -587,22 +1175,323 @@ pub mod routes { &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { + utils::check_if_profile_id_is_present_in_payment_intent( + req.payment_id.clone(), + &state, + &auth, + ) + .await + .change_context(AnalyticsError::AccessForbiddenError)?; sdk_events_core(&state.pool, req, &auth.merchant_account.publishable_key) .await - .map(ApplicationResponse::Json) + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn generate_merchant_refund_report( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GenerateRefundReport; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move { + let user = UserInterface::find_user_by_id(&*state.global_store, &user_id) + .await + .change_context(AnalyticsError::UnknownError)?; + + let user_email = UserEmail::from_pii_email(user.email) + .change_context(AnalyticsError::UnknownError)? + .get_secret(); + + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let lambda_req = GenerateReportRequest { + request: payload, + merchant_id: Some(merchant_id.clone()), + auth: AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }, + email: user_email, + }; + + let json_bytes = + serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; + invoke_lambda( + &state.conf.report_download_config.refund_function, + &state.conf.report_download_config.region, + &json_bytes, + ) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::GenerateReport), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn generate_org_refund_report( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GenerateRefundReport; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move { + let user = UserInterface::find_user_by_id(&*state.global_store, &user_id) + .await + .change_context(AnalyticsError::UnknownError)?; + + let user_email = UserEmail::from_pii_email(user.email) + .change_context(AnalyticsError::UnknownError)? + .get_secret(); + + let org_id = auth.merchant_account.get_org_id(); + let lambda_req = GenerateReportRequest { + request: payload, + merchant_id: None, + auth: AuthInfo::OrgLevel { + org_id: org_id.clone(), + }, + email: user_email, + }; + + let json_bytes = + serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; + invoke_lambda( + &state.conf.report_download_config.refund_function, + &state.conf.report_download_config.region, + &json_bytes, + ) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::GenerateReport), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn generate_profile_refund_report( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GenerateRefundReport; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move { + let user = UserInterface::find_user_by_id(&*state.global_store, &user_id) + .await + .change_context(AnalyticsError::UnknownError)?; + + let user_email = UserEmail::from_pii_email(user.email) + .change_context(AnalyticsError::UnknownError)? + .get_secret(); + + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let lambda_req = GenerateReportRequest { + request: payload, + merchant_id: Some(merchant_id.clone()), + auth: AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }, + email: user_email, + }; + + let json_bytes = + serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; + invoke_lambda( + &state.conf.report_download_config.refund_function, + &state.conf.report_download_config.region, + &json_bytes, + ) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::GenerateReport), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn generate_merchant_dispute_report( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GenerateDisputeReport; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move { + let user = UserInterface::find_user_by_id(&*state.global_store, &user_id) + .await + .change_context(AnalyticsError::UnknownError)?; + + let user_email = UserEmail::from_pii_email(user.email) + .change_context(AnalyticsError::UnknownError)? + .get_secret(); + + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let lambda_req = GenerateReportRequest { + request: payload, + merchant_id: Some(merchant_id.clone()), + auth: AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }, + email: user_email, + }; + + let json_bytes = + serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; + invoke_lambda( + &state.conf.report_download_config.dispute_function, + &state.conf.report_download_config.region, + &json_bytes, + ) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::GenerateReport), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn generate_org_dispute_report( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GenerateDisputeReport; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move { + let user = UserInterface::find_user_by_id(&*state.global_store, &user_id) + .await + .change_context(AnalyticsError::UnknownError)?; + + let user_email = UserEmail::from_pii_email(user.email) + .change_context(AnalyticsError::UnknownError)? + .get_secret(); + + let org_id = auth.merchant_account.get_org_id(); + let lambda_req = GenerateReportRequest { + request: payload, + merchant_id: None, + auth: AuthInfo::OrgLevel { + org_id: org_id.clone(), + }, + email: user_email, + }; + + let json_bytes = + serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; + invoke_lambda( + &state.conf.report_download_config.dispute_function, + &state.conf.report_download_config.region, + &json_bytes, + ) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::GenerateReport), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn generate_profile_dispute_report( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GenerateDisputeReport; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move { + let user = UserInterface::find_user_by_id(&*state.global_store, &user_id) + .await + .change_context(AnalyticsError::UnknownError)?; + + let user_email = UserEmail::from_pii_email(user.email) + .change_context(AnalyticsError::UnknownError)? + .get_secret(); + + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let lambda_req = GenerateReportRequest { + request: payload, + merchant_id: Some(merchant_id.clone()), + auth: AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }, + email: user_email, + }; + + let json_bytes = + serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; + invoke_lambda( + &state.conf.report_download_config.dispute_function, + &state.conf.report_download_config.region, + &json_bytes, + ) + .await + .map(ApplicationResponse::Json) }, - &auth::JWTAuth(Permission::Analytics), + &auth::JWTAuth(Permission::GenerateReport), api_locking::LockAction::NotApplicable, )) .await } - pub async fn generate_refund_report( + pub async fn generate_merchant_payment_report( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json, ) -> impl Responder { - let flow = AnalyticsFlow::GenerateRefundReport; + let flow = AnalyticsFlow::GeneratePaymentReport; Box::pin(api::server_wrap( flow, state.clone(), @@ -617,16 +1506,22 @@ pub mod routes { .change_context(AnalyticsError::UnknownError)? .get_secret(); + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); let lambda_req = GenerateReportRequest { request: payload, - merchant_id: auth.merchant_account.get_id().to_owned(), + merchant_id: Some(merchant_id.clone()), + auth: AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }, email: user_email, }; let json_bytes = serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; invoke_lambda( - &state.conf.report_download_config.refund_function, + &state.conf.report_download_config.payment_function, &state.conf.report_download_config.region, &json_bytes, ) @@ -639,12 +1534,12 @@ pub mod routes { .await } - pub async fn generate_dispute_report( + pub async fn generate_org_payment_report( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json, ) -> impl Responder { - let flow = AnalyticsFlow::GenerateDisputeReport; + let flow = AnalyticsFlow::GeneratePaymentReport; Box::pin(api::server_wrap( flow, state.clone(), @@ -659,16 +1554,20 @@ pub mod routes { .change_context(AnalyticsError::UnknownError)? .get_secret(); + let org_id = auth.merchant_account.get_org_id(); let lambda_req = GenerateReportRequest { request: payload, - merchant_id: auth.merchant_account.get_id().to_owned(), + merchant_id: None, + auth: AuthInfo::OrgLevel { + org_id: org_id.clone(), + }, email: user_email, }; let json_bytes = serde_json::to_vec(&lambda_req).map_err(|_| AnalyticsError::UnknownError)?; invoke_lambda( - &state.conf.report_download_config.dispute_function, + &state.conf.report_download_config.payment_function, &state.conf.report_download_config.region, &json_bytes, ) @@ -681,7 +1580,7 @@ pub mod routes { .await } - pub async fn generate_payment_report( + pub async fn generate_profile_payment_report( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json, @@ -700,10 +1599,20 @@ pub mod routes { let user_email = UserEmail::from_pii_email(user.email) .change_context(AnalyticsError::UnknownError)? .get_secret(); - + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; let lambda_req = GenerateReportRequest { request: payload, - merchant_id: auth.merchant_account.get_id().to_owned(), + merchant_id: Some(merchant_id.clone()), + auth: AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }, email: user_email, }; @@ -726,7 +1635,7 @@ pub mod routes { /// # Panics /// /// Panics if `json_payload` array does not contain one `GetApiEventMetricRequest` element. - pub async fn get_api_events_metrics( + pub async fn get_merchant_api_events_metrics( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json<[GetApiEventMetricRequest; 1]>, @@ -745,13 +1654,148 @@ pub mod routes { &req, payload, |state, auth: AuthenticationData, req, _| async move { - analytics::api_event::get_api_event_metrics( - &state.pool, - auth.merchant_account.get_id(), - req, - ) - .await - .map(ApplicationResponse::Json) + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::api_event::get_api_event_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetApiEventMetricRequest` element. + pub async fn get_org_api_events_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetApiEventMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetApiEventMetricRequest"); + let flow = AnalyticsFlow::GetApiEventMetrics; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::api_event::get_api_event_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetApiEventMetricRequest` element. + pub async fn get_profile_api_events_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetApiEventMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetApiEventMetricRequest"); + let flow = AnalyticsFlow::GetApiEventMetrics; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::api_event::get_api_event_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_merchant_api_event_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetApiEventFilters; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::api_event::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_org_api_event_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetApiEventFilters; + Box::pin(api::server_wrap( + flow, + state.clone(), + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::api_event::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) }, &auth::JWTAuth(Permission::Analytics), api_locking::LockAction::NotApplicable, @@ -759,7 +1803,7 @@ pub mod routes { .await } - pub async fn get_api_event_filters( + pub async fn get_profile_api_event_filters( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json, @@ -771,7 +1815,18 @@ pub mod routes { &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { - analytics::api_event::get_filters(&state.pool, req, auth.merchant_account.get_id()) + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::api_event::get_filters(&state.pool, req, &auth) .await .map(ApplicationResponse::Json) }, @@ -781,7 +1836,7 @@ pub mod routes { .await } - pub async fn get_connector_events( + pub async fn get_profile_connector_events( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Query, @@ -793,6 +1848,13 @@ pub mod routes { &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { + utils::check_if_profile_id_is_present_in_payment_intent( + req.payment_id.clone(), + &state, + &auth, + ) + .await + .change_context(AnalyticsError::AccessForbiddenError)?; connector_events_core(&state.pool, req, auth.merchant_account.get_id()) .await .map(ApplicationResponse::Json) @@ -883,7 +1945,68 @@ pub mod routes { .await } - pub async fn get_dispute_filters( + pub async fn get_merchant_dispute_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetDisputeFilters; + Box::pin(api::server_wrap( + flow, + state, + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::disputes::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_profile_dispute_filters( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json, + ) -> impl Responder { + let flow = AnalyticsFlow::GetDisputeFilters; + Box::pin(api::server_wrap( + flow, + state, + &req, + json_payload.into_inner(), + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::disputes::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + pub async fn get_org_dispute_filters( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json, @@ -895,7 +2018,92 @@ pub mod routes { &req, json_payload.into_inner(), |state, auth: AuthenticationData, req, _| async move { - analytics::disputes::get_filters(&state.pool, req, auth.merchant_account.get_id()) + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::disputes::get_filters(&state.pool, req, &auth) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetDisputeMetricRequest` element. + pub async fn get_merchant_dispute_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetDisputeMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetDisputeMetricRequest"); + let flow = AnalyticsFlow::GetDisputeMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let auth: AuthInfo = AuthInfo::MerchantLevel { + org_id: org_id.clone(), + merchant_ids: vec![merchant_id.clone()], + }; + analytics::disputes::get_metrics(&state.pool, &auth, req) + .await + .map(ApplicationResponse::Json) + }, + &auth::JWTAuth(Permission::Analytics), + api_locking::LockAction::NotApplicable, + )) + .await + } + + /// # Panics + /// + /// Panics if `json_payload` array does not contain one `GetDisputeMetricRequest` element. + pub async fn get_profile_dispute_metrics( + state: web::Data, + req: actix_web::HttpRequest, + json_payload: web::Json<[GetDisputeMetricRequest; 1]>, + ) -> impl Responder { + // safety: This shouldn't panic owing to the data type + #[allow(clippy::expect_used)] + let payload = json_payload + .into_inner() + .to_vec() + .pop() + .expect("Couldn't get GetDisputeMetricRequest"); + let flow = AnalyticsFlow::GetDisputeMetrics; + Box::pin(api::server_wrap( + flow, + state, + &req, + payload, + |state, auth: AuthenticationData, req, _| async move { + let org_id = auth.merchant_account.get_org_id(); + let merchant_id = auth.merchant_account.get_id(); + let profile_id = auth + .profile_id + .ok_or(report!(UserErrors::JwtProfileIdMissing)) + .change_context(AnalyticsError::AccessForbiddenError)?; + let auth: AuthInfo = AuthInfo::ProfileLevel { + org_id: org_id.clone(), + merchant_id: merchant_id.clone(), + profile_ids: vec![profile_id.clone()], + }; + analytics::disputes::get_metrics(&state.pool, &auth, req) .await .map(ApplicationResponse::Json) }, @@ -904,10 +2112,11 @@ pub mod routes { )) .await } + /// # Panics /// /// Panics if `json_payload` array does not contain one `GetDisputeMetricRequest` element. - pub async fn get_dispute_metrics( + pub async fn get_org_dispute_metrics( state: web::Data, req: actix_web::HttpRequest, json_payload: web::Json<[GetDisputeMetricRequest; 1]>, @@ -926,7 +2135,11 @@ pub mod routes { &req, payload, |state, auth: AuthenticationData, req, _| async move { - analytics::disputes::get_metrics(&state.pool, auth.merchant_account.get_id(), req) + let org_id = auth.merchant_account.get_org_id(); + let auth: AuthInfo = AuthInfo::OrgLevel { + org_id: org_id.clone(), + }; + analytics::disputes::get_metrics(&state.pool, &auth, req) .await .map(ApplicationResponse::Json) }, diff --git a/crates/router/src/core/verification/utils.rs b/crates/router/src/core/verification/utils.rs index e868fe930b75..5323c6d74430 100644 --- a/crates/router/src/core/verification/utils.rs +++ b/crates/router/src/core/verification/utils.rs @@ -1,4 +1,5 @@ -use common_utils::errors::CustomResult; +use api_models::payments::PaymentIdType; +use common_utils::{errors::CustomResult, id_type::PaymentId}; use error_stack::{Report, ResultExt}; use crate::{ @@ -8,8 +9,9 @@ use crate::{ }, logger, routes::SessionState, - types, - types::storage, + services::authentication::AuthenticationData, + types::{self, storage}, + utils::find_payment_intent_from_payment_id_type, }; pub async fn check_existence_and_add_domain_to_db( @@ -136,3 +138,19 @@ pub fn log_applepay_verification_response_if_error( .map_err(|error| logger::error!(applepay_domain_verification_error= ?error)) }); } +pub async fn check_if_profile_id_is_present_in_payment_intent( + payment_id: PaymentId, + state: &SessionState, + auth_data: &AuthenticationData, +) -> CustomResult<(), errors::ApiErrorResponse> { + let payment_id_type = PaymentIdType::PaymentIntentId(payment_id); + let payment_intent = find_payment_intent_from_payment_id_type( + state, + payment_id_type, + &auth_data.merchant_account, + &auth_data.key_store, + ) + .await + .change_context(errors::ApiErrorResponse::Unauthorized)?; + utils::validate_profile_id_from_auth_layer(auth_data.profile_id.clone(), &payment_intent) +} diff --git a/crates/router/src/types/domain/user.rs b/crates/router/src/types/domain/user.rs index 58a0a68df51f..f41d7157eecd 100644 --- a/crates/router/src/types/domain/user.rs +++ b/crates/router/src/types/domain/user.rs @@ -359,7 +359,7 @@ impl TryFrom for MerchantName { type Error = error_stack::Report; fn try_from(company_name: UserCompanyName) -> Result { - Self::new(company_name.get_secret()).change_context(UserErrors::CompanyNameParsingError) + Self::try_new(company_name.get_secret()).change_context(UserErrors::CompanyNameParsingError) } }