Consume governed recipients and add operational checks
This commit is contained in:
@@ -256,6 +256,18 @@ export type CampaignRecipientSnapshotItem = {
|
||||
provenance: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type CampaignRecipientSnapshotExcludedItem = {
|
||||
contact_id: string;
|
||||
display_name: string;
|
||||
channel: string;
|
||||
target: string;
|
||||
contact_point_id?: string | null;
|
||||
status: string;
|
||||
reason_code?: string | null;
|
||||
explanation?: string | null;
|
||||
provenance: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type CampaignRecipientAddressSourceSnapshot = {
|
||||
source_id: string;
|
||||
source_label: string;
|
||||
@@ -263,6 +275,10 @@ export type CampaignRecipientAddressSourceSnapshot = {
|
||||
source_revision: string;
|
||||
generated_at: string;
|
||||
recipients: CampaignRecipientSnapshotItem[];
|
||||
excluded: CampaignRecipientSnapshotExcludedItem[];
|
||||
included_count: number;
|
||||
excluded_count: number;
|
||||
purpose: string;
|
||||
provenance: Record<string, unknown>;
|
||||
};
|
||||
|
||||
@@ -714,7 +730,7 @@ sourceId: string)
|
||||
: Promise<CampaignRecipientAddressSourceSnapshot> {
|
||||
return apiFetch<CampaignRecipientAddressSourceSnapshot>(settings, `/api/v1/campaigns/${campaignId}/recipient-address-sources/snapshot`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ source_id: sourceId })
|
||||
body: JSON.stringify({ source_id: sourceId, purpose: "campaign_delivery" })
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user