33from __future__ import annotations
44
55from typing import Dict , Union , Iterable , Optional
6- from typing_extensions import Literal , Annotated , TypeAlias , TypedDict
6+ from typing_extensions import Literal , Required , Annotated , TypeAlias , TypedDict
77
88from .._utils import PropertyInfo
99from .shared_params .condition import Condition
1313 "ObjectSetPreferencesParams" ,
1414 "Categories" ,
1515 "CategoriesPreferenceSetWorkflowCategorySettingObject" ,
16+ "CategoriesPreferenceSetWorkflowCategorySettingObjectChannels" ,
17+ "CategoriesPreferenceSetWorkflowCategorySettingObjectChannelsPreferenceSetChannelSetting" ,
18+ "Channels" ,
19+ "ChannelsPreferenceSetChannelSetting" ,
1620 "Workflows" ,
1721 "WorkflowsPreferenceSetWorkflowCategorySettingObject" ,
22+ "WorkflowsPreferenceSetWorkflowCategorySettingObjectChannels" ,
23+ "WorkflowsPreferenceSetWorkflowCategorySettingObjectChannelsPreferenceSetChannelSetting" ,
1824]
1925
2026
@@ -35,6 +41,9 @@ class ObjectSetPreferencesParams(TypedDict, total=False):
3541 channel_types : Optional [PreferenceSetChannelTypesParam ]
3642 """Channel type preferences."""
3743
44+ channels : Optional [Dict [str , Channels ]]
45+ """Channel preferences."""
46+
3847 commercial_subscribed : Optional [bool ]
3948 """Whether the recipient is subscribed to commercial communications.
4049
@@ -48,21 +57,55 @@ class ObjectSetPreferencesParams(TypedDict, total=False):
4857 """
4958
5059
60+ class CategoriesPreferenceSetWorkflowCategorySettingObjectChannelsPreferenceSetChannelSetting (TypedDict , total = False ):
61+ conditions : Required [Iterable [Condition ]]
62+ """A list of conditions to apply to a specific channel."""
63+
64+
65+ CategoriesPreferenceSetWorkflowCategorySettingObjectChannels : TypeAlias = Union [
66+ bool , CategoriesPreferenceSetWorkflowCategorySettingObjectChannelsPreferenceSetChannelSetting
67+ ]
68+
69+
5170class CategoriesPreferenceSetWorkflowCategorySettingObject (TypedDict , total = False ):
5271 channel_types : Optional [PreferenceSetChannelTypesParam ]
5372 """Channel type preferences."""
5473
74+ channels : Optional [Dict [str , CategoriesPreferenceSetWorkflowCategorySettingObjectChannels ]]
75+ """Channel preferences."""
76+
5577 conditions : Optional [Iterable [Condition ]]
5678 """A list of conditions to apply to a channel type."""
5779
5880
5981Categories : TypeAlias = Union [bool , CategoriesPreferenceSetWorkflowCategorySettingObject ]
6082
6183
84+ class ChannelsPreferenceSetChannelSetting (TypedDict , total = False ):
85+ conditions : Required [Iterable [Condition ]]
86+ """A list of conditions to apply to a specific channel."""
87+
88+
89+ Channels : TypeAlias = Union [bool , ChannelsPreferenceSetChannelSetting ]
90+
91+
92+ class WorkflowsPreferenceSetWorkflowCategorySettingObjectChannelsPreferenceSetChannelSetting (TypedDict , total = False ):
93+ conditions : Required [Iterable [Condition ]]
94+ """A list of conditions to apply to a specific channel."""
95+
96+
97+ WorkflowsPreferenceSetWorkflowCategorySettingObjectChannels : TypeAlias = Union [
98+ bool , WorkflowsPreferenceSetWorkflowCategorySettingObjectChannelsPreferenceSetChannelSetting
99+ ]
100+
101+
62102class WorkflowsPreferenceSetWorkflowCategorySettingObject (TypedDict , total = False ):
63103 channel_types : Optional [PreferenceSetChannelTypesParam ]
64104 """Channel type preferences."""
65105
106+ channels : Optional [Dict [str , WorkflowsPreferenceSetWorkflowCategorySettingObjectChannels ]]
107+ """Channel preferences."""
108+
66109 conditions : Optional [Iterable [Condition ]]
67110 """A list of conditions to apply to a channel type."""
68111
0 commit comments