Update 90.md with Customer Feedback Event

This commit is contained in:
Dustin Dannenhauer 2024-01-11 05:39:21 +00:00 committed by GitHub
parent 8331354947
commit 0efe7711a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
90.md
View File

@ -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. 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": "<empty-or-payload>",
"tags": [
["e", "<job-request-id>", "<relay-hint>"],
["p", "<customer's-pubkey>"],
],
...
}
```
* `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 # 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.). * 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. * 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 * 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. 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.