@cfxlabsinc/b2b-services
    Preparing search index...

    The common admin event structure, published by notification-services

    Example usage:

    type MyEvent = AdminEvent<"myDomain.myDomainObject.someEvent", {
    field1: string,
    field2: Date
    }>
    type AdminEvent<T extends string, D extends object> = {
        createdAt?: Date;
        data: D;
        event: T;
    }

    Type Parameters

    • T extends string

      The type of the event, should be unique within its domain

    • D extends object

      The event data for this specific event type and domain. It must be (de)seriable to/from JSON.

    Index

    Properties

    Properties

    createdAt?: Date

    The timestamp of when the publisher created the event. Defaults to current time.

    data: D

    Functional data related to event

    event: T

    Event type, in the format:

    <domain>.<entity>.<event>, e.g. deposit.cashDepositRequest.statusUpdated