| 1 | import * as sns from "@distilled.cloud/aws/sns"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeSnsAccountHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { PublishSms } from "./PublishSms.ts"; |
| 5 | |
| 6 | export const PublishSmsHttp = Layer.effect( |
| 7 | PublishSms, |
| 8 | makeSnsAccountHttpBinding({ |
| 9 | tag: "AWS.SNS.PublishSms", |
| 10 | operation: sns.publish, |
| 11 | // Direct SMS delivery is backed by `sms-voice:SendTextMessage` |
| 12 | // (probe-verified). |
| 13 | actions: ["sns:Publish", "sms-voice:SendTextMessage"], |
| 14 | }), |
| 15 | ); |