1
0
mirror of https://codeberg.org/fediverse/fep.git synced 2026-08-07 12:55:46 +00:00

FEP-0837: Update proposal (#799)

- Specified that `hasNumericalValue` is a decimal string.
- Using `currencyAmount` unit for currency in examples.
- Made `resourceConformsTo` property required.

Reviewed-on: https://codeberg.org/fediverse/fep/pulls/799
Co-authored-by: silverpill <silverpill@firemail.cc>
Co-committed-by: silverpill <silverpill@firemail.cc>
This commit is contained in:
silverpill
2026-03-23 13:17:38 +01:00
committed by silverpill
parent 2fc8f4b920
commit 1f3b850135
+10 -8
View File
@@ -64,10 +64,10 @@ The representation of an intent is a JSON document with the following properties
- `id` (REQUIRED): the unique global identifier of the intent. Implementations SHOULD use URI fragments to identify intents associated with a given proposal. The RECOMMENDED fragment identifiers for primary and reciprocal intents are `primary` and `reciprocal`.
- `type` (REQUIRED): the type of the object MUST be `Intent`.
- `action` (REQUIRED): the type of economic transaction. The value of this property SHOULD be either `deliverService` or `transfer`.
- `resourceConformsTo` (RECOMMENDED): the type of an economic resource. Could be any URI.
- `resourceConformsTo` (REQUIRED): the type of an economic resource. Could be any URI.
- `resourceQuantity` (REQUIRED): the amount and unit of the economic resource. This is an object with two properties:
- `hasUnit` (REQUIRED): name of the unit, according to [Ontology of units of Measure][OntologyOfUnits] classification. The RECOMMENDED unit for countable items is `one`.
- `hasNumericalValue` (OPTIONAL): the amount of the resource. If not specified, arbitrary amounts can be used when responding to the proposal.
- `hasNumericalValue` (OPTIONAL): the amount of the resource, represented as a decimal string. If not specified, arbitrary amounts can be used when responding to the proposal.
- `availableQuantity` (OPTIONAL): the quantity of the offered resource currently available.
- `minimumQuantity` (OPTIONAL): the minimum possible quantity of the resource.
@@ -86,6 +86,7 @@ Minimal example:
"purpose": "vf:purpose",
"unitBased": "vf:unitBased",
"publishes": "vf:publishes",
"resourceConformsTo": "vf:resourceConformsTo",
"resourceQuantity": "vf:resourceQuantity",
"hasUnit": "om2:hasUnit",
"hasNumericalValue": "om2:hasNumericalValue"
@@ -99,6 +100,7 @@ Minimal example:
"type": "Intent",
"id": "https://market.example/proposals/ddde9d6f-6f3b-4770-a966-3a18ef006930#primary",
"action": "transfer",
"resourceConformsTo": "https://www.wikidata.org/wiki/Q11442",
"resourceQuantity": {
"hasUnit": "one",
"hasNumericalValue": "1"
@@ -168,8 +170,8 @@ Full example:
"action": "transfer",
"resourceConformsTo": "https://www.wikidata.org/wiki/Q4917",
"resourceQuantity": {
"hasUnit": "one",
"hasNumericalValue": "30"
"hasUnit": "currencyAmount",
"hasNumericalValue": "30.00"
}
},
"unitBased": false,
@@ -273,8 +275,8 @@ Example of an `Offer(Agreement)` activity:
"type": "Commitment",
"satisfies": "https://market.example/proposals/ddde9d6f-6f3b-4770-a966-3a18ef006930#reciprocal",
"resourceQuantity": {
"hasUnit": "one",
"hasNumericalValue": "30"
"hasUnit": "currencyAmount",
"hasNumericalValue": "30.00"
}
}
},
@@ -333,8 +335,8 @@ Example:
"type": "Commitment",
"satisfies": "https://market.example/proposals/ddde9d6f-6f3b-4770-a966-3a18ef006930#reciprocal",
"resourceQuantity": {
"hasUnit": "one",
"hasNumericalValue": "30"
"hasUnit": "currencyAmount",
"hasNumericalValue": "30.00"
}
},
"url": {