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

@unisyn/notify-client

v1.0.3

Published

PubSub client for Notification Broker System

Downloads

7

Readme

Notification Service Client

Usage

# build
npm run build

# run
npm run dev

| Queue Type | Channel/Topic Name | Pub/Sub | Pinpoint | Destination | Notify Type Index | Status | |:----------:|:-------------------|:-------:|:--------:|:-----------:|:-----------------:|:------:| | standard | sms | x | x | SMS | 3 | Done | | standard | sms_template | x | x | SMS | 3 | Done | | | | | | | | | | standard | push_data | x | x | PUSH | 1 | Done | | standard | push_data_template | x | x | PUSH | 1 | To Do | | standard | push | x | x | PUSH | 1 | Done | | standard | push_template | x | x | PUSH | 1 | To Do | | | | | | | | | | standard | mail | x | x | MAIL | 2 | Done | | standard | mail_template | x | x | MAIL | 2 | Done | | | | | | | | | | standard | in_app | x | x | INAPP | 4 | To Do | | | | | | | | |

| Category id | Category Name | Status | |:-----------:|:----------------|:------:| | 1 | Announcement | active | | 2 | Reminders | active | | 3 | System Messages | active | | 4 | Campaigns | active |


Queue Data Models

PUSH

| Field | Data Type | Default Value | Default In | Relation | Is Required | Details | |:---------------|:------------------|:-------------:|:----------:|:-------------:|:-----------------------------:|:--------------------------------------------------| | application_id | string | | ENV | | Optional | Application ID of Pinpoint | | action | string | | ENV | | Optional | Extra Params [URL, OPEN_APP, DEEP_LINK] | | image | string | | ENV | | Optional | Header image for push notification | | icon | string | | ENV | | Optional | Logo/Icon image for push notification | | data | map[string]string | | | | Optional | Ex. Data : {"type_of": "alarm","page": "booster"} | | priority | string | high | ENV | | Optional | [normal, high] | | destination | string | | | | Required | Notification Token | | title | string | | | | Required | Title of Push Notification | | message | string | | | | Required | Message Body Push Notification | | url | string | | ENV | On Action:URL | Optional | onClick URL |

# Pub/Sub Payload
{
  "application_id": "PINPOINT_APP_ID",
  "action": "URL",
  "image": "HEADER_IMAGE_URL",
  "icon": "ICON_URL",
  "data": {
    "type_of": "alarm",
    "page": "booster"
  },
  "priority": "high",
  "destination": "NOTIFICATION_TOKEN",
  "title": "Message Title",
  "message": "Message Content ",
  "url": "http://webpage.net"
}

# About Priority
# normal - The notification might be delayed. Delivery is optimized for battery usage on the recipient's device. Use this value unless immediate delivery is required.
# high - The notification is sent immediately and might wake a sleeping device.
# Amazon Pinpoint specifies this value in the FCM priority parameter when it sends the notification message to FCM.
# The equivalent values for Apple Push Notification service (APNs) are 5, for normal, and 10, for high. If you specify an APNs value for this property,
# Amazon Pinpoint accepts and converts the value to the corresponding FCM value

PUSH With Template

# In Progress

E-MAIL custom

| Field | Data Type | Default Value | Default In | Is Required | Details | |:---------------|:----------|:-------------:|:----------:|:-----------------------------:|:------------------------------------------| | application_id | string | In Env | ENV | Optional | Application ID of Pinpoint | | sender_id | string | In Env | ENV | Optional | E-mail Sender ID | | message_type | string | TRANSACTIONAL | ENV | Optional | Extra Params [TRANSACTIONAL, PROMOTIONAL] | | destination | string | | | Required | Receiver e-mail address | | subject | string | | | Required | MAIL content | | message | string | | | Required | MAIL content |

# Pub/Sub Payload
{
  "application_id": "PINPOINT_APP_ID",
  "sender_id": "[email protected]",
  "message_type": "TRANSACTIONAL",
  "destination": "[email protected]",
  "subject": "MAIL_SUBJECT",
  "message": "MAIL_CONTENT"
}

E-MAIL with template

| Field | Data Type | Default Value | Default In | Is Required | Details | |:---------------|:----------|:-------------:|:----------:|:-----------------------------:|:--------------------------------------------| | application_id | string | In Env | ENV | Optional | Application ID of Pinpoint | | sender_id | string | In Env | ENV | Optional | SMS Sender ID or Header | | message_type | string | TRANSACTIONAL | ENV | Optional | Extra Params [TRANSACTIONAL, PROMOTIONAL] | | destination | string | | | Required | Phone number | | template_name | string | | | Required | Template Name [welcome, pass reset, etc...] | | placeholders | string | | | Required | Placeholders for template |

# Pub/Sub Payload
{
  "application_id": "PINPOINT_APP_ID",
  "sender_id": "[email protected]",
  "message_type": "TRANSACTIONAL",
  "destination": "[email protected]",
  "template_name": "mail_welcome",
  "placeholders": {
    "Name": "Sercan",
    "Surname": "REYHANLI"
  }
}

SMS Normal

| Field | Data Type | Default Value | Default In | Is Required | Details | |:---------------|:----------|:-------------:|:----------:|:-----------------------------:|:------------------------------------------| | application_id | string | In Env | ENV | Optional | Application ID of Pinpoint | | sender_id | string | In Env | ENV | Optional | SMS Sender ID or Header | | destination | string | | | Required | Phone number | | message_type | string | TRANSACTIONAL | ENV | Required | Extra Params [TRANSACTIONAL, PROMOTIONAL] | | message | string | | | Required | SMS content |

# Pub/Sub Payload
{
  "application_id": "PINPOINT_APP_ID",
  "sender_id": "+90532165xxXX",
  "message_type": "TRANSACTIONAL",
  "destination": "+90532165xxXX",
  "message": "Message Content"
}

SMS With Template

| Field | Data Type | Default Value | Default In | Is Required | Details | |:---------------|:----------|:-------------:|:----------:|:-----------------------------:|:--------------------------------------------| | application_id | string | In Env | ENV | Optional | Application ID of Pinpoint | | sender_id | string | In Env | ENV | Optional | SMS Sender ID or Header | | destination | string | | | Required | Phone number | | message_type | string | TRANSACTIONAL | ENV | Required | Extra Params [TRANSACTIONAL, PROMOTIONAL] | | template_name | string | | | Required | Template Name [welcome, pass reset, etc...] | | placeholders | string | | | Required | Placeholders for template |

# Pub/Sub Payload
{
  "application_id": "PINPOINT_APP_ID",
  "sender_id": "+90532165xxXX",
  "message_type": "TRANSACTIONAL",
  "destination": "+90532165xxXX",
  "template_name": "welcome_message",
  "placeholders": {
    "FirstName": [
      "Sercan !"
    ],
    "LastName": [
      "REYHANLI"
    ]
  }
}

ENV KEYS

# Used Keys

## PUSH
PUSH_QUEUE_DATA: "push_data"
PUSH_QUEUE_DATA_TEMPLATE: "push_data_template"
PUSH_QUEUE_NOTIFY: "push"
PUSH_QUEUE_NOTIFY_TEMPLATE: "push_template"

## SMS
SMS_QUEUE_NORMAL: "sms"
SMS_QUEUE_NORMAL_TEMPLATE: "sms_template"
SMS_QUEUE_OTP: "otp_sms"
SMS_QUEUE_OTP_TEMPLATE: "otp_sms_template"

## MAIL
MAIL_QUEUE_NORMAL: "mail"
MAIL_QUEUE_NORMAL_TEMPLATE: "mail_template"
MAIL_QUEUE_OTP: "otp_mail"
MAIL_QUEUE_OTP_TEMPLATE: "otp_mail_template"