import * as _whop_apps_feed_dist_state_feed_definition from '@whop-apps/feed/dist/state/feed-definition'; import { ActionHandler } from '@whop-apps/feed/dist/api/make-handler'; import { CreatePostAction } from '@whop-apps/feed/dist/schema/actions/create-post'; import { z } from 'zod'; import { ReadonlyHeaders } from 'next/dist/server/web/spec-extension/adapters/headers'; import { NextRequest, NextResponse } from 'next/server'; import * as react from 'react'; import { PropsWithChildren } from 'react'; export * from '@tanstack/react-query'; import { UserSchema } from '@whop-apps/feed/dist/schema/objects/user'; import { AvatarProps } from 'frosted-ui'; declare enum EmbedType { Link = "link" } declare const EmbedTypeSchema: z.ZodEnum<[EmbedType]>; declare const EmbedSchema: z.ZodObject<{ type: z.ZodEnum<[EmbedType]>; url: z.ZodString; processing: z.ZodOptional; title: z.ZodOptional; description: z.ZodOptional; image: z.ZodOptional; favicon: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; }, { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; }>; type FileAttachment = z.infer<(typeof feedDefinition)["schemas"]["post"]["message"]>["attachedFile"]; type FeedCustomData = z.infer<(typeof feedDefinition)["schemas"]["feed"]["chat"]>; type MessageCustomData = z.infer<(typeof feedDefinition)["schemas"]["post"]["message"]>; type ActionInput = Parameters>["onSuccess"]>>[0]; declare const MessageGifSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodString; /** * Shortened URL to the gif on Giphy. * @example "https://giphy.com/gifs/justin-meme-raccoon-pedro-Ac0fCix8D3oN7DwCEB" */ url: z.ZodString; /** * Original gif in webp format. * @example "https://media3.giphy.com/media/3o6MbtSmRdZEB7jnwI/giphy.webp?cid=4a060904dfzep7kabf6r9q0jljiy500v16ddljwa2lawhwpa&ep=v1_gifs_search&rid=giphy.webp&ct=g" */ original_url: z.ZodString; /** * Downsized version of the original. * @example "https://media3.giphy.com/media/3o6MbtSmRdZEB7jnwI/giphy.gif?cid=4a060904dfzep7kabf6r9q0jljiy500v16ddljwa2lawhwpa&ep=v1_gifs_search&rid=giphy.gif&ct=g" */ preview_url: z.ZodString; width: z.ZodNumber; height: z.ZodNumber; }, "strip", z.ZodTypeAny, { url: string; title: string; width: number; height: number; id: string; original_url: string; preview_url: string; }, { url: string; title: string; width: number; height: number; id: string; original_url: string; preview_url: string; }>; type MessageGif = z.infer; declare const feedDefinitionSchemas: { readonly feed: { readonly chat: z.ZodObject<{ writePermissions: z.ZodEnum<["everyone", "only-admins", "only-product-owners"]>; layout: z.ZodOptional>; bannedWords: z.ZodOptional>; shouldBanURLs: z.ZodOptional; requiredProductIdsToWrite: z.ZodOptional>; reactionPermissions: z.ZodOptional>; pinnedMessages: z.ZodOptional>; mutedUsers: z.ZodOptional>>; }, "strip", z.ZodTypeAny, { writePermissions: "everyone" | "only-admins" | "only-product-owners"; layout?: "classic" | "slack" | undefined; bannedWords?: string[] | undefined; shouldBanURLs?: boolean | undefined; requiredProductIdsToWrite?: string[] | undefined; reactionPermissions?: "everyone" | "none" | undefined; pinnedMessages?: string[] | undefined; mutedUsers?: Record | undefined; }, { writePermissions: "everyone" | "only-admins" | "only-product-owners"; layout?: "classic" | "slack" | undefined; bannedWords?: string[] | undefined; shouldBanURLs?: boolean | undefined; requiredProductIdsToWrite?: string[] | undefined; reactionPermissions?: "everyone" | "none" | undefined; pinnedMessages?: string[] | undefined; mutedUsers?: Record | undefined; }>; }; readonly post: { readonly message: z.ZodObject<{ replyingToPostId: z.ZodOptional; richTextContent: z.ZodOptional; plainTextContent: z.ZodOptional; attachedFile: z.ZodOptional; file_size: z.ZodNumber; file_name: z.ZodOptional; file_category: z.ZodEnum<["image", "video", "audio", "pdf", "zip", "text", "unknown"]>; width: z.ZodOptional; height: z.ZodOptional; aspectRatio: z.ZodOptional; blurDataUrl: z.ZodOptional; duration: z.ZodOptional; }, "strip", z.ZodTypeAny, { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; }, { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; }>>; isAdmin: z.ZodOptional; embed: z.ZodOptional; url: z.ZodString; processing: z.ZodOptional; title: z.ZodOptional; description: z.ZodOptional; image: z.ZodOptional; favicon: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; }, { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; }>>; pinned: z.ZodOptional; updatedAt: z.ZodOptional; giphyGif: z.ZodOptional>; }, "strip", z.ZodTypeAny, { replyingToPostId?: string | undefined; richTextContent?: string | undefined; plainTextContent?: string | undefined; attachedFile?: { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; } | undefined; isAdmin?: boolean | undefined; embed?: { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; } | undefined; pinned?: boolean | undefined; updatedAt?: number | undefined; giphyGif?: { url: string; title: string; width: number; height: number; id: string; original_url: string; preview_url: string; } | undefined; }, { replyingToPostId?: string | undefined; richTextContent?: string | undefined; plainTextContent?: string | undefined; attachedFile?: { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; } | undefined; isAdmin?: boolean | undefined; embed?: { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; } | undefined; pinned?: boolean | undefined; updatedAt?: number | undefined; giphyGif?: { url: string; title: string; width: number; height: number; id: string; original_url: string; preview_url: string; } | undefined; }>; }; readonly reaction: { readonly emoji: z.ZodObject<{ reaction: z.ZodString; custom: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; }, "strip", z.ZodTypeAny, { custom: {}; reaction: string; }, { custom: {}; reaction: string; }>; }; }; declare const feedDefinitionRelations: { readonly feeds: { readonly chat: { readonly children: "message"; }; }; readonly posts: { readonly message: { readonly reactions: "emoji"; }; }; }; declare const feedDefinition: _whop_apps_feed_dist_state_feed_definition.FeedDefinition<{ readonly feed: { readonly chat: z.ZodObject<{ writePermissions: z.ZodEnum<["everyone", "only-admins", "only-product-owners"]>; layout: z.ZodOptional>; bannedWords: z.ZodOptional>; shouldBanURLs: z.ZodOptional; requiredProductIdsToWrite: z.ZodOptional>; reactionPermissions: z.ZodOptional>; pinnedMessages: z.ZodOptional>; mutedUsers: z.ZodOptional>>; }, "strip", z.ZodTypeAny, { writePermissions: "everyone" | "only-admins" | "only-product-owners"; layout?: "classic" | "slack" | undefined; bannedWords?: string[] | undefined; shouldBanURLs?: boolean | undefined; requiredProductIdsToWrite?: string[] | undefined; reactionPermissions?: "everyone" | "none" | undefined; pinnedMessages?: string[] | undefined; mutedUsers?: Record | undefined; }, { writePermissions: "everyone" | "only-admins" | "only-product-owners"; layout?: "classic" | "slack" | undefined; bannedWords?: string[] | undefined; shouldBanURLs?: boolean | undefined; requiredProductIdsToWrite?: string[] | undefined; reactionPermissions?: "everyone" | "none" | undefined; pinnedMessages?: string[] | undefined; mutedUsers?: Record | undefined; }>; }; readonly post: { readonly message: z.ZodObject<{ replyingToPostId: z.ZodOptional; richTextContent: z.ZodOptional; plainTextContent: z.ZodOptional; attachedFile: z.ZodOptional; file_size: z.ZodNumber; file_name: z.ZodOptional; file_category: z.ZodEnum<["image", "video", "audio", "pdf", "zip", "text", "unknown"]>; width: z.ZodOptional; height: z.ZodOptional; aspectRatio: z.ZodOptional; blurDataUrl: z.ZodOptional; duration: z.ZodOptional; }, "strip", z.ZodTypeAny, { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; }, { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; }>>; isAdmin: z.ZodOptional; embed: z.ZodOptional; url: z.ZodString; processing: z.ZodOptional; title: z.ZodOptional; description: z.ZodOptional; image: z.ZodOptional; favicon: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; }, { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; }>>; pinned: z.ZodOptional; updatedAt: z.ZodOptional; giphyGif: z.ZodOptional>; }, "strip", z.ZodTypeAny, { replyingToPostId?: string | undefined; richTextContent?: string | undefined; plainTextContent?: string | undefined; attachedFile?: { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; } | undefined; isAdmin?: boolean | undefined; embed?: { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; } | undefined; pinned?: boolean | undefined; updatedAt?: number | undefined; giphyGif?: { url: string; title: string; width: number; height: number; id: string; original_url: string; preview_url: string; } | undefined; }, { replyingToPostId?: string | undefined; richTextContent?: string | undefined; plainTextContent?: string | undefined; attachedFile?: { relative_url: string; file_size: number; file_category: "image" | "unknown" | "video" | "audio" | "pdf" | "zip" | "text"; thumbnail_url?: string | undefined; file_name?: string | undefined; width?: number | undefined; height?: number | undefined; aspectRatio?: number | undefined; blurDataUrl?: string | undefined; duration?: number | undefined; } | undefined; isAdmin?: boolean | undefined; embed?: { type: EmbedType; url: string; processing?: boolean | undefined; title?: string | undefined; description?: string | undefined; image?: string | undefined; favicon?: string | undefined; } | undefined; pinned?: boolean | undefined; updatedAt?: number | undefined; giphyGif?: { url: string; title: string; width: number; height: number; id: string; original_url: string; preview_url: string; } | undefined; }>; }; readonly reaction: { readonly emoji: z.ZodObject<{ reaction: z.ZodString; custom: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; }, "strip", z.ZodTypeAny, { custom: {}; reaction: string; }, { custom: {}; reaction: string; }>; }; }, { readonly feeds: { readonly chat: { readonly children: "message"; }; }; readonly posts: { readonly message: { readonly reactions: "emoji"; }; }; }>; declare function makeFeedRoute(def: typeof feedDefinition, { headers, }: { headers: () => ReadonlyHeaders; }): (req: Request) => Promise; declare function makeMentionRoute(request: NextRequest): Promise>; declare function ClientLayout({ children }: PropsWithChildren): react.JSX.Element; declare function ExperienceLayout({ children, experienceId, }: PropsWithChildren<{ experienceId: string; }>): Promise; declare const chatUITailwindContent: () => string; interface ChatProps { experience: { id: string; name?: string; companyId?: string; companyImageUrl?: string; }; } declare function Chat({ experience }: ChatProps): react.JSX.Element; declare enum Events { MESSAGE_EDITED = "chat/message_edited", MESSAGE_SENT = "chat/message_sent", PLAIN_TEXT_CLIENT = "chat/plain_text_client", RICH_TEXT_CLIENT = "chat/rich_text_client" } interface Params { experienceId: string; page: number; per: number; } declare function getExperienceProducts({ experienceId, page, per }: Params): Promise<{ pagination: { current_page: number; total_pages: number; next_page: number; prev_page: number; total_count: number; }; data: { id: string; created_at: number; name: string; company_id: string; description?: string | undefined; page_id: string; visibility: "hidden" | "visible" | "archived" | "quick_link"; }[]; } | null>; declare function ProfileAvatar({ user, size }: { user: UserSchema; size?: AvatarProps["size"]; }): react.JSX.Element; export { ActionInput, Chat, ClientLayout, EmbedSchema, EmbedType, EmbedTypeSchema, Events, ExperienceLayout, FeedCustomData, FileAttachment, MessageCustomData, MessageGif, MessageGifSchema, ProfileAvatar, chatUITailwindContent, feedDefinition, feedDefinitionRelations, feedDefinitionSchemas, getExperienceProducts, makeFeedRoute, makeMentionRoute };