@fedify/fedify 0.10.0-dev.198 → 0.10.0-dev.200
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGES.md +23 -1
- package/esm/codegen/schema.yaml +6 -1
- package/esm/runtime/key.js +1 -1
- package/esm/sig/http.js +10 -61
- package/esm/sig/key.js +85 -0
- package/esm/testing/fixtures/example.com/person2 +20 -3
- package/esm/testing/fixtures/server.example/users/alice +20 -0
- package/esm/testing/fixtures/wizard.casa/users/hongminhee +69 -0
- package/esm/vocab/dataintegrityproof.yaml +1 -1
- package/esm/vocab/object.yaml +1 -0
- package/esm/vocab/vocab.js +780 -480
- package/package.json +3 -2
- package/types/codegen/schema.d.ts.map +1 -1
- package/types/sig/http.d.ts +1 -1
- package/types/sig/http.d.ts.map +1 -1
- package/types/sig/key.d.ts +38 -0
- package/types/sig/key.d.ts.map +1 -1
- package/types/sig/proof.d.ts.map +1 -0
- package/types/sig/proof.test.d.ts.map +1 -0
- package/types/testing/keys.d.ts.map +1 -1
- package/types/vocab/vocab.d.ts +48 -0
- package/types/vocab/vocab.d.ts.map +1 -1
- package/esm/testing/fixtures/example.com/key3 +0 -7
- package/esm/testing/fixtures/example.com/key4 +0 -7
package/esm/vocab/vocab.js
CHANGED
@@ -1796,20 +1796,21 @@ export class Object {
|
|
1796
1796
|
const values = {};
|
1797
1797
|
array = [];
|
1798
1798
|
for (const v of this.#_49BipA5dq9eoH8LX8xdsVumveTca) {
|
1799
|
-
|
1799
|
+
const element = v instanceof URL
|
1800
1800
|
? { "@id": v.href }
|
1801
1801
|
: v instanceof _a
|
1802
1802
|
? await v.toJsonLd(options)
|
1803
1803
|
: v instanceof Link
|
1804
1804
|
? await v.toJsonLd(options)
|
1805
|
-
: await v.toJsonLd(options)
|
1805
|
+
: await v.toJsonLd(options);
|
1806
|
+
array.push(element);
|
1806
1807
|
}
|
1807
1808
|
if (array.length > 0) {
|
1808
1809
|
values["https://www.w3.org/ns/activitystreams#attachment"] = array;
|
1809
1810
|
}
|
1810
1811
|
array = [];
|
1811
1812
|
for (const v of this.#_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py) {
|
1812
|
-
|
1813
|
+
const element = v instanceof URL
|
1813
1814
|
? { "@id": v.href }
|
1814
1815
|
: v instanceof Application
|
1815
1816
|
? await v.toJsonLd(options)
|
@@ -1819,237 +1820,284 @@ export class Object {
|
|
1819
1820
|
? await v.toJsonLd(options)
|
1820
1821
|
: v instanceof Person
|
1821
1822
|
? await v.toJsonLd(options)
|
1822
|
-
: await v.toJsonLd(options)
|
1823
|
+
: await v.toJsonLd(options);
|
1824
|
+
array.push(element);
|
1823
1825
|
}
|
1824
1826
|
if (array.length > 0) {
|
1825
1827
|
values["https://www.w3.org/ns/activitystreams#attributedTo"] = array;
|
1826
1828
|
}
|
1827
1829
|
array = [];
|
1828
1830
|
for (const v of this.#_3ocC3VVi88cEd5sPWL8djkZsvTN6) {
|
1829
|
-
|
1831
|
+
const element = v instanceof URL
|
1832
|
+
? { "@id": v.href }
|
1833
|
+
: await v.toJsonLd(options);
|
1834
|
+
array.push(element);
|
1830
1835
|
}
|
1831
1836
|
if (array.length > 0) {
|
1832
1837
|
values["https://www.w3.org/ns/activitystreams#audience"] = array;
|
1833
1838
|
}
|
1834
1839
|
array = [];
|
1835
1840
|
for (const v of this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz) {
|
1836
|
-
|
1841
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
1837
1842
|
"@value": v.toString(),
|
1838
1843
|
"@language": v.language.compact(),
|
1839
|
-
}
|
1844
|
+
};
|
1845
|
+
array.push(element);
|
1840
1846
|
}
|
1841
1847
|
if (array.length > 0) {
|
1842
1848
|
values["https://www.w3.org/ns/activitystreams#content"] = array;
|
1843
1849
|
}
|
1844
1850
|
array = [];
|
1845
1851
|
for (const v of this.#_3mhZzGXSpQ431mBSz2kvych22v4e) {
|
1846
|
-
|
1852
|
+
const element = v instanceof URL
|
1847
1853
|
? { "@id": v.href }
|
1848
1854
|
: v instanceof _a
|
1849
1855
|
? await v.toJsonLd(options)
|
1850
|
-
: await v.toJsonLd(options)
|
1856
|
+
: await v.toJsonLd(options);
|
1857
|
+
array.push(element);
|
1851
1858
|
}
|
1852
1859
|
if (array.length > 0) {
|
1853
1860
|
values["https://www.w3.org/ns/activitystreams#context"] = array;
|
1854
1861
|
}
|
1855
1862
|
array = [];
|
1856
1863
|
for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav) {
|
1857
|
-
|
1864
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
1858
1865
|
"@value": v.toString(),
|
1859
1866
|
"@language": v.language.compact(),
|
1860
|
-
}
|
1867
|
+
};
|
1868
|
+
array.push(element);
|
1861
1869
|
}
|
1862
1870
|
if (array.length > 0) {
|
1863
1871
|
values["https://www.w3.org/ns/activitystreams#name"] = array;
|
1864
1872
|
}
|
1865
1873
|
array = [];
|
1866
1874
|
for (const v of this.#_219RwDanjScTv5tYCjwGZVCM7KZ9) {
|
1867
|
-
|
1875
|
+
const element = {
|
1868
1876
|
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
|
1869
1877
|
"@value": v.toString(),
|
1870
|
-
}
|
1878
|
+
};
|
1879
|
+
array.push(element);
|
1871
1880
|
}
|
1872
1881
|
if (array.length > 0) {
|
1873
1882
|
values["https://www.w3.org/ns/activitystreams#endTime"] = array;
|
1874
1883
|
}
|
1875
1884
|
array = [];
|
1876
1885
|
for (const v of this.#_86xFhmgBapoMvYqjbjRuDPayTrS) {
|
1877
|
-
|
1886
|
+
const element = v instanceof URL
|
1878
1887
|
? { "@id": v.href }
|
1879
1888
|
: v instanceof _a
|
1880
1889
|
? await v.toJsonLd(options)
|
1881
|
-
: await v.toJsonLd(options)
|
1890
|
+
: await v.toJsonLd(options);
|
1891
|
+
array.push(element);
|
1882
1892
|
}
|
1883
1893
|
if (array.length > 0) {
|
1884
1894
|
values["https://www.w3.org/ns/activitystreams#generator"] = array;
|
1885
1895
|
}
|
1886
1896
|
array = [];
|
1887
1897
|
for (const v of this.#_33CjRLy5ujtsUrwRSCrsggvGdKuR) {
|
1888
|
-
|
1898
|
+
const element = v instanceof URL
|
1899
|
+
? { "@id": v.href }
|
1900
|
+
: await v.toJsonLd(options);
|
1901
|
+
array.push(element);
|
1889
1902
|
}
|
1890
1903
|
if (array.length > 0) {
|
1891
1904
|
values["https://www.w3.org/ns/activitystreams#icon"] = array;
|
1892
1905
|
}
|
1893
1906
|
array = [];
|
1894
1907
|
for (const v of this.#_3dXrUdkARxwyJLtJcYi1AJ92H41U) {
|
1895
|
-
|
1908
|
+
const element = v instanceof URL
|
1909
|
+
? { "@id": v.href }
|
1910
|
+
: await v.toJsonLd(options);
|
1911
|
+
array.push(element);
|
1896
1912
|
}
|
1897
1913
|
if (array.length > 0) {
|
1898
1914
|
values["https://www.w3.org/ns/activitystreams#image"] = array;
|
1899
1915
|
}
|
1900
1916
|
array = [];
|
1901
1917
|
for (const v of this.#_3fpbDrvZgf3Kq1a5V9aByFn8kx3s) {
|
1902
|
-
|
1918
|
+
const element = v instanceof URL
|
1903
1919
|
? { "@id": v.href }
|
1904
1920
|
: v instanceof _a
|
1905
1921
|
? await v.toJsonLd(options)
|
1906
|
-
: await v.toJsonLd(options)
|
1922
|
+
: await v.toJsonLd(options);
|
1923
|
+
array.push(element);
|
1907
1924
|
}
|
1908
1925
|
if (array.length > 0) {
|
1909
1926
|
values["https://www.w3.org/ns/activitystreams#inReplyTo"] = array;
|
1910
1927
|
}
|
1911
1928
|
array = [];
|
1912
1929
|
for (const v of this.#_31k5MUZJsnsPNg8dQQJieWaXTFnR) {
|
1913
|
-
|
1930
|
+
const element = v instanceof URL
|
1914
1931
|
? { "@id": v.href }
|
1915
1932
|
: v instanceof _a
|
1916
1933
|
? await v.toJsonLd(options)
|
1917
|
-
: await v.toJsonLd(options)
|
1934
|
+
: await v.toJsonLd(options);
|
1935
|
+
array.push(element);
|
1918
1936
|
}
|
1919
1937
|
if (array.length > 0) {
|
1920
1938
|
values["https://www.w3.org/ns/activitystreams#location"] = array;
|
1921
1939
|
}
|
1922
1940
|
array = [];
|
1923
1941
|
for (const v of this.#_gCVTegXxWWCw6wWRxa1QF65zusg) {
|
1924
|
-
|
1942
|
+
const element = v instanceof URL
|
1925
1943
|
? { "@id": v.href }
|
1926
1944
|
: v instanceof Link
|
1927
1945
|
? await v.toJsonLd(options)
|
1928
|
-
: await v.toJsonLd(options)
|
1946
|
+
: await v.toJsonLd(options);
|
1947
|
+
array.push(element);
|
1929
1948
|
}
|
1930
1949
|
if (array.length > 0) {
|
1931
1950
|
values["https://www.w3.org/ns/activitystreams#preview"] = array;
|
1932
1951
|
}
|
1933
1952
|
array = [];
|
1934
1953
|
for (const v of this.#_5e258TDXtuhaFRPZiGoDfEpjdMr) {
|
1935
|
-
|
1954
|
+
const element = {
|
1936
1955
|
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
|
1937
1956
|
"@value": v.toString(),
|
1938
|
-
}
|
1957
|
+
};
|
1958
|
+
array.push(element);
|
1939
1959
|
}
|
1940
1960
|
if (array.length > 0) {
|
1941
1961
|
values["https://www.w3.org/ns/activitystreams#published"] = array;
|
1942
1962
|
}
|
1943
1963
|
array = [];
|
1944
1964
|
for (const v of this.#_7UpwM3JWcXhADcscukEehBorf6k) {
|
1945
|
-
|
1965
|
+
const element = v instanceof URL
|
1966
|
+
? { "@id": v.href }
|
1967
|
+
: await v.toJsonLd(options);
|
1968
|
+
array.push(element);
|
1946
1969
|
}
|
1947
1970
|
if (array.length > 0) {
|
1948
1971
|
values["https://www.w3.org/ns/activitystreams#replies"] = array;
|
1949
1972
|
}
|
1950
1973
|
array = [];
|
1951
1974
|
for (const v of this.#_2w3Jmue4up8iVDUA51WZqomEF438) {
|
1952
|
-
|
1975
|
+
const element = {
|
1953
1976
|
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
|
1954
1977
|
"@value": v.toString(),
|
1955
|
-
}
|
1978
|
+
};
|
1979
|
+
array.push(element);
|
1956
1980
|
}
|
1957
1981
|
if (array.length > 0) {
|
1958
1982
|
values["https://www.w3.org/ns/activitystreams#startTime"] = array;
|
1959
1983
|
}
|
1960
1984
|
array = [];
|
1961
1985
|
for (const v of this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1) {
|
1962
|
-
|
1986
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
1963
1987
|
"@value": v.toString(),
|
1964
1988
|
"@language": v.language.compact(),
|
1965
|
-
}
|
1989
|
+
};
|
1990
|
+
array.push(element);
|
1966
1991
|
}
|
1967
1992
|
if (array.length > 0) {
|
1968
1993
|
values["https://www.w3.org/ns/activitystreams#summary"] = array;
|
1969
1994
|
}
|
1970
1995
|
array = [];
|
1971
1996
|
for (const v of this.#_5chuqj6s95p5gg2sk1HntGfarRf) {
|
1972
|
-
|
1997
|
+
const element = v instanceof URL
|
1973
1998
|
? { "@id": v.href }
|
1974
1999
|
: v instanceof _a
|
1975
2000
|
? await v.toJsonLd(options)
|
1976
|
-
: await v.toJsonLd(options)
|
2001
|
+
: await v.toJsonLd(options);
|
2002
|
+
array.push(element);
|
1977
2003
|
}
|
1978
2004
|
if (array.length > 0) {
|
1979
2005
|
values["https://www.w3.org/ns/activitystreams#tag"] = array;
|
1980
2006
|
}
|
1981
2007
|
array = [];
|
1982
2008
|
for (const v of this.#_385aB7ySixcf5Un6z3VsWmThgCzQ) {
|
1983
|
-
|
2009
|
+
const element = {
|
1984
2010
|
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
|
1985
2011
|
"@value": v.toString(),
|
1986
|
-
}
|
2012
|
+
};
|
2013
|
+
array.push(element);
|
1987
2014
|
}
|
1988
2015
|
if (array.length > 0) {
|
1989
2016
|
values["https://www.w3.org/ns/activitystreams#updated"] = array;
|
1990
2017
|
}
|
1991
2018
|
array = [];
|
1992
2019
|
for (const v of this.#_2oPEH9MQ3aj8JVwyYuWkqoVwV865) {
|
1993
|
-
|
2020
|
+
const element = v instanceof URL
|
2021
|
+
? { "@id": v.href }
|
2022
|
+
: await v.toJsonLd(options);
|
2023
|
+
array.push(element);
|
1994
2024
|
}
|
1995
2025
|
if (array.length > 0) {
|
1996
2026
|
values["https://www.w3.org/ns/activitystreams#url"] = array;
|
1997
2027
|
}
|
1998
2028
|
array = [];
|
1999
2029
|
for (const v of this.#_3hFbw7DTpHhq3cvVhkY8njhcsXbd) {
|
2000
|
-
|
2030
|
+
const element = v instanceof URL
|
2031
|
+
? { "@id": v.href }
|
2032
|
+
: await v.toJsonLd(options);
|
2033
|
+
array.push(element);
|
2001
2034
|
}
|
2002
2035
|
if (array.length > 0) {
|
2003
2036
|
values["https://www.w3.org/ns/activitystreams#to"] = array;
|
2004
2037
|
}
|
2005
2038
|
array = [];
|
2006
2039
|
for (const v of this.#_aLZupjwL8XB7tzdLgCMXdjZ6qej) {
|
2007
|
-
|
2040
|
+
const element = v instanceof URL
|
2041
|
+
? { "@id": v.href }
|
2042
|
+
: await v.toJsonLd(options);
|
2043
|
+
array.push(element);
|
2008
2044
|
}
|
2009
2045
|
if (array.length > 0) {
|
2010
2046
|
values["https://www.w3.org/ns/activitystreams#bto"] = array;
|
2011
2047
|
}
|
2012
2048
|
array = [];
|
2013
2049
|
for (const v of this.#_42a1SvBs24QSLzKcfjCyNTjW5a1g) {
|
2014
|
-
|
2050
|
+
const element = v instanceof URL
|
2051
|
+
? { "@id": v.href }
|
2052
|
+
: await v.toJsonLd(options);
|
2053
|
+
array.push(element);
|
2015
2054
|
}
|
2016
2055
|
if (array.length > 0) {
|
2017
2056
|
values["https://www.w3.org/ns/activitystreams#cc"] = array;
|
2018
2057
|
}
|
2019
2058
|
array = [];
|
2020
2059
|
for (const v of this.#_3qvegKUB8YLgTXRpEf8E6JZSkz2H) {
|
2021
|
-
|
2060
|
+
const element = v instanceof URL
|
2061
|
+
? { "@id": v.href }
|
2062
|
+
: await v.toJsonLd(options);
|
2063
|
+
array.push(element);
|
2022
2064
|
}
|
2023
2065
|
if (array.length > 0) {
|
2024
2066
|
values["https://www.w3.org/ns/activitystreams#bcc"] = array;
|
2025
2067
|
}
|
2026
2068
|
array = [];
|
2027
2069
|
for (const v of this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8) {
|
2028
|
-
|
2070
|
+
const element = { "@value": v };
|
2071
|
+
array.push(element);
|
2029
2072
|
}
|
2030
2073
|
if (array.length > 0) {
|
2031
2074
|
values["https://www.w3.org/ns/activitystreams#mediaType"] = array;
|
2032
2075
|
}
|
2033
2076
|
array = [];
|
2034
2077
|
for (const v of this.#_3bNvLMBN1bCJETiTihM3wvi1B2JX) {
|
2035
|
-
|
2078
|
+
const element = {
|
2036
2079
|
"@type": "http://www.w3.org/2001/XMLSchema#duration",
|
2037
2080
|
"@value": v.toString(),
|
2038
|
-
}
|
2081
|
+
};
|
2082
|
+
array.push(element);
|
2039
2083
|
}
|
2040
2084
|
if (array.length > 0) {
|
2041
2085
|
values["https://www.w3.org/ns/activitystreams#duration"] = array;
|
2042
2086
|
}
|
2043
2087
|
array = [];
|
2044
2088
|
for (const v of this.#_u8gdcDTtChQ4tbSQMXc4cYWyum7) {
|
2045
|
-
|
2089
|
+
const element = { "@value": v };
|
2090
|
+
array.push(element);
|
2046
2091
|
}
|
2047
2092
|
if (array.length > 0) {
|
2048
2093
|
values["https://www.w3.org/ns/activitystreams#sensitive"] = array;
|
2049
2094
|
}
|
2050
2095
|
array = [];
|
2051
2096
|
for (const v of this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8) {
|
2052
|
-
|
2097
|
+
const element = v instanceof URL
|
2098
|
+
? { "@id": v.href }
|
2099
|
+
: await v.toJsonLd(options);
|
2100
|
+
array.push({ "@graph": element });
|
2053
2101
|
}
|
2054
2102
|
if (array.length > 0)
|
2055
2103
|
values["https://w3id.org/security#proof"] = array;
|
@@ -2059,11 +2107,12 @@ export class Object {
|
|
2059
2107
|
if (options.expand) {
|
2060
2108
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
2061
2109
|
}
|
2062
|
-
return await jsonld.compact(values,
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2110
|
+
return await jsonld.compact(values, options.context ??
|
2111
|
+
[
|
2112
|
+
"https://www.w3.org/ns/activitystreams",
|
2113
|
+
"https://w3id.org/security/data-integrity/v1",
|
2114
|
+
{ "sensitive": "as:sensitive" },
|
2115
|
+
], { documentLoader: options.contextLoader });
|
2067
2116
|
}
|
2068
2117
|
/**
|
2069
2118
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -3471,10 +3520,11 @@ export class Emoji extends Object {
|
|
3471
3520
|
if (options.expand) {
|
3472
3521
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
3473
3522
|
}
|
3474
|
-
return await jsonld.compact(values,
|
3475
|
-
|
3476
|
-
|
3477
|
-
|
3523
|
+
return await jsonld.compact(values, options.context ??
|
3524
|
+
["https://www.w3.org/ns/activitystreams", {
|
3525
|
+
"toot": "http://joinmastodon.org/ns#",
|
3526
|
+
"Emoji": "toot:Emoji",
|
3527
|
+
}], { documentLoader: options.contextLoader });
|
3478
3528
|
}
|
3479
3529
|
/**
|
3480
3530
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -3614,20 +3664,22 @@ export class PropertyValue {
|
|
3614
3664
|
const values = {};
|
3615
3665
|
array = [];
|
3616
3666
|
for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav) {
|
3617
|
-
|
3667
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
3618
3668
|
"@value": v.toString(),
|
3619
3669
|
"@language": v.language.compact(),
|
3620
|
-
}
|
3670
|
+
};
|
3671
|
+
array.push(element);
|
3621
3672
|
}
|
3622
3673
|
if (array.length > 0) {
|
3623
3674
|
values["https://www.w3.org/ns/activitystreams#name"] = array;
|
3624
3675
|
}
|
3625
3676
|
array = [];
|
3626
3677
|
for (const v of this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx) {
|
3627
|
-
|
3678
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
3628
3679
|
"@value": v.toString(),
|
3629
3680
|
"@language": v.language.compact(),
|
3630
|
-
}
|
3681
|
+
};
|
3682
|
+
array.push(element);
|
3631
3683
|
}
|
3632
3684
|
if (array.length > 0)
|
3633
3685
|
values["http://schema.org#value"] = array;
|
@@ -3637,11 +3689,12 @@ export class PropertyValue {
|
|
3637
3689
|
if (options.expand) {
|
3638
3690
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
3639
3691
|
}
|
3640
|
-
return await jsonld.compact(values,
|
3641
|
-
|
3642
|
-
|
3643
|
-
|
3644
|
-
|
3692
|
+
return await jsonld.compact(values, options.context ??
|
3693
|
+
["https://www.w3.org/ns/activitystreams", {
|
3694
|
+
"schema": "http://schema.org#",
|
3695
|
+
"PropertyValue": "schema:PropertyValue",
|
3696
|
+
"value": "schema:value",
|
3697
|
+
}], { documentLoader: options.contextLoader });
|
3645
3698
|
}
|
3646
3699
|
/**
|
3647
3700
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -3780,7 +3833,7 @@ export class DataIntegrityProof {
|
|
3780
3833
|
#_2mHVKxqA7zncjveJrDEo3pWpMZqg = [];
|
3781
3834
|
#_2AeEnPcAvVrPEuKbpmn9ZKNmWHKb = [];
|
3782
3835
|
#_3CjFK5vfKpX4HQuNh2b18TykoVLq = [];
|
3783
|
-
#
|
3836
|
+
#_3qzP3ukEZoUziK5FEiA1RhU4aqac = [];
|
3784
3837
|
/**
|
3785
3838
|
* Constructs a new instance of DataIntegrityProof with the given values.
|
3786
3839
|
* @param values The values to initialize the instance with.
|
@@ -3803,7 +3856,7 @@ export class DataIntegrityProof {
|
|
3803
3856
|
this.#_3CjFK5vfKpX4HQuNh2b18TykoVLq = [values.proofValue];
|
3804
3857
|
}
|
3805
3858
|
if ("created" in values && values.created != null) {
|
3806
|
-
this.#
|
3859
|
+
this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = [values.created];
|
3807
3860
|
}
|
3808
3861
|
}
|
3809
3862
|
/**
|
@@ -3831,9 +3884,9 @@ export class DataIntegrityProof {
|
|
3831
3884
|
if ("proofValue" in values && values.proofValue != null) {
|
3832
3885
|
clone.#_3CjFK5vfKpX4HQuNh2b18TykoVLq = [values.proofValue];
|
3833
3886
|
}
|
3834
|
-
clone.#
|
3887
|
+
clone.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac;
|
3835
3888
|
if ("created" in values && values.created != null) {
|
3836
|
-
clone.#
|
3889
|
+
clone.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = [values.created];
|
3837
3890
|
}
|
3838
3891
|
return clone;
|
3839
3892
|
}
|
@@ -3912,9 +3965,9 @@ export class DataIntegrityProof {
|
|
3912
3965
|
/** The date and time the proof was created.
|
3913
3966
|
*/
|
3914
3967
|
get created() {
|
3915
|
-
if (this.#
|
3968
|
+
if (this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac.length < 1)
|
3916
3969
|
return null;
|
3917
|
-
return this.#
|
3970
|
+
return this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac[0];
|
3918
3971
|
}
|
3919
3972
|
/**
|
3920
3973
|
* Converts this object to a JSON-LD structure.
|
@@ -3930,54 +3983,60 @@ export class DataIntegrityProof {
|
|
3930
3983
|
const values = {};
|
3931
3984
|
array = [];
|
3932
3985
|
for (const v of this.#_3RurJsa7tnptyqMFR5hDGcP9pMs5) {
|
3933
|
-
|
3986
|
+
const element = { "@value": v };
|
3987
|
+
array.push(element);
|
3934
3988
|
}
|
3935
3989
|
if (array.length > 0) {
|
3936
3990
|
values["https://w3id.org/security#cryptosuite"] = array;
|
3937
3991
|
}
|
3938
3992
|
array = [];
|
3939
3993
|
for (const v of this.#_2mHVKxqA7zncjveJrDEo3pWpMZqg) {
|
3940
|
-
|
3994
|
+
const element = v instanceof URL
|
3995
|
+
? { "@id": v.href }
|
3996
|
+
: await v.toJsonLd(options);
|
3997
|
+
array.push(element);
|
3941
3998
|
}
|
3942
3999
|
if (array.length > 0) {
|
3943
4000
|
values["https://w3id.org/security#verificationMethod"] = array;
|
3944
4001
|
}
|
3945
4002
|
array = [];
|
3946
4003
|
for (const v of this.#_2AeEnPcAvVrPEuKbpmn9ZKNmWHKb) {
|
3947
|
-
|
4004
|
+
const element = {
|
3948
4005
|
"@id": "https://w3id.org/security#" + v,
|
3949
|
-
}
|
4006
|
+
};
|
4007
|
+
array.push(element);
|
3950
4008
|
}
|
3951
4009
|
if (array.length > 0) {
|
3952
4010
|
values["https://w3id.org/security#proofPurpose"] = array;
|
3953
4011
|
}
|
3954
4012
|
array = [];
|
3955
4013
|
for (const v of this.#_3CjFK5vfKpX4HQuNh2b18TykoVLq) {
|
3956
|
-
|
4014
|
+
const element = {
|
3957
4015
|
"@type": "https://w3id.org/security#multibase",
|
3958
4016
|
"@value": new TextDecoder().decode(encodeMultibase("base58btc", v)),
|
3959
|
-
}
|
4017
|
+
};
|
4018
|
+
array.push(element);
|
3960
4019
|
}
|
3961
4020
|
if (array.length > 0) {
|
3962
4021
|
values["https://w3id.org/security#proofValue"] = array;
|
3963
4022
|
}
|
3964
4023
|
array = [];
|
3965
|
-
for (const v of this.#
|
3966
|
-
|
4024
|
+
for (const v of this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac) {
|
4025
|
+
const element = {
|
3967
4026
|
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
|
3968
4027
|
"@value": v.toString(),
|
3969
|
-
}
|
3970
|
-
|
3971
|
-
if (array.length > 0) {
|
3972
|
-
values["https://www.w3.org/ns/activitystreams#published"] = array;
|
4028
|
+
};
|
4029
|
+
array.push(element);
|
3973
4030
|
}
|
4031
|
+
if (array.length > 0)
|
4032
|
+
values["http://purl.org/dc/terms/created"] = array;
|
3974
4033
|
values["@type"] = ["https://w3id.org/security#DataIntegrityProof"];
|
3975
4034
|
if (this.id)
|
3976
4035
|
values["@id"] = this.id.href;
|
3977
4036
|
if (options.expand) {
|
3978
4037
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
3979
4038
|
}
|
3980
|
-
return await jsonld.compact(values, "https://w3id.org/security/data-integrity/v1", { documentLoader: options.contextLoader });
|
4039
|
+
return await jsonld.compact(values, options.context ?? "https://w3id.org/security/data-integrity/v1", { documentLoader: options.contextLoader });
|
3981
4040
|
}
|
3982
4041
|
/**
|
3983
4042
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -4049,13 +4108,13 @@ export class DataIntegrityProof {
|
|
4049
4108
|
_3CjFK5vfKpX4HQuNh2b18TykoVLq.push(decodeMultibase(v["@value"]));
|
4050
4109
|
}
|
4051
4110
|
instance.#_3CjFK5vfKpX4HQuNh2b18TykoVLq = _3CjFK5vfKpX4HQuNh2b18TykoVLq;
|
4052
|
-
const
|
4053
|
-
for (const v of values["
|
4111
|
+
const _3qzP3ukEZoUziK5FEiA1RhU4aqac = [];
|
4112
|
+
for (const v of values["http://purl.org/dc/terms/created"] ?? []) {
|
4054
4113
|
if (v == null)
|
4055
4114
|
continue;
|
4056
|
-
|
4115
|
+
_3qzP3ukEZoUziK5FEiA1RhU4aqac.push(dntShim.Temporal.Instant.from(v["@value"]));
|
4057
4116
|
}
|
4058
|
-
instance.#
|
4117
|
+
instance.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = _3qzP3ukEZoUziK5FEiA1RhU4aqac;
|
4059
4118
|
return instance;
|
4060
4119
|
}
|
4061
4120
|
_getCustomInspectProxy() {
|
@@ -4110,7 +4169,7 @@ export class DataIntegrityProof {
|
|
4110
4169
|
if (_3CjFK5vfKpX4HQuNh2b18TykoVLq.length == 1) {
|
4111
4170
|
proxy.proofValue = _3CjFK5vfKpX4HQuNh2b18TykoVLq[0];
|
4112
4171
|
}
|
4113
|
-
const
|
4172
|
+
const _3qzP3ukEZoUziK5FEiA1RhU4aqac = this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac
|
4114
4173
|
// deno-lint-ignore no-explicit-any
|
4115
4174
|
.map((v) => v instanceof URL
|
4116
4175
|
? {
|
@@ -4118,8 +4177,8 @@ export class DataIntegrityProof {
|
|
4118
4177
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
4119
4178
|
}
|
4120
4179
|
: v);
|
4121
|
-
if (
|
4122
|
-
proxy.created =
|
4180
|
+
if (_3qzP3ukEZoUziK5FEiA1RhU4aqac.length == 1) {
|
4181
|
+
proxy.created = _3qzP3ukEZoUziK5FEiA1RhU4aqac[0];
|
4123
4182
|
}
|
4124
4183
|
return proxy;
|
4125
4184
|
}
|
@@ -4284,7 +4343,7 @@ export class CryptographicKey {
|
|
4284
4343
|
const values = {};
|
4285
4344
|
array = [];
|
4286
4345
|
for (const v of this.#_5UJq9NDh3ZHgswFwwdVxQvJxdx2) {
|
4287
|
-
|
4346
|
+
const element = v instanceof URL
|
4288
4347
|
? { "@id": v.href }
|
4289
4348
|
: v instanceof Application
|
4290
4349
|
? await v.toJsonLd(options)
|
@@ -4294,13 +4353,15 @@ export class CryptographicKey {
|
|
4294
4353
|
? await v.toJsonLd(options)
|
4295
4354
|
: v instanceof Person
|
4296
4355
|
? await v.toJsonLd(options)
|
4297
|
-
: await v.toJsonLd(options)
|
4356
|
+
: await v.toJsonLd(options);
|
4357
|
+
array.push(element);
|
4298
4358
|
}
|
4299
4359
|
if (array.length > 0)
|
4300
4360
|
values["https://w3id.org/security#owner"] = array;
|
4301
4361
|
array = [];
|
4302
4362
|
for (const v of this.#_2fE2QMDdg6KFGqa4NEC3TmjApSAD) {
|
4303
|
-
|
4363
|
+
const element = { "@value": await exportSpki(v) };
|
4364
|
+
array.push(element);
|
4304
4365
|
}
|
4305
4366
|
if (array.length > 0) {
|
4306
4367
|
values["https://w3id.org/security#publicKeyPem"] = array;
|
@@ -4311,7 +4372,7 @@ export class CryptographicKey {
|
|
4311
4372
|
if (options.expand) {
|
4312
4373
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
4313
4374
|
}
|
4314
|
-
return await jsonld.compact(values, "https://w3id.org/security/v1", { documentLoader: options.contextLoader });
|
4375
|
+
return await jsonld.compact(values, options.context ?? "https://w3id.org/security/v1", { documentLoader: options.contextLoader });
|
4315
4376
|
}
|
4316
4377
|
/**
|
4317
4378
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -4593,7 +4654,7 @@ export class Multikey {
|
|
4593
4654
|
const values = {};
|
4594
4655
|
array = [];
|
4595
4656
|
for (const v of this.#_2yr3eUBTP6cNcyaxKzAXWjFsnGzN) {
|
4596
|
-
|
4657
|
+
const element = v instanceof URL
|
4597
4658
|
? { "@id": v.href }
|
4598
4659
|
: v instanceof Application
|
4599
4660
|
? await v.toJsonLd(options)
|
@@ -4603,17 +4664,19 @@ export class Multikey {
|
|
4603
4664
|
? await v.toJsonLd(options)
|
4604
4665
|
: v instanceof Person
|
4605
4666
|
? await v.toJsonLd(options)
|
4606
|
-
: await v.toJsonLd(options)
|
4667
|
+
: await v.toJsonLd(options);
|
4668
|
+
array.push(element);
|
4607
4669
|
}
|
4608
4670
|
if (array.length > 0) {
|
4609
4671
|
values["https://w3id.org/security#controller"] = array;
|
4610
4672
|
}
|
4611
4673
|
array = [];
|
4612
4674
|
for (const v of this.#_4XLHbsR2gLVWU3NpEqKt9wANzn4F) {
|
4613
|
-
|
4675
|
+
const element = {
|
4614
4676
|
"@type": "https://w3id.org/security#multibase",
|
4615
4677
|
"@value": await exportMultibaseKey(v),
|
4616
|
-
}
|
4678
|
+
};
|
4679
|
+
array.push(element);
|
4617
4680
|
}
|
4618
4681
|
if (array.length > 0) {
|
4619
4682
|
values["https://w3id.org/security#publicKeyMultibase"] = array;
|
@@ -4624,7 +4687,7 @@ export class Multikey {
|
|
4624
4687
|
if (options.expand) {
|
4625
4688
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
4626
4689
|
}
|
4627
|
-
return await jsonld.compact(values, "https://w3id.org/security/multikey/v1", { documentLoader: options.contextLoader });
|
4690
|
+
return await jsonld.compact(values, options.context ?? "https://w3id.org/security/multikey/v1", { documentLoader: options.contextLoader });
|
4628
4691
|
}
|
4629
4692
|
/**
|
4630
4693
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -5017,7 +5080,7 @@ export class Activity extends Object {
|
|
5017
5080
|
const values = baseValues[0];
|
5018
5081
|
array = [];
|
5019
5082
|
for (const v of this.#_2DjTTboo3CNHU2a2JQqUSE2dbv9D) {
|
5020
|
-
|
5083
|
+
const element = v instanceof URL
|
5021
5084
|
? { "@id": v.href }
|
5022
5085
|
: v instanceof Application
|
5023
5086
|
? await v.toJsonLd(options)
|
@@ -5027,14 +5090,18 @@ export class Activity extends Object {
|
|
5027
5090
|
? await v.toJsonLd(options)
|
5028
5091
|
: v instanceof Person
|
5029
5092
|
? await v.toJsonLd(options)
|
5030
|
-
: await v.toJsonLd(options)
|
5093
|
+
: await v.toJsonLd(options);
|
5094
|
+
array.push(element);
|
5031
5095
|
}
|
5032
5096
|
if (array.length > 0) {
|
5033
5097
|
values["https://www.w3.org/ns/activitystreams#actor"] = array;
|
5034
5098
|
}
|
5035
5099
|
array = [];
|
5036
5100
|
for (const v of this.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc) {
|
5037
|
-
|
5101
|
+
const element = v instanceof URL
|
5102
|
+
? { "@id": v.href }
|
5103
|
+
: await v.toJsonLd(options);
|
5104
|
+
array.push(element);
|
5038
5105
|
}
|
5039
5106
|
if (array.length > 0) {
|
5040
5107
|
values["https://www.w3.org/ns/activitystreams#object"] = array;
|
@@ -5045,11 +5112,12 @@ export class Activity extends Object {
|
|
5045
5112
|
if (options.expand) {
|
5046
5113
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
5047
5114
|
}
|
5048
|
-
return await jsonld.compact(values,
|
5049
|
-
|
5050
|
-
|
5051
|
-
|
5052
|
-
|
5115
|
+
return await jsonld.compact(values, options.context ??
|
5116
|
+
[
|
5117
|
+
"https://www.w3.org/ns/activitystreams",
|
5118
|
+
"https://w3id.org/security/v1",
|
5119
|
+
"https://w3id.org/security/data-integrity/v1",
|
5120
|
+
], { documentLoader: options.contextLoader });
|
5053
5121
|
}
|
5054
5122
|
/**
|
5055
5123
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -5300,10 +5368,11 @@ export class Accept extends Activity {
|
|
5300
5368
|
if (options.expand) {
|
5301
5369
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
5302
5370
|
}
|
5303
|
-
return await jsonld.compact(values,
|
5304
|
-
|
5305
|
-
|
5306
|
-
|
5371
|
+
return await jsonld.compact(values, options.context ??
|
5372
|
+
[
|
5373
|
+
"https://www.w3.org/ns/activitystreams",
|
5374
|
+
"https://w3id.org/security/data-integrity/v1",
|
5375
|
+
], { documentLoader: options.contextLoader });
|
5307
5376
|
}
|
5308
5377
|
/**
|
5309
5378
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -5412,10 +5481,11 @@ export class Add extends Activity {
|
|
5412
5481
|
if (options.expand) {
|
5413
5482
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
5414
5483
|
}
|
5415
|
-
return await jsonld.compact(values,
|
5416
|
-
|
5417
|
-
|
5418
|
-
|
5484
|
+
return await jsonld.compact(values, options.context ??
|
5485
|
+
[
|
5486
|
+
"https://www.w3.org/ns/activitystreams",
|
5487
|
+
"https://w3id.org/security/data-integrity/v1",
|
5488
|
+
], { documentLoader: options.contextLoader });
|
5419
5489
|
}
|
5420
5490
|
/**
|
5421
5491
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -5523,16 +5593,17 @@ export class Announce extends Activity {
|
|
5523
5593
|
if (options.expand) {
|
5524
5594
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
5525
5595
|
}
|
5526
|
-
return await jsonld.compact(values,
|
5527
|
-
|
5528
|
-
|
5529
|
-
|
5530
|
-
|
5531
|
-
|
5532
|
-
|
5533
|
-
|
5534
|
-
|
5535
|
-
|
5596
|
+
return await jsonld.compact(values, options.context ??
|
5597
|
+
[
|
5598
|
+
"https://www.w3.org/ns/activitystreams",
|
5599
|
+
"https://w3id.org/security/data-integrity/v1",
|
5600
|
+
{
|
5601
|
+
"toot": "http://joinmastodon.org/ns#",
|
5602
|
+
"sensitive": "as:sensitive",
|
5603
|
+
"Emoji": "toot:Emoji",
|
5604
|
+
"Hashtag": "as:Hashtag",
|
5605
|
+
},
|
5606
|
+
], { documentLoader: options.contextLoader });
|
5536
5607
|
}
|
5537
5608
|
/**
|
5538
5609
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -6294,105 +6365,136 @@ export class Application extends Object {
|
|
6294
6365
|
const values = baseValues[0];
|
6295
6366
|
array = [];
|
6296
6367
|
for (const v of this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf) {
|
6297
|
-
|
6368
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
6298
6369
|
"@value": v.toString(),
|
6299
6370
|
"@language": v.language.compact(),
|
6300
|
-
}
|
6371
|
+
};
|
6372
|
+
array.push(element);
|
6301
6373
|
}
|
6302
6374
|
if (array.length > 0) {
|
6303
6375
|
values["https://www.w3.org/ns/activitystreams#preferredUsername"] = array;
|
6304
6376
|
}
|
6305
6377
|
array = [];
|
6306
6378
|
for (const v of this.#_axq166E2eZADq34V4MYUc8KMZdC) {
|
6307
|
-
|
6379
|
+
const element = v instanceof URL
|
6380
|
+
? { "@id": v.href }
|
6381
|
+
: await v.toJsonLd(options);
|
6382
|
+
array.push(element);
|
6308
6383
|
}
|
6309
6384
|
if (array.length > 0)
|
6310
6385
|
values["https://w3id.org/security#publicKey"] = array;
|
6311
6386
|
array = [];
|
6312
6387
|
for (const v of this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3) {
|
6313
|
-
|
6388
|
+
const element = v instanceof URL
|
6389
|
+
? { "@id": v.href }
|
6390
|
+
: await v.toJsonLd(options);
|
6391
|
+
array.push(element);
|
6314
6392
|
}
|
6315
6393
|
if (array.length > 0) {
|
6316
6394
|
values["https://w3id.org/security#assertionMethod"] = array;
|
6317
6395
|
}
|
6318
6396
|
array = [];
|
6319
6397
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA) {
|
6320
|
-
|
6398
|
+
const element = { "@value": v };
|
6399
|
+
array.push(element);
|
6321
6400
|
}
|
6322
6401
|
if (array.length > 0) {
|
6323
6402
|
values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] = array;
|
6324
6403
|
}
|
6325
6404
|
array = [];
|
6326
6405
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB) {
|
6327
|
-
|
6406
|
+
const element = v instanceof URL
|
6407
|
+
? { "@id": v.href }
|
6408
|
+
: await v.toJsonLd(options);
|
6409
|
+
array.push(element);
|
6328
6410
|
}
|
6329
6411
|
if (array.length > 0)
|
6330
6412
|
values["http://www.w3.org/ns/ldp#inbox"] = array;
|
6331
6413
|
array = [];
|
6332
6414
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC) {
|
6333
|
-
|
6415
|
+
const element = v instanceof URL
|
6416
|
+
? { "@id": v.href }
|
6417
|
+
: await v.toJsonLd(options);
|
6418
|
+
array.push(element);
|
6334
6419
|
}
|
6335
6420
|
if (array.length > 0) {
|
6336
6421
|
values["https://www.w3.org/ns/activitystreams#outbox"] = array;
|
6337
6422
|
}
|
6338
6423
|
array = [];
|
6339
6424
|
for (const v of this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee) {
|
6340
|
-
|
6425
|
+
const element = v instanceof URL
|
6426
|
+
? { "@id": v.href }
|
6427
|
+
: await v.toJsonLd(options);
|
6428
|
+
array.push(element);
|
6341
6429
|
}
|
6342
6430
|
if (array.length > 0) {
|
6343
6431
|
values["https://www.w3.org/ns/activitystreams#following"] = array;
|
6344
6432
|
}
|
6345
6433
|
array = [];
|
6346
6434
|
for (const v of this.#_BBCTgfphhsFzpVfKTykGSpBNwoA) {
|
6347
|
-
|
6435
|
+
const element = v instanceof URL
|
6436
|
+
? { "@id": v.href }
|
6437
|
+
: await v.toJsonLd(options);
|
6438
|
+
array.push(element);
|
6348
6439
|
}
|
6349
6440
|
if (array.length > 0) {
|
6350
6441
|
values["https://www.w3.org/ns/activitystreams#followers"] = array;
|
6351
6442
|
}
|
6352
6443
|
array = [];
|
6353
6444
|
for (const v of this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU) {
|
6354
|
-
|
6445
|
+
const element = v instanceof URL
|
6446
|
+
? { "@id": v.href }
|
6447
|
+
: await v.toJsonLd(options);
|
6448
|
+
array.push(element);
|
6355
6449
|
}
|
6356
6450
|
if (array.length > 0) {
|
6357
6451
|
values["https://www.w3.org/ns/activitystreams#liked"] = array;
|
6358
6452
|
}
|
6359
6453
|
array = [];
|
6360
6454
|
for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
|
6361
|
-
|
6455
|
+
const element = v instanceof URL
|
6456
|
+
? { "@id": v.href }
|
6457
|
+
: await v.toJsonLd(options);
|
6458
|
+
array.push(element);
|
6362
6459
|
}
|
6363
6460
|
if (array.length > 0) {
|
6364
6461
|
values["https://www.w3.org/ns/activitystreams#streams"] = array;
|
6365
6462
|
}
|
6366
6463
|
array = [];
|
6367
6464
|
for (const v of this.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG) {
|
6368
|
-
|
6465
|
+
const element = await v.toJsonLd(options);
|
6466
|
+
array.push(element);
|
6369
6467
|
}
|
6370
6468
|
if (array.length > 0) {
|
6371
6469
|
values["https://www.w3.org/ns/activitystreams#endpoints"] = array;
|
6372
6470
|
}
|
6373
6471
|
array = [];
|
6374
6472
|
for (const v of this.#_gAJzg1QDc4rcefFsUzGSYmyXvNH) {
|
6375
|
-
|
6473
|
+
const element = { "@value": v };
|
6474
|
+
array.push(element);
|
6376
6475
|
}
|
6377
6476
|
if (array.length > 0) {
|
6378
6477
|
values["http://joinmastodon.org/ns#discoverable"] = array;
|
6379
6478
|
}
|
6380
6479
|
array = [];
|
6381
6480
|
for (const v of this.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7) {
|
6382
|
-
|
6481
|
+
const element = { "@value": v };
|
6482
|
+
array.push(element);
|
6383
6483
|
}
|
6384
6484
|
if (array.length > 0) {
|
6385
6485
|
values["http://joinmastodon.org/ns#suspended"] = array;
|
6386
6486
|
}
|
6387
6487
|
array = [];
|
6388
6488
|
for (const v of this.#_79S8K4f5J9MWUgCxziRyUe6PTHZ) {
|
6389
|
-
|
6489
|
+
const element = { "@value": v };
|
6490
|
+
array.push(element);
|
6390
6491
|
}
|
6391
6492
|
if (array.length > 0)
|
6392
6493
|
values["http://joinmastodon.org/ns#memorial"] = array;
|
6393
6494
|
array = [];
|
6394
6495
|
for (const v of this.#_2diCorzqPGQQqftp6e4SrCEwEnyk) {
|
6395
|
-
|
6496
|
+
const element = { "@value": v };
|
6497
|
+
array.push(element);
|
6396
6498
|
}
|
6397
6499
|
if (array.length > 0) {
|
6398
6500
|
values["http://joinmastodon.org/ns#indexable"] = array;
|
@@ -6403,24 +6505,25 @@ export class Application extends Object {
|
|
6403
6505
|
if (options.expand) {
|
6404
6506
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
6405
6507
|
}
|
6406
|
-
return await jsonld.compact(values,
|
6407
|
-
|
6408
|
-
|
6409
|
-
|
6410
|
-
|
6411
|
-
|
6412
|
-
|
6413
|
-
|
6414
|
-
|
6415
|
-
|
6416
|
-
|
6417
|
-
|
6418
|
-
|
6419
|
-
|
6420
|
-
|
6421
|
-
|
6422
|
-
|
6423
|
-
|
6508
|
+
return await jsonld.compact(values, options.context ??
|
6509
|
+
[
|
6510
|
+
"https://www.w3.org/ns/activitystreams",
|
6511
|
+
"https://w3id.org/security/v1",
|
6512
|
+
"https://w3id.org/security/data-integrity/v1",
|
6513
|
+
"https://www.w3.org/ns/did/v1",
|
6514
|
+
"https://w3id.org/security/multikey/v1",
|
6515
|
+
{
|
6516
|
+
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
6517
|
+
"toot": "http://joinmastodon.org/ns#",
|
6518
|
+
"discoverable": "toot:discoverable",
|
6519
|
+
"suspended": "toot:suspended",
|
6520
|
+
"memorial": "toot:memorial",
|
6521
|
+
"indexable": "toot:indexable",
|
6522
|
+
"schema": "http://schema.org#",
|
6523
|
+
"PropertyValue": "schema:PropertyValue",
|
6524
|
+
"value": "schema:value",
|
6525
|
+
},
|
6526
|
+
], { documentLoader: options.contextLoader });
|
6424
6527
|
}
|
6425
6528
|
/**
|
6426
6529
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -6864,16 +6967,17 @@ export class Article extends Object {
|
|
6864
6967
|
if (options.expand) {
|
6865
6968
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
6866
6969
|
}
|
6867
|
-
return await jsonld.compact(values,
|
6868
|
-
|
6869
|
-
|
6870
|
-
|
6871
|
-
|
6872
|
-
|
6873
|
-
|
6874
|
-
|
6875
|
-
|
6876
|
-
|
6970
|
+
return await jsonld.compact(values, options.context ??
|
6971
|
+
[
|
6972
|
+
"https://www.w3.org/ns/activitystreams",
|
6973
|
+
"https://w3id.org/security/data-integrity/v1",
|
6974
|
+
{
|
6975
|
+
"toot": "http://joinmastodon.org/ns#",
|
6976
|
+
"sensitive": "as:sensitive",
|
6977
|
+
"Emoji": "toot:Emoji",
|
6978
|
+
"Hashtag": "as:Hashtag",
|
6979
|
+
},
|
6980
|
+
], { documentLoader: options.contextLoader });
|
6877
6981
|
}
|
6878
6982
|
/**
|
6879
6983
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7007,20 +7111,22 @@ export class Document extends Object {
|
|
7007
7111
|
const values = baseValues[0];
|
7008
7112
|
array = [];
|
7009
7113
|
for (const v of this.#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe) {
|
7010
|
-
|
7114
|
+
const element = {
|
7011
7115
|
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
|
7012
7116
|
"@value": v,
|
7013
|
-
}
|
7117
|
+
};
|
7118
|
+
array.push(element);
|
7014
7119
|
}
|
7015
7120
|
if (array.length > 0) {
|
7016
7121
|
values["https://www.w3.org/ns/activitystreams#width"] = array;
|
7017
7122
|
}
|
7018
7123
|
array = [];
|
7019
7124
|
for (const v of this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb) {
|
7020
|
-
|
7125
|
+
const element = {
|
7021
7126
|
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
|
7022
7127
|
"@value": v,
|
7023
|
-
}
|
7128
|
+
};
|
7129
|
+
array.push(element);
|
7024
7130
|
}
|
7025
7131
|
if (array.length > 0) {
|
7026
7132
|
values["https://www.w3.org/ns/activitystreams#height"] = array;
|
@@ -7031,10 +7137,11 @@ export class Document extends Object {
|
|
7031
7137
|
if (options.expand) {
|
7032
7138
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7033
7139
|
}
|
7034
|
-
return await jsonld.compact(values,
|
7035
|
-
|
7036
|
-
|
7037
|
-
|
7140
|
+
return await jsonld.compact(values, options.context ??
|
7141
|
+
[
|
7142
|
+
"https://www.w3.org/ns/activitystreams",
|
7143
|
+
"https://w3id.org/security/data-integrity/v1",
|
7144
|
+
], { documentLoader: options.contextLoader });
|
7038
7145
|
}
|
7039
7146
|
/**
|
7040
7147
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7192,10 +7299,11 @@ export class Audio extends Document {
|
|
7192
7299
|
if (options.expand) {
|
7193
7300
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7194
7301
|
}
|
7195
|
-
return await jsonld.compact(values,
|
7196
|
-
|
7197
|
-
|
7198
|
-
|
7302
|
+
return await jsonld.compact(values, options.context ??
|
7303
|
+
[
|
7304
|
+
"https://www.w3.org/ns/activitystreams",
|
7305
|
+
"https://w3id.org/security/data-integrity/v1",
|
7306
|
+
], { documentLoader: options.contextLoader });
|
7199
7307
|
}
|
7200
7308
|
/**
|
7201
7309
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7302,10 +7410,11 @@ export class Ignore extends Activity {
|
|
7302
7410
|
if (options.expand) {
|
7303
7411
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7304
7412
|
}
|
7305
|
-
return await jsonld.compact(values,
|
7306
|
-
|
7307
|
-
|
7308
|
-
|
7413
|
+
return await jsonld.compact(values, options.context ??
|
7414
|
+
[
|
7415
|
+
"https://www.w3.org/ns/activitystreams",
|
7416
|
+
"https://w3id.org/security/data-integrity/v1",
|
7417
|
+
], { documentLoader: options.contextLoader });
|
7309
7418
|
}
|
7310
7419
|
/**
|
7311
7420
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7418,10 +7527,11 @@ export class Block extends Ignore {
|
|
7418
7527
|
if (options.expand) {
|
7419
7528
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7420
7529
|
}
|
7421
|
-
return await jsonld.compact(values,
|
7422
|
-
|
7423
|
-
|
7424
|
-
|
7530
|
+
return await jsonld.compact(values, options.context ??
|
7531
|
+
[
|
7532
|
+
"https://www.w3.org/ns/activitystreams",
|
7533
|
+
"https://w3id.org/security/data-integrity/v1",
|
7534
|
+
], { documentLoader: options.contextLoader });
|
7425
7535
|
}
|
7426
7536
|
/**
|
7427
7537
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7785,54 +7895,59 @@ export class Collection extends Object {
|
|
7785
7895
|
const values = baseValues[0];
|
7786
7896
|
array = [];
|
7787
7897
|
for (const v of this.#_XDbmNDuWHmrhqH712zqtecdbv1V) {
|
7788
|
-
|
7898
|
+
const element = {
|
7789
7899
|
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
|
7790
7900
|
"@value": v,
|
7791
|
-
}
|
7901
|
+
};
|
7902
|
+
array.push(element);
|
7792
7903
|
}
|
7793
7904
|
if (array.length > 0) {
|
7794
7905
|
values["https://www.w3.org/ns/activitystreams#totalItems"] = array;
|
7795
7906
|
}
|
7796
7907
|
array = [];
|
7797
7908
|
for (const v of this.#_3UyUdxnyn6cDn53QKrh4MBiearma) {
|
7798
|
-
|
7909
|
+
const element = v instanceof URL
|
7799
7910
|
? { "@id": v.href }
|
7800
7911
|
: v instanceof CollectionPage
|
7801
7912
|
? await v.toJsonLd(options)
|
7802
|
-
: await v.toJsonLd(options)
|
7913
|
+
: await v.toJsonLd(options);
|
7914
|
+
array.push(element);
|
7803
7915
|
}
|
7804
7916
|
if (array.length > 0) {
|
7805
7917
|
values["https://www.w3.org/ns/activitystreams#current"] = array;
|
7806
7918
|
}
|
7807
7919
|
array = [];
|
7808
7920
|
for (const v of this.#_J52RqweMe6hhv7RnLJMC8BExTE5) {
|
7809
|
-
|
7921
|
+
const element = v instanceof URL
|
7810
7922
|
? { "@id": v.href }
|
7811
7923
|
: v instanceof CollectionPage
|
7812
7924
|
? await v.toJsonLd(options)
|
7813
|
-
: await v.toJsonLd(options)
|
7925
|
+
: await v.toJsonLd(options);
|
7926
|
+
array.push(element);
|
7814
7927
|
}
|
7815
7928
|
if (array.length > 0) {
|
7816
7929
|
values["https://www.w3.org/ns/activitystreams#first"] = array;
|
7817
7930
|
}
|
7818
7931
|
array = [];
|
7819
7932
|
for (const v of this.#_gyJJnyEFnuNVi1HFZKfAn3Hfn26) {
|
7820
|
-
|
7933
|
+
const element = v instanceof URL
|
7821
7934
|
? { "@id": v.href }
|
7822
7935
|
: v instanceof CollectionPage
|
7823
7936
|
? await v.toJsonLd(options)
|
7824
|
-
: await v.toJsonLd(options)
|
7937
|
+
: await v.toJsonLd(options);
|
7938
|
+
array.push(element);
|
7825
7939
|
}
|
7826
7940
|
if (array.length > 0) {
|
7827
7941
|
values["https://www.w3.org/ns/activitystreams#last"] = array;
|
7828
7942
|
}
|
7829
7943
|
array = [];
|
7830
7944
|
for (const v of this.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg) {
|
7831
|
-
|
7945
|
+
const element = v instanceof URL
|
7832
7946
|
? { "@id": v.href }
|
7833
7947
|
: v instanceof Object
|
7834
7948
|
? await v.toJsonLd(options)
|
7835
|
-
: await v.toJsonLd(options)
|
7949
|
+
: await v.toJsonLd(options);
|
7950
|
+
array.push(element);
|
7836
7951
|
}
|
7837
7952
|
if (array.length > 0) {
|
7838
7953
|
values["https://www.w3.org/ns/activitystreams#items"] = array;
|
@@ -7843,7 +7958,7 @@ export class Collection extends Object {
|
|
7843
7958
|
if (options.expand) {
|
7844
7959
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7845
7960
|
}
|
7846
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
7961
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
7847
7962
|
}
|
7848
7963
|
/**
|
7849
7964
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -8363,33 +8478,36 @@ export class CollectionPage extends Collection {
|
|
8363
8478
|
const values = baseValues[0];
|
8364
8479
|
array = [];
|
8365
8480
|
for (const v of this.#_2kWgBhQKjEauxx8C6qF3ZQamK4Le) {
|
8366
|
-
|
8481
|
+
const element = v instanceof URL
|
8367
8482
|
? { "@id": v.href }
|
8368
8483
|
: v instanceof Link
|
8369
8484
|
? await v.toJsonLd(options)
|
8370
|
-
: await v.toJsonLd(options)
|
8485
|
+
: await v.toJsonLd(options);
|
8486
|
+
array.push(element);
|
8371
8487
|
}
|
8372
8488
|
if (array.length > 0) {
|
8373
8489
|
values["https://www.w3.org/ns/activitystreams#partOf"] = array;
|
8374
8490
|
}
|
8375
8491
|
array = [];
|
8376
8492
|
for (const v of this.#_3BT4kQLcXhHx7TAWaNDKh8nFn9eY) {
|
8377
|
-
|
8493
|
+
const element = v instanceof URL
|
8378
8494
|
? { "@id": v.href }
|
8379
8495
|
: v instanceof _b
|
8380
8496
|
? await v.toJsonLd(options)
|
8381
|
-
: await v.toJsonLd(options)
|
8497
|
+
: await v.toJsonLd(options);
|
8498
|
+
array.push(element);
|
8382
8499
|
}
|
8383
8500
|
if (array.length > 0) {
|
8384
8501
|
values["https://www.w3.org/ns/activitystreams#next"] = array;
|
8385
8502
|
}
|
8386
8503
|
array = [];
|
8387
8504
|
for (const v of this.#_3b8yG8tDNzQFFEnWhCc13G8eHooA) {
|
8388
|
-
|
8505
|
+
const element = v instanceof URL
|
8389
8506
|
? { "@id": v.href }
|
8390
8507
|
: v instanceof _b
|
8391
8508
|
? await v.toJsonLd(options)
|
8392
|
-
: await v.toJsonLd(options)
|
8509
|
+
: await v.toJsonLd(options);
|
8510
|
+
array.push(element);
|
8393
8511
|
}
|
8394
8512
|
if (array.length > 0) {
|
8395
8513
|
values["https://www.w3.org/ns/activitystreams#prev"] = array;
|
@@ -8400,7 +8518,7 @@ export class CollectionPage extends Collection {
|
|
8400
8518
|
if (options.expand) {
|
8401
8519
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
8402
8520
|
}
|
8403
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
8521
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
8404
8522
|
}
|
8405
8523
|
/**
|
8406
8524
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -8636,16 +8754,17 @@ export class Create extends Activity {
|
|
8636
8754
|
if (options.expand) {
|
8637
8755
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
8638
8756
|
}
|
8639
|
-
return await jsonld.compact(values,
|
8640
|
-
|
8641
|
-
|
8642
|
-
|
8643
|
-
|
8644
|
-
|
8645
|
-
|
8646
|
-
|
8647
|
-
|
8648
|
-
|
8757
|
+
return await jsonld.compact(values, options.context ??
|
8758
|
+
[
|
8759
|
+
"https://www.w3.org/ns/activitystreams",
|
8760
|
+
"https://w3id.org/security/data-integrity/v1",
|
8761
|
+
{
|
8762
|
+
"toot": "http://joinmastodon.org/ns#",
|
8763
|
+
"sensitive": "as:sensitive",
|
8764
|
+
"Emoji": "toot:Emoji",
|
8765
|
+
"Hashtag": "as:Hashtag",
|
8766
|
+
},
|
8767
|
+
], { documentLoader: options.contextLoader });
|
8649
8768
|
}
|
8650
8769
|
/**
|
8651
8770
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -8752,10 +8871,11 @@ export class Delete extends Activity {
|
|
8752
8871
|
if (options.expand) {
|
8753
8872
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
8754
8873
|
}
|
8755
|
-
return await jsonld.compact(values,
|
8756
|
-
|
8757
|
-
|
8758
|
-
|
8874
|
+
return await jsonld.compact(values, options.context ??
|
8875
|
+
[
|
8876
|
+
"https://www.w3.org/ns/activitystreams",
|
8877
|
+
"https://w3id.org/security/data-integrity/v1",
|
8878
|
+
], { documentLoader: options.contextLoader });
|
8759
8879
|
}
|
8760
8880
|
/**
|
8761
8881
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -8861,10 +8981,11 @@ export class Dislike extends Activity {
|
|
8861
8981
|
if (options.expand) {
|
8862
8982
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
8863
8983
|
}
|
8864
|
-
return await jsonld.compact(values,
|
8865
|
-
|
8866
|
-
|
8867
|
-
|
8984
|
+
return await jsonld.compact(values, options.context ??
|
8985
|
+
[
|
8986
|
+
"https://www.w3.org/ns/activitystreams",
|
8987
|
+
"https://w3id.org/security/data-integrity/v1",
|
8988
|
+
], { documentLoader: options.contextLoader });
|
8868
8989
|
}
|
8869
8990
|
/**
|
8870
8991
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -9091,21 +9212,24 @@ export class Endpoints {
|
|
9091
9212
|
const values = {};
|
9092
9213
|
array = [];
|
9093
9214
|
for (const v of this.#_2JCYDbSxEHCCLdBYed33cCETfGyR) {
|
9094
|
-
|
9215
|
+
const element = { "@id": v.href };
|
9216
|
+
array.push(element);
|
9095
9217
|
}
|
9096
9218
|
if (array.length > 0) {
|
9097
9219
|
values["https://www.w3.org/ns/activitystreams#proxyUrl"] = array;
|
9098
9220
|
}
|
9099
9221
|
array = [];
|
9100
9222
|
for (const v of this.#_25S6UmgzDead8hxL5sQFezZTAusd) {
|
9101
|
-
|
9223
|
+
const element = { "@id": v.href };
|
9224
|
+
array.push(element);
|
9102
9225
|
}
|
9103
9226
|
if (array.length > 0) {
|
9104
9227
|
values["https://www.w3.org/ns/activitystreams#oauthAuthorizationEndpoint"] = array;
|
9105
9228
|
}
|
9106
9229
|
array = [];
|
9107
9230
|
for (const v of this.#_iAMxqrSba7yBCRB1FZ5kEVdKEZ3) {
|
9108
|
-
|
9231
|
+
const element = { "@id": v.href };
|
9232
|
+
array.push(element);
|
9109
9233
|
}
|
9110
9234
|
if (array.length > 0) {
|
9111
9235
|
values["https://www.w3.org/ns/activitystreams#oauthTokenEndpoint"] =
|
@@ -9113,21 +9237,24 @@ export class Endpoints {
|
|
9113
9237
|
}
|
9114
9238
|
array = [];
|
9115
9239
|
for (const v of this.#_8Bx9qN8oU7Bpt2xi6khaxWp1gMr) {
|
9116
|
-
|
9240
|
+
const element = { "@id": v.href };
|
9241
|
+
array.push(element);
|
9117
9242
|
}
|
9118
9243
|
if (array.length > 0) {
|
9119
9244
|
values["https://www.w3.org/ns/activitystreams#provideClientKey"] = array;
|
9120
9245
|
}
|
9121
9246
|
array = [];
|
9122
9247
|
for (const v of this.#_3dU7PMVQZJpsCpo2F4RQXxBXdPmS) {
|
9123
|
-
|
9248
|
+
const element = { "@id": v.href };
|
9249
|
+
array.push(element);
|
9124
9250
|
}
|
9125
9251
|
if (array.length > 0) {
|
9126
9252
|
values["https://www.w3.org/ns/activitystreams#signClientKey"] = array;
|
9127
9253
|
}
|
9128
9254
|
array = [];
|
9129
9255
|
for (const v of this.#_3JprUSDLVqqX4dwHRi37qGZZCRCc) {
|
9130
|
-
|
9256
|
+
const element = { "@id": v.href };
|
9257
|
+
array.push(element);
|
9131
9258
|
}
|
9132
9259
|
if (array.length > 0) {
|
9133
9260
|
values["https://www.w3.org/ns/activitystreams#sharedInbox"] = array;
|
@@ -9138,7 +9265,7 @@ export class Endpoints {
|
|
9138
9265
|
if (options.expand) {
|
9139
9266
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
9140
9267
|
}
|
9141
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
9268
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
9142
9269
|
}
|
9143
9270
|
/**
|
9144
9271
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -9358,10 +9485,11 @@ export class Event extends Object {
|
|
9358
9485
|
if (options.expand) {
|
9359
9486
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
9360
9487
|
}
|
9361
|
-
return await jsonld.compact(values,
|
9362
|
-
|
9363
|
-
|
9364
|
-
|
9488
|
+
return await jsonld.compact(values, options.context ??
|
9489
|
+
[
|
9490
|
+
"https://www.w3.org/ns/activitystreams",
|
9491
|
+
"https://w3id.org/security/data-integrity/v1",
|
9492
|
+
], { documentLoader: options.contextLoader });
|
9365
9493
|
}
|
9366
9494
|
/**
|
9367
9495
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -9469,10 +9597,11 @@ export class Flag extends Activity {
|
|
9469
9597
|
if (options.expand) {
|
9470
9598
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
9471
9599
|
}
|
9472
|
-
return await jsonld.compact(values,
|
9473
|
-
|
9474
|
-
|
9475
|
-
|
9600
|
+
return await jsonld.compact(values, options.context ??
|
9601
|
+
[
|
9602
|
+
"https://www.w3.org/ns/activitystreams",
|
9603
|
+
"https://w3id.org/security/data-integrity/v1",
|
9604
|
+
], { documentLoader: options.contextLoader });
|
9476
9605
|
}
|
9477
9606
|
/**
|
9478
9607
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -9581,10 +9710,11 @@ export class Follow extends Activity {
|
|
9581
9710
|
if (options.expand) {
|
9582
9711
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
9583
9712
|
}
|
9584
|
-
return await jsonld.compact(values,
|
9585
|
-
|
9586
|
-
|
9587
|
-
|
9713
|
+
return await jsonld.compact(values, options.context ??
|
9714
|
+
[
|
9715
|
+
"https://www.w3.org/ns/activitystreams",
|
9716
|
+
"https://w3id.org/security/data-integrity/v1",
|
9717
|
+
], { documentLoader: options.contextLoader });
|
9588
9718
|
}
|
9589
9719
|
/**
|
9590
9720
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -10346,105 +10476,136 @@ export class Group extends Object {
|
|
10346
10476
|
const values = baseValues[0];
|
10347
10477
|
array = [];
|
10348
10478
|
for (const v of this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf) {
|
10349
|
-
|
10479
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
10350
10480
|
"@value": v.toString(),
|
10351
10481
|
"@language": v.language.compact(),
|
10352
|
-
}
|
10482
|
+
};
|
10483
|
+
array.push(element);
|
10353
10484
|
}
|
10354
10485
|
if (array.length > 0) {
|
10355
10486
|
values["https://www.w3.org/ns/activitystreams#preferredUsername"] = array;
|
10356
10487
|
}
|
10357
10488
|
array = [];
|
10358
10489
|
for (const v of this.#_axq166E2eZADq34V4MYUc8KMZdC) {
|
10359
|
-
|
10490
|
+
const element = v instanceof URL
|
10491
|
+
? { "@id": v.href }
|
10492
|
+
: await v.toJsonLd(options);
|
10493
|
+
array.push(element);
|
10360
10494
|
}
|
10361
10495
|
if (array.length > 0)
|
10362
10496
|
values["https://w3id.org/security#publicKey"] = array;
|
10363
10497
|
array = [];
|
10364
10498
|
for (const v of this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3) {
|
10365
|
-
|
10499
|
+
const element = v instanceof URL
|
10500
|
+
? { "@id": v.href }
|
10501
|
+
: await v.toJsonLd(options);
|
10502
|
+
array.push(element);
|
10366
10503
|
}
|
10367
10504
|
if (array.length > 0) {
|
10368
10505
|
values["https://w3id.org/security#assertionMethod"] = array;
|
10369
10506
|
}
|
10370
10507
|
array = [];
|
10371
10508
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA) {
|
10372
|
-
|
10509
|
+
const element = { "@value": v };
|
10510
|
+
array.push(element);
|
10373
10511
|
}
|
10374
10512
|
if (array.length > 0) {
|
10375
10513
|
values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] = array;
|
10376
10514
|
}
|
10377
10515
|
array = [];
|
10378
10516
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB) {
|
10379
|
-
|
10517
|
+
const element = v instanceof URL
|
10518
|
+
? { "@id": v.href }
|
10519
|
+
: await v.toJsonLd(options);
|
10520
|
+
array.push(element);
|
10380
10521
|
}
|
10381
10522
|
if (array.length > 0)
|
10382
10523
|
values["http://www.w3.org/ns/ldp#inbox"] = array;
|
10383
10524
|
array = [];
|
10384
10525
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC) {
|
10385
|
-
|
10526
|
+
const element = v instanceof URL
|
10527
|
+
? { "@id": v.href }
|
10528
|
+
: await v.toJsonLd(options);
|
10529
|
+
array.push(element);
|
10386
10530
|
}
|
10387
10531
|
if (array.length > 0) {
|
10388
10532
|
values["https://www.w3.org/ns/activitystreams#outbox"] = array;
|
10389
10533
|
}
|
10390
10534
|
array = [];
|
10391
10535
|
for (const v of this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee) {
|
10392
|
-
|
10536
|
+
const element = v instanceof URL
|
10537
|
+
? { "@id": v.href }
|
10538
|
+
: await v.toJsonLd(options);
|
10539
|
+
array.push(element);
|
10393
10540
|
}
|
10394
10541
|
if (array.length > 0) {
|
10395
10542
|
values["https://www.w3.org/ns/activitystreams#following"] = array;
|
10396
10543
|
}
|
10397
10544
|
array = [];
|
10398
10545
|
for (const v of this.#_BBCTgfphhsFzpVfKTykGSpBNwoA) {
|
10399
|
-
|
10546
|
+
const element = v instanceof URL
|
10547
|
+
? { "@id": v.href }
|
10548
|
+
: await v.toJsonLd(options);
|
10549
|
+
array.push(element);
|
10400
10550
|
}
|
10401
10551
|
if (array.length > 0) {
|
10402
10552
|
values["https://www.w3.org/ns/activitystreams#followers"] = array;
|
10403
10553
|
}
|
10404
10554
|
array = [];
|
10405
10555
|
for (const v of this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU) {
|
10406
|
-
|
10556
|
+
const element = v instanceof URL
|
10557
|
+
? { "@id": v.href }
|
10558
|
+
: await v.toJsonLd(options);
|
10559
|
+
array.push(element);
|
10407
10560
|
}
|
10408
10561
|
if (array.length > 0) {
|
10409
10562
|
values["https://www.w3.org/ns/activitystreams#liked"] = array;
|
10410
10563
|
}
|
10411
10564
|
array = [];
|
10412
10565
|
for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
|
10413
|
-
|
10566
|
+
const element = v instanceof URL
|
10567
|
+
? { "@id": v.href }
|
10568
|
+
: await v.toJsonLd(options);
|
10569
|
+
array.push(element);
|
10414
10570
|
}
|
10415
10571
|
if (array.length > 0) {
|
10416
10572
|
values["https://www.w3.org/ns/activitystreams#streams"] = array;
|
10417
10573
|
}
|
10418
10574
|
array = [];
|
10419
10575
|
for (const v of this.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG) {
|
10420
|
-
|
10576
|
+
const element = await v.toJsonLd(options);
|
10577
|
+
array.push(element);
|
10421
10578
|
}
|
10422
10579
|
if (array.length > 0) {
|
10423
10580
|
values["https://www.w3.org/ns/activitystreams#endpoints"] = array;
|
10424
10581
|
}
|
10425
10582
|
array = [];
|
10426
10583
|
for (const v of this.#_gAJzg1QDc4rcefFsUzGSYmyXvNH) {
|
10427
|
-
|
10584
|
+
const element = { "@value": v };
|
10585
|
+
array.push(element);
|
10428
10586
|
}
|
10429
10587
|
if (array.length > 0) {
|
10430
10588
|
values["http://joinmastodon.org/ns#discoverable"] = array;
|
10431
10589
|
}
|
10432
10590
|
array = [];
|
10433
10591
|
for (const v of this.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7) {
|
10434
|
-
|
10592
|
+
const element = { "@value": v };
|
10593
|
+
array.push(element);
|
10435
10594
|
}
|
10436
10595
|
if (array.length > 0) {
|
10437
10596
|
values["http://joinmastodon.org/ns#suspended"] = array;
|
10438
10597
|
}
|
10439
10598
|
array = [];
|
10440
10599
|
for (const v of this.#_79S8K4f5J9MWUgCxziRyUe6PTHZ) {
|
10441
|
-
|
10600
|
+
const element = { "@value": v };
|
10601
|
+
array.push(element);
|
10442
10602
|
}
|
10443
10603
|
if (array.length > 0)
|
10444
10604
|
values["http://joinmastodon.org/ns#memorial"] = array;
|
10445
10605
|
array = [];
|
10446
10606
|
for (const v of this.#_2diCorzqPGQQqftp6e4SrCEwEnyk) {
|
10447
|
-
|
10607
|
+
const element = { "@value": v };
|
10608
|
+
array.push(element);
|
10448
10609
|
}
|
10449
10610
|
if (array.length > 0) {
|
10450
10611
|
values["http://joinmastodon.org/ns#indexable"] = array;
|
@@ -10455,24 +10616,25 @@ export class Group extends Object {
|
|
10455
10616
|
if (options.expand) {
|
10456
10617
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
10457
10618
|
}
|
10458
|
-
return await jsonld.compact(values,
|
10459
|
-
|
10460
|
-
|
10461
|
-
|
10462
|
-
|
10463
|
-
|
10464
|
-
|
10465
|
-
|
10466
|
-
|
10467
|
-
|
10468
|
-
|
10469
|
-
|
10470
|
-
|
10471
|
-
|
10472
|
-
|
10473
|
-
|
10474
|
-
|
10475
|
-
|
10619
|
+
return await jsonld.compact(values, options.context ??
|
10620
|
+
[
|
10621
|
+
"https://www.w3.org/ns/activitystreams",
|
10622
|
+
"https://w3id.org/security/v1",
|
10623
|
+
"https://w3id.org/security/data-integrity/v1",
|
10624
|
+
"https://www.w3.org/ns/did/v1",
|
10625
|
+
"https://w3id.org/security/multikey/v1",
|
10626
|
+
{
|
10627
|
+
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
10628
|
+
"toot": "http://joinmastodon.org/ns#",
|
10629
|
+
"discoverable": "toot:discoverable",
|
10630
|
+
"suspended": "toot:suspended",
|
10631
|
+
"memorial": "toot:memorial",
|
10632
|
+
"indexable": "toot:indexable",
|
10633
|
+
"schema": "http://schema.org#",
|
10634
|
+
"PropertyValue": "schema:PropertyValue",
|
10635
|
+
"value": "schema:value",
|
10636
|
+
},
|
10637
|
+
], { documentLoader: options.contextLoader });
|
10476
10638
|
}
|
10477
10639
|
/**
|
10478
10640
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -11149,69 +11311,77 @@ export class Link {
|
|
11149
11311
|
const values = {};
|
11150
11312
|
array = [];
|
11151
11313
|
for (const v of this.#_pVjLsybKQdmkjuU7MHjiVmNnuj7) {
|
11152
|
-
|
11314
|
+
const element = { "@id": v.href };
|
11315
|
+
array.push(element);
|
11153
11316
|
}
|
11154
11317
|
if (array.length > 0) {
|
11155
11318
|
values["https://www.w3.org/ns/activitystreams#href"] = array;
|
11156
11319
|
}
|
11157
11320
|
array = [];
|
11158
11321
|
for (const v of this.#_2a1c5GkfkQsnyyLybF8UXBQfFuHZ) {
|
11159
|
-
|
11322
|
+
const element = { "@value": v };
|
11323
|
+
array.push(element);
|
11160
11324
|
}
|
11161
11325
|
if (array.length > 0) {
|
11162
11326
|
values["https://www.w3.org/ns/activitystreams#rel"] = array;
|
11163
11327
|
}
|
11164
11328
|
array = [];
|
11165
11329
|
for (const v of this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8) {
|
11166
|
-
|
11330
|
+
const element = { "@value": v };
|
11331
|
+
array.push(element);
|
11167
11332
|
}
|
11168
11333
|
if (array.length > 0) {
|
11169
11334
|
values["https://www.w3.org/ns/activitystreams#mediaType"] = array;
|
11170
11335
|
}
|
11171
11336
|
array = [];
|
11172
11337
|
for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav) {
|
11173
|
-
|
11338
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
11174
11339
|
"@value": v.toString(),
|
11175
11340
|
"@language": v.language.compact(),
|
11176
|
-
}
|
11341
|
+
};
|
11342
|
+
array.push(element);
|
11177
11343
|
}
|
11178
11344
|
if (array.length > 0) {
|
11179
11345
|
values["https://www.w3.org/ns/activitystreams#name"] = array;
|
11180
11346
|
}
|
11181
11347
|
array = [];
|
11182
11348
|
for (const v of this.#_f57HKWCp1YRBbTJE8PF12RbDJGf) {
|
11183
|
-
|
11349
|
+
const element = { "@value": v.compact() };
|
11350
|
+
array.push(element);
|
11184
11351
|
}
|
11185
11352
|
if (array.length > 0) {
|
11186
11353
|
values["https://www.w3.org/ns/activitystreams#hreflang"] = array;
|
11187
11354
|
}
|
11188
11355
|
array = [];
|
11189
11356
|
for (const v of this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb) {
|
11190
|
-
|
11357
|
+
const element = {
|
11191
11358
|
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
|
11192
11359
|
"@value": v,
|
11193
|
-
}
|
11360
|
+
};
|
11361
|
+
array.push(element);
|
11194
11362
|
}
|
11195
11363
|
if (array.length > 0) {
|
11196
11364
|
values["https://www.w3.org/ns/activitystreams#height"] = array;
|
11197
11365
|
}
|
11198
11366
|
array = [];
|
11199
11367
|
for (const v of this.#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe) {
|
11200
|
-
|
11368
|
+
const element = {
|
11201
11369
|
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
|
11202
11370
|
"@value": v,
|
11203
|
-
}
|
11371
|
+
};
|
11372
|
+
array.push(element);
|
11204
11373
|
}
|
11205
11374
|
if (array.length > 0) {
|
11206
11375
|
values["https://www.w3.org/ns/activitystreams#width"] = array;
|
11207
11376
|
}
|
11208
11377
|
array = [];
|
11209
11378
|
for (const v of this.#_gCVTegXxWWCw6wWRxa1QF65zusg) {
|
11210
|
-
|
11379
|
+
const element = v instanceof URL
|
11211
11380
|
? { "@id": v.href }
|
11212
11381
|
: v instanceof _c
|
11213
11382
|
? await v.toJsonLd(options)
|
11214
|
-
: await v.toJsonLd(options)
|
11383
|
+
: await v.toJsonLd(options);
|
11384
|
+
array.push(element);
|
11215
11385
|
}
|
11216
11386
|
if (array.length > 0) {
|
11217
11387
|
values["https://www.w3.org/ns/activitystreams#preview"] = array;
|
@@ -11222,7 +11392,7 @@ export class Link {
|
|
11222
11392
|
if (options.expand) {
|
11223
11393
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11224
11394
|
}
|
11225
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
11395
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
11226
11396
|
}
|
11227
11397
|
/**
|
11228
11398
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -11569,7 +11739,8 @@ export class Hashtag extends Link {
|
|
11569
11739
|
if (options.expand) {
|
11570
11740
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11571
11741
|
}
|
11572
|
-
return await jsonld.compact(values,
|
11742
|
+
return await jsonld.compact(values, options.context ??
|
11743
|
+
["https://www.w3.org/ns/activitystreams", { "Hashtag": "as:Hashtag" }], { documentLoader: options.contextLoader });
|
11573
11744
|
}
|
11574
11745
|
/**
|
11575
11746
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -11675,7 +11846,7 @@ export class Image extends Document {
|
|
11675
11846
|
if (options.expand) {
|
11676
11847
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11677
11848
|
}
|
11678
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
11849
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
11679
11850
|
}
|
11680
11851
|
/**
|
11681
11852
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -11785,10 +11956,11 @@ export class IntransitiveActivity extends Activity {
|
|
11785
11956
|
if (options.expand) {
|
11786
11957
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11787
11958
|
}
|
11788
|
-
return await jsonld.compact(values,
|
11789
|
-
|
11790
|
-
|
11791
|
-
|
11959
|
+
return await jsonld.compact(values, options.context ??
|
11960
|
+
[
|
11961
|
+
"https://www.w3.org/ns/activitystreams",
|
11962
|
+
"https://w3id.org/security/data-integrity/v1",
|
11963
|
+
], { documentLoader: options.contextLoader });
|
11792
11964
|
}
|
11793
11965
|
/**
|
11794
11966
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -11895,10 +12067,11 @@ export class Like extends Activity {
|
|
11895
12067
|
if (options.expand) {
|
11896
12068
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11897
12069
|
}
|
11898
|
-
return await jsonld.compact(values,
|
11899
|
-
|
11900
|
-
|
11901
|
-
|
12070
|
+
return await jsonld.compact(values, options.context ??
|
12071
|
+
[
|
12072
|
+
"https://www.w3.org/ns/activitystreams",
|
12073
|
+
"https://w3id.org/security/data-integrity/v1",
|
12074
|
+
], { documentLoader: options.contextLoader });
|
11902
12075
|
}
|
11903
12076
|
/**
|
11904
12077
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -12004,7 +12177,7 @@ export class Mention extends Link {
|
|
12004
12177
|
if (options.expand) {
|
12005
12178
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
12006
12179
|
}
|
12007
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
12180
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
12008
12181
|
}
|
12009
12182
|
/**
|
12010
12183
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -12111,16 +12284,17 @@ export class Note extends Object {
|
|
12111
12284
|
if (options.expand) {
|
12112
12285
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
12113
12286
|
}
|
12114
|
-
return await jsonld.compact(values,
|
12115
|
-
|
12116
|
-
|
12117
|
-
|
12118
|
-
|
12119
|
-
|
12120
|
-
|
12121
|
-
|
12122
|
-
|
12123
|
-
|
12287
|
+
return await jsonld.compact(values, options.context ??
|
12288
|
+
[
|
12289
|
+
"https://www.w3.org/ns/activitystreams",
|
12290
|
+
"https://w3id.org/security/data-integrity/v1",
|
12291
|
+
{
|
12292
|
+
"toot": "http://joinmastodon.org/ns#",
|
12293
|
+
"sensitive": "as:sensitive",
|
12294
|
+
"Emoji": "toot:Emoji",
|
12295
|
+
"Hashtag": "as:Hashtag",
|
12296
|
+
},
|
12297
|
+
], { documentLoader: options.contextLoader });
|
12124
12298
|
}
|
12125
12299
|
/**
|
12126
12300
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -12229,7 +12403,7 @@ export class OrderedCollection extends Collection {
|
|
12229
12403
|
if (options.expand) {
|
12230
12404
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
12231
12405
|
}
|
12232
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
12406
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
12233
12407
|
}
|
12234
12408
|
/**
|
12235
12409
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -12349,10 +12523,11 @@ export class OrderedCollectionPage extends CollectionPage {
|
|
12349
12523
|
const values = baseValues[0];
|
12350
12524
|
array = [];
|
12351
12525
|
for (const v of this.#_2W4yinFwqmpneu2h4m1mZ3pcLADd) {
|
12352
|
-
|
12526
|
+
const element = {
|
12353
12527
|
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
|
12354
12528
|
"@value": v,
|
12355
|
-
}
|
12529
|
+
};
|
12530
|
+
array.push(element);
|
12356
12531
|
}
|
12357
12532
|
if (array.length > 0) {
|
12358
12533
|
values["https://www.w3.org/ns/activitystreams#startIndex"] = array;
|
@@ -12365,7 +12540,7 @@ export class OrderedCollectionPage extends CollectionPage {
|
|
12365
12540
|
if (options.expand) {
|
12366
12541
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
12367
12542
|
}
|
12368
|
-
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
12543
|
+
return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
12369
12544
|
}
|
12370
12545
|
/**
|
12371
12546
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -13146,105 +13321,136 @@ export class Organization extends Object {
|
|
13146
13321
|
const values = baseValues[0];
|
13147
13322
|
array = [];
|
13148
13323
|
for (const v of this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf) {
|
13149
|
-
|
13324
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
13150
13325
|
"@value": v.toString(),
|
13151
13326
|
"@language": v.language.compact(),
|
13152
|
-
}
|
13327
|
+
};
|
13328
|
+
array.push(element);
|
13153
13329
|
}
|
13154
13330
|
if (array.length > 0) {
|
13155
13331
|
values["https://www.w3.org/ns/activitystreams#preferredUsername"] = array;
|
13156
13332
|
}
|
13157
13333
|
array = [];
|
13158
13334
|
for (const v of this.#_axq166E2eZADq34V4MYUc8KMZdC) {
|
13159
|
-
|
13335
|
+
const element = v instanceof URL
|
13336
|
+
? { "@id": v.href }
|
13337
|
+
: await v.toJsonLd(options);
|
13338
|
+
array.push(element);
|
13160
13339
|
}
|
13161
13340
|
if (array.length > 0)
|
13162
13341
|
values["https://w3id.org/security#publicKey"] = array;
|
13163
13342
|
array = [];
|
13164
13343
|
for (const v of this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3) {
|
13165
|
-
|
13344
|
+
const element = v instanceof URL
|
13345
|
+
? { "@id": v.href }
|
13346
|
+
: await v.toJsonLd(options);
|
13347
|
+
array.push(element);
|
13166
13348
|
}
|
13167
13349
|
if (array.length > 0) {
|
13168
13350
|
values["https://w3id.org/security#assertionMethod"] = array;
|
13169
13351
|
}
|
13170
13352
|
array = [];
|
13171
13353
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA) {
|
13172
|
-
|
13354
|
+
const element = { "@value": v };
|
13355
|
+
array.push(element);
|
13173
13356
|
}
|
13174
13357
|
if (array.length > 0) {
|
13175
13358
|
values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] = array;
|
13176
13359
|
}
|
13177
13360
|
array = [];
|
13178
13361
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB) {
|
13179
|
-
|
13362
|
+
const element = v instanceof URL
|
13363
|
+
? { "@id": v.href }
|
13364
|
+
: await v.toJsonLd(options);
|
13365
|
+
array.push(element);
|
13180
13366
|
}
|
13181
13367
|
if (array.length > 0)
|
13182
13368
|
values["http://www.w3.org/ns/ldp#inbox"] = array;
|
13183
13369
|
array = [];
|
13184
13370
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC) {
|
13185
|
-
|
13371
|
+
const element = v instanceof URL
|
13372
|
+
? { "@id": v.href }
|
13373
|
+
: await v.toJsonLd(options);
|
13374
|
+
array.push(element);
|
13186
13375
|
}
|
13187
13376
|
if (array.length > 0) {
|
13188
13377
|
values["https://www.w3.org/ns/activitystreams#outbox"] = array;
|
13189
13378
|
}
|
13190
13379
|
array = [];
|
13191
13380
|
for (const v of this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee) {
|
13192
|
-
|
13381
|
+
const element = v instanceof URL
|
13382
|
+
? { "@id": v.href }
|
13383
|
+
: await v.toJsonLd(options);
|
13384
|
+
array.push(element);
|
13193
13385
|
}
|
13194
13386
|
if (array.length > 0) {
|
13195
13387
|
values["https://www.w3.org/ns/activitystreams#following"] = array;
|
13196
13388
|
}
|
13197
13389
|
array = [];
|
13198
13390
|
for (const v of this.#_BBCTgfphhsFzpVfKTykGSpBNwoA) {
|
13199
|
-
|
13391
|
+
const element = v instanceof URL
|
13392
|
+
? { "@id": v.href }
|
13393
|
+
: await v.toJsonLd(options);
|
13394
|
+
array.push(element);
|
13200
13395
|
}
|
13201
13396
|
if (array.length > 0) {
|
13202
13397
|
values["https://www.w3.org/ns/activitystreams#followers"] = array;
|
13203
13398
|
}
|
13204
13399
|
array = [];
|
13205
13400
|
for (const v of this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU) {
|
13206
|
-
|
13401
|
+
const element = v instanceof URL
|
13402
|
+
? { "@id": v.href }
|
13403
|
+
: await v.toJsonLd(options);
|
13404
|
+
array.push(element);
|
13207
13405
|
}
|
13208
13406
|
if (array.length > 0) {
|
13209
13407
|
values["https://www.w3.org/ns/activitystreams#liked"] = array;
|
13210
13408
|
}
|
13211
13409
|
array = [];
|
13212
13410
|
for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
|
13213
|
-
|
13411
|
+
const element = v instanceof URL
|
13412
|
+
? { "@id": v.href }
|
13413
|
+
: await v.toJsonLd(options);
|
13414
|
+
array.push(element);
|
13214
13415
|
}
|
13215
13416
|
if (array.length > 0) {
|
13216
13417
|
values["https://www.w3.org/ns/activitystreams#streams"] = array;
|
13217
13418
|
}
|
13218
13419
|
array = [];
|
13219
13420
|
for (const v of this.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG) {
|
13220
|
-
|
13421
|
+
const element = await v.toJsonLd(options);
|
13422
|
+
array.push(element);
|
13221
13423
|
}
|
13222
13424
|
if (array.length > 0) {
|
13223
13425
|
values["https://www.w3.org/ns/activitystreams#endpoints"] = array;
|
13224
13426
|
}
|
13225
13427
|
array = [];
|
13226
13428
|
for (const v of this.#_gAJzg1QDc4rcefFsUzGSYmyXvNH) {
|
13227
|
-
|
13429
|
+
const element = { "@value": v };
|
13430
|
+
array.push(element);
|
13228
13431
|
}
|
13229
13432
|
if (array.length > 0) {
|
13230
13433
|
values["http://joinmastodon.org/ns#discoverable"] = array;
|
13231
13434
|
}
|
13232
13435
|
array = [];
|
13233
13436
|
for (const v of this.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7) {
|
13234
|
-
|
13437
|
+
const element = { "@value": v };
|
13438
|
+
array.push(element);
|
13235
13439
|
}
|
13236
13440
|
if (array.length > 0) {
|
13237
13441
|
values["http://joinmastodon.org/ns#suspended"] = array;
|
13238
13442
|
}
|
13239
13443
|
array = [];
|
13240
13444
|
for (const v of this.#_79S8K4f5J9MWUgCxziRyUe6PTHZ) {
|
13241
|
-
|
13445
|
+
const element = { "@value": v };
|
13446
|
+
array.push(element);
|
13242
13447
|
}
|
13243
13448
|
if (array.length > 0)
|
13244
13449
|
values["http://joinmastodon.org/ns#memorial"] = array;
|
13245
13450
|
array = [];
|
13246
13451
|
for (const v of this.#_2diCorzqPGQQqftp6e4SrCEwEnyk) {
|
13247
|
-
|
13452
|
+
const element = { "@value": v };
|
13453
|
+
array.push(element);
|
13248
13454
|
}
|
13249
13455
|
if (array.length > 0) {
|
13250
13456
|
values["http://joinmastodon.org/ns#indexable"] = array;
|
@@ -13255,24 +13461,25 @@ export class Organization extends Object {
|
|
13255
13461
|
if (options.expand) {
|
13256
13462
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
13257
13463
|
}
|
13258
|
-
return await jsonld.compact(values,
|
13259
|
-
|
13260
|
-
|
13261
|
-
|
13262
|
-
|
13263
|
-
|
13264
|
-
|
13265
|
-
|
13266
|
-
|
13267
|
-
|
13268
|
-
|
13269
|
-
|
13270
|
-
|
13271
|
-
|
13272
|
-
|
13273
|
-
|
13274
|
-
|
13275
|
-
|
13464
|
+
return await jsonld.compact(values, options.context ??
|
13465
|
+
[
|
13466
|
+
"https://www.w3.org/ns/activitystreams",
|
13467
|
+
"https://w3id.org/security/v1",
|
13468
|
+
"https://w3id.org/security/data-integrity/v1",
|
13469
|
+
"https://www.w3.org/ns/did/v1",
|
13470
|
+
"https://w3id.org/security/multikey/v1",
|
13471
|
+
{
|
13472
|
+
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
13473
|
+
"toot": "http://joinmastodon.org/ns#",
|
13474
|
+
"discoverable": "toot:discoverable",
|
13475
|
+
"suspended": "toot:suspended",
|
13476
|
+
"memorial": "toot:memorial",
|
13477
|
+
"indexable": "toot:indexable",
|
13478
|
+
"schema": "http://schema.org#",
|
13479
|
+
"PropertyValue": "schema:PropertyValue",
|
13480
|
+
"value": "schema:value",
|
13481
|
+
},
|
13482
|
+
], { documentLoader: options.contextLoader });
|
13276
13483
|
}
|
13277
13484
|
/**
|
13278
13485
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -13716,10 +13923,11 @@ export class Page extends Document {
|
|
13716
13923
|
if (options.expand) {
|
13717
13924
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
13718
13925
|
}
|
13719
|
-
return await jsonld.compact(values,
|
13720
|
-
|
13721
|
-
|
13722
|
-
|
13926
|
+
return await jsonld.compact(values, options.context ??
|
13927
|
+
[
|
13928
|
+
"https://www.w3.org/ns/activitystreams",
|
13929
|
+
"https://w3id.org/security/data-integrity/v1",
|
13930
|
+
], { documentLoader: options.contextLoader });
|
13723
13931
|
}
|
13724
13932
|
/**
|
13725
13933
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -14481,105 +14689,136 @@ export class Person extends Object {
|
|
14481
14689
|
const values = baseValues[0];
|
14482
14690
|
array = [];
|
14483
14691
|
for (const v of this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf) {
|
14484
|
-
|
14692
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
14485
14693
|
"@value": v.toString(),
|
14486
14694
|
"@language": v.language.compact(),
|
14487
|
-
}
|
14695
|
+
};
|
14696
|
+
array.push(element);
|
14488
14697
|
}
|
14489
14698
|
if (array.length > 0) {
|
14490
14699
|
values["https://www.w3.org/ns/activitystreams#preferredUsername"] = array;
|
14491
14700
|
}
|
14492
14701
|
array = [];
|
14493
14702
|
for (const v of this.#_axq166E2eZADq34V4MYUc8KMZdC) {
|
14494
|
-
|
14703
|
+
const element = v instanceof URL
|
14704
|
+
? { "@id": v.href }
|
14705
|
+
: await v.toJsonLd(options);
|
14706
|
+
array.push(element);
|
14495
14707
|
}
|
14496
14708
|
if (array.length > 0)
|
14497
14709
|
values["https://w3id.org/security#publicKey"] = array;
|
14498
14710
|
array = [];
|
14499
14711
|
for (const v of this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3) {
|
14500
|
-
|
14712
|
+
const element = v instanceof URL
|
14713
|
+
? { "@id": v.href }
|
14714
|
+
: await v.toJsonLd(options);
|
14715
|
+
array.push(element);
|
14501
14716
|
}
|
14502
14717
|
if (array.length > 0) {
|
14503
14718
|
values["https://w3id.org/security#assertionMethod"] = array;
|
14504
14719
|
}
|
14505
14720
|
array = [];
|
14506
14721
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA) {
|
14507
|
-
|
14722
|
+
const element = { "@value": v };
|
14723
|
+
array.push(element);
|
14508
14724
|
}
|
14509
14725
|
if (array.length > 0) {
|
14510
14726
|
values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] = array;
|
14511
14727
|
}
|
14512
14728
|
array = [];
|
14513
14729
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB) {
|
14514
|
-
|
14730
|
+
const element = v instanceof URL
|
14731
|
+
? { "@id": v.href }
|
14732
|
+
: await v.toJsonLd(options);
|
14733
|
+
array.push(element);
|
14515
14734
|
}
|
14516
14735
|
if (array.length > 0)
|
14517
14736
|
values["http://www.w3.org/ns/ldp#inbox"] = array;
|
14518
14737
|
array = [];
|
14519
14738
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC) {
|
14520
|
-
|
14739
|
+
const element = v instanceof URL
|
14740
|
+
? { "@id": v.href }
|
14741
|
+
: await v.toJsonLd(options);
|
14742
|
+
array.push(element);
|
14521
14743
|
}
|
14522
14744
|
if (array.length > 0) {
|
14523
14745
|
values["https://www.w3.org/ns/activitystreams#outbox"] = array;
|
14524
14746
|
}
|
14525
14747
|
array = [];
|
14526
14748
|
for (const v of this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee) {
|
14527
|
-
|
14749
|
+
const element = v instanceof URL
|
14750
|
+
? { "@id": v.href }
|
14751
|
+
: await v.toJsonLd(options);
|
14752
|
+
array.push(element);
|
14528
14753
|
}
|
14529
14754
|
if (array.length > 0) {
|
14530
14755
|
values["https://www.w3.org/ns/activitystreams#following"] = array;
|
14531
14756
|
}
|
14532
14757
|
array = [];
|
14533
14758
|
for (const v of this.#_BBCTgfphhsFzpVfKTykGSpBNwoA) {
|
14534
|
-
|
14759
|
+
const element = v instanceof URL
|
14760
|
+
? { "@id": v.href }
|
14761
|
+
: await v.toJsonLd(options);
|
14762
|
+
array.push(element);
|
14535
14763
|
}
|
14536
14764
|
if (array.length > 0) {
|
14537
14765
|
values["https://www.w3.org/ns/activitystreams#followers"] = array;
|
14538
14766
|
}
|
14539
14767
|
array = [];
|
14540
14768
|
for (const v of this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU) {
|
14541
|
-
|
14769
|
+
const element = v instanceof URL
|
14770
|
+
? { "@id": v.href }
|
14771
|
+
: await v.toJsonLd(options);
|
14772
|
+
array.push(element);
|
14542
14773
|
}
|
14543
14774
|
if (array.length > 0) {
|
14544
14775
|
values["https://www.w3.org/ns/activitystreams#liked"] = array;
|
14545
14776
|
}
|
14546
14777
|
array = [];
|
14547
14778
|
for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
|
14548
|
-
|
14779
|
+
const element = v instanceof URL
|
14780
|
+
? { "@id": v.href }
|
14781
|
+
: await v.toJsonLd(options);
|
14782
|
+
array.push(element);
|
14549
14783
|
}
|
14550
14784
|
if (array.length > 0) {
|
14551
14785
|
values["https://www.w3.org/ns/activitystreams#streams"] = array;
|
14552
14786
|
}
|
14553
14787
|
array = [];
|
14554
14788
|
for (const v of this.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG) {
|
14555
|
-
|
14789
|
+
const element = await v.toJsonLd(options);
|
14790
|
+
array.push(element);
|
14556
14791
|
}
|
14557
14792
|
if (array.length > 0) {
|
14558
14793
|
values["https://www.w3.org/ns/activitystreams#endpoints"] = array;
|
14559
14794
|
}
|
14560
14795
|
array = [];
|
14561
14796
|
for (const v of this.#_gAJzg1QDc4rcefFsUzGSYmyXvNH) {
|
14562
|
-
|
14797
|
+
const element = { "@value": v };
|
14798
|
+
array.push(element);
|
14563
14799
|
}
|
14564
14800
|
if (array.length > 0) {
|
14565
14801
|
values["http://joinmastodon.org/ns#discoverable"] = array;
|
14566
14802
|
}
|
14567
14803
|
array = [];
|
14568
14804
|
for (const v of this.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7) {
|
14569
|
-
|
14805
|
+
const element = { "@value": v };
|
14806
|
+
array.push(element);
|
14570
14807
|
}
|
14571
14808
|
if (array.length > 0) {
|
14572
14809
|
values["http://joinmastodon.org/ns#suspended"] = array;
|
14573
14810
|
}
|
14574
14811
|
array = [];
|
14575
14812
|
for (const v of this.#_79S8K4f5J9MWUgCxziRyUe6PTHZ) {
|
14576
|
-
|
14813
|
+
const element = { "@value": v };
|
14814
|
+
array.push(element);
|
14577
14815
|
}
|
14578
14816
|
if (array.length > 0)
|
14579
14817
|
values["http://joinmastodon.org/ns#memorial"] = array;
|
14580
14818
|
array = [];
|
14581
14819
|
for (const v of this.#_2diCorzqPGQQqftp6e4SrCEwEnyk) {
|
14582
|
-
|
14820
|
+
const element = { "@value": v };
|
14821
|
+
array.push(element);
|
14583
14822
|
}
|
14584
14823
|
if (array.length > 0) {
|
14585
14824
|
values["http://joinmastodon.org/ns#indexable"] = array;
|
@@ -14590,24 +14829,25 @@ export class Person extends Object {
|
|
14590
14829
|
if (options.expand) {
|
14591
14830
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
14592
14831
|
}
|
14593
|
-
return await jsonld.compact(values,
|
14594
|
-
|
14595
|
-
|
14596
|
-
|
14597
|
-
|
14598
|
-
|
14599
|
-
|
14600
|
-
|
14601
|
-
|
14602
|
-
|
14603
|
-
|
14604
|
-
|
14605
|
-
|
14606
|
-
|
14607
|
-
|
14608
|
-
|
14609
|
-
|
14610
|
-
|
14832
|
+
return await jsonld.compact(values, options.context ??
|
14833
|
+
[
|
14834
|
+
"https://www.w3.org/ns/activitystreams",
|
14835
|
+
"https://w3id.org/security/v1",
|
14836
|
+
"https://w3id.org/security/data-integrity/v1",
|
14837
|
+
"https://www.w3.org/ns/did/v1",
|
14838
|
+
"https://w3id.org/security/multikey/v1",
|
14839
|
+
{
|
14840
|
+
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
14841
|
+
"toot": "http://joinmastodon.org/ns#",
|
14842
|
+
"discoverable": "toot:discoverable",
|
14843
|
+
"suspended": "toot:suspended",
|
14844
|
+
"memorial": "toot:memorial",
|
14845
|
+
"indexable": "toot:indexable",
|
14846
|
+
"schema": "http://schema.org#",
|
14847
|
+
"PropertyValue": "schema:PropertyValue",
|
14848
|
+
"value": "schema:value",
|
14849
|
+
},
|
14850
|
+
], { documentLoader: options.contextLoader });
|
14611
14851
|
}
|
14612
14852
|
/**
|
14613
14853
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15147,60 +15387,66 @@ export class Place extends Object {
|
|
15147
15387
|
const values = baseValues[0];
|
15148
15388
|
array = [];
|
15149
15389
|
for (const v of this.#_3UCsHnBHvDAXJnBuzw3zw1VVs3Ne) {
|
15150
|
-
|
15390
|
+
const element = {
|
15151
15391
|
"@type": "http://www.w3.org/2001/XMLSchema#float",
|
15152
15392
|
"@value": v,
|
15153
|
-
}
|
15393
|
+
};
|
15394
|
+
array.push(element);
|
15154
15395
|
}
|
15155
15396
|
if (array.length > 0) {
|
15156
15397
|
values["https://www.w3.org/ns/activitystreams#accuracy"] = array;
|
15157
15398
|
}
|
15158
15399
|
array = [];
|
15159
15400
|
for (const v of this.#_3Q6KDcFQUJRRaBux1BL2yp5QWiBi) {
|
15160
|
-
|
15401
|
+
const element = {
|
15161
15402
|
"@type": "http://www.w3.org/2001/XMLSchema#float",
|
15162
15403
|
"@value": v,
|
15163
|
-
}
|
15404
|
+
};
|
15405
|
+
array.push(element);
|
15164
15406
|
}
|
15165
15407
|
if (array.length > 0) {
|
15166
15408
|
values["https://www.w3.org/ns/activitystreams#altitude"] = array;
|
15167
15409
|
}
|
15168
15410
|
array = [];
|
15169
15411
|
for (const v of this.#_3g85RoKRnaNjP7DFyLSvsWDg7HGM) {
|
15170
|
-
|
15412
|
+
const element = {
|
15171
15413
|
"@type": "http://www.w3.org/2001/XMLSchema#float",
|
15172
15414
|
"@value": v,
|
15173
|
-
}
|
15415
|
+
};
|
15416
|
+
array.push(element);
|
15174
15417
|
}
|
15175
15418
|
if (array.length > 0) {
|
15176
15419
|
values["https://www.w3.org/ns/activitystreams#latitude"] = array;
|
15177
15420
|
}
|
15178
15421
|
array = [];
|
15179
15422
|
for (const v of this.#_B2GEYdS9yBAF3ho1pm1rcRg7cSf) {
|
15180
|
-
|
15423
|
+
const element = {
|
15181
15424
|
"@type": "http://www.w3.org/2001/XMLSchema#float",
|
15182
15425
|
"@value": v,
|
15183
|
-
}
|
15426
|
+
};
|
15427
|
+
array.push(element);
|
15184
15428
|
}
|
15185
15429
|
if (array.length > 0) {
|
15186
15430
|
values["https://www.w3.org/ns/activitystreams#longitude"] = array;
|
15187
15431
|
}
|
15188
15432
|
array = [];
|
15189
15433
|
for (const v of this.#_3ga86BKHUtRkGx5PHBjRiUXXzwnw) {
|
15190
|
-
|
15434
|
+
const element = {
|
15191
15435
|
"@type": "http://www.w3.org/2001/XMLSchema#float",
|
15192
15436
|
"@value": v,
|
15193
|
-
}
|
15437
|
+
};
|
15438
|
+
array.push(element);
|
15194
15439
|
}
|
15195
15440
|
if (array.length > 0) {
|
15196
15441
|
values["https://www.w3.org/ns/activitystreams#radius"] = array;
|
15197
15442
|
}
|
15198
15443
|
array = [];
|
15199
15444
|
for (const v of this.#_oKrwxU4V8wiKhMW1QEYQibcJh8c) {
|
15200
|
-
|
15445
|
+
const element = v == "cm" || v == "feet" || v == "inches" || v == "km" || v == "m" ||
|
15201
15446
|
v == "miles"
|
15202
15447
|
? { "@value": v }
|
15203
|
-
: { "@id": v.href }
|
15448
|
+
: { "@id": v.href };
|
15449
|
+
array.push(element);
|
15204
15450
|
}
|
15205
15451
|
if (array.length > 0) {
|
15206
15452
|
values["https://www.w3.org/ns/activitystreams#units"] = array;
|
@@ -15211,10 +15457,11 @@ export class Place extends Object {
|
|
15211
15457
|
if (options.expand) {
|
15212
15458
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15213
15459
|
}
|
15214
|
-
return await jsonld.compact(values,
|
15215
|
-
|
15216
|
-
|
15217
|
-
|
15460
|
+
return await jsonld.compact(values, options.context ??
|
15461
|
+
[
|
15462
|
+
"https://www.w3.org/ns/activitystreams",
|
15463
|
+
"https://w3id.org/security/data-integrity/v1",
|
15464
|
+
], { documentLoader: options.contextLoader });
|
15218
15465
|
}
|
15219
15466
|
/**
|
15220
15467
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15490,7 +15737,10 @@ export class Profile extends Object {
|
|
15490
15737
|
const values = baseValues[0];
|
15491
15738
|
array = [];
|
15492
15739
|
for (const v of this.#_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1) {
|
15493
|
-
|
15740
|
+
const element = v instanceof URL
|
15741
|
+
? { "@id": v.href }
|
15742
|
+
: await v.toJsonLd(options);
|
15743
|
+
array.push(element);
|
15494
15744
|
}
|
15495
15745
|
if (array.length > 0) {
|
15496
15746
|
values["https://www.w3.org/ns/activitystreams#describes"] = array;
|
@@ -15501,10 +15751,11 @@ export class Profile extends Object {
|
|
15501
15751
|
if (options.expand) {
|
15502
15752
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15503
15753
|
}
|
15504
|
-
return await jsonld.compact(values,
|
15505
|
-
|
15506
|
-
|
15507
|
-
|
15754
|
+
return await jsonld.compact(values, options.context ??
|
15755
|
+
[
|
15756
|
+
"https://www.w3.org/ns/activitystreams",
|
15757
|
+
"https://w3id.org/security/data-integrity/v1",
|
15758
|
+
], { documentLoader: options.contextLoader });
|
15508
15759
|
}
|
15509
15760
|
/**
|
15510
15761
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15634,10 +15885,11 @@ export class Reject extends Activity {
|
|
15634
15885
|
if (options.expand) {
|
15635
15886
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15636
15887
|
}
|
15637
|
-
return await jsonld.compact(values,
|
15638
|
-
|
15639
|
-
|
15640
|
-
|
15888
|
+
return await jsonld.compact(values, options.context ??
|
15889
|
+
[
|
15890
|
+
"https://www.w3.org/ns/activitystreams",
|
15891
|
+
"https://w3id.org/security/data-integrity/v1",
|
15892
|
+
], { documentLoader: options.contextLoader });
|
15641
15893
|
}
|
15642
15894
|
/**
|
15643
15895
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15980,21 +16232,30 @@ export class Relationship extends Object {
|
|
15980
16232
|
const values = baseValues[0];
|
15981
16233
|
array = [];
|
15982
16234
|
for (const v of this.#_2Zqdmi46ZnDQsECS6mzwhrv3rUKq) {
|
15983
|
-
|
16235
|
+
const element = v instanceof URL
|
16236
|
+
? { "@id": v.href }
|
16237
|
+
: await v.toJsonLd(options);
|
16238
|
+
array.push(element);
|
15984
16239
|
}
|
15985
16240
|
if (array.length > 0) {
|
15986
16241
|
values["https://www.w3.org/ns/activitystreams#subject"] = array;
|
15987
16242
|
}
|
15988
16243
|
array = [];
|
15989
16244
|
for (const v of this.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc) {
|
15990
|
-
|
16245
|
+
const element = v instanceof URL
|
16246
|
+
? { "@id": v.href }
|
16247
|
+
: await v.toJsonLd(options);
|
16248
|
+
array.push(element);
|
15991
16249
|
}
|
15992
16250
|
if (array.length > 0) {
|
15993
16251
|
values["https://www.w3.org/ns/activitystreams#object"] = array;
|
15994
16252
|
}
|
15995
16253
|
array = [];
|
15996
16254
|
for (const v of this.#_4Lzz89F9qipAQSGkWyX9DGWiUojG) {
|
15997
|
-
|
16255
|
+
const element = v instanceof URL
|
16256
|
+
? { "@id": v.href }
|
16257
|
+
: await v.toJsonLd(options);
|
16258
|
+
array.push(element);
|
15998
16259
|
}
|
15999
16260
|
if (array.length > 0) {
|
16000
16261
|
values["https://www.w3.org/ns/activitystreams#relationship"] = array;
|
@@ -16005,10 +16266,11 @@ export class Relationship extends Object {
|
|
16005
16266
|
if (options.expand) {
|
16006
16267
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
16007
16268
|
}
|
16008
|
-
return await jsonld.compact(values,
|
16009
|
-
|
16010
|
-
|
16011
|
-
|
16269
|
+
return await jsonld.compact(values, options.context ??
|
16270
|
+
[
|
16271
|
+
"https://www.w3.org/ns/activitystreams",
|
16272
|
+
"https://w3id.org/security/data-integrity/v1",
|
16273
|
+
], { documentLoader: options.contextLoader });
|
16012
16274
|
}
|
16013
16275
|
/**
|
16014
16276
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -16195,10 +16457,11 @@ export class Remove extends Activity {
|
|
16195
16457
|
if (options.expand) {
|
16196
16458
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
16197
16459
|
}
|
16198
|
-
return await jsonld.compact(values,
|
16199
|
-
|
16200
|
-
|
16201
|
-
|
16460
|
+
return await jsonld.compact(values, options.context ??
|
16461
|
+
[
|
16462
|
+
"https://www.w3.org/ns/activitystreams",
|
16463
|
+
"https://w3id.org/security/data-integrity/v1",
|
16464
|
+
], { documentLoader: options.contextLoader });
|
16202
16465
|
}
|
16203
16466
|
/**
|
16204
16467
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -16960,105 +17223,136 @@ export class Service extends Object {
|
|
16960
17223
|
const values = baseValues[0];
|
16961
17224
|
array = [];
|
16962
17225
|
for (const v of this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf) {
|
16963
|
-
|
17226
|
+
const element = typeof v === "string" ? { "@value": v } : {
|
16964
17227
|
"@value": v.toString(),
|
16965
17228
|
"@language": v.language.compact(),
|
16966
|
-
}
|
17229
|
+
};
|
17230
|
+
array.push(element);
|
16967
17231
|
}
|
16968
17232
|
if (array.length > 0) {
|
16969
17233
|
values["https://www.w3.org/ns/activitystreams#preferredUsername"] = array;
|
16970
17234
|
}
|
16971
17235
|
array = [];
|
16972
17236
|
for (const v of this.#_axq166E2eZADq34V4MYUc8KMZdC) {
|
16973
|
-
|
17237
|
+
const element = v instanceof URL
|
17238
|
+
? { "@id": v.href }
|
17239
|
+
: await v.toJsonLd(options);
|
17240
|
+
array.push(element);
|
16974
17241
|
}
|
16975
17242
|
if (array.length > 0)
|
16976
17243
|
values["https://w3id.org/security#publicKey"] = array;
|
16977
17244
|
array = [];
|
16978
17245
|
for (const v of this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3) {
|
16979
|
-
|
17246
|
+
const element = v instanceof URL
|
17247
|
+
? { "@id": v.href }
|
17248
|
+
: await v.toJsonLd(options);
|
17249
|
+
array.push(element);
|
16980
17250
|
}
|
16981
17251
|
if (array.length > 0) {
|
16982
17252
|
values["https://w3id.org/security#assertionMethod"] = array;
|
16983
17253
|
}
|
16984
17254
|
array = [];
|
16985
17255
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA) {
|
16986
|
-
|
17256
|
+
const element = { "@value": v };
|
17257
|
+
array.push(element);
|
16987
17258
|
}
|
16988
17259
|
if (array.length > 0) {
|
16989
17260
|
values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] = array;
|
16990
17261
|
}
|
16991
17262
|
array = [];
|
16992
17263
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB) {
|
16993
|
-
|
17264
|
+
const element = v instanceof URL
|
17265
|
+
? { "@id": v.href }
|
17266
|
+
: await v.toJsonLd(options);
|
17267
|
+
array.push(element);
|
16994
17268
|
}
|
16995
17269
|
if (array.length > 0)
|
16996
17270
|
values["http://www.w3.org/ns/ldp#inbox"] = array;
|
16997
17271
|
array = [];
|
16998
17272
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC) {
|
16999
|
-
|
17273
|
+
const element = v instanceof URL
|
17274
|
+
? { "@id": v.href }
|
17275
|
+
: await v.toJsonLd(options);
|
17276
|
+
array.push(element);
|
17000
17277
|
}
|
17001
17278
|
if (array.length > 0) {
|
17002
17279
|
values["https://www.w3.org/ns/activitystreams#outbox"] = array;
|
17003
17280
|
}
|
17004
17281
|
array = [];
|
17005
17282
|
for (const v of this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee) {
|
17006
|
-
|
17283
|
+
const element = v instanceof URL
|
17284
|
+
? { "@id": v.href }
|
17285
|
+
: await v.toJsonLd(options);
|
17286
|
+
array.push(element);
|
17007
17287
|
}
|
17008
17288
|
if (array.length > 0) {
|
17009
17289
|
values["https://www.w3.org/ns/activitystreams#following"] = array;
|
17010
17290
|
}
|
17011
17291
|
array = [];
|
17012
17292
|
for (const v of this.#_BBCTgfphhsFzpVfKTykGSpBNwoA) {
|
17013
|
-
|
17293
|
+
const element = v instanceof URL
|
17294
|
+
? { "@id": v.href }
|
17295
|
+
: await v.toJsonLd(options);
|
17296
|
+
array.push(element);
|
17014
17297
|
}
|
17015
17298
|
if (array.length > 0) {
|
17016
17299
|
values["https://www.w3.org/ns/activitystreams#followers"] = array;
|
17017
17300
|
}
|
17018
17301
|
array = [];
|
17019
17302
|
for (const v of this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU) {
|
17020
|
-
|
17303
|
+
const element = v instanceof URL
|
17304
|
+
? { "@id": v.href }
|
17305
|
+
: await v.toJsonLd(options);
|
17306
|
+
array.push(element);
|
17021
17307
|
}
|
17022
17308
|
if (array.length > 0) {
|
17023
17309
|
values["https://www.w3.org/ns/activitystreams#liked"] = array;
|
17024
17310
|
}
|
17025
17311
|
array = [];
|
17026
17312
|
for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
|
17027
|
-
|
17313
|
+
const element = v instanceof URL
|
17314
|
+
? { "@id": v.href }
|
17315
|
+
: await v.toJsonLd(options);
|
17316
|
+
array.push(element);
|
17028
17317
|
}
|
17029
17318
|
if (array.length > 0) {
|
17030
17319
|
values["https://www.w3.org/ns/activitystreams#streams"] = array;
|
17031
17320
|
}
|
17032
17321
|
array = [];
|
17033
17322
|
for (const v of this.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG) {
|
17034
|
-
|
17323
|
+
const element = await v.toJsonLd(options);
|
17324
|
+
array.push(element);
|
17035
17325
|
}
|
17036
17326
|
if (array.length > 0) {
|
17037
17327
|
values["https://www.w3.org/ns/activitystreams#endpoints"] = array;
|
17038
17328
|
}
|
17039
17329
|
array = [];
|
17040
17330
|
for (const v of this.#_gAJzg1QDc4rcefFsUzGSYmyXvNH) {
|
17041
|
-
|
17331
|
+
const element = { "@value": v };
|
17332
|
+
array.push(element);
|
17042
17333
|
}
|
17043
17334
|
if (array.length > 0) {
|
17044
17335
|
values["http://joinmastodon.org/ns#discoverable"] = array;
|
17045
17336
|
}
|
17046
17337
|
array = [];
|
17047
17338
|
for (const v of this.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7) {
|
17048
|
-
|
17339
|
+
const element = { "@value": v };
|
17340
|
+
array.push(element);
|
17049
17341
|
}
|
17050
17342
|
if (array.length > 0) {
|
17051
17343
|
values["http://joinmastodon.org/ns#suspended"] = array;
|
17052
17344
|
}
|
17053
17345
|
array = [];
|
17054
17346
|
for (const v of this.#_79S8K4f5J9MWUgCxziRyUe6PTHZ) {
|
17055
|
-
|
17347
|
+
const element = { "@value": v };
|
17348
|
+
array.push(element);
|
17056
17349
|
}
|
17057
17350
|
if (array.length > 0)
|
17058
17351
|
values["http://joinmastodon.org/ns#memorial"] = array;
|
17059
17352
|
array = [];
|
17060
17353
|
for (const v of this.#_2diCorzqPGQQqftp6e4SrCEwEnyk) {
|
17061
|
-
|
17354
|
+
const element = { "@value": v };
|
17355
|
+
array.push(element);
|
17062
17356
|
}
|
17063
17357
|
if (array.length > 0) {
|
17064
17358
|
values["http://joinmastodon.org/ns#indexable"] = array;
|
@@ -17069,24 +17363,25 @@ export class Service extends Object {
|
|
17069
17363
|
if (options.expand) {
|
17070
17364
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17071
17365
|
}
|
17072
|
-
return await jsonld.compact(values,
|
17073
|
-
|
17074
|
-
|
17075
|
-
|
17076
|
-
|
17077
|
-
|
17078
|
-
|
17079
|
-
|
17080
|
-
|
17081
|
-
|
17082
|
-
|
17083
|
-
|
17084
|
-
|
17085
|
-
|
17086
|
-
|
17087
|
-
|
17088
|
-
|
17089
|
-
|
17366
|
+
return await jsonld.compact(values, options.context ??
|
17367
|
+
[
|
17368
|
+
"https://www.w3.org/ns/activitystreams",
|
17369
|
+
"https://w3id.org/security/v1",
|
17370
|
+
"https://w3id.org/security/data-integrity/v1",
|
17371
|
+
"https://www.w3.org/ns/did/v1",
|
17372
|
+
"https://w3id.org/security/multikey/v1",
|
17373
|
+
{
|
17374
|
+
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
17375
|
+
"toot": "http://joinmastodon.org/ns#",
|
17376
|
+
"discoverable": "toot:discoverable",
|
17377
|
+
"suspended": "toot:suspended",
|
17378
|
+
"memorial": "toot:memorial",
|
17379
|
+
"indexable": "toot:indexable",
|
17380
|
+
"schema": "http://schema.org#",
|
17381
|
+
"PropertyValue": "schema:PropertyValue",
|
17382
|
+
"value": "schema:value",
|
17383
|
+
},
|
17384
|
+
], { documentLoader: options.contextLoader });
|
17090
17385
|
}
|
17091
17386
|
/**
|
17092
17387
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -17544,10 +17839,11 @@ export class Tombstone extends Object {
|
|
17544
17839
|
const values = baseValues[0];
|
17545
17840
|
array = [];
|
17546
17841
|
for (const v of this.#_8g8g4LiVMhFTXskuDEqx4ascxUr) {
|
17547
|
-
|
17842
|
+
const element = {
|
17548
17843
|
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
|
17549
17844
|
"@value": v.toString(),
|
17550
|
-
}
|
17845
|
+
};
|
17846
|
+
array.push(element);
|
17551
17847
|
}
|
17552
17848
|
if (array.length > 0) {
|
17553
17849
|
values["https://www.w3.org/ns/activitystreams#deleted"] = array;
|
@@ -17558,10 +17854,11 @@ export class Tombstone extends Object {
|
|
17558
17854
|
if (options.expand) {
|
17559
17855
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17560
17856
|
}
|
17561
|
-
return await jsonld.compact(values,
|
17562
|
-
|
17563
|
-
|
17564
|
-
|
17857
|
+
return await jsonld.compact(values, options.context ??
|
17858
|
+
[
|
17859
|
+
"https://www.w3.org/ns/activitystreams",
|
17860
|
+
"https://w3id.org/security/data-integrity/v1",
|
17861
|
+
], { documentLoader: options.contextLoader });
|
17565
17862
|
}
|
17566
17863
|
/**
|
17567
17864
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -17691,10 +17988,11 @@ export class Undo extends Activity {
|
|
17691
17988
|
if (options.expand) {
|
17692
17989
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17693
17990
|
}
|
17694
|
-
return await jsonld.compact(values,
|
17695
|
-
|
17696
|
-
|
17697
|
-
|
17991
|
+
return await jsonld.compact(values, options.context ??
|
17992
|
+
[
|
17993
|
+
"https://www.w3.org/ns/activitystreams",
|
17994
|
+
"https://w3id.org/security/data-integrity/v1",
|
17995
|
+
], { documentLoader: options.contextLoader });
|
17698
17996
|
}
|
17699
17997
|
/**
|
17700
17998
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -17804,16 +18102,17 @@ export class Update extends Activity {
|
|
17804
18102
|
if (options.expand) {
|
17805
18103
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17806
18104
|
}
|
17807
|
-
return await jsonld.compact(values,
|
17808
|
-
|
17809
|
-
|
17810
|
-
|
17811
|
-
|
17812
|
-
|
17813
|
-
|
17814
|
-
|
17815
|
-
|
17816
|
-
|
18105
|
+
return await jsonld.compact(values, options.context ??
|
18106
|
+
[
|
18107
|
+
"https://www.w3.org/ns/activitystreams",
|
18108
|
+
"https://w3id.org/security/data-integrity/v1",
|
18109
|
+
{
|
18110
|
+
"toot": "http://joinmastodon.org/ns#",
|
18111
|
+
"sensitive": "as:sensitive",
|
18112
|
+
"Emoji": "toot:Emoji",
|
18113
|
+
"Hashtag": "as:Hashtag",
|
18114
|
+
},
|
18115
|
+
], { documentLoader: options.contextLoader });
|
17817
18116
|
}
|
17818
18117
|
/**
|
17819
18118
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -17919,10 +18218,11 @@ export class Video extends Document {
|
|
17919
18218
|
if (options.expand) {
|
17920
18219
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17921
18220
|
}
|
17922
|
-
return await jsonld.compact(values,
|
17923
|
-
|
17924
|
-
|
17925
|
-
|
18221
|
+
return await jsonld.compact(values, options.context ??
|
18222
|
+
[
|
18223
|
+
"https://www.w3.org/ns/activitystreams",
|
18224
|
+
"https://w3id.org/security/data-integrity/v1",
|
18225
|
+
], { documentLoader: options.contextLoader });
|
17926
18226
|
}
|
17927
18227
|
/**
|
17928
18228
|
* Converts a JSON-LD structure to an object of this type.
|