@@ -110,6 +110,8 @@ export enum MessageType {
110110 USERNAME_PROOF = 12 ,
111111 /** FRAME_ACTION - A Farcaster Frame action */
112112 FRAME_ACTION = 13 ,
113+ /** LINK_COMPACT_STATE - Link Compaction State Message */
114+ LINK_COMPACT_STATE = 14 ,
113115}
114116
115117export function messageTypeFromJSON ( object : any ) : MessageType {
@@ -150,6 +152,9 @@ export function messageTypeFromJSON(object: any): MessageType {
150152 case 13 :
151153 case "MESSAGE_TYPE_FRAME_ACTION" :
152154 return MessageType . FRAME_ACTION ;
155+ case 14 :
156+ case "MESSAGE_TYPE_LINK_COMPACT_STATE" :
157+ return MessageType . LINK_COMPACT_STATE ;
153158 default :
154159 throw new tsProtoGlobalThis . Error (
155160 "Unrecognized enum value " + object + " for enum MessageType"
@@ -183,6 +188,8 @@ export function messageTypeToJSON(object: MessageType): string {
183188 return "MESSAGE_TYPE_USERNAME_PROOF" ;
184189 case MessageType . FRAME_ACTION :
185190 return "MESSAGE_TYPE_FRAME_ACTION" ;
191+ case MessageType . LINK_COMPACT_STATE :
192+ return "MESSAGE_TYPE_LINK_COMPACT_STATE" ;
186193 default :
187194 throw new tsProtoGlobalThis . Error (
188195 "Unrecognized enum value " + object + " for enum MessageType"
@@ -252,6 +259,8 @@ export enum UserDataType {
252259 URL = 5 ,
253260 /** USERNAME - Preferred Name for the user */
254261 USERNAME = 6 ,
262+ /** LOCATION - Current location for the user */
263+ LOCATION = 7 ,
255264}
256265
257266export function userDataTypeFromJSON ( object : any ) : UserDataType {
@@ -274,6 +283,9 @@ export function userDataTypeFromJSON(object: any): UserDataType {
274283 case 6 :
275284 case "USER_DATA_TYPE_USERNAME" :
276285 return UserDataType . USERNAME ;
286+ case 7 :
287+ case "USER_DATA_TYPE_LOCATION" :
288+ return UserDataType . LOCATION ;
277289 default :
278290 throw new tsProtoGlobalThis . Error (
279291 "Unrecognized enum value " + object + " for enum UserDataType"
@@ -295,13 +307,49 @@ export function userDataTypeToJSON(object: UserDataType): string {
295307 return "USER_DATA_TYPE_URL" ;
296308 case UserDataType . USERNAME :
297309 return "USER_DATA_TYPE_USERNAME" ;
310+ case UserDataType . LOCATION :
311+ return "USER_DATA_TYPE_LOCATION" ;
298312 default :
299313 throw new tsProtoGlobalThis . Error (
300314 "Unrecognized enum value " + object + " for enum UserDataType"
301315 ) ;
302316 }
303317}
304318
319+ /** Type of cast */
320+ export enum CastType {
321+ CAST = 0 ,
322+ LONG_CAST = 1 ,
323+ }
324+
325+ export function castTypeFromJSON ( object : any ) : CastType {
326+ switch ( object ) {
327+ case 0 :
328+ case "CAST" :
329+ return CastType . CAST ;
330+ case 1 :
331+ case "LONG_CAST" :
332+ return CastType . LONG_CAST ;
333+ default :
334+ throw new tsProtoGlobalThis . Error (
335+ "Unrecognized enum value " + object + " for enum CastType"
336+ ) ;
337+ }
338+ }
339+
340+ export function castTypeToJSON ( object : CastType ) : string {
341+ switch ( object ) {
342+ case CastType . CAST :
343+ return "CAST" ;
344+ case CastType . LONG_CAST :
345+ return "LONG_CAST" ;
346+ default :
347+ throw new tsProtoGlobalThis . Error (
348+ "Unrecognized enum value " + object + " for enum CastType"
349+ ) ;
350+ }
351+ }
352+
305353/** Type of Reaction */
306354export enum ReactionType {
307355 NONE = 0 ,
@@ -423,6 +471,8 @@ export interface MessageData {
423471 linkBody ?: LinkBody | undefined ;
424472 usernameProofBody ?: UserNameProof | undefined ;
425473 frameActionBody ?: FrameActionBody | undefined ;
474+ /** Compaction messages */
475+ linkCompactStateBody ?: LinkCompactStateBody | undefined ;
426476}
427477
428478/** Adds metadata about a user */
@@ -454,6 +504,8 @@ export interface CastAddBody {
454504 mentionsPositions : number [ ] ;
455505 /** URLs or cast ids to be embedded in the cast */
456506 embeds : Embed [ ] ;
507+ /** Type of cast */
508+ type : CastType ;
457509}
458510
459511/** Removes an existing Cast */
@@ -514,6 +566,13 @@ export interface LinkBody {
514566 targetFid ?: number | undefined ;
515567}
516568
569+ /** A Compaction message for the Link Store */
570+ export interface LinkCompactStateBody {
571+ /** Type of link, <= 8 characters */
572+ type : string ;
573+ targetFids : number [ ] ;
574+ }
575+
517576/** A Farcaster Frame action */
518577export interface FrameActionBody {
519578 /** URL of the Frame triggering the action */
@@ -726,6 +785,7 @@ function createBaseMessageData(): MessageData {
726785 linkBody : undefined ,
727786 usernameProofBody : undefined ,
728787 frameActionBody : undefined ,
788+ linkCompactStateBody : undefined ,
729789 } ;
730790}
731791
@@ -797,6 +857,12 @@ export const MessageData = {
797857 writer . uint32 ( 130 ) . fork ( )
798858 ) . ldelim ( ) ;
799859 }
860+ if ( message . linkCompactStateBody !== undefined ) {
861+ LinkCompactStateBody . encode (
862+ message . linkCompactStateBody ,
863+ writer . uint32 ( 138 ) . fork ( )
864+ ) . ldelim ( ) ;
865+ }
800866 return writer ;
801867 } ,
802868
@@ -912,6 +978,16 @@ export const MessageData = {
912978 reader . uint32 ( )
913979 ) ;
914980 continue ;
981+ case 17 :
982+ if ( tag != 138 ) {
983+ break ;
984+ }
985+
986+ message . linkCompactStateBody = LinkCompactStateBody . decode (
987+ reader ,
988+ reader . uint32 ( )
989+ ) ;
990+ continue ;
915991 }
916992 if ( ( tag & 7 ) == 4 || tag == 0 ) {
917993 break ;
@@ -956,6 +1032,9 @@ export const MessageData = {
9561032 frameActionBody : isSet ( object . frameActionBody )
9571033 ? FrameActionBody . fromJSON ( object . frameActionBody )
9581034 : undefined ,
1035+ linkCompactStateBody : isSet ( object . linkCompactStateBody )
1036+ ? LinkCompactStateBody . fromJSON ( object . linkCompactStateBody )
1037+ : undefined ,
9591038 } ;
9601039 } ,
9611040
@@ -1003,6 +1082,10 @@ export const MessageData = {
10031082 ( obj . frameActionBody = message . frameActionBody
10041083 ? FrameActionBody . toJSON ( message . frameActionBody )
10051084 : undefined ) ;
1085+ message . linkCompactStateBody !== undefined &&
1086+ ( obj . linkCompactStateBody = message . linkCompactStateBody
1087+ ? LinkCompactStateBody . toJSON ( message . linkCompactStateBody )
1088+ : undefined ) ;
10061089 return obj ;
10071090 } ,
10081091
@@ -1059,6 +1142,11 @@ export const MessageData = {
10591142 object . frameActionBody !== undefined && object . frameActionBody !== null
10601143 ? FrameActionBody . fromPartial ( object . frameActionBody )
10611144 : undefined ;
1145+ message . linkCompactStateBody =
1146+ object . linkCompactStateBody !== undefined &&
1147+ object . linkCompactStateBody !== null
1148+ ? LinkCompactStateBody . fromPartial ( object . linkCompactStateBody )
1149+ : undefined ;
10621150 return message ;
10631151 } ,
10641152} ;
@@ -1227,6 +1315,7 @@ function createBaseCastAddBody(): CastAddBody {
12271315 text : "" ,
12281316 mentionsPositions : [ ] ,
12291317 embeds : [ ] ,
1318+ type : 0 ,
12301319 } ;
12311320}
12321321
@@ -1260,6 +1349,9 @@ export const CastAddBody = {
12601349 for ( const v of message . embeds ) {
12611350 Embed . encode ( v ! , writer . uint32 ( 50 ) . fork ( ) ) . ldelim ( ) ;
12621351 }
1352+ if ( message . type !== 0 ) {
1353+ writer . uint32 ( 64 ) . int32 ( message . type ) ;
1354+ }
12631355 return writer ;
12641356 } ,
12651357
@@ -1338,6 +1430,13 @@ export const CastAddBody = {
13381430
13391431 message . embeds . push ( Embed . decode ( reader , reader . uint32 ( ) ) ) ;
13401432 continue ;
1433+ case 8 :
1434+ if ( tag != 64 ) {
1435+ break ;
1436+ }
1437+
1438+ message . type = reader . int32 ( ) as any ;
1439+ continue ;
13411440 }
13421441 if ( ( tag & 7 ) == 4 || tag == 0 ) {
13431442 break ;
@@ -1366,6 +1465,7 @@ export const CastAddBody = {
13661465 embeds : Array . isArray ( object ?. embeds )
13671466 ? object . embeds . map ( ( e : any ) => Embed . fromJSON ( e ) )
13681467 : [ ] ,
1468+ type : isSet ( object . type ) ? castTypeFromJSON ( object . type ) : 0 ,
13691469 } ;
13701470 } ,
13711471
@@ -1399,6 +1499,7 @@ export const CastAddBody = {
13991499 } else {
14001500 obj . embeds = [ ] ;
14011501 }
1502+ message . type !== undefined && ( obj . type = castTypeToJSON ( message . type ) ) ;
14021503 return obj ;
14031504 } ,
14041505
@@ -1420,6 +1521,7 @@ export const CastAddBody = {
14201521 message . text = object . text ?? "" ;
14211522 message . mentionsPositions = object . mentionsPositions ?. map ( ( e ) => e ) || [ ] ;
14221523 message . embeds = object . embeds ?. map ( ( e ) => Embed . fromPartial ( e ) ) || [ ] ;
1524+ message . type = object . type ?? 0 ;
14231525 return message ;
14241526 } ,
14251527} ;
@@ -2018,6 +2120,105 @@ export const LinkBody = {
20182120 } ,
20192121} ;
20202122
2123+ function createBaseLinkCompactStateBody ( ) : LinkCompactStateBody {
2124+ return { type : "" , targetFids : [ ] } ;
2125+ }
2126+
2127+ export const LinkCompactStateBody = {
2128+ encode (
2129+ message : LinkCompactStateBody ,
2130+ writer : _m0 . Writer = _m0 . Writer . create ( )
2131+ ) : _m0 . Writer {
2132+ if ( message . type !== "" ) {
2133+ writer . uint32 ( 10 ) . string ( message . type ) ;
2134+ }
2135+ writer . uint32 ( 18 ) . fork ( ) ;
2136+ for ( const v of message . targetFids ) {
2137+ writer . uint64 ( v ) ;
2138+ }
2139+ writer . ldelim ( ) ;
2140+ return writer ;
2141+ } ,
2142+
2143+ decode (
2144+ input : _m0 . Reader | Uint8Array ,
2145+ length ?: number
2146+ ) : LinkCompactStateBody {
2147+ const reader =
2148+ input instanceof _m0 . Reader ? input : _m0 . Reader . create ( input ) ;
2149+ let end = length === undefined ? reader . len : reader . pos + length ;
2150+ const message = createBaseLinkCompactStateBody ( ) ;
2151+ while ( reader . pos < end ) {
2152+ const tag = reader . uint32 ( ) ;
2153+ switch ( tag >>> 3 ) {
2154+ case 1 :
2155+ if ( tag != 10 ) {
2156+ break ;
2157+ }
2158+
2159+ message . type = reader . string ( ) ;
2160+ continue ;
2161+ case 2 :
2162+ if ( tag == 16 ) {
2163+ message . targetFids . push ( longToNumber ( reader . uint64 ( ) as Long ) ) ;
2164+ continue ;
2165+ }
2166+
2167+ if ( tag == 18 ) {
2168+ const end2 = reader . uint32 ( ) + reader . pos ;
2169+ while ( reader . pos < end2 ) {
2170+ message . targetFids . push ( longToNumber ( reader . uint64 ( ) as Long ) ) ;
2171+ }
2172+
2173+ continue ;
2174+ }
2175+
2176+ break ;
2177+ }
2178+ if ( ( tag & 7 ) == 4 || tag == 0 ) {
2179+ break ;
2180+ }
2181+ reader . skipType ( tag & 7 ) ;
2182+ }
2183+ return message ;
2184+ } ,
2185+
2186+ fromJSON ( object : any ) : LinkCompactStateBody {
2187+ return {
2188+ type : isSet ( object . type ) ? String ( object . type ) : "" ,
2189+ targetFids : Array . isArray ( object ?. targetFids )
2190+ ? object . targetFids . map ( ( e : any ) => Number ( e ) )
2191+ : [ ] ,
2192+ } ;
2193+ } ,
2194+
2195+ toJSON ( message : LinkCompactStateBody ) : unknown {
2196+ const obj : any = { } ;
2197+ message . type !== undefined && ( obj . type = message . type ) ;
2198+ if ( message . targetFids ) {
2199+ obj . targetFids = message . targetFids . map ( ( e ) => Math . round ( e ) ) ;
2200+ } else {
2201+ obj . targetFids = [ ] ;
2202+ }
2203+ return obj ;
2204+ } ,
2205+
2206+ create < I extends Exact < DeepPartial < LinkCompactStateBody > , I > > (
2207+ base ?: I
2208+ ) : LinkCompactStateBody {
2209+ return LinkCompactStateBody . fromPartial ( base ?? { } ) ;
2210+ } ,
2211+
2212+ fromPartial < I extends Exact < DeepPartial < LinkCompactStateBody > , I > > (
2213+ object : I
2214+ ) : LinkCompactStateBody {
2215+ const message = createBaseLinkCompactStateBody ( ) ;
2216+ message . type = object . type ?? "" ;
2217+ message . targetFids = object . targetFids ?. map ( ( e ) => e ) || [ ] ;
2218+ return message ;
2219+ } ,
2220+ } ;
2221+
20212222function createBaseFrameActionBody ( ) : FrameActionBody {
20222223 return {
20232224 url : new Uint8Array ( ) ,
@@ -2256,12 +2457,12 @@ type Builtin =
22562457type DeepPartial < T > = T extends Builtin
22572458 ? T
22582459 : T extends Array < infer U >
2259- ? Array < DeepPartial < U > >
2260- : T extends ReadonlyArray < infer U >
2261- ? ReadonlyArray < DeepPartial < U > >
2262- : T extends { }
2263- ? { [ K in keyof T ] ?: DeepPartial < T [ K ] > }
2264- : Partial < T > ;
2460+ ? Array < DeepPartial < U > >
2461+ : T extends ReadonlyArray < infer U >
2462+ ? ReadonlyArray < DeepPartial < U > >
2463+ : T extends { }
2464+ ? { [ K in keyof T ] ?: DeepPartial < T [ K ] > }
2465+ : Partial < T > ;
22652466
22662467type KeysOfUnion < T > = T extends T ? keyof T : never ;
22672468type Exact < P , I extends P > = P extends Builtin
0 commit comments