diff --git a/examples/chem-sync-local-flask/local_app/benchling_app/handler.py b/examples/chem-sync-local-flask/local_app/benchling_app/handler.py index a75e3c1..72966b0 100644 --- a/examples/chem-sync-local-flask/local_app/benchling_app/handler.py +++ b/examples/chem-sync-local-flask/local_app/benchling_app/handler.py @@ -2,7 +2,7 @@ from benchling_sdk.apps.status.errors import AppUserFacingError from benchling_sdk.models.webhooks.v0 import ( - CanvasCreatedWebhookV2Beta, + CanvasCreatedWebhookV2, CanvasInitializeWebhookV2, CanvasInteractionWebhookV2, WebhookEnvelopeV0, @@ -35,7 +35,7 @@ def handle_webhook(webhook_dict: dict[str, Any]) -> None: render_search_canvas(app, webhook.message) elif isinstance(webhook.message, CanvasInteractionWebhookV2): route_interaction_webhook(app, webhook.message) - elif isinstance(webhook.message, CanvasCreatedWebhookV2Beta): + elif isinstance(webhook.message, CanvasCreatedWebhookV2): render_search_canvas_for_created_canvas(app, webhook.message) else: # Should only happen if the app's manifest requests webhooks that aren't handled in its code paths diff --git a/examples/chem-sync-local-flask/local_app/benchling_app/views/canvas_initialize.py b/examples/chem-sync-local-flask/local_app/benchling_app/views/canvas_initialize.py index 78342f8..a64855c 100644 --- a/examples/chem-sync-local-flask/local_app/benchling_app/views/canvas_initialize.py +++ b/examples/chem-sync-local-flask/local_app/benchling_app/views/canvas_initialize.py @@ -10,7 +10,7 @@ TextInputUiBlockType, ) from benchling_sdk.models.webhooks.v0 import ( - CanvasCreatedWebhookV2Beta, + CanvasCreatedWebhookV2, CanvasInitializeWebhookV2, ) @@ -28,7 +28,7 @@ def render_search_canvas(app: App, canvas_initialized: CanvasInitializeWebhookV2 app.benchling.apps.create_canvas(canvas_builder.to_create()) -def render_search_canvas_for_created_canvas(app: App, canvas_created: CanvasCreatedWebhookV2Beta) -> None: +def render_search_canvas_for_created_canvas(app: App, canvas_created: CanvasCreatedWebhookV2) -> None: with app.create_session_context("Show Sync Search", timeout_seconds=20): canvas_builder = CanvasBuilder(app_id=app.id, feature_id=canvas_created.feature_id) canvas_builder.blocks.append(input_blocks()) diff --git a/examples/chem-sync-local-flask/manifest.yaml b/examples/chem-sync-local-flask/manifest.yaml index f7953e3..a1f0f6a 100644 --- a/examples/chem-sync-local-flask/manifest.yaml +++ b/examples/chem-sync-local-flask/manifest.yaml @@ -15,7 +15,7 @@ subscriptions: messages: - type: v2.canvas.initialized - type: v2.canvas.userInteracted - - type: v2-beta.canvas.created + - type: v2.canvas.created configuration: - name: Sync Folder type: folder diff --git a/examples/chem-sync-local-flask/requirements.txt b/examples/chem-sync-local-flask/requirements.txt index f3a9270..c0e2d90 100644 --- a/examples/chem-sync-local-flask/requirements.txt +++ b/examples/chem-sync-local-flask/requirements.txt @@ -1,3 +1,3 @@ flask~=3.0.2 # Cryptography extra needed for webhook verification -benchling-sdk[cryptography]==1.21.1 \ No newline at end of file +benchling-sdk[cryptography]==1.22.0 \ No newline at end of file