Type Definitions
BatchReturn
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
issuers |
Object.<string, Issuer> | null |
<optional> |
Map of issuer public keys to issuer information. |
subjects |
Object.<string, Subject> | null |
<optional> |
Map of subject identifiers to subject information. |
FediverseHandle
Fediverse account of a subject or reviewer.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
handle |
string | Local part of the account. |
acct |
string | Full account, |
actor |
string | Actor URL, for |
name |
string | Display name of the account. |
Identity
The reviewer's identity as the signer holds it.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
reviewer_id |
string | The reviewer's id at the signer. |
|
did |
string |
<nullable> |
The identity. |
recovery_key |
string |
<nullable> |
The recovery key as did:key, when set. |
Identity
A reviewer identity as the reviewer server resolved it.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
did |
string | The identity. |
document |
Object | The DID document. |
aliases |
Array.<string> | The |
source |
string | Where the document came from: |
IdentityAliases
The aliases an identity document lists.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
did |
string | The identity. |
aliases |
Array.<string> | The |
IdentityKeys
The keys an identity document lists.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
did |
string | The identity. |
keys |
Object.<string, string> | Verification methods by name, as did:key;
|
Issuer
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
count |
number | Number of reviews written by this issuer. |
|
credibility |
number |
<optional> |
Credibility score for this reviewer based on review quality (0 to 1). |
Keypair
WebCrypto keypair
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
privateKey |
CryptoKey | |
publicKey |
CryptoKey |
Metadata
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
client_id |
string |
<optional> |
The identity of the client used to leave the review. When it is not provided, the origin of the page the review is written on fills it. |
nickname |
string |
<optional> |
Nickname of the reviewer. |
given_name |
string |
<optional> |
User's given name. |
family_name |
string |
<optional> |
User's family name. |
age |
number |
<optional> |
User's age must be 200 or less. |
gender |
string |
<optional> |
User's gender. |
experience_context |
string |
<optional> |
Should be one of common contexts
in which the reviewer primarly had experience with the subject:
|
is_personal_experience |
boolean |
<optional> |
Please set this flag to |
is_affiliated |
boolean |
<optional> |
Please set this flag to |
is_generated |
boolean |
<optional> |
Please set this flag to |
data_source |
string |
<optional> |
Please provide the source of the review if the review does not originate from the author. |
openid |
string |
<optional> |
OpenID identifier. |
preferred_username |
string |
<optional> |
User's preferred username. |
birthdate |
string |
<optional> |
User's birthdate. |
reviewer_index |
number |
<optional> |
Unique index used by the reviewer, usually indicating a ranking in a list. Must be a valid JavaScript safe integer (less than or equal to 9,007,199,254,740,991). |
license |
string |
<optional> |
SPDX license identifier for the review content. Must be one of "CC-BY-4.0" or "CC-BY-SA-4.0". Defaults to "CC-BY-4.0" when not specified. |
Payload
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
sub |
string | URI of the review subject. |
|
rating |
number |
<optional> |
Rating of a subject between 0 and 100. |
opinion |
string |
<optional> |
Opinion of a subject with at most 500 characters. |
action |
string |
<optional> |
Action to perform. 'delete', 'edit' and 'report_abuse' act on an existing review, which the subfield references using the urn:maresi: scheme. 'equivalence' claims that the subject equals the URI given in the opinion. 'identity' binds the signing key to the DID given as the subject (did:plc or did:web), with no rating, opinion or images. |
iat |
number |
<optional> |
Unix timestamp of when review was issued, gets filled in automatically if not provided. |
images |
Array.<Object> |
<optional> |
Array of up to 5 images to be included. |
images[].src |
string | Public URL of an image. |
|
images[].label |
string |
<optional> |
Optional label of an image. |
metadata |
Metadata |
<optional> |
Any Metadata relating to the issuer or circumstances of leaving review. See the Mangrove Review Standard for more. |
Review
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
signature |
string | JWT signature by the review issuer. |
jwt |
string | Review in JWT format. |
kid |
string | Public key of the reviewer in PEM format. |
payload |
Payload | Primary content of the review. |
Reviews
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
reviews |
Array.<Review> | A list of reviews satisfying the query. |
|
issuers |
Object.<string, Issuer> | null |
<optional> |
A map from public keys to information about issuers. |
maresi_subjects |
Object.<string, Subject> | null |
<optional> |
A map from Review identifiers ( |
Session
Session read from the signer callback URL.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
sessionToken |
string |
<nullable> |
Token for signing calls; null when the login failed. |
reviewerId |
string |
<nullable> |
The reviewer's id at the signer. |
did |
string |
<nullable> |
The reviewer's identity, the same on every login. |
state |
string |
<nullable> |
The value the app passed to |
SignResponse
Answer of the signer to a signing call.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
jwt |
string | Signed review. |
|
signature |
string | Identifies the review from now on. |
|
reviewer_id |
string | The reviewer's id at the signer. |
|
public_key |
string | PEM of the key the signer uses for the reviewer. |
|
did |
string |
<optional> |
The reviewer's identity. |
Subject
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
sub |
string | URI uniquely identifying the subject. |
quality |
number | null | Aggregate number representing quality of the subject. |
count |
number | Number of reviews given to this subject. |
opinion_count |
number | Number of reviews which included an opinion. |
positive_count |
number | Number of reviews with rating above 50 given to this subject. |
confirmed_count |
number | Number of reviews with rating above 50 and |