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 🙏

© 2024 – Pkg Stats / Ryan Hefner

catapush-capacitor

v1.4.0

Published

Catapush plugin for Capacitor.<br />See the [SETUP.md](SETUP.md) file for the complete installation guide

Downloads

6

Readme

catapush-capacitor

Catapush plugin for Capacitor.See the SETUP.md file for the complete installation guide.

Install

npm install catapush-capacitor
npx cap sync

API

setCatapushMessageDelegate(...)

setCatapushMessageDelegate(delegate: CatapushMessageDelegate) => Promise<void>

Sets a delegate that gets notified about new received or sent messages

| Param | Type | Description | | -------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | delegate | CatapushMessageDelegate | Object that implements the CatapushMessageDelegate interface callbacks |


setCatapushStateDelegate(...)

setCatapushStateDelegate(delegate: CatapushStateDelegate) => Promise<void>

Sets a delegate that gets notified when the status of the SDK changes

| Param | Type | Description | | -------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | delegate | CatapushStateDelegate | Object that implements the CatapushStateDelegate interface callbacks |


init(...)

init(options: { appId: string; }) => Promise<void>

Inits the Catapush native SDK.

| Param | Type | Description | | ------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | options | { appId: string; } | Your Catapush app ID needed to instantiate the iOS native SDK that can be retrieved from your Catapush dashboard. |


setUser(...)

setUser(options: { identifier: string; password: string; }) => Promise<void>

Sets the user credentials in the Catapush native SDK.

| Param | Type | Description | | ------------- | ------------------------------------------------------ | ------------------------------------------- | | options | { identifier: string; password: string; } | Your Catapush user identifier and password. |


start()

start() => Promise<void>

Start the Catapush native service.


allMessages()

allMessages() => Promise<AllMessagesResponse>

Retrieve all the Catapush messages stored for the current user.

Returns: Promise<AllMessagesResponse>


enableLog(...)

enableLog(options: { enabled: boolean; }) => Promise<void>

Enable the Catapush native SDK logging.

| Param | Type | Description | | ------------- | ---------------------------------- | ------------------------------------------------------------------------- | | options | { enabled: boolean; } | Enable or disable logging passing true or false in the enabled attribute. |


sendMessage(...)

sendMessage(options: SendMessageParams) => Promise<void>

Send a message to the Catapush server for delivery.

| Param | Type | Description | | ------------- | --------------------------------------------------------------- | ---------------------------------------------- | | options | SendMessageParams | The attributes of the message to be delivered. |


getAttachmentUrlForMessage(...)

getAttachmentUrlForMessage(options: MessageIdParams) => Promise<CatapushFile>

Get a message attachment URL.

| Param | Type | Description | | ------------- | ----------------------------------------------------------- | ------------------------------------------------------------- | | options | MessageIdParams | The ID of the message whose attachment needs to be retrieved. |

Returns: Promise<CatapushFile>


resumeNotifications()

resumeNotifications() => Promise<void>

Resume displaying notification to the user. This setting is not persisted across Catapush SDK/app restarts. Android only.


pauseNotifications()

pauseNotifications() => Promise<void>

Pause displaying notification to the user. This setting is not persisted across Catapush SDK/app restarts. Android only.


enableNotifications()

enableNotifications() => Promise<void>

Enable the notification of messages to the user in the status bar. This setting is persisted across Catapush SDK/app restarts. Android only.


disableNotifications()

disableNotifications() => Promise<void>

Disable the notification of messages to the user in the status bar. This setting is persisted across Catapush SDK/app restarts. Android only.


sendMessageReadNotificationWithId(...)

sendMessageReadNotificationWithId(options: { id: string; }) => Promise<void>

Send the read notification of a message to the Catapush server.

| Param | Type | Description | | ------------- | ---------------------------- | ------------------------------------------- | | options | { id: string; } | The ID of the message to be marked as read. |


Interfaces

CatapushMessageDelegate

| Method | Signature | | ------------------------------ | -------------------------------------------------------------------- | | catapushMessageReceived | (message: CatapushMessage) => void | | catapushMessageSent | (message: CatapushMessage) => void | | catapushNotificationTapped | (message: CatapushMessage) => void |

CatapushMessage

| Prop | Type | | ------------------- | --------------------------------------------------------------------- | | id | string | | sender | string | | body | string | | subject | string | | previewText | string | | hasAttachment | boolean | | channel | string | | replyToId | string | | optionalData | Map<string, any> | | receivedTime | Date | | readTime | Date | | sentTime | Date | | state | CatapushMessageState |

Map

| Prop | Type | | ---------- | ------------------- | | size | number |

| Method | Signature | | ----------- | -------------------------------------------------------------------------------------------------------------- | | clear | () => void | | delete | (key: K) => boolean | | forEach | (callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any) => void | | get | (key: K) => V | undefined | | has | (key: K) => boolean | | set | (key: K, value: V) => this |

Date

Enables basic storage and retrieval of dates and times.

| Method | Signature | Description | | ---------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | | toString | () => string | Returns a string representation of a date. The format of the string depends on the locale. | | toDateString | () => string | Returns a date as a string value. | | toTimeString | () => string | Returns a time as a string value. | | toLocaleString | () => string | Returns a value as a string value appropriate to the host environment's current locale. | | toLocaleDateString | () => string | Returns a date as a string value appropriate to the host environment's current locale. | | toLocaleTimeString | () => string | Returns a time as a string value appropriate to the host environment's current locale. | | valueOf | () => number | Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. | | getTime | () => number | Gets the time value in milliseconds. | | getFullYear | () => number | Gets the year, using local time. | | getUTCFullYear | () => number | Gets the year using Universal Coordinated Time (UTC). | | getMonth | () => number | Gets the month, using local time. | | getUTCMonth | () => number | Gets the month of a Date object using Universal Coordinated Time (UTC). | | getDate | () => number | Gets the day-of-the-month, using local time. | | getUTCDate | () => number | Gets the day-of-the-month, using Universal Coordinated Time (UTC). | | getDay | () => number | Gets the day of the week, using local time. | | getUTCDay | () => number | Gets the day of the week using Universal Coordinated Time (UTC). | | getHours | () => number | Gets the hours in a date, using local time. | | getUTCHours | () => number | Gets the hours value in a Date object using Universal Coordinated Time (UTC). | | getMinutes | () => number | Gets the minutes of a Date object, using local time. | | getUTCMinutes | () => number | Gets the minutes of a Date object using Universal Coordinated Time (UTC). | | getSeconds | () => number | Gets the seconds of a Date object, using local time. | | getUTCSeconds | () => number | Gets the seconds of a Date object using Universal Coordinated Time (UTC). | | getMilliseconds | () => number | Gets the milliseconds of a Date, using local time. | | getUTCMilliseconds | () => number | Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). | | getTimezoneOffset | () => number | Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). | | setTime | (time: number) => number | Sets the date and time value in the Date object. | | setMilliseconds | (ms: number) => number | Sets the milliseconds value in the Date object using local time. | | setUTCMilliseconds | (ms: number) => number | Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). | | setSeconds | (sec: number, ms?: number | undefined) => number | Sets the seconds value in the Date object using local time. | | setUTCSeconds | (sec: number, ms?: number | undefined) => number | Sets the seconds value in the Date object using Universal Coordinated Time (UTC). | | setMinutes | (min: number, sec?: number | undefined, ms?: number | undefined) => number | Sets the minutes value in the Date object using local time. | | setUTCMinutes | (min: number, sec?: number | undefined, ms?: number | undefined) => number | Sets the minutes value in the Date object using Universal Coordinated Time (UTC). | | setHours | (hours: number, min?: number | undefined, sec?: number | undefined, ms?: number | undefined) => number | Sets the hour value in the Date object using local time. | | setUTCHours | (hours: number, min?: number | undefined, sec?: number | undefined, ms?: number | undefined) => number | Sets the hours value in the Date object using Universal Coordinated Time (UTC). | | setDate | (date: number) => number | Sets the numeric day-of-the-month value of the Date object using local time. | | setUTCDate | (date: number) => number | Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). | | setMonth | (month: number, date?: number | undefined) => number | Sets the month value in the Date object using local time. | | setUTCMonth | (month: number, date?: number | undefined) => number | Sets the month value in the Date object using Universal Coordinated Time (UTC). | | setFullYear | (year: number, month?: number | undefined, date?: number | undefined) => number | Sets the year of the Date object using local time. | | setUTCFullYear | (year: number, month?: number | undefined, date?: number | undefined) => number | Sets the year value in the Date object using Universal Coordinated Time (UTC). | | toUTCString | () => string | Returns a date converted to a string using Universal Coordinated Time (UTC). | | toISOString | () => string | Returns a date as a string value in ISO format. | | toJSON | (key?: any) => string | Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. |

CatapushStateDelegate

| Method | Signature | | ------------------------ | -------------------------------------------------------------- | | catapushStateChanged | (state: CatapushState) => void | | catapushHandleError | (error: CatapushError) => void |

CatapushError

| Prop | Type | | ----------- | ------------------- | | event | string | | code | number |

AllMessagesResponse

| Prop | Type | | -------------- | ------------------------------ | | messages | CatapushMessage[] |

SendMessageParams

| Prop | Type | | ------------- | ----------------------------------------------------- | | body | string | | channel | string | | replyTo | string | | file | CatapushFile |

CatapushFile

| Prop | Type | | -------------- | ------------------- | | mimeType | string | | url | string |

MessageIdParams

| Prop | Type | | -------- | ------------------- | | id | string |

Enums

CatapushMessageState

| Members | Value | | ------------------------ | --------------------------------- | | RECEIVED | 'RECEIVED' | | RECEIVED_CONFIRMED | 'RECEIVED_CONFIRMED' | | OPENED | 'OPENED' | | OPENED_CONFIRMED | 'OPENED_CONFIRMED' | | NOT_SENT | 'NOT_SENT' | | SENT | 'SENT' | | SENT_CONFIRMED | 'SENT_CONFIRMED' |

CatapushState

| Members | Value | | ------------------ | --------------------------- | | DISCONNECTED | 'DISCONNECTED' | | CONNECTING | 'CONNECTING' | | CONNECTED | 'CONNECTED' |