From 322fd8b093199ce9acaf2f21954ce75ff7c0ff83 Mon Sep 17 00:00:00 2001 From: Calcifer1001 Date: Sun, 2 Apr 2023 22:25:54 -0300 Subject: [PATCH] [ADD] notification standards --- types/notificationFeed/README.md | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 types/notificationFeed/README.md diff --git a/types/notificationFeed/README.md b/types/notificationFeed/README.md new file mode 100644 index 0000000..bb90287 --- /dev/null +++ b/types/notificationFeed/README.md @@ -0,0 +1,62 @@ +# Notification Feed [Draft] + +## Schema + +The SCHEMA is to be described. + +Users get different type of notifications from users. +It should be used when you need a user to be notified of some event. This event might even happen outside Near Social. For example +- You've been mentioned on a widget. +- You are requested to do something on a website you've given permission to send you notifications + +On this notifications, you might even want to have a link to be redirected to the corresponding place, always considering security. + +## Example 1 + +In this case, Alice would create a notification to Bob letting Bob know Alice mentioned Bob in Alice's main page with no message + +```json +{ + "alice.near": { + "index": { + "notify": { + "key": "bob.near", + "value": { + "type": "mention", + "item": { + "type": "social", + "path": "alice.near/post/main", + "blockHeight": 88260018, + "message": "" + } + } + } + } + } +} +``` + +## Example 2 + +In this case, Alice would create a notification alert to Bob letting Bob know Alice played in a game along with a link to the website. For this, it is ideal to have either a whitelisted and blacklisted websites and an alert for not yet listed pages telling the user they are getting out of Near Social so they can proceed under their own risk. + +```json +{ + "alice.near": { + "index": { + "notify": { + "key": "bob.near", + "value": { + "type": "alert", + "item": { + "type": "social", + "path": "https://near.gaming", + "blockHeight": 88260018, + "message": "It's your turn" + } + } + } + } + } +} +``` \ No newline at end of file