react-native-zalo-auth
Version:
Zalo SDK for React Native
81 lines (80 loc) • 3.21 kB
TypeScript
import { Constants, IUserProfile, IFriendList, IShareResponseObject, IZaloAuthResponse } from './types';
declare const login: (authType?: Constants) => Promise<IZaloAuthResponse>;
declare const register: () => Promise<IZaloAuthResponse>;
declare const logout: () => void;
declare const isAuthenticated: () => Promise<boolean>;
declare const getUserProfile: (accessToken?: string) => Promise<IUserProfile | null>;
declare const getApplicationHashKey: () => string;
declare const getUserFriendList: (offset: number, count: number) => Promise<IFriendList>;
declare const getUserInvitableFriendList: (offset: number, count: number) => Promise<IFriendList>;
declare const postFeed: (message: string, link: string) => Promise<{
id: string;
}>;
declare const sendMessage: (friendId: string, link: string, message: string) => Promise<{
to: string;
}>;
declare const inviteFriendUseApp: (friendIds: string[], message: string) => Promise<{
to: string[];
}>;
declare const sendMessageByApp: (feedData: {
appName: string;
message: string;
link: string;
linkTitle: string;
linkSource: string;
linkDesc: string;
linkThumb: string[];
others: object;
}) => Promise<IShareResponseObject>;
declare const postFeedByApp: (feedData: {
appName: string;
message: string;
link: string;
linkTitle: string;
linkSource: string;
linkDesc: string;
linkThumb: string[];
others: object;
}) => Promise<IShareResponseObject>;
export { Constants, getApplicationHashKey, login, logout, isAuthenticated, getUserProfile, getUserFriendList, getUserInvitableFriendList, postFeed, postFeedByApp, sendMessage, sendMessageByApp, inviteFriendUseApp, register, };
declare const _default: {
Constants: typeof Constants;
getApplicationHashKey: () => string;
login: (authType?: Constants) => Promise<IZaloAuthResponse>;
logout: () => void;
isAuthenticated: () => Promise<boolean>;
getUserProfile: (accessToken?: string | undefined) => Promise<IUserProfile | null>;
getUserFriendList: (offset: number, count: number) => Promise<IFriendList>;
getUserInvitableFriendList: (offset: number, count: number) => Promise<IFriendList>;
postFeed: (message: string, link: string) => Promise<{
id: string;
}>;
postFeedByApp: (feedData: {
appName: string;
message: string;
link: string;
linkTitle: string;
linkSource: string;
linkDesc: string;
linkThumb: string[];
others: object;
}) => Promise<IShareResponseObject>;
sendMessage: (friendId: string, link: string, message: string) => Promise<{
to: string;
}>;
sendMessageByApp: (feedData: {
appName: string;
message: string;
link: string;
linkTitle: string;
linkSource: string;
linkDesc: string;
linkThumb: string[];
others: object;
}) => Promise<IShareResponseObject>;
inviteFriendUseApp: (friendIds: string[], message: string) => Promise<{
to: string[];
}>;
register: () => Promise<IZaloAuthResponse>;
};
export default _default;