From 8ac7a4a6eb8b87df993e4a45e47be7bc8cb30925 Mon Sep 17 00:00:00 2001 From: Daniel Chambers Date: Thu, 10 Oct 2024 13:18:06 +1100 Subject: [PATCH 1/2] Update to latest NDC SDK --- Cargo.lock | 1747 ++++++++++-------- Cargo.toml | 2 +- Dockerfile | 4 +- README.md | 42 +- connector-definition/connector-metadata.yaml | 2 + connector-definition/docker-compose.yaml | 7 - crates/ndc-sendgrid/Cargo.toml | 10 +- crates/ndc-sendgrid/src/configuration.rs | 33 +- crates/ndc-sendgrid/src/connector.rs | 126 +- crates/ndc-sendgrid/src/fields.rs | 78 +- crates/ndc-sendgrid/src/main.rs | 2 +- crates/ndc-sendgrid/src/mutation.rs | 54 +- crates/ndc-sendgrid/src/query.rs | 115 +- crates/ndc-sendgrid/src/schema.rs | 313 ++-- crates/ndc-sendgrid/src/sendgrid_api.rs | 14 +- rust-toolchain.toml | 4 + 16 files changed, 1481 insertions(+), 1072 deletions(-) delete mode 100644 connector-definition/docker-compose.yaml create mode 100644 rust-toolchain.toml diff --git a/Cargo.lock b/Cargo.lock index 2f283f3..522346c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,24 +4,24 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -43,47 +43,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.3" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -91,26 +92,54 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -123,9 +152,9 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -137,7 +166,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", "tower", "tower-layer", @@ -153,8 +182,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -171,8 +200,8 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "mime", "pin-project-lite", "serde", @@ -184,25 +213,19 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -210,19 +233,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" @@ -232,29 +246,35 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] -name = "bytes" +name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cc" -version = "1.0.83" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" dependencies = [ - "libc", + "shlex", ] [[package]] @@ -265,22 +285,22 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "clap" -version = "4.5.1" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -288,56 +308,51 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim", ] [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] -name = "colored" -version = "2.0.4" +name = "colorful" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" -dependencies = [ - "is-terminal", - "lazy_static", - "windows-sys 0.48.0", -] +checksum = "97af0562545a7d7f3d9222fcf909963bec36dcb502afaacab98c6ffac8da47ce" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -345,124 +360,96 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "crossbeam-channel" -version = "0.5.8" +name = "crc32fast" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", - "crossbeam-utils", ] [[package]] -name = "crossbeam-utils" -version = "0.8.16" +name = "crossbeam-channel" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", + "crossbeam-utils", ] [[package]] -name = "darling" -version = "0.14.4" +name = "crossbeam-utils" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "darling" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "darling_core", + "darling_macro", ] [[package]] name = "darling_core" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 2.0.49", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", + "strsim", + "syn", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.3", + "darling_core", "quote", - "syn 2.0.49", + "syn", ] [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ + "powerfmt", "serde", ] [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[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", ] @@ -475,30 +462,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "errno-dragonfly", "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "fastrand" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] -name = "fastrand" -version = "2.0.0" +name = "flate2" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +dependencies = [ + "crc32fast", + "miniz_oxide", +] [[package]] name = "fnv" @@ -523,33 +509,33 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -558,38 +544,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-io", @@ -602,24 +588,11 @@ dependencies = [ "slab", ] -[[package]] -name = "gdc_rust_types" -version = "1.0.2" -source = "git+https://github.com/hasura/gdc_rust_types.git?rev=3273434#3273434068400f836cf12ea08c514505446821cb" -dependencies = [ - "indexmap 2.2.3", - "openapiv3", - "serde", - "serde-enum-str", - "serde_json", - "serde_with 3.6.1", -] - [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -628,23 +601,48 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.21" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 1.9.3", + "http 0.2.12", + "indexmap 2.6.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -659,21 +657,21 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -683,23 +681,57 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" -version = "0.4.5" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "http", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -711,9 +743,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -723,35 +755,72 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2", "tokio", "tower-service", "tracing", "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "rustls 0.23.14", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tower-service", +] + [[package]] name = "hyper-timeout" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.30", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -764,24 +833,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", "native-tls", "tokio", "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", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -801,9 +905,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -822,85 +926,74 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.0", "serde", ] [[package]] name = "ipnet" -version = "2.8.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] -name = "is-terminal" -version = "0.4.9" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.48.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "0cb94a0ffd3f3ee755c20f7d8752f45cac88605a4dcf808abcff72873296ec7b" dependencies = [ "wasm-bindgen", ] [[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" [[package]] name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libm" -version = "0.2.7" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -908,9 +1001,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchers" @@ -923,15 +1016,15 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "memchr" -version = "2.6.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -941,9 +1034,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", @@ -951,31 +1044,31 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.10" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[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", @@ -988,48 +1081,41 @@ dependencies = [ ] [[package]] -name = "ndc-client" -version = "0.1.0" -source = "git+http://github.com/hasura/ndc-spec.git?tag=v0.1.0-rc.16#608ecc4b6719753c186a37494bbe95ae26e64f45" +name = "ndc-models" +version = "0.1.6" +source = "git+http://github.com/hasura/ndc-spec.git?tag=v0.1.6#d1be19e9cdd86ac7b6ad003ff82b7e5b4e96b84f" dependencies = [ - "async-trait", - "indexmap 2.2.3", - "opentelemetry", - "reqwest", + "indexmap 2.6.0", + "ref-cast", "schemars", "serde", - "serde_derive", "serde_json", - "serde_with 2.3.3", - "url", + "serde_with", + "smol_str", ] [[package]] name = "ndc-sdk" -version = "0.1.0" -source = "git+https://github.com/hasura/ndc-hub.git?rev=660750a#660750a08e96d05535649ab1476746e4c2fd9437" +version = "0.4.0" +source = "git+https://github.com/hasura/ndc-sdk-rs.git?tag=v0.4.0#665509f7d3b47ce4f014fc23f817a3599ba13933" dependencies = [ "async-trait", "axum", "axum-extra", - "base64 0.21.7", "bytes", "clap", - "gdc_rust_types", - "http", - "indexmap 2.2.3", + "http 0.2.12", "mime", - "ndc-client", + "ndc-models", "ndc-test", "opentelemetry", "opentelemetry-http", "opentelemetry-otlp", "opentelemetry-semantic-conventions", - "opentelemetry_api", + "opentelemetry-zipkin", "opentelemetry_sdk", "prometheus", - "reqwest", - "schemars", + "reqwest 0.11.27", "serde", "serde_json", "thiserror", @@ -1043,13 +1129,14 @@ dependencies = [ [[package]] name = "ndc-sendgrid" -version = "0.1.0" +version = "0.6.0" dependencies = [ "async-trait", - "indexmap 2.2.3", + "http 0.2.12", + "indexmap 2.6.0", "ndc-sdk", "prometheus", - "reqwest", + "reqwest 0.12.8", "schemars", "serde", "serde_json", @@ -1059,21 +1146,23 @@ dependencies = [ [[package]] name = "ndc-test" -version = "0.1.0" -source = "git+http://github.com/hasura/ndc-spec.git?tag=v0.1.0-rc.16#608ecc4b6719753c186a37494bbe95ae26e64f45" +version = "0.1.6" +source = "git+http://github.com/hasura/ndc-spec.git?tag=v0.1.6#d1be19e9cdd86ac7b6ad003ff82b7e5b4e96b84f" dependencies = [ "async-trait", "clap", - "colored", - "indexmap 2.2.3", - "ndc-client", - "proptest", - "reqwest", + "colorful", + "indexmap 2.6.0", + "ndc-models", + "rand", + "reqwest 0.11.27", "semver", "serde", "serde_json", + "smol_str", "thiserror", "tokio", + "url", ] [[package]] @@ -1087,58 +1176,42 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.16" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -dependencies = [ - "autocfg", - "libm", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] -name = "num_cpus" -version = "1.16.0" +name = "num-traits" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "hermit-abi", - "libc", + "autocfg", ] [[package]] name = "object" -version = "0.32.1" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "openapiv3" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b83630305ecc3355e998ddd2f926f98aae8e105eb42652174a58757851ba47" -dependencies = [ - "indexmap 1.9.3", - "serde", - "serde_json", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -1155,7 +1228,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] @@ -1166,9 +1239,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -1178,43 +1251,48 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.20.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9591d937bc0e6d2feb6f71a559540ab300ea49955229c347a517a28d27784c54" +checksum = "900d57987be3f2aeb70d385fff9b27fb74c5723cc9a52d904d4f9c807a0667bf" dependencies = [ - "opentelemetry_api", - "opentelemetry_sdk", + "futures-core", + "futures-sink", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", + "urlencoding", ] [[package]] name = "opentelemetry-http" -version = "0.9.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7594ec0e11d8e33faf03530a4c49af7064ebba81c1480e01be67d90b356508b" +checksum = "7690dc77bf776713848c4faa6501157469017eaf332baccd4eb1cea928743d94" dependencies = [ "async-trait", "bytes", - "http", - "opentelemetry_api", - "reqwest", + "http 0.2.12", + "opentelemetry", + "reqwest 0.11.27", ] [[package]] name = "opentelemetry-otlp" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5e5a5c4135864099f3faafbe939eb4d7f9b80ebf68a8448da961b32a7c1275" +checksum = "1a016b8d9495c639af2145ac22387dcb88e44118e45320d9238fbf4e7889abcb" dependencies = [ "async-trait", "futures-core", - "http", + "http 0.2.12", + "opentelemetry", "opentelemetry-http", "opentelemetry-proto", "opentelemetry-semantic-conventions", - "opentelemetry_api", "opentelemetry_sdk", "prost", - "reqwest", + "reqwest 0.11.27", "thiserror", "tokio", "tonic", @@ -1222,11 +1300,11 @@ dependencies = [ [[package]] name = "opentelemetry-proto" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e3f814aa9f8c905d0ee4bde026afd3b2577a97c10e1699912e3e44f0c4cbeb" +checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" dependencies = [ - "opentelemetry_api", + "opentelemetry", "opentelemetry_sdk", "prost", "tonic", @@ -1234,47 +1312,48 @@ dependencies = [ [[package]] name = "opentelemetry-semantic-conventions" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c9f9340ad135068800e7f1b24e9e09ed9e7143f5bf8518ded3d3ec69789269" -dependencies = [ - "opentelemetry", -] +checksum = "f9ab5bd6c42fb9349dcf28af2ba9a0667f697f9bdcca045d39f2cec5543e2910" [[package]] -name = "opentelemetry_api" +name = "opentelemetry-zipkin" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a81f725323db1b1206ca3da8bb19874bbd3f57c3bcd59471bfb04525b265b9b" +checksum = "d6943c09b1b7c17b403ae842b00f23e6d5fc6f5ec06cccb3f39aca97094a899a" dependencies = [ - "futures-channel", - "futures-util", - "indexmap 1.9.3", - "js-sys", + "async-trait", + "futures-core", + "http 0.2.12", "once_cell", - "pin-project-lite", + "opentelemetry", + "opentelemetry-http", + "opentelemetry-semantic-conventions", + "opentelemetry_sdk", + "reqwest 0.11.27", + "serde", + "serde_json", "thiserror", - "urlencoding", + "typed-builder", ] [[package]] name = "opentelemetry_sdk" -version = "0.20.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8e705a0612d48139799fcbaba0d4a90f06277153e43dd2bdc16c6f0edd8026" +checksum = "9e90c7113be649e31e9a0f8b5ee24ed7a16923b322c3c5ab6367469c049d6b7e" dependencies = [ "async-trait", "crossbeam-channel", "futures-channel", "futures-executor", "futures-util", + "glob", "once_cell", - "opentelemetry_api", + "opentelemetry", "ordered-float", "percent-encoding", "rand", - "regex", - "serde_json", "thiserror", "tokio", "tokio-stream", @@ -1282,9 +1361,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "3.9.1" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a54938017eacd63036332b4ae5c8a49fc8c0c1d6d629893057e4f13609edd06" +checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" dependencies = [ "num-traits", ] @@ -1297,9 +1376,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1307,48 +1386,48 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1358,30 +1437,39 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +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 = "proc-macro2" -version = "1.0.78" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ "cfg-if", "fnv", @@ -1392,31 +1480,11 @@ dependencies = [ "thiserror", ] -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.0", - "lazy_static", - "num-traits", - "rand", - "rand_chacha", - "rand_xorshift", - "regex-syntax 0.8.2", - "rusty-fork", - "tempfile", - "unarray", -] - [[package]] name = "prost" -version = "0.11.9" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -1424,15 +1492,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1441,17 +1509,11 @@ version = "2.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1487,33 +1549,44 @@ dependencies = [ ] [[package]] -name = "rand_xorshift" -version = "0.3.0" +name = "redox_syscall" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "rand_core", + "bitflags 2.6.0", ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "ref-cast" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" dependencies = [ - "bitflags 1.3.2", + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] name = "regex" -version = "1.9.5" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", - "regex-syntax 0.7.5", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -1527,13 +1600,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.5", ] [[package]] @@ -1544,32 +1617,26 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -1579,12 +1646,12 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", "tower-service", @@ -1595,23 +1662,121 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest" +version = "0.12.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.2.0", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "system-configuration 0.6.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[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 = "rustix" -version = "0.38.13" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls" +version = "0.23.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.2.0", + "rustls-pki-types", + "schannel", + "security-framework", ] [[package]] @@ -1624,47 +1789,61 @@ dependencies = [ ] [[package]] -name = "rustversion" -version = "1.0.14" +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] -name = "rusty-fork" -version = "0.3.0" +name = "rustls-webpki" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", + "ring", + "rustls-pki-types", + "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "schemars" -version = "0.8.16" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "indexmap 1.9.3", - "indexmap 2.2.3", + "indexmap 2.6.0", "schemars_derive", "serde", "serde_json", @@ -1673,14 +1852,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.16" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", + "syn", ] [[package]] @@ -1691,11 +1870,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[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", @@ -1704,9 +1883,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -1714,88 +1893,59 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] -[[package]] -name = "serde-attributes" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eb8ec7724e4e524b2492b510e66957fe1a2c76c26a6975ec80823f2439da685" -dependencies = [ - "darling_core 0.14.4", - "serde-rename-rule", - "syn 1.0.109", -] - -[[package]] -name = "serde-enum-str" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26416dc95fcd46b0e4b12a3758043a229a6914050aaec2e8191949753ed4e9aa" -dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "serde-attributes", - "syn 1.0.109", -] - -[[package]] -name = "serde-rename-rule" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794e44574226fc701e3be5c651feb7939038fc67fb73f6f4dd5c4ba90fd3be70" - [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.6.0", "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ "itoa", "serde", @@ -1815,76 +1965,54 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" -dependencies = [ - "base64 0.13.1", - "chrono", - "hex", - "indexmap 1.9.3", - "serde", - "serde_json", - "serde_with_macros 2.3.3", - "time", -] - -[[package]] -name = "serde_with" -version = "3.6.1" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d167997bd841ec232f5b2b8e0e26606df2e7caa4c31b95ea9ca52b200bd270" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.3", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", - "serde_with_macros 3.6.1", + "serde_with_macros", "time", ] [[package]] name = "serde_with_macros" -version = "2.3.3" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ - "darling 0.20.3", + "darling", "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] -name = "serde_with_macros" -version = "3.6.1" +name = "sharded-slab" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "865f9743393e638991566a8b7a479043c2c8da94a33e0a31f18214c9cae0a64d" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ - "darling 0.20.3", - "proc-macro2", - "quote", - "syn 2.0.49", + "lazy_static", ] [[package]] -name = "sharded-slab" -version = "0.1.4" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[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", ] @@ -1900,9 +2028,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smol_str" @@ -1915,41 +2043,37 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.9" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] -name = "socket2" -version = "0.5.5" +name = "spin" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "strsim" -version = "0.11.0" +name = "subtle" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -1957,21 +2081,19 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.49" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" @@ -1981,7 +2103,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -1994,44 +2127,54 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tempfile" -version = "3.8.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "once_cell", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -2039,12 +2182,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -2052,24 +2197,25 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] [[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", ] @@ -2082,21 +2228,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2111,13 +2256,13 @@ dependencies = [ [[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.49", + "syn", ] [[package]] @@ -2130,11 +2275,33 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.14", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -2143,39 +2310,42 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "tonic" -version = "0.9.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ + "async-stream", "async-trait", "axum", "base64 0.21.7", "bytes", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", + "flate2", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-timeout", "percent-encoding", "pin-project", "prost", + "rustls-native-certs", + "rustls-pemfile 2.2.0", + "rustls-pki-types", "tokio", + "tokio-rustls 0.25.0", "tokio-stream", "tower", "tower-layer", @@ -2209,12 +2379,12 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "bytes", "futures-core", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "http-range-header", "mime", "pin-project-lite", @@ -2225,15 +2395,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" @@ -2255,7 +2425,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] @@ -2270,27 +2440,31 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-opentelemetry" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc09e402904a5261e42cf27aea09ccb7d5318c6717a9eec3d8e2e65c56b18f19" +checksum = "a9be14ba1bbe4ab79e9229f7f89fab8d120b865859f10527f31c033e599d2284" dependencies = [ + "js-sys", "once_cell", "opentelemetry", + "opentelemetry_sdk", + "smallvec", "tracing", "tracing-core", "tracing-log", "tracing-subscriber", + "web-time", ] [[package]] @@ -2305,9 +2479,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -2324,15 +2498,29 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typed-builder" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "77739c880e00693faef3d65ea3aad725f196da38b22fdc7ea6ded6e1ce4d3add" +dependencies = [ + "typed-builder-macro", +] [[package]] -name = "unarray" -version = "0.1.4" +name = "typed-builder-macro" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "unicase" @@ -2345,30 +2533,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.4.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2383,9 +2577,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[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 = "valuable" @@ -2401,18 +2595,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wait-timeout" -version = "0.2.0" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -2431,34 +2616,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "ef073ced962d62984fb38a36e5fdc1a2b23c9e0e1fa0689bb97afa4202ef6887" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "c4bfab14ef75323f4eb75fa52ee0a3fb59611977fd3240da19b2cf36ff85030e" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.49", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "65471f79c1022ffa5291d33520cbbb53b7687b01c2f8e83b57d102eed7ed479d" dependencies = [ "cfg-if", "js-sys", @@ -2468,9 +2654,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a7bec9830f60924d9ceb3ef99d55c155be8afa76954edffbb5936ff4509474e7" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2478,28 +2664,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "4c74f6e152a76a2ad448e223b0fc0b6b5747649c3d769cc6bf45737bf97d0ed6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "a42f6c679374623f295a8623adfe63d9284091245c3504bde47c17a3ce2777d9" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44188d185b5bdcae1052d08bcbcf9091a5524038d4572cc4f4f2bb9d5554ddd9" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -2528,12 +2724,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "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]] @@ -2551,7 +2777,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -2571,17 +2806,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2592,9 +2828,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2604,9 +2840,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2616,9 +2852,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2628,9 +2870,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2640,9 +2882,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2652,9 +2894,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2664,9 +2906,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" @@ -2677,3 +2919,30 @@ dependencies = [ "cfg-if", "windows-sys 0.48.0", ] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml index d72dad1..6183546 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.1.0" +version = "0.6.0" [workspace] resolver = "2" diff --git a/Dockerfile b/Dockerfile index eda8f6a..81abe27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76-slim-buster AS build +FROM rust:1.81-slim-bookworm AS build WORKDIR /app @@ -16,7 +16,7 @@ COPY ./Cargo.toml ./Cargo.toml RUN cargo build --release --all-targets -FROM debian:buster-slim as ndc-sendgrid +FROM debian:bookworm-slim AS ndc-sendgrid RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive \ diff --git a/README.md b/README.md index 4bd70dc..aa23332 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,15 @@ # SendGrid Connector -> [!WARNING] -> This connector has been updated to support the Hasura DDN Beta, and will not work with the Alpha. - The SendGrid Native Data Connector allows for connecting to the SendGrid v3 API and exposing its functionality from your Hasura API. While this is a functional implementation of the SendGrid API, it also serves as a minimal example of an "Action" style connector using the [Rust Data Connector SDK](https://github.com/hasura/ndc-hub#rusk-sdk). -* [SendGrid Connector information in the Hasura Connectors directory](https://hasura.io/connectors/sendgrid) -* [Hasura V3 Documentation](https://hasura.io/docs/3.0) +* [Hasura DDN Documentation](https://hasura.io/docs/3.0) In order to use this connector you will need to: * Create a [SendGrid API account](https://signup.sendgrid.com/) * Create an [API key](https://app.sendgrid.com/settings/api_keys) -* Log in to A Hasura CLI Session -* Create a Pre-Shared Token for service authentication between the Hasura V3 Engine and your connector +* A Hasura DDN project (see the [Getting Started guide](https://hasura.io/docs/3.0/getting-started/overview/)) ## Features @@ -26,7 +21,33 @@ This connector is a minimal implementation of the SendGrid v3 API functions: It also serves as an example of how an `Action` style connector can be implemented in Hasura V3. ## For Hasura Users -TBD +Add the SendGrid connector to your DDN project by running + +``` +> ddn connector init -i +``` + +Select the SendGrid connector from the list and provide a name for the connector and your SendGrid API key. + +Then you need to introspect the connector to get its schema: + +``` +> ddn connector introspect +``` + +And then you can add all the SendGrid commands to your supergraph: + +``` +> ddn command add "*" +``` + +You can now build your supergraph, run it locally, and open the Hasura Console to try it out: + +``` +> ddn supergraph build local +> ddn run docker-start +> ddn console --local +``` ## For Developers @@ -46,10 +67,7 @@ SENDGRID_API_KEY="YOUR-API-KEY-HERE" cargo run -- serve --configuration . ``` ### Docker - -The `Dockerfile` is used by the `connector create` command and can be tested as follows: - ``` docker build . --tag ndc-sendgrid -docker run -it -e SENDGRID_API_KEY="YOUR-API-KEY-HERE" ndc-sendgrid +docker run --rm -it -e SENDGRID_API_KEY="YOUR-API-KEY-HERE" -p 8080:8080 ndc-sendgrid ``` diff --git a/connector-definition/connector-metadata.yaml b/connector-definition/connector-metadata.yaml index 7e0fb96..952236e 100644 --- a/connector-definition/connector-metadata.yaml +++ b/connector-definition/connector-metadata.yaml @@ -4,8 +4,10 @@ packagingDefinition: supportedEnvironmentVariables: - name: SENDGRID_API_KEY description: The SendGrid API key to use + required: true commands: {} dockerComposeWatch: - path: ./ target: /etc/connector action: sync+restart +documentationPage: https://hasura.info/sendgrid-getting-started diff --git a/connector-definition/docker-compose.yaml b/connector-definition/docker-compose.yaml deleted file mode 100644 index f14d8f9..0000000 --- a/connector-definition/docker-compose.yaml +++ /dev/null @@ -1,7 +0,0 @@ -services: - connector: - develop: - watch: - - path: ./ - target: /etc/connector - action: sync+restart diff --git a/crates/ndc-sendgrid/Cargo.toml b/crates/ndc-sendgrid/Cargo.toml index fdcfa5a..5fd30c2 100644 --- a/crates/ndc-sendgrid/Cargo.toml +++ b/crates/ndc-sendgrid/Cargo.toml @@ -1,20 +1,20 @@ [package] name = "ndc-sendgrid" -version = "0.1.0" +version = { workspace = true } edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -# ndc-client = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.1.0-rc.4" } -ndc-sdk = { git = "https://github.com/hasura/ndc-hub.git", rev = "660750a", package = "ndc-sdk" } +ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git", tag = "v0.4.0" } async-trait = "0.1" prometheus = { version = "0.13" } -schemars = { version = "0.8.16", features = ["smol_str"] } +schemars = { version = "0.8", features = ["smol_str"] } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["preserve_order"] } tokio = { version = "1", features = ["full"] } -reqwest = { version = "0.11.19" } +http = { version = "0.2" } +reqwest = { version = "0.12", features = ["json"] } indexmap = "^2" thiserror = { version = "*" } # Use the version from ndc-sdk diff --git a/crates/ndc-sendgrid/src/configuration.rs b/crates/ndc-sendgrid/src/configuration.rs index 7901b9f..b30c93e 100644 --- a/crates/ndc-sendgrid/src/configuration.rs +++ b/crates/ndc-sendgrid/src/configuration.rs @@ -1,7 +1,7 @@ -use std::{env, path::Path}; -use ndc_sdk::connector::{self, InvalidRange, KeyOrIndex}; +use ndc_sdk::connector; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; +use std::{env, path::Path}; use super::sendgrid_api::{ApiKeyError, SendGridApiKey}; @@ -11,34 +11,23 @@ pub struct SendGridConfiguration { } pub fn parse_configuration( - _configuration_dir: impl AsRef + Send -) -> Result { - + _configuration_dir: impl AsRef + Send, +) -> connector::Result { match env::var("SENDGRID_API_KEY") { Ok(key) => SendGridApiKey::new(key.as_str()) .map(|api_key| SendGridConfiguration { sendgrid_api_key: api_key, }) .map_err(|err| match err { - ApiKeyError::CannotBeBlank => { - mk_single_error("sendgrid_api_key", "sendgrid_api_key cannot be blank") - } + ApiKeyError::CannotBeBlank => connector::ErrorResponse::from( + "The SENDGRID_API_KEY environment variable cannot be blank".to_owned(), + ), }), - Err(env::VarError::NotPresent) => Err(mk_single_error( - "SENDGRID_API_KEY", - "The SENDGRID_API_KEY environment variable is required", + Err(env::VarError::NotPresent) => Err(connector::ErrorResponse::from( + "The SENDGRID_API_KEY environment variable is required".to_owned(), )), - Err(env::VarError::NotUnicode(_)) => Err(mk_single_error( - "SENDGRID_API_KEY", - "The SENDGRID_API_KEY environment variable value is not valid unicode", + Err(env::VarError::NotUnicode(_)) => Err(connector::ErrorResponse::from( + "The SENDGRID_API_KEY environment variable value is not valid unicode".to_owned(), )), } } - -fn mk_single_error(key: &str, message: &str) -> connector::ValidateError { - let errs = vec![InvalidRange { - path: vec![KeyOrIndex::Key(String::from(key))], - message: String::from(message), - }]; - connector::ValidateError::ValidateError(errs) -} diff --git a/crates/ndc-sendgrid/src/connector.rs b/crates/ndc-sendgrid/src/connector.rs index 8800dff..d1ea8b9 100644 --- a/crates/ndc-sendgrid/src/connector.rs +++ b/crates/ndc-sendgrid/src/connector.rs @@ -1,8 +1,9 @@ -use std::path::Path; use async_trait::async_trait; +use http::status::StatusCode; use ndc_sdk::connector; use ndc_sdk::json_response::JsonResponse; use ndc_sdk::models; +use std::path::Path; use super::configuration; use super::mutation; @@ -14,37 +15,51 @@ pub struct SendGridConnector {} #[derive(Clone, Debug)] pub struct SendGridConnectorState { - http_client: reqwest::Client + http_client: reqwest::Client, } #[async_trait] -impl connector::Connector for SendGridConnector { - /// The type of validated configuration - type Configuration = configuration::SendGridConfiguration; - /// The type of unserializable state - type State = SendGridConnectorState; +impl connector::ConnectorSetup for SendGridConnector { + type Connector = SendGridConnector; - /// Validate the raw configuration provided by the user, - /// returning a configuration error or a validated [`Connector::Configuration`]. + /// Validate the configuration provided by the user, returning a configuration error or a + /// validated [`Configuration`]. + /// + /// The [`ParseError`] type is provided as a convenience to connector authors, to be used on + /// error. async fn parse_configuration( + &self, configuration_dir: impl AsRef + Send, - ) -> Result { + ) -> connector::Result<::Configuration> { configuration::parse_configuration(configuration_dir) } /// Initialize the connector's in-memory state. /// - /// For example, any connection pools, prepared queries, - /// or other managed resources would be allocated here. + /// For example, any connection pools, prepared queries, or other managed resources would be + /// allocated here. + /// + /// In addition, this function should register any connector-specific metrics with the metrics + /// registry. /// - /// In addition, this function should register any - /// connector-specific metrics with the metrics registry. + /// This may be called repeatedly until it succeeds. async fn try_init_state( - _configuration: &configuration::SendGridConfiguration, + &self, + _configuration: &::Configuration, _metrics: &mut prometheus::Registry, - ) -> Result { - Ok(SendGridConnectorState { http_client:reqwest::Client::new() }) + ) -> connector::Result<::State> { + Ok(SendGridConnectorState { + http_client: reqwest::Client::new(), + }) } +} + +#[async_trait] +impl connector::Connector for SendGridConnector { + /// The type of validated configuration + type Configuration = configuration::SendGridConfiguration; + /// The type of unserializable state + type State = SendGridConnectorState; /// Update any metrics from the state /// @@ -56,18 +71,20 @@ impl connector::Connector for SendGridConnector { fn fetch_metrics( _configuration: &configuration::SendGridConfiguration, _state: &SendGridConnectorState, - ) -> Result<(), connector::FetchMetricsError> { + ) -> connector::Result<()> { Ok(()) } /// Check the health of the connector. /// - /// For example, this function should check that the connector - /// is able to reach its data source over the network. - async fn health_check( + /// This should simply verify that the connector is ready to start accepting + /// requests. It should not verify that external data sources are available. + /// + /// For most use cases, the default implementation should be fine. + async fn get_health_readiness( _configuration: &configuration::SendGridConfiguration, _state: &SendGridConnectorState, - ) -> Result<(), connector::HealthError> { + ) -> connector::Result<()> { Ok(()) } @@ -75,24 +92,27 @@ impl connector::Connector for SendGridConnector { /// /// This function implements the [capabilities endpoint](https://hasura.github.io/ndc-spec/specification/capabilities.html) /// from the NDC specification. - async fn get_capabilities() -> JsonResponse { - JsonResponse::Value( - models::CapabilitiesResponse { - version: String::from("0.1.0"), - capabilities: models::Capabilities { - query: models::QueryCapabilities { - aggregates: None, - variables: None, - explain: None, - }, - relationships: None, - mutation: models::MutationCapabilities { - transactional: None, - explain: None - }, + async fn get_capabilities() -> models::Capabilities { + models::Capabilities { + query: models::QueryCapabilities { + aggregates: None, + variables: None, + explain: None, + exists: models::ExistsCapabilities { + nested_collections: None, }, - } - ) + nested_fields: models::NestedFieldCapabilities { + filter_by: None, + order_by: None, + aggregates: None, + }, + }, + relationships: None, + mutation: models::MutationCapabilities { + transactional: None, + explain: None, + }, + } } /// Get the connector's schema. @@ -101,7 +121,7 @@ impl connector::Connector for SendGridConnector { /// from the NDC specification. async fn get_schema( _configuation: &configuration::SendGridConfiguration, - ) -> Result, connector::SchemaError> { + ) -> connector::Result> { Ok(JsonResponse::Value(schema::make_schema_response())) } @@ -113,8 +133,11 @@ impl connector::Connector for SendGridConnector { _configuration: &configuration::SendGridConfiguration, _state: &SendGridConnectorState, _query_request: models::QueryRequest, - ) -> Result, connector::ExplainError> { - Err(connector::ExplainError::UnsupportedOperation(String::from("query explain is not supported"))) + ) -> connector::Result> { + Err( + connector::ErrorResponse::from("query explain is not supported".to_owned()) + .with_status_code(StatusCode::NOT_IMPLEMENTED), + ) } /// Explain a mutation by creating an execution plan @@ -125,8 +148,11 @@ impl connector::Connector for SendGridConnector { _configuration: &Self::Configuration, _state: &Self::State, _request: models::MutationRequest, - ) -> Result, connector::ExplainError> { - Err(connector::ExplainError::UnsupportedOperation(String::from("mutation explain is not supported"))) + ) -> connector::Result> { + Err( + connector::ErrorResponse::from("mutation explain is not supported".to_owned()) + .with_status_code(StatusCode::NOT_IMPLEMENTED), + ) } /// Execute a mutation @@ -137,8 +163,10 @@ impl connector::Connector for SendGridConnector { configuration: &configuration::SendGridConfiguration, state: &SendGridConnectorState, request: models::MutationRequest, - ) -> Result, connector::MutationError> { - mutation::execute(&state.http_client, configuration, request).await.map(JsonResponse::Value) + ) -> connector::Result> { + mutation::execute(&state.http_client, configuration, request) + .await + .map(JsonResponse::Value) } /// Execute a query @@ -149,7 +177,9 @@ impl connector::Connector for SendGridConnector { configuration: &configuration::SendGridConfiguration, state: &SendGridConnectorState, query_request: models::QueryRequest, - ) -> Result, connector::QueryError> { - query::execute(&state.http_client, configuration, query_request).await.map(JsonResponse::Value) + ) -> connector::Result> { + query::execute(&state.http_client, configuration, query_request) + .await + .map(JsonResponse::Value) } } diff --git a/crates/ndc-sendgrid/src/fields.rs b/crates/ndc-sendgrid/src/fields.rs index 09464f8..2e030b4 100644 --- a/crates/ndc-sendgrid/src/fields.rs +++ b/crates/ndc-sendgrid/src/fields.rs @@ -1,6 +1,7 @@ -use thiserror::Error; +use http::StatusCode; use indexmap::IndexMap; use ndc_sdk::{connector, models}; +use thiserror::Error; #[derive(Debug, Error)] pub enum FieldsError { @@ -13,34 +14,28 @@ pub enum FieldsError { UnsupportedOperation(String), } -impl From for connector::QueryError { - fn from(value: FieldsError) -> Self { - match value { - FieldsError::InvalidRequest(err) => connector::QueryError::InvalidRequest(err), - FieldsError::UnsupportedOperation(err) => connector::QueryError::UnsupportedOperation(err) - } - } -} - -impl From for connector::MutationError { +impl From for connector::ErrorResponse { fn from(value: FieldsError) -> Self { match value { - FieldsError::InvalidRequest(err) => connector::MutationError::InvalidRequest(err), - FieldsError::UnsupportedOperation(err) => connector::MutationError::UnsupportedOperation(err) + FieldsError::InvalidRequest(err) => { + connector::ErrorResponse::new(StatusCode::BAD_REQUEST, err, serde_json::Value::Null) + } + FieldsError::UnsupportedOperation(err) => connector::ErrorResponse::new( + StatusCode::NOT_IMPLEMENTED, + err, + serde_json::Value::Null, + ), } } } pub fn eval_row( - fields: &IndexMap, + fields: &IndexMap, item: &IndexMap, -) -> Result, FieldsError> { +) -> Result, FieldsError> { let mut row = IndexMap::new(); for (field_name, field) in fields.iter() { - row.insert( - field_name.clone(), - eval_field(field, item)?, - ); + row.insert(field_name.clone(), eval_field(field, item)?); } Ok(row) } @@ -50,25 +45,33 @@ fn eval_field( item: &IndexMap, ) -> Result { match field { - models::Field::Column { column, fields } => { + models::Field::Column { + column, + fields, + arguments: _, + } => { let col_val = eval_column(item, column.as_str())?; match fields { None => Ok(models::RowFieldValue(col_val)), - Some(nested_field) => eval_nested_field( - col_val, - nested_field, - ), + Some(nested_field) => eval_nested_field(col_val, nested_field), } } - models::Field::Relationship { .. } => { - Err(FieldsError::UnsupportedOperation("Relationship fields are not supported".into())) - } + models::Field::Relationship { .. } => Err(FieldsError::UnsupportedOperation( + "Relationship fields are not supported".into(), + )), } } -fn eval_column(row: &IndexMap, column_name: &str) -> Result { - row.get(column_name).cloned() - .ok_or(FieldsError::InvalidRequest(format!("invalid column name: {}", column_name))) +fn eval_column( + row: &IndexMap, + column_name: &str, +) -> Result { + row.get(column_name) + .cloned() + .ok_or(FieldsError::InvalidRequest(format!( + "invalid column name: {}", + column_name + ))) } pub fn eval_nested_field( @@ -77,17 +80,24 @@ pub fn eval_nested_field( ) -> Result { match nested_field { models::NestedField::Object(models::NestedObject { fields }) => { - let full_row: IndexMap = serde_json::from_value(value).map_err(|_| FieldsError::InvalidRequest("Object expected".into()))?; + let full_row: IndexMap = serde_json::from_value(value) + .map_err(|_| FieldsError::InvalidRequest("Object expected".into()))?; let row = eval_row(fields, &full_row)?; - Ok(models::RowFieldValue(serde_json::to_value(row).map_err(|_| FieldsError::InvalidRequest("Cannot encode rowset".into()))?)) + Ok(models::RowFieldValue(serde_json::to_value(row).map_err( + |_| FieldsError::InvalidRequest("Cannot encode rowset".into()), + )?)) } models::NestedField::Array(models::NestedArray { fields }) => { - let array: Vec = serde_json::from_value(value).map_err(|_| FieldsError::InvalidRequest("Array expected".into()))?; + let array: Vec = serde_json::from_value(value) + .map_err(|_| FieldsError::InvalidRequest("Array expected".into()))?; let result_array = array .into_iter() .map(|value| eval_nested_field(value, fields)) .collect::, FieldsError>>()?; - Ok(models::RowFieldValue(serde_json::to_value(result_array).map_err(|_| FieldsError::InvalidRequest("Cannot encode rowset".into()))?)) + Ok(models::RowFieldValue( + serde_json::to_value(result_array) + .map_err(|_| FieldsError::InvalidRequest("Cannot encode rowset".into()))?, + )) } } } diff --git a/crates/ndc-sendgrid/src/main.rs b/crates/ndc-sendgrid/src/main.rs index ba6f9ce..2e48088 100644 --- a/crates/ndc-sendgrid/src/main.rs +++ b/crates/ndc-sendgrid/src/main.rs @@ -1,9 +1,9 @@ mod configuration; mod connector; -mod schema; mod fields; mod mutation; mod query; +mod schema; mod sendgrid_api; use connector::SendGridConnector; diff --git a/crates/ndc-sendgrid/src/mutation.rs b/crates/ndc-sendgrid/src/mutation.rs index b6556bd..5a1e0dd 100644 --- a/crates/ndc-sendgrid/src/mutation.rs +++ b/crates/ndc-sendgrid/src/mutation.rs @@ -1,6 +1,7 @@ -use ndc_sdk::connector::MutationError; +use ndc_sdk::connector::{self, MutationError}; use ndc_sdk::models::{ - MutationOperation, MutationOperationResults, MutationRequest, MutationResponse, NestedField + ArgumentName, MutationOperation, MutationOperationResults, MutationRequest, MutationResponse, + NestedField, }; use serde_json::Value; use std::collections::BTreeMap; @@ -16,7 +17,7 @@ pub async fn execute( http_client: &reqwest::Client, configuration: &configuration::SendGridConfiguration, mutation_request: MutationRequest, -) -> Result { +) -> connector::Result { let mut operation_results = vec![]; for operation in mutation_request.operations { @@ -24,16 +25,14 @@ pub async fn execute( operation_results.push(result) } - Ok(MutationResponse { - operation_results: operation_results, - }) + Ok(MutationResponse { operation_results }) } async fn process_operation( http_client: &reqwest::Client, configuration: &configuration::SendGridConfiguration, mutation_operation: MutationOperation, -) -> Result { +) -> connector::Result { match mutation_operation { MutationOperation::Procedure { name, @@ -41,9 +40,10 @@ async fn process_operation( fields, } => match name.as_str() { SEND_MAIL => process_send_mail(http_client, configuration, arguments, fields).await, - unknown_procedure => Err(MutationError::InvalidRequest(format!( + unknown_procedure => Err(MutationError::new_invalid_request(&format!( "Unknown procedure: {unknown_procedure}" - ))), + )) + .into()), }, } } @@ -51,36 +51,42 @@ async fn process_operation( async fn process_send_mail( http_client: &reqwest::Client, configuration: &configuration::SendGridConfiguration, - arguments: BTreeMap, + arguments: BTreeMap, fields: Option, -) -> Result { +) -> connector::Result { let request = parse_send_mail_args(&arguments)?; sendgrid_api::invoke_send_mail(http_client, &configuration.sendgrid_api_key, &request) .await - .map_err(|err| MutationError::Other(Box::new(err)))?; + .map_err(|err| connector::ErrorResponse::from(err.to_string()))?; - let batch_id_value = request - .batch_id - .clone() - .map_or(Value::Null, |id| Value::String(id)); - let result_value = Value::Object(serde_json::Map::from_iter([("batch_id".to_string(), batch_id_value)])); + let batch_id_value = request.batch_id.clone().map_or(Value::Null, Value::String); + let result_value = Value::Object(serde_json::Map::from_iter([( + "batch_id".to_string(), + batch_id_value, + )])); let projected_result_value = match fields { Some(fields) => eval_nested_field(result_value, &fields)?.0, - None => result_value + None => result_value, }; - Ok(MutationOperationResults::Procedure { result: projected_result_value }) + Ok(MutationOperationResults::Procedure { + result: projected_result_value, + }) } fn parse_send_mail_args( - in_args: &BTreeMap, + in_args: &BTreeMap, ) -> Result { - let args_request = serde_json::Value::Object(serde_json::Map::from_iter(in_args.clone())); - let schema_request = serde_json::from_value::(args_request) - .map_err(|err| { - MutationError::InvalidRequest(format!("Unable to deserialize arguments: {err}")) + let args_request = serde_json::Value::Object(serde_json::Map::from_iter( + in_args + .iter() + .map(|(name, value)| (name.as_str().to_owned(), value.clone())), + )); + let schema_request = + serde_json::from_value::(args_request).map_err(|err| { + MutationError::new_invalid_request(&format!("Unable to deserialize arguments: {err}")) })?; let request = sendgrid_api::SendMailRequest { diff --git a/crates/ndc-sendgrid/src/query.rs b/crates/ndc-sendgrid/src/query.rs index 6d60504..36d202f 100644 --- a/crates/ndc-sendgrid/src/query.rs +++ b/crates/ndc-sendgrid/src/query.rs @@ -1,9 +1,9 @@ -use std::collections::BTreeMap; use indexmap::IndexMap; use ndc_sdk::{ - connector::QueryError, - models::{Argument, QueryRequest, QueryResponse, RowSet}, + connector::{self, QueryError}, + models::{Argument, ArgumentName, QueryRequest, QueryResponse, RowSet}, }; +use std::collections::BTreeMap; use crate::fields::eval_row; @@ -12,47 +12,60 @@ use super::schema::LIST_TEMPLATES_FUNCTION_NAME; use super::sendgrid_api::{invoke_list_function_templates, ListTransactionalTemplatesParams}; fn parse_list_templates_params( - in_args: BTreeMap, -) -> Result { - let page_size = in_args - .get("page_size") - .ok_or(QueryError::InvalidRequest(String::from( - "Couldn't find 'page_size' field in arguments", - )))?; + in_args: BTreeMap, +) -> connector::Result { + let page_size = in_args.get("page_size").ok_or_else(|| { + QueryError::new_invalid_request(&"Couldn't find 'page_size' field in arguments") + })?; - let default_generations = Argument::Literal { value: serde_json::json!("legacy,dynamic") }; - let generations = in_args - .get("generations") - .unwrap_or(&default_generations); + let default_generations = Argument::Literal { + value: serde_json::json!("legacy,dynamic"), + }; + let generations = in_args.get("generations").unwrap_or(&default_generations); - let page_token = in_args - .get("page_token") - .unwrap_or(&Argument::Literal { value: serde_json::Value::Null }); + let page_token = in_args.get("page_token").unwrap_or(&Argument::Literal { + value: serde_json::Value::Null, + }); match (generations, page_size, page_token) { - ( Argument::Literal { value: generations_value }, - Argument::Literal { value: page_size_value }, - Argument::Literal { value: page_token_value } ) => { - let generations_parsed = serde_json::from_value(generations_value.clone()).map_err(|err| { - QueryError::InvalidRequest(format!("Unable to deserialize 'params': {err}")) + ( + Argument::Literal { + value: generations_value, + }, + Argument::Literal { + value: page_size_value, + }, + Argument::Literal { + value: page_token_value, + }, + ) => { + let generations_parsed = + serde_json::from_value(generations_value.clone()).map_err(|err| { + QueryError::new_invalid_request(&format!( + "Unable to deserialize 'params': {err}" + )) })?; - let page_size_parsed = serde_json::from_value(page_size_value.clone()).map_err(|err| { - QueryError::InvalidRequest(format!("Unable to deserialize 'params': {err}")) + let page_size_parsed = + serde_json::from_value(page_size_value.clone()).map_err(|err| { + QueryError::new_invalid_request(&format!( + "Unable to deserialize 'params': {err}" + )) })?; - let page_token_parsed = serde_json::from_value(page_token_value.clone()).map_err(|err| { - QueryError::InvalidRequest(format!("Unable to deserialize 'params': {err}")) + let page_token_parsed = + serde_json::from_value(page_token_value.clone()).map_err(|err| { + QueryError::new_invalid_request(&format!( + "Unable to deserialize 'params': {err}" + )) })?; - Ok( - ListTransactionalTemplatesParams { - generations: generations_parsed, - page_size: page_size_parsed, - page_token: page_token_parsed - } - ) - } - _ => Err(QueryError::UnsupportedOperation(String::from( - "Variables not currently supported", - ))), + Ok(ListTransactionalTemplatesParams { + generations: generations_parsed, + page_size: page_size_parsed, + page_token: page_token_parsed, + }) + } + _ => { + Err(QueryError::new_unsupported_operation(&"Variables not currently supported").into()) + } } } @@ -60,31 +73,39 @@ pub async fn execute( http_client: &reqwest::Client, configuration: &configuration::SendGridConfiguration, query_request: QueryRequest, -) -> Result { +) -> connector::Result { match query_request.collection.as_str() { LIST_TEMPLATES_FUNCTION_NAME => { let args = query_request.arguments; let params = parse_list_templates_params(args)?; - let response = - invoke_list_function_templates(http_client, &configuration.sendgrid_api_key, ¶ms).await; + let response = invoke_list_function_templates( + http_client, + &configuration.sendgrid_api_key, + ¶ms, + ) + .await; match response { Ok(list_response) => { let result = serde_json::to_value(list_response.result) - .map_err(|err| QueryError::Other(Box::new(err)))?; - let result_row = - IndexMap::from([(String::from("__value"), result)]); - let projected_row = query_request.query.fields.map(|fields| eval_row(&fields, &result_row)).transpose()?; + .map_err(|err| connector::ErrorResponse::from(err.to_string()))?; + let result_row = IndexMap::from([(String::from("__value"), result)]); + let projected_row = query_request + .query + .fields + .map(|fields| eval_row(&fields, &result_row)) + .transpose()?; Ok(QueryResponse(vec![RowSet { rows: projected_row.map(|row| vec![row]), aggregates: None, }])) } - Err(err) => Err(QueryError::Other(Box::new(err))), + Err(err) => Err(connector::ErrorResponse::from(err.to_string())), } } - unknown_collection => Err(QueryError::InvalidRequest(format!( + unknown_collection => Err(QueryError::new_invalid_request(&format!( "Unknown collection: {unknown_collection}" - ))), + )) + .into()), } } diff --git a/crates/ndc-sendgrid/src/schema.rs b/crates/ndc-sendgrid/src/schema.rs index 6e2b0b0..06c6ec5 100644 --- a/crates/ndc-sendgrid/src/schema.rs +++ b/crates/ndc-sendgrid/src/schema.rs @@ -1,8 +1,9 @@ use std::collections::BTreeMap; use ndc_sdk::models::{ - ArgumentInfo, FunctionInfo, ObjectField, ObjectType, ProcedureInfo, ScalarType, SchemaResponse, - Type, + ArgumentInfo, ArgumentName, FieldName, FunctionInfo, FunctionName, ObjectField, ObjectType, + ObjectTypeName, ProcedureInfo, ProcedureName, ScalarType, ScalarTypeName, SchemaResponse, Type, + TypeName, TypeRepresentation, }; use serde::Deserialize; @@ -11,42 +12,61 @@ use super::sendgrid_api; pub fn make_schema_response() -> SchemaResponse { SchemaResponse { scalar_types: BTreeMap::from([ - (String::from("String"), STRING_SCALAR_TYPE), - (String::from("Int"), INT_SCALAR_TYPE), - (String::from("Bool"), BOOL_SCALAR_TYPE), + (ScalarTypeName::from("String"), STRING_SCALAR_TYPE), + (ScalarTypeName::from("Int"), INT_SCALAR_TYPE), + (ScalarTypeName::from("Bool"), BOOL_SCALAR_TYPE), ]), object_types: BTreeMap::from([ - (String::from("list_template_item"), list_template_item()), - (String::from("list_template_version"), list_template_version()), - (String::from("mail_personalization"), mail_personalization()), - (String::from("mail_address"), mail_address()), - (String::from("header"), header()), - (String::from("substitution"), substitution()), - (String::from("template_variable"), template_variable()), - (String::from("mail_content"), mail_content()), - (String::from("mail_attachment"), mail_attachment()), - (String::from("unsubscription_settings"), unsubscription_settings()), - (String::from("send_mail_response"), send_mail_response()), + ( + ObjectTypeName::from("list_template_item"), + list_template_item(), + ), + ( + ObjectTypeName::from("list_template_version"), + list_template_version(), + ), + ( + ObjectTypeName::from("mail_personalization"), + mail_personalization(), + ), + (ObjectTypeName::from("mail_address"), mail_address()), + (ObjectTypeName::from("header"), header()), + (ObjectTypeName::from("substitution"), substitution()), + ( + ObjectTypeName::from("template_variable"), + template_variable(), + ), + (ObjectTypeName::from("mail_content"), mail_content()), + (ObjectTypeName::from("mail_attachment"), mail_attachment()), + ( + ObjectTypeName::from("unsubscription_settings"), + unsubscription_settings(), + ), + ( + ObjectTypeName::from("send_mail_response"), + send_mail_response(), + ), ]), collections: vec![], - functions: vec![ - list_function_templates(), - ], + functions: vec![list_function_templates()], procedures: vec![send_mail()], } } const STRING_SCALAR_TYPE: ScalarType = ScalarType { + representation: Some(TypeRepresentation::String), aggregate_functions: BTreeMap::new(), comparison_operators: BTreeMap::new(), }; const INT_SCALAR_TYPE: ScalarType = ScalarType { + representation: Some(TypeRepresentation::Int32), aggregate_functions: BTreeMap::new(), comparison_operators: BTreeMap::new(), }; const BOOL_SCALAR_TYPE: ScalarType = ScalarType { + representation: Some(TypeRepresentation::Boolean), aggregate_functions: BTreeMap::new(), comparison_operators: BTreeMap::new(), }; @@ -58,44 +78,49 @@ fn list_template_item() -> ObjectType { )), fields: BTreeMap::from([ ( - String::from("id"), + FieldName::from("id"), ObjectField { r#type: named("String"), description: Some(String::from("The ID of the transactional template.")), + arguments: BTreeMap::new(), }, ), ( - String::from("name"), + FieldName::from("name"), ObjectField { r#type: Type::Named { - name: String::from("String"), + name: TypeName::from("String"), }, description: Some(String::from("The name for the transactional template.")), + arguments: BTreeMap::new(), }, ), ( - String::from("generation"), + FieldName::from("generation"), ObjectField { r#type: named("String"), description: Some(String::from("Defines the generation of the template.")), + arguments: BTreeMap::new(), }, ), ( - String::from("updated_at"), + FieldName::from("updated_at"), ObjectField { r#type: named("String"), description: Some(String::from( "The date and time that this transactional template version was updated", )), + arguments: BTreeMap::new(), }, ), ( - String::from("versions"), + FieldName::from("versions"), ObjectField { r#type: array_of(named("list_template_version")), description: Some(String::from( "The date and time that this transactional template version was updated", )), + arguments: BTreeMap::new(), }, ), ]), @@ -106,41 +131,50 @@ fn list_template_version() -> ObjectType { ObjectType { description: Some(String::from("The response properties for listing transactional templates")), fields: BTreeMap::from([ - (String::from("id"), ObjectField { + (FieldName::from("id"), ObjectField { r#type: named("String"), - description: Some(String::from("ID of the transactional template version.")) + description: Some(String::from("ID of the transactional template version.")), + arguments: BTreeMap::new(), }), - (String::from("template_id"), ObjectField { + (FieldName::from("template_id"), ObjectField { r#type: named("String"), - description: Some(String::from("ID of the transactional template.")) + description: Some(String::from("ID of the transactional template.")), + arguments: BTreeMap::new(), }), - (String::from("active"), ObjectField { + (FieldName::from("active"), ObjectField { r#type: named("Int"), - description: Some(String::from("Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active.")) + description: Some(String::from("Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active.")), + arguments: BTreeMap::new(), }), - (String::from("name"), ObjectField { + (FieldName::from("name"), ObjectField { r#type: named("String"), - description: Some(String::from("Name of the transactional template version.")) + description: Some(String::from("Name of the transactional template version.")), + arguments: BTreeMap::new(), }), - (String::from("subject"), ObjectField { + (FieldName::from("subject"), ObjectField { r#type: nullable(named("String")), - description: Some(String::from("Subject of the new transactional template version.")) + description: Some(String::from("Subject of the new transactional template version.")), + arguments: BTreeMap::new(), }), - (String::from("updated_at"), ObjectField { + (FieldName::from("updated_at"), ObjectField { r#type: named("String"), - description: Some(String::from("The date and time that this transactional template version was updated.")) + description: Some(String::from("The date and time that this transactional template version was updated.")), + arguments: BTreeMap::new(), }), - (String::from("generate_plain_content"), ObjectField { + (FieldName::from("generate_plain_content"), ObjectField { r#type: named("Bool"), - description: Some(String::from("If true, plain_content is always generated from html_content. If false, plain_content is not altered.")) + description: Some(String::from("If true, plain_content is always generated from html_content. If false, plain_content is not altered.")), + arguments: BTreeMap::new(), }), - (String::from("editor"), ObjectField { + (FieldName::from("editor"), ObjectField { r#type: named("String"), - description: Some(String::from("The editor used in the UI. Allowed Values: code, design")) + description: Some(String::from("The editor used in the UI. Allowed Values: code, design")), + arguments: BTreeMap::new(), }), - (String::from("thumbnail_url"), ObjectField { + (FieldName::from("thumbnail_url"), ObjectField { r#type: named("String"), - description: Some(String::from("A Thumbnail preview of the template's html content.")) + description: Some(String::from("A Thumbnail preview of the template's html content.")), + arguments: BTreeMap::new(), }), ]), } @@ -150,28 +184,31 @@ pub const LIST_TEMPLATES_FUNCTION_NAME: &str = "list_templates"; fn list_function_templates() -> FunctionInfo { FunctionInfo { - name: String::from(LIST_TEMPLATES_FUNCTION_NAME), + name: FunctionName::from(LIST_TEMPLATES_FUNCTION_NAME), description: Some(String::from( "allows you to retrieve all transactional templates", )), - arguments: BTreeMap::from([( - String::from("generations"), - ArgumentInfo { - description: Some(String::from("Comma-delimited list specifying which generations of templates to return. Options are legacy, dynamic or legacy,dynamic")), - argument_type: nullable(named("String")) - }), + arguments: BTreeMap::from([ ( - String::from("page_size"), - ArgumentInfo { - description: Some(String::from("The number of templates to be returned in each page of results")), - argument_type: named("Int") - }), + ArgumentName::from("generations"), + ArgumentInfo { + description: Some(String::from("Comma-delimited list specifying which generations of templates to return. Options are legacy, dynamic or legacy,dynamic")), + argument_type: nullable(named("String")) + } + ), ( - String::from("page_token"), - ArgumentInfo { - description: Some(String::from("A token corresponding to a specific page of results, as provided by metadata")), - argument_type: nullable(named("String")) - }), + ArgumentName::from("page_size"), + ArgumentInfo { + description: Some(String::from("The number of templates to be returned in each page of results")), + argument_type: named("Int") + }), + ( + ArgumentName::from("page_token"), + ArgumentInfo { + description: Some(String::from("A token corresponding to a specific page of results, as provided by metadata")), + argument_type: nullable(named("String")) + } + ), ]), result_type: array_of(named("list_template_item")), } @@ -192,49 +229,49 @@ pub struct SendMailRequest { pub asm: Option, } -fn send_mail_request_args() -> BTreeMap { +fn send_mail_request_args() -> BTreeMap { BTreeMap::from([ - (String::from("personalizations"), ArgumentInfo { + (ArgumentName::from("personalizations"), ArgumentInfo { argument_type: array_of(named("mail_personalization")), description: Some(String::from("An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled.")) }), - (String::from("from"), ArgumentInfo { + (ArgumentName::from("from"), ArgumentInfo { argument_type: named("mail_address"), description: Some(String::from("The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account.")) }), - (String::from("reply_to_list"), ArgumentInfo { + (ArgumentName::from("reply_to_list"), ArgumentInfo { argument_type: array_of(named("mail_address")), description: Some(String::from("An array of recipients who will receive replies.")) }), - (String::from("subject"), ArgumentInfo { + (ArgumentName::from("subject"), ArgumentInfo { argument_type: named("String"), description: Some(String::from("The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.")) }), - (String::from("content"), ArgumentInfo { + (ArgumentName::from("content"), ArgumentInfo { argument_type: array_of(named("mail_content")), description: Some(String::from("An array where you can specify the content of your email. You can include multiple MIME types of content, but you must specify at least one MIME type.")) }), - (String::from("attachments"), ArgumentInfo { + (ArgumentName::from("attachments"), ArgumentInfo { argument_type: nullable(array_of(named("mail_attachment"))), description: Some(String::from("An array of objects where you can specify any attachments you want to include.")) }), - (String::from("template_id"), ArgumentInfo { + (ArgumentName::from("template_id"), ArgumentInfo { argument_type: nullable(named("Bool")), description: Some(String::from("An email template ID. A template that contains a subject and content — either text or html — will override any subject and content values specified at the personalizations or message level.")) }), - (String::from("headers"), ArgumentInfo { + (ArgumentName::from("headers"), ArgumentInfo { argument_type: nullable(array_of(named("header"))), description: Some(String::from("The headers to put on the mail. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.")) }), - (String::from("send_at"), ArgumentInfo { + (ArgumentName::from("send_at"), ArgumentInfo { argument_type: nullable(named("Int")), description: Some(String::from("A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the send_at parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance.")) }), - (String::from("batch_id"), ArgumentInfo { + (ArgumentName::from("batch_id"), ArgumentInfo { argument_type: nullable(named("String")), description: Some(String::from("An ID representing a batch of emails to be sent at the same time. Including a batch_id in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch.")) }), - (String::from("asm"), ArgumentInfo { + (ArgumentName::from("asm"), ArgumentInfo { argument_type: nullable(named("unsubscription_settings")), description: Some(String::from("An object allowing you to specify how to handle unsubscribes.")) }), @@ -258,41 +295,50 @@ fn mail_personalization() -> ObjectType { ObjectType { description: Some(String::from("A personalization can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled.")), fields: BTreeMap::from([ - (String::from("from"), ObjectField { + (FieldName::from("from"), ObjectField { r#type: nullable(named("mail_address")), - description: Some(String::from("The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account.")) + description: Some(String::from("The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account.")), + arguments: BTreeMap::new(), }), - (String::from("to"), ObjectField { + (FieldName::from("to"), ObjectField { r#type: nullable(array_of(named("mail_address"))), - description: Some(String::from("An array of addresses that will be sent the email.")) + description: Some(String::from("An array of addresses that will be sent the email.")), + arguments: BTreeMap::new(), }), - (String::from("cc"), ObjectField { + (FieldName::from("cc"), ObjectField { r#type: array_of(named("mail_address")), - description: Some(String::from("An array of addresses that will be cced the email.")) + description: Some(String::from("An array of addresses that will be cced the email.")), + arguments: BTreeMap::new(), }), - (String::from("bcc"), ObjectField { + (FieldName::from("bcc"), ObjectField { r#type: nullable(array_of(named("mail_address"))), - description: Some(String::from("An array of addresses that will be bcced the email.")) + description: Some(String::from("An array of addresses that will be bcced the email.")), + arguments: BTreeMap::new(), }), - (String::from("subject"), ObjectField { + (FieldName::from("subject"), ObjectField { r#type: nullable(named("String")), - description: Some(String::from("The subject of your email. See character length requirements according to RFC 2822.")) + description: Some(String::from("The subject of your email. See character length requirements according to RFC 2822.")), + arguments: BTreeMap::new(), }), - (String::from("headers"), ObjectField { + (FieldName::from("headers"), ObjectField { r#type: nullable(array_of(named("header"))), - description: Some(String::from("A collection of headers allowing you to specify handling instructions for your email. You may not overwrite the following headers: x-sg-id, x-sg-eid, received, dkim-signature, Content-Type, Content-Transfer-Encoding, To, From, Subject, Reply-To, CC, BCC.")) + description: Some(String::from("A collection of headers allowing you to specify handling instructions for your email. You may not overwrite the following headers: x-sg-id, x-sg-eid, received, dkim-signature, Content-Type, Content-Transfer-Encoding, To, From, Subject, Reply-To, CC, BCC.")), + arguments: BTreeMap::new(), }), - (String::from("substitutions"), ObjectField { + (FieldName::from("substitutions"), ObjectField { r#type: nullable(array_of(named("substitution"))), - description: Some(String::from("Substitutions allow you to insert data without using Dynamic Transactional Templates.")) + description: Some(String::from("Substitutions allow you to insert data without using Dynamic Transactional Templates.")), + arguments: BTreeMap::new(), }), - (String::from("dynamic_template_data"), ObjectField { + (FieldName::from("dynamic_template_data"), ObjectField { r#type: nullable(array_of(named("template_variable"))), - description: Some(String::from("A collection of dynamic template variable name/value to insert pairs.")) + description: Some(String::from("A collection of dynamic template variable name/value to insert pairs.")), + arguments: BTreeMap::new(), }), - (String::from("send_at"), ObjectField { + (FieldName::from("send_at"), ObjectField { r#type: nullable(named("Int")), - description: Some(String::from("A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden.")) + description: Some(String::from("A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden.")), + arguments: BTreeMap::new(), }), ]), } @@ -303,17 +349,19 @@ fn mail_address() -> ObjectType { description: Some(String::from("An email address")), fields: BTreeMap::from([ ( - String::from("email"), + FieldName::from("email"), ObjectField { r#type: named("String"), description: Some(String::from("The recipient's email address")), + arguments: BTreeMap::new(), }, ), ( - String::from("name"), + FieldName::from("name"), ObjectField { r#type: nullable(named("String")), description: Some(String::from("The recipient's name")), + arguments: BTreeMap::new(), }, ), ]), @@ -331,17 +379,19 @@ fn header() -> ObjectType { description: Some(String::from("A header in an email")), fields: BTreeMap::from([ ( - String::from("name"), + FieldName::from("name"), ObjectField { r#type: named("String"), description: Some(String::from("The name of the header")), + arguments: BTreeMap::new(), }, ), ( - String::from("value"), + FieldName::from("value"), ObjectField { r#type: named("String"), description: Some(String::from("The value of the header")), + arguments: BTreeMap::new(), }, ), ]), @@ -359,17 +409,19 @@ fn substitution() -> ObjectType { description: Some(String::from("A substitution value")), fields: BTreeMap::from([ ( - String::from("tag"), + FieldName::from("tag"), ObjectField { r#type: named("String"), description: Some(String::from("The substitution tag")), + arguments: BTreeMap::new(), }, ), ( - String::from("value"), + FieldName::from("value"), ObjectField { r#type: named("String"), description: Some(String::from("The value to substitute for the tag")), + arguments: BTreeMap::new(), }, ), ]), @@ -387,17 +439,19 @@ fn template_variable() -> ObjectType { description: Some(String::from("A dynamic template variable value")), fields: BTreeMap::from([ ( - String::from("variable"), + FieldName::from("variable"), ObjectField { r#type: named("String"), description: Some(String::from("The dynamic template variable name")), + arguments: BTreeMap::new(), }, ), ( - String::from("value"), + FieldName::from("value"), ObjectField { r#type: named("String"), description: Some(String::from("The value to substitute for the variable")), + arguments: BTreeMap::new(), }, ), ]), @@ -408,13 +462,15 @@ fn mail_content() -> ObjectType { ObjectType { description: Some(String::from("Content of an email in a particular MIME format")), fields: BTreeMap::from([ - (String::from("type"), ObjectField { + (FieldName::from("type"), ObjectField { r#type: named("String"), - description: Some(String::from("The MIME type of the content you are including in your email")) + description: Some(String::from("The MIME type of the content you are including in your email")), + arguments: BTreeMap::new(), }), - (String::from("name"), ObjectField { + (FieldName::from("name"), ObjectField { r#type: named("String"), - description: Some(String::from("The actual content of the specified MIME type that you are including in your email.")) + description: Some(String::from("The actual content of the specified MIME type that you are including in your email.")), + arguments: BTreeMap::new(), }), ]), } @@ -424,25 +480,30 @@ fn mail_attachment() -> ObjectType { ObjectType { description: Some(String::from("An attachment to an email")), fields: BTreeMap::from([ - (String::from("content"), ObjectField { + (FieldName::from("content"), ObjectField { r#type: named("String"), - description: Some(String::from("The Base64 encoded content of the attachment.")) + description: Some(String::from("The Base64 encoded content of the attachment.")), + arguments: BTreeMap::new(), }), - (String::from("type"), ObjectField { + (FieldName::from("type"), ObjectField { r#type: named("String"), - description: Some(String::from("The MIME type of the content you are attaching.")) + description: Some(String::from("The MIME type of the content you are attaching.")), + arguments: BTreeMap::new(), }), - (String::from("filename"), ObjectField { + (FieldName::from("filename"), ObjectField { r#type: named("String"), - description: Some(String::from("The attachment's filename.")) + description: Some(String::from("The attachment's filename.")), + arguments: BTreeMap::new(), }), - (String::from("disposition"), ObjectField { + (FieldName::from("disposition"), ObjectField { r#type: nullable(named("String")), - description: Some(String::from("The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, “inline” results in the attached file are displayed automatically within the message while “attachment” results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.")) + description: Some(String::from("The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, “inline” results in the attached file are displayed automatically within the message while “attachment” results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.")), + arguments: BTreeMap::new(), }), - (String::from("content_id"), ObjectField { + (FieldName::from("content_id"), ObjectField { r#type: nullable(named("String")), - description: Some(String::from("The attachment's content ID. This is used when the disposition is set to “inline” and the attachment is an image, allowing the file to be displayed within the body of your email.")) + description: Some(String::from("The attachment's content ID. This is used when the disposition is set to “inline” and the attachment is an image, allowing the file to be displayed within the body of your email.")), + arguments: BTreeMap::new(), }), ]), } @@ -452,13 +513,15 @@ fn unsubscription_settings() -> ObjectType { ObjectType { description: Some(String::from("An object allowing you to specify how to handle unsubscribes.")), fields: BTreeMap::from([ - (String::from("group_id"), ObjectField { + (FieldName::from("group_id"), ObjectField { r#type: named("Int"), - description: Some(String::from("The unsubscribe group to associate with this email.")) + description: Some(String::from("The unsubscribe group to associate with this email.")), + arguments: BTreeMap::new(), }), - (String::from("groups_to_display"), ObjectField { + (FieldName::from("groups_to_display"), ObjectField { r#type: nullable(array_of(named("Int"))), - description: Some(String::from("An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.")) + description: Some(String::from("An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.")), + arguments: BTreeMap::new(), }), ]), } @@ -467,12 +530,16 @@ fn unsubscription_settings() -> ObjectType { fn send_mail_response() -> ObjectType { ObjectType { description: Some(String::from("The response from a mail send request.")), - fields: BTreeMap::from([ - (String::from("batch_id"), ObjectField { + fields: BTreeMap::from([( + FieldName::from("batch_id"), + ObjectField { r#type: nullable(named("String")), - description: Some(String::from("The batch ID used with the send mail request.")) - }), - ]), + description: Some(String::from( + "The batch ID used with the send mail request.", + )), + arguments: BTreeMap::new(), + }, + )]), } } @@ -480,7 +547,7 @@ pub const SEND_MAIL: &str = "send_mail"; fn send_mail() -> ProcedureInfo { ProcedureInfo { - name: String::from(SEND_MAIL), + name: ProcedureName::from(SEND_MAIL), description: Some(String::from("Allows you to send email")), arguments: send_mail_request_args(), result_type: named("send_mail_response"), @@ -489,7 +556,7 @@ fn send_mail() -> ProcedureInfo { fn named(name: &str) -> Type { Type::Named { - name: String::from(name), + name: TypeName::from(name), } } diff --git a/crates/ndc-sendgrid/src/sendgrid_api.rs b/crates/ndc-sendgrid/src/sendgrid_api.rs index 4afd9c7..424a8d2 100644 --- a/crates/ndc-sendgrid/src/sendgrid_api.rs +++ b/crates/ndc-sendgrid/src/sendgrid_api.rs @@ -30,15 +30,15 @@ pub struct ListTransactionalTemplatesParams { } impl ListTransactionalTemplatesParams { - pub fn to_query_params(self: &Self) -> Vec<(String, String)> { + pub fn to_query_params(&self) -> Vec<(String, String)> { let mut params = Vec::<(String, String)>::new(); - self.generations - .as_ref() - .map(|gen| params.push((String::from("generations"), gen.clone()))); + if let Some(gen) = &self.generations { + params.push((String::from("generations"), gen.clone())) + } params.push((String::from("page_size"), self.page_size.to_string())); - self.page_token - .as_ref() - .map(|page_token| params.push((String::from("page_token"), page_token.clone()))); + if let Some(page_token) = &self.page_token { + params.push((String::from("page_token"), page_token.clone())) + } params } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..1612f13 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.81.0" +profile = "default" # see https://rust-lang.github.io/rustup/concepts/profiles.html +components = ["rust-analyzer", "rust-src"] # see https://rust-lang.github.io/rustup/concepts/components.html From 48d146f498af192b4476f5b78b9a899c548f5af7 Mon Sep 17 00:00:00 2001 From: Daniel Chambers Date: Thu, 10 Oct 2024 13:25:08 +1100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 958a9fd..709d299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ This changelog documents changes between release tags. ## [Unreleased] Upcoming changes for the next versioned release. +## [0.6.0] - 2024-10-10 +* Update NDC SDK to v0.4.0 (NDC Spec v0.1.6) ([#10](https://github.com/hasura/ndc-sendgrid/pull/10)) + ## [0.5.0] - 2024-02-28 * Fix incorrect types used on unsubscription_settings object type ([#9](https://github.com/hasura/ndc-sendgrid/pull/9))