Update CallLogEvent to latest spec
This commit is contained in:
parent
815fd77849
commit
fc08e70c0f
12 changed files with 366 additions and 142 deletions
|
@ -26,6 +26,7 @@ export enum CallDirection {
|
|||
export enum CallLogEvent {
|
||||
Clear = 'Clear',
|
||||
MarkedAsRead = 'MarkedAsRead',
|
||||
MarkedAsReadInConversation = 'MarkedAsReadInConversation',
|
||||
}
|
||||
|
||||
export enum LocalCallEvent {
|
||||
|
@ -97,6 +98,19 @@ export type CallDetails = Readonly<{
|
|||
timestamp: number;
|
||||
}>;
|
||||
|
||||
export type CallLogEventTarget = Readonly<{
|
||||
timestamp: number;
|
||||
callId: string | null;
|
||||
peerId: AciString | string | null;
|
||||
}>;
|
||||
|
||||
export type CallLogEventDetails = Readonly<{
|
||||
type: CallLogEvent;
|
||||
timestamp: number;
|
||||
peerId: AciString | string | null;
|
||||
callId: string | null;
|
||||
}>;
|
||||
|
||||
export type CallEventDetails = CallDetails &
|
||||
Readonly<{
|
||||
event: CallEvent;
|
||||
|
@ -221,6 +235,13 @@ export const callEventNormalizeSchema = z.object({
|
|||
event: z.nativeEnum(Proto.SyncMessage.CallEvent.Event),
|
||||
});
|
||||
|
||||
export const callLogEventNormalizeSchema = z.object({
|
||||
type: z.nativeEnum(Proto.SyncMessage.CallLogEvent.Type),
|
||||
timestamp: longToNumberSchema,
|
||||
peerId: peerIdInBytesSchema.optional(),
|
||||
callId: longToStringSchema.optional(),
|
||||
});
|
||||
|
||||
export function isSameCallHistoryGroup(
|
||||
a: CallHistoryGroup,
|
||||
b: CallHistoryGroup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue