@questlabs/react-native-sdk
Version:
Quest react native sdk
246 lines (233 loc) • 5.97 kB
text/typescript
import { TextStyle, ViewStyle } from "react-native";
export interface IMetaData {
button1: string;
button2: string;
demoLink: string;
linkActionUrl: string;
description: string;
image: string;
}
type HelphubStyleConfig = {
Home?: {
Form?: ViewStyle;
Heading?: TextStyle;
SubHeading?: TextStyle;
sendMessageViewStyle?: ViewStyle;
sendMessageTitleStyle?: TextStyle;
sendMessageDescriptionStyle?: TextStyle;
communityMainViewStyle?: ViewStyle;
communityDemoViewStyle?: ViewStyle;
communityTitleStyle?: TextStyle;
communityDescriptionStyle?: TextStyle;
searchMainViewStyle?: ViewStyle;
searchViewStyle?: ViewStyle;
searchListItemTitleStyle?: TextStyle;
getupdateMainViewStlye?: ViewStyle;
getupdateHeaderTextStyle?: TextStyle;
getupdateTitleStyle?: TextStyle;
getupdateTitle2Style?: TextStyle;
getupdateDescriptionStyle?: TextStyle;
getupdateDescription2Style?: TextStyle;
getupdateButtonStyle?: ViewStyle;
getupdateButtonTextStyle?: TextStyle;
complateProfileView?: ViewStyle;
complateProfileHeaderTextStyle?: TextStyle;
complateProfileDescriptionStyle?:TextStyle;
satisfiedMainViewStyle?: ViewStyle;
satisfiedTitleStyle?: TextStyle;
satisfiedDescriptionStyle?: TextStyle;
satisfiedFooterTextStyle?: TextStyle;
};
Chat?: {
Form?: ViewStyle;
Topbar?: {
Heading?: TextStyle;
SubHeading?: TextStyle;
};
// Card?: {
// Heading?: TextStyle;
// SubHeading?: TextStyle;
// Image?: ViewStyle;
// };
chatInputViewStyle?:ViewStyle;
message?:ViewStyle;
privetChatHeaderTextStyle?:TextStyle;
chatButton?:ViewStyle;
chatButtonText?:TextStyle;
chatTitleText?:TextStyle;
chatTitleDescription?:TextStyle;
Searchbox?: ViewStyle;
};
Help?: {
Form?: ViewStyle;
Topbar?: {
Heading?: ViewStyle;
SubHeading?: ViewStyle;
};
Card?: {
Heading?: ViewStyle;
SubHeading?: ViewStyle;
};
FaqTextStyle?:TextStyle
Searchbox?: ViewStyle;
};
Updates?: {
Form?: ViewStyle;
Topbar?: {
Heading?: ViewStyle;
SubHeading?: ViewStyle;
};
timeText?:TextStyle;
Card?: {
Heading?: ViewStyle;
SubHeading?: ViewStyle;
};
Searchbox?: ViewStyle;
};
Tasks?: {
Form?: ViewStyle;
Topbar?: {
Heading?: ViewStyle;
SubHeading?: ViewStyle;
};
tasksStepTextStyle?:TextStyle;
Card?: {
Heading?: ViewStyle;
SubHeading?: ViewStyle;
};
Searchbox?: ViewStyle;
};
Footer?: ViewStyle;
};
export interface HelpHubProps {
userId: string;
token: string;
questId?: string;
styleConfig?: HelphubStyleConfig
contentConfig?: {
Home?: HelpHubHomeContentTypes;
Chat?: HelpHubOthersContentTypes;
Help?: HelpHubOthersContentTypes;
Updates?: HelpHubOthersContentTypes;
Tasks?: HelpHubOthersContentTypes;
}
// showFooter?: boolean;
}
type HelpHubOthersContentTypes = {
heading?: string;
subHeading?: string;
}
export interface HelpHubHomeTypes {
questsData: QuestCriteriaWithStatusType[][];
setSelectedSection: (section: string) => void;
styleConfig?: HelphubStyleConfig;
parentQuest?: QuestTypes;
userId?: string;
token?: string;
contentConfig?: HelpHubHomeContentTypes;
}
export interface HelpHubChatTypes {
contentConfig?: HelpHubOthersContentTypes;
styleConfig?: HelphubStyleConfig;
handleToggleTabBar: (value: boolean) => void
}
export interface HelpHubUpdatesTypes {
updateData: QuestCriteriaWithStatusType[];
questId: string;
userId: string;
token: string;
contentConfig?: HelpHubOthersContentTypes;
styleConfig?: HelphubStyleConfig;
}
export interface HelpHubTasksTypes {
tasksData: QuestCriteriaWithStatusType[];
questId: string;
userId: string;
token: string;
contentConfig?: HelpHubOthersContentTypes;
styleConfig?: HelphubStyleConfig;
}
export interface HelpHubFaqTypes {
faqData: QuestCriteriaWithStatusType[];
styleConfig?:HelphubStyleConfig;
contentConfig?: HelpHubOthersContentTypes;
}
type HelpHubHomeContentTypes = {
heading?: string;
chatButton?: {
heading: string;
subHeading: string;
},
box1: {
heading: string;
subHeading: string;
image: string;
},
box4: {
heading: string;
subHeading: string;
},
box5: {
heading: string;
subHeading: string;
},
}
interface Metadata {
question?: string;
answer?: string;
linkActionName?: string;
linkActionUrl?: string;
description?: string;
effort: string;
importance: string;
xp: number;
frequency: string;
}
export interface QuestCriteriaType {
xp: number;
dependentCriterias: any[];
frequency: string;
criteriaType: string;
criteriaId: string;
questId: string;
metadata: Metadata;
requiresApproval: boolean;
createdAt: string;
}
export interface QuestCriteriaWithStatusType {
completed: boolean;
isLocked?: boolean;
data: QuestCriteriaType;
}
export interface QuestTypes {
eligibilityCriterias?: QuestCriteriaType[];
rewards: any[];
isDeleted: boolean;
hasReferral: boolean;
referralXP: number;
visibility: string;
status: string;
xp: number;
minXPThreshold: number;
categories: (string | null)[];
isPrivate: boolean;
allowRepeatEntries: boolean;
dependentQuests: string[];
isDependentCriterias: boolean;
isDependentQuests: boolean;
priority: number;
childQuestIDs: string[];
conditionRelations: [];
_id: string;
questId: string;
entityId: string;
title: string;
description: string;
imageURL: string;
endsAt: string;
skills: string[];
type: string;
createdAt: string;
conditions: any[];
__v: number;
}