emittableevent
Version:
EmittableEvent is an opinionated abstraction class for generating rich EventBridge events.
39 lines (38 loc) • 1.1 kB
TypeScript
export declare type MetadataConfigInput = StaticMetadata & {
version: number;
error?: boolean;
};
export declare type StaticMetadata = {
domain: string;
system: string;
service: string;
team: string;
eventType: EventType;
hostPlatform: string;
owner: string;
jurisdiction: Jurisdiction;
tags?: string[];
dataSensitivity?: DataSensitivity;
};
export declare type DynamicMetadata = {
id: string;
correlationId: string;
timestamp: string;
timestampHuman: string;
requestTimeEpoch: number;
lifecycleStage: string;
resource: string;
accountId: string;
region: string;
runtime: string;
functionName: string;
functionMemorySize: string;
functionVersion: string;
user?: string;
};
export declare type Metadata = MetadataConfigInput & DynamicMetadata & {
eventName: string;
};
export declare type EventType = 'DomainEvent' | 'IntegrationEvent';
export declare type DataSensitivity = 'public' | 'sensitive' | 'proprietary' | 'secret';
export declare type Jurisdiction = 'eu' | 'us' | 'cn' | 'apj';