/** * JoinRequest content type for Convos join requests. * * Replaces the plain-text invite slug DM with a structured content type * that includes the joiner's profile and optional metadata. * * Content type: convos.org/join_request:1.0 * Encoding: JSON (matching iOS JoinRequestCodec) * * The CLI still sends a plain text slug as well for backward compat * with older iOS clients that don't understand the new content type. */ import type { ContentTypeId, EncodedContent } from "@xmtp/node-bindings"; import type { ContentCodec } from "@xmtp/content-type-primitives"; import type { DecodedMessage } from "@xmtp/node-sdk"; export declare const ContentTypeJoinRequest: ContentTypeId; export interface JoinRequestProfile { name?: string; imageURL?: string; memberKind?: string; } export interface JoinRequestContent { inviteSlug: string; profile?: JoinRequestProfile; metadata?: Record; } export declare class JoinRequestCodec implements ContentCodec { get contentType(): ContentTypeId; encode(content: JoinRequestContent): EncodedContent; decode(content: EncodedContent): JoinRequestContent; fallback(content: JoinRequestContent): string | undefined; shouldPush(_content: JoinRequestContent): boolean; } /** * Check if a message is a JoinRequest content type. */ export declare function isJoinRequestMessage(message: DecodedMessage): boolean; /** * Extract a JoinRequestContent from a DecodedMessage. * * When the JoinRequestCodec is registered, message.content is the decoded object. * Falls back to raw EncodedContent parsing if needed. */ export declare function getJoinRequestContent(message: DecodedMessage): JoinRequestContent | undefined;