1 | import { Handler } from "../handler";
|
2 |
|
3 | export type SNSHandler = Handler<SNSEvent, void>;
|
4 |
|
5 |
|
6 | export interface SNSMessageAttribute {
|
7 | Type: string;
|
8 | Value: string;
|
9 | }
|
10 |
|
11 | export interface SNSMessageAttributes {
|
12 | [name: string]: SNSMessageAttribute;
|
13 | }
|
14 |
|
15 | export interface SNSMessage {
|
16 | SignatureVersion: string;
|
17 | Timestamp: string;
|
18 | Signature: string;
|
19 | SigningCertUrl: string;
|
20 | MessageId: string;
|
21 | Message: string;
|
22 | MessageAttributes: SNSMessageAttributes;
|
23 | Type: string;
|
24 | UnsubscribeUrl: string;
|
25 | TopicArn: string;
|
26 | Subject?: string;
|
27 | Token?: string;
|
28 | }
|
29 |
|
30 | export interface SNSEventRecord {
|
31 | EventVersion: string;
|
32 | EventSubscriptionArn: string;
|
33 | EventSource: string;
|
34 | Sns: SNSMessage;
|
35 | }
|
36 |
|
37 | export interface SNSEvent {
|
38 | Records: SNSEventRecord[];
|
39 | }
|