index.d.ts 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { IonicNativePlugin } from '@ionic-native/core';
  2. export interface TagOptions {
  3. sequence: number;
  4. tags?: Array<string>;
  5. }
  6. export interface AliasOptions {
  7. sequence: number;
  8. alias?: string;
  9. }
  10. export declare class JPush extends IonicNativePlugin {
  11. init(): Promise<any>;
  12. setDebugMode(enable: boolean): Promise<any>;
  13. getRegistrationID(): Promise<any>;
  14. stopPush(): Promise<any>;
  15. resumePush(): Promise<any>;
  16. isPushStopped(): Promise<any>;
  17. setTags(params: TagOptions): Promise<any>;
  18. addTags(params: TagOptions): Promise<any>;
  19. deleteTags(params: TagOptions): Promise<any>;
  20. cleanTags(params: TagOptions): Promise<any>;
  21. getAllTags(params: TagOptions): Promise<any>;
  22. /**
  23. * @param params { sequence: number, tag: string }
  24. */
  25. checkTagBindState(params: object): Promise<any>;
  26. setAlias(params: AliasOptions): Promise<any>;
  27. deleteAlias(params: AliasOptions): Promise<any>;
  28. getAlias(params: AliasOptions): Promise<any>;
  29. /**
  30. * Determinate whether the application notification has been opened.
  31. *
  32. * iOS: 0: closed; >1: opened.
  33. * UIRemoteNotificationTypeNone = 0,
  34. * UIRemoteNotificationTypeBadge = 1 << 0,
  35. * UIRemoteNotificationTypeSound = 1 << 1,
  36. * UIRemoteNotificationTypeAlert = 1 << 2,
  37. * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3
  38. *
  39. * Android: 0: closed; 1: opened.
  40. */
  41. getUserNotificationSettings(): Promise<any>;
  42. clearLocalNotifications(): Promise<any>;
  43. setBadge(badge: number): Promise<any>;
  44. resetBadge(): Promise<any>;
  45. setApplicationIconBadgeNumber(badge: number): Promise<any>;
  46. getApplicationIconBadgeNumber(): Promise<any>;
  47. addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise<any>;
  48. deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise<any>;
  49. addDismissActions(actions: Array<object>, categoryId: string): Promise<any>;
  50. addNotificationActions(actions: Array<object>, categoryId: string): Promise<any>;
  51. setLocation(latitude: number, longitude: number): Promise<any>;
  52. startLogPageView(pageName: string): Promise<any>;
  53. stopLogPageView(pageName: string): Promise<any>;
  54. beginLogPageView(pageName: string, duration: number): Promise<any>;
  55. getConnectionState(): Promise<any>;
  56. setBasicPushNotificationBuilder(): Promise<any>;
  57. setCustomPushNotificationBuilder(): Promise<any>;
  58. clearAllNotification(): Promise<any>;
  59. clearNotificationById(id: number): Promise<any>;
  60. setLatestNotificationNum(num: number): Promise<any>;
  61. addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise<any>;
  62. removeLocalNotification(notificationId: number): Promise<any>;
  63. reportNotificationOpened(msgId: number): Promise<any>;
  64. requestPermission(): Promise<any>;
  65. setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise<any>;
  66. setPushTime(weekdays: Array<string>, startHour: number, endHour: number): Promise<any>;
  67. }