Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
2,394 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
### Table of Contents | ||
|
||
- ./server | ||
- [./server/gun.md](./server/gun.md) | ||
- [./server/mautic.md](./server/mautic.md) | ||
- [./server/send.md](./server/send.md) | ||
- [./server/utils.md](./server/utils.md) | ||
- [./server/verification.md](./server/verification.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [GunDB][1] | ||
- [init][2] | ||
- [Parameters][3] | ||
- [recordSanitize][4] | ||
- [Parameters][5] | ||
|
||
## GunDB | ||
|
||
### init | ||
|
||
#### Parameters | ||
|
||
- `server` **(any | null)** | ||
- `password` **[string][6]** SEA password for GoodDollar user | ||
- `name` **[string][6]** folder to store gundb | ||
- `s3` **\[S3Conf]** optional S3 settings instead of local file storage | ||
|
||
Returns **[Promise][7]<[boolean][8]>** | ||
|
||
### recordSanitize | ||
|
||
remove the soul field(\_) from gun records | ||
|
||
#### Parameters | ||
|
||
- `obj` **any** (optional, default `{}`) | ||
- `gun` **any** record | ||
|
||
[1]: #gundb | ||
|
||
[2]: #init | ||
|
||
[3]: #parameters | ||
|
||
[4]: #recordsanitize | ||
|
||
[5]: #parameters-1 | ||
|
||
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String | ||
|
||
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise | ||
|
||
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [Mautic][1] | ||
|
||
## Mautic | ||
|
||
[1]: #mautic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [sendRecoveryInstructionsByEmail][1] | ||
- [sendRecoveryInstructionsByEmail][2] | ||
- [Parameters][3] | ||
- [sendEmailConfirmationLink][4] | ||
- [Parameters][5] | ||
|
||
## sendRecoveryInstructionsByEmail | ||
|
||
## sendRecoveryInstructionsByEmail | ||
|
||
Sends an email with recovery instructions to the user's registered email through SendGrid. | ||
Send it by an API using a Transactional Template | ||
|
||
### Parameters | ||
|
||
- `to` **[string][6]** User email | ||
- `name` **[string][6]** User name | ||
- `key` **[string][6]** Mnemonic key | ||
|
||
Returns **([Promise][7]<R> | [Promise][7]<(R | any)>)** | ||
|
||
## sendEmailConfirmationLink | ||
|
||
Sends an email to the user's registered email through SendGrid.send API using a Transactional Template | ||
|
||
### Parameters | ||
|
||
- `user` **UserRecord** User profile | ||
|
||
Returns **([Promise][7]<R> | [Promise][7]<(R | any)>)** | ||
|
||
[1]: #sendrecoveryinstructionsbyemail | ||
|
||
[2]: #sendrecoveryinstructionsbyemail-1 | ||
|
||
[3]: #parameters | ||
|
||
[4]: #sendemailconfirmationlink | ||
|
||
[5]: #parameters-1 | ||
|
||
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String | ||
|
||
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [wrapAsync][1] | ||
- [Parameters][2] | ||
- [lightLogs][3] | ||
- [Parameters][4] | ||
- [onlyInEnv][5] | ||
- [Parameters][6] | ||
|
||
## wrapAsync | ||
|
||
Make sure to `.catch()` any errors and pass them along to the `next()` | ||
middleware in the chain, in this case the error handler. | ||
|
||
### Parameters | ||
|
||
- `fn` **[Function][7]** | ||
|
||
Returns **[Function][7]** | ||
|
||
## lightLogs | ||
|
||
Prevents logging header information when logging | ||
|
||
### Parameters | ||
|
||
- `fn` **[Function][7]** | ||
|
||
Returns **[Function][7]** | ||
|
||
## onlyInEnv | ||
|
||
If in production execute the following middleware | ||
|
||
### Parameters | ||
|
||
- `environments` **...[Array][8]<[string][9]>** | ||
- `req` | ||
- `res` | ||
- `next` | ||
|
||
[1]: #wrapasync | ||
|
||
[2]: #parameters | ||
|
||
[3]: #lightlogs | ||
|
||
[4]: #parameters-1 | ||
|
||
[5]: #onlyinenv | ||
|
||
[6]: #parameters-2 | ||
|
||
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function | ||
|
||
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array | ||
|
||
[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [verifyEmail][1] | ||
- [Parameters][2] | ||
- [post][3] | ||
|
||
## verifyEmail | ||
|
||
Verifies a user's email using its profile and the verification code | ||
|
||
### Parameters | ||
|
||
- `user` **UserRecord** User profile | ||
- `verificationData` **[object][4]** object sent by the client with required verification data | ||
- `verificationData.code` **[string][5]** code used to verify that the email is valid | ||
|
||
Returns **[Promise][6]<([boolean][7] \| [Error][8])>** | ||
|
||
## post | ||
|
||
Send verification email endpoint | ||
|
||
[1]: #verifyemail | ||
|
||
[2]: #parameters | ||
|
||
[3]: #post | ||
|
||
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object | ||
|
||
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String | ||
|
||
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise | ||
|
||
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean | ||
|
||
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error |
Oops, something went wrong.