Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions src/dispatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
from dispatch.forms.type.models import FormsType # noqa lgtm[py/unused-import]
from dispatch.forms.models import Forms # noqa lgtm[py/unused-import]
from dispatch.email_templates.models import EmailTemplates # noqa lgtm[py/unused-import]
from dispatch.canvas.models import Canvas # noqa lgtm[py/unused-import]


except Exception:
Expand Down
39 changes: 39 additions & 0 deletions src/dispatch/canvas/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""Canvas management module for Dispatch."""

from .enums import CanvasType
from .models import Canvas, CanvasBase, CanvasCreate, CanvasRead, CanvasUpdate
from .service import (
create,
delete,
delete_by_slack_canvas_id,
get,
get_by_canvas_id,
get_by_case,
get_by_incident,
get_by_project,
get_by_type,
get_or_create_by_case,
get_or_create_by_incident,
update,
)

__all__ = [
"Canvas",
"CanvasBase",
"CanvasCreate",
"CanvasRead",
"CanvasType",
"CanvasUpdate",
"create",
"delete",
"delete_by_slack_canvas_id",
"get",
"get_by_canvas_id",
"get_by_case",
"get_by_incident",
"get_by_project",
"get_by_type",
"get_or_create_by_case",
"get_or_create_by_incident",
"update",
]
10 changes: 10 additions & 0 deletions src/dispatch/canvas/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from dispatch.enums import DispatchEnum


class CanvasType(DispatchEnum):
"""Types of canvases that can be created."""

summary = "summary"
tactical_reports = "tactical_reports"
participants = "participants"
tasks = "tasks"
Loading
Loading