0.2.0 • Published 2 years ago

guest-feedback-module v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

🚀 Welcome to the Guest Feedback Module

Description

This project is a one stop shop for gathering guest feedback via email. By making the usage as simple as possible as well as making it platform agnostic it makes it possible to add to virtually any project.

Intallation

Intalling the library in a project is as simple as:

npm install guest-feedback-module

Usage

Import the class from the library Instantiate it with your api key Then bind the 'gatherFeedback' to any event you would like.

Here is an example binding the method to a button click handler:

import GuestFeedback from "guest-feedback-module";
const gfm = new GuestFeedback("yourApiKeyGoesHere");
const appConfig = {
  appSpecificText:
    "body of the email you want sent goes here, useful if you want to talk about dateleg, app, how this was collected etc...",
  Subject: "subject line of the email",
};

The project ships with typescript definitions, weather you use them or not you should be able to get hints on the valid users

<button onClick="gfm.gatherFeedback(['rafa', 'another valid user'], appConfig)">
  clickMe
</button>

Note: The emails is an array and supports you adding as many emails to the distribution list as you would like.

Internal API

send-request-to-api

inputs ( key: string ), ( email: {To, From, HtmlBody, Subject} ) it appends the api key to the query parameters as 'key' performs the axios request returns (statusCodes: 200, 400, 500)

generate-email-from-input

Generate the template Return the email object

handle-email-request REMOTE

get key from query parameter of name key sha256 it and compare it to the known sample -- diff entrypoint if 1 send prod email then send 200 if 0 send 400 if -1 send 200 and send test email

validate-key REMOTE

input -- key: string apply sha256 to the key compare it to the known keys dictionary return ValidationResult_

get-secret REMOTE

import google secrets manager pull the secret path from the config start a new secrets manager instance use the instance to return the secret value

Screenshots

User Interface

Usr-interface

Email Notification

Email-notificaiton

Made With

coco-oil

unpack-emails REMOTE

get the users array from the To field of the email map the users array to an actual email return a new email with actual emails in the to field

0.2.0

2 years ago

0.1.24

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago