feat: add conversation id
This commit is contained in:
parent
f1464f7712
commit
5e588ebcfc
@ -11,7 +11,8 @@ export type SimToCmMessage = {
|
||||
export type Message = RequestApprovalToAttack | AcaFuelLow | MissileToOwnshipDetected | AcaDefect | AcaHeadingToBase;
|
||||
|
||||
export type BaseMessage<TKind extends string, TData extends object> = {
|
||||
id: MessageId,
|
||||
id: Uuid,
|
||||
conversationId: Uuid,
|
||||
priority: Priority,
|
||||
kind: TKind,
|
||||
data: TData,
|
||||
@ -52,7 +53,7 @@ export type AcaHeadingToBase = BaseMessage<"AcaHeadingToBase", {
|
||||
/* utility types **********************************************************************************/
|
||||
|
||||
export type Id = number & tags.Type<"uint64">;
|
||||
export type MessageId = string & tags.Format<"uuid">;
|
||||
export type Uuid = string & tags.Format<"uuid">;
|
||||
export type Priority = DiscreteRange<0, 10>;
|
||||
export type Range<From extends number, To extends number> = number & tags.Type<"float"> & tags.Minimum<From> & tags.Maximum<To>;
|
||||
export type DiscreteRange<From extends number, To extends number> = number & tags.Type<"int64"> & tags.Minimum<From> & tags.Maximum<To>;
|
||||
|
Loading…
Reference in New Issue
Block a user