File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,10 +6,21 @@ import type {
66 FormatInputResult ,
77 WebhookProviderHandler ,
88} from '@/lib/webhooks/providers/types'
9- import { SENDBLUE_TRIGGER_IS_OUTBOUND } from '@/triggers/sendblue/utils'
109
1110const logger = createLogger ( 'WebhookProvider:Sendblue' )
1211
12+ /**
13+ * Maps Sendblue trigger IDs to the expected value of the webhook payload's
14+ * `is_outbound` flag, used to route inbound vs. outbound status events.
15+ * The handler is the only runtime consumer, so the map lives here (single
16+ * source of truth) rather than crossing from the triggers graph into the
17+ * webhook-providers graph.
18+ */
19+ const SENDBLUE_TRIGGER_IS_OUTBOUND : Record < string , boolean > = {
20+ sendblue_message_received : false ,
21+ sendblue_message_status_updated : true ,
22+ }
23+
1324export const sendblueHandler : WebhookProviderHandler = {
1425 matchEvent ( { body, webhook, requestId } : EventMatchContext ) : boolean {
1526 const providerConfig = getProviderConfig ( webhook )
Original file line number Diff line number Diff line change 11import type { TriggerOutput } from '@/triggers/types'
22
3- /**
4- * Maps Sendblue trigger IDs to the expected value of the webhook payload's
5- * `is_outbound` flag, used to route inbound vs. outbound status events.
6- * Imported by the webhook provider handler so routing lives in one place.
7- */
8- export const SENDBLUE_TRIGGER_IS_OUTBOUND : Record < string , boolean > = {
9- sendblue_message_received : false ,
10- sendblue_message_status_updated : true ,
11- }
12-
133export const sendblueTriggerOptions = [
144 { label : 'Message Received' , id : 'sendblue_message_received' } ,
155 { label : 'Message Status Updated' , id : 'sendblue_message_status_updated' } ,
You can’t perform that action at this time.
0 commit comments