Skip to content

Commit 21997ee

Browse files
authored
feat: support members_template property for campaigns (#209)
1 parent 0c96e70 commit 21997ee

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

stream_chat/types/campaign.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ class MessageTemplate(TypedDict, total=False):
2424
custom: Optional[Dict]
2525

2626

27+
class MemberTemplate(TypedDict, total=False):
28+
"""
29+
Represents the data structure for a member in the members_template.
30+
31+
Parameters:
32+
user_id: The ID of the user.
33+
channel_role: The role of the user in the channel.
34+
custom: Custom data for the member.
35+
"""
36+
37+
user_id: str
38+
channel_role: Optional[str]
39+
custom: Optional[Dict]
40+
41+
2742
class ChannelTemplate(TypedDict, total=False):
2843
"""
2944
Represents the data structure for a channel template.
@@ -32,12 +47,14 @@ class ChannelTemplate(TypedDict, total=False):
3247
type: The type of channel.
3348
id: The ID of the channel.
3449
members: List of member IDs.
50+
members_template: List of member templates with roles and custom data.
3551
custom: Custom data.
3652
"""
3753

3854
type: str
3955
id: Optional[str]
4056
members: Optional[List[str]]
57+
members_template: Optional[List[MemberTemplate]]
4158
custom: Optional[Dict]
4259

4360

0 commit comments

Comments
 (0)