feat(campaign): govern attachment reuse
This commit is contained in:
@@ -474,6 +474,24 @@ class ResidualFileMode(StrEnum):
|
||||
ATTACH = "attach"
|
||||
|
||||
|
||||
class AttachmentReuseAction(StrEnum):
|
||||
ALLOW = "allow"
|
||||
WARN = "warn"
|
||||
REVIEW = "review"
|
||||
BLOCK = "block"
|
||||
|
||||
|
||||
class AttachmentReuseAllowance(StrEnum):
|
||||
NONE = "none"
|
||||
SAME_RECIPIENT = "same_recipient"
|
||||
SAME_MESSAGE = "same_message"
|
||||
|
||||
|
||||
class AttachmentReusePolicy(StrictModel):
|
||||
action: AttachmentReuseAction = AttachmentReuseAction.ALLOW
|
||||
allow_within: AttachmentReuseAllowance = AttachmentReuseAllowance.NONE
|
||||
|
||||
|
||||
class ResidualFileDispositionConfig(StrictModel):
|
||||
mode: ResidualFileMode = ResidualFileMode.NONE
|
||||
recipient: RecipientConfig | None = None
|
||||
@@ -533,6 +551,9 @@ class AttachmentsConfig(StrictModel):
|
||||
global_: list[AttachmentConfig] = Field(default_factory=list, alias="global")
|
||||
missing_behavior: Behavior = Behavior.WARN
|
||||
ambiguous_behavior: Behavior = Behavior.ASK
|
||||
reuse_policy: AttachmentReusePolicy = Field(
|
||||
default_factory=AttachmentReusePolicy
|
||||
)
|
||||
residual_files: ResidualFileDispositionConfig = Field(
|
||||
default_factory=ResidualFileDispositionConfig
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user