Type Alias IArvoContract<TUri, TType, TVersions, TMetaData>

IArvoContract<TUri, TType, TVersions, TMetaData>: {
    description: string | null;
    domain: string | null;
    metadata: TMetaData;
    type: TType;
    uri: TUri;
    versions: TVersions;
}

Defines the structure of an Arvo contract, including its identifier, type, and versioned schemas.

Type Parameters

  • TUri extends string = string

    The unique URI identifier for the contract

  • TType extends string = string

    The event type that the contract's handler accepts

  • TVersions extends Record<ArvoSemanticVersion, {
        accepts: z.ZodTypeAny;
        emits: Record<string, z.ZodTypeAny>;
    }> = Record<ArvoSemanticVersion, {
        accepts: z.ZodTypeAny;
        emits: Record<string, z.ZodTypeAny>;
    }>

    A record of versioned schemas, mapping semantic versions to their accept/emit schemas

  • TMetaData extends Record<string, any> = Record<string, any>

    Optional metadata type

Type declaration

  • description: string | null

    Optional description providing context about the contract or its handler

  • domain: string | null

    The domain of the contract handler

  • metadata: TMetaData

    The contract metadata

  • type: TType

    The event type that this contract's handler accepts

  • uri: TUri

    The unique URI identifier for this contract

  • versions: TVersions

    A record mapping semantic versions to their corresponding schemas