UNPKG

@vtexlab/planner-contracts

Version:

Contracts to use in an Eventual-Driven Architecture (EDA)

40 lines (39 loc) 856 B
import { CaseType } from "./enums"; export type BaseData = { correlationId?: string; accountName: string; accountId?: string; authToken?: string; ruleId?: string; caseTypeFormat?: CaseType; }; export type Account = { Id?: string; Name: string; }; export interface IMessage { Timestamp: Date; CorrelationId: string; Account: Account; AuthToken?: string; RuleId?: string; TopicName?: string; } export type User = { Id: string; Email: string; }; export interface IDelayEvent extends IDomainEvent { ScheduleAt: Date; } export interface INotificationEvent extends IEvent { ScheduleAt?: Date; } export interface IDomainEvent extends IEvent { } export interface IIntegrationEvent extends IEvent { } export interface IEvent extends IMessage { } export interface ICommand extends IMessage { }