1 | import { Callback, Handler } from "../handler";
|
2 |
|
3 | export type FirehoseTransformationHandler = Handler<FirehoseTransformationEvent, FirehoseTransformationResult>;
|
4 | export type FirehoseTransformationCallback = Callback<FirehoseTransformationResult>;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export interface FirehoseTransformationEvent {
|
12 | invocationId: string;
|
13 | deliveryStreamArn: string;
|
14 | sourceKinesisStreamArn?: string | undefined;
|
15 | region: string;
|
16 | records: FirehoseTransformationEventRecord[];
|
17 | }
|
18 |
|
19 | export interface FirehoseTransformationEventRecord {
|
20 | recordId: string;
|
21 | approximateArrivalTimestamp: number;
|
22 |
|
23 | data: string;
|
24 | kinesisRecordMetadata?: FirehoseRecordMetadata | undefined;
|
25 | }
|
26 |
|
27 | export interface FirehoseRecordMetadata {
|
28 | shardId: string;
|
29 | partitionKey: string;
|
30 | approximateArrivalTimestamp: number;
|
31 | sequenceNumber: string;
|
32 | subsequenceNumber: string;
|
33 | }
|
34 |
|
35 | export type FirehoseRecordTransformationStatus = "Ok" | "Dropped" | "ProcessingFailed";
|
36 |
|
37 | export interface FirehoseTransformationMetadata {
|
38 | partitionKeys: { [name: string]: string };
|
39 | }
|
40 |
|
41 | export interface FirehoseTransformationResultRecord {
|
42 | recordId: string;
|
43 | result: FirehoseRecordTransformationStatus;
|
44 |
|
45 | data?: string;
|
46 | metadata?: FirehoseTransformationMetadata;
|
47 | }
|
48 |
|
49 | export interface FirehoseTransformationResult {
|
50 | records: FirehoseTransformationResultRecord[];
|
51 | }
|