From 0efe7711a9d4512a3ce0523a18597609c0edf2d7 Mon Sep 17 00:00:00 2001 From: Dustin Dannenhauer Date: Thu, 11 Jan 2024 05:39:21 +0000 Subject: [PATCH] Update 90.md with Customer Feedback Event --- 90.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/90.md b/90.md index 241eb38f..91455e6f 100644 --- a/90.md +++ b/90.md @@ -179,6 +179,26 @@ Service providers can give feedback about a job back to the customer. Any job feedback event MIGHT include results in the `.content` field, as described in the [Job Result](#job-result) section. This is useful for service providers to provide a sample of the results that have been processed so far. +## Customer feedback + +Customers can give feedback about a job result back to the service provider. + +```json +{ + "kind": 8000, + "content": "", + "tags": [ + ["e", "", ""], + ["p", ""], + ], + ... +} +``` + +* `content`: Feedback string to the service provider. Could be "liked", "disliked", a score between an arbitrary range, etc. The representation of the feedback should be up to the decision of the client that enables the user to interact with the service provider. DVMs may specify how they would like feedback when announcing themselves via [NIP-89 - Recommended Application Handlers](https://github.com/nostr-protocol/nips/blob/master/89.md). + +* NOTE: If the input params requires input to be encrypted, then `content` field will have encrypted payload with `p` tag as key. + # Protocol Flow @@ -186,6 +206,7 @@ Any job feedback event MIGHT include results in the `.content` field, as describ * Service Providers MAY submit `kind:7000` job-feedback events (e.g. `payment-required`, `processing`, `error`, etc.). * Upon completion, the service provider publishes the result of the job with a `kind:6000` job-result event. * At any point, if there is an `amount` pending to be paid as instructed by the service provider, the user can pay the included `bolt11` or zap the job result event the service provider has sent to the user +* (optional) Customer publishes a customer feedback `kind:8000` event Job feedback (`kind:7000`) and Job Results (`kind:6000-6999`) events MAY include an `amount` tag, this can be interpreted as a suggestion to pay. Service Providers MUST use the `payment-required` feedback event to signal that a payment is required and no further actions will be performed until the payment is sent.