1import type * as smsvoice from "@distilled.cloud/aws/pinpoint-sms-voice-v2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `sms-voice:PutMessageFeedback`.
7 *
8 * Marks a sent message's feedback record as `RECEIVED` or `FAILED`. When
9 * a message is sent with `MessageFeedbackEnabled: true`, End User
10 * Messaging SMS waits for this signal — set `RECEIVED` when your
11 * application observes the user acting on the message (e.g. entering the
12 * one-time passcode); records not updated within an hour are marked
13 * `FAILED`. Account-level: feedback acts on message IDs, so the
14 * deploy-time grant is `sms-voice:PutMessageFeedback` on `*`. Provide
15 * the implementation with
16 * `Effect.provide(AWS.PinpointSMSVoiceV2.PutMessageFeedbackHttp)`.
17 * ### Message Feedback
18 * **Example:** Confirm an OTP Was Used
19 * ```typescript
20 * // init — bind the account-level operation
21 * const putFeedback = yield* AWS.PinpointSMSVoiceV2.PutMessageFeedback();
22 *
23 * // runtime — after the user enters the code sent in `MessageId`
24 * yield* putFeedback({
25 * MessageId: messageId,
26 * MessageFeedbackStatus: "RECEIVED",
27 * });
28 * ```
29 *
30 * @binding
31 */
32export interface PutMessageFeedback extends Binding.Service<
33 PutMessageFeedback,
34 "AWS.PinpointSMSVoiceV2.PutMessageFeedback",
35 () => Effect.Effect<
36 (
37 request: smsvoice.PutMessageFeedbackRequest,
38 ) => Effect.Effect<
39 smsvoice.PutMessageFeedbackResult,
40 smsvoice.PutMessageFeedbackError
41 >
42 >
43> {}
44export const PutMessageFeedback = Binding.Service<PutMessageFeedback>(
45 "AWS.PinpointSMSVoiceV2.PutMessageFeedback",
46);