canvas 0.27.0__py3-none-any.whl → 0.29.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of canvas might be problematic. Click here for more details.
- {canvas-0.27.0.dist-info → canvas-0.29.0.dist-info}/METADATA +1 -1
- {canvas-0.27.0.dist-info → canvas-0.29.0.dist-info}/RECORD +31 -28
- canvas_cli/apps/auth/tests.py +3 -0
- canvas_cli/apps/emit/event_fixtures/SIMPLE_API_REQUEST.ndjson +1 -0
- canvas_cli/templates/plugins/application/{{ cookiecutter.__project_slug }}/CANVAS_MANIFEST.json +6 -4
- canvas_cli/utils/validators/manifest_schema.py +3 -0
- canvas_generated/messages/effects_pb2.py +2 -2
- canvas_generated/messages/effects_pb2.pyi +4 -0
- canvas_generated/messages/events_pb2.py +2 -2
- canvas_generated/messages/events_pb2.pyi +4 -0
- canvas_sdk/commands/commands/perform.py +1 -1
- canvas_sdk/effects/patient_portal/application_configuration.py +22 -0
- canvas_sdk/effects/show_button.py +2 -1
- canvas_sdk/effects/simple_api.py +2 -2
- canvas_sdk/handlers/action_button.py +6 -1
- canvas_sdk/handlers/simple_api/api.py +37 -20
- canvas_sdk/tests/handlers/test_simple_api.py +122 -2
- canvas_sdk/utils/http.py +98 -10
- canvas_sdk/utils/tests.py +6 -1
- canvas_sdk/v1/data/__init__.py +2 -0
- canvas_sdk/v1/data/banner_alert.py +27 -0
- canvas_sdk/v1/data/lab.py +2 -2
- canvas_sdk/v1/data/staff.py +3 -4
- plugin_runner/authentication.py +2 -1
- plugin_runner/plugin_runner.py +6 -3
- plugin_runner/sandbox.py +2 -2
- protobufs/canvas_generated/messages/effects.proto +2 -0
- protobufs/canvas_generated/messages/events.proto +2 -0
- settings.py +2 -0
- {canvas-0.27.0.dist-info → canvas-0.29.0.dist-info}/WHEEL +0 -0
- {canvas-0.27.0.dist-info → canvas-0.29.0.dist-info}/entry_points.txt +0 -0
plugin_runner/plugin_runner.py
CHANGED
|
@@ -153,8 +153,8 @@ class PluginRunner(PluginRunnerServicer):
|
|
|
153
153
|
# filter only for the plugin(s) that were created/updated
|
|
154
154
|
relevant_plugins = [p for p in relevant_plugins if p.startswith(f"{plugin_name}:")]
|
|
155
155
|
elif event_type in {EventType.SIMPLE_API_AUTHENTICATE, EventType.SIMPLE_API_REQUEST}:
|
|
156
|
-
# The target plugin's name will be part of the URL path, so other plugins that
|
|
157
|
-
# to SimpleAPI request events are not relevant
|
|
156
|
+
# The target plugin's name will be part of the home-app URL path, so other plugins that
|
|
157
|
+
# respond to SimpleAPI request events are not relevant
|
|
158
158
|
plugin_name = event.context["plugin_name"]
|
|
159
159
|
relevant_plugins = [p for p in relevant_plugins if p.startswith(f"{plugin_name}:")]
|
|
160
160
|
|
|
@@ -168,7 +168,10 @@ class PluginRunner(PluginRunnerServicer):
|
|
|
168
168
|
base_plugin_name = plugin_name.split(":")[0]
|
|
169
169
|
|
|
170
170
|
secrets = plugin.get("secrets", {})
|
|
171
|
-
|
|
171
|
+
|
|
172
|
+
secrets.update(
|
|
173
|
+
{"graphql_jwt": token_for_plugin(plugin_name=plugin_name, audience="home")}
|
|
174
|
+
)
|
|
172
175
|
|
|
173
176
|
try:
|
|
174
177
|
handler = handler_class(event, secrets)
|
plugin_runner/sandbox.py
CHANGED
|
@@ -254,7 +254,7 @@ class Sandbox:
|
|
|
254
254
|
|
|
255
255
|
def __init__(
|
|
256
256
|
self,
|
|
257
|
-
source_code: str | Path,
|
|
257
|
+
source_code: str | Path | None,
|
|
258
258
|
namespace: str | None = None,
|
|
259
259
|
evaluated_modules: dict[str, bool] | None = None,
|
|
260
260
|
) -> None:
|
|
@@ -393,7 +393,7 @@ class Sandbox:
|
|
|
393
393
|
self._evaluate_implicit_imports(parent)
|
|
394
394
|
|
|
395
395
|
def _safe_import(self, name: str, *args: Any, **kwargs: Any) -> Any:
|
|
396
|
-
if not
|
|
396
|
+
if not self._is_known_module(name):
|
|
397
397
|
raise ImportError(f"{name!r} is not an allowed import.")
|
|
398
398
|
|
|
399
399
|
self._evaluate_module(name)
|
|
@@ -232,6 +232,7 @@ enum EffectType {
|
|
|
232
232
|
PATIENT_PORTAL__FORM_RESULT = 2000;
|
|
233
233
|
PATIENT_PORTAL__APPOINTMENT_IS_CANCELABLE = 2001;
|
|
234
234
|
PATIENT_PORTAL__APPOINTMENT_IS_RESCHEDULABLE = 2002;
|
|
235
|
+
PATIENT_PORTAL__APPOINTMENT_SHOW_MEETING_LINK = 2003;
|
|
235
236
|
|
|
236
237
|
PATIENT_PORTAL__APPOINTMENTS__SLOTS__POST_SEARCH_RESULTS = 2005;
|
|
237
238
|
PATIENT_PORTAL__APPOINTMENTS__FORM_APPOINTMENT_TYPES__PRE_SEARCH_RESULTS = 2006;
|
|
@@ -240,6 +241,7 @@ enum EffectType {
|
|
|
240
241
|
PATIENT_PORTAL__APPOINTMENTS__FORM_LOCATIONS__POST_SEARCH_RESULTS = 2009;
|
|
241
242
|
PATIENT_PORTAL__APPOINTMENTS__FORM_PROVIDERS__PRE_SEARCH_RESULTS = 2010;
|
|
242
243
|
PATIENT_PORTAL__APPOINTMENTS__FORM_PROVIDERS__POST_SEARCH_RESULTS = 2011;
|
|
244
|
+
PATIENT_PORTAL__APPLICATION_CONFIGURATION = 2012;
|
|
243
245
|
|
|
244
246
|
ADD_BILLING_LINE_ITEM = 2030;
|
|
245
247
|
UPDATE_BILLING_LINE_ITEM = 2031;
|
|
@@ -1050,6 +1050,8 @@ enum EventType {
|
|
|
1050
1050
|
PATIENT_PORTAL__APPOINTMENTS__FORM_LOCATIONS__POST_SEARCH = 110009;
|
|
1051
1051
|
PATIENT_PORTAL__APPOINTMENTS__FORM_PROVIDERS__PRE_SEARCH = 110010;
|
|
1052
1052
|
PATIENT_PORTAL__APPOINTMENTS__FORM_PROVIDERS__POST_SEARCH = 110011;
|
|
1053
|
+
PATIENT_PORTAL__APPOINTMENT_CAN_SHOW_MEETING_LINK = 110012;
|
|
1054
|
+
PATIENT_PORTAL__GET_APPLICATION_CONFIGURATION = 110013;
|
|
1053
1055
|
|
|
1054
1056
|
PATIENT_PORTAL__MENU_CONFIGURATION = 110100;
|
|
1055
1057
|
PATIENT_PORTAL__WIDGET_CONFIGURATION = 110101;
|
settings.py
CHANGED
|
@@ -68,7 +68,9 @@ AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY", "")
|
|
|
68
68
|
AWS_REGION = os.getenv("AWS_REGION", "us-west-2")
|
|
69
69
|
MEDIA_S3_BUCKET_NAME = os.getenv("MEDIA_S3_BUCKET_NAME", "canvas-client-media")
|
|
70
70
|
|
|
71
|
+
# ONTOLOGIES_SIGNING_KEY = os.getenv("ONTOLOGIES_SIGNING_KEY", "")
|
|
71
72
|
PLUGIN_RUNNER_SIGNING_KEY = os.getenv("PLUGIN_RUNNER_SIGNING_KEY", "")
|
|
73
|
+
# SCIENCE_SIGNING_KEY = os.getenv("SCIENCE_SIGNING_KEY", "")
|
|
72
74
|
|
|
73
75
|
PLUGIN_DIRECTORY = os.getenv(
|
|
74
76
|
"PLUGIN_DIRECTORY",
|
|
File without changes
|
|
File without changes
|