From 6be74a19f3d3f999145d17ac8e91c59db2502071 Mon Sep 17 00:00:00 2001 From: Jef LeCompte Date: Sat, 19 Sep 2020 13:07:53 -0400 Subject: [PATCH] feat(notification): add telus sms Signed-off-by: Jef LeCompte --- README.md | 16 +++++++++++++--- src/config.ts | 9 +++++---- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 28c6b6d..2ae7389 100644 --- a/README.md +++ b/README.md @@ -68,12 +68,12 @@ First, you're going to need to copy the `.env.example` to `.env`. The current op | `EMAIL_PASSWORD` | Gmail password; see below if you have MFA; optional | | `NOTIFICATION_TEST` | Test all the notifications configured; optional, default: `false` | | `PAGE_TIMEOUT` | Navigation Timeout in milliseconds (`0` for infinite); optional, default: `30000` | -| `PHONE_NUMBER` | 10 digit phone number, only USA, SMS may apply (e.g., `1234567890`); optional, email configuration required | -| `PHONE_CARRIER` | Service provider for SMS, supports `["sprint", "tmobile", "att", "verizon", "google"]`; optional, email configuration required | +| `PHONE_NUMBER` | 10 digit phone number (e.g., `1234567890`); optional, email configuration required | +| `PHONE_CARRIER` | [Supported carriers](#supported-carriers) for SMS; optional, email configuration required | | `RATE_LIMIT_TIMEOUT` | Rate limit timeout for each full store cycle; optional, default: `5000` | | `SLACK_CHANNEL` | Slack channel for posting (e.g., `update`); optional | | `SLACK_TOKEN` | Slack API token; optional -| `STORES` | List of [stores](#Supported-stores) you want to be scraped; optional, default: `nvidia` | +| `STORES` | [Supported stores](#supported-stores) you want to be scraped; optional, default: `nvidia` | | `OPEN_BROWSER` | Toggle for whether or not the browser should open when item is found, default: `true` | | `PLAY_SOUND` | Play this sound notification if a card is found.; optional | | `SCREENSHOT` | Capture screenshot of page on successful hit; optional, default `true` | @@ -96,6 +96,16 @@ First, you're going to need to copy the `.env.example` to `.env`. The current op > :point_right: Look at [`.env.example`](.env.example) for an example for `.env`. + +#### Supported carriers + +- AT&T +- Google +- Sprint +- Telus +- T-Mobile +- Verizon + ## FAQ **Q: What's Node.js and how do I install it?** Visit [their website](https://nodejs.org/en/) and download and install it. Very straight forward. Otherwise, Google more information related to your system needs. diff --git a/src/config.ts b/src/config.ts index 4ad1b9a..c027aac 100644 --- a/src/config.ts +++ b/src/config.ts @@ -10,11 +10,12 @@ const notifications = { }, phone: { availableCarriers: new Map([ - ['sprint', 'messaging.sprintpcs.com'], - ['verizon', 'vtext.com'], - ['tmobile', 'tmomail.net'], ['att', 'txt.att.net'], - ['google', 'msg.fi.google.com'] + ['google', 'msg.fi.google.com'], + ['sprint', 'messaging.sprintpcs.com'], + ['telus', 'msg.telus.com'], + ['tmobile', 'tmomail.net'], + ['verizon', 'vtext.com'] ]), carrier: process.env.PHONE_CARRIER ?? '', number: process.env.PHONE_NUMBER ?? ''