Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit dd2837e

Browse files
authored
feat(slack): adds canvas support for Slack channels (#6205)
1 parent 2a90ae1 commit dd2837e

File tree

14 files changed

+1205
-47
lines changed

14 files changed

+1205
-47
lines changed

src/dispatch/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
from dispatch.forms.type.models import FormsType # noqa lgtm[py/unused-import]
8080
from dispatch.forms.models import Forms # noqa lgtm[py/unused-import]
8181
from dispatch.email_templates.models import EmailTemplates # noqa lgtm[py/unused-import]
82+
from dispatch.canvas.models import Canvas # noqa lgtm[py/unused-import]
8283

8384

8485
except Exception:

src/dispatch/canvas/__init__.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""Canvas management module for Dispatch."""
2+
3+
from .enums import CanvasType
4+
from .models import Canvas, CanvasBase, CanvasCreate, CanvasRead, CanvasUpdate
5+
from .service import (
6+
create,
7+
delete,
8+
delete_by_slack_canvas_id,
9+
get,
10+
get_by_canvas_id,
11+
get_by_case,
12+
get_by_incident,
13+
get_by_project,
14+
get_by_type,
15+
get_or_create_by_case,
16+
get_or_create_by_incident,
17+
update,
18+
)
19+
20+
__all__ = [
21+
"Canvas",
22+
"CanvasBase",
23+
"CanvasCreate",
24+
"CanvasRead",
25+
"CanvasType",
26+
"CanvasUpdate",
27+
"create",
28+
"delete",
29+
"delete_by_slack_canvas_id",
30+
"get",
31+
"get_by_canvas_id",
32+
"get_by_case",
33+
"get_by_incident",
34+
"get_by_project",
35+
"get_by_type",
36+
"get_or_create_by_case",
37+
"get_or_create_by_incident",
38+
"update",
39+
]

src/dispatch/canvas/enums.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from dispatch.enums import DispatchEnum
2+
3+
4+
class CanvasType(DispatchEnum):
5+
"""Types of canvases that can be created."""
6+
7+
summary = "summary"
8+
tactical_reports = "tactical_reports"
9+
participants = "participants"
10+
tasks = "tasks"

0 commit comments

Comments
 (0)