pushwoosh-capacitor-plugin
v1.0.7
Published
Pushwoosh plugin for Capacitor
Downloads
142
Readme
pushwoosh-capacitor-plugin
Pushwoosh plugin for Capacitor
Install
NPM Installation
npm install [email protected]
npx cap syncGit Installation
npm install git+https://github.com/Pushwoosh/pushwoosh-capacitor-plugin.git#1.0.7
npx cap syncAPI
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
onDeviceReady(...)
onDeviceReady(config: PushwooshConfig) => void| Param | Type |
| ------------ | ----------------------------------------------------------- |
| config | PushwooshConfig |
registerDevice()
registerDevice() => Promise<{ pushToken: string; }>Returns: Promise<{ pushToken: string; }>
unregisterDevice()
unregisterDevice() => Promise<void>additionalAuthorizationOptions(...)
additionalAuthorizationOptions(options: AuthOptions) => void| Param | Type |
| ------------- | --------------------------------------------------- |
| options | AuthOptions |
setTags(...)
setTags(config: PushwooshTags) => Promise<void>| Param | Type |
| ------------ | ------------------------------------------------------- |
| config | PushwooshTags |
getTags()
getTags() => Promise<{ tags: PushwooshTags; }>Returns: Promise<{ tags: PushwooshTags; }>
getPushToken()
getPushToken() => { value: string | null; }Returns: { value: string | null; }
getPushwooshHWID()
getPushwooshHWID() => { value: string | null; }Returns: { value: string | null; }
getRemoteNotificationStatus()
getRemoteNotificationStatus() => Promise<{ status: RemoteNotificationStatus; }>Returns: Promise<{ status: RemoteNotificationStatus; }>
setApplicationIconBadgeNumber(...)
setApplicationIconBadgeNumber(badge: number) => void| Param | Type |
| ----------- | ------------------- |
| badge | number |
getApplicationIconBadgeNumber()
getApplicationIconBadgeNumber() => Promise<{ badge: number; }>Returns: Promise<{ badge: number; }>
addToApplicationIconBadgeNumber(...)
addToApplicationIconBadgeNumber(badge: number) => void| Param | Type |
| ----------- | ------------------- |
| badge | number |
getLaunchNotification()
getLaunchNotification() => { notification: string; }Returns: { notification: string; }
clearLaunchNotification()
clearLaunchNotification() => voidsetUserId(...)
setUserId(userId: string) => void| Param | Type |
| ------------ | ------------------- |
| userId | string |
setLanguage(...)
setLanguage(language: string) => void| Param | Type |
| -------------- | ------------------- |
| language | string |
setApiToken(...)
setApiToken(token: string) => void| Param | Type |
| ----------- | ------------------- |
| token | string |
postEvent(...)
postEvent(event: string, attributes?: Record<string, string> | undefined) => void| Param | Type |
| ---------------- | --------------------------------------------------------------- |
| event | string |
| attributes | Record<string, string> |
setMultiNotificationMode()
setMultiNotificationMode() => Promise<void>setSingleNotificationMode()
setSingleNotificationMode() => Promise<void>pushReceivedCallback(...)
pushReceivedCallback(callback: PushwooshNotificationCallback) => Promise<CallbackID>| Param | Type |
| -------------- | --------------------------------------------------------------------------------------- |
| callback | PushwooshNotificationCallback |
Returns: Promise<string>
pushOpenedCallback(...)
pushOpenedCallback(callback: PushwooshNotificationCallback) => Promise<CallbackID>| Param | Type |
| -------------- | --------------------------------------------------------------------------------------- |
| callback | PushwooshNotificationCallback |
Returns: Promise<string>
presentInboxUI(...)
presentInboxUI(params?: Record<string, any> | undefined) => void| Param | Type |
| ------------ | ------------------------------------------------------------ |
| params | Record<string, any> |
setCommunicationEnabled(...)
setCommunicationEnabled(enabled: boolean) => Promise<{ result: void | string; }>| Param | Type |
| ------------- | -------------------- |
| enabled | boolean |
Returns: Promise<{ result: string | void; }>
isCommunicationEnabled(...)
isCommunicationEnabled(success: (enabled: boolean) => void) => void| Param | Type |
| ------------- | ------------------------------------------ |
| success | (enabled: boolean) => void |
Interfaces
PushwooshConfig
| Prop | Type |
| ----------------- | ------------------- |
| projectid | string |
| appid | string |
| serviceName | string |
PushwooshTags
Type Aliases
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
