Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add configuration for sengrid plugin
Maciej Korycinski48795077919e
diff --git a/poetry.lock b/poetry.lockindex 662bd8011f..db867c8bae 100644--- a/poetry.lock+++ b/poetry.lock@@ -166,20 +166,20 @@ d = ["aiohttp (>=3.3.2)", "aiohttp-cors"][[package]]name = "boto3"-version = "1.17.5"+version = "1.17.7"description = "The AWS SDK for Python"category = "main"optional = falsepython-versions = ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"[package.dependencies]-botocore = ">=1.20.5,<1.21.0"+botocore = ">=1.20.7,<1.21.0"jmespath = ">=0.7.1,<1.0.0"s3transfer = ">=0.3.0,<0.4.0"[[package]]name = "botocore"-version = "1.20.5"+version = "1.20.7"description = "Low-level, data-driven core of boto 3."category = "main"optional = false@@ -307,7 +307,7 @@ python-versions = "*"[[package]]name = "cffi"-version = "1.14.4"+version = "1.14.5"description = "Foreign Function Interface for Python calling C code."category = "main"optional = false@@ -487,7 +487,7 @@ django = "*"[[package]]name = "django-cache-url"-version = "3.2.2"+version = "3.2.3"description = "Use Cache URLs in your Django application."category = "main"optional = false@@ -870,7 +870,7 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2)"][[package]]name = "google-auth"-version = "1.25.0"+version = "1.26.1"description = "Google Authentication Library"category = "main"optional = false@@ -917,7 +917,7 @@ proto-plus = ">=1.7.1"[[package]]name = "google-cloud-storage"-version = "1.35.1"+version = "1.36.0"description = "Google Cloud Storage API client library"category = "main"optional = false@@ -1589,7 +1589,7 @@ test = ["pytest (>=2.7.3)", "pytest-cov", "coveralls", "futures", "pytest-benchm[[package]]name = "prompt-toolkit"-version = "3.0.14"+version = "3.0.16"description = "Library for building powerful interactive command lines in Python"category = "main"optional = false@@ -1966,6 +1966,14 @@ python-versions = "*"[package.extras]cli = ["click (>=5.0)"]+[[package]]+name = "python-http-client"+version = "3.3.2"+description = "HTTP REST client, simplified for Python"+category = "main"+optional = false+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"+[[package]]name = "python-json-logger"version = "2.0.1"@@ -2122,9 +2130,21 @@ python-versions = "*"[package.dependencies]botocore = ">=1.12.36,<2.0a.0"+[[package]]+name = "sendgrid"+version = "6.6.0"+description = "Twilio SendGrid library for Python"+category = "main"+optional = false+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"++[package.dependencies]+python-http-client = ">=3.2.1"+starkbank-ecdsa = ">=1.0.0"+[[package]]name = "sentry-sdk"-version = "0.19.5"+version = "0.20.1"description = "Python client for Sentry (https://sentry.io)"category = "main"optional = false@@ -2201,6 +2221,14 @@ category = "main"optional = falsepython-versions = ">=3.5"+[[package]]+name = "starkbank-ecdsa"+version = "1.1.0"+description = "A lightweight and fast pure python ECDSA library"+category = "main"+optional = false+python-versions = "*"+[[package]]name = "stripe"version = "2.55.2"@@ -2313,7 +2341,7 @@ testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "psutil (>=5.6.1)", "pytes[[package]]name = "tqdm"-version = "4.56.1"+version = "4.56.2"description = "Fast, Extensible Progress Meter"category = "main"optional = false@@ -2539,7 +2567,7 @@ multidict = ">=4.0"[metadata]lock-version = "1.1"python-versions = "~3.9"-content-hash = "f66f51ae1352619818d81649f662231f1c3aab37c61e51421426776406c90732"+content-hash = "e92d7eb2e0201be823091bd7aee6121040d202518e91573bc8fb4b38fdb0fb63"[metadata.files]adyen = [@@ -2601,12 +2629,12 @@ black = [{file = "black-20.8b1.tar.gz", hash = "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"},]boto3 = [- {file = "boto3-1.17.5-py2.py3-none-any.whl", hash = "sha256:0d126d429a8a9ea2c8409a1ee36ce5a34e11db788d7730a714016264f10bbb89"},- {file = "boto3-1.17.5.tar.gz", hash = "sha256:d6aafb804fca2b67c65dda78ad8b4afed901e004071208b84c804d345ad9ebba"},+ {file = "boto3-1.17.7-py2.py3-none-any.whl", hash = "sha256:8ecc9c8c13355a2ae0446a227d67bf011affba4cab644240a3dc6ca23978e583"},+ {file = "boto3-1.17.7.tar.gz", hash = "sha256:56fad4485ef79bee64ad0d913c19e41b838a1cd6aefc935afefd7f393a0f0169"},]botocore = [- {file = "botocore-1.20.5-py2.py3-none-any.whl", hash = "sha256:3c55f0db5e08920727f4fa24a87aed60060643f4b0b5665c62ec762f79e82d6b"},- {file = "botocore-1.20.5.tar.gz", hash = "sha256:04a1df759681f5f171accb354d863bfed0774d64a4e8ee35ff49835755660a4e"},+ {file = "botocore-1.20.7-py2.py3-none-any.whl", hash = "sha256:77e34194eb4f916d9caaf4b518a8b5d73ddbba87bf951cdb20141a6fafc9ccbe"},+ {file = "botocore-1.20.7.tar.gz", hash = "sha256:27ea4a11f5cca9d655cb9ba462ad4a2bb28eb44d061b49e15a3239c040298ed2"},]braintree = [{file = "braintree-4.6.0-py2.py3-none-any.whl", hash = "sha256:d3aa0e29eb3923574a58e8ee3219566c918ff161c98f2de715ba29cb715169c7"},@@ -2632,40 +2660,43 @@ certifi = [{file = "certifi-2020.12.5.tar.gz", hash = "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"},]cffi = [- {file = "cffi-1.14.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ebb253464a5d0482b191274f1c8bf00e33f7e0b9c66405fbffc61ed2c839c775"},- {file = "cffi-1.14.4-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:2c24d61263f511551f740d1a065eb0212db1dbbbbd241db758f5244281590c06"},- {file = "cffi-1.14.4-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9f7a31251289b2ab6d4012f6e83e58bc3b96bd151f5b5262467f4bb6b34a7c26"},- {file = "cffi-1.14.4-cp27-cp27m-win32.whl", hash = "sha256:5cf4be6c304ad0b6602f5c4e90e2f59b47653ac1ed9c662ed379fe48a8f26b0c"},- {file = "cffi-1.14.4-cp27-cp27m-win_amd64.whl", hash = "sha256:f60567825f791c6f8a592f3c6e3bd93dd2934e3f9dac189308426bd76b00ef3b"},- {file = "cffi-1.14.4-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:c6332685306b6417a91b1ff9fae889b3ba65c2292d64bd9245c093b1b284809d"},- {file = "cffi-1.14.4-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d9efd8b7a3ef378dd61a1e77367f1924375befc2eba06168b6ebfa903a5e59ca"},- {file = "cffi-1.14.4-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:51a8b381b16ddd370178a65360ebe15fbc1c71cf6f584613a7ea08bfad946698"},- {file = "cffi-1.14.4-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:1d2c4994f515e5b485fd6d3a73d05526aa0fcf248eb135996b088d25dfa1865b"},- {file = "cffi-1.14.4-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:af5c59122a011049aad5dd87424b8e65a80e4a6477419c0c1015f73fb5ea0293"},- {file = "cffi-1.14.4-cp35-cp35m-win32.whl", hash = "sha256:594234691ac0e9b770aee9fcdb8fa02c22e43e5c619456efd0d6c2bf276f3eb2"},- {file = "cffi-1.14.4-cp35-cp35m-win_amd64.whl", hash = "sha256:64081b3f8f6f3c3de6191ec89d7dc6c86a8a43911f7ecb422c60e90c70be41c7"},- {file = "cffi-1.14.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f803eaa94c2fcda012c047e62bc7a51b0bdabda1cad7a92a522694ea2d76e49f"},- {file = "cffi-1.14.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:105abaf8a6075dc96c1fe5ae7aae073f4696f2905fde6aeada4c9d2926752362"},- {file = "cffi-1.14.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0638c3ae1a0edfb77c6765d487fee624d2b1ee1bdfeffc1f0b58c64d149e7eec"},- {file = "cffi-1.14.4-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:7c6b1dece89874d9541fc974917b631406233ea0440d0bdfbb8e03bf39a49b3b"},- {file = "cffi-1.14.4-cp36-cp36m-win32.whl", hash = "sha256:155136b51fd733fa94e1c2ea5211dcd4c8879869008fc811648f16541bf99668"},- {file = "cffi-1.14.4-cp36-cp36m-win_amd64.whl", hash = "sha256:6bc25fc545a6b3d57b5f8618e59fc13d3a3a68431e8ca5fd4c13241cd70d0009"},- {file = "cffi-1.14.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a7711edca4dcef1a75257b50a2fbfe92a65187c47dab5a0f1b9b332c5919a3fb"},- {file = "cffi-1.14.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:00e28066507bfc3fe865a31f325c8391a1ac2916219340f87dfad602c3e48e5d"},- {file = "cffi-1.14.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:798caa2a2384b1cbe8a2a139d80734c9db54f9cc155c99d7cc92441a23871c03"},- {file = "cffi-1.14.4-cp37-cp37m-win32.whl", hash = "sha256:00a1ba5e2e95684448de9b89888ccd02c98d512064b4cb987d48f4b40aa0421e"},- {file = "cffi-1.14.4-cp37-cp37m-win_amd64.whl", hash = "sha256:9cc46bc107224ff5b6d04369e7c595acb700c3613ad7bcf2e2012f62ece80c35"},- {file = "cffi-1.14.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:df5169c4396adc04f9b0a05f13c074df878b6052430e03f50e68adf3a57aa28d"},- {file = "cffi-1.14.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:9ffb888f19d54a4d4dfd4b3f29bc2c16aa4972f1c2ab9c4ab09b8ab8685b9c2b"},- {file = "cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8d6603078baf4e11edc4168a514c5ce5b3ba6e3e9c374298cb88437957960a53"},- {file = "cffi-1.14.4-cp38-cp38-win32.whl", hash = "sha256:b4e248d1087abf9f4c10f3c398896c87ce82a9856494a7155823eb45a892395d"},- {file = "cffi-1.14.4-cp38-cp38-win_amd64.whl", hash = "sha256:ec80dc47f54e6e9a78181ce05feb71a0353854cc26999db963695f950b5fb375"},- {file = "cffi-1.14.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:840793c68105fe031f34d6a086eaea153a0cd5c491cde82a74b420edd0a2b909"},- {file = "cffi-1.14.4-cp39-cp39-manylinux1_i686.whl", hash = "sha256:b18e0a9ef57d2b41f5c68beefa32317d286c3d6ac0484efd10d6e07491bb95dd"},- {file = "cffi-1.14.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:045d792900a75e8b1e1b0ab6787dd733a8190ffcf80e8c8ceb2fb10a29ff238a"},- {file = "cffi-1.14.4-cp39-cp39-win32.whl", hash = "sha256:ba4e9e0ae13fc41c6b23299545e5ef73055213e466bd107953e4a013a5ddd7e3"},- {file = "cffi-1.14.4-cp39-cp39-win_amd64.whl", hash = "sha256:f032b34669220030f905152045dfa27741ce1a6db3324a5bc0b96b6c7420c87b"},- {file = "cffi-1.14.4.tar.gz", hash = "sha256:1a465cbe98a7fd391d47dce4b8f7e5b921e6cd805ef421d04f5f66ba8f06086c"},+ {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"},+ {file = "cffi-1.14.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1"},+ {file = "cffi-1.14.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99cd03ae7988a93dd00bcd9d0b75e1f6c426063d6f03d2f90b89e29b25b82dfa"},+ {file = "cffi-1.14.5-cp27-cp27m-win32.whl", hash = "sha256:65fa59693c62cf06e45ddbb822165394a288edce9e276647f0046e1ec26920f3"},+ {file = "cffi-1.14.5-cp27-cp27m-win_amd64.whl", hash = "sha256:51182f8927c5af975fece87b1b369f722c570fe169f9880764b1ee3bca8347b5"},+ {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:43e0b9d9e2c9e5d152946b9c5fe062c151614b262fda2e7b201204de0b99e482"},+ {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cbde590d4faaa07c72bf979734738f328d239913ba3e043b1e98fe9a39f8b2b6"},+ {file = "cffi-1.14.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:5de7970188bb46b7bf9858eb6890aad302577a5f6f75091fd7cdd3ef13ef3045"},+ {file = "cffi-1.14.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:a465da611f6fa124963b91bf432d960a555563efe4ed1cc403ba5077b15370aa"},+ {file = "cffi-1.14.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:d42b11d692e11b6634f7613ad8df5d6d5f8875f5d48939520d351007b3c13406"},+ {file = "cffi-1.14.5-cp35-cp35m-win32.whl", hash = "sha256:72d8d3ef52c208ee1c7b2e341f7d71c6fd3157138abf1a95166e6165dd5d4369"},+ {file = "cffi-1.14.5-cp35-cp35m-win_amd64.whl", hash = "sha256:29314480e958fd8aab22e4a58b355b629c59bf5f2ac2492b61e3dc06d8c7a315"},+ {file = "cffi-1.14.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:3d3dd4c9e559eb172ecf00a2a7517e97d1e96de2a5e610bd9b68cea3925b4892"},+ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"},+ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"},+ {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"},+ {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"},+ {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"},+ {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"},+ {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"},+ {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"},+ {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"},+ {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"},+ {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"},+ {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"},+ {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"},+ {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"},+ {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"},+ {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"},+ {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"},+ {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"},+ {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"},+ {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"},+ {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"},+ {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"},+ {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"},+ {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"},]cfgv = [{file = "cfgv-3.2.0-py2.py3-none-any.whl", hash = "sha256:32e43d604bbe7896fe7c248a9c2276447dbef840feb28fe20494f62af110211d"},@@ -2779,8 +2810,8 @@ django-appconf = [{file = "django_appconf-1.0.4-py2.py3-none-any.whl", hash = "sha256:1b1d0e1069c843ebe8ae5aa48ec52403b1440402b320c3e3a206a0907e97bb06"},]django-cache-url = [- {file = "django-cache-url-3.2.2.tar.gz", hash = "sha256:419b1667fe654a1b032073371b67d3fcfbe2a6392337c0e5e6c4ec741a6342a5"},- {file = "django_cache_url-3.2.2-py2.py3-none-any.whl", hash = "sha256:f75a2e234c6541c5507cdb7c6c1b9f072643be4f3cadbb363dc34487fd6257a6"},+ {file = "django-cache-url-3.2.3.tar.gz", hash = "sha256:c1d45626ae8a206267c1263aa7a3461e2e186be2e939bcbd8c660e25851ddac8"},+ {file = "django_cache_url-3.2.3-py2.py3-none-any.whl", hash = "sha256:5514ca3a2075c6b956b3d0a5c540654d32b004e76340d7bdabf6661135b5f218"},]django-countries = [{file = "django-countries-6.1.3.tar.gz", hash = "sha256:64015977a5989bcb0e645007299b19fe8ac117466af375161b26bcfa32ae2808"},@@ -2899,8 +2930,8 @@ google-api-core = [{file = "google_api_core-1.26.0-py2.py3-none-any.whl", hash = "sha256:002e44c533299aecd9dd265d200f9eacd9957cddd2c72e2cd1cb5cea127e972d"},]google-auth = [- {file = "google-auth-1.25.0.tar.gz", hash = "sha256:514e39f4190ca972200ba33876da5a8857c5665f2b4ccc36c8b8ee21228aae80"},- {file = "google_auth-1.25.0-py2.py3-none-any.whl", hash = "sha256:008e23ed080674f69f9d2d7d80db4c2591b9bb307d136cea7b3bc129771d211d"},+ {file = "google-auth-1.26.1.tar.gz", hash = "sha256:1b461d079b5650efe492a7814e95c536ffa9e7a96e39a6d16189c1604f18554f"},+ {file = "google_auth-1.26.1-py2.py3-none-any.whl", hash = "sha256:8ce6862cf4e9252de10045f05fa80393fde831da9c2b45c39288edeee3cde7f2"},]google-cloud-core = [{file = "google-cloud-core-1.6.0.tar.gz", hash = "sha256:c6abb18527545379fc82efc4de75ce9a3772ccad2fc645adace593ba097cbb02"},@@ -2911,8 +2942,8 @@ google-cloud-pubsub = [{file = "google_cloud_pubsub-2.3.0-py2.py3-none-any.whl", hash = "sha256:77837aa37099e8bfefd836eaa5b8a042edbcd166677515b34bbe112e558d1932"},]google-cloud-storage = [- {file = "google-cloud-storage-1.35.1.tar.gz", hash = "sha256:dc076b6af6da991252416639cb93831f8e50c8328d5ac3fb8e03e40cd8de2290"},- {file = "google_cloud_storage-1.35.1-py2.py3-none-any.whl", hash = "sha256:69fa8feda06768c44dd635c2cd8d59267362a0c8323afc65cf24efc4d88a0fcc"},+ {file = "google-cloud-storage-1.36.0.tar.gz", hash = "sha256:9517e26cadb4e52fcd11e83cd1b4051e72351a2e518078102ad2f1b9f4d704bc"},+ {file = "google_cloud_storage-1.36.0-py2.py3-none-any.whl", hash = "sha256:0880af3c8706a52785ee2c6dc6856e33aa8bf951083b145a889137344a7201ad"},]google-crc32c = [{file = "google-crc32c-1.1.2.tar.gz", hash = "sha256:dff5bd1236737f66950999d25de7a78144548ebac7788d30ada8c1b6ead60b27"},@@ -3361,8 +3392,8 @@ promise = [{file = "promise-2.3.tar.gz", hash = "sha256:dfd18337c523ba4b6a58801c164c1904a9d4d1b1747c7d5dbf45b693a49d93d0"},]prompt-toolkit = [- {file = "prompt_toolkit-3.0.14-py3-none-any.whl", hash = "sha256:c96b30925025a7635471dc083ffb6af0cc67482a00611bd81aeaeeeb7e5a5e12"},- {file = "prompt_toolkit-3.0.14.tar.gz", hash = "sha256:7e966747c18ececaec785699626b771c1ba8344c8d31759a1915d6b12fad6525"},+ {file = "prompt_toolkit-3.0.16-py3-none-any.whl", hash = "sha256:62c811e46bd09130fb11ab759012a4ae385ce4fb2073442d1898867a824183bd"},+ {file = "prompt_toolkit-3.0.16.tar.gz", hash = "sha256:0fa02fa80363844a4ab4b8d6891f62dd0645ba672723130423ca4037b80c1974"},]proto-plus = [{file = "proto-plus-1.13.0.tar.gz", hash = "sha256:61b57c5257ca583af2ea1ad40e2b8f251988806eea9f01d119088976b995b2c4"},@@ -3554,6 +3585,9 @@ python-dotenv = [{file = "python-dotenv-0.15.0.tar.gz", hash = "sha256:587825ed60b1711daea4832cf37524dfd404325b7db5e25ebe88c495c9f807a0"},{file = "python_dotenv-0.15.0-py2.py3-none-any.whl", hash = "sha256:0c8d1b80d1a1e91717ea7d526178e3882732420b03f08afea0406db6402e220e"},]+python-http-client = [+ {file = "python_http_client-3.3.2.tar.gz", hash = "sha256:67e6a7bea19b03e14dc971480d3531b80becfc203d6c69478561bf7844d52661"},+]python-json-logger = [{file = "python-json-logger-2.0.1.tar.gz", hash = "sha256:f26eea7898db40609563bed0a7ca11af12e2a79858632706d835a0f961b7d398"},]@@ -3673,9 +3707,12 @@ s3transfer = [{file = "s3transfer-0.3.4-py2.py3-none-any.whl", hash = "sha256:1e28620e5b444652ed752cf87c7e0cb15b0e578972568c6609f0f18212f259ed"},{file = "s3transfer-0.3.4.tar.gz", hash = "sha256:7fdddb4f22275cf1d32129e21f056337fd2a80b6ccef1664528145b72c49e6d2"},]+sendgrid = [+ {file = "sendgrid-6.6.0-py3-none-any.whl", hash = "sha256:e422c8263563ac7d664066d2f87b90bcb005b067eb7c33a9b1396442b2ed285b"},+ {file = "sendgrid-6.6.0.tar.gz", hash = "sha256:2eb1dcb1f7d8656eed4db586e428c2c86f347590b8511d7f92993882d0e4fab9"},+]sentry-sdk = [- {file = "sentry-sdk-0.19.5.tar.gz", hash = "sha256:737a094e49a529dd0fdcaafa9e97cf7c3d5eb964bd229821d640bc77f3502b3f"},- {file = "sentry_sdk-0.19.5-py2.py3-none-any.whl", hash = "sha256:0a711ec952441c2ec89b8f5d226c33bc697914f46e876b44a4edd3e7864cf4d0"},+ {file = "sentry-sdk-0.20.1.tar.gz", hash = "sha256:3693cb47ba8d90c004ac002425770b32aaf0c83a846ec48e2d1364e7db1d072d"},]singledispatch = [{file = "singledispatch-3.4.0.3-py2.py3-none-any.whl", hash = "sha256:833b46966687b3de7f438c761ac475213e53b306740f1abfaa86e1d1aae56aa8"},@@ -3701,6 +3738,9 @@ sqlparse = [{file = "sqlparse-0.4.1-py3-none-any.whl", hash = "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0"},{file = "sqlparse-0.4.1.tar.gz", hash = "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8"},]+starkbank-ecdsa = [+ {file = "starkbank-ecdsa-1.1.0.tar.gz", hash = "sha256:423f81bb55c896a3c85ee98ac7da98826721eaee918f5c0c1dfff99e1972da0c"},+]stripe = [{file = "stripe-2.55.2-py2.py3-none-any.whl", hash = "sha256:97431dbc6d25b94816816a3606f75045d79f101db4cf27e79ac4e039e4971d73"},{file = "stripe-2.55.2.tar.gz", hash = "sha256:e32c68194a47522a10945eb893218e5cb5ee65e3a3c2c4df7efca117a6bf1902"},@@ -3776,8 +3816,8 @@ tox = [{file = "tox-3.21.4.tar.gz", hash = "sha256:cf7fef81a3a2434df4d7af2a6d1bf606d2970220addfbe7dea2615bd4bb2c252"},]tqdm = [- {file = "tqdm-4.56.1-py2.py3-none-any.whl", hash = "sha256:ab9b659241d82b8b51b2269ee243ec95286046bf06015c4e15a947cc15914211"},- {file = "tqdm-4.56.1.tar.gz", hash = "sha256:2874fa525c051177583ec59c0fb4583e91f28ccd3f217ffad2acdb32d2c789ac"},+ {file = "tqdm-4.56.2-py2.py3-none-any.whl", hash = "sha256:a89be573bfddb81bb0b395a416d5e55e3ecc73ce95a368a4f6360bedea33195e"},+ {file = "tqdm-4.56.2.tar.gz", hash = "sha256:11d544652edbdfc9cc41aa4c8a5c166513e279f3f2d9f1a9e1c89935b51de6ff"},]transifex-client = [{file = "transifex-client-0.14.2.tar.gz", hash = "sha256:b458c56d6d07d2d8269b43d5049026304ed9a34d31bdf655d9e1864807e7555b"},diff --git a/pyproject.toml b/pyproject.tomlindex 48bd2ba252..f7da98420f 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -71,6 +71,7 @@ gunicorn = "^20.0.4"pybars3 = "^0.9.7"html2text = "^2020.1.16"authorizenet = "^1.1.3"+sendgrid = "^6.5.0"[tool.poetry.dev-dependencies]black = "20.8b1"diff --git a/saleor/plugins/sengrid/__init__.py b/saleor/plugins/sengrid/__init__.pynew file mode 100644index 0000000000..493e72bbf2--- /dev/null+++ b/saleor/plugins/sengrid/__init__.py@@ -0,0 +1,21 @@+from dataclasses import dataclass+from typing import Optional+++@dataclass+class SengridConfiguration:+ api_key: Optional[str]+ account_confirmation_template_id: Optional[str]+ account_set_customer_password_template_id: Optional[str]+ account_delete_template_id: Optional[str]+ account_change_email_confirm_template_id: Optional[str]+ account_change_email_request_template_id: Optional[str]+ account_password_reset_template_id: Optional[str]+ invoice_ready_template_id: Optional[str]+ order_confirmation_template_id: Optional[str]+ order_confirmed_template_id: Optional[str]+ order_fulfillment_confirmation_template_id: Optional[str]+ order_fulfillment_update_template_id: Optional[str]+ order_payment_confirmation_template_id: Optional[str]+ order_canceled_template_id: Optional[str]+ order_refund_confirmation_template_id: Optional[str]diff --git a/saleor/plugins/sengrid/plugin.py b/saleor/plugins/sengrid/plugin.pynew file mode 100644index 0000000000..fc309e2863--- /dev/null+++ b/saleor/plugins/sengrid/plugin.py@@ -0,0 +1,129 @@+from ...core.notify_events import NotifyEventType+from ..base_plugin import BasePlugin, ConfigurationTypeField+from . import SengridConfiguration+++class SengridEmailPlugin(BasePlugin):+ PLUGIN_ID = "mirumee.notifications.sengrid_email"+ PLUGIN_NAME = "Sengrid"+ DEFAULT_ACTIVE = False++ DEFAULT_CONFIGURATION = [+ {"name": "account_confirmation_template_id", "value": None},+ {"name": "account_set_customer_password_template_id", "value": None},+ {"name": "account_delete_template_id", "value": None},+ {"name": "account_change_email_confirm_template_id", "value": None},+ {"name": "account_change_email_request_template_id", "value": None},+ {"name": "account_password_reset_template_id", "value": None},+ {"name": "invoice_ready_template_id", "value": None},+ {"name": "order_confirmation_template_id", "value": None},+ {"name": "order_confirmed_template_id", "value": None},+ {"name": "order_fulfillment_confirmation_template_id", "value": None},+ {"name": "order_fulfillment_update_template_id", "value": None},+ {"name": "order_payment_confirmation_template_id", "value": None},+ {"name": "order_canceled_template_id", "value": None},+ {"name": "order_refund_confirmation_template_id", "value": None},+ {"name": "api_key", "value": None},+ ]+ CONFIG_STRUCTURE = {+ "account_confirmation_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for account confirmation.",+ "label": "Template ID for account confirmation",+ },+ "account_set_customer_password_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for account set customer password.",+ "label": "Template ID for account set customer password",+ },+ "account_delete_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for account delete.",+ "label": "Template ID for account delete",+ },+ "account_change_email_confirm_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": (+ "The dynamic template ID for account change email confirmation."+ ),+ "label": "Template ID for account change email confirm",+ },+ "account_change_email_request_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for account change email request.",+ "label": "Template ID for account change email request",+ },+ "account_password_reset_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for account password reset.",+ "label": "Template ID for account password reset",+ },+ "invoice_ready_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for invoice ready.",+ "label": "Template ID for invoice ready",+ },+ "order_confirmation_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for order confirmation.",+ "label": "Template ID for order confirmation",+ },+ "order_confirmed_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for order confirmed.",+ "label": "Template ID for order confirmed",+ },+ "order_fulfillment_confirmation_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for order fulfillment confirmation.",+ "label": "Template ID for order fulfillment confirmation",+ },+ "order_fulfillment_update_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for order fulfillment update",+ "label": "Template ID for order fulfillment update",+ },+ "order_payment_confirmation_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for order payment confirmation.",+ "label": "Template ID for order payment confirmation",+ },+ "order_canceled_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for order canceled",+ "label": "Template ID for order canceled",+ },+ "order_refund_confirmation_template_id": {+ "type": ConfigurationTypeField.STRING,+ "help_text": "The dynamic template ID for order refund confirmation",+ "label": "Template ID for order refund confirmation",+ },+ "api_key": {+ "type": ConfigurationTypeField.SECRET,+ "help_text": (+ "This allows your application to authenticate to our API and send mail."+ ),+ "label": "API key",+ },+ }++ def __init__(self, *args, **kwargs):+ super().__init__(*args, **kwargs)+ # Convert to dict to easier take config elements+ configuration = {item["name"]: item["value"] for item in self.configuration}+ self.config = SengridConfiguration(**configuration)++ def notify(self, event: NotifyEventType, payload: dict, previous_value):+ if not self.active:+ return previous_value++ # event_map = get_admin_event_map()+ # if event not in AdminNotifyEvent.CHOICES:+ # return previous_value+ # if event not in event_map:+ # logger.warning(f"Missing handler for event {event}")+ # return previous_value+ # template_map = get_admin_template_map(self.templates)+ # if not template_map.get(event):+ # return previous_value+ # event_map[event](payload, asdict(self.config)) # type: ignorediff --git a/saleor/plugins/sengrid/tasks.py b/saleor/plugins/sengrid/tasks.pynew file mode 100644index 0000000000..adb2386f9d--- /dev/null+++ b/saleor/plugins/sengrid/tasks.py@@ -0,0 +1,10 @@+from sendgrid import SendGridAPIClient+from sendgrid.helpers.mail import Mail++from ...celeryconf import app+from . import SengridConfiguration+++def send_email_task(configuration: SengridConfiguration, email_event, payload):+ sengrid_client = SendGridAPIClient(configuration.api_key)