npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@jwot/capacitor-jpush

v0.0.1

Published

j

Readme

@justwei/capacitor-jpush

j

Install

npm install @justwei/capacitor-jpush
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>

| Param | Type | | ------------- | ------------------------------- | | options | { value: string; } |

Returns: Promise<{ value: string; }>


startJPush()

startJPush() => Promise<void>

启动极光推送服务,即使没有获取到通知权限,也会进行推送服务初始化


setDebugMode(...)

setDebugMode(isDebug: boolean) => Promise<void>

开启 debug 模式 log日志

| Param | Type | | ------------- | -------------------- | | isDebug | boolean |


setAlias(...)

setAlias(options: AliasOptions) => Promise<void>

设置推送别名,可作为推送消息的目标对象

| Param | Type | | ------------- | ----------------------------------------------------- | | options | AliasOptions |


deleteAlias(...)

deleteAlias(options?: DeleteAlias | undefined) => Promise<void>

删除推送别名

| Param | Type | | ------------- | --------------------------------------------------- | | options | DeleteAlias |


addTags(...)

addTags(options: SetTagsOptions) => Promise<void>

设置推送标签

| Param | Type | | ------------- | --------------------------------------------------------- | | options | SetTagsOptions |


deleteTags(...)

deleteTags(options: SetTagsOptions) => Promise<void>

删除推送标签

| Param | Type | | ------------- | --------------------------------------------------------- | | options | SetTagsOptions |


cleanTags()

cleanTags() => Promise<void>

setBadgeNumber(...)

setBadgeNumber(options?: SetBadgeNumberOptions | undefined) => Promise<void>

设置 APP 角标数字,设为 0 即清空角标

| Param | Type | | ------------- | ----------------------------------------------------------------------- | | options | SetBadgeNumberOptions |


removeListeners()

removeListeners() => Promise<void>

getRegistrationID()

getRegistrationID() => Promise<{ registrationId: string; }>

获取设备的注册 ID,若服务重新注册,则返回的 ID 是不一样的

Returns: Promise<{ registrationId: string; }>


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

检查通知权限状态

Returns: Promise<PermissionStatus>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

申请通知权限

Returns: Promise<PermissionStatus>


openNotificationSetting()

openNotificationSetting() => Promise<void>

打开推送通知权限设置页面(目前仅安卓支持)


addListener('notificationReceived', ...)

addListener(eventName: 'notificationReceived', listenerFunc: (notificationData: ReceiveNotificationData) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

监听推送消息

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------------- | | eventName | 'notificationReceived' | | listenerFunc | (notificationData: ReceiveNotificationData) => void |

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener('notificationOpened', ...)

addListener(eventName: 'notificationOpened', listenerFunc: (notificationData: ReceiveNotificationData) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

监听消息栏通知被点击

| Param | Type | | ------------------ | ---------------------------------------------------------------------------------------------------------- | | eventName | 'notificationOpened' | | listenerFunc | (notificationData: ReceiveNotificationData) => void |

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


Interfaces

AliasOptions

| Prop | Type | | -------------- | ------------------- | | alias | string | | sequence | number |

DeleteAlias

| Prop | Type | | -------------- | ------------------- | | sequence | number |

SetTagsOptions

| Prop | Type | | ---------- | --------------------- | | tags | string[] |

SetBadgeNumberOptions

| Prop | Type | | ----------- | ------------------- | | badge | number |

PermissionStatus

| Prop | Type | Description | | ---------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------- | | permission | PermissionState | prompt: 首次申请,询问。 prompt-with-rationale: 每次都询问。 granted: 已获取权限。 denied:权限已拒绝。 |

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | remove | () => Promise<void> |

ReceiveNotificationData

| Prop | Type | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | title | string | | content | string | | subTitle | string | | rawData | { [x: string]: any; aps: { alert: { body: string; subTitle: string; title: string; }; badge: number; sound: string; }; } |

Type Aliases

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'