This commit is contained in:
payacom
2026-07-23 15:58:15 +03:30
parent af5b27b610
commit a1d7db5e7e
445 changed files with 23456 additions and 8865 deletions

View File

@@ -19,7 +19,9 @@ export async function fetchPosts(
feedMode?: "grid" | "reels";
seedPostId?: string;
sort?: "latest";
reelsTab?: "for_you" | "following" | "saved";
reelsTab?: "for_you" | "following" | "saved" | "near_me";
lat?: string;
lng?: string;
heightMin?: string;
heightMax?: string;
weightMin?: string;

View File

@@ -15,6 +15,7 @@ export type StoryItem = {
_id: string;
media_path: string;
media_type: "image" | "video";
linked_post_id?: string | null;
overlays?: StoryTextOverlay[];
createdAt?: string;
expires_at?: string;
@@ -33,6 +34,7 @@ export type StoryFeedUser = {
};
stories: StoryItem[];
has_unviewed: boolean;
is_following?: boolean;
};
export type StoriesFeedResponse = {
@@ -166,3 +168,21 @@ export async function fetchStoryViewers(
}
return res.json();
}
export async function sharePostToStory(
postId: string,
token: string
): Promise<void> {
const res = await fetch(`${getApiBaseUrl()}/stories/share-post`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({ postId }),
});
if (!res.ok) {
const json = await res.json().catch(() => ({}));
throw new Error(json?.message || "خطا در انتشار استوری");
}
}