Pushwoosh plugin for Capacitor
npm install pushwoosh-capacitor-pluginPushwoosh plugin for Capacitor
bash
npm install pushwoosh-capacitor-plugin@1.0.7
npx cap sync
`$3
`bash
npm install git+https://github.com/Pushwoosh/pushwoosh-capacitor-plugin.git#1.0.7
npx cap sync
`API
onDeviceReady(...)
* registerDevice()
* unregisterDevice()
* additionalAuthorizationOptions(...)
* setTags(...)
* getTags()
* getPushToken()
* getPushwooshHWID()
* getRemoteNotificationStatus()
* setApplicationIconBadgeNumber(...)
* getApplicationIconBadgeNumber()
* addToApplicationIconBadgeNumber(...)
* getLaunchNotification()
* clearLaunchNotification()
* setUserId(...)
* setLanguage(...)
* setApiToken(...)
* postEvent(...)
* setMultiNotificationMode()
* setSingleNotificationMode()
* pushReceivedCallback(...)
* pushOpenedCallback(...)
* presentInboxUI(...)
* setCommunicationEnabled(...)
* isCommunicationEnabled(...)
* Interfaces
* Type Aliases
$3
`typescript
onDeviceReady(config: PushwooshConfig) => void
`| Param | Type |
| ------------ | ----------------------------------------------------------- |
|
config | PushwooshConfig |--------------------
$3
`typescript
registerDevice() => Promise<{ pushToken: string; }>
`Returns: Promise<{ pushToken: string; }>
--------------------
$3
`typescript
unregisterDevice() => Promise
`--------------------
$3
`typescript
additionalAuthorizationOptions(options: AuthOptions) => void
`| Param | Type |
| ------------- | --------------------------------------------------- |
|
options | AuthOptions |--------------------
$3
`typescript
setTags(config: PushwooshTags) => Promise
`| Param | Type |
| ------------ | ------------------------------------------------------- |
|
config | PushwooshTags |--------------------
$3
`typescript
getTags() => Promise<{ tags: PushwooshTags; }>
`Returns: Promise<{ tags: PushwooshTags; }>
--------------------
$3
`typescript
getPushToken() => { value: string | null; }
`Returns: { value: string | null; }
--------------------
$3
`typescript
getPushwooshHWID() => { value: string | null; }
`Returns: { value: string | null; }
--------------------
$3
`typescript
getRemoteNotificationStatus() => Promise<{ status: RemoteNotificationStatus; }>
`Returns: Promise<{ status: RemoteNotificationStatus; }>
--------------------
$3
`typescript
setApplicationIconBadgeNumber(badge: number) => void
`| Param | Type |
| ----------- | ------------------- |
|
badge | number |--------------------
$3
`typescript
getApplicationIconBadgeNumber() => Promise<{ badge: number; }>
`Returns: Promise<{ badge: number; }>
--------------------
$3
`typescript
addToApplicationIconBadgeNumber(badge: number) => void
`| Param | Type |
| ----------- | ------------------- |
|
badge | number |--------------------
$3
`typescript
getLaunchNotification() => { notification: string; }
`Returns: { notification: string; }
--------------------
$3
`typescript
clearLaunchNotification() => void
`--------------------
$3
`typescript
setUserId(userId: string) => void
`| Param | Type |
| ------------ | ------------------- |
|
userId | string |--------------------
$3
`typescript
setLanguage(language: string) => void
`| Param | Type |
| -------------- | ------------------- |
|
language | string |--------------------
$3
`typescript
setApiToken(token: string) => void
`| Param | Type |
| ----------- | ------------------- |
|
token | string |--------------------
$3
`typescript
postEvent(event: string, attributes?: Record | undefined) => void
`| Param | Type |
| ---------------- | --------------------------------------------------------------- |
|
event | string |
| attributes | Record<string, string> |--------------------
$3
`typescript
setMultiNotificationMode() => Promise
`--------------------
$3
`typescript
setSingleNotificationMode() => Promise
`--------------------
$3
`typescript
pushReceivedCallback(callback: PushwooshNotificationCallback) => Promise
`| Param | Type |
| -------------- | --------------------------------------------------------------------------------------- |
|
callback | PushwooshNotificationCallback |Returns: Promise<string>
--------------------
$3
`typescript
pushOpenedCallback(callback: PushwooshNotificationCallback) => Promise
`| Param | Type |
| -------------- | --------------------------------------------------------------------------------------- |
|
callback | PushwooshNotificationCallback |Returns: Promise<string>
--------------------
$3
`typescript
presentInboxUI(params?: Record | undefined) => void
`| Param | Type |
| ------------ | ------------------------------------------------------------ |
|
params | Record<string, any> |--------------------
$3
`typescript
setCommunicationEnabled(enabled: boolean) => Promise<{ result: void | string; }>
`| Param | Type |
| ------------- | -------------------- |
|
enabled | boolean |Returns: Promise<{ result: string | void; }>
--------------------
$3
`typescript
isCommunicationEnabled(success: (enabled: boolean) => void) => void
`| Param | Type |
| ------------- | ------------------------------------------ |
|
success | (enabled: boolean) => void |--------------------
$3
#### PushwooshConfig
| Prop | Type |
| ----------------- | ------------------- |
|
projectid | string |
| appid | string |
| serviceName` | string |
#### PushwooshTags
#### AuthOptions
Record<string, number|string>
#### Record
Construct a type with a set of properties K of type T
{
[P in K]: T;
}
#### RemoteNotificationStatus
Record<string,string|number|boolean>
#### PushwooshNotificationCallback
(message: string | null, err?: any): void
#### CallbackID
string