diff --git a/lib/types/messages/update-relationship.js b/lib/types/messages/update-relationship.js --- a/lib/types/messages/update-relationship.js +++ b/lib/types/messages/update-relationship.js @@ -6,15 +6,36 @@ import { messageTypes } from '../message-types-enum.js'; import type { RelativeUserInfo } from '../user-types.js'; -export type UpdateRelationshipMessageData = { +export type TraditionalRelationshipOperation = + | 'request_sent' + | 'request_accepted'; + +export type FarcasterRelationshipOperation = 'farcaster_mutual'; + +export type UpdateTraditionalMessageData = { +type: 22, +threadID: string, +creatorID: string, +targetID: string, +time: number, - +operation: 'request_sent' | 'request_accepted' | 'farcaster_mutual', + +operation: TraditionalRelationshipOperation, }; +export type UpdateFarcasterMessageData = { + +type: 22, + +threadID: string, + +creatorID: string, + +creatorFID: string, + +targetID: string, + +targetFID: string, + +time: number, + +operation: FarcasterRelationshipOperation, +}; + +export type UpdateRelationshipMessageData = + | UpdateTraditionalMessageData + | UpdateFarcasterMessageData; + export type RawUpdateRelationshipMessageInfo = { ...UpdateRelationshipMessageData, id: string,