@fedify/vocab 2.2.0-dev.635 → 2.2.0-dev.731
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/dist/mod.cjs +1080 -1
- package/dist/mod.d.cts +422 -2
- package/dist/mod.d.ts +422 -2
- package/dist/mod.js +1079 -3
- package/dist-tests/actor.test.mjs +2 -2
- package/dist-tests/{deno-BFydpyWl.mjs → deno-D3oW1uY5.mjs} +2 -2
- package/dist-tests/intent.yaml +72 -0
- package/dist-tests/lookup.test.mjs +2 -2
- package/dist-tests/measure.yaml +32 -0
- package/dist-tests/proposal.yaml +90 -0
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-ZNOT6nzY.mjs → vocab-CGZuHaxe.mjs} +1080 -1
- package/dist-tests/vocab.test.mjs +3 -2
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +198 -0
- package/src/intent.yaml +72 -0
- package/src/measure.yaml +32 -0
- package/src/proposal.yaml +90 -0
- package/src/vocab.test.ts +6 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { C as __exportAll, g as Person, h as Organization, l as Group, r as Application, y as Service } from "./vocab-
|
|
4
|
-
import { n as version, r as esm_default, t as name } from "./deno-
|
|
3
|
+
import { C as __exportAll, g as Person, h as Organization, l as Group, r as Application, y as Service } from "./vocab-CGZuHaxe.mjs";
|
|
4
|
+
import { n as version, r as esm_default, t as name } from "./deno-D3oW1uY5.mjs";
|
|
5
5
|
import { t as getTypeId } from "./type-Cf-vxmre.mjs";
|
|
6
6
|
import { test } from "@fedify/fixture";
|
|
7
7
|
import { deepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert/strict";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { S as __commonJSMin, w as __toESM } from "./vocab-
|
|
3
|
+
import { S as __commonJSMin, w as __toESM } from "./vocab-CGZuHaxe.mjs";
|
|
4
4
|
//#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
5
5
|
var require_glob_to_regexp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
6
|
module.exports = function(glob, opts) {
|
|
@@ -1204,6 +1204,6 @@ var esm_default = new class FetchMock {
|
|
|
1204
1204
|
//#endregion
|
|
1205
1205
|
//#region deno.json
|
|
1206
1206
|
var name = "@fedify/vocab";
|
|
1207
|
-
var version = "2.2.0-dev.
|
|
1207
|
+
var version = "2.2.0-dev.731+3d1ca85e";
|
|
1208
1208
|
//#endregion
|
|
1209
1209
|
export { version as n, esm_default as r, name as t };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: Intent
|
|
3
|
+
compactName: Intent
|
|
4
|
+
uri: "https://w3id.org/valueflows/ont/vf#Intent"
|
|
5
|
+
entity: false
|
|
6
|
+
description: |
|
|
7
|
+
A proposed economic transaction describing what is being offered or requested
|
|
8
|
+
in a {@link Proposal}.
|
|
9
|
+
defaultContext:
|
|
10
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
11
|
+
- vf: "https://w3id.org/valueflows/ont/vf#"
|
|
12
|
+
om2: "http://www.ontology-of-units-of-measure.org/resource/om-2/"
|
|
13
|
+
Intent: "vf:Intent"
|
|
14
|
+
action: "vf:action"
|
|
15
|
+
resourceConformsTo:
|
|
16
|
+
"@id": "vf:resourceConformsTo"
|
|
17
|
+
"@type": "@id"
|
|
18
|
+
resourceQuantity: "vf:resourceQuantity"
|
|
19
|
+
availableQuantity: "vf:availableQuantity"
|
|
20
|
+
minimumQuantity: "vf:minimumQuantity"
|
|
21
|
+
hasUnit: "om2:hasUnit"
|
|
22
|
+
hasNumericalValue: "om2:hasNumericalValue"
|
|
23
|
+
|
|
24
|
+
properties:
|
|
25
|
+
- singularName: action
|
|
26
|
+
functional: true
|
|
27
|
+
compactName: action
|
|
28
|
+
uri: "https://w3id.org/valueflows/ont/vf#action"
|
|
29
|
+
description: |
|
|
30
|
+
The type of economic transaction. The value of this property should be
|
|
31
|
+
either `"deliverService"` or `"transfer"`.
|
|
32
|
+
range:
|
|
33
|
+
- "http://www.w3.org/2001/XMLSchema#string"
|
|
34
|
+
|
|
35
|
+
- singularName: resourceConformsTo
|
|
36
|
+
functional: true
|
|
37
|
+
compactName: resourceConformsTo
|
|
38
|
+
uri: "https://w3id.org/valueflows/ont/vf#resourceConformsTo"
|
|
39
|
+
description: |
|
|
40
|
+
The type of an economic resource. Could be any URI.
|
|
41
|
+
range:
|
|
42
|
+
- "http://www.w3.org/2001/XMLSchema#anyURI"
|
|
43
|
+
|
|
44
|
+
- singularName: resourceQuantity
|
|
45
|
+
functional: true
|
|
46
|
+
compactName: resourceQuantity
|
|
47
|
+
uri: "https://w3id.org/valueflows/ont/vf#resourceQuantity"
|
|
48
|
+
untyped: true
|
|
49
|
+
description: |
|
|
50
|
+
The amount and unit of the economic resource.
|
|
51
|
+
range:
|
|
52
|
+
- "http://www.ontology-of-units-of-measure.org/resource/om-2/Measure"
|
|
53
|
+
|
|
54
|
+
- singularName: availableQuantity
|
|
55
|
+
functional: true
|
|
56
|
+
compactName: availableQuantity
|
|
57
|
+
uri: "https://w3id.org/valueflows/ont/vf#availableQuantity"
|
|
58
|
+
untyped: true
|
|
59
|
+
description: |
|
|
60
|
+
The quantity of the offered resource currently available.
|
|
61
|
+
range:
|
|
62
|
+
- "http://www.ontology-of-units-of-measure.org/resource/om-2/Measure"
|
|
63
|
+
|
|
64
|
+
- singularName: minimumQuantity
|
|
65
|
+
functional: true
|
|
66
|
+
compactName: minimumQuantity
|
|
67
|
+
uri: "https://w3id.org/valueflows/ont/vf#minimumQuantity"
|
|
68
|
+
untyped: true
|
|
69
|
+
description: |
|
|
70
|
+
The minimum possible quantity of the resource.
|
|
71
|
+
range:
|
|
72
|
+
- "http://www.ontology-of-units-of-measure.org/resource/om-2/Measure"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { f as Note, g as Person, i as Collection, p as Object$1 } from "./vocab-
|
|
4
|
-
import { n as version, r as esm_default, t as name } from "./deno-
|
|
3
|
+
import { f as Note, g as Person, i as Collection, p as Object$1 } from "./vocab-CGZuHaxe.mjs";
|
|
4
|
+
import { n as version, r as esm_default, t as name } from "./deno-D3oW1uY5.mjs";
|
|
5
5
|
import { t as getTypeId } from "./type-Cf-vxmre.mjs";
|
|
6
6
|
import { t as assertInstanceOf } from "./utils-CE8Dk5hm.mjs";
|
|
7
7
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: Measure
|
|
3
|
+
compactName: om2:Measure
|
|
4
|
+
uri: "http://www.ontology-of-units-of-measure.org/resource/om-2/Measure"
|
|
5
|
+
entity: false
|
|
6
|
+
description: A quantity with a unit of measure.
|
|
7
|
+
defaultContext:
|
|
8
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
9
|
+
- om2: "http://www.ontology-of-units-of-measure.org/resource/om-2/"
|
|
10
|
+
hasUnit: "om2:hasUnit"
|
|
11
|
+
hasNumericalValue: "om2:hasNumericalValue"
|
|
12
|
+
|
|
13
|
+
properties:
|
|
14
|
+
- singularName: unit
|
|
15
|
+
functional: true
|
|
16
|
+
compactName: hasUnit
|
|
17
|
+
uri: "http://www.ontology-of-units-of-measure.org/resource/om-2/hasUnit"
|
|
18
|
+
description: |
|
|
19
|
+
The name of the unit, according to the Ontology of units of Measure
|
|
20
|
+
classification. The recommended unit for countable items is `"one"`.
|
|
21
|
+
range:
|
|
22
|
+
- "http://www.w3.org/2001/XMLSchema#string"
|
|
23
|
+
|
|
24
|
+
- singularName: numericalValue
|
|
25
|
+
functional: true
|
|
26
|
+
compactName: hasNumericalValue
|
|
27
|
+
uri: "http://www.ontology-of-units-of-measure.org/resource/om-2/hasNumericalValue"
|
|
28
|
+
description: |
|
|
29
|
+
The amount of the resource. If not specified, arbitrary amounts can be
|
|
30
|
+
used when responding to the proposal.
|
|
31
|
+
range:
|
|
32
|
+
- "http://www.w3.org/2001/XMLSchema#decimal"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: Proposal
|
|
3
|
+
compactName: Proposal
|
|
4
|
+
uri: "https://w3id.org/valueflows/ont/vf#Proposal"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Object"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
A published request or offer, sometimes with what is expected in return.
|
|
9
|
+
|
|
10
|
+
Proposals contain a primary {@link Intent} (via `publishes`) describing
|
|
11
|
+
what is being offered or requested, and optionally a reciprocal
|
|
12
|
+
{@link Intent} describing what is expected or offered in return.
|
|
13
|
+
|
|
14
|
+
Note: This type extends ActivityStreams `Object` for practical
|
|
15
|
+
interoperability within ActivityPub federation, even though FEP-0837
|
|
16
|
+
defines `Proposal` as a pure ValueFlows type. Extending `Object`
|
|
17
|
+
provides useful inherited properties such as `name`, `content`,
|
|
18
|
+
`attributedTo`, `published`, `to`, and `location` without needing to
|
|
19
|
+
redefine them.
|
|
20
|
+
# NOTE: The context includes mappings for Intent and Measure properties
|
|
21
|
+
# (action, resourceConformsTo, hasUnit, etc.) because the code generator
|
|
22
|
+
# does not automatically merge contexts from referenced types. Proposal
|
|
23
|
+
# must declare all mappings needed for correct JSON-LD serialization of
|
|
24
|
+
# its embedded Intent and Measure objects.
|
|
25
|
+
defaultContext:
|
|
26
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
27
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
28
|
+
- "https://gotosocial.org/ns"
|
|
29
|
+
- vf: "https://w3id.org/valueflows/ont/vf#"
|
|
30
|
+
om2: "http://www.ontology-of-units-of-measure.org/resource/om-2/"
|
|
31
|
+
fedibird: "http://fedibird.com/ns#"
|
|
32
|
+
sensitive: "as:sensitive"
|
|
33
|
+
emojiReactions:
|
|
34
|
+
"@id": "fedibird:emojiReactions"
|
|
35
|
+
"@type": "@id"
|
|
36
|
+
Proposal: "vf:Proposal"
|
|
37
|
+
Intent: "vf:Intent"
|
|
38
|
+
purpose: "vf:purpose"
|
|
39
|
+
unitBased: "vf:unitBased"
|
|
40
|
+
publishes: "vf:publishes"
|
|
41
|
+
reciprocal: "vf:reciprocal"
|
|
42
|
+
action: "vf:action"
|
|
43
|
+
resourceConformsTo:
|
|
44
|
+
"@id": "vf:resourceConformsTo"
|
|
45
|
+
"@type": "@id"
|
|
46
|
+
resourceQuantity: "vf:resourceQuantity"
|
|
47
|
+
availableQuantity: "vf:availableQuantity"
|
|
48
|
+
minimumQuantity: "vf:minimumQuantity"
|
|
49
|
+
hasUnit: "om2:hasUnit"
|
|
50
|
+
hasNumericalValue: "om2:hasNumericalValue"
|
|
51
|
+
|
|
52
|
+
properties:
|
|
53
|
+
- singularName: purpose
|
|
54
|
+
functional: true
|
|
55
|
+
compactName: purpose
|
|
56
|
+
uri: "https://w3id.org/valueflows/ont/vf#purpose"
|
|
57
|
+
description: |
|
|
58
|
+
The type of proposal. Possible values are `"offer"` and `"request"`.
|
|
59
|
+
range:
|
|
60
|
+
- "http://www.w3.org/2001/XMLSchema#string"
|
|
61
|
+
|
|
62
|
+
- singularName: publishes
|
|
63
|
+
functional: true
|
|
64
|
+
compactName: publishes
|
|
65
|
+
uri: "https://w3id.org/valueflows/ont/vf#publishes"
|
|
66
|
+
description: |
|
|
67
|
+
The primary intent of this proposal, describing what is being offered
|
|
68
|
+
or requested.
|
|
69
|
+
range:
|
|
70
|
+
- "https://w3id.org/valueflows/ont/vf#Intent"
|
|
71
|
+
|
|
72
|
+
- singularName: reciprocal
|
|
73
|
+
functional: true
|
|
74
|
+
compactName: reciprocal
|
|
75
|
+
uri: "https://w3id.org/valueflows/ont/vf#reciprocal"
|
|
76
|
+
description: |
|
|
77
|
+
The reciprocal intent of this proposal, describing what is expected
|
|
78
|
+
or offered in return.
|
|
79
|
+
range:
|
|
80
|
+
- "https://w3id.org/valueflows/ont/vf#Intent"
|
|
81
|
+
|
|
82
|
+
- singularName: unitBased
|
|
83
|
+
functional: true
|
|
84
|
+
compactName: unitBased
|
|
85
|
+
uri: "https://w3id.org/valueflows/ont/vf#unitBased"
|
|
86
|
+
description: |
|
|
87
|
+
Indicates whether the quantities expressed in the proposal can be
|
|
88
|
+
multiplied or not. The default is `false`.
|
|
89
|
+
range:
|
|
90
|
+
- "http://www.w3.org/2001/XMLSchema#boolean"
|
package/dist-tests/type.test.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { g as Person } from "./vocab-
|
|
3
|
+
import { g as Person } from "./vocab-CGZuHaxe.mjs";
|
|
4
4
|
import { t as getTypeId } from "./type-Cf-vxmre.mjs";
|
|
5
5
|
import { test } from "@fedify/fixture";
|
|
6
6
|
import { deepStrictEqual } from "node:assert/strict";
|