diff --git a/.changeset/cool-cups-clap.md b/.changeset/cool-cups-clap.md new file mode 100644 index 0000000..b89c153 --- /dev/null +++ b/.changeset/cool-cups-clap.md @@ -0,0 +1,13 @@ +--- +"@senderkit/sdk": patch +"@senderkit/cli": patch +--- + +Drop the `Message.blockedReason` field. senderkit-app (#211) confirmed the +abuse scanner's detailed block reason is operator-only and is never returned +by the public messages API — customer-facing reads omit the column entirely +and a `blocked` message exposes only a generic `blocked` entry on its +`timeline`. The previously-added `blockedReason` field would therefore never +be populated, so it has been removed and the `Message.status` / +`MESSAGE_STATUSES` docs updated to match. The `blocked` status itself is +unchanged. diff --git a/packages/sdk/src/mcp-schemas.ts b/packages/sdk/src/mcp-schemas.ts index 0dec5e3..32c9932 100644 --- a/packages/sdk/src/mcp-schemas.ts +++ b/packages/sdk/src/mcp-schemas.ts @@ -122,7 +122,8 @@ const emailEnvelope = { * The ten message lifecycle statuses (mirrors the app's `messageStatusEnum`). * Bounces normalize to `failed` with the reason on the message timeline. * `blocked` is a terminal state set when the outbound abuse scanner halts a - * send (the human-readable trigger is on the message's `blockedReason`). + * send. The detailed trigger is operator-only and is never returned by the + * API; the message carries only a generic `blocked` entry on its timeline. */ export const MESSAGE_STATUSES = [ "scheduled", diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index a3345e7..d3dd05b 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -195,15 +195,15 @@ export interface Message { publicId: string; /** * Lifecycle status (one of `MESSAGE_STATUSES`). A `blocked` message was - * halted by the outbound abuse scanner; `blockedReason` carries the trigger. + * halted by the outbound abuse scanner. The detailed trigger is operator-only + * and is never returned by the API; the message carries only a generic + * `blocked` entry on its `timeline`. */ status: string; channel: Channel; templateSlug: string | null; recipient: string; createdAt: string; - /** Human-readable reason a `blocked` message was halted. Absent otherwise. */ - blockedReason?: string | null; [key: string]: unknown; }