Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
chore(notif): delete notification service client (#1759)
Sean Aye9efbb7b77196
diff --git a/.env-local.enc b/.env-local.encindex fb7c98dc88..3ac43857da 100644--- a/.env-local.enc+++ b/.env-local.enc@@ -69,7 +69,6 @@ MACRO_API_TOKEN_PUBLIC_KEY=ENC[AES256_GCM,data:2XQw2I/upVv4vDCb/EHhd1JuhOoshGVHYMACRO_DB_URL=ENC[AES256_GCM,data:pHIgQStne3Q8Oh9XpL19IHxqFIA7v5V/5p5tTUdzkZapePf15pBB4Ds+2HkhXL6E,iv:7TXBl2sBbl3q/uIBKbLVOWhCnM5nK+64BYQ/EQmPiTo=,tag:RfYznyUnFCdIKE8UeH9waA==,type:str]NOTIFICATIONS_ENABLED=ENC[AES256_GCM,data:4g0fE6Ne,iv:bkGy1Xou2yJNch8ybq7XFPtmngfY1Ib3+uZjWy81WoE=,tag:tY4BGO/LLqfWk+OzsUvqAQ==,type:str]NOTIFICATION_QUEUE=ENC[AES256_GCM,data:ObcXTgAyISCZqJK/nrJLAKe2/T2W64PNS+MdVWKap0saoNX2hiIFTQ0P9PLIVgltkiC+xIi9j7Y=,iv:0a4rl9zaS2ByAP8et4qjo0xZYBHQMEuF7jy5D1bhavk=,tag:rxR86sd50sPzlcJ9z2wffg==,type:str]-NOTIFICATION_SERVICE_URL=ENC[AES256_GCM,data:XOWHE9QUo2NEHnzjqyWpb8SFkZB7BUtTSYaYiUp7HI7T9w==,iv:FQq0VcniysRcj3X5Jd46xx2lDRVPFtFD5uh2MsFHmNs=,tag:HAuGg9NVmijGqBipAjrKSg==,type:str]OPENAI_API_KEY=ENC[AES256_GCM,data:hxQQhVXzn8uaZspmnXCRS3fGU3xDYKAJzi7JNYbcWAFpMX1BBTN27iMIHBKAM30JoKIiJJKn9VGYoShMskv3vW1PYK2acOjfApDHGQPhzlzMnt6kasUQXV+77ezdvPMdPG+6/a/AZd9W4zduElScEe+zey6JVIsEOXfI8nKSkj8SuW215HRcwbPUE/DPuiwdvxLdAqKzwwr7CQki5pu1dOabvrLEnA==,iv:tJSDvjGwsjlFzgff2LZMt7XAnNCHwYm3LjV3LsotRus=,tag:MKhqNn0lYvcDNZwUvxyl2A==,type:str]OPENSEARCH_PASSWORD=ENC[AES256_GCM,data:c/ouSRHf6b31RIut5QqtM+pqTRdmSisNG6yiHqXM378SuR75SLHHj9Ok/L6ncsSBAw==,iv:Mu7mpCx8ZN+0uKzXL5fAEFi89HDW3qp/zO1qBFqluaQ=,tag:3XQXk4oAolesWwle3zofkQ==,type:str]OPENSEARCH_URL=ENC[AES256_GCM,data:9UhEqwPP59olNDcI09ZpzWLWW+CVbapkOXM78bcGbMy9ZPoL19++JL2eAKyqr72g4h19AibTTZVrvIZkITSqo4T1N00QXeltGtqt1XqNSACNetQqJ04oQz3Y/A==,iv:5PtVAg5vmuCe4SXrS/+v4Ful7eZJ/lYW2yHZnn1rvEY=,tag:IiIwXwwe8mVqRPKPN5fy+g==,type:str]@@ -118,15 +117,17 @@ GITHUB_WEBHOOK_SECRET_KEY=ENC[AES256_GCM,data:tWL06eZICn0MEwmC8gL6piEnxV/Z7KTskFGITHUB_SYNC_APP_URL=ENC[AES256_GCM,data:CWXHrHGKV+DvcEJQaPG+VLmKtPmxr6E/mGKBxYVZsh9VTtNizscndw==,iv:gNrnMjQdEzg7mxFOyqhu9GeODHYXWFK/QYIDLt4UzyU=,tag:fdvbEimuX7qj8hCRJRDrNA==,type:str]GITHUB_SYNC_APP_PEM=ENC[AES256_GCM,data:K8bw2WORs5JUE8gzZ/4kS5sYUu8Y2PaPp7OeKzwia8Q4ddLe4xLzJDIa9UP15hL56Urmk03igP+ba953ewGmv9aX5kuFKZ1HdN1+DRY4uNMs2MXDW3Ip7dhEDtfWy0jecUabLxIAzSQBabpFa0LwJx3C2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LIENT_ID=ENC[AES256_GCM,data:qohjsgb/qeu5cj8o3mRhwuPF2eclIQ==,iv:XtjiM5byoCfpbE2UymvB2nN+WlHAJanWEbemKtW4O/Y=,tag:u5pcrlfiJXnxSCplcWkDJQ==,type:str]+sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHBpdi1wMjU2IEUzMVUyZyBBM1lmcDc3\nUENpRVorSGVGa3R2NFlrdkx1Mm43aEcyR1ZtbEswL2RnWHlqMwpVMnY4ck5makNC\nZzVZc3JrZ3NKV2x3RTY0TFovRXJtVzEyeFZOZWRheHBNCi0tLSBobjhCbHpJa25s\nZDhyQjhCaEYrOWNiWHZkRWpnRlkwTnNEbjMwYzdxcTUwCqxxxmXy3mFUAbAy29y8\n2DFYDATdVvmplHpDTvgrNyY+lAL/3Jp9vtIs5DGXW/r73Nv3AhISmuCid18qhpAY\nUqE=\n-----END AGE ENCRYPTED FILE-----\n+sops_age__list_0__map_recipient=age1yubikey1qw64ag5lzvn9ekrflu5ruj4a6ucycscl6ctk39fjzf76jptsay39z442pxvsops_kms__list_0__map_arn=arn:aws:kms:us-east-1:569036502058:key/mrk-cab29bf948044eb79005a81f48d40e93sops_kms__list_0__map_aws_profile=-sops_kms__list_0__map_created_at=2026-02-03T14:47:22Z-sops_kms__list_0__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wFjml0O+xlXdRuT2FWk1lbFAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMmmN4p35MQgzqRM8dAgEQgDsRxuSQ6QpG5aFZ8VKQDiqtWJd/gPE2HnEJCyMn/NRKnvOekewxD8itLEz8dgeCDcX7fu2Cw2bS2U4q2g==+sops_kms__list_0__map_created_at=2026-03-03T19:32:07Z+sops_kms__list_0__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wEbY4ESQjulrtDGv9t1RAsPAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMTHwk7RrHTKSZfmSSAgEQgDtHz8FHKvbPwV8TM9GUZzHm0FylW0GMczoWAyDGYXADqlobU9BTmXHjlE/R5wyk0Tgkl4N3u2TCB//u9g==sops_kms__list_1__map_arn=arn:aws:kms:us-west-1:569036502058:key/mrk-cab29bf948044eb79005a81f48d40e93sops_kms__list_1__map_aws_profile=-sops_kms__list_1__map_created_at=2026-02-03T14:47:22Z-sops_kms__list_1__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wGvSsy0EhK25Hy2hdoR6HqoAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMHViQzKBwIGY72CWCAgEQgDtKthF4DIo1QiM2scSmXVBT624sUjTxO+jwAUipQ5Xc50oLOUa/tbaIiwNN1wE5AI48o8NPmyh2OoAeZw==-sops_lastmodified=2026-03-03T17:24:37Z-sops_mac=ENC[AES256_GCM,data:97uurUMToT7yNW8tLSEjIkIEHEGHdSaSIMtzix/7SnfD5wqajtYdgalgOglwHMJYbgE2WpI3V+nkc/pxkdnnlKqVWKS0UvJ7Rd0y3atc+BQSnPm0QKAJevwwZRra/TQZsVX756C94UQvCxhfhnFRb2gXFxo2YrJ3Zw3WyZLEDa8=,iv:w5EF7prFvVMxwaLI7SMtZzcRy7RQgXZ3PkA/NzXZDIo=,tag:Lhz1u2U/ybCOz3qiZWX0yA==,type:str]+sops_kms__list_1__map_created_at=2026-03-03T19:32:07Z+sops_kms__list_1__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wFUqf7u/HEfCUGv7j69Mb6YAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMpcJQR1XeIAFFE7ebAgEQgDvYRYIWelwN8TuwA+6fZVaB34yKo9EQ5xPLr/3BU+ro1Mn2eBPCg3q8ie2LuE/3voim1X35P/cdtDqTZg==+sops_lastmodified=2026-03-03T19:33:06Z+sops_mac=ENC[AES256_GCM,data:AmJtSW8yPmgtgiC2MMKELtGUy5Ls03ICTuK0D4LmXNbrl+GiPJOzybEEdMpZEx69jq7WsOMzSKCbt3AYXjt0SMLdZ+vGHblMZ36/Fip0yBwcT0w4CQ+nHl69IbIvJyDf4l+ujskzVN/W5cGYTrqv+8kyjPryHDNBWJ4cO+9uDEI=,iv:BVdgT//j/6vps74Rw41nQpsFSAXnUWV4nGqlqEeai8U=,tag:LRjB/HLx/g+P9yTWG2vYGg==,type:str]sops_unencrypted_suffix=_unencryptedsops_version=3.11.0diff --git a/.env-localdev.enc b/.env-localdev.encindex e2b9955da9..293e37f8f2 100644--- a/.env-localdev.enc+++ b/.env-localdev.enc@@ -77,7 +77,6 @@ MACRO_API_TOKEN_PUBLIC_KEY=ENC[AES256_GCM,data:NfF8HjejDhDc0m8H0Tk3X+EroSSEN/8ZIMACRO_DB_URL=ENC[AES256_GCM,data:VruE3cT5msoFm1JxNksCk6rD779F0mbTyPvVwiNyWNcNnlnmMTciiYLJhUZ5oDzRgbPROsrrwI8M92WCIrVloiZVT7qNI6mQwLMXyiAjscMw//Y6YHa5c8RXZWGjennaK5CCh0g=,iv:2jhYAd50w68p+Nk+lJ3Z/bUwcLxf5Oe8EXAHIYBwNZg=,tag:u/nrhm+e7VHtmQdB9cN/8Q==,type:str]NOTIFICATIONS_ENABLED=ENC[AES256_GCM,data:2TaZi0vm,iv:dMqLOFANkcuVRFdqzUj3DaJpDQ3QS0rkdKaW5UKNZ9M=,tag:i4q5x+VWj5/N3y+U3jWr0Q==,type:str]NOTIFICATION_QUEUE=ENC[AES256_GCM,data:jTxvSvQdVgeEFoPgIbEZJHBGgVN0LQ8q,iv:hcIQlK/VQY2VvQzG/VLl3n/YBdF46g0rbyLiPNKrdW4=,tag:buCPuybZV69ln13qtq4+YA==,type:str]-NOTIFICATION_SERVICE_URL=ENC[AES256_GCM,data:4nUquZH2Jp1kr3Iom/le+QVXqW5NOxYqHqfpuamHq9iJYQ==,iv:KyG35fZO4wfZ7Q/LX9xUG/PBMsG+i9xLkZa8HxTiKrY=,tag:4dabazkp+iEdRvCGJNBPkg==,type:str]OPENAI_API_KEY=ENC[AES256_GCM,data:aHDkd5VrbMj3+ZRt4dVdhb2K2FOd+QOnL9WBuApEtlqHHIbF0TqsvTQvjse/Zk0LSb5kmTXD+9SdPIKCwVwZ60mECZEmxmCA88XdWRdufUtyT8rIjFFHQrNvxUyL+5ta3zt62h/O0NpAaTfWgdA9CPIqk1guIRL/5uJbXPJHFx4Gk9EEx1ybKmbyNFGxSSkHBqUWmiQSVv/pr1JNXBNFG4o5D4bb+Q==,iv:/JmqEBhuXiZI7Sy0sY3ANyaQqflHOrV0f+M9FmgDH5g=,tag:03uEgCwWDHZy9E3lpnDDyQ==,type:str]OPENSEARCH_PASSWORD=ENC[AES256_GCM,data:k75JjS31Lxxtf9FnCMgnKP10W1LefYrw5lTDZYAseFCWYLMgKeh50QEjsx0pXsbDPw==,iv:kx9mhntRPf8x7yzHhh/eKiFmMAHqR3utmBCp8It8VVU=,tag:9fMfpCGQwI8Ftm3Cvce5+w==,type:str]OPENSEARCH_URL=ENC[AES256_GCM,data:ryyWgWIxJY+Bk0x62+AGnFYgyiRrfs4104fH8i7mvtYLiM2N4B+7pPhoYIar1N7lQ9votMyNNtpcDUxSLHL+Sh+/q088koNdp+aIY5QH19aN2yB8k1rESAzL6A==,iv:pUG8r6AaIOfQVucL0PW4CR8U+htFNS3XlP9G5HFTe6k=,tag:ZqIIOzp/Bm6UenPLbS11gA==,type:str]@@ -125,15 +124,17 @@ GITHUB_WEBHOOK_SECRET_KEY=ENC[AES256_GCM,data:8Jpg/QeIDEpJpCWp2WirEZZpRj65LGuTEwGITHUB_SYN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4mYfr+Ll9k9XVDd5hcEKqS4KoaEMuN/DBA3Sz3/7loyM+INKxgkGUzmzsxMJRpRAYrPSVZu4VnQeXa9U8hR4lrZUZdO55lX/UHZccZ00W5b9g8pU53Tm5WEKoBW685e2hVg6Fewd6pegPVVu21M3hjohJ1U/Hrk8Vtb2OkfkB+d/+/tzKptWLxWZ17BmOF/y5H/2ClzrDwouj5BsPgRWEXEzuWLBNPdhlZu3HAzEBDM16LcXZHbvkE9MxbLRB0Jnh0=,iv:3EzSGkENV3CMdhAtXzkJycJ4uJ25m1AtNPyVgssfUS0=,tag:amq4cn/DOBDNNQK3BZPK/w==,type:str]GITHUB_SYNC_APP_CLIENT_ID=ENC[AES256_GCM,data:b2qkbli7aE9odK8Q8THou2iayneW/w==,iv:GHCrNrq7BwiIiHbX9qjBFoLD33QlASPa74CdU5WMsbY=,tag:iYU1+Z4vY0vOmoi1CqXLDA==,type:str]+sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHBpdi1wMjU2IEUzMVUyZyBBNDlKWUVt\nbUpscDEzSE9IZTNvdkd6VUFpWWhQM1ZWcndzL0srVXE4SW5GUQpHR2xNR3lIUnBV\nY3BqbmRadVVPMUdkeUluR0RycDJsWWt1V2Z0T1hqbG1JCi0tLSA5cVZQSGtNNmgr\nVXdyWGZsLzg2N0lyakxuVDZuNEFDUlUrNXJIMHE3UmRRClCd0JD9Q51ZLVKv73Px\nebG4SM/4o73tU3IHJu4tyQUrFM+we+JEDvsYKHBuUgTGC+2yQRPmHV+HObTqqRnu\nzGg=\n-----END AGE ENCRYPTED FILE-----\n+sops_age__list_0__map_recipient=age1yubikey1qw64ag5lzvn9ekrflu5ruj4a6ucycscl6ctk39fjzf76jptsay39z442pxvsops_kms__list_0__map_arn=arn:aws:kms:us-east-1:569036502058:key/mrk-cab29bf948044eb79005a81f48d40e93sops_kms__list_0__map_aws_profile=-sops_kms__list_0__map_created_at=2026-02-03T14:46:45Z-sops_kms__list_0__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wF4JcUJbnh+N9UDdtsuM0lSAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMAtG+fkFJ3KFI1UarAgEQgDtijxz6R85wysieToEwVP+QOrjt186zd7o/cSYBDR0guJEmvP6NjonNd46q/jhDQRsf0JP400WvdqrHUQ==+sops_kms__list_0__map_created_at=2026-03-03T19:32:17Z+sops_kms__list_0__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wGHh5SlzqMdlXmCOPYl7LRIAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMCGcI2av+0JD0yIdVAgEQgDtIyHPx6GGfUBH9n/3h1iCf3IoO2zkUgca28DZKVV0ROfnZP7x5qsid/bIJ0tyW1+yaIxEDSbkMOvFjqQ==sops_kms__list_1__map_arn=arn:aws:kms:us-west-1:569036502058:key/mrk-cab29bf948044eb79005a81f48d40e93sops_kms__list_1__map_aws_profile=-sops_kms__list_1__map_created_at=2026-02-03T14:46:45Z-sops_kms__list_1__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wEgw9B5bWVjFVnU2kvvYrAsAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMjqkFO5E+NmhMEFLfAgEQgDtgSVqvR4m1awQFs/oq8iNeI/6jS3IXs7bQiUUTyQySXE6/kjPJLdYITJlXCzu7t/eXd4nMFCLcDMwYqg==-sops_lastmodified=2026-03-03T17:24:33Z-sops_mac=ENC[AES256_GCM,data:GqdWBk3ed7ZJl176YPeojPTGv8u0bhfqJdITkFMdYE+uA7HWbt6jMfbAIaMtzsicQU58ojWW2Uc9OJFFfUiLA0MiV2nPLqlU7nkG0F4nhmA/c7yyAbDQhiJqHoNcqA3wayNucTccTBhU5fLkDX0i1PQNYObpe0Ar2yus0tVR+Ik=,iv:rorJP9/DH7ODFBbG3FYVVeMuIJgImmyZ4wEU9Ky+NUo=,tag:xSarlOEY8yGLxi/LHy6hVw==,type:str]+sops_kms__list_1__map_created_at=2026-03-03T19:32:17Z+sops_kms__list_1__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wHtcTS4UVhM79Eansn1/OmrAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMRrFwSp99ZM2mPtJzAgEQgDvsIaiNifNz0/18C9OH77AG/LQLpmDiXiJYV46yLDv9vdyPL3PaLMvkAqgL3Xb2F4RcZOIUxkTS3u92xQ==+sops_lastmodified=2026-03-03T19:33:16Z+sops_mac=ENC[AES256_GCM,data:7GWrlUZe/U+7B0zGnxxPJPraEv6DYBMUxfGM2Pys6MU1DDrH/Cazqu0nAkbfV0pxaZUwYMp4UW2BTGbmoMnJQEpyHSoKcCR+47kA4n5MewDVMx9hv0RV52l0hj0MGC9IpfRvVGtNpxxRy9pk9oKY3aTn91Nv/9uJcg8/IoeSUCE=,iv:XqxXKQvESbr/rLYwNzvN+tR8wEn/zQwA8O7EIq3e6uc=,tag:U+bCU5vrjCkXqXWqDPT7mg==,type:str]sops_unencrypted_suffix=_unencryptedsops_version=3.11.0diff --git a/rust/cloud-storage/Cargo.lock b/rust/cloud-storage/Cargo.lockindex 7aa50b0acb..db3fb74b58 100644--- a/rust/cloud-storage/Cargo.lock+++ b/rust/cloud-storage/Cargo.lock@@ -594,7 +594,6 @@ dependencies = ["native_app_service","non_empty","notification",- "notification_service_client","openssl","rand 0.9.0","redis",@@ -6513,18 +6512,6 @@ dependencies = ["uuid",]-[[package]]-name = "notification_service_client"-version = "0.1.0"-dependencies = [- "anyhow",- "reqwest",- "serde",- "serde_json",- "thiserror 2.0.17",- "tracing",-]-[[package]]name = "nu-ansi-term"version = "0.50.1"diff --git a/rust/cloud-storage/Cargo.toml b/rust/cloud-storage/Cargo.tomlindex 5c97f8a9c4..2e96664c72 100644--- a/rust/cloud-storage/Cargo.toml+++ b/rust/cloud-storage/Cargo.toml@@ -8,8 +8,8 @@ members = ["ai_toolset","anthropic","authentication_service",- "channels","authentication_service_client",+ "channels","comms_db_client","comms_service","comms_service_client",@@ -27,8 +27,8 @@ members = ["document_storage_service","document_storage_service_client","document_sub_type",- "documents","document_text_extractor",+ "documents","docx_unzip_handler","dynamodb_client","email_contact_search",@@ -62,8 +62,8 @@ members = ["macro_middleware","macro_project_utils","macro_redis",- "macro_sha_count_client","macro_service_client",+ "macro_sha_count_client","macro_share_permissions","macro_uuid","mention_utils",@@ -87,7 +87,6 @@ members = ["notification_db_client","notification_sandbox","notification_service",- "notification_service_client","opensearch_client","organization_retention_handler","organization_retention_trigger",@@ -149,18 +148,18 @@ base64 = "0.22.1"cached = { version = "0.54.0", features = ["async_tokio_rt_multi_thread"] }chrono = { version = "0.4.39", features = ["serde"] }clap = { version = "4.5.20", features = ["derive"] }-csv = "1"cloudfront_sign = "0.3.0"cookie = "0.18.1"+csv = "1"dashmap = "6.1.0"dotenvy = "0.15.7"ego-tree = "0.6.2"either = "1"-inquire = "0.7"futures = "0.3.31"hex = "0.4.3"http = "1"http-body-util = "0.1.2"+inquire = "0.7"itertools = "0.14"jsonwebtoken = { git = "https://github.com/whutchinson98/jsonwebtoken", features = ["rust_crypto"] }lambda_runtime = "0.13.0"@@ -169,6 +168,9 @@ log = "0.4.26"mockall = "0.13"nom = "8"openssl = { version = "0.10.71", features = ["vendored"] }+opentelemetry = "0.31.0"+opentelemetry-otlp = { version = "0.31.0", features = ["grpc-tonic"] }+opentelemetry_sdk = { version = "0.31.0", features = ["rt-tokio"] }ordered-float = "5"paste = "1"pdfium-render = { version = "0.8.28" }@@ -206,9 +208,6 @@ tower-http = { version = "0.6.1", features = ["cors","trace",] }-opentelemetry = "0.31.0"-opentelemetry_sdk = { version = "0.31.0", features = ["rt-tokio"] }-opentelemetry-otlp = { version = "0.31.0", features = ["grpc-tonic"] }tracing = "0.1.44"tracing-opentelemetry = "0.32.1"tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] }diff --git a/rust/cloud-storage/authentication_service/Cargo.toml b/rust/cloud-storage/authentication_service/Cargo.tomlindex 05a2c5744b..45f44eb08b 100644--- a/rust/cloud-storage/authentication_service/Cargo.toml+++ b/rust/cloud-storage/authentication_service/Cargo.toml@@ -43,8 +43,10 @@ doppleganger = { workspace = true }email_validator = { path = "../email_validator" }fusionauth = { path = "../fusionauth" }futures = { workspace = true }+github = { path = "../github" }http-body-util = { workspace = true }jsonwebtoken = { workspace = true }+last_online_tracker = { path = "../last_online_tracker" }macro_auth = { path = "../macro_auth" }macro_aws_config = { path = "../macro_aws_config" }macro_cache_client = { path = "../macro_cache_client", default-features = false, features = [@@ -58,7 +60,6 @@ macro_db_client = { path = "../macro_db_client", default-features = false, featu"account_merge_request","team",] }-last_online_tracker = { path = "../last_online_tracker" }macro_entrypoint = { path = "../macro_entrypoint" }macro_env = { path = "../macro_env", features = ["frontend_url"] }macro_env_var = { path = "../macro_env_var" }@@ -79,7 +80,6 @@ models_team = { path = "../models_team" }native_app_service = { path = "../native_app_service" }non_empty = { path = "../non_empty" }notification = { path = "../notification" }-notification_service_client = { path = "../notification_service_client" }openssl = { workspace = true }rand = { workspace = true }redis = { workspace = true }@@ -111,7 +111,6 @@ user_quota = { path = "../user_quota" }utoipa = { workspace = true }utoipa-swagger-ui = { workspace = true }uuid = { workspace = true }-github = { path = "../github" }[dev-dependencies]diff --git a/rust/cloud-storage/authentication_service/src/api/context.rs b/rust/cloud-storage/authentication_service/src/api/context.rsindex a454532541..2caf16bbf4 100644--- a/rust/cloud-storage/authentication_service/src/api/context.rs+++ b/rust/cloud-storage/authentication_service/src/api/context.rs@@ -56,7 +56,6 @@ pub(crate) struct ApiContext {pub stripe_client: Arc<stripe::Client>,pub document_storage_service_client:Arc<document_storage_service_client::DocumentStorageServiceClient>,- pub notification_service_client: Arc<notification_service_client::NotificationServiceClient>,pub ses_client: Arc<ses_client::Ses>,pub notification_ingress_service: Arc<NotificationIngressType>,pub sqs_client: Arc<sqs_client::SQS>,diff --git a/rust/cloud-storage/authentication_service/src/api/webhooks/user/delete_user_webhook.rs b/rust/cloud-storage/authentication_service/src/api/webhooks/user/delete_user_webhook.rsindex 6050677096..6f7d2b5dcb 100644--- a/rust/cloud-storage/authentication_service/src/api/webhooks/user/delete_user_webhook.rs+++ b/rust/cloud-storage/authentication_service/src/api/webhooks/user/delete_user_webhook.rs@@ -8,7 +8,10 @@ use comms_db_client::{participants::remove_participant::{RemoveParticipantOptions, remove_participant},};use macro_middleware::auth::internal_access::ValidInternalKey;+use macro_user_id::user_id::MacroUserIdStr;use model::{authentication::webhooks::FusionAuthUserWebhook, user::UserInfoWithMacroUserId};+use notification::domain::ports::NotificationRepository;+use notification::outbound::repository::DbNotificationRepository;use sqlx::{Pool, Postgres};use stripe::CustomerId;use tracing::Instrument;@@ -187,20 +190,29 @@ async fn delete_user(.in_current_span(),);- // Send delete user call to notifications+ // Delete user notifications directly from the database+ // TODO: technically we should be calling into the notification service here+ // but since the service method would just be a straight passthrough to the repo, this is simpler than plumbing the entire service downtokio::spawn({let user_infos = user_infos.clone();- let notification_service_client = ctx.notification_service_client.clone();+ let notification_repo = DbNotificationRepository::new(ctx.db.clone());async move {for user_info in user_infos {let user_id = user_info.id.clone();tracing::trace!(user_id, "delete_user_notifications");- if let Err(e) = notification_service_client- .delete_user_notifications(&user_id)- .await- {- tracing::error!(error=?e, user_id, "unable to delete user notifications");+ match MacroUserIdStr::parse_from_str(&user_id) {+ Ok(macro_user_id) => {+ if let Err(e) = notification_repo+ .delete_all_user_notifications(macro_user_id)+ .await+ {+ tracing::error!(error=?e, user_id, "unable to delete user notifications");+ }+ }+ Err(e) => {+ tracing::error!(error=?e, user_id, "unable to parse user id");+ }}tracing::trace!(user_id, "delete_user_notifications complete");}diff --git a/rust/cloud-storage/authentication_service/src/config.rs b/rust/cloud-storage/authentication_service/src/config.rsindex dc394ef22b..fa17925a97 100644--- a/rust/cloud-storage/authentication_service/src/config.rs+++ b/rust/cloud-storage/authentication_service/src/config.rs@@ -53,9 +53,6 @@ pub struct Config {/// The document storage service urlpub document_storage_service_url: String,- /// The notification service url- pub notification_service_url: String,-/// The notification queuepub notification_queue: String,@@ -122,9 +119,6 @@ impl Config {let document_storage_service_url = std::env::var("DOCUMENT_STORAGE_SERVICE_URL").context("DOCUMENT_STORAGE_SERVICE_URL must be provided")?;- let notification_service_url = std::env::var("NOTIFICATION_SERVICE_URL")- .context("NOTIFICATION_SERVICE_URL must be provided")?;-let notification_queue =std::env::var("NOTIFICATION_QUEUE").context("NOTIFICATION_QUEUE must be provided")?;@@ -169,7 +163,6 @@ impl Config {port,service_internal_auth_key,document_storage_service_url,- notification_service_url,notification_queue,search_event_queue,stripe_price_id,diff --git a/rust/cloud-storage/authentication_service/src/main.rs b/rust/cloud-storage/authentication_service/src/main.rsindex 9498362d33..c9227f4c82 100644--- a/rust/cloud-storage/authentication_service/src/main.rs+++ b/rust/cloud-storage/authentication_service/src/main.rs@@ -24,7 +24,6 @@ use notification::outbound::{push_notification_checker::PushNotificationCheckerImpl, queue::SqsNotificationQueue,repository::DbNotificationRepository, user_existence_checker::DbUserExistenceChecker,};-use notification_service_client::NotificationServiceClient;use roles_and_permissions::{domain::service::UserRolesAndPermissionsServiceImpl, outbound::pgpool::MacroDB,};@@ -173,11 +172,6 @@ async fn main() -> anyhow::Result<()> {);tracing::trace!("initialized document storage service client");- let notification_service_client = NotificationServiceClient::new(- config.service_internal_auth_key.clone(),- config.notification_service_url.clone(),- );-let macro_cache_client = macro_cache_client::MacroCache::new(config.redis_uri.as_str());tracing::trace!("initialized redis client");@@ -275,7 +269,6 @@ async fn main() -> anyhow::Result<()> {macro_cache_client: Arc::new(macro_cache_client),stripe_client: Arc::new(stripe_client),document_storage_service_client: Arc::new(document_storage_service_client),- notification_service_client: Arc::new(notification_service_client),ses_client: Arc::new(ses_client),notification_ingress_service: Arc::new(notification_ingress_service),sqs_client: Arc::new(sqs_client),diff --git a/rust/cloud-storage/comms/src/outbound/postgres/comms_repo/dynamic.rs b/rust/cloud-storage/comms/src/outbound/postgres/comms_repo/dynamic.rsindex b94d2d0a26..25959b188e 100644--- a/rust/cloud-storage/comms/src/outbound/postgres/comms_repo/dynamic.rs+++ b/rust/cloud-storage/comms/src/outbound/postgres/comms_repo/dynamic.rs@@ -238,7 +238,6 @@ pub async fn get_user_channels_dynamic(.bind(cursor_timestamp).bind(cursor_id_str).try_map(|row: PgRow| {- tracing::info!("{row:?}");let channel_row = ChannelRow {id: row.try_get("id")?,name: row.try_get("name")?,diff --git a/rust/cloud-storage/notification/.sqlx/query-4e096eb7d3c507e3647685073fba7b3f36ef0e70c887db31f5cc5a8eb8ee1844.json b/rust/cloud-storage/notification/.sqlx/query-4e096eb7d3c507e3647685073fba7b3f36ef0e70c887db31f5cc5a8eb8ee1844.jsonnew file mode 100644index 0000000000..55fcda1121--- /dev/null+++ b/rust/cloud-storage/notification/.sqlx/query-4e096eb7d3c507e3647685073fba7b3f36ef0e70c887db31f5cc5a8eb8ee1844.json@@ -0,0 +1,14 @@+{+ "db_name": "PostgreSQL",+ "query": "\n DELETE FROM user_notification\n WHERE user_id = $1\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "4e096eb7d3c507e3647685073fba7b3f36ef0e70c887db31f5cc5a8eb8ee1844"+}diff --git a/rust/cloud-storage/notification/src/domain/ports.rs b/rust/cloud-storage/notification/src/domain/ports.rsindex 620adc29d3..36dc7eb5ad 100644--- a/rust/cloud-storage/notification/src/domain/ports.rs+++ b/rust/cloud-storage/notification/src/domain/ports.rs@@ -164,6 +164,12 @@ pub trait NotificationRepository: Send + Sync + 'static {user_id: MacroUserIdStr<'_>,notification_ids: &[Uuid],) -> impl Future<Output = Result<(), Report>> + Send;++ /// Hard-delete all notifications for a user.+ fn delete_all_user_notifications(+ &self,+ user_id: MacroUserIdStr<'_>,+ ) -> impl Future<Output = Result<(), Report>> + Send;}/// Port for WebSocket delivery via connection gateway.diff --git a/rust/cloud-storage/notification/src/domain/service/test.rs b/rust/cloud-storage/notification/src/domain/service/test.rsindex 9d22c420eb..a3a854873e 100644--- a/rust/cloud-storage/notification/src/domain/service/test.rs+++ b/rust/cloud-storage/notification/src/domain/service/test.rs@@ -304,6 +304,13 @@ impl NotificationRepository for MockRepository {) -> Result<(), Report> {Ok(())}++ async fn delete_all_user_notifications(+ &self,+ _user_id: MacroUserIdStr<'_>,+ ) -> Result<(), Report> {+ Ok(())+ }}impl NotificationRepository for std::sync::Arc<MockRepository> {@@ -429,6 +436,13 @@ impl NotificationRepository for std::sync::Arc<MockRepository> {.bulk_delete_user_notifications(user_id, notification_ids).await}++ async fn delete_all_user_notifications(+ &self,+ user_id: MacroUserIdStr<'_>,+ ) -> Result<(), Report> {+ (**self).delete_all_user_notifications(user_id).await+ }}/// Mock queue that tracks published messages.diff --git a/rust/cloud-storage/notification/src/outbound/repository.rs b/rust/cloud-storage/notification/src/outbound/repository.rsindex b557db1b82..093c335534 100644--- a/rust/cloud-storage/notification/src/outbound/repository.rs+++ b/rust/cloud-storage/notification/src/outbound/repository.rs@@ -150,6 +150,12 @@ pub trait NotificationDbOps: Send + Sync + 'static {user_id: MacroUserIdStr<'_>,notification_ids: &[Uuid],) -> impl std::future::Future<Output = Result<(), Report>> + Send;++ /// Hard-delete all notifications for a user.+ fn delete_all_user_notifications(+ &self,+ user_id: MacroUserIdStr<'_>,+ ) -> impl std::future::Future<Output = Result<(), Report>> + Send;}impl NotificationDbOps for PgPool {@@ -704,6 +710,23 @@ impl NotificationDbOps for PgPool {Ok(())}++ async fn delete_all_user_notifications(+ &self,+ user_id: MacroUserIdStr<'_>,+ ) -> Result<(), Report> {+ sqlx::query!(+ r#"+ DELETE FROM user_notification+ WHERE user_id = $1+ "#,+ user_id.as_ref(),+ )+ .execute(self)+ .await?;++ Ok(())+ }}impl<D: NotificationDbOps + Send + Sync> NotificationRepository for DbNotificationRepository<D> {@@ -827,4 +850,11 @@ impl<D: NotificationDbOps + Send + Sync> NotificationRepository for DbNotificati.bulk_delete_user_notifications(user_id, notification_ids).await}++ async fn delete_all_user_notifications(+ &self,+ user_id: MacroUserIdStr<'_>,+ ) -> Result<(), Report> {+ self.db.delete_all_user_notifications(user_id).await+ }}diff --git a/rust/cloud-storage/notification/src/outbound/repository/test.rs b/rust/cloud-storage/notification/src/outbound/repository/test.rsindex 70a6f9df49..b424205a98 100644--- a/rust/cloud-storage/notification/src/outbound/repository/test.rs+++ b/rust/cloud-storage/notification/src/outbound/repository/test.rs@@ -375,3 +375,83 @@ async fn test_create_notification_returns_none_on_conflict(pool: Pool<Postgres>).unwrap();assert_eq!(user_count, 1);}++#[sqlx::test(+ migrator = "MACRO_DB_MIGRATIONS",+ fixtures(path = "../../../fixtures", scripts("user_notifications"))+)]+async fn test_delete_all_user_notifications(pool: Pool<Postgres>) {+ let user = MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap();+ let notification_id = uuid::Uuid::parse_str("0193b1ea-a542-7589-893b-2b4a509c1e76").unwrap();++ // Verify the notification exists before deletion+ let count_before: i64 = sqlx::query_scalar!(+ "SELECT COUNT(*) FROM user_notification WHERE user_id = $1",+ user.to_string()+ )+ .fetch_one(&pool)+ .await+ .unwrap()+ .unwrap();+ assert_eq!(count_before, 1);++ pool.delete_all_user_notifications(user.clone())+ .await+ .unwrap();++ // Verify the user_notification row is hard-deleted+ let count_after: i64 = sqlx::query_scalar!(+ "SELECT COUNT(*) FROM user_notification WHERE user_id = $1",+ user.to_string()+ )+ .fetch_one(&pool)+ .await+ .unwrap()+ .unwrap();+ assert_eq!(count_after, 0);++ // Verify the parent notification record still exists+ let notif_count: i64 = sqlx::query_scalar!(+ "SELECT COUNT(*) FROM notification WHERE id = $1",+ notification_id+ )+ .fetch_one(&pool)+ .await+ .unwrap()+ .unwrap();+ assert_eq!(notif_count, 1);+}++#[sqlx::test(+ migrator = "MACRO_DB_MIGRATIONS",+ fixtures(path = "../../../fixtures", scripts("user_notifications"))+)]+async fn test_delete_all_user_notifications_does_not_affect_other_users(pool: Pool<Postgres>) {+ let user = MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap();+ let other_user = test_user("[email protected]");+ let notification_id = uuid::Uuid::parse_str("0193b1ea-a542-7589-893b-2b4a509c1e76").unwrap();++ // Add a user_notification for the other user+ sqlx::query!(+ "INSERT INTO user_notification (user_id, notification_id, created_at) VALUES ($1, $2, '2025-01-01 00:00:00')",+ other_user.to_string(),+ notification_id,+ )+ .execute(&pool)+ .await+ .unwrap();++ // Delete all notifications for the first user only+ pool.delete_all_user_notifications(user).await.unwrap();++ // The other user's notification should still exist+ let other_count: i64 = sqlx::query_scalar!(+ "SELECT COUNT(*) FROM user_notification WHERE user_id = $1",+ other_user.to_string()+ )+ .fetch_one(&pool)+ .await+ .unwrap()+ .unwrap();+ assert_eq!(other_count, 1);+}diff --git a/rust/cloud-storage/notification_sandbox/src/adapters/sandbox_repository.rs b/rust/cloud-storage/notification_sandbox/src/adapters/sandbox_repository.rsindex 50a6f454b4..123f88b806 100644--- a/rust/cloud-storage/notification_sandbox/src/adapters/sandbox_repository.rs+++ b/rust/cloud-storage/notification_sandbox/src/adapters/sandbox_repository.rs@@ -162,4 +162,11 @@ impl NotificationRepository for SandboxNotificationRepository {.bulk_delete_user_notifications(user_id, notification_ids).await}++ async fn delete_all_user_notifications(+ &self,+ user_id: MacroUserIdStr<'_>,+ ) -> Result<(), Report> {+ self.inner.delete_all_user_notifications(user_id).await+ }}diff --git a/rust/cloud-storage/notification_service/src/api/mod.rs b/rust/cloud-storage/notification_service/src/api/mod.rsindex 442d1ad53d..ef0e96cdbf 100644--- a/rust/cloud-storage/notification_service/src/api/mod.rs+++ b/rust/cloud-storage/notification_service/src/api/mod.rs@@ -2,7 +2,6 @@ use crate::api::context::ApiContext;use ::notification::inbound::http::NotificationRouterState;use anyhow::Context;use axum::Router;-use macro_middleware::auth::internal_access::ValidInternalKey;use model::version::{ServiceNameState, VersionedApiServiceName, validate_api_version};use tower::ServiceBuilder;use tower_http::{compression::CompressionLayer, trace::TraceLayer};@@ -15,7 +14,6 @@ pub mod context;// Routesmod device;mod health;-mod notification;mod unsubscribe;pub(crate) mod user_notification;@@ -80,20 +78,7 @@ fn api_router<S: ::notification::domain::service::NotificationReader>(user_notification::router(ingress_state),).nest("/unsubscribe", unsubscribe::router())- .layer(middleware)- .nest(- "/notifications",- notification::router().layer(- ServiceBuilder::new()- .layer(axum::middleware::from_extractor_with_state::<- ValidInternalKey,- _,- >(state))- .layer(axum::middleware::from_fn(- macro_middleware::connection_drop_prevention_handler,- )),- ),- );+ .layer(middleware);Router::new().nest("/:version", internal_router.clone()).merge(internal_router)diff --git a/rust/cloud-storage/notification_service/src/api/notification/delete_user_notifications.rs b/rust/cloud-storage/notification_service/src/api/notification/delete_user_notifications.rsdeleted file mode 100644index 1fa768fb97..0000000000--- a/rust/cloud-storage/notification_service/src/api/notification/delete_user_notifications.rs+++ /dev/null@@ -1,39 +0,0 @@-use axum::{- Json,- extract::{self, State},- http::StatusCode,- response::{IntoResponse, Response},-};-use model::response::ErrorResponse;-use serde::Deserialize;--use crate::api::context::ApiContext;--#[derive(Deserialize)]-pub struct Param {- pub user_id: String,-}--/// Deletes all notifications for a user-#[tracing::instrument(skip(ctx))]-pub async fn handler(- State(ctx): State<ApiContext>,- extract::Path(Param { user_id }): extract::Path<Param>,-) -> Result<Response, Response> {- notification_db_client::user_notification::delete::delete_all_users_notification(- &ctx.db, &user_id,- )- .await- .map_err(|e| {- tracing::error!(error=?e, "unable to delete user notifications");- (- StatusCode::INTERNAL_SERVER_ERROR,- Json(ErrorResponse {- message: "unable to delete user notifications",- }),- )- .into_response()- })?;-- Ok((StatusCode::OK, "ok").into_response())-}diff --git a/rust/cloud-storage/notification_service/src/api/notification/mod.rs b/rust/cloud-storage/notification_service/src/api/notification/mod.rsdeleted file mode 100644index b819e8963e..0000000000--- a/rust/cloud-storage/notification_service/src/api/notification/mod.rs+++ /dev/null@@ -1,9 +0,0 @@-use axum::{Router, routing::delete};--use crate::api::context::ApiContext;--pub(in crate::api) mod delete_user_notifications;--pub fn router() -> Router<ApiContext> {- Router::new().route("/user/:user_id", delete(delete_user_notifications::handler))-}diff --git a/rust/cloud-storage/notification_service_client/Cargo.toml b/rust/cloud-storage/notification_service_client/Cargo.tomldeleted file mode 100644index 07032f513f..0000000000--- a/rust/cloud-storage/notification_service_client/Cargo.toml+++ /dev/null@@ -1,13 +0,0 @@-[package]-edition = "2024"-name = "notification_service_client"-publish = false-version = "0.1.0"--[dependencies]-anyhow = { workspace = true }-reqwest = { workspace = true }-serde = { workspace = true }-serde_json = { workspace = true }-thiserror = { workspace = true }-tracing = { workspace = true }diff --git a/rust/cloud-storage/notification_service_client/src/constants.rs b/rust/cloud-storage/notification_service_client/src/constants.rsdeleted file mode 100644index 7493559310..0000000000--- a/rust/cloud-storage/notification_service_client/src/constants.rs+++ /dev/null@@ -1 +0,0 @@-pub const MACRO_INTERNAL_AUTH_KEY_HEADER_KEY: &str = "x-internal-auth-key";diff --git a/rust/cloud-storage/notification_service_client/src/delete.rs b/rust/cloud-storage/notification_service_client/src/delete.rsdeleted file mode 100644index 4912be2866..0000000000--- a/rust/cloud-storage/notification_service_client/src/delete.rs+++ /dev/null@@ -1,28 +0,0 @@-use super::NotificationServiceClient;-use anyhow::Result;--impl NotificationServiceClient {- /// Deletes all notifications for a user- #[tracing::instrument(skip(self))]- pub async fn delete_user_notifications(&self, user_id: &str) -> Result<()> {- let res = self- .client- .delete(format!("{}/notifications/user/{}", self.url, user_id))- .send()- .await?;-- let status_code = res.status();-- if status_code != reqwest::StatusCode::OK {- let body: String = res.text().await?;- tracing::error!(- body=%body,- status=%status_code,- "unexpected response from document storage service"- );- return Err(anyhow::anyhow!(body));- }-- Ok(())- }-}diff --git a/rust/cloud-storage/notification_service_client/src/error.rs b/rust/cloud-storage/notification_service_client/src/error.rsdeleted file mode 100644index a522436477..0000000000--- a/rust/cloud-storage/notification_service_client/src/error.rs+++ /dev/null@@ -1,33 +0,0 @@-#[derive(thiserror::Error, Debug, serde::Serialize)]-#[serde(tag = "type")]-pub enum NotificationClientError {- #[error("unauthorized")]- Unauthorized,- #[error("not found")]- NotFound,- #[error("internal server error: {details}")]- InternalServerError { details: String },- #[error("unable to build request: {details}")]- RequestBuildError { details: String },- #[error("an unknown error occurred")]- Generic(GenericErrorResponse),-}--#[derive(serde::Serialize, Debug)]-pub struct GenericErrorResponse {- pub message: String,-}--impl From<anyhow::Error> for GenericErrorResponse {- fn from(err: anyhow::Error) -> Self {- Self {- message: err.to_string(),- }- }-}--impl From<anyhow::Error> for NotificationClientError {- fn from(err: anyhow::Error) -> Self {- NotificationClientError::Generic(GenericErrorResponse::from(err))- }-}diff --git a/rust/cloud-storage/notification_service_client/src/lib.rs b/rust/cloud-storage/notification_service_client/src/lib.rsdeleted file mode 100644index a6552ceaaa..0000000000--- a/rust/cloud-storage/notification_service_client/src/lib.rs+++ /dev/null@@ -1,28 +0,0 @@-use constants::MACRO_INTERNAL_AUTH_KEY_HEADER_KEY;--pub(crate) mod constants;-pub mod delete;-pub mod error;--#[derive(Clone)]-pub struct NotificationServiceClient {- url: String,- client: reqwest::Client,-}--impl NotificationServiceClient {- pub fn new(internal_auth_key: String, url: String) -> Self {- let mut headers = reqwest::header::HeaderMap::new();- headers.insert(- MACRO_INTERNAL_AUTH_KEY_HEADER_KEY,- internal_auth_key.parse().unwrap(),- );-- let client = reqwest::Client::builder()- .default_headers(headers)- .build()- .unwrap();-- Self { url, client }- }-}