26 lines
1.8 KiB
Plaintext
26 lines
1.8 KiB
Plaintext
export interface Push {
|
|
setRegistrationID(registrationID: string, onSuccess: () => void): void,
|
|
registerPush(SDKAppID: number, appKey: string, onSuccess: (data: string) => void, onError?: (errCode: number, errMsg: string) => void): void,
|
|
getRegistrationID(onSuccess: (registrationID: string) => void): void,
|
|
unRegisterPush(onSuccess: () => void, onError?: (errCode: number, errMsg: string) => void): void,
|
|
getNotificationExtInfo(onSuccess: (extInfo: string) => void): void
|
|
addPushListener(eventName: string, listener: (res: any) => void): void
|
|
removePushListener(eventName: string, listener?: (res: any) => void): void
|
|
disablePostNotificationInForeground(disable: boolean): void
|
|
createNotificationChannel(options: any, onSuccess: (data: string) => void): void
|
|
}
|
|
|
|
export type SetRegistrationID = (registrationID: string, onSuccess: () => void) => void;
|
|
export type RegisterPush = (SDKAppID: number, appKey: string, onSuccess: (data: string) => void, onError?: (errCode: number, errMsg: string) => void) => void;
|
|
export type GetRegistrationID = (onSuccess: (registrationID: string) => void) => void;
|
|
export type UnRegisterPush = (onSuccess: () => void, onError?: (errCode: number, errMsg: string) => void) => void;
|
|
export type GetNotificationExtInfo = (onSuccess: (extInfo: string) => void) => void;
|
|
export type AddPushListener = (eventName: string, listener: (res: any) => void) => void;
|
|
export type RemovePushListener = (eventName: string, listener?: (res: any) => void) => void;
|
|
export type DisablePostNotificationInForeground = (disable: boolean) => void;
|
|
export type CreateNotificationChannel = (options: any, onSuccess: (data: string) => void) => void;
|
|
export enum EVENT {
|
|
MESSAGE_RECEIVED = 'message_received',
|
|
MESSAGE_REVOKED = 'message_revoked',
|
|
NOTIFICATION_CLICKED = 'notification_clicked'
|
|
} |