@hhgtech/hhg-components
Version:
Hello Health Group common components
1,629 lines (1,628 loc) • 38.9 kB
TypeScript
import { Role } from "../../interfaces/types";
export type CareLocalisedSlugsType = 'HOSPITAL' | 'SERVICE' | 'DOCTOR' | 'ALL' | 'SEARCH' | 'SPECIALTIES' | 'CURRENT';
export type UserInfo = {
name?: string;
url?: string;
phone?: string;
area_code?: string;
username?: string;
avatar?: string;
email?: string;
phone_verified?: boolean;
birthday?: string;
gender?: number;
id?: number;
userId?: number | string;
total_bookmark?: number;
bookmarks?: Array<string | number>;
postCount?: number;
role?: Role;
type?: any;
commentCount?: number;
coralToken?: {
token?: string;
isTemp?: boolean;
};
_adminHasSSO?: boolean;
_adminPermissions?: AdminPermissionApi[];
communities?: Community[];
communities_interacted?: number;
partnerId?: string;
_togetherUserId?: number;
title?: string;
doctorId?: string;
hospitalId?: string;
};
export type AdminUserInfo = {
name?: string;
username?: string;
avatar?: string;
email?: string;
id: number;
role?: string;
_adminHasSSO?: boolean;
_adminPermissions?: AdminPermissionApi[];
};
export type CategoryTopic = {
category_id: number;
name: string;
id: number;
};
export type Topic = {
id?: number;
name: string;
image?: string;
url?: string;
slug?: string;
description?: string;
joined?: boolean;
postCount?: number;
memberCount?: number;
communityId?: string;
communitySlug?: string;
communityName?: string;
order?: number;
isActive?: boolean;
mappedCategoryId?: number;
discoverCategory?: {
categoryId: number;
name: string;
};
isHidden?: boolean;
dueDateMonth?: number;
dueDateYear?: number;
};
export type TopicApi = {
count_members: number;
count_posts: number;
description: string;
joined: boolean;
thumbnail: string;
name: string;
id: number;
slug: string;
community: {
id: number;
slug: string;
name: string;
description: string;
};
order: number;
is_active: number;
mapped_category_id?: number;
discover_category?: {
category_id: number;
name: string;
};
is_hidden?: number;
};
export type ExpertAnswer = {
answer: Comment[];
expert: UserInfo;
};
export type Post = {
id?: number;
community: Community;
topics?: Topic[];
slug?: string;
author?: UserInfo;
title?: string;
name?: string;
postTime?: string;
createdAt?: string;
scheduleDateTime?: string;
description?: string;
isFollowing?: boolean;
photos?: string[];
commentsCount?: number;
likesCount?: number;
commented?: boolean;
isPin?: boolean;
pinDate?: string;
liked?: boolean;
bookmarked?: boolean;
introUrl?: string;
bannerImage?: string;
previewUrl?: {
title: string;
url: string;
image?: string;
description?: string;
} | null;
moderator?: {
name: string;
avatar: string | null;
id: number;
username?: string | null;
} | null;
mentions?: {
id: number;
name: string;
}[];
isAnonymous?: number;
isAskDoctor?: number;
expertAnswer: ExpertAnswer;
createdTime?: string;
isMinigame?: boolean;
eventStart?: string;
eventEnd?: string;
isSensitive?: number;
};
export type PostPaginationApi = {
current: number;
first: number;
items_per_page: number;
last: number;
next: number;
prev: number;
total_items: number;
};
export type PostPaginationClient = {
currentPage: number;
lastPage: number;
total: number;
};
export type ExpertAnswerApi = {
answer: CommentApi[];
expert: UserInfo;
};
export type PostApi = {
created_at: string;
description: string;
images: string[];
is_pin: number;
pin_date: string;
liked: boolean;
bookmarked: boolean;
commented: boolean;
id: number;
preview_title: string;
preview_description: string;
preview_link: string;
preview_image: string;
schedule_datetime: string | null;
topics?: {
description: string;
id: number;
name: string;
slug: string;
is_hidden: number;
}[];
slug: string;
comments_count: number;
community: {
id: number;
slug: string;
name: string;
description: string;
is_hidden: number;
};
created_time: string;
is_active: number;
likes_count: number;
mentions: {
id: number;
name: string;
}[];
name: string;
user: {
avatar: string;
email: string;
id: number;
name: string;
role: string;
type: string;
user_name: string;
partner_id: number;
title: string;
doctor_id: number;
hospital_id: number;
};
intro_url?: string;
banner_image?: string;
is_anonymous?: number;
is_question?: number;
expert_answer?: ExpertAnswerApi;
event_type?: string;
event_start?: string;
event_end?: string;
is_sensitive?: number;
};
export type TogetherTopicsApi = {
community_id: number;
community_slug: string;
count_members: number;
count_posts: number;
count_topics: number;
description: string;
joined: boolean;
thumbnail: string;
title: string;
topic_id: number;
topic_slug: string;
};
export type CommunityApi = {
thumbnail: string;
cover_image: string;
mobile_cover_image: string;
name: string;
description: string;
topics_count: number;
posts_count: number;
members_count: number;
slug: string;
id: number;
joined: boolean;
is_active: number;
mapped_category_id?: number;
discover_category?: {
category_id: number;
name: string;
};
is_hidden?: number;
};
export type Community = {
id?: number;
name: string;
thumbnail?: string;
coverImage?: string;
mobileCoverImage?: string;
slug?: string;
description?: string;
joined?: boolean;
topicCount?: number;
postCount?: number;
memberCount?: number;
isActive?: boolean;
mappedCategoryId?: number;
discoverCategory?: {
categoryId: number;
name: string;
};
isHidden?: boolean;
};
export type ActivityLog = {
time?: string;
content?: string;
avatar?: string;
};
export type Notification = {
time?: string;
content?: string;
postId?: string;
fromUser?: UserInfo;
toUserId?: string;
postSlug?: string;
communitySlug?: string;
};
export type NotificationApi = {
from_user: {
name: string;
id: number;
avatar: string;
};
to_user_id: null;
content: string;
post_id: number;
post_slug: string;
community_slug: string;
created_at: string;
};
export type NotificationApiPagination = {
totalPage?: number;
previousPage?: number;
nextPage?: number;
listPages?: number[];
currPage?: number;
};
export type ArticleAuthorApi = {
display_name: string;
avatar: string;
avatar_thumbnail: string;
profile_url: string;
description: string;
meta_tag: string;
specialty?: string;
organisation?: string;
};
export type ArticleAuthor = {
displayName: string;
avatar: string;
profileUrl: string;
description: string;
thumbnailAvatar: string;
metaTag: string;
};
export type SponsorApi = {
title: string;
logo: string;
link: string;
};
export type Sponsor = SponsorApi;
export type ReviewedCategoryApi = {
post_title: string;
permalink: string;
};
export type ReviewedCategory = {
postTitle: string;
permalink: string;
};
export type DataCategoryApi = {
category: CategoryApi;
explainers_posts: Array<ArticleApi>;
sub_categories: Array<CategoryApi>;
};
export type PageCategoryApi = {
status: number;
messages: string;
data: DataCategoryApi;
};
export type PageCategory = {
categoryInfo: Category;
explainersPosts: Array<Article>;
subCategories: Array<Category>;
};
export type TranslateOption = {
value: string;
label: string;
};
export type CommunityEmbedApi = {
ID: number;
guest_title?: string;
guest_desc?: string;
member_title?: string;
member_desc?: string;
};
export type CategoryApi = {
name: string;
permalink: string;
icon_url: string;
term_id: number;
slug: string;
count: number;
cat_name: string;
category_nicename: string;
description: string;
image: string;
icon: string;
parent: string | number;
child_cates: CategoryApi[];
color_feature_image: string;
image_color: string;
text_color: string;
meta_tag: string;
cat_parent: {
name: string;
permalink: string;
};
is_sponsored?: boolean;
sponsor?: SponsorApi;
reviewed_by?: ReviewedCategoryApi;
reviewed_date?: string;
faqs?: Array<FAQsApi>;
community?: CommunityEmbedApi | null;
translate?: {
[key: string]: string;
};
pregnancy?: boolean;
suggestion_tools?: Array<HealthToolApi & {
reviewed_by?: AuthorApi;
reviewed_date?: string;
}>;
suggestion_subots?: {
title_riskscreener?: string;
subots: Array<HealthToolApi>;
};
customized_url?: string | null;
};
export type FAQsApi = {
title: string;
content: string;
};
export type FAQs = {
title: string;
content: string;
};
export type CategoryMeta = {
title: string;
description: string;
keyword: string;
url: string;
siteName: string;
locale: string;
};
export type Category = {
iconUrl: string;
termId: string | number;
categoryName: string;
name: string;
slugName: string;
description: string;
featureImage: string;
imageColor: string;
displayName: string;
parent: string | number;
permalink: string;
slug: string;
childCates: Category[];
colorFeatureImage: string;
textColor: string;
metaTag: string;
catParent: {
name: string;
permalink: string;
};
isSponsored?: boolean;
sponsor?: Sponsor;
reviewedBy?: ReviewedCategory;
reviewedDate?: string;
faqs?: Array<FAQs>;
translateOptions?: TranslateOption[];
suggestionTools?: Array<HealthTool & {
reviewedBy?: Author;
reviewedDate?: string;
}>;
suggestionSubots?: {
title?: string;
subots: Array<HealthTool>;
};
customizedUrl?: string | null;
};
export type AuthorApi = {
display_name: string;
avatar: string;
avatar_thumbnail: string;
profile_url: string;
description: string;
meta_tag: string;
slug?: string;
role?: string;
specialty?: string;
};
export type Author = {
displayName: string;
avatar: string;
profileUrl: string;
description: string;
thumbnailAvatar: string;
metaTag: string;
slug?: string;
role?: string;
specialty?: string;
turn_off_profile?: boolean;
profile_url?: string;
permalink?: string;
};
export type ReviewedUserApi = {
ID?: number;
user_id?: number;
name?: string;
specialty?: string;
permalink?: string;
avatar: string;
avatar_thumbnail: string;
display_name?: string;
displayName?: string;
profile_url?: string;
profileUrl?: string;
description?: string;
type?: string;
role?: string;
former_role?: string;
slug?: string;
turn_off_profile?: boolean;
post_title?: string;
};
export type ReviewedApi = {
author?: ReviewedUserApi | null;
editor?: ReviewedUserApi | null;
reviewer?: ReviewedUserApi | null;
expert?: ReviewedUserApi | null;
is_author: boolean;
fact_check: ReviewedUserApi | null;
};
export type BmiObjective = 'lose-weight' | 'maintain-weight' | 'gain-weight';
export type BmiInfo = {
age: string;
height: string;
weight: string;
objective: BmiObjective;
};
export type BmrObjective = 'lose-fat' | 'maintain-weight' | 'build-muscle';
export type BmrActiveLevel = 'sedentary' | 'lightly-active' | 'moderately-active' | 'intensely-active' | 'extremely-active';
export type BmrInfo = {
age: string;
height: string;
weight: string;
objective: BmrObjective;
activeLevel: BmrActiveLevel;
};
export type ToolContentApi = {
information: {
title: string;
description: string;
}[];
reviewed_by: {
ID: number;
name: string;
permalink: string;
};
reviewed_date: string;
};
export type ToolContent = {
is_sponsored: boolean;
sponsor: ContentSponsor | null;
featured_image: string;
information: {
title: string;
description: string;
}[];
reviewBy: {
reviewer: string;
date: string;
link: string;
};
metaTag: string;
title: string;
};
export type BabyPoopPageApi = {
title: string;
english_name: string;
description: string;
featured_image: string;
is_sponsored: boolean;
sponsor: {
title: string;
link: string;
logo: string;
} | null;
sponsor_banner: {
desktop_image: string;
mobile_image: string;
show_sponsor_banner: boolean;
video_block?: {
title: string;
list_video: {
title: string;
video_url: string;
}[];
} | null;
} | null;
disclaimer: string | null;
information: {
title: string;
description: string;
}[] | null;
tool_guideline: {
title: string;
description: string;
} | null;
care: unknown[];
reviewed_by: {
ID: number;
user_id: number;
former_role: string;
role: string;
slug: string;
display_name: string;
description: string;
profile_url: string;
avatar: string;
avatar_thumbnail: string;
turn_off_profile: boolean;
specialty: string;
organisation: string;
organisation_url: string;
} | null;
reviewed_date: string | null;
content: string;
result: {
[poop_type: string]: {
image: string;
color: 'green' | 'red' | 'yellow';
text_input: string;
title_result: string;
description: string;
what_should_i_do: string;
faqs: {
title: string;
description: string;
}[] | false | null;
recommend_articles?: ArticleApi[] | null;
};
};
is_leadgen: boolean;
meta_tag: string;
};
export type BabyPoopPage = {
title: string;
englishName: string;
description: string;
featuredImage: string;
isSponsored: boolean;
sponsor: {
title: string;
link: string;
logo: string;
} | null;
sponsorBanner: {
desktopImage: string;
mobileImage: string;
showSponsorBanner: boolean;
videoBlock?: {
title: string;
listVideo: {
title: string;
videoUrl: string;
}[];
} | null;
} | null;
disclaimer: string | null;
information: {
title: string;
description: string;
}[] | null;
toolGuideline: {
title: string;
description: string;
} | null;
care: unknown[];
reviewedBy: ReviewedUserApi;
reviewedDate: string;
content: string;
result: {
name: string;
image: string;
color: 'green' | 'red' | 'yellow';
textInput: string;
titleResult: string;
description: string;
whatShouldIDo: string;
faqs: {
title: string;
description: string;
}[];
recommendArticles: Article[];
}[];
isLeadgen: boolean;
metaTag: string;
};
export type HealthToolByCategory = {
termId: number;
name: string;
healthTools: HealthTool[];
};
export type CategoryHealthToolApi = {
term_id: number;
name: string;
health_tools: HealthToolApi[];
};
export type LogoType = 'hellobacsi' | 'hellosehat' | 'hellohealth' | 'hellotogether' | 'hellocare' | 'logomark' | 'hellodoctor' | 'hellokrupet' | 'hellswasthya' | 'hellokhunmor' | 'hellodoktor';
export type CategoriesLayout = 'short' | 'long';
export type DesktopMenuPopup = 'categories' | 'tools' | 'profile' | 'together' | 'none';
export type MobileMenuPopup = 'categories' | 'profile' | 'none';
export type BMICondition = 'underweight' | 'healthy' | 'overweight' | 'obese1' | 'obese2';
export type BMIResultApi = {
comparison: string;
condition: string;
risk: string;
suggestion: string;
faqs: {
[x: string]: string;
}[];
illustrator: string;
status: string;
chart_data: {
bmi: string;
percent: number;
}[];
disclaimer: string;
suggested_articles_link: string;
};
export type BMIResult = {
comparison: string;
assessmentData: {
[tab: string]: string;
}[];
faqs: {
[x: string]: string;
}[];
illustrator: string;
status: BMICondition;
chartData: {
bmi: string;
percent: number;
}[];
disclaimer: string;
suggestedArticlesLink: string;
};
export type HealthTool = {
title: string;
subtitle: string;
icon: string;
link: string;
};
export type HealthToolApi = {
title: string;
subtitle: string;
icon: string;
link: string;
};
export type Specialty = {
name: string;
id: number;
thumbnail: string;
link: string;
};
export type CoralCommentAuthor = {
id: string;
email: string;
username: string;
badges?: Array<string>;
};
export type CoralCommentEdge = {
node: Comment;
};
export type CoralPageInfo = {
hasNextPage: boolean;
endCursor: string;
};
export type CoralCommentCounts = {
totalPublished: number;
};
export type CoralCommentNumber = {
totalPublished: number;
};
export type Reaction = {
id: string;
reacter: {
userID: string;
username: string;
};
};
export type ReactionsConnection = {
nodes: Reaction[];
};
export type CoralComment = {
id: string;
status: string;
depth: number;
replyCount: number;
deleted: boolean;
body: string;
badges: string | [string];
createdAt: string;
reactions: ReactionsConnection;
replies?: {
nodes: CoralComment[];
edges: CoralCommentEdge[];
pageInfo: CoralPageInfo;
};
author: CoralCommentAuthor;
};
export type CoralCommentsConnection = {
nodes: CoralComment[];
pageInfo: CoralPageInfo;
};
export type CoralStory = {
id: string;
url: string;
comments: CoralCommentsConnection;
commentNumber: CoralCommentNumber;
};
export type CommunityItemType = {
id: number;
name: string;
thumbnail: string;
description?: string;
is_active: number;
created_moderator_id: number;
count_posts?: number;
count_topics?: number;
count_members?: number;
slug: string;
created_at: any;
updated_at: string;
};
export type CommunityDetailType = {
title: string;
title_local?: string;
description: string;
thumbnail: string;
count_topics: number;
count_posts: number;
count_members: number;
community_slug: string;
community_id: number;
joined: boolean;
is_active: number;
};
export type CommunityForm = {
id: number;
name?: string;
title_local?: string;
title_english?: string;
thumbnail: any;
cover_image?: any;
mobile_cover_image?: any;
description?: string;
is_active: number;
created_moderator_id: number;
count_posts?: number;
count_topics?: number;
count_members?: number;
slug: string;
created_at: string;
updated_at: string;
};
export type TopicType = {
id: number;
name: string;
thumbnail: string;
description?: string;
is_active: number;
created_moderator_id: number;
count_posts?: number;
count_topics?: number;
count_members?: number;
slug: string;
order: number;
created_at: string;
updated_at: string;
};
export type TopicForm = {
id: number;
name?: string;
title_local?: string;
title_english?: string;
thumbnail: any;
cover_image?: any;
mobile_cover_image?: any;
description?: string;
is_active: number;
created_moderator_id: number;
count_posts?: number;
count_topics?: number;
count_members?: number;
slug: string;
created_at: string;
updated_at: string;
};
export type PostPagination = {
currPage: number;
totalPage?: number;
perPage?: number;
total?: number;
};
export type PostFilterConfig = {
community: number | string;
topic: number | string;
site: string;
startDate: string;
endDate: string;
isRejected?: number;
isApproved?: number;
};
export interface PostDetail {
id: number;
slug: string;
name: string;
description: string;
likes_count: number;
comments_count: number;
images: string[];
is_pin: number;
pin_date: string;
post_type: string;
schedule_datetime: string;
is_active: number;
preview_title: string;
preview_description: string;
preview_image: string;
created_at: string;
created_time: string;
user: {
id: number;
role: string;
type: string;
user_name: string;
name: string;
email: string;
avatar: string;
};
community: {
id: number;
slug: string;
name: string;
description: string;
};
topics: {
description: string;
id: number;
name: string;
slug: string;
}[];
preview_link: string;
mentions?: {
id: number;
name: string;
}[];
}
export interface ReportedPostDetail {
post_id: number;
title: string;
description: string;
images: string[];
link: string;
is_pin: number;
post_slug: string;
reason: string;
is_approved: number;
is_rejected: number;
report_date: string;
is_active: number;
post_type: string;
website_id: number;
count_likes: number;
count_comments: number;
community_name: string;
community_id: number;
community_slug: string;
schedule_datetime: string;
preview_title: string;
preview_description: string;
preview_link: string;
preview_image: string;
reported_id: number;
user: {
id: number;
role: string;
type: string;
user_name: string;
name: string;
email: string;
avatar: string;
};
}
export interface ReportedCommentDetail {
post_id: number;
images: string[];
link: string;
reason: string;
is_approved: number;
is_rejected: number;
report_date: string;
user_id: number;
is_active: number;
community_name: string;
community_id: number;
community_slug: string;
comment_id: number;
parent_id: number;
content: string;
parent_user_id: number;
likes_count: number;
replies_count: number;
reported_id: number;
user: {
id: number;
role: string;
type: string;
user_name: string;
name: string;
email: string;
avatar: string;
} | null;
website_id: number;
}
export interface IUserObj {
name: string;
id: number;
avatar: string;
}
export interface INotification {
content: string;
created_at: string;
notifiable: {
avatar: string;
email: string;
id: number;
name: string;
role: string;
type: string;
user_name: string;
};
receiver_id: number;
subject: {
title: string;
};
}
export type QuestionCommunityType = {
seq: string;
name: string;
};
export type UrlSource = 'first_login' | 'welcome_back' | 'comment';
export type ContentSponsor = {
title: string;
link: string;
logo: string | false;
image: string | false;
};
export type SpotlightSummaryApi = {
ID: number;
name: string;
permalink: string;
image: string;
image_medium?: string;
image_thumbnail?: string;
start_date?: string | null;
end_date?: string | null;
small_banner?: string | null;
};
export type SpotlightSummary = {
id: number;
name: string;
permalink: string;
image: string;
imageMedium?: string | null;
imageThumbnail?: string | null;
startDate?: string | null;
endDate?: string | null;
};
export type OvulationInfoApi = {
title: string;
post_content: string;
disclaimer: string;
featured_image: string;
informations: [
{
title: string;
description: string;
}
];
faqs?: {
[key: string]: [
{
title: string;
content: string;
}
];
};
reviewed_by: {
ID: number | string;
name: string;
post_title: string;
permalink: string;
slug?: string;
role?: string;
user_id: number;
display_name?: string;
profile_url?: string;
};
reviewed_date: string;
};
export type OvulationInfo = {
disclaimer: string;
featuredImage: string;
info: {
title: string;
description: string;
}[];
reviewedBy: {
id: number | string;
permalink: string;
name: string;
postTitle: string;
};
reviewedDate: string;
};
export type DueDateInfoApi = {
post_title: string;
post_content: string;
disclaimer: string;
featured_image: string;
informations: [
{
title: string;
description: string;
}
];
faqs: {
[key: string]: [
{
title: string;
content: string;
}
];
};
reviewed_by: {
ID: number | string;
name: string;
post_title: string;
permalink: string;
};
reviewed_date: string;
};
export type SuggestedArticleApi = {
post_id: number;
category_id: number;
post_url: string;
post_reviewed: number;
post_pageviews: number;
post_rank: number;
is_pin: number;
frequency: number;
topic: {
id: number;
name: string;
};
};
export type SuggestedArticlePaginationApi = {
current_page: number;
last_page?: number;
};
export type SuggestedArticle = {
postId: number;
categoryId: number;
postUrl: string;
postReviewed: number;
postPageviews: number;
postRank: number;
isPin: number;
frequency: number;
topic: {
id: number;
name: string;
};
};
export type TopicHealthToolApi = {
topic_id: number;
topic_name: string;
tool_id: number;
is_pin: number;
frequency: number;
tool_link: string;
};
export type TopicHealthTool = {
id: number;
topicFrequency: number;
topicId: number;
topicName: string;
isPinned: boolean;
toolLink: string;
};
export type CommentApi = {
content: string;
created_at: string;
created_time: string;
id: number;
image: string[] | null;
link: string | null;
replies: CommentApi[];
liked: number;
likes_count: number;
replies_count: number;
user: {
avatar: string;
email: string;
id: number;
name: string;
role: string;
type: string;
user_name: string;
partner_id: number;
title: string;
doctor_id: number;
hospital_id: number;
};
mentioned: {
avatar: string;
email: string;
id: number;
name: string;
role: string;
type: string;
user_name: string;
partner_id: number;
title: string;
doctor_id: number;
hospital_id: number;
};
mentions?: {
id: number;
name: string;
}[];
is_sensitive?: number;
user_read_comment?: boolean;
source?: string[];
is_verify?: number;
is_oppose?: number;
user_verify?: {
avatar: string;
email: string;
id: number;
name: string;
role: string;
type: string;
user_name: string;
partner_id: number;
title: string;
doctor_id: number;
hospital_id: number;
};
categories?: string;
is_anonymous?: number;
};
export type Comment = {
content: string;
countLikes: number;
countReplies: number;
createdAt: string;
createdTime: string;
id: string;
images: string[] | null;
link: string | null;
replies: Comment[];
author: UserInfo;
liked: boolean;
mentionedUser?: UserInfo;
mentions?: {
id: number;
name: string;
}[];
isSensitive: number;
userReadComment: boolean;
source: string[];
isVerify?: number;
isOppose?: number;
userVerify?: UserInfo;
categorySlug?: string;
isAnonymous?: boolean;
};
export type TopicSubotApi = {
topic_id: number;
subot_id: number;
is_pin: number;
frequency: number;
};
export type TopicSubot = {
chatBotId: number;
isPinned: number;
topicId: number;
topicFrequency: number;
};
export type FooterInfo = {
general: {
logo: string;
content: string;
copyright: string;
verified: Array<{
image: string;
url: string;
}>;
};
menu: Array<{
menu_title: string;
items: Array<{
title: string;
url: string;
}>;
}>;
social: {
title: string;
socials: Array<{
icon: string;
name: string;
url: string;
}>;
};
branch: {
title: string;
branch: Array<{
flag: string;
name: string;
url: string;
}>;
};
};
export type SiteWideBannerApi = {
content: string;
icon: string;
};
export type SiteWideBanner = {
content: string;
icon: string;
type: 'article' | 'category' | 'home' | 'other';
};
export type FooterLink = {
title: string;
link: string;
};
export type AdminPermissionApi = {
id: number;
group: string;
name: string;
key: string;
value: string;
description: string;
};
export type PregWeightInfo = {
yourSelf: string;
week: string;
weightBefore: string;
height: string;
weight: string;
twins: string;
};
export type PwgInfoApi = {
disclaimer: string;
info: {
title: string;
description: string;
}[];
reviewed_by: ReviewedUserApi;
reviewed_date: string;
meta_tag?: string;
};
export type PwgInfo = {
title: string;
disclaimer: string;
featuredImage: string;
info: {
title: string;
description: string;
}[];
reviewedBy: ReviewedUserApi;
reviewedDate: string;
metaTag?: string;
};
export type ExpertUserSummaryApi = {
user_id: string;
display_name: string;
description: string;
profile_url: string;
avatar: string;
avatar_thumbnail: string;
role: string;
slug?: string;
specialty?: string;
organisation?: string;
organisation_url?: string;
turn_off_profile?: boolean;
permalink?: string;
};
export type HeartRateLocalStoredType = {
gender: string;
age: string;
rate: number;
intensity: string;
};
export type targetHeartRateInfo = {
yourSelf: string;
gender: string;
age: string;
rate: string;
intensity: string;
};
export type ThrInfoApi = {
disclaimer: string;
info: {
title: string;
description: string;
}[];
reviewed_by: ReviewedUserApi;
reviewed_date: string;
meta_tag?: string;
};
export type ThrInfo = {
title: string;
disclaimer: string;
featured_image: string;
info: {
title: string;
description: string;
}[];
reviewedBy: ReviewedUserApi;
reviewedDate: string;
metaTag?: string;
};
export type DoctorExperiences = Array<{
description: string;
}>;
export type OrganizationInfoApi = {
id: number;
name: string;
slug: string;
logo?: string;
banner?: string;
description?: string;
};
export type DoctorInfo = {
name: string;
description: string;
avatar: string;
price: number | string;
id: number;
experiences: DoctorExperiences;
organization: OrganizationInfoApi;
specialties?: {
id: number;
name: string;
}[];
slug: string;
valid_telemedicine?: boolean;
valid_outpatient?: boolean;
};
export type PregnancyWeekApi = {
id: number;
name: string;
fruit_icon: string;
};
export type PregnancyWeek = {
id: number;
name: string;
icon: string;
};
export type ArticleReactionType = 'like' | 'dislike' | 'none';
export type ArticleReactionApi = {
total_like?: number;
total_dislike?: number;
};
export type ArticleReaction = {
like: string | number;
dislike: string | number;
};
export type ArticleExpertApi = {
ID: string | number;
user_id: string | number;
post_title: string;
permalink: string;
specialty: string;
avatar: string;
avatar_thumbnail: string;
name: string;
};
export type ArticleExpert = {
id: string | number;
name: string;
permalink: string;
specialty: string;
avatar: string;
thumbnailAvatar: string;
};
export type ArticleApi = {
ID: string | number;
description: string;
post_name: string;
post_title: string;
post_modified: string;
post_date: string;
permalink: string;
image: string;
image_medium: string;
image_thumbnail: string;
author: AuthorApi;
post_content: string;
categories: Array<CategoryApi>;
category: CategoryApi;
key_takeaways: {
title: string;
content: string;
};
reviewed_by: AuthorApi;
reviewed?: ReviewedApi;
sources: string;
excerpt: string;
modified_time: string;
expert: ArticleExpertApi;
meta_tag?: string;
is_sponsored?: boolean;
is_premium?: boolean;
sponsor?: SponsorApi;
spotlight?: SpotlightSummaryApi;
affiliate_message?: string;
turn_off_comment?: boolean;
is_affiliate?: boolean;
faqs: Array<{
question: string;
answer: string;
}>;
translate?: {
[key: string]: string;
};
jumping_link: Array<string>;
pregnancy?: boolean;
week_pregnancy?: number | null;
primary_category: CategoryApi;
turn_off_ivs_player?: boolean;
turn_off_article_voice?: boolean;
enable_audio?: boolean;
breadcrumb: Array<any>;
label?: string;
edit_last?: AuthorApi;
subscription_banner?: SubscriptionBannerApi;
};
export type SubscriptionBannerApi = {
id: null | number;
status: boolean;
icon?: string;
title?: string;
description?: string;
button_text?: string;
button_url?: string;
lang?: string;
banner_mobile?: string;
banner_desktop?: string;
};
export type SubscriptionBanner = {
id: null | number;
status: boolean;
icon?: string;
title?: string;
description?: string;
buttonText?: string;
buttonUrl?: string;
bannerMobile?: string;
bannerDesktop?: string;
lang?: string;
};
export type Article = {
id: string | number;
description: string;
postName: string;
postContent: string;
postTitle: string;
postModified: string;
postDate: string;
permalink: string;
featureImage: string;
featureImageMobile: string;
featureImageMobileXs: string;
author: Author;
reviewer: Author;
articleReviewed: ReviewedApi;
category: Category;
categories: Array<Category>;
sources: string;
relatedArticles?: Array<Article>;
nextArticle?: Article;
relatedCategories?: Array<Category>;
keyTakeaways: {
title: string;
content: string;
};
excerpt: string;
expert: ArticleExpert;
modifiedTime: string;
metaTag?: string;
isSponsored?: boolean;
isPremium?: boolean;
sponsor?: Sponsor;
spotlight?: SpotlightSummary | null;
affiliate_message?: string;
turnOffComment: boolean;
hasAffiliate?: boolean;
faqs: Array<FAQs>;
translateOptions?: TranslateOption[];
jumpingLink: Array<string>;
pregnancy?: boolean;
pregnancyWeek: number;
primaryCategory?: Category;
turnOffIvsPlayer?: boolean;
turnOffArticleVoice?: boolean;
enableAudio?: boolean;
breadcrumb: Array<any>;
label?: string;
editLast?: Author;
subscriptionBanner?: SubscriptionBanner;
};
export type ArticleProps = {
url?: string;
title?: string;
description?: string;
thumbnail?: string;
type?: number;
meta?: Array<{
[key: string]: string;
}>;
};