| 1 | import type * as notifications from "@distilled.cloud/aws/notifications"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Request for {@link GetNotificationEvent}. |
| 7 | */ |
| 8 | export interface GetNotificationEventRequest |
| 9 | extends notifications.GetNotificationEventRequest {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `notifications:GetNotificationEvent`. |
| 13 | * |
| 14 | * Fetch one notification event (headline, message components, source event |
| 15 | * metadata) by its ARN. Provide the implementation with |
| 16 | * `Effect.provide(AWS.Notifications.GetNotificationEventHttp)`. |
| 17 | * ### Reading Notification Events |
| 18 | * **Example:** Fetch a Notification Event |
| 19 | * ```typescript |
| 20 | * // init — account-level binding takes no resource |
| 21 | * const getNotificationEvent = yield* AWS.Notifications.GetNotificationEvent(); |
| 22 | * |
| 23 | * // runtime |
| 24 | * const event = yield* getNotificationEvent({ arn: eventArn }); |
| 25 | * const headline = event.content.messageComponents.headline; |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface GetNotificationEvent extends Binding.Service< |
| 31 | GetNotificationEvent, |
| 32 | "AWS.Notifications.GetNotificationEvent", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request: GetNotificationEventRequest, |
| 36 | ) => Effect.Effect< |
| 37 | notifications.GetNotificationEventResponse, |
| 38 | notifications.GetNotificationEventError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const GetNotificationEvent = Binding.Service<GetNotificationEvent>( |
| 44 | "AWS.Notifications.GetNotificationEvent", |
| 45 | ); |