Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from benchling_sdk.apps.status.errors import AppUserFacingError
from benchling_sdk.models.webhooks.v0 import (
CanvasCreatedWebhookV2Beta,
CanvasCreatedWebhookV2,
CanvasInitializeWebhookV2,
CanvasInteractionWebhookV2,
WebhookEnvelopeV0,
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
TextInputUiBlockType,
)
from benchling_sdk.models.webhooks.v0 import (
CanvasCreatedWebhookV2Beta,
CanvasCreatedWebhookV2,
CanvasInitializeWebhookV2,
)

Expand All @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion 2 examples/chem-sync-local-flask/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 2 examples/chem-sync-local-flask/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
flask~=3.0.2
# Cryptography extra needed for webhook verification
benchling-sdk[cryptography]==1.21.1
benchling-sdk[cryptography]==1.22.0
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.