diff --git a/package-lock.json b/package-lock.json index fb2c364..e9f36ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "packages": { "": { "name": "root", + "hasInstallScript": true, "workspaces": [ "packages/*" ], @@ -2654,6 +2655,20 @@ "postcss-selector-parser": "^6.0.10" } }, + "node_modules/@digitalbazaar/http-client": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@digitalbazaar/http-client/-/http-client-1.2.0.tgz", + "integrity": "sha512-W9KQQ5pUJcaR0I4c2HPJC0a7kRbZApIorZgPnEDwMBgj16iQzutGLrCXYaZOmxqVLVNqqlQ4aUJh+HBQZy4W6Q==", + "dev": true, + "dependencies": { + "esm": "^3.2.22", + "ky": "^0.25.1", + "ky-universal": "^0.8.2" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -5170,6 +5185,10 @@ "resolved": "packages/ldo", "link": true }, + "node_modules/@ldo/schema-converter-shex": { + "resolved": "packages/schema-converter-shex", + "link": true + }, "node_modules/@ldo/solid-react": { "resolved": "packages/solid-react", "link": true @@ -8385,6 +8404,15 @@ "node": ">=8.9" } }, + "node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -10021,6 +10049,21 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "node_modules/cfb": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/cfb/-/cfb-0.11.1.tgz", + "integrity": "sha512-1GEqpcO365hTRpP+GzHXNiUF5SB7qmY5aVYwrJm8ISx27HzHpaFlTQhnOCMNhqP0WPkHR0OGE9WDSqtksV4anw==", + "dev": true, + "dependencies": { + "commander": "" + }, + "bin": { + "cfb": "bin/cfb.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -10384,6 +10427,15 @@ "node": ">=4" } }, + "node_modules/codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -10425,6 +10477,15 @@ "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "peer": true }, + "node_modules/colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/colors-cli": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/colors-cli/-/colors-cli-1.0.32.tgz", @@ -10930,6 +10991,18 @@ "node": ">= 6" } }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true, + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -11414,6 +11487,15 @@ "node": ">=8" } }, + "node_modules/data-uri-to-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", + "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -13439,6 +13521,15 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -13575,6 +13666,15 @@ "node": ">= 0.8.0" } }, + "node_modules/exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/expect": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", @@ -14134,6 +14234,20 @@ "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==", "peer": true }, + "node_modules/fetch-blob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-2.1.2.tgz", + "integrity": "sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow==", + "dev": true, + "engines": { + "node": "^10.17.0 || >=12.3.0" + }, + "peerDependenciesMeta": { + "domexception": { + "optional": true + } + } + }, "node_modules/fetch-retry": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/fetch-retry/-/fetch-retry-4.1.1.tgz", @@ -14681,6 +14795,15 @@ "node": ">= 0.6" } }, + "node_modules/frac": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/frac/-/frac-0.3.1.tgz", + "integrity": "sha512-1Lzf2jOjhIkRaa013KlxNOn2D9FemmQNeYUDpEIyPeFXmpLvbZXJOlaayMBT6JKXx+afQFgQ1QJ4kaF7Z07QFQ==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/fraction.js": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", @@ -17780,9 +17903,9 @@ } }, "node_modules/joi": { - "version": "17.10.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.10.0.tgz", - "integrity": "sha512-hrazgRSlhzacZ69LdcKfhi3Vu13z2yFfoAzmEov3yFIJlatTdVGUW6vle1zjH8qkzdCn/qGw8rapjqsObbYXAg==", + "version": "17.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.10.1.tgz", + "integrity": "sha512-vIiDxQKmRidUVp8KngT8MZSOcmRVm2zV7jbMjNYWuHcJWI0bUck3nRTGQjhpPlQenIQIBC5Vp9AhcnHbWQqafw==", "peer": true, "dependencies": { "@hapi/hoek": "^9.0.0", @@ -18028,6 +18151,21 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonld": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-5.2.0.tgz", + "integrity": "sha512-JymgT6Xzk5CHEmHuEyvoTNviEPxv6ihLWSPu1gFdtjSAyM6cFqNrv02yS/SIur3BBIkCf0HjizRc24d8/FfQKw==", + "dev": true, + "dependencies": { + "@digitalbazaar/http-client": "^1.1.0", + "canonicalize": "^1.0.1", + "lru-cache": "^6.0.0", + "rdf-canonize": "^3.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/jsonld-context-parser": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/jsonld-context-parser/-/jsonld-context-parser-2.3.0.tgz", @@ -18091,6 +18229,24 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/jsonld/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jsonld/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/jsonld2graphobject": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/jsonld2graphobject/-/jsonld2graphobject-0.0.4.tgz", @@ -18189,6 +18345,60 @@ "node": ">= 8" } }, + "node_modules/ky": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.25.1.tgz", + "integrity": "sha512-PjpCEWlIU7VpiMVrTwssahkYXX1by6NCT0fhTUX34F3DTinARlgMpriuroolugFPcMgpPWrOW4mTb984Qm1RXA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky?sponsor=1" + } + }, + "node_modules/ky-universal": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.8.2.tgz", + "integrity": "sha512-xe0JaOH9QeYxdyGLnzUOVGK4Z6FGvDVzcXFTdrYA1f33MZdEa45sUDaMBy98xQMcsd2XIBrTXRrRYnegcSdgVQ==", + "dev": true, + "dependencies": { + "abort-controller": "^3.0.0", + "node-fetch": "3.0.0-beta.9" + }, + "engines": { + "node": ">=10.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky-universal?sponsor=1" + }, + "peerDependencies": { + "ky": ">=0.17.0", + "web-streams-polyfill": ">=2.0.0" + }, + "peerDependenciesMeta": { + "web-streams-polyfill": { + "optional": true + } + } + }, + "node_modules/ky-universal/node_modules/node-fetch": { + "version": "3.0.0-beta.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0-beta.9.tgz", + "integrity": "sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg==", + "dev": true, + "dependencies": { + "data-uri-to-buffer": "^3.0.1", + "fetch-blob": "^2.1.1" + }, + "engines": { + "node": "^10.17 || >=12.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -24500,6 +24710,18 @@ "node": ">=0.10.0" } }, + "node_modules/rdf-canonize": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-3.4.0.tgz", + "integrity": "sha512-fUeWjrkOO0t1rg7B2fdyDTvngj+9RlUyL92vOdiB7c0FPguWVsniIMjEtHH+meLBO9rzkUlUzBVXgWrjI8P9LA==", + "dev": true, + "dependencies": { + "setimmediate": "^1.0.5" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/rdf-data-factory": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/rdf-data-factory/-/rdf-data-factory-1.1.2.tgz", @@ -26294,8 +26516,7 @@ "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "peer": true + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "node_modules/setprototypeof": { "version": "1.2.0", @@ -26340,41 +26561,34 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/shexj-traverser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/shexj-traverser/-/shexj-traverser-2.0.1.tgz", - "integrity": "sha512-frI9XjL2m1i+eeOhGdtKCCI7XTLt0sQClxUAR6bLk7Mp8kqyPEap0wJekfQ4bBOwhneeJKukfVO7Wne8JlM9xA==", + "node_modules/shex-test": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/shex-test/-/shex-test-2.1.0.tgz", + "integrity": "sha512-Z2FO3qFgTTKwn03WbQfe2yHGDm6QaFDmbuKdrqRyqlYvGDsHqYrX4SP5I6XhI8vAJffOnQoj4WSorv5Yp9CT0g==", + "dev": true, "dependencies": { - "type-traverser": "^0.0.3" + "n3": "^0.4.5", + "xlsx": "^0.8.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/shexj2typeandcontext": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/shexj2typeandcontext/-/shexj2typeandcontext-2.0.1.tgz", - "integrity": "sha512-Z7+tzHFG7Q8C0wxCjiQUlWem+unpRfaj1wv7nZeg5ALzNJTjbegIeWBsv/BxLcMjqc7vRmnrYBLwLVJgqNvUGw==", - "dependencies": { - "dts-dom": "^3.6.0", - "jsonld2graphobject": "^0.0.5", - "shexj-traverser": "^2.0.1" + "node_modules/shex-test/node_modules/n3": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/n3/-/n3-0.4.5.tgz", + "integrity": "sha512-sv4bFeqVTTj9hT/OAdndpHpECxlkmpHxdnHUkhNgx3P3Tnw2WqpTUzMEeY+ELEoeW1q6Xqq9LNO0lu/zqogIZA==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/shexj2typeandcontext/node_modules/jsonld2graphobject": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/jsonld2graphobject/-/jsonld2graphobject-0.0.5.tgz", - "integrity": "sha512-5BqfXOq96+OBjjiJNG8gQH66pYt6hW88z2SJxdvFJo4XNoVMvqAcUz+JSm/KEWS5NLRnebApEzFrYP3HUiUmYw==", + "node_modules/shexj-traverser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/shexj-traverser/-/shexj-traverser-2.0.1.tgz", + "integrity": "sha512-frI9XjL2m1i+eeOhGdtKCCI7XTLt0sQClxUAR6bLk7Mp8kqyPEap0wJekfQ4bBOwhneeJKukfVO7Wne8JlM9xA==", "dependencies": { - "@rdfjs/types": "^1.0.1", - "@types/jsonld": "^1.5.6", - "jsonld-context-parser": "^2.1.5", - "uuid": "^8.3.2" - } - }, - "node_modules/shexj2typeandcontext/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" + "type-traverser": "^0.0.3" } }, "node_modules/side-channel": { @@ -26738,6 +26952,23 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "node_modules/ssf": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.8.2.tgz", + "integrity": "sha512-+ZkFDAG+ImJ48DcZvabx6YTrZ67DKkM0kbyOOtH73mbUEvNhQWWgRZrHC8+k7GuGKWQnACYLi7bj0eCt1jmosQ==", + "dev": true, + "dependencies": { + "colors": "0.6.2", + "frac": "0.3.1", + "voc": "" + }, + "bin": { + "ssf": "bin/ssf.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/ssri": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", @@ -28768,6 +28999,18 @@ "integrity": "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==", "peer": true }, + "node_modules/voc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/voc/-/voc-1.2.0.tgz", + "integrity": "sha512-BOuDjFFYvJdZO6e/N65AlaDItXo2TgyLjeyRYcqgAPkXpp5yTJcvkL2n+syO1r9Qc5g96tfBD2tuiMhYDmaGcA==", + "dev": true, + "bin": { + "voc": "voc.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -29931,6 +30174,28 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/xlsx": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.8.8.tgz", + "integrity": "sha512-aNxJqlXJgzZtjxd4Qx+gCXeg/o3jNVPjHq7aQuhe2s8fmN8Z6Rqk4egQVQS7jX9L3u97X9LVWDmp9hq7zwoUeQ==", + "deprecated": "this version is no longer supported. More info at https://cdn.sheetjs.com/xlsx/", + "dev": true, + "dependencies": { + "adler-32": "", + "cfb": "~0.11.0", + "codepage": "", + "commander": "", + "crc-32": "", + "exit-on-epipe": "", + "ssf": "~0.8.1" + }, + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -30049,16 +30314,15 @@ "packages/cli": { "name": "@ldo/cli", "version": "0.0.0", - "hasInstallScript": true, "license": "MIT", "dependencies": { + "@ldo/schema-converter-shex": "^0.0.0", "@shexjs/parser": "^1.0.0-alpha.24", "child-process-promise": "^2.2.1", "commander": "^9.3.0", "ejs": "^3.1.8", "fs-extra": "^10.1.0", - "loading-cli": "^1.1.0", - "shexj2typeandcontext": "^2.0.0" + "loading-cli": "^1.1.0" }, "bin": { "ldo": "dist/index.js" @@ -30530,6 +30794,103 @@ "node": ">=4.2.0" } }, + "packages/schema-converter-shex": { + "name": "@ldo/schema-converter-shex", + "version": "0.0.0", + "license": "MIT", + "dependencies": { + "dts-dom": "^3.6.0", + "jsonld2graphobject": "^0.0.5", + "shexj-traverser": "^2.0.1" + }, + "devDependencies": { + "@shexjs/parser": "^1.0.0-alpha.24", + "@types/jest": "^27.0.3", + "@types/jsonld": "^1.5.6", + "@types/shexj": "^2.1.3", + "jest": "^27.4.5", + "jsonld": "^5.2.0", + "o-dataset-pack": "^0.2.1", + "shex-test": "^2.1.0", + "ts-jest": "^27.1.2" + } + }, + "packages/schema-converter-shex/node_modules/jsonld2graphobject": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/jsonld2graphobject/-/jsonld2graphobject-0.0.5.tgz", + "integrity": "sha512-5BqfXOq96+OBjjiJNG8gQH66pYt6hW88z2SJxdvFJo4XNoVMvqAcUz+JSm/KEWS5NLRnebApEzFrYP3HUiUmYw==", + "dependencies": { + "@rdfjs/types": "^1.0.1", + "@types/jsonld": "^1.5.6", + "jsonld-context-parser": "^2.1.5", + "uuid": "^8.3.2" + } + }, + "packages/schema-converter-shex/node_modules/ts-jest": { + "version": "27.1.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz", + "integrity": "sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^27.0.0", + "json5": "2.x", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@types/jest": "^27.0.0", + "babel-jest": ">=27.0.0 <28", + "jest": "^27.0.0", + "typescript": ">=3.8 <5.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "packages/schema-converter-shex/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "packages/schema-converter-shex/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "packages/solid-react": { "name": "@ldo/solid-react", "version": "0.0.0", @@ -33461,6 +33822,17 @@ "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", "requires": {} }, + "@digitalbazaar/http-client": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@digitalbazaar/http-client/-/http-client-1.2.0.tgz", + "integrity": "sha512-W9KQQ5pUJcaR0I4c2HPJC0a7kRbZApIorZgPnEDwMBgj16iQzutGLrCXYaZOmxqVLVNqqlQ4aUJh+HBQZy4W6Q==", + "dev": true, + "requires": { + "esm": "^3.2.22", + "ky": "^0.25.1", + "ky-universal": "^0.8.2" + } + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -35519,6 +35891,7 @@ "@ldo/cli": { "version": "file:packages/cli", "requires": { + "@ldo/schema-converter-shex": "^0.0.0", "@shexjs/parser": "^1.0.0-alpha.24", "@types/child-process-promise": "^2.2.2", "@types/ejs": "^3.1.1", @@ -35533,7 +35906,6 @@ "jest": "^27.4.2", "loading-cli": "^1.1.0", "rimraf": "^3.0.2", - "shexj2typeandcontext": "^2.0.0", "ts-jest": "^27.0.7" }, "dependencies": { @@ -35814,6 +36186,64 @@ } } }, + "@ldo/schema-converter-shex": { + "version": "file:packages/schema-converter-shex", + "requires": { + "@shexjs/parser": "^1.0.0-alpha.24", + "@types/jest": "^27.0.3", + "@types/jsonld": "^1.5.6", + "@types/shexj": "^2.1.3", + "dts-dom": "^3.6.0", + "jest": "^27.4.5", + "jsonld": "^5.2.0", + "jsonld2graphobject": "^0.0.5", + "o-dataset-pack": "^0.2.1", + "shex-test": "^2.1.0", + "shexj-traverser": "^2.0.1", + "ts-jest": "^27.1.2" + }, + "dependencies": { + "jsonld2graphobject": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/jsonld2graphobject/-/jsonld2graphobject-0.0.5.tgz", + "integrity": "sha512-5BqfXOq96+OBjjiJNG8gQH66pYt6hW88z2SJxdvFJo4XNoVMvqAcUz+JSm/KEWS5NLRnebApEzFrYP3HUiUmYw==", + "requires": { + "@rdfjs/types": "^1.0.1", + "@types/jsonld": "^1.5.6", + "jsonld-context-parser": "^2.1.5", + "uuid": "^8.3.2" + } + }, + "ts-jest": { + "version": "27.1.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz", + "integrity": "sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^27.0.0", + "json5": "2.x", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" + } + }, + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "peer": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, "@ldo/solid-react": { "version": "file:packages/solid-react", "requires": { @@ -39259,6 +39689,12 @@ "regex-parser": "^2.2.11" } }, + "adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "dev": true + }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -40489,6 +40925,15 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "cfb": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/cfb/-/cfb-0.11.1.tgz", + "integrity": "sha512-1GEqpcO365hTRpP+GzHXNiUF5SB7qmY5aVYwrJm8ISx27HzHpaFlTQhnOCMNhqP0WPkHR0OGE9WDSqtksV4anw==", + "dev": true, + "requires": { + "commander": "" + } + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -40760,6 +41205,12 @@ } } }, + "codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "dev": true + }, "collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -40795,6 +41246,12 @@ "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "peer": true }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw==", + "dev": true + }, "colors-cli": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/colors-cli/-/colors-cli-1.0.32.tgz", @@ -41180,6 +41637,12 @@ } } }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -41511,6 +41974,12 @@ "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", "dev": true }, + "data-uri-to-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", + "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", + "dev": true + }, "data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -42935,6 +43404,12 @@ } } }, + "esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true + }, "espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -43028,6 +43503,12 @@ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==" }, + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "dev": true + }, "expect": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", @@ -43492,6 +43973,12 @@ "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==", "peer": true }, + "fetch-blob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-2.1.2.tgz", + "integrity": "sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow==", + "dev": true + }, "fetch-retry": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/fetch-retry/-/fetch-retry-4.1.1.tgz", @@ -43889,6 +44376,12 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" }, + "frac": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/frac/-/frac-0.3.1.tgz", + "integrity": "sha512-1Lzf2jOjhIkRaa013KlxNOn2D9FemmQNeYUDpEIyPeFXmpLvbZXJOlaayMBT6JKXx+afQFgQ1QJ4kaF7Z07QFQ==", + "dev": true + }, "fraction.js": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", @@ -46166,9 +46659,9 @@ "integrity": "sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w==" }, "joi": { - "version": "17.10.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.10.0.tgz", - "integrity": "sha512-hrazgRSlhzacZ69LdcKfhi3Vu13z2yFfoAzmEov3yFIJlatTdVGUW6vle1zjH8qkzdCn/qGw8rapjqsObbYXAg==", + "version": "17.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.10.1.tgz", + "integrity": "sha512-vIiDxQKmRidUVp8KngT8MZSOcmRVm2zV7jbMjNYWuHcJWI0bUck3nRTGQjhpPlQenIQIBC5Vp9AhcnHbWQqafw==", "peer": true, "requires": { "@hapi/hoek": "^9.0.0", @@ -46378,6 +46871,35 @@ "universalify": "^2.0.0" } }, + "jsonld": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-5.2.0.tgz", + "integrity": "sha512-JymgT6Xzk5CHEmHuEyvoTNviEPxv6ihLWSPu1gFdtjSAyM6cFqNrv02yS/SIur3BBIkCf0HjizRc24d8/FfQKw==", + "dev": true, + "requires": { + "@digitalbazaar/http-client": "^1.1.0", + "canonicalize": "^1.0.1", + "lru-cache": "^6.0.0", + "rdf-canonize": "^3.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "jsonld-context-parser": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/jsonld-context-parser/-/jsonld-context-parser-2.3.0.tgz", @@ -46512,6 +47034,34 @@ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==" }, + "ky": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.25.1.tgz", + "integrity": "sha512-PjpCEWlIU7VpiMVrTwssahkYXX1by6NCT0fhTUX34F3DTinARlgMpriuroolugFPcMgpPWrOW4mTb984Qm1RXA==", + "dev": true + }, + "ky-universal": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.8.2.tgz", + "integrity": "sha512-xe0JaOH9QeYxdyGLnzUOVGK4Z6FGvDVzcXFTdrYA1f33MZdEa45sUDaMBy98xQMcsd2XIBrTXRrRYnegcSdgVQ==", + "dev": true, + "requires": { + "abort-controller": "^3.0.0", + "node-fetch": "3.0.0-beta.9" + }, + "dependencies": { + "node-fetch": { + "version": "3.0.0-beta.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0-beta.9.tgz", + "integrity": "sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg==", + "dev": true, + "requires": { + "data-uri-to-buffer": "^3.0.1", + "fetch-blob": "^2.1.1" + } + } + } + }, "language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -51116,6 +51666,15 @@ } } }, + "rdf-canonize": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-3.4.0.tgz", + "integrity": "sha512-fUeWjrkOO0t1rg7B2fdyDTvngj+9RlUyL92vOdiB7c0FPguWVsniIMjEtHH+meLBO9rzkUlUzBVXgWrjI8P9LA==", + "dev": true, + "requires": { + "setimmediate": "^1.0.5" + } + }, "rdf-data-factory": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/rdf-data-factory/-/rdf-data-factory-1.1.2.tgz", @@ -52524,8 +53083,7 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "peer": true + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "setprototypeof": { "version": "1.2.0", @@ -52558,6 +53116,24 @@ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==" }, + "shex-test": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/shex-test/-/shex-test-2.1.0.tgz", + "integrity": "sha512-Z2FO3qFgTTKwn03WbQfe2yHGDm6QaFDmbuKdrqRyqlYvGDsHqYrX4SP5I6XhI8vAJffOnQoj4WSorv5Yp9CT0g==", + "dev": true, + "requires": { + "n3": "^0.4.5", + "xlsx": "^0.8.0" + }, + "dependencies": { + "n3": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/n3/-/n3-0.4.5.tgz", + "integrity": "sha512-sv4bFeqVTTj9hT/OAdndpHpECxlkmpHxdnHUkhNgx3P3Tnw2WqpTUzMEeY+ELEoeW1q6Xqq9LNO0lu/zqogIZA==", + "dev": true + } + } + }, "shexj-traverser": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/shexj-traverser/-/shexj-traverser-2.0.1.tgz", @@ -52566,34 +53142,6 @@ "type-traverser": "^0.0.3" } }, - "shexj2typeandcontext": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/shexj2typeandcontext/-/shexj2typeandcontext-2.0.1.tgz", - "integrity": "sha512-Z7+tzHFG7Q8C0wxCjiQUlWem+unpRfaj1wv7nZeg5ALzNJTjbegIeWBsv/BxLcMjqc7vRmnrYBLwLVJgqNvUGw==", - "requires": { - "dts-dom": "^3.6.0", - "jsonld2graphobject": "^0.0.5", - "shexj-traverser": "^2.0.1" - }, - "dependencies": { - "jsonld2graphobject": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/jsonld2graphobject/-/jsonld2graphobject-0.0.5.tgz", - "integrity": "sha512-5BqfXOq96+OBjjiJNG8gQH66pYt6hW88z2SJxdvFJo4XNoVMvqAcUz+JSm/KEWS5NLRnebApEzFrYP3HUiUmYw==", - "requires": { - "@rdfjs/types": "^1.0.1", - "@types/jsonld": "^1.5.6", - "jsonld-context-parser": "^2.1.5", - "uuid": "^8.3.2" - } - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - } - } - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -52896,6 +53444,17 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "ssf": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.8.2.tgz", + "integrity": "sha512-+ZkFDAG+ImJ48DcZvabx6YTrZ67DKkM0kbyOOtH73mbUEvNhQWWgRZrHC8+k7GuGKWQnACYLi7bj0eCt1jmosQ==", + "dev": true, + "requires": { + "colors": "0.6.2", + "frac": "0.3.1", + "voc": "" + } + }, "ssri": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", @@ -54429,6 +54988,12 @@ "integrity": "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==", "peer": true }, + "voc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/voc/-/voc-1.2.0.tgz", + "integrity": "sha512-BOuDjFFYvJdZO6e/N65AlaDItXo2TgyLjeyRYcqgAPkXpp5yTJcvkL2n+syO1r9Qc5g96tfBD2tuiMhYDmaGcA==", + "dev": true + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -55323,6 +55888,21 @@ } } }, + "xlsx": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.8.8.tgz", + "integrity": "sha512-aNxJqlXJgzZtjxd4Qx+gCXeg/o3jNVPjHq7aQuhe2s8fmN8Z6Rqk4egQVQS7jX9L3u97X9LVWDmp9hq7zwoUeQ==", + "dev": true, + "requires": { + "adler-32": "", + "cfb": "~0.11.0", + "codepage": "", + "commander": "", + "crc-32": "", + "exit-on-epipe": "", + "ssf": "~0.8.1" + } + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", diff --git a/package.json b/package.json index d1bafc0..752efaa 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "test": "lerna run test", "build": "lerna run build", "demo-react": "lerna run start --scope @ldo/demo-react", - "lint": "lerna run lint" + "lint": "lerna run lint", + "postinstall": "npm run build" }, "devDependencies": { "@types/node": "^20.5.7", diff --git a/packages/cli/package.json b/packages/cli/package.json index 5104bc8..eaa6370 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -19,7 +19,6 @@ "test": "jest --coverage", "test:watch": "jest --watch", "prepublishOnly": "npm run test && npm run build", - "postinstall": "npm run build", "lint": "eslint src/** --fix --no-error-on-unmatched-pattern" }, "repository": { @@ -45,11 +44,11 @@ }, "dependencies": { "@shexjs/parser": "^1.0.0-alpha.24", + "@ldo/schema-converter-shex": "^0.0.0", "child-process-promise": "^2.2.1", "commander": "^9.3.0", "ejs": "^3.1.8", "fs-extra": "^10.1.0", - "loading-cli": "^1.1.0", - "shexj2typeandcontext": "^2.0.0" + "loading-cli": "^1.1.0" } } diff --git a/packages/cli/src/build.ts b/packages/cli/src/build.ts index 22c449b..563fc7c 100644 --- a/packages/cli/src/build.ts +++ b/packages/cli/src/build.ts @@ -2,7 +2,7 @@ import fs from "fs-extra"; import path from "path"; import type { Schema } from "shexj"; import parser from "@shexjs/parser"; -import shexjToTypeAndContext from "shexj2typeandcontext"; +import schemaConverterShex from "@ldo/schema-converter-shex"; import { renderFile } from "ejs"; import prettier from "prettier"; import loading from "loading-cli"; @@ -42,7 +42,7 @@ export async function build(options: BuildOptions) { .construct("https://ldo.js.org/") .parse(shexC); // Convert the content to types - const [typings, context] = await shexjToTypeAndContext(schema); + const [typings, context] = await schemaConverterShex(schema); await Promise.all( ["context", "schema", "shapeTypes", "typings"].map( async (templateName) => { diff --git a/packages/ldo/README.md b/packages/ldo/README.md new file mode 100644 index 0000000..8593df2 --- /dev/null +++ b/packages/ldo/README.md @@ -0,0 +1,367 @@ +# LDO (Linked Data Objects) + +LDO (Linked Data Objects) is a library that lets you easily manipulate RDF as if it were a standard TypeScript object that follows a [ShEx](https://shex.io) shape you define. + +For a full tutorial of using LDO to build React Solid applications, see [this tutorial](https://medium.com/@JacksonMorgan/building-solid-apps-with-ldo-6127a5a1979c). + +## Setup + +### Automatic Setup +To setup LDO, `cd` into your typescript project and run `npx ldo-cli init`. + +```bash +cd my-typescript-project +npx ldo-cli init +``` + +### Manual Setup +The following is handled by the __automatic setup__: + +Install the LDO dependencies. +```bash +npm install ldo +npm install ldo-cli --save-dev +``` + +Create a folder to store your ShEx shapes: +```bash +mkdir shapes +``` + +Create a script to build ShEx shapes and convert them into Linked Data Objects. You can put this script in `package.json` +```json +{ + ... + scripts: { + ... + "build:ldo": "ldo build --input ./shapes --output ./ldo" + ... + } + ... +} +``` + +## Creating ShEx Schemas +LDO uses [ShEx](https://shex.io) as a schema for the RDF data in your project. To add a ShEx schema to your project, simply create a file ending in `.shex` to the `shapes` folder. + +For more information on writing ShEx schemas see the [ShEx Primer](http://shex.io/shex-primer/index.html). + + +`./shapes/foafProfile.shex`: +```shex +PREFIX ex: +PREFIX foaf: +PREFIX rdfs: +PREFIX xsd: + +ex:FoafProfile EXTRA a { + a [ foaf:Person ] + // rdfs:comment "Defines the node as a Person (from foaf)" ; + foaf:name xsd:string ? + // rdfs:comment "Define a person's name." ; + foaf:img xsd:string ? + // rdfs:comment "Photo link but in string form" ; + foaf:knows @ex:FoafProfile * + // rdfs:comment "A list of WebIds for all the people this user knows." ; +} +``` + +To build the shape, run: +```bash +npm run build:ldo +``` + +This will generate five files: + - `./ldo/foafProfile.shapeTypes.ts` <-- This is the important file + - `./ldo/foafProfile.typings.ts` + - `./ldo/foafProfile.schema.ts` + - `./ldo/foafProfile.context.ts` + +## Simple Example + +Below is a simple example of LDO in a real use-case (changing the name on a Solid Pod) + +```typescript +import { parseRdf, startTransaction, toSparqlUpdate, toTurtle } from "ldo"; +import { FoafProfileShapeType } from "./ldo/foafProfile.shapeTypes"; + +async function run() { + const rawTurtle = ` + <#me> a ; + "Jane Doe". + `; + + /** + * Step 1: Convert Raw RDF into a Linked Data Object + */ + const ldoDataset = await parseRdf(rawTurtle, { + baseIRI: "https://solidweb.me/jane_doe/profile/card", + }); + // Create a linked data object by telling the dataset the type and subject of + // the object + const janeProfile = ldoDataset + // Tells the LDO dataset that we're looking for a FoafProfile + .usingType(FoafProfileShapeType) + // Says the subject of the FoafProfile + .fromSubject("https://solidweb.me/jane_doe/profile/card#me"); + + /** + * Step 2: Manipulate the Linked Data Object + */ + // Logs "Jane Doe" + console.log(janeProfile.name); + // Logs "Person" + console.log(janeProfile.type); + // Logs 0 + console.log(janeProfile.knows?.length); + + // Begins a transaction that tracks your changes + startTransaction(janeProfile); + janeProfile.name = "Jane Smith"; + janeProfile.knows?.push({ + "@id": "https://solidweb.me/john_smith/profile/card#me", + type: { + "@id": "Person", + }, + name: "John Smith", + knows: [janeProfile], + }); + + // Logs "Jane Smith" + console.log(janeProfile.name); + // Logs "John Smith" + console.log(janeProfile.knows?.[0].name); + // Logs "Jane Smith" + console.log(janeProfile.knows?.[0].knows?.[0].name); + + /** + * Step 3: Convert it back to RDF + */ + // Logs: + // a ; + // "Jane Smith"; + // . + // a ; + // "John Smith"; + // . + console.log(await toTurtle(janeProfile)); + // Logs: + // DELETE DATA { + // "Jane Doe" . + // }; + // INSERT DATA { + // "Jane Smith" . + // . + // "John Smith" . + // . + // . + // } + console.log(await toSparqlUpdate(janeProfile)); +} +run(); +``` + +## Getting an LDO Dataset + +An LDO Dataset is a kind of [RDF JS Dataset](https://rdf.js.org/dataset-spec/) that can create linked data objects. + +LDO datasets can be created in two ways: + +`createLdoDataset(initialDataset?: Dataset | Quad[])` +```typescript +import { createLdoDataset } from "ldo"; + +const ldoDataset = createLdoDataset(); +``` + + - `initialDataset`: An optional dataset or array of quads for the new dataset. + +`parseRdf(data: string, parserOptions?: ParserOptions)` +```typescript +import { parseRdf } from "ldo"; + +const rawTurtle = "..."; +const ldoDataset = parseRdf(rawTurtle, { baseIRI: "https://example.com/" }); +``` + + - `data`: The raw data to parse as a `string`. + - `options` (optional): Parse options containing the following keys: + - `format` (optional): The format the data is in. The following are acceptable formats: `Turtle`, `TriG`, `N-Triples`, `N-Quads`, `N3`, `Notation3`. + - `baseIRI` (optional): If this data is hosted at a specific location, you can provide the baseIRI of that location. + - `blankNodePrefix` (optional): If blank nodes should have a prefix, that should be provided here. + - `factory` (optional): a RDF Data Factory from [`@rdfjs/data-model`](https://www.npmjs.com/package/@rdfjs/data-model). + +## Getting a Linked Data Object +Once you have an LdoDataset we can get a Linked Data Object. A linked data object feels just like a JavaScript object literal, but when you make modifications to it, it will affect the underlying LdoDataset. + +Thie first step is defining which Shape Type you want to retrieve from the dataset. We can use the generated shape types and the `usingType()` method for this. + +```typescript +import { FoafProfileShapeType } from "./ldo/foafProfile.shapeTypes.ts"; + +// ... Get the LdoDataset + +ldoDataset.usingType(FoafProfileShapeType); +``` + +Next, we want to identify exactly what part of the dataset we want to extract. We can do this in a few ways: + +### `.fromSubject(entryNode)` +`fromSubject` lets you define a an `entryNode`, the place of entry for the graph. The object returned by `jsonldDatasetProxy` will represent the given node. This parameter accepts both `namedNode`s and `blankNode`s. `fromSubject` takes a generic type representing the typescript type of the given subject. + +```typescript +const profile = ldoDataset + .usingType(FoafProfileShapeType) + .fromSubject("http://example.com/Person1"); +``` + +### `.matchSubject(predicate?, object?, graph?)` +`matchSubject` returns a Jsonld Dataset Proxy representing all subjects in the dataset matching the given predicate, object, and graph. + +```typescript +const profiles = ldoDataset + .usingType(FoafProfileShapeType) + .matchSubject( + namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), + namedNode("http://xmlns.com/foaf/0.1/Person") + ); +profiles.forEach((person) => { + console.log(person.fn); +}); +``` + +### `.matchObject(subject?, predicate?, object?)` +`matchObject` returns a Jsonld Dataset Proxy representing all objects in the dataset matching the given subject, predicate, and graph. + +```typescript +const friendsOfPerson1 = ldoDataset + .usingType(FoafProfileShapeType) + .matchSubject( + namedNode("http://example.com/Person1"), + namedNode("http://xmlns.com/foaf/0.1/knows") + ); +friendsOfPerson1.forEach((person) => { + console.log(person.fn); +}); +``` + +### `.fromJson(inputData)` +`fromJson` will take any regular Json, add the information to the dataset, and return a Jsonld Dataset Proxy representing the given data. + +```typescript +const person2 = ldoDataset + .usingType(FoafProfileShapeType) + .fromJson({ + "@id": "http://example.com/Person2", + fn: ["Jane Doe"], + }); +``` + +## Getting and Setting Data on a Linked Data Object +Once you've created a Linked Data Object, you can get and set data as if it were a normal TypeScript Object. For specific details, see the documentation at [JSONLD Dataset Proxy](https://github.com/o-development/jsonld-dataset-proxy/blob/master/Readme.md). + +```typescript +import { LinkedDataObject } from "ldo"; +import { FoafProfileFactory } from "./ldo/foafProfile.ldoFactory.ts"; +import { FoafProfile } from "./ldo/foafProfile.typings"; + +aysnc function start() { + const profile: FoafProfile = // Create LDO + // Logs "Aang" + console.log(profile.name); + // Logs "Person" + console.log(profile.type); + // Logs 1 + console.log(profile.knows?.length); + // Logs "Katara" + console.log(profile.knows?.[0].name); + profile.name = "Bonzu Pippinpaddleopsicopolis III" + // Logs "Bonzu Pippinpaddleopsicopolis III" + console.log(profile.name); + profile.knows?.push({ + type: "Person", + name: "Sokka" + }); + // Logs 2 + console.log(profile.knows?.length); + // Logs "Katara" and "Sokka" + profile.knows?.forEach((person) => console.log(person.name)); +} +``` + +## Converting a Linked Data Object back to RDF +A linked data object can be converted into RDF in multiple ways: + +### `toTurtle(linkedDataObject)` +```typescript +import { toTurtle } from "ldo" +// ... +const rawTurtle: string = await toTurtle(profile); +``` + +### `toNTiples(linkedDataObject)` +```typescript +import { toNTriples } from "ldo" +// ... +const rawNTriples: string = await toNTriples(profile); +``` + +### `serialize(linkedDataObject, options)` +```typescript +const rawTurtle: string = await profile.$serialize({ + format: "Turtle", + prefixes: { + ex: "https://example.com/", + foaf: "http://xmlns.com/foaf/0.1/", + } +}); +``` +`serialize(linkedDataObject, options)` provides general serialization based on provided options: + - `foramt` (optional): The format to serialize to. The following are acceptable formats: `Turtle`, `TriG`, `N-Triples`, `N-Quads`, `N3`, `Notation3`. + - `prefixes`: The prefixes for those serializations that use prefixes. + +## Transactions + +Sometimes, you want to keep track of changes you make for the object. This is where transactions come in handy. + +To start a transaction, use the `startTransaction(linkedDataObject)` function. From then on, all transactions will be tracked, but not added to the original ldoDataset. You can view the changes using the `transactionChanges(linkedDataObject)` or `toSparqlUpdate(linkedDataObject)` methods. When you're done with the transaction, you can run the `commitTransaction(linkedDataObject)` method to add the changes to the original ldoDataset. + +```typescript +import { + startTransaction, + transactionChanges, + toSparqlUpdate, + commitTransaction, +} from "ldo"; + +// ... Get the profile linked data object + +startTransaction(profile); +profile.name = "Kuzon" +const changes = transactionChanges(profile)); +// Logs: "Kuzon" +console.log(changes.added?.toString()) +// Logs: "Aang" +console.log(changes.removed?.toString()) +console.log(await toSparqlUpdate(profile)); +commitTransaction(profile); +``` + +## Other LDO Helper Functions + +### `getDataset(linkedDataObject)` +Returns the Linked Data Object's underlying RDFJS dataset. Modifying this dataset will change the Linked Data Object as well. +```typescript +import { Dataset } from "@rdfjs/types"; +import { getDataset } from "ldo" +const dataset: Dataset = dataset(profile); +``` + +## Sponsorship +This project was made possible by a grant from NGI Zero Entrust via nlnet. Learn more on the [NLnet project page](https://nlnet.nl/project/SolidUsableApps/). + +[nlnet foundation logo](https://nlnet.nl/) +[NGI Zero Entrust Logo](https://nlnet.nl/) + +## Liscense +MIT diff --git a/packages/ldo/src/LdoDataset.ts b/packages/ldo/src/LdoDataset.ts index 4d86b90..7407566 100644 --- a/packages/ldo/src/LdoDataset.ts +++ b/packages/ldo/src/LdoDataset.ts @@ -3,7 +3,7 @@ import jsonldDatasetProxy from "jsonld-dataset-proxy"; import { WrapperSubscribableDataset } from "o-dataset-pack"; import { LdoBuilder } from "./LdoBuilder"; import type { ShapeType } from "./ShapeType"; -import type { LdoBase } from "./util"; +import type { LdoBase } from "./index"; /** * Utility for building a linked data object diff --git a/packages/ldo/test/LdoDataset.test.ts b/packages/ldo/test/LdoDataset.test.ts new file mode 100644 index 0000000..e6f5ed8 --- /dev/null +++ b/packages/ldo/test/LdoDataset.test.ts @@ -0,0 +1,168 @@ +import { literal, namedNode, quad } from "@rdfjs/data-model"; +import { createDataset } from "o-dataset-pack"; +import type { SolidProfileShape } from "./profileData"; +import { ProfileShapeType } from "./profileData"; +import type { LdoBuilder, LdoDataset } from "../src"; +import { createLdoDataset, graphOf, parseRdf, toTurtle } from "../src"; +import { sampleJsonld, sampleTurtle } from "./sampleData"; +import type { SubjectProxy } from "jsonld-dataset-proxy"; +import { _proxyContext } from "jsonld-dataset-proxy"; + +describe("LdoDataset", () => { + let ldoDataset: LdoDataset; + let profileBuilder: LdoBuilder; + + beforeEach(async () => { + ldoDataset = await parseRdf(sampleTurtle, { + baseIRI: "https://solidweb.org/jackson/profile/card", + }); + profileBuilder = ldoDataset.usingType(ProfileShapeType); + }); + + it("Creates a blank profile", async () => { + ldoDataset = createLdoDataset(); + profileBuilder = ldoDataset.usingType(ProfileShapeType); + const profile = profileBuilder.fromSubject( + "https://example.com/person1#me", + ); + profile.fn = "Diplo"; + expect(await toTurtle(profile)).toBe( + ' "Diplo".\n', + ); + }); + + it("initializes a profile using the fromJson method", () => { + const profile = profileBuilder.fromJson({ + type: [{ "@id": "Person" }, { "@id": "Person2" }], + inbox: { "@id": "https://inbox.com" }, + fn: "Diplo", + }); + expect(profile.inbox).toEqual({ "@id": "https://inbox.com" }); + expect(profile.fn).toBe("Diplo"); + expect(profile["@id"]).toBe(undefined); + }); + + it("initializes a profile with an id using the fromJson method", () => { + const profile = profileBuilder.fromJson({ + "@id": "https://example.com/person1", + type: [{ "@id": "Person" }, { "@id": "Person2" }], + inbox: { "@id": "https://inbox.com" }, + fn: "Diplo", + }); + expect(profile.inbox).toEqual({ "@id": "https://inbox.com" }); + expect(profile.fn).toBe("Diplo"); + expect(profile["@id"]).toBe("https://example.com/person1"); + }); + + it("retrieves a subject with a named node", async () => { + const profile = await profileBuilder.fromSubject( + namedNode("https://solidweb.org/jackson/profile/card#me"), + ); + expect(profile.fn).toBe("Jackson Morgan"); + }); + + it("retrieves a subject with a string id", async () => { + const profile = profileBuilder.fromSubject( + "https://solidweb.org/jackson/profile/card#me", + ); + expect(profile.fn).toBe("Jackson Morgan"); + }); + + it("uses an existing dataset as the basis for the ldo", async () => { + const dataset = createDataset(); + dataset.add( + quad( + namedNode("https://example.com/person1"), + namedNode("http://xmlns.com/foaf/0.1/name"), + literal("Captain cool"), + ), + ); + const profile = createLdoDataset(dataset) + .usingType(ProfileShapeType) + .fromSubject("https://example.com/person1"); + expect(profile.name).toBe("Captain cool"); + }); + + it("uses an existing array of quads as the basis for the ldo", async () => { + const quads = [ + quad( + namedNode("https://example.com/person1"), + namedNode("http://xmlns.com/foaf/0.1/name"), + literal("Captain cool"), + ), + ]; + const profile = createLdoDataset(quads) + .usingType(ProfileShapeType) + .fromSubject("https://example.com/person1"); + expect(profile.name).toBe("Captain cool"); + }); + + it("parses JsonLD", async () => { + await expect(async () => parseRdf(sampleJsonld)).rejects.toThrow( + "Not Implemented", + ); + // ldoDataset = await parseRdf(sampleJsonld); + // const profile = ldoDataset + // .usingType(ProfileShapeType) + // .fromSubject("https://example.com/item"); + // expect(profile.name).toBe("Captain of Coolness"); + }); + + it("parses an existing dataset", async () => { + const ldoDataset = await parseRdf(createDataset()); + expect(typeof ldoDataset.usingType).toBe("function"); + }); + + it("Sets the proper write graphs", () => { + const profile = profileBuilder + .write("https://example.com/exampleGraph") + .fromSubject("https://example.com/person1"); + profile.name = "Jackson"; + expect(graphOf(profile, "name")[0].value).toBe( + "https://example.com/exampleGraph", + ); + }); + + it("Lets a match query retrieve subjects", () => { + const profiles = profileBuilder.matchSubject( + "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + "http://xmlns.com/foaf/0.1/Person", + ); + expect(profiles[0].fn).toBe("Jackson Morgan"); + }); + + it("Handles alternate optionality for subject match", () => { + const profiles = profileBuilder.matchSubject( + undefined, + undefined, + "https://someGraph.com", + ); + expect(profiles.length).toBe(0); + }); + + it("Lets a match query retrieve objects", () => { + const profiles = profileBuilder.matchObject( + null, + "http://xmlns.com/foaf/0.1/primaryTopic", + ); + expect(profiles[0].fn).toBe("Jackson Morgan"); + }); + + it("Handles alternate optionality for object match", () => { + const profiles = profileBuilder.matchObject( + "https://someSubject", + undefined, + "https://someGraph.com", + ); + expect(profiles.length).toBe(0); + }); + + it("Sets language preferences", () => { + const profile = profileBuilder + .setLanguagePreferences("@none", "en") + .fromSubject("https://solidweb.org/jackson/profile/card#me"); + expect( + (profile as unknown as SubjectProxy)[_proxyContext].languageOrdering, + ).toEqual(["@none", "en"]); + }); +}); diff --git a/packages/ldo/test/methods.test.ts b/packages/ldo/test/methods.test.ts new file mode 100644 index 0000000..7a85304 --- /dev/null +++ b/packages/ldo/test/methods.test.ts @@ -0,0 +1,151 @@ +import { namedNode } from "@rdfjs/data-model"; +import type { SubjectProxy } from "jsonld-dataset-proxy"; +import { + getProxyFromObject, + graphOf, + _getUnderlyingDataset, + _proxyContext, +} from "jsonld-dataset-proxy"; +import { createDataset } from "o-dataset-pack"; +import type { SolidProfileShape } from "./profileData"; +import { ProfileShapeType } from "./profileData"; +import type { LdoDataset } from "../src"; +import { + commitTransaction, + createLdoDataset, + getDataset, + serialize, + startTransaction, + toJsonLd, + toNTriples, + toSparqlUpdate, + toTurtle, + transactionChanges, + write, + setLanguagePreferences, + languagesOf, +} from "../src"; + +describe("methods", () => { + let dataset: LdoDataset; + let profile: SolidProfileShape; + beforeEach(() => { + dataset = createLdoDataset(); + profile = dataset + .usingType(ProfileShapeType) + .fromSubject(namedNode("https://example.com/item")); + }); + + it("Records changes in a transaction", () => { + startTransaction(profile); + profile.name = "Beeboo"; + const changes = transactionChanges(profile); + expect(changes.added?.size).toBe(1); + expect(changes.removed).toBe(undefined); + }); + + it("throws when called with startTransaction if an underlying dataset is not a subscribable dataset", () => { + const proxy = getProxyFromObject(profile); + proxy[_proxyContext] = proxy[_proxyContext].duplicate({ + dataset: createDataset(), + }); + expect(() => startTransaction(profile)).toThrow( + "Object is not transactable.", + ); + }); + + it("Commits changes", () => { + startTransaction(profile); + profile.name = "Joey"; + expect(dataset.size).toBe(0); + commitTransaction(profile); + expect(dataset.size).toBe(1); + expect(profile.name).toBe("Joey"); + }); + + it("throws an error if transaction dependent functions are called without a transaction", async () => { + expect(() => transactionChanges(profile)).toThrow( + "Object is not currently in a transaction", + ); + expect(() => commitTransaction(profile)).toThrow( + "Object is not currently in a transaction", + ); + await expect(async () => toSparqlUpdate(profile)).rejects.toThrow( + "Object is not currently in a transaction", + ); + }); + + it("provides the correct sparql update", async () => { + profile.name = "Mr. Cool Dude"; + startTransaction(profile); + profile.name = "Captain of Coolness"; + expect(await toSparqlUpdate(profile)).toBe( + `DELETE DATA { "Mr. Cool Dude" . }; INSERT DATA { "Captain of Coolness" . }`, + ); + }); + + it("provides a sparql update when nothing has been changed", async () => { + startTransaction(profile); + expect(await toSparqlUpdate(profile)).toBe(""); + }); + + it("translates into turtle", async () => { + profile.name = "Captain of Coolness"; + expect(await toTurtle(profile)).toBe( + ' "Captain of Coolness".\n', + ); + }); + + it("translates into n-triples", async () => { + profile.name = "Captain of Coolness"; + expect(await toNTriples(profile)).toBe( + ' "Captain of Coolness" .\n', + ); + }); + + it("uses the serialize method", async () => { + profile.name = "Captain of Coolness"; + expect(await serialize(profile, { format: "Turtle" })).toBe( + ' "Captain of Coolness".\n', + ); + }); + + it.skip("translates into jsonld", async () => { + profile.name = "Captain of Coolness"; + expect(await toJsonLd(profile)).toEqual([ + { + "@id": "https://example.com/item", + "http://xmlns.com/foaf/0.1/name": "Captain of Coolness", + }, + ]); + }); + + it("errors when asked to convert to JsonLd", async () => { + await expect(async () => toJsonLd(profile)).rejects.toThrow( + "Not Implemented", + ); + }); + + it("returns the underlying dataset", () => { + const underlyingDataset = getDataset(profile); + expect(typeof underlyingDataset.add).toBe("function"); + }); + + it("sets a write graph", () => { + write("https://graphname.com").using(profile); + profile.name = "Jackson"; + expect(graphOf(profile, "name")[0].value).toBe("https://graphname.com"); + }); + + it("sets the language preferences", () => { + setLanguagePreferences("@none", "en").using(profile); + expect( + (profile as unknown as SubjectProxy)[_proxyContext].languageOrdering, + ).toEqual(["@none", "en"]); + }); + + it("uses languagesOf", () => { + const result = languagesOf(profile, "name"); + expect(result).toEqual({}); + }); +}); diff --git a/packages/ldo/test/profileData.ts b/packages/ldo/test/profileData.ts new file mode 100644 index 0000000..a537eb3 --- /dev/null +++ b/packages/ldo/test/profileData.ts @@ -0,0 +1,1112 @@ +import type { Schema } from "shexj"; +import type { ContextDefinition } from "jsonld"; +import type { ShapeType } from "../src"; + +export const profileShex: Schema = { + type: "Schema", + shapes: [ + { + id: "https://shaperepo.com/schemas/solidProfile#SolidProfileShape", + type: "ShapeDecl", + shapeExpr: { + type: "Shape", + expression: { + type: "EachOf", + expressions: [ + { + type: "TripleConstraint", + predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + valueExpr: { + type: "NodeConstraint", + values: ["http://schema.org/Person"], + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "Defines the node as a Person (from Schema.org)", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + valueExpr: { + type: "NodeConstraint", + values: ["http://xmlns.com/foaf/0.1/Person"], + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "Defines the node as a Person (from foaf)", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#fn", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The formatted name of a person. Example: John Smith", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://xmlns.com/foaf/0.1/name", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "An alternate way to define a person's name.", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#hasAddress", + valueExpr: + "https://shaperepo.com/schemas/solidProfile#AddressShape", + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The person's street address.", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#hasEmail", + valueExpr: + "https://shaperepo.com/schemas/solidProfile#EmailShape", + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The person's email.", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#hasPhoto", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "A link to the person's photo", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://xmlns.com/foaf/0.1/img", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "Photo link but in string form", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#hasTelephone", + valueExpr: + "https://shaperepo.com/schemas/solidProfile#PhoneNumberShape", + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "Person's telephone number", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#phone", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "An alternative way to define a person's telephone number using a string", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#organization-name", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The name of the organization with which the person is affiliated", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#role", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The name of the person's role in their organization", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/auth/acl#trustedApp", + valueExpr: + "https://shaperepo.com/schemas/solidProfile#TrustedAppShape", + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "A list of app origins that are trusted by this user", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/auth/cert#key", + valueExpr: + "https://shaperepo.com/schemas/solidProfile#RSAPublicKeyShape", + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "A list of RSA public keys that are associated with private keys the user holds.", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/ldp#inbox", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The user's LDP inbox to which apps can post notifications", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/pim/space#preferencesFile", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The user's preferences", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/pim/space#storage", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The location of a Solid storage server related to this WebId", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/solid/terms#account", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The user's account", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/solid/terms#privateTypeIndex", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "A registry of all types used on the user's Pod (for private access only)", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/solid/terms#publicTypeIndex", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "A registry of all types used on the user's Pod (for public access)", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://xmlns.com/foaf/0.1/knows", + valueExpr: + "https://shaperepo.com/schemas/solidProfile#SolidProfileShape", + min: 0, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "A list of WebIds for all the people this user knows.", + }, + }, + ], + }, + ], + }, + extra: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], + }, + }, + { + id: "https://shaperepo.com/schemas/solidProfile#AddressShape", + type: "ShapeDecl", + shapeExpr: { + type: "Shape", + expression: { + type: "EachOf", + expressions: [ + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#country-name", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The name of the user's country of residence", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#locality", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The name of the user's locality (City, Town etc.) of residence", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#postal-code", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The user's postal code", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#region", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The name of the user's region (State, Province etc.) of residence", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#street-address", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The user's street address", + }, + }, + ], + }, + ], + }, + }, + }, + { + id: "https://shaperepo.com/schemas/solidProfile#EmailShape", + type: "ShapeDecl", + shapeExpr: { + type: "Shape", + expression: { + type: "EachOf", + expressions: [ + { + type: "TripleConstraint", + predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + valueExpr: { + type: "NodeConstraint", + values: [ + "http://www.w3.org/2006/vcard/ns#Dom", + "http://www.w3.org/2006/vcard/ns#Home", + "http://www.w3.org/2006/vcard/ns#ISDN", + "http://www.w3.org/2006/vcard/ns#Internet", + "http://www.w3.org/2006/vcard/ns#Intl", + "http://www.w3.org/2006/vcard/ns#Label", + "http://www.w3.org/2006/vcard/ns#Parcel", + "http://www.w3.org/2006/vcard/ns#Postal", + "http://www.w3.org/2006/vcard/ns#Pref", + "http://www.w3.org/2006/vcard/ns#Work", + "http://www.w3.org/2006/vcard/ns#X400", + ], + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The type of email.", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#value", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The value of an email as a mailto link (Example )", + }, + }, + ], + }, + ], + }, + extra: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], + }, + }, + { + id: "https://shaperepo.com/schemas/solidProfile#PhoneNumberShape", + type: "ShapeDecl", + shapeExpr: { + type: "Shape", + expression: { + type: "EachOf", + expressions: [ + { + type: "TripleConstraint", + predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + valueExpr: { + type: "NodeConstraint", + values: [ + "http://www.w3.org/2006/vcard/ns#Dom", + "http://www.w3.org/2006/vcard/ns#Home", + "http://www.w3.org/2006/vcard/ns#ISDN", + "http://www.w3.org/2006/vcard/ns#Internet", + "http://www.w3.org/2006/vcard/ns#Intl", + "http://www.w3.org/2006/vcard/ns#Label", + "http://www.w3.org/2006/vcard/ns#Parcel", + "http://www.w3.org/2006/vcard/ns#Postal", + "http://www.w3.org/2006/vcard/ns#Pref", + "http://www.w3.org/2006/vcard/ns#Work", + "http://www.w3.org/2006/vcard/ns#X400", + ], + }, + min: 0, + max: 1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "They type of Phone Number", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/2006/vcard/ns#value", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: + "The value of a phone number as a tel link (Example )", + }, + }, + ], + }, + ], + }, + extra: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], + }, + }, + { + id: "https://shaperepo.com/schemas/solidProfile#TrustedAppShape", + type: "ShapeDecl", + shapeExpr: { + type: "Shape", + expression: { + type: "EachOf", + expressions: [ + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/auth/acl#mode", + valueExpr: { + type: "NodeConstraint", + values: [ + "http://www.w3.org/ns/auth/acl#Append", + "http://www.w3.org/ns/auth/acl#Control", + "http://www.w3.org/ns/auth/acl#Read", + "http://www.w3.org/ns/auth/acl#Write", + ], + }, + min: 1, + max: -1, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The level of access provided to this origin", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/auth/acl#origin", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "The app origin the user trusts", + }, + }, + ], + }, + ], + }, + }, + }, + { + id: "https://shaperepo.com/schemas/solidProfile#RSAPublicKeyShape", + type: "ShapeDecl", + shapeExpr: { + type: "Shape", + expression: { + type: "EachOf", + expressions: [ + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/auth/cert#modulus", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "RSA Modulus", + }, + }, + ], + }, + { + type: "TripleConstraint", + predicate: "http://www.w3.org/ns/auth/cert#exponent", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#integer", + }, + annotations: [ + { + type: "Annotation", + predicate: "http://www.w3.org/2000/01/rdf-schema#comment", + object: { + value: "RSA Exponent", + }, + }, + ], + }, + ], + }, + }, + }, + ], +}; + +export const profileContext: ContextDefinition = { + countryName: { + "@id": "http://www.w3.org/2006/vcard/ns#country-name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + locality: { + "@id": "http://www.w3.org/2006/vcard/ns#locality", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + postalCode: { + "@id": "http://www.w3.org/2006/vcard/ns#postal-code", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + region: { + "@id": "http://www.w3.org/2006/vcard/ns#region", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + streetAddress: { + "@id": "http://www.w3.org/2006/vcard/ns#street-address", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + type: { + "@id": "@type", + "@container": "@set", + }, + Dom: "http://www.w3.org/2006/vcard/ns#Dom", + Home: "http://www.w3.org/2006/vcard/ns#Home", + ISDN: "http://www.w3.org/2006/vcard/ns#ISDN", + Internet: "http://www.w3.org/2006/vcard/ns#Internet", + Intl: "http://www.w3.org/2006/vcard/ns#Intl", + Label: "http://www.w3.org/2006/vcard/ns#Label", + Parcel: "http://www.w3.org/2006/vcard/ns#Parcel", + Postal: "http://www.w3.org/2006/vcard/ns#Postal", + Pref: "http://www.w3.org/2006/vcard/ns#Pref", + Work: "http://www.w3.org/2006/vcard/ns#Work", + X400: "http://www.w3.org/2006/vcard/ns#X400", + value: { + "@id": "http://www.w3.org/2006/vcard/ns#value", + "@container": "@set", + }, + modulus: { + "@id": "http://www.w3.org/ns/auth/cert#modulus", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + exponent: { + "@id": "http://www.w3.org/ns/auth/cert#exponent", + "@type": "http://www.w3.org/2001/XMLSchema#integer", + }, + Person: "http://schema.org/Person", + Person2: "http://xmlns.com/foaf/0.1/Person", + fn: { + "@id": "http://www.w3.org/2006/vcard/ns#fn", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + name: { + "@id": "http://xmlns.com/foaf/0.1/name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + hasAddress: { + "@id": "http://www.w3.org/2006/vcard/ns#hasAddress", + "@type": "@id", + "@container": "@set", + }, + hasEmail: { + "@id": "http://www.w3.org/2006/vcard/ns#hasEmail", + "@type": "@id", + "@container": "@set", + }, + hasPhoto: { + "@id": "http://www.w3.org/2006/vcard/ns#hasPhoto", + }, + img: { + "@id": "http://xmlns.com/foaf/0.1/img", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + hasTelephone: { + "@id": "http://www.w3.org/2006/vcard/ns#hasTelephone", + "@type": "@id", + "@container": "@set", + }, + phone: { + "@id": "http://www.w3.org/2006/vcard/ns#phone", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + organizationName: { + "@id": "http://www.w3.org/2006/vcard/ns#organization-name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + role: { + "@id": "http://www.w3.org/2006/vcard/ns#role", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + trustedApp: { + "@id": "http://www.w3.org/ns/auth/acl#trustedApp", + "@type": "@id", + "@container": "@set", + }, + mode: { + "@id": "http://www.w3.org/ns/auth/acl#mode", + "@container": "@set", + }, + Append: "http://www.w3.org/ns/auth/acl#Append", + Control: "http://www.w3.org/ns/auth/acl#Control", + Read: "http://www.w3.org/ns/auth/acl#Read", + Write: "http://www.w3.org/ns/auth/acl#Write", + origin: { + "@id": "http://www.w3.org/ns/auth/acl#origin", + }, + key: { + "@id": "http://www.w3.org/ns/auth/cert#key", + "@type": "@id", + "@container": "@set", + }, + inbox: { + "@id": "http://www.w3.org/ns/ldp#inbox", + "@type": "@id", + }, + preferencesFile: { + "@id": "http://www.w3.org/ns/pim/space#preferencesFile", + }, + storage: { + "@id": "http://www.w3.org/ns/pim/space#storage", + "@container": "@set", + }, + account: { + "@id": "http://www.w3.org/ns/solid/terms#account", + }, + privateTypeIndex: { + "@id": "http://www.w3.org/ns/solid/terms#privateTypeIndex", + "@container": "@set", + }, + publicTypeIndex: { + "@id": "http://www.w3.org/ns/solid/terms#publicTypeIndex", + "@container": "@set", + }, + knows: { + "@id": "http://xmlns.com/foaf/0.1/knows", + "@container": "@set", + }, +}; + +export interface AddressShape { + "@id"?: string; + "@context"?: ContextDefinition; + /** + * The name of the user's country of residence + */ + countryName?: string; + /**r + * The name of the user's locality (City, Town etc.) of residencer + */ + locality?: string; + /** + * The user's postal code + */ + postalCode?: string; + /** + * The name of the user's region (State, Province etc.) of residence + */ + region?: string; + /** + * The user's street address + */ + streetAddress?: string; +} + +export interface EmailShape { + "@id"?: string; + "@context"?: ContextDefinition; + /** + * The type of email. + */ + type?: + | { "@id": "Dom" } + | { "@id": "Home" } + | { "@id": "ISDN" } + | { "@id": "Internet" } + | { "@id": "Intl" } + | { "@id": "Label" } + | { "@id": "Parcel" } + | { "@id": "Postal" } + | { "@id": "Pref" } + | { "@id": "Work" } + | { "@id": "X400" }; + /** + * The value of an email as a mailto link (Example ) + */ + value: string; +} + +export interface PhoneNumberShape { + "@id"?: string; + "@context"?: ContextDefinition; + /** + * They type of Phone Number + */ + type?: + | { "@id": "Dom" } + | { "@id": "Home" } + | { "@id": "ISDN" } + | { "@id": "Internet" } + | { "@id": "Intl" } + | { "@id": "Label" } + | { "@id": "Parcel" } + | { "@id": "Postal" } + | { "@id": "Pref" } + | { "@id": "Work" } + | { "@id": "X400" }; + /** + * The value of a phone number as a tel link (Example ) + */ + value: string; +} + +export interface RSAPublicKeyShape { + "@id"?: string; + "@context"?: ContextDefinition; + /** + * RSA Modulus + */ + modulus: string; + /** + * RSA Exponent + */ + exponent: number; +} + +export interface SolidProfileShape { + "@id"?: string; + "@context"?: ContextDefinition; + /** + * Defines the node as a Person (from Schema.org) | Defines the node as a Person (from foaf) + */ + type: ({ "@id": "Person" } | { "@id": "Person2" })[]; + /** + * The formatted name of a person. Example: John Smith + */ + fn?: string; + /** + * An alternate way to define a person's name. + */ + name?: string; + /** + * The person's street address. + */ + hasAddress?: AddressShape[]; + /** + * The person's email. + */ + hasEmail?: EmailShape[]; + /** + * A link to the person's photo + */ + hasPhoto?: string; + /** + * Photo link but in string form + * + img?: string; + /** + * Person's telephone number + */ + hasTelephone?: PhoneNumberShape[]; + /** + * An alternative way to define a person's telephone number using a string + */ + phone?: string; + /** + * The name of the organization with which the person is affiliated + */ + organizationName?: string; + /** + * The name of the person's role in their organization + */ + role?: string; + /** + * A list of app origins that are trusted by this user + */ + trustedApp?: TrustedAppShape[]; + /** + * A list of RSA public keys that are associated with private keys the user holds. + */ + key?: RSAPublicKeyShape[]; + /** + * The user's LDP inbox to which apps can post notifications + */ + inbox: { "@id": string }; + /** + * The user's preferences + */ + preferencesFile?: string; + /** + * The location of a Solid storage server related to this WebId + */ + storage?: string[]; + /** + * The user's account + */ + account?: string; + /** + * A registry of all types used on the user's Pod (for private access only) + */ + privateTypeIndex?: string[]; + /** + * A registry of all types used on the user's Pod (for public access) + */ + publicTypeIndex?: string[]; + /** + * A list of WebIds for all the people this user knows. + */ + knows?: SolidProfileShape[]; +} + +export interface TrustedAppShape { + "@id"?: string; + "@context"?: ContextDefinition; + /** + * The level of access provided to this origin + */ + mode: ( + | { "@id": "Append" } + | { "@id": "Control" } + | { "@id": "Read" } + | { "@id": "Write" } + )[]; + /** + * The app origin the user trusts + */ + origin: string; +} + +export const ProfileShapeType: ShapeType = { + schema: profileShex, + shape: "https://shaperepo.com/schemas/solidProfile#SolidProfileShape", + context: profileContext, +}; + +export const TrustedAppShapeType: ShapeType = { + schema: profileShex, + shape: "https://shaperepo.com/schemas/solidProfile#TrustedAppShape", + context: profileContext, +}; + +export const AddressShapeType: ShapeType = { + schema: profileShex, + shape: "https://shaperepo.com/schemas/solidProfile#AddressShape", + context: profileContext, +}; + +export const EmailShapeType: ShapeType = { + schema: profileShex, + shape: "https://shaperepo.com/schemas/solidProfile#EmailShape", + context: profileContext, +}; + +export const PhoneNumberShapeType: ShapeType = { + schema: profileShex, + shape: "https://shaperepo.com/schemas/solidProfile#PhoneNumberShape", + context: profileContext, +}; + +export const RSAPublicKeyShapeType: ShapeType = { + schema: profileShex, + shape: "https://shaperepo.com/schemas/solidProfile#RSAPublicKeyShape", + context: profileContext, +}; diff --git a/packages/ldo/test/sampleData.ts b/packages/ldo/test/sampleData.ts new file mode 100644 index 0000000..f457b07 --- /dev/null +++ b/packages/ldo/test/sampleData.ts @@ -0,0 +1,16 @@ +export const sampleTurtle = ` + a ; + <#me>; + <#me>. + <#me> a ; + ; + "Jackson Morgan"; + <#id1651115504716>. + `; + +export const sampleJsonld = [ + { + "@id": "https://example.com/item", + "http://xmlns.com/foaf/0.1/name": [{ "@value": "Captain of Coolness" }], + }, +]; diff --git a/packages/schema-converter-shex/.eslintrc b/packages/schema-converter-shex/.eslintrc new file mode 100644 index 0000000..83c51a9 --- /dev/null +++ b/packages/schema-converter-shex/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": ["../../.eslintrc"] +} \ No newline at end of file diff --git a/packages/schema-converter-shex/README.md b/packages/schema-converter-shex/README.md new file mode 100644 index 0000000..7553795 --- /dev/null +++ b/packages/schema-converter-shex/README.md @@ -0,0 +1,120 @@ +# ShexJ 2 Type and Context + +Turn ShexJ into typescript typings and JSON-LD context. + +## Installation +```bash +npm i @ldo/schema-converter-shex +``` + +## API +See the [full API docs](docs/modules.md). + +## Usage + +```typescript +import { Schema } from "shexj"; +import shexjToTypeAndContext from "@ldo/schema-converter-shex"; + +async function run() { + /** + * Sample ShexJ. Equivalent to: + * + * { # An has: + * foaf:givenName xsd:string+, # at least one givenName. + * foaf:familyName xsd:string, # one familyName. + * foaf:phone IRI*, # any number of phone numbers. + * foaf:mbox IRI # one FOAF mbox. + * } + */ + const sampleShexj: Schema = { + type: "Schema", + shapes: [ + { + type: "Shape", + id: "http://shex.io/webapps/shex.js/doc/EmployeeShape", + expression: { + type: "EachOf", + expressions: [ + { + type: "TripleConstraint", + predicate: "http://xmlns.com/foaf/0.1/givenName", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + min: 1, + max: -1, + }, + { + type: "TripleConstraint", + predicate: "http://xmlns.com/foaf/0.1/familyName", + valueExpr: { + type: "NodeConstraint", + datatype: "http://www.w3.org/2001/XMLSchema#string", + }, + }, + { + type: "TripleConstraint", + predicate: "http://xmlns.com/foaf/0.1/phone", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + min: 0, + max: -1, + }, + { + type: "TripleConstraint", + predicate: "http://xmlns.com/foaf/0.1/mbox", + valueExpr: { + type: "NodeConstraint", + nodeKind: "iri", + }, + }, + ], + }, + }, + ], + "@context": "http://www.w3.org/ns/shex.jsonld", + }; + + const [typings, context] = await shexjToTypeAndContext(sampleShexj); + + /* + Logs: + declare namespace { + interface EmployeeShape { + givenName: string[]; + familyName: string; + phone?: string[]; + mbox: string; + } + + } + */ + console.log(typings.typingsString); + /* + Logs: + { + givenName: { + '@id': 'http://xmlns.com/foaf/0.1/givenName', + '@type': 'http://www.w3.org/2001/XMLSchema#string', + '@container': '@set' + }, + familyName: { + '@id': 'http://xmlns.com/foaf/0.1/familyName', + '@type': 'http://www.w3.org/2001/XMLSchema#string' + }, + phone: { '@id': 'http://xmlns.com/foaf/0.1/phone', '@container': '@set' }, + mbox: { '@id': 'http://xmlns.com/foaf/0.1/mbox' } + } + */ + console.log(context); +} +run(); +``` + + +## Liscense +MIT \ No newline at end of file diff --git a/packages/schema-converter-shex/jest.config.js b/packages/schema-converter-shex/jest.config.js new file mode 100644 index 0000000..b28362a --- /dev/null +++ b/packages/schema-converter-shex/jest.config.js @@ -0,0 +1,5 @@ +const sharedConfig = require('../../jest.config.js'); +module.exports = { + ...sharedConfig, + 'rootDir': './', +} \ No newline at end of file diff --git a/packages/schema-converter-shex/package.json b/packages/schema-converter-shex/package.json new file mode 100644 index 0000000..2eb8f7c --- /dev/null +++ b/packages/schema-converter-shex/package.json @@ -0,0 +1,40 @@ +{ + "name": "@ldo/schema-converter-shex", + "version": "0.0.0", + "description": "", + "main": "dist/index.js", + "scripts": { + "build": "tsc --project tsconfig.build.json", + "test": "jest --coverage", + "prepublishOnly": "npm run test && npm run build" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/o-development/shexj2typeandcontext.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/o-development/shexj2typeandcontext/issues" + }, + "homepage": "https://github.com/o-development/shexj2typeandcontextr#readme", + "devDependencies": { + "@shexjs/parser": "^1.0.0-alpha.24", + "@types/jest": "^27.0.3", + "@types/jsonld": "^1.5.6", + "@types/shexj": "^2.1.3", + "jest": "^27.4.5", + "jsonld": "^5.2.0", + "o-dataset-pack": "^0.2.1", + "shex-test": "^2.1.0", + "ts-jest": "^27.1.2" + }, + "files": [ + "dist" + ], + "dependencies": { + "dts-dom": "^3.6.0", + "jsonld2graphobject": "^0.0.5", + "shexj-traverser": "^2.0.1" + } +} diff --git a/packages/schema-converter-shex/src/context/JsonLdContextBuilder.ts b/packages/schema-converter-shex/src/context/JsonLdContextBuilder.ts new file mode 100644 index 0000000..aaa2776 --- /dev/null +++ b/packages/schema-converter-shex/src/context/JsonLdContextBuilder.ts @@ -0,0 +1,182 @@ +import { Annotation } from "shexj"; +import { ContextDefinition, ExpandedTermDefinition } from "jsonld"; + +/** + * Name functions + */ +export function iriToName(iri: string): string { + try { + const url = new URL(iri); + if (url.hash) { + return url.hash.slice(1); + } else { + const splitPathname = url.pathname.split("/"); + return splitPathname[splitPathname.length - 1]; + } + } catch (err) { + return iri; + } +} + +export function nameFromObject(obj: { + id?: string; + annotations?: Annotation[]; +}): string | undefined { + const labelAnnotationObject = obj.annotations?.find( + (annotation) => + annotation.predicate === "http://www.w3.org/2000/01/rdf-schema#label" + )?.object; + if (labelAnnotationObject && typeof labelAnnotationObject === "string") { + return toCamelCase(iriToName(labelAnnotationObject)); + } else if ( + labelAnnotationObject && + typeof labelAnnotationObject !== "string" + ) { + return toCamelCase(labelAnnotationObject.value); + } else if (obj.id) { + return toCamelCase(iriToName(obj.id)); + } +} + +export function toCamelCase(text: string) { + return text + .replace(/([-_ ]){1,}/g, " ") + .split(/[-_ ]/) + .reduce((cur, acc) => { + return cur + acc[0].toUpperCase() + acc.substring(1); + }); +} + +/** + * JsonLd Context Builder + */ +export class JsonLdContextBuilder { + private iriAnnotations: Record = {}; + private iriTypes: Record = {}; + private generatedNames: Record | undefined; + + addSubject(iri: string, annotations?: Annotation[]) { + if (!this.iriAnnotations[iri]) { + this.iriAnnotations[iri] = []; + } + if (annotations && annotations.length > 0) { + this.iriAnnotations[iri].push(...annotations); + } + } + + addPredicate( + iri: string, + expandedTermDefinition: ExpandedTermDefinition, + isContainer: boolean, + annotations?: Annotation[] + ) { + this.addSubject(iri, annotations); + if (!this.iriTypes[iri]) { + this.iriTypes[iri] = expandedTermDefinition; + if (isContainer) { + this.iriTypes[iri]["@container"] = "@set"; + } + } else { + const curDef = this.iriTypes[iri]; + const newDef = expandedTermDefinition; + // TODO: if you reuse the same predicate with a different cardinality, + // it will overwrite the past cardinality. Perhapse we might want to + // split contexts in the various shapes. + if (isContainer) { + curDef["@container"] = "@set"; + } + // If the old and new versions both have types + if (curDef["@type"] && newDef["@type"]) { + if ( + Array.isArray(curDef["@type"]) && + !(curDef["@type"] as string[]).includes(newDef["@type"]) + ) { + curDef["@type"].push(newDef["@type"]); + } else if ( + typeof curDef["@type"] === "string" && + curDef["@type"] !== newDef["@type"] + ) { + // The typings are incorrect. String arrays are allowed on @type + // see https://w3c.github.io/json-ld-syntax/#example-specifying-multiple-types-for-a-node + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + curDef["@type"] = [curDef["@type"], newDef["@type"]]; + } + } + } + } + + generateNames(): Record { + const generatedNames: Record = {}; + const claimedNames: Set = new Set(); + Object.entries(this.iriAnnotations).forEach(([iri, annotations]) => { + let potentialName: string | undefined; + if (annotations.length > 0) { + const labelAnnotationObject = annotations.find( + (annotation) => + annotation.predicate === + "http://www.w3.org/2000/01/rdf-schema#label" + )?.object; + if ( + labelAnnotationObject && + typeof labelAnnotationObject === "string" + ) { + potentialName = toCamelCase(iriToName(labelAnnotationObject)); + } else if ( + labelAnnotationObject && + typeof labelAnnotationObject !== "string" + ) { + potentialName = toCamelCase(labelAnnotationObject.value); + } + } + if (!potentialName) { + potentialName = toCamelCase(iriToName(iri)); + } + if (claimedNames.has(potentialName)) { + let i = 2; + let newName: string | undefined; + do { + if (!claimedNames.has(`${potentialName}${i}`)) { + newName = `${potentialName}${i}`; + } + i++; + } while (!newName); + potentialName = newName; + } + claimedNames.add(potentialName); + generatedNames[iri] = potentialName; + }); + return generatedNames; + } + + getNameFromIri(iri: string) { + if (!this.generatedNames) { + this.generatedNames = this.generateNames(); + } + if (this.generatedNames[iri]) { + return this.generatedNames[iri]; + } else { + return iri; + } + } + + generateJsonldContext(): ContextDefinition { + const contextDefnition: ContextDefinition = {}; + const namesMap = this.generateNames(); + Object.entries(namesMap).forEach(([iri, name]) => { + if (this.iriTypes[iri]) { + contextDefnition[name] = { + "@id": + iri === "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" + ? "@type" + : iri, + ...this.iriTypes[iri], + }; + } else { + contextDefnition[name] = iri; + } + }); + + return contextDefnition; + } +} diff --git a/packages/schema-converter-shex/src/context/ShexJContextVisitor.ts b/packages/schema-converter-shex/src/context/ShexJContextVisitor.ts new file mode 100644 index 0000000..a175a70 --- /dev/null +++ b/packages/schema-converter-shex/src/context/ShexJContextVisitor.ts @@ -0,0 +1,83 @@ +import ShexJTraverser from "shexj-traverser"; +import { JsonLdContextBuilder } from "./JsonLdContextBuilder"; + +/** + * Visitor + */ +export const ShexJNameVisitor = + ShexJTraverser.createVisitor({ + Shape: { + visitor: async (shape, context) => { + + } + }, + TripleConstraint: { + visitor: async (tripleConstraint, context) => { + if (tripleConstraint.valueExpr) { + const isContainer = + tripleConstraint.max !== undefined && tripleConstraint.max !== 1; + if (typeof tripleConstraint.valueExpr === "string") { + // TOOD handle string value expr + } else if (tripleConstraint.valueExpr.type === "NodeConstraint") { + if (tripleConstraint.valueExpr.datatype) { + context.addPredicate( + tripleConstraint.predicate, + { + "@type": tripleConstraint.valueExpr.datatype, + }, + isContainer, + tripleConstraint.annotations + ); + } else if ( + tripleConstraint.valueExpr.nodeKind && + tripleConstraint.valueExpr.nodeKind !== "literal" + ) { + context.addPredicate( + tripleConstraint.predicate, + { "@type": "@id" }, + isContainer, + tripleConstraint.annotations + ); + } else { + context.addPredicate( + tripleConstraint.predicate, + {}, + isContainer, + tripleConstraint.annotations + ); + } + } else { + context.addPredicate( + tripleConstraint.predicate, + { + "@type": "@id", + }, + isContainer, + tripleConstraint.annotations + ); + } + } else { + context.addSubject( + tripleConstraint.predicate, + tripleConstraint.annotations + ); + } + }, + }, + NodeConstraint: { + visitor: async (nodeConstraint, context) => { + if (nodeConstraint.values) { + nodeConstraint.values.forEach((value) => { + if (typeof value === "string") { + context.addSubject(value); + } + }); + } + }, + }, + IriStem: { + visitor: async (iriStem, context) => { + context.addSubject(iriStem.stem); + }, + }, + }); diff --git a/packages/schema-converter-shex/src/context/shexjToContext.ts b/packages/schema-converter-shex/src/context/shexjToContext.ts new file mode 100644 index 0000000..32cc1f5 --- /dev/null +++ b/packages/schema-converter-shex/src/context/shexjToContext.ts @@ -0,0 +1,21 @@ +import { ContextDefinition } from "jsonld"; +import { Schema } from "shexj"; +import { JsonLdContextBuilder } from "./JsonLdContextBuilder"; +import { ShexJNameVisitor } from "./ShexJContextVisitor"; +import { jsonld2graphobject } from "jsonld2graphobject"; + +export async function shexjToContext( + shexj: Schema +): Promise { + const processedShexj: Schema = (await jsonld2graphobject( + { + ...shexj, + "@id": "SCHEMA", + "@context": "http://www.w3.org/ns/shex.jsonld", + }, + "SCHEMA" + )) as unknown as Schema; + const jsonLdContextBuilder = new JsonLdContextBuilder(); + await ShexJNameVisitor.visit(processedShexj, "Schema", jsonLdContextBuilder); + return jsonLdContextBuilder.generateJsonldContext(); +} diff --git a/packages/schema-converter-shex/src/index.ts b/packages/schema-converter-shex/src/index.ts new file mode 100644 index 0000000..041bb80 --- /dev/null +++ b/packages/schema-converter-shex/src/index.ts @@ -0,0 +1,3 @@ +import { shexjToTyping } from "./typing/shexjToTyping"; + +export default shexjToTyping; diff --git a/packages/schema-converter-shex/src/typing/ShapeInterfaceDeclaration.ts b/packages/schema-converter-shex/src/typing/ShapeInterfaceDeclaration.ts new file mode 100644 index 0000000..ed1e3bb --- /dev/null +++ b/packages/schema-converter-shex/src/typing/ShapeInterfaceDeclaration.ts @@ -0,0 +1,5 @@ +import { InterfaceDeclaration } from "dts-dom"; + +export interface ShapeInterfaceDeclaration extends InterfaceDeclaration { + shapeId?: string; +} diff --git a/packages/schema-converter-shex/src/typing/ShexJTypingTransformer.ts b/packages/schema-converter-shex/src/typing/ShexJTypingTransformer.ts new file mode 100644 index 0000000..cf1dabe --- /dev/null +++ b/packages/schema-converter-shex/src/typing/ShexJTypingTransformer.ts @@ -0,0 +1,355 @@ +import ShexJTraverser from "shexj-traverser"; +import * as dom from "dts-dom"; +import { Annotation } from "shexj"; +import { nameFromObject } from "../context/JsonLdContextBuilder"; +import { ShapeInterfaceDeclaration } from "./ShapeInterfaceDeclaration"; + +export interface ShexJTypeTransformerContext { + getNameFromIri: (iri: string) => string; +} + +export function commentFromAnnotations( + annotations?: Annotation[] +): string | undefined { + const commentAnnotationObject = annotations?.find( + (annotation) => + annotation.predicate === "http://www.w3.org/2000/01/rdf-schema#comment" + )?.object; + if (typeof commentAnnotationObject === "string") { + // It's an IRI + return commentAnnotationObject; + } else { + return commentAnnotationObject?.value; + } +} + +export const ShexJTypingTransformer = ShexJTraverser.createTransformer< + { + Schema: { + return: dom.TopLevelDeclaration[]; + }; + ShapeDecl: { + return: dom.InterfaceDeclaration; + }; + Shape: { + return: dom.InterfaceDeclaration; + }; + EachOf: { + return: dom.ObjectType | dom.InterfaceDeclaration; + }; + TripleConstraint: { + return: dom.PropertyDeclaration; + }; + NodeConstraint: { + return: dom.Type; + }; + }, + ShexJTypeTransformerContext +>({ + Schema: { + transformer: async ( + _schema, + getTransformedChildren + ): Promise => { + const transformedChildren = await getTransformedChildren(); + const interfaces: dom.TopLevelDeclaration[] = []; + transformedChildren.shapes?.forEach((shape) => { + if ( + typeof shape !== "string" && + (shape as dom.InterfaceDeclaration).kind === "interface" + ) { + interfaces.push(shape as dom.InterfaceDeclaration); + } + }); + return interfaces; + }, + }, + ShapeDecl: { + transformer: async ( + shapeDecl, + getTransformedChildren + ): Promise => { + const shapeName = nameFromObject(shapeDecl) || "Shape"; + const { shapeExpr } = await getTransformedChildren(); + if ((shapeExpr as dom.InterfaceDeclaration).kind === "interface") { + const shapeInterface = shapeExpr as ShapeInterfaceDeclaration; + shapeInterface.name = shapeName; + // This exists so the LDO-CLI can understand which type corresponds to the shape + shapeInterface.shapeId = shapeDecl.id; + return shapeInterface; + } else { + // TODO: Handle other items + throw new Error( + "Cannot handle ShapeOr, ShapeAnd, ShapeNot, ShapeExternal, or NodeConstraint" + ); + } + }, + }, + Shape: { + transformer: async (shape, getTransformedChildren, setReturnPointer) => { + const newInterface: ShapeInterfaceDeclaration = dom.create.interface(""); + setReturnPointer(newInterface); + const transformedChildren = await getTransformedChildren(); + // Add @id and @context + newInterface.members.push( + dom.create.property( + "@id", + dom.type.string, + dom.DeclarationFlags.Optional + ) + ); + newInterface.members.push( + dom.create.property( + "@context", + dom.create.namedTypeReference("ContextDefinition"), + dom.DeclarationFlags.Optional + ) + ); + if (typeof transformedChildren.expression === "string") { + // TODO: handle string + } else if ( + (transformedChildren.expression as dom.ObjectType).kind === "object" || + (transformedChildren.expression as dom.InterfaceDeclaration).kind === + "interface" + ) { + newInterface.members.push( + ...(transformedChildren.expression as dom.ObjectType).members + ); + } else if ( + (transformedChildren.expression as dom.PropertyDeclaration).kind === + "property" + ) { + newInterface.members.push( + transformedChildren.expression as dom.PropertyDeclaration + ); + } + // Use EXTENDS + if (transformedChildren.extends) { + newInterface.baseTypes = []; + transformedChildren.extends.forEach((extendsItem) => { + if ((extendsItem as dom.InterfaceDeclaration).kind === "interface") { + newInterface.baseTypes?.push( + extendsItem as dom.InterfaceDeclaration + ); + } + }); + } + return newInterface; + }, + }, + EachOf: { + transformer: async (eachOf, getTransformedChildren, setReturnPointer) => { + const transformedChildren = await getTransformedChildren(); + const name = nameFromObject(eachOf); + const objectType = name + ? dom.create.interface(name) + : dom.create.objectType([]); + const eachOfComment = commentFromAnnotations(eachOf.annotations); + setReturnPointer(objectType); + // Get Input property expressions + const inputPropertyExpressions: dom.PropertyDeclaration[] = []; + transformedChildren.expressions + .filter( + ( + expression + ): expression is dom.ObjectType | dom.PropertyDeclaration => { + return ( + (expression as dom.PropertyDeclaration).kind === "property" || + (expression as dom.ObjectType).kind === "object" || + (expression as dom.InterfaceDeclaration).kind === "interface" + ); + } + ) + .forEach( + ( + expression: + | dom.ObjectType + | dom.InterfaceDeclaration + | dom.PropertyDeclaration + ) => { + if (expression.kind === "property") { + inputPropertyExpressions.push(expression); + } else { + expression.members.forEach((objectMember) => { + if (objectMember.kind === "property") { + inputPropertyExpressions.push(objectMember); + } + }); + } + } + ); + + // Merge property expressions + const properties: Record = {}; + inputPropertyExpressions.forEach((expression) => { + const propertyDeclaration = expression as dom.PropertyDeclaration; + // Combine properties if they're duplicates + if (properties[propertyDeclaration.name]) { + const oldPropertyDeclaration = properties[propertyDeclaration.name]; + const oldPropertyTypeAsArray = + oldPropertyDeclaration.type as dom.ArrayTypeReference; + const oldProeprtyType = + oldPropertyTypeAsArray.kind === "array" + ? oldPropertyTypeAsArray.type + : oldPropertyDeclaration.type; + const propertyTypeAsArray = + propertyDeclaration.type as dom.ArrayTypeReference; + const propertyType = + propertyTypeAsArray.kind === "array" + ? propertyTypeAsArray.type + : propertyDeclaration.type; + const isOptional = + propertyDeclaration.flags === dom.DeclarationFlags.Optional || + oldPropertyDeclaration.flags === dom.DeclarationFlags.Optional; + properties[propertyDeclaration.name] = dom.create.property( + propertyDeclaration.name, + dom.type.array(dom.create.union([oldProeprtyType, propertyType])), + isOptional + ? dom.DeclarationFlags.Optional + : dom.DeclarationFlags.None + ); + // Set JS Comment + properties[propertyDeclaration.name].jsDocComment = + oldPropertyDeclaration.jsDocComment && + propertyDeclaration.jsDocComment + ? `${oldPropertyDeclaration.jsDocComment} | ${propertyDeclaration.jsDocComment}` + : oldPropertyDeclaration.jsDocComment || + propertyDeclaration.jsDocComment || + eachOfComment; + } else { + properties[propertyDeclaration.name] = propertyDeclaration; + } + }); + objectType.members.push(...Object.values(properties)); + return objectType; + }, + }, + TripleConstraint: { + transformer: async ( + tripleConstraint, + getTransformedChildren, + setReturnPointer, + context + ) => { + const transformedChildren = await getTransformedChildren(); + const propertyName = context.getNameFromIri(tripleConstraint.predicate); + const isArray = + tripleConstraint.max !== undefined && tripleConstraint.max !== 1; + const isOptional = tripleConstraint.min === 0; + let type: dom.Type = dom.type.any; + if (transformedChildren.valueExpr) { + type = transformedChildren.valueExpr as dom.Type; + } + + const propertyDeclaration = dom.create.property( + propertyName, + isArray ? dom.type.array(type) : type, + isOptional ? dom.DeclarationFlags.Optional : dom.DeclarationFlags.None + ); + + propertyDeclaration.jsDocComment = commentFromAnnotations( + tripleConstraint.annotations + ); + return propertyDeclaration; + }, + }, + NodeConstraint: { + transformer: async ( + nodeConstraint, + _getTransformedChildren, + setReturnPointer, + context + ) => { + if (nodeConstraint.datatype) { + switch (nodeConstraint.datatype) { + case "http://www.w3.org/2001/XMLSchema#string": + case "http://www.w3.org/2001/XMLSchema#ENTITIES": + case "http://www.w3.org/2001/XMLSchema#ENTITY": + case "http://www.w3.org/2001/XMLSchema#ID": + case "http://www.w3.org/2001/XMLSchema#IDREF": + case "http://www.w3.org/2001/XMLSchema#IDREFS": + case "http://www.w3.org/2001/XMLSchema#language": + case "http://www.w3.org/2001/XMLSchema#Name": + case "http://www.w3.org/2001/XMLSchema#NCName": + case "http://www.w3.org/2001/XMLSchema#NMTOKEN": + case "http://www.w3.org/2001/XMLSchema#NMTOKENS": + case "http://www.w3.org/2001/XMLSchema#normalizedString": + case "http://www.w3.org/2001/XMLSchema#QName": + case "http://www.w3.org/2001/XMLSchema#token": + return dom.type.string; + case "http://www.w3.org/2001/XMLSchema#date": + case "http://www.w3.org/2001/XMLSchema#dateTime": + case "http://www.w3.org/2001/XMLSchema#duration": + case "http://www.w3.org/2001/XMLSchema#gDay": + case "http://www.w3.org/2001/XMLSchema#gMonth": + case "http://www.w3.org/2001/XMLSchema#gMonthDay": + case "http://www.w3.org/2001/XMLSchema#gYear": + case "http://www.w3.org/2001/XMLSchema#gYearMonth": + case "http://www.w3.org/2001/XMLSchema#time": + return dom.type.string; + case "http://www.w3.org/2001/XMLSchema#byte": + case "http://www.w3.org/2001/XMLSchema#decimal": + case "http://www.w3.org/2001/XMLSchema#int": + case "http://www.w3.org/2001/XMLSchema#integer": + case "http://www.w3.org/2001/XMLSchema#long": + case "http://www.w3.org/2001/XMLSchema#negativeInteger": + case "http://www.w3.org/2001/XMLSchema#nonNegativeInteger": + case "http://www.w3.org/2001/XMLSchema#nonPositiveInteger": + case "http://www.w3.org/2001/XMLSchema#positiveInteger": + case "http://www.w3.org/2001/XMLSchema#short": + case "http://www.w3.org/2001/XMLSchema#unsignedLong": + case "http://www.w3.org/2001/XMLSchema#unsignedInt": + case "http://www.w3.org/2001/XMLSchema#unsignedShort": + case "http://www.w3.org/2001/XMLSchema#unsignedByte": + return dom.type.number; + case "http://www.w3.org/2001/XMLSchema#boolean": + return dom.type.boolean; + case "http://www.w3.org/2001/XMLSchema#hexBinary": + return dom.type.string; + case "http://www.w3.org/2001/XMLSchema#anyURI": + return dom.type.string; + default: + return dom.type.string; + } + } + if (nodeConstraint.nodeKind) { + switch (nodeConstraint.nodeKind) { + case "iri": + return dom.create.objectType([ + dom.create.property("@id", dom.type.string), + ]); + case "bnode": + return dom.create.objectType([]); + case "nonliteral": + return dom.create.objectType([ + dom.create.property( + "@id", + dom.type.string, + dom.DeclarationFlags.Optional + ), + ]); + case "literal": + default: + return dom.type.string; + } + } + if (nodeConstraint.values) { + const valuesUnion = dom.create.union([]); + nodeConstraint.values.forEach((value) => { + if (typeof value === "string") { + valuesUnion.members.push( + dom.create.objectType([ + dom.create.property( + "@id", + dom.type.stringLiteral(context.getNameFromIri(value)) + ), + ]) + ); + } + }); + return valuesUnion; + } + return dom.type.undefined; + }, + }, +}); diff --git a/packages/schema-converter-shex/src/typing/shexjToTyping.ts b/packages/schema-converter-shex/src/typing/shexjToTyping.ts new file mode 100644 index 0000000..455eea5 --- /dev/null +++ b/packages/schema-converter-shex/src/typing/shexjToTyping.ts @@ -0,0 +1,59 @@ +import { ContextDefinition } from "jsonld"; +import { Schema } from "shexj"; +import { JsonLdContextBuilder } from "../context/JsonLdContextBuilder"; +import { ShexJNameVisitor } from "../context/ShexJContextVisitor"; +import { jsonld2graphobject } from "jsonld2graphobject"; +import { ShexJTypingTransformer } from "./ShexJTypingTransformer"; +import * as dom from "dts-dom"; + +export interface TypeingReturn { + typingsString: string; + typings: { + typingString: string; + dts: dom.TopLevelDeclaration; + }[]; +} + +export async function shexjToTyping( + shexj: Schema +): Promise<[TypeingReturn, ContextDefinition]> { + const processedShexj: Schema = (await jsonld2graphobject( + { + ...shexj, + "@id": "SCHEMA", + "@context": "http://www.w3.org/ns/shex.jsonld", + }, + "SCHEMA" + )) as unknown as Schema; + const jsonLdContextBuilder = new JsonLdContextBuilder(); + await ShexJNameVisitor.visit(processedShexj, "Schema", jsonLdContextBuilder); + + const declarations = await ShexJTypingTransformer.transform( + processedShexj, + "Schema", + { + getNameFromIri: + jsonLdContextBuilder.getNameFromIri.bind(jsonLdContextBuilder), + } + ); + const typings = declarations.map((declaration) => { + return { + typingString: dom + .emit(declaration, { + rootFlags: dom.ContextFlags.InAmbientNamespace, + }) + .replace("\r\n", "\n"), + dts: declaration, + }; + }); + const typingsString = + `import {ContextDefinition} from "jsonld"\n\n` + + typings.map((typing) => `export ${typing.typingString}`).join(""); + + const typeingReturn: TypeingReturn = { + typingsString, + typings, + }; + + return [typeingReturn, jsonLdContextBuilder.generateJsonldContext()]; +} diff --git a/packages/schema-converter-shex/test/context.test.ts b/packages/schema-converter-shex/test/context.test.ts new file mode 100644 index 0000000..0df8e48 --- /dev/null +++ b/packages/schema-converter-shex/test/context.test.ts @@ -0,0 +1,16 @@ +import { testData } from "./testData/testData"; +import { shexjToContext } from "../src/context/shexjToContext"; +import parser from "@shexjs/parser"; +import type { Schema } from "shexj"; + +describe("context", () => { + testData.forEach(({ name, shexc, successfulContext }) => { + it(`Creates a context for ${name}`, async () => { + const schema: Schema = parser + .construct("https://ldo.js.org/") + .parse(shexc); + const context = await shexjToContext(schema); + expect(context).toEqual(successfulContext); + }); + }); +}); diff --git a/packages/schema-converter-shex/test/testData/activityPub.ts b/packages/schema-converter-shex/test/testData/activityPub.ts new file mode 100644 index 0000000..24309ca --- /dev/null +++ b/packages/schema-converter-shex/test/testData/activityPub.ts @@ -0,0 +1,1160 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import type { TestData } from "./testData"; + +/** + * Activity Pub + */ +export const activityPub: TestData = { + name: "activity pub", + shexc: ` + # ---------------------------------------------------- + # Shex (https://shex.io) shapes based on the activity + # streams spec (https://www.w3.org/TR/activitystreams-vocabulary) + # ---------------------------------------------------- + + PREFIX sra: + PREFIX as: + PREFIX xsd: + PREFIX rdf: + PREFIX rdfs: + + # ---------------------------------------------------- + # Object + # ---------------------------------------------------- + sra:ActivityPubObject EXTRA a { + $sra:ObjectShape ( + a [ as:Object ] + // rdfs:comment "Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection." ; + + (as:attachment @sra:ActivityPubObject * ; as:attachment @sra:Link *) + // rdfs:comment "Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email." ; + + (as:attributedTo @sra:ActivityPubObject ; as:attributedTo @sra:Link *) + // rdfs:comment "Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity." ; + + (as:audience @sra:ActivityPubObject * ; as:audience @sra:Link *) + // rdfs:comment "Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant." ; + + (as:content xsd:string * ; as:content rdf:langString *) + // rdfs:comment "The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. " ; + + (as:context @sra:ActivityPubObject * ; as:context @sra:Link *) + // rdfs:comment "Identifies the context within which the object exists or an activity was performed. The notion of \\"context\\" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event." ; + + (as:name xsd:string * ; as:name rdf:langString *) + // rdfs:comment "A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values." ; + + as:endTime xsd:dateTime ? + // rdfs:comment "The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude." ; + + (as:generator @sra:ActivityPubObject * ; as:generator @sra:Link *) + // rdfs:comment "Identifies the entity (e.g. an application) that generated the object. " ; + + (as:icon @sra:Image * ; as:icon @sra:Link *) + // rdfs:comment "Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size." ; + + (as:image @sra:Image * ; as:image @sra:Link *) + // rdfs:comment "Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed." ; + + (as:inReplyTo @sra:ActivityPubObject * ; as:inReplyTo @sra:Link *) + // rdfs:comment "Indicates one or more entities for which this object is considered a response." ; + + (as:location @sra:ActivityPubObject * ; as:location @sra:Link *) + // rdfs:comment "Indicates one or more physical or logical locations associated with the object." ; + + (as:preview @sra:ActivityPubObject * ; as:preview @sra:Link *) + // rdfs:comment "Identifies an entity that provides a preview of this object." ; + + as:published xsd:dateTime ? + // rdfs:comment "The date and time at which the object was published" ; + + as:replies @sra:Collection ? + // rdfs:comment "Identifies a Collection containing objects considered to be responses to this object." ; + + as:startTime xsd:dateTime ? + // rdfs:comment "The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin." ; + + (as:summary xsd:string * ; as:summary rdf:langString *) + // rdfs:comment "A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided." ; + + (as:tag @sra:ActivityPubObject * ; as:tag @sra:Link *) + // rdfs:comment "One or more \\"tags\\" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference." ; + + as:updated xsd:dateTime ? + // rdfs:comment "The date and time at which the object was updated" ; + + (as:url xsd:anyURI * ; as:url @sra:Link *) + // rdfs:comment "Identifies one or more links to representations of the object" ; + + (as:to @sra:ActivityPubObject * ; as:to @sra:Link *) + // rdfs:comment "Identifies an entity considered to be part of the public primary audience of an Object" ; + + (as:bto @sra:ActivityPubObject * ; as:bto @sra:Link *) + // rdfs:comment "Identifies an Object that is part of the private primary audience of this Object." ; + + (as:cc @sra:ActivityPubObject * ; as:cc @sra:Link *) + // rdfs:comment "Identifies an Object that is part of the public secondary audience of this Object." ; + + (as:bcc @sra:ActivityPubObject * ; as:bcc @sra:Link *) + // rdfs:comment "Identifies one or more Objects that are part of the private secondary audience of this Object." ; + + as:mediaType xsd:string ? + // rdfs:comment "When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content." ; + + as:duration xsd:duration ? + // rdfs:comment "When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object's approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as \\"PT5S\\")." ; + ) ; + } + + # ---------------------------------------------------- + # Link + # ---------------------------------------------------- + sra:Link EXTRA a { + $sra:LinkShape ( + a [ as:Link ] + // rdfs:comment "A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [ RFC5988]. Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or Link. When a Link is used, it establishes a qualified relation connecting the subject (the containing object) to the resource identified by the href. Properties of the Link are properties of the reference as opposed to properties of the resource." ; + + as:href xsd:anyURI ? + // rdfs:comment "The target resource pointed to by a Link." ; + + as:rel xsd:string * + // rdfs:comment "A link relation associated with a Link. The value MUST conform to both the [HTML5] and [RFC5988] \\"link relation\\" definitions. In the [HTML5], any string not containing the \\"space\\" U+0020, \\"tab\\" (U+0009), \\"LF\\" (U+000A), \\"FF\\" (U+000C), \\"CR\\" (U+000D) or \\",\\" (U+002C) characters can be used as a valid link relation." ; + + as:mediaType xsd:string ? + // rdfs:comment "When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content." ; + + (as:name xsd:string * ; as:name rdf:langString *) + // rdfs:comment "A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values." ; + + as:hreflang xsd:string ? + // rdfs:comment "Hints as to the language used by the target resource. Value MUST be a [BCP47] Language-Tag." ; + + as:height xsd:nonNegativeInteger ? + // rdfs:comment "On a Link, specifies a hint as to the rendering height in device-independent pixels of the linked resource." ; + + as:width xsd:nonNegativeInteger ? + // rdfs:comment "On a Link, specifies a hint as to the rendering width in device-independent pixels of the linked resource." ; + + (as:preview @sra:ActivityPubObject * ; as:preview @sra:Link *) + // rdfs:comment "Identifies an entity that provides a preview of this object." ; + ) ; + } + + # ---------------------------------------------------- + # Activity + # ---------------------------------------------------- + sra:Activity EXTRA a { + $sra:ActivityShape ( + &sra:ObjectShape ; + a [ as:Activity ] + // rdfs:comment "An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken." ; + + (as:actor @sra:ActivityPubObject * ; as:actor @sra:Link *) + // rdfs:comment "Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link." ; + + (as:object @sra:ActivityPubObject * ; as:object @sra:Link *) + // rdfs:comment "When used within an Activity, describes the direct object of the activity. For instance, in the activity \\"John added a movie to his wishlist\\", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related." ; + + (as:target @sra:ActivityPubObject * ; as:target @sra:Link *) + // rdfs:comment "Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition \\"to\\". For instance, in the activity \\"John added a movie to his wishlist\\", the target of the activity is John's wishlist. An activity can have more than one target." ; + + (as:result @sra:ActivityPubObject * ; as:result @sra:Link *) + // rdfs:comment "Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource." ; + + (as:origin @sra:ActivityPubObject * ; as:origin @sra:Link *) + // rdfs:comment "Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition \\"from\\". For instance, in the activity \\"John moved an item to List B from List A\\", the origin of the activity is \\"List A\\". " ; + + (as:instrument @sra:ActivityPubObject * ; as:instrument @sra:Link *) + // rdfs:comment "Identifies one or more objects used (or to be used) in the completion of an Activity." ; + ) ; + } + + # ---------------------------------------------------- + # Intransitive Activity + # ---------------------------------------------------- + sra:InstransitiveActivity EXTRA a { + $sra:IntransitiveActivityShape ( + &sra:ActivityShape ; + a [ as:IntransitiveActivity ] + // rdfs:comment "Instances of IntransitiveActivity are a subtype of Activity representing intransitive actions. The object property is therefore inappropriate for these activities." ; + ) ; + } + + # ---------------------------------------------------- + # Collection + # ---------------------------------------------------- + sra:Collection EXTRA a { + $sra:CollectionShape ( + &sra:ObjectShape ; + a [ as:Collection ] + // rdfs:comment "A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances. Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type. " ; + + as:totalItems xsd:nonNegativeInteger ? + // rdfs:comment "A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance." ; + + (as:current @sra:CollectionPage ? | as:current @sra:Link ?) + // rdfs:comment "In a paged Collection, indicates the page that contains the most recently updated member items." ; + + (as:first @sra:CollectionPage ? | as:first @sra:Link ?) + // rdfs:comment "In a paged Collection, indicates the furthest preceeding page of items in the collection." ; + + (as:last @sra:CollectionPage ? | as:last @sra:Link ?) + // rdfs:comment "In a paged Collection, indicates the furthest proceeding page of the collection." ; + + (as:items @sra:ActivityPubObject * ; as:items @sra:Link *) + // rdfs:comment "Identifies the items contained in a collection. The items might be ordered or unordered. " ; + ) ; + } + + # ---------------------------------------------------- + # Ordered Collection + # ---------------------------------------------------- + sra:OrderedCollection EXTRA a { + $sra:OrderedCollectionShape ( + &sra:CollectionShape ; + a [ as:OrderedCollection ] + // rdfs:comment "A subtype of Collection in which members of the logical collection are assumed to always be strictly ordered." ; + ) ; + } + + # ---------------------------------------------------- + # Collection Page + # ---------------------------------------------------- + sra:CollectionPage EXTRA a { + $sra:CollectionPageShape ( + &sra:CollectionShape ; + a [ as:CollectionPage ] + // rdfs:comment "Used to represent distinct subsets of items from a Collection. Refer to the Activity Streams 2.0 Core for a complete description of the CollectionPage object." ; + + (as:partOf @sra:Link ? | as:partOf @sra:Collection ?) + // rdfs:comment "Identifies the Collection to which a CollectionPage objects items belong." ; + + (as:next @sra:CollectionPage ? | as:next @sra:Link ?) + // rdfs:comment "In a paged Collection, indicates the next page of items." ; + + (as:prev @sra:CollectionPage ? | as:next @sra:Link ?) + // rdfs:comment "In a paged Collection, identifies the previous page of items." ; + ) ; + } + + # ---------------------------------------------------- + # Ordered Collection Page + # ---------------------------------------------------- + sra:OrderedCollectionPage EXTRA a { + $sra:OrderedCollectionPageShape ( + &sra:OrderedCollectionShape ; + a [ as:OrderedCollectionPage ] + // rdfs:comment "Used to represent ordered subsets of items from an OrderedCollection. Refer to the Activity Streams 2.0 Core for a complete description of the OrderedCollectionPage object." ; + + as:startIndex xsd:nonNegativeInteger ? + // rdfs:comment "A non-negative integer value identifying the relative position within the logical view of a strictly ordered collection." + ) ; + } + + # ---------------------------------------------------- + # Accept + # ---------------------------------------------------- + sra:Accept EXTRA a { + $sra:AcceptShape ( + &sra:ActivityShape ; + a [ as:Accept ] + // rdfs:comment "Indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate the context into which the object has been accepted." ; + ) ; + } + + # ---------------------------------------------------- + # TentativeAccept + # ---------------------------------------------------- + sra:TentativeAccept EXTRA a { + $sra:TentativeAcceptShape ( + &sra:AcceptShape ; + a [ as:TentativeAccept ] + // rdfs:comment "A specialization of Accept indicating that the acceptance is tentative." ; + ) ; + } + + # ---------------------------------------------------- + # Add + # ---------------------------------------------------- + sra:Add EXTRA a { + $sra:AddShape ( + &sra:ActivityShape ; + a [ as:Add ] + // rdfs:comment "Indicates that the actor has added the object to the target. If the target property is not explicitly specified, the target would need to be determined implicitly by context. The origin can be used to identify the context from which the object originated. " ; + ) ; + } + + # ---------------------------------------------------- + # Arrive + # ---------------------------------------------------- + sra:Arrive EXTRA a { + $sra:ArriveShape ( + &sra:IntransitiveActivityShape ; + a [ as:Arrive ] + // rdfs:comment "An IntransitiveActivity that indicates that the actor has arrived at the location. The origin can be used to identify the context from which the actor originated. The target typically has no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Create + # ---------------------------------------------------- + sra:Create EXTRA a { + $sra:CreateShape ( + &sra:ActivityShape ; + a [ as:Create ] + // rdfs:comment "Indicates that the actor has created the object." ; + ) ; + } + + # ---------------------------------------------------- + # Delete + # ---------------------------------------------------- + sra:Delete EXTRA a { + $sra:DeleteShape ( + &sra:ActivityShape ; + a [ as:Delete ] + // rdfs:comment "Indicates that the actor has deleted the object. If specified, the origin indicates the context from which the object was deleted." ; + ) ; + } + + # ---------------------------------------------------- + # Follow + # ---------------------------------------------------- + sra:Follow EXTRA a { + $sra:FollowShape ( + &sra:ActivityShape ; + a [ as:Follow ] + // rdfs:comment "Indicates that the actor is \\"following\\" the object. Following is defined in the sense typically used within Social systems in which the actor is interested in any activity performed by or on the object. The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Ignore + # ---------------------------------------------------- + sra:Ignore EXTRA a { + $sra:IgnoreShape ( + &sra:ActivityShape ; + a [ as:Ignore ] + // rdfs:comment "Indicates that the actor is ignoring the object. The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Join + # ---------------------------------------------------- + sra:Join EXTRA a { + $sra:JoinShape ( + &sra:ActivityShape ; + a [ as:Join ] + // rdfs:comment "Indicates that the actor has joined the object. The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Leave + # ---------------------------------------------------- + sra:Leave EXTRA a { + $sra:LeaveShape ( + &sra:ActivityShape ; + a [ as:Leave ] + // rdfs:comment "Indicates that the actor has left the object. The target and origin typically have no meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Like + # ---------------------------------------------------- + sra:Like EXTRA a { + $sra:LikeShape ( + &sra:ActivityShape ; + a [ as:Like ] + // rdfs:comment "Indicates that the actor likes, recommends or endorses the object. The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Offer + # ---------------------------------------------------- + sra:Offer EXTRA a { + $sra:OfferShape ( + &sra:ActivityShape ; + a [ as:Offer ] + // rdfs:comment "Indicates that the actor is offering the object. If specified, the target indicates the entity to which the object is being offered." ; + ) ; + } + + # ---------------------------------------------------- + # Invite + # ---------------------------------------------------- + sra:Invite EXTRA a { + $sra:InviteShape ( + &sra:OfferShape ; + a [ as:Invite ] + // rdfs:comment "A specialization of Offer in which the actor is extending an invitation for the object to the target." ; + ) ; + } + + # ---------------------------------------------------- + # Reject + # ---------------------------------------------------- + sra:Reject EXTRA a { + $sra:RejectShape ( + &sra:ActivityShape ; + a [ as:Reject ] + // rdfs:comment "Indicates that the actor is rejecting the object. The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # TentativeReject + # ---------------------------------------------------- + sra:TentativeReject EXTRA a { + $sra:TentativeRejectShape ( + &sra:RejectShape ; + a [ as:TentativeReject ] + // rdfs:comment "A specialization of Reject in which the rejection is considered tentative." ; + ) ; + } + + # ---------------------------------------------------- + # Remove + # ---------------------------------------------------- + sra:Remove EXTRA a { + $sra:RemoveShape ( + &sra:ActivityShape ; + a [ as:Remove ] + // rdfs:comment "Indicates that the actor is removing the object. If specified, the origin indicates the context from which the object is being removed." ; + ) ; + } + + # ---------------------------------------------------- + # Undo + # ---------------------------------------------------- + sra:Undo EXTRA a { + $sra:UndoShape ( + &sra:ActivityShape ; + a [ as:Undo ] + // rdfs:comment " Indicates that the actor is undoing the object. In most cases, the object will be an Activity describing some previously performed action (for instance, a person may have previously \\"liked\\" an article but, for whatever reason, might choose to undo that like at some later point in time). The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Update + # ---------------------------------------------------- + sra:Update EXTRA a { + $sra:UpdateShape ( + &sra:ActivityShape ; + a [ as:Update ] + // rdfs:comment "Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism for describing the actual set of modifications made to object. The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # View + # ---------------------------------------------------- + sra:View EXTRA a { + $sra:ViewShape ( + &sra:ActivityShape ; + a [ as:View ] + // rdfs:comment "Indicates that the actor has viewed the object." ; + ) ; + } + + # ---------------------------------------------------- + # Listen + # ---------------------------------------------------- + sra:Listen EXTRA a { + $sra:ListenShape ( + &sra:ActivityShape ; + a [ as:Listen ] + // rdfs:comment "Indicates that the actor has listened to the object." ; + ) ; + } + + # ---------------------------------------------------- + # Read + # ---------------------------------------------------- + sra:Read EXTRA a { + $sra:ReadShape ( + &sra:ActivityShape ; + a [ as:Read ] + // rdfs:comment "Indicates that the actor has read the object." ; + ) ; + } + + # ---------------------------------------------------- + # Move + # ---------------------------------------------------- + sra:Move EXTRA a { + $sra:MoveShape ( + &sra:ActivityShape ; + a [ as:Move ] + // rdfs:comment "Indicates that the actor has moved object from origin to target. If the origin or target are not specified, either can be determined by context." ; + ) ; + } + + # ---------------------------------------------------- + # Travel + # ---------------------------------------------------- + sra:Travel EXTRA a { + $sra:TravelShape ( + &sra:IntransitiveActivityShape ; + a [ as:Travel ] + // rdfs:comment "Indicates that the actor is traveling to target from origin. Travel is an IntransitiveObject whose actor specifies the direct object. If the target or origin are not specified, either can be determined by context." ; + ) ; + } + + # ---------------------------------------------------- + # Announce + # ---------------------------------------------------- + sra:Announce EXTRA a { + $sra:AnnounceShape ( + &sra:ActivityShape ; + a [ as:Announce ] + // rdfs:comment "Indicates that the actor is calling the target's attention the object. The origin typically has no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Block + # ---------------------------------------------------- + sra:Block EXTRA a { + $sra:BlockShape ( + &sra:IgnoreShape ; + a [ as:Block ] + // rdfs:comment "Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore. The typical use is to support social systems that allow one user to block activities or content of other users. The target and origin typically have no defined meaning." ; + ) ; + } + + # ---------------------------------------------------- + # Flag + # ---------------------------------------------------- + sra:Flag EXTRA a { + $sra:FlagShape ( + &sra:ActivityShape ; + a [ as:Flag ] + // rdfs:comment "Indicates that the actor is \\"flagging\\" the object. Flagging is defined in the sense common to many social platforms as reporting content as being inappropriate for any number of reasons." ; + ) ; + } + + # ---------------------------------------------------- + # Dislike + # ---------------------------------------------------- + sra:Dislike EXTRA a { + $sra:DislikeShape ( + &sra:ActivityShape ; + a [ as:Dislike ] + // rdfs:comment "Indicates that the actor dislikes the object." ; + ) ; + } + + # ---------------------------------------------------- + # Question + # ---------------------------------------------------- + sra:Question EXTRA a { + $sra:QuestionShape ( + &sra:IntransitiveActivityShape ; + a [ as:Question ] + // rdfs:comment " Represents a question being asked. Question objects are an extension of IntransitiveActivity. That is, the Question object is an Activity, but the direct object is the question itself and therefore it would not contain an object property. Either of the anyOf and oneOf properties MAY be used to express possible answers, but a Question object MUST NOT have both properties. " ; + + ( + (as:oneOf @sra:ActivityPubObject * ; as:oneOf @sra:Link *) + // rdfs:comment " Identifies an exclusive option for a Question. Use of oneOf implies that the Question can have only a single answer. To indicate that a Question can have multiple answers, use anyOf." | + (as:anyOf @sra:ActivityPubObject * ; as:anyOf @sra:Link *) + // rdfs:comment " Identifies an inclusive option for a Question. Use of anyOf implies that the Question can have multiple answers. To indicate that a Question can have only one answer, use oneOf." + ) ; + + (as:closed @sra:ActivityPubObject * ; as:closed @sra:Link * ; as:closed xsd:dateTime ? ; as:closed xsd:boolean) + // rdfs:comment "Indicates that a question has been closed, and answers are no longer accepted." ; + ) ; + } + + # ---------------------------------------------------- + # Application + # ---------------------------------------------------- + sra:Application EXTRA a { + $sra:ApplicationShape ( + &sra:ObjectShape ; + a [ as:Application ] + // rdfs:comment "Describes a software application." ; + ) ; + } + + # ---------------------------------------------------- + # Group + # ---------------------------------------------------- + sra:Group EXTRA a { + $sra:GroupShape ( + &sra:ObjectShape ; + a [ as:Group ] + // rdfs:comment "Represents a formal or informal collective of Actors." ; + ) ; + } + + # ---------------------------------------------------- + # Organization + # ---------------------------------------------------- + sra:Organization EXTRA a { + $sra:OrganizationShape ( + &sra:ObjectShape ; + a [ as:Organization ] + // rdfs:comment "Represents an organization." ; + ) ; + } + + # ---------------------------------------------------- + # Person + # ---------------------------------------------------- + sra:Person EXTRA a { + $sra:PersonShape ( + &sra:ObjectShape ; + a [ as:Person ] + // rdfs:comment "Represents an individual person." ; + ) ; + } + + # ---------------------------------------------------- + # Service + # ---------------------------------------------------- + sra:Service EXTRA a { + $sra:ServiceShape ( + &sra:ObjectShape ; + a [ as:Service ] + // rdfs:comment "Represents a service of any kind." ; + ) ; + } + + # ---------------------------------------------------- + # Relationship + # ---------------------------------------------------- + sra:Relationship EXTRA a { + $sra:RelationshipShape ( + &sra:ObjectShape ; + a [ as:Relationship ] + // rdfs:comment " Describes a relationship between two individuals. The subject and object properties are used to identify the connected individuals. See 5.2 Representing Relationships Between Entities for additional information. " ; + + (as:subject @sra:ActivityPubObject ? | as:subject @sra:Link ?) + // rdfs:comment "On a Relationship object, the subject property identifies one of the connected individuals. For instance, for a Relationship object describing \\"John is related to Sally\\", subject would refer to John." ; + + (as:object @sra:ActivityPubObject ? | as:object @sra:Link ?) + // rdfs:comment "When used within an Activity, describes the direct object of the activity. For instance, in the activity \\"John added a movie to his wishlist\\", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related." ; + + as:relationship @sra:ActivityPubObject * + // rdfs:comment "On a Relationship object, the relationship property identifies the kind of relationship that exists between subject and object." + ) ; + } + + # ---------------------------------------------------- + # Article + # ---------------------------------------------------- + sra:Article EXTRA a { + $sra:ArticleShape ( + &sra:ObjectShape ; + a [ as:Article ] + // rdfs:comment "Represents any kind of multi-paragraph written work." ; + ) ; + } + + # ---------------------------------------------------- + # Document + # ---------------------------------------------------- + sra:Document EXTRA a { + $sra:DocumentShape ( + &sra:ObjectShape ; + a [ as:Document ] + // rdfs:comment "Represents a document of any kind." ; + ) ; + } + + # ---------------------------------------------------- + # Audio + # ---------------------------------------------------- + sra:Audio EXTRA a { + $sra:AudioShape ( + &sra:DocumentShape ; + a [ as:Audio ] + // rdfs:comment "Represents an audio document of any kind." ; + ) ; + } + + # ---------------------------------------------------- + # Image + # ---------------------------------------------------- + sra:Image EXTRA a { + $sra:ImageShape ( + &sra:DocumentShape ; + a [ as:Image ] + // rdfs:comment "An image document of any kind" ; + ) ; + } + + # ---------------------------------------------------- + # Video + # ---------------------------------------------------- + sra:Video EXTRA a { + $sra:VideoShape ( + &sra:DocumentShape ; + a [ as:Video ] + // rdfs:comment "Represents a video document of any kind. " ; + ) ; + } + + # ---------------------------------------------------- + # Note + # ---------------------------------------------------- + sra:Note EXTRA a { + $sra:NoteShape ( + &sra:ObjectShape ; + a [ as:Note ] + // rdfs:comment "Represents a short written work typically less than a single paragraph in length." ; + ) ; + } + + # ---------------------------------------------------- + # Page + # ---------------------------------------------------- + sra:Page EXTRA a { + $sra:PageShape ( + &sra:DocumentShape ; + a [ as:Page ] + // rdfs:comment "Represents a Web Page." ; + ) ; + } + + # ---------------------------------------------------- + # Event + # ---------------------------------------------------- + sra:Event EXTRA a { + $sra:EventShape ( + &sra:ObjectShape ; + a [ as:Event ] + // rdfs:comment "Represents any kind of event." ; + ) ; + } + + # ---------------------------------------------------- + # Place + # ---------------------------------------------------- + sra:Place EXTRA a { + $sra:PlaceShape ( + &sra:ObjectShape ; + a [ as:Place ] + // rdfs:comment "Represents a logical or physical location. See 5.3 Representing Places for additional information." ; + + as:accuracy xsd:float ? + // rdfs:comment "Indicates the accuracy of position coordinates on a Place objects. Expressed in properties of percentage. e.g. \\"94.0\\" means \\"94.0% accurate\\"." ; + + as:altitude xsd:float ? + // rdfs:comment "Indicates the altitude of a place. The measurement units is indicated using the units property. If units is not specified, the default is assumed to be \\"m\\" indicating meters. " ; + + as:latitude xsd:float ? + // rdfs:comment "The latitude of a place" ; + + as:latitude xsd:float ? + // rdfs:comment "The longitude of a place" ; + + as:radius xsd:float ? + // rdfs:comment "The radius from the given latitude and longitude for a Place. The units is expressed by the units property. If units is not specified, the default is assumed to be \\"m\\" indicating \\"meters\\"." ; + + (as:unit ["cm"^^xsd:string "feet"^^xsd:string "inches"^^xsd:string "km"^^xsd:string "m"^^xsd:string "miles"^^xsd:string ] ? | as:unit xsd:anyURI) + // rdfs:comment "Specifies the measurement units for the radius and altitude properties on a Place object. If not specified, the default is assumed to be \\"m\\" for \\"meters\\"." ; + ) ; + } + + # ---------------------------------------------------- + # Mention + # ---------------------------------------------------- + sra:Mention EXTRA a { + $sra:MentionShape ( + &sra:LinkShape ; + a [ as:Mention ] + // rdfs:comment "A specialized Link that represents an @mention." ; + ) ; + } + + # ---------------------------------------------------- + # Profile + # ---------------------------------------------------- + sra:Profile EXTRA a { + $sra:ProfileShape ( + &sra:ObjectShape ; + a [ as:Profile ] + // rdfs:comment "A Profile is a content object that describes another Object, typically used to describe Actor Type objects. The describes property is used to reference the object being described by the profile." ; + + as:describes @sra:ActivityPubObject ? + // rdfs:comment "On a Profile object, the describes property identifies the object described by the Profile." ; + ) ; + } + + # ---------------------------------------------------- + # Tombstone + # ---------------------------------------------------- + sra:Tombstone EXTRA a { + $sra:TombstoneShape ( + &sra:ObjectShape ; + a [ as:Tombstone ] + // rdfs:comment "A Tombstone represents a content object that has been deleted. It can be used in Collections to signify that there used to be an object at this position, but it has been deleted." ; + + as:formerType @sra:ActivityPubObject * + // rdfs:comment "On a Tombstone object, the formerType property identifies the type of the object that was deleted." ; + + as:deleted xsd:dateTime ? + // rdfs:comment "On a Tombstone object, the deleted property is a timestamp for when the object was deleted." ; + ) ; + } + `, + sampleTurtle: "", + baseNode: "", + successfulContext: { + type: { "@id": "@type" }, + Object: "https://www.w3.org/ns/activitystreams#Object", + attachment: { + "@id": "https://www.w3.org/ns/activitystreams#attachment", + "@type": "@id", + "@container": "@set", + }, + Link: "https://www.w3.org/ns/activitystreams#Link", + href: { + "@id": "https://www.w3.org/ns/activitystreams#href", + "@type": "http://www.w3.org/2001/XMLSchema#anyURI", + }, + rel: { + "@id": "https://www.w3.org/ns/activitystreams#rel", + "@type": "http://www.w3.org/2001/XMLSchema#string", + "@container": "@set", + }, + mediaType: { + "@id": "https://www.w3.org/ns/activitystreams#mediaType", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + // @ts-ignore + name: { + "@id": "https://www.w3.org/ns/activitystreams#name", + // @ts-ignore + "@type": [ + "http://www.w3.org/2001/XMLSchema#string", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", + ], + "@container": "@set", + }, + hreflang: { + "@id": "https://www.w3.org/ns/activitystreams#hreflang", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + height: { + "@id": "https://www.w3.org/ns/activitystreams#height", + "@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger", + }, + width: { + "@id": "https://www.w3.org/ns/activitystreams#width", + "@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger", + }, + preview: { + "@id": "https://www.w3.org/ns/activitystreams#preview", + "@type": "@id", + "@container": "@set", + }, + attributedTo: { + "@id": "https://www.w3.org/ns/activitystreams#attributedTo", + "@type": "@id", + "@container": "@set", + }, + audience: { + "@id": "https://www.w3.org/ns/activitystreams#audience", + "@type": "@id", + "@container": "@set", + }, + // @ts-ignore + content: { + "@id": "https://www.w3.org/ns/activitystreams#content", + // @ts-ignore + "@type": [ + "http://www.w3.org/2001/XMLSchema#string", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", + ], + "@container": "@set", + }, + context: { + "@id": "https://www.w3.org/ns/activitystreams#context", + "@type": "@id", + "@container": "@set", + }, + endTime: { + "@id": "https://www.w3.org/ns/activitystreams#endTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + }, + generator: { + "@id": "https://www.w3.org/ns/activitystreams#generator", + "@type": "@id", + "@container": "@set", + }, + icon: { + "@id": "https://www.w3.org/ns/activitystreams#icon", + "@type": "@id", + "@container": "@set", + }, + Document: "https://www.w3.org/ns/activitystreams#Document", + Image: "https://www.w3.org/ns/activitystreams#Image", + image: { + "@id": "https://www.w3.org/ns/activitystreams#image", + "@type": "@id", + "@container": "@set", + }, + inReplyTo: { + "@id": "https://www.w3.org/ns/activitystreams#inReplyTo", + "@type": "@id", + "@container": "@set", + }, + location: { + "@id": "https://www.w3.org/ns/activitystreams#location", + "@type": "@id", + "@container": "@set", + }, + published: { + "@id": "https://www.w3.org/ns/activitystreams#published", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + }, + replies: { + "@id": "https://www.w3.org/ns/activitystreams#replies", + "@type": "@id", + }, + Collection: "https://www.w3.org/ns/activitystreams#Collection", + totalItems: { + "@id": "https://www.w3.org/ns/activitystreams#totalItems", + "@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger", + }, + current: { + "@id": "https://www.w3.org/ns/activitystreams#current", + "@type": "@id", + }, + CollectionPage: "https://www.w3.org/ns/activitystreams#CollectionPage", + partOf: { + "@id": "https://www.w3.org/ns/activitystreams#partOf", + "@type": "@id", + }, + next: { + "@id": "https://www.w3.org/ns/activitystreams#next", + "@type": "@id", + }, + prev: { + "@id": "https://www.w3.org/ns/activitystreams#prev", + "@type": "@id", + }, + first: { + "@id": "https://www.w3.org/ns/activitystreams#first", + "@type": "@id", + }, + last: { + "@id": "https://www.w3.org/ns/activitystreams#last", + "@type": "@id", + }, + items: { + "@id": "https://www.w3.org/ns/activitystreams#items", + "@type": "@id", + "@container": "@set", + }, + startTime: { + "@id": "https://www.w3.org/ns/activitystreams#startTime", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + }, + // @ts-ignore + summary: { + "@id": "https://www.w3.org/ns/activitystreams#summary", + // @ts-ignore + "@type": [ + "http://www.w3.org/2001/XMLSchema#string", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString", + ], + "@container": "@set", + }, + tag: { + "@id": "https://www.w3.org/ns/activitystreams#tag", + "@type": "@id", + "@container": "@set", + }, + updated: { + "@id": "https://www.w3.org/ns/activitystreams#updated", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + }, + // @ts-ignore + url: { + "@id": "https://www.w3.org/ns/activitystreams#url", + // @ts-ignore + "@type": ["http://www.w3.org/2001/XMLSchema#anyURI", "@id"], + "@container": "@set", + }, + to: { + "@id": "https://www.w3.org/ns/activitystreams#to", + "@type": "@id", + "@container": "@set", + }, + bto: { + "@id": "https://www.w3.org/ns/activitystreams#bto", + "@type": "@id", + "@container": "@set", + }, + cc: { + "@id": "https://www.w3.org/ns/activitystreams#cc", + "@type": "@id", + "@container": "@set", + }, + bcc: { + "@id": "https://www.w3.org/ns/activitystreams#bcc", + "@type": "@id", + "@container": "@set", + }, + duration: { + "@id": "https://www.w3.org/ns/activitystreams#duration", + "@type": "http://www.w3.org/2001/XMLSchema#duration", + }, + Activity: "https://www.w3.org/ns/activitystreams#Activity", + actor: { + "@id": "https://www.w3.org/ns/activitystreams#actor", + "@type": "@id", + "@container": "@set", + }, + object: { + "@id": "https://www.w3.org/ns/activitystreams#object", + "@type": "@id", + "@container": "@set", + }, + target: { + "@id": "https://www.w3.org/ns/activitystreams#target", + "@type": "@id", + "@container": "@set", + }, + result: { + "@id": "https://www.w3.org/ns/activitystreams#result", + "@type": "@id", + "@container": "@set", + }, + origin: { + "@id": "https://www.w3.org/ns/activitystreams#origin", + "@type": "@id", + "@container": "@set", + }, + instrument: { + "@id": "https://www.w3.org/ns/activitystreams#instrument", + "@type": "@id", + "@container": "@set", + }, + IntransitiveActivity: + "https://www.w3.org/ns/activitystreams#IntransitiveActivity", + OrderedCollection: + "https://www.w3.org/ns/activitystreams#OrderedCollection", + OrderedCollectionPage: + "https://www.w3.org/ns/activitystreams#OrderedCollectionPage", + startIndex: { + "@id": "https://www.w3.org/ns/activitystreams#startIndex", + "@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger", + }, + Accept: "https://www.w3.org/ns/activitystreams#Accept", + TentativeAccept: "https://www.w3.org/ns/activitystreams#TentativeAccept", + Add: "https://www.w3.org/ns/activitystreams#Add", + Arrive: "https://www.w3.org/ns/activitystreams#Arrive", + Create: "https://www.w3.org/ns/activitystreams#Create", + Delete: "https://www.w3.org/ns/activitystreams#Delete", + Follow: "https://www.w3.org/ns/activitystreams#Follow", + Ignore: "https://www.w3.org/ns/activitystreams#Ignore", + Join: "https://www.w3.org/ns/activitystreams#Join", + Leave: "https://www.w3.org/ns/activitystreams#Leave", + Like: "https://www.w3.org/ns/activitystreams#Like", + Offer: "https://www.w3.org/ns/activitystreams#Offer", + Invite: "https://www.w3.org/ns/activitystreams#Invite", + Reject: "https://www.w3.org/ns/activitystreams#Reject", + TentativeReject: "https://www.w3.org/ns/activitystreams#TentativeReject", + Remove: "https://www.w3.org/ns/activitystreams#Remove", + Undo: "https://www.w3.org/ns/activitystreams#Undo", + Update: "https://www.w3.org/ns/activitystreams#Update", + View: "https://www.w3.org/ns/activitystreams#View", + Listen: "https://www.w3.org/ns/activitystreams#Listen", + Read: "https://www.w3.org/ns/activitystreams#Read", + Move: "https://www.w3.org/ns/activitystreams#Move", + Travel: "https://www.w3.org/ns/activitystreams#Travel", + Announce: "https://www.w3.org/ns/activitystreams#Announce", + Block: "https://www.w3.org/ns/activitystreams#Block", + Flag: "https://www.w3.org/ns/activitystreams#Flag", + Dislike: "https://www.w3.org/ns/activitystreams#Dislike", + Question: "https://www.w3.org/ns/activitystreams#Question", + oneOf: { + "@id": "https://www.w3.org/ns/activitystreams#oneOf", + "@type": "@id", + "@container": "@set", + }, + anyOf: { + "@id": "https://www.w3.org/ns/activitystreams#anyOf", + "@type": "@id", + "@container": "@set", + }, + // @ts-ignore + closed: { + "@id": "https://www.w3.org/ns/activitystreams#closed", + // @ts-ignore + "@type": [ + "@id", + "http://www.w3.org/2001/XMLSchema#dateTime", + "http://www.w3.org/2001/XMLSchema#boolean", + ], + "@container": "@set", + }, + Application: "https://www.w3.org/ns/activitystreams#Application", + Group: "https://www.w3.org/ns/activitystreams#Group", + Organization: "https://www.w3.org/ns/activitystreams#Organization", + Person: "https://www.w3.org/ns/activitystreams#Person", + Service: "https://www.w3.org/ns/activitystreams#Service", + Relationship: "https://www.w3.org/ns/activitystreams#Relationship", + subject: { + "@id": "https://www.w3.org/ns/activitystreams#subject", + "@type": "@id", + }, + relationship: { + "@id": "https://www.w3.org/ns/activitystreams#relationship", + "@type": "@id", + "@container": "@set", + }, + Article: "https://www.w3.org/ns/activitystreams#Article", + Audio: "https://www.w3.org/ns/activitystreams#Audio", + Video: "https://www.w3.org/ns/activitystreams#Video", + Note: "https://www.w3.org/ns/activitystreams#Note", + Page: "https://www.w3.org/ns/activitystreams#Page", + Event: "https://www.w3.org/ns/activitystreams#Event", + Place: "https://www.w3.org/ns/activitystreams#Place", + accuracy: { + "@id": "https://www.w3.org/ns/activitystreams#accuracy", + "@type": "http://www.w3.org/2001/XMLSchema#float", + }, + altitude: { + "@id": "https://www.w3.org/ns/activitystreams#altitude", + "@type": "http://www.w3.org/2001/XMLSchema#float", + }, + latitude: { + "@id": "https://www.w3.org/ns/activitystreams#latitude", + "@type": "http://www.w3.org/2001/XMLSchema#float", + }, + radius: { + "@id": "https://www.w3.org/ns/activitystreams#radius", + "@type": "http://www.w3.org/2001/XMLSchema#float", + }, + unit: { + "@id": "https://www.w3.org/ns/activitystreams#unit", + }, + Mention: "https://www.w3.org/ns/activitystreams#Mention", + Profile: "https://www.w3.org/ns/activitystreams#Profile", + describes: { + "@id": "https://www.w3.org/ns/activitystreams#describes", + "@type": "@id", + }, + Tombstone: "https://www.w3.org/ns/activitystreams#Tombstone", + formerType: { + "@id": "https://www.w3.org/ns/activitystreams#formerType", + "@type": "@id", + "@container": "@set", + }, + deleted: { + "@id": "https://www.w3.org/ns/activitystreams#deleted", + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + }, + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface ActivityPubObject {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection.\r\n */\r\n type: {\r\n "@id": "Object";\r\n };\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Link {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [ RFC5988]. Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or Link. When a Link is used, it establishes a qualified relation connecting the subject (the containing object) to the resource identified by the href. Properties of the Link are properties of the reference as opposed to properties of the resource.\r\n */\r\n type: {\r\n "@id": "Link";\r\n };\r\n /**\r\n * The target resource pointed to by a Link.\r\n */\r\n href?: string;\r\n /**\r\n * A link relation associated with a Link. The value MUST conform to both the [HTML5] and [RFC5988] "link relation" definitions. In the [HTML5], any string not containing the "space" U+0020, "tab" (U+0009), "LF" (U+000A), "FF" (U+000C), "CR" (U+000D) or "," (U+002C) characters can be used as a valid link relation.\r\n */\r\n rel?: string[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * Hints as to the language used by the target resource. Value MUST be a [BCP47] Language-Tag.\r\n */\r\n hreflang?: string;\r\n /**\r\n * On a Link, specifies a hint as to the rendering height in device-independent pixels of the linked resource.\r\n */\r\n height?: number;\r\n /**\r\n * On a Link, specifies a hint as to the rendering width in device-independent pixels of the linked resource.\r\n */\r\n width?: number;\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Activity {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface InstransitiveActivity {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Instances of IntransitiveActivity are a subtype of Activity representing intransitive actions. The object property is therefore inappropriate for these activities.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "IntransitiveActivity";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Collection {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances. Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type. \r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Collection";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.\r\n */\r\n totalItems?: number;\r\n /**\r\n * Identifies the items contained in a collection. The items might be ordered or unordered. \r\n */\r\n items?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface OrderedCollection {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances. Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type. | A subtype of Collection in which members of the logical collection are assumed to always be strictly ordered.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Collection";\r\n } | {\r\n "@id": "OrderedCollection";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.\r\n */\r\n totalItems?: number;\r\n /**\r\n * Identifies the items contained in a collection. The items might be ordered or unordered. \r\n */\r\n items?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface CollectionPage {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances. Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type. | Used to represent distinct subsets of items from a Collection. Refer to the Activity Streams 2.0 Core for a complete description of the CollectionPage object.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Collection";\r\n } | {\r\n "@id": "CollectionPage";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.\r\n */\r\n totalItems?: number;\r\n /**\r\n * Identifies the items contained in a collection. The items might be ordered or unordered. \r\n */\r\n items?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface OrderedCollectionPage {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances. Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type. | A subtype of Collection in which members of the logical collection are assumed to always be strictly ordered. | Used to represent ordered subsets of items from an OrderedCollection. Refer to the Activity Streams 2.0 Core for a complete description of the OrderedCollectionPage object.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Collection";\r\n } | {\r\n "@id": "OrderedCollection";\r\n } | {\r\n "@id": "OrderedCollectionPage";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.\r\n */\r\n totalItems?: number;\r\n /**\r\n * Identifies the items contained in a collection. The items might be ordered or unordered. \r\n */\r\n items?: (ActivityPubObject | Link)[];\r\n /**\r\n * A non-negative integer value identifying the relative position within the logical view of a strictly ordered collection.\r\n */\r\n startIndex?: number;\r\n}\r\n\r\nexport interface Accept {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate the context into which the object has been accepted.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Accept";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface TentativeAccept {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate the context into which the object has been accepted. | A specialization of Accept indicating that the acceptance is tentative.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Accept";\r\n } | {\r\n "@id": "TentativeAccept";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Add {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has added the object to the target. If the target property is not explicitly specified, the target would need to be determined implicitly by context. The origin can be used to identify the context from which the object originated. \r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Add";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Arrive {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Instances of IntransitiveActivity are a subtype of Activity representing intransitive actions. The object property is therefore inappropriate for these activities. | An IntransitiveActivity that indicates that the actor has arrived at the location. The origin can be used to identify the context from which the actor originated. The target typically has no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "IntransitiveActivity";\r\n } | {\r\n "@id": "Arrive";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Create {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has created the object.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Create";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Delete {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has deleted the object. If specified, the origin indicates the context from which the object was deleted.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Delete";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Follow {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is "following" the object. Following is defined in the sense typically used within Social systems in which the actor is interested in any activity performed by or on the object. The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Follow";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Ignore {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is ignoring the object. The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Ignore";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Join {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has joined the object. The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Join";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Leave {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has left the object. The target and origin typically have no meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Leave";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Like {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor likes, recommends or endorses the object. The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Like";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Offer {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is offering the object. If specified, the target indicates the entity to which the object is being offered.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Offer";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Invite {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is offering the object. If specified, the target indicates the entity to which the object is being offered. | A specialization of Offer in which the actor is extending an invitation for the object to the target.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Offer";\r\n } | {\r\n "@id": "Invite";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Reject {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is rejecting the object. The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Reject";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface TentativeReject {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is rejecting the object. The target and origin typically have no defined meaning. | A specialization of Reject in which the rejection is considered tentative.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Reject";\r\n } | {\r\n "@id": "TentativeReject";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Remove {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is removing the object. If specified, the origin indicates the context from which the object is being removed.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Remove";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Undo {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is undoing the object. In most cases, the object will be an Activity describing some previously performed action (for instance, a person may have previously "liked" an article but, for whatever reason, might choose to undo that like at some later point in time). The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Undo";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Update {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism for describing the actual set of modifications made to object. The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Update";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface View {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has viewed the object.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "View";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Listen {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has listened to the object.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Listen";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Read {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has read the object.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Read";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Move {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor has moved object from origin to target. If the origin or target are not specified, either can be determined by context.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Move";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Travel {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Instances of IntransitiveActivity are a subtype of Activity representing intransitive actions. The object property is therefore inappropriate for these activities. | Indicates that the actor is traveling to target from origin. Travel is an IntransitiveObject whose actor specifies the direct object. If the target or origin are not specified, either can be determined by context.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "IntransitiveActivity";\r\n } | {\r\n "@id": "Travel";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Announce {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is calling the target\'s attention the object. The origin typically has no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Announce";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Block {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is ignoring the object. The target and origin typically have no defined meaning. | Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore. The typical use is to support social systems that allow one user to block activities or content of other users. The target and origin typically have no defined meaning.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Ignore";\r\n } | {\r\n "@id": "Block";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Flag {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor is "flagging" the object. Flagging is defined in the sense common to many social platforms as reporting content as being inappropriate for any number of reasons.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Flag";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Dislike {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Indicates that the actor dislikes the object.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "Dislike";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Question {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken. | Instances of IntransitiveActivity are a subtype of Activity representing intransitive actions. The object property is therefore inappropriate for these activities. | Represents a question being asked. Question objects are an extension of IntransitiveActivity. That is, the Question object is an Activity, but the direct object is the question itself and therefore it would not contain an object property. Either of the anyOf and oneOf properties MAY be used to express possible answers, but a Question object MUST NOT have both properties. \r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Activity";\r\n } | {\r\n "@id": "IntransitiveActivity";\r\n } | {\r\n "@id": "Question";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.\r\n */\r\n actor?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added. When used within a Relationship describes the entity to which the subject is related.\r\n */\r\n object?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John\'s wishlist. An activity can have more than one target.\r\n */\r\n target?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.\r\n */\r\n result?: (ActivityPubObject | Link)[];\r\n /**\r\n * Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A". \r\n */\r\n origin?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more objects used (or to be used) in the completion of an Activity.\r\n */\r\n instrument?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates that a question has been closed, and answers are no longer accepted.\r\n */\r\n closed?: (ActivityPubObject | Link | string | boolean)[];\r\n}\r\n\r\nexport interface Application {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Describes a software application.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Application";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Group {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a formal or informal collective of Actors.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Group";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Organization {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents an organization.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Organization";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Person {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents an individual person.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Person";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Service {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a service of any kind.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Service";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Relationship {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Describes a relationship between two individuals. The subject and object properties are used to identify the connected individuals. See 5.2 Representing Relationships Between Entities for additional information. \r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Relationship";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * On a Relationship object, the relationship property identifies the kind of relationship that exists between subject and object.\r\n */\r\n relationship?: (ActivityPubObject)[];\r\n}\r\n\r\nexport interface Article {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents any kind of multi-paragraph written work.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Article";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Document {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a document of any kind.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Document";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Audio {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a document of any kind. | Represents an audio document of any kind.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Document";\r\n } | {\r\n "@id": "Audio";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Image {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a document of any kind. | An image document of any kind\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Document";\r\n } | {\r\n "@id": "Image";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Video {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a document of any kind. | Represents a video document of any kind. \r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Document";\r\n } | {\r\n "@id": "Video";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Note {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a short written work typically less than a single paragraph in length.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Note";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Page {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a document of any kind. | Represents a Web Page.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Document";\r\n } | {\r\n "@id": "Page";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Event {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents any kind of event.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Event";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n}\r\n\r\nexport interface Place {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | Represents a logical or physical location. See 5.3 Representing Places for additional information.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Place";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * Indicates the accuracy of position coordinates on a Place objects. Expressed in properties of percentage. e.g. "94.0" means "94.0% accurate".\r\n */\r\n accuracy?: string;\r\n /**\r\n * Indicates the altitude of a place. The measurement units is indicated using the units property. If units is not specified, the default is assumed to be "m" indicating meters. \r\n */\r\n altitude?: string;\r\n /**\r\n * The latitude of a place | The longitude of a place\r\n */\r\n latitude?: (string | string)[];\r\n /**\r\n * The radius from the given latitude and longitude for a Place. The units is expressed by the units property. If units is not specified, the default is assumed to be "m" indicating "meters".\r\n */\r\n radius?: string;\r\n}\r\n\r\nexport interface Mention {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [ RFC5988]. Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or Link. When a Link is used, it establishes a qualified relation connecting the subject (the containing object) to the resource identified by the href. Properties of the Link are properties of the reference as opposed to properties of the resource. | A specialized Link that represents an @mention.\r\n */\r\n type: ({\r\n "@id": "Link";\r\n } | {\r\n "@id": "Mention";\r\n })[];\r\n /**\r\n * The target resource pointed to by a Link.\r\n */\r\n href?: string;\r\n /**\r\n * A link relation associated with a Link. The value MUST conform to both the [HTML5] and [RFC5988] "link relation" definitions. In the [HTML5], any string not containing the "space" U+0020, "tab" (U+0009), "LF" (U+000A), "FF" (U+000C), "CR" (U+000D) or "," (U+002C) characters can be used as a valid link relation.\r\n */\r\n rel?: string[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * Hints as to the language used by the target resource. Value MUST be a [BCP47] Language-Tag.\r\n */\r\n hreflang?: string;\r\n /**\r\n * On a Link, specifies a hint as to the rendering height in device-independent pixels of the linked resource.\r\n */\r\n height?: number;\r\n /**\r\n * On a Link, specifies a hint as to the rendering width in device-independent pixels of the linked resource.\r\n */\r\n width?: number;\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n}\r\n\r\nexport interface Profile {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | A Profile is a content object that describes another Object, typically used to describe Actor Type objects. The describes property is used to reference the object being described by the profile.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Profile";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * On a Profile object, the describes property identifies the object described by the Profile.\r\n */\r\n describes?: ActivityPubObject;\r\n}\r\n\r\nexport interface Tombstone {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Describes an object of any kind. The Object type serves as the base type for most of the other kinds of objects defined in the Activity Vocabulary, including other Core types such as Activity, IntransitiveActivity, Collection and OrderedCollection. | A Tombstone represents a content object that has been deleted. It can be used in Collections to signify that there used to be an object at this position, but it has been deleted.\r\n */\r\n type: ({\r\n "@id": "Object";\r\n } | {\r\n "@id": "Tombstone";\r\n })[];\r\n /**\r\n * Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.\r\n */\r\n attachment?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.\r\n */\r\n attributedTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.\r\n */\r\n audience?: (ActivityPubObject | Link)[];\r\n /**\r\n * The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The mediaType property can be used in the object to indicate a different content type. The content MAY be expressed using multiple language-tagged values. \r\n */\r\n content?: (string | string)[];\r\n /**\r\n * Identifies the context within which the object exists or an activity was performed. The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.\r\n */\r\n context?: (ActivityPubObject | Link)[];\r\n /**\r\n * A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.\r\n */\r\n name?: (string | string)[];\r\n /**\r\n * The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the endTime property specifies the moment the activity concluded or is expected to conclude.\r\n */\r\n endTime?: string;\r\n /**\r\n * Identifies the entity (e.g. an application) that generated the object. \r\n */\r\n generator?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.\r\n */\r\n icon?: (Image | Link)[];\r\n /**\r\n * Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.\r\n */\r\n image?: (Image | Link)[];\r\n /**\r\n * Indicates one or more entities for which this object is considered a response.\r\n */\r\n inReplyTo?: (ActivityPubObject | Link)[];\r\n /**\r\n * Indicates one or more physical or logical locations associated with the object.\r\n */\r\n location?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an entity that provides a preview of this object.\r\n */\r\n preview?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was published\r\n */\r\n published?: string;\r\n /**\r\n * Identifies a Collection containing objects considered to be responses to this object.\r\n */\r\n replies?: Collection;\r\n /**\r\n * The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the startTime property specifies the moment the activity began or is scheduled to begin.\r\n */\r\n startTime?: string;\r\n /**\r\n * A natural language summarization of the object encoded as HTML. Multiple language tagged summaries MAY be provided.\r\n */\r\n summary?: (string | string)[];\r\n /**\r\n * One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.\r\n */\r\n tag?: (ActivityPubObject | Link)[];\r\n /**\r\n * The date and time at which the object was updated\r\n */\r\n updated?: string;\r\n /**\r\n * Identifies one or more links to representations of the object\r\n */\r\n url?: (string | Link)[];\r\n /**\r\n * Identifies an entity considered to be part of the public primary audience of an Object\r\n */\r\n to?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the private primary audience of this Object.\r\n */\r\n bto?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies an Object that is part of the public secondary audience of this Object.\r\n */\r\n cc?: (ActivityPubObject | Link)[];\r\n /**\r\n * Identifies one or more Objects that are part of the private secondary audience of this Object.\r\n */\r\n bcc?: (ActivityPubObject | Link)[];\r\n /**\r\n * When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content.\r\n */\r\n mediaType?: string;\r\n /**\r\n * When the object describes a time-bound resource, such as an audio or video, a meeting, etc, the duration property indicates the object\'s approximate duration. The value MUST be expressed as an xsd:duration as defined by [ xmlschema11-2], section 3.3.6 (e.g. a period of 5 seconds is represented as "PT5S").\r\n */\r\n duration?: string;\r\n /**\r\n * On a Tombstone object, the formerType property identifies the type of the object that was deleted.\r\n */\r\n formerType?: (ActivityPubObject)[];\r\n /**\r\n * On a Tombstone object, the deleted property is a timestamp for when the object was deleted.\r\n */\r\n deleted?: string;\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/circular.ts b/packages/schema-converter-shex/test/testData/circular.ts new file mode 100644 index 0000000..2a9b559 --- /dev/null +++ b/packages/schema-converter-shex/test/testData/circular.ts @@ -0,0 +1,42 @@ +import type { TestData } from "./testData"; + +/** + * Circular + */ +export const circular: TestData = { + name: "circular", + shexc: ` + PREFIX example: + + example:ParentShape { + a [ example:Parent ]? ; + example:hasChild @example:ChildShape ; + } + + example:ChildShape { + a [ example:Child ]? ; + example:hasParent @example:ParentShape ; + } + `, + sampleTurtle: ` + @prefix example: . + + example:SampleParent + a example:Parent ; + example:hasChild example:SampleChild . + + example:SampleChild + a example:Child ; + example:hasParent example:SampleParent . + `, + baseNode: "http://example.com/SampleParent", + successfulContext: { + type: { "@id": "@type" }, + Parent: "http://example.com/Parent", + hasChild: { "@id": "http://example.com/hasChild", "@type": "@id" }, + Child: "http://example.com/Child", + hasParent: { "@id": "http://example.com/hasParent", "@type": "@id" }, + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface ParentShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n type?: {\r\n "@id": "Parent";\r\n };\r\n hasChild: ChildShape;\r\n}\r\n\r\nexport interface ChildShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n type?: {\r\n "@id": "Child";\r\n };\r\n hasParent: ParentShape;\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/extendsSimple.ts b/packages/schema-converter-shex/test/testData/extendsSimple.ts new file mode 100644 index 0000000..4e1c454 --- /dev/null +++ b/packages/schema-converter-shex/test/testData/extendsSimple.ts @@ -0,0 +1,43 @@ +import type { TestData } from "./testData"; + +/** + * Circular + */ +export const extendsSimple: TestData = { + name: "extends simple", + shexc: ` + PREFIX ex: + PREFIX foaf: + + ex:EntityShape { + ex:entityId . + } + + ex:PersonShape EXTENDS @ex:EntityShape { + foaf:name . + } + + ex:EmployeeShape EXTENDS @ex:PersonShape { + ex:employeeNumber . + } + `, + sampleTurtle: ` + @prefix example: . + + example:SampleParent + a example:Parent ; + example:hasChild example:SampleChild . + + example:SampleChild + a example:Child ; + example:hasParent example:SampleParent . + `, + baseNode: "http://example.com/SampleParent", + successfulContext: { + entityId: "https://example.com/entityId", + name: "http://xmlns.com/foaf/0.1/name", + employeeNumber: "https://example.com/employeeNumber", + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface EntityShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n entityId: any;\r\n}\r\n\r\nexport interface PersonShapeextends EntityShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n name: any;\r\n}\r\n\r\nexport interface EmployeeShapeextends PersonShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n employeeNumber: any;\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/oldExtends.ts b/packages/schema-converter-shex/test/testData/oldExtends.ts new file mode 100644 index 0000000..b1bd233 --- /dev/null +++ b/packages/schema-converter-shex/test/testData/oldExtends.ts @@ -0,0 +1,48 @@ +import type { TestData } from "./testData"; + +/** + * Circular + */ +export const oldExtends: TestData = { + name: "old extends", + shexc: ` + PREFIX ex: + PREFIX foaf: + + ex:EntityShape { + $ex:EntityRef ( + ex:entityId . + ) + } + + ex:PersonShape { + $ex:PersonRef ( + &ex:EntityRef ; + foaf:name . + ) + } + + ex:EmployeeShape EXTENDS @ex:PersonShape { + &ex:PersonRef ; + ex:employeeNumber . + } + `, + sampleTurtle: ` + @prefix ex: . + @prefix xsd: . + @prefix foaf: . + + ex:SampleEmployee + ex:entityId "123"^^xsd:integer ; + foaf:name "Jacko" ; + ex:employeeNumber "456"^^xsd:integer ; + `, + baseNode: "http://example.com/SampleParent", + successfulContext: { + entityId: "https://example.com/entityId", + name: "http://xmlns.com/foaf/0.1/name", + employeeNumber: "https://example.com/employeeNumber", + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface EntityShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n entityId: any;\r\n}\r\n\r\nexport interface PersonShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n entityId: any;\r\n name: any;\r\n}\r\n\r\nexport interface EmployeeShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n entityId: any;\r\n name: any;\r\n employeeNumber: any;\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/profile.ts b/packages/schema-converter-shex/test/testData/profile.ts new file mode 100644 index 0000000..f47abef --- /dev/null +++ b/packages/schema-converter-shex/test/testData/profile.ts @@ -0,0 +1,506 @@ +import type { TestData } from "./testData"; + +/** + * Profile + */ +export const profile: TestData = { + name: "profile", + shexc: ` +PREFIX srs: +PREFIX foaf: +PREFIX rdfs: +PREFIX schem: +PREFIX vcard: +PREFIX xsd: +PREFIX acl: +PREFIX cert: +PREFIX ldp: +PREFIX sp: +PREFIX solid: + +srs:SolidProfileShape EXTRA a { + a [ schem:Person ] + // rdfs:comment "Defines the node as a Person (from Schema.org)" ; + a [ foaf:Person ] + // rdfs:comment "Defines the node as a Person (from foaf)" ; + vcard:fn xsd:string ? + // rdfs:comment "The formatted name of a person. Example: John Smith" ; + foaf:name xsd:string ? + // rdfs:comment "An alternate way to define a person's name." ; + vcard:hasAddress @srs:AddressShape * + // rdfs:comment "The person's street address." ; + vcard:hasEmail @srs:EmailShape * + // rdfs:comment "The person's email." ; + vcard:hasPhoto IRI ? + // rdfs:comment "A link to the person's photo" ; + foaf:img xsd:string ? + // rdfs:comment "Photo link but in string form" ; + vcard:hasTelephone @srs:PhoneNumberShape * + // rdfs:comment "Person's telephone number" ; + vcard:phone xsd:string ? + // rdfs:comment "An alternative way to define a person's telephone number using a string" ; + vcard:organization-name xsd:string ? + // rdfs:comment "The name of the organization with which the person is affiliated" ; + vcard:role xsd:string ? + // rdfs:comment "The name of the person's role in their organization" ; + acl:trustedApp @srs:TrustedAppShape * + // rdfs:comment "A list of app origins that are trusted by this user" ; + cert:key @srs:RSAPublicKeyShape * + // rdfs:comment "A list of RSA public keys that are associated with private keys the user holds." ; + ldp:inbox IRI + // rdfs:comment "The user's LDP inbox to which apps can post notifications" ; + sp:preferencesFile IRI ? + // rdfs:comment "The user's preferences" ; + sp:storage IRI * + // rdfs:comment "The location of a Solid storage server related to this WebId" ; + solid:account IRI ? + // rdfs:comment "The user's account" ; + solid:privateTypeIndex IRI * + // rdfs:comment "A registry of all types used on the user's Pod (for private access only)" ; + solid:publicTypeIndex IRI * + // rdfs:comment "A registry of all types used on the user's Pod (for public access)" ; + foaf:knows IRI * + // rdfs:comment "A list of WebIds for all the people this user knows." ; +} + +srs:AddressShape { + vcard:country-name xsd:string ? + // rdfs:comment "The name of the user's country of residence" ; + vcard:locality xsd:string ? + // rdfs:comment "The name of the user's locality (City, Town etc.) of residence" ; + vcard:postal-code xsd:string ? + // rdfs:comment "The user's postal code" ; + vcard:region xsd:string ? + // rdfs:comment "The name of the user's region (State, Province etc.) of residence" ; + vcard:street-address xsd:string ? + // rdfs:comment "The user's street address" ; +} + +srs:EmailShape EXTRA a { + a [ + vcard:Dom + vcard:Home + vcard:ISDN + vcard:Internet + vcard:Intl + vcard:Label + vcard:Parcel + vcard:Postal + vcard:Pref + vcard:Work + vcard:X400 + ] ? + // rdfs:comment "The type of email." ; + vcard:value IRI + // rdfs:comment "The value of an email as a mailto link (Example )" ; +} + +srs:PhoneNumberShape EXTRA a { + a [ + vcard:Dom + vcard:Home + vcard:ISDN + vcard:Internet + vcard:Intl + vcard:Label + vcard:Parcel + vcard:Postal + vcard:Pref + vcard:Work + vcard:X400 + ] ? + // rdfs:comment "They type of Phone Number" ; + vcard:value IRI + // rdfs:comment "The value of a phone number as a tel link (Example )" ; +} + +srs:TrustedAppShape { + acl:mode [acl:Append acl:Control acl:Read acl:Write] + + // rdfs:comment "The level of access provided to this origin" ; + acl:origin IRI + // rdfs:comment "The app origin the user trusts" +} + +srs:RSAPublicKeyShape { + cert:modulus xsd:string + // rdfs:comment "RSA Modulus" ; + cert:exponent xsd:integer + // rdfs:comment "RSA Exponent" ; +} + `, + sampleTurtle: ` + @base . + @prefix : <#>. + @prefix acl: . + @prefix cert: . + @prefix foaf: . + @prefix ldp: . + @prefix meeting: . + @prefix schema: . + @prefix solid: . + @prefix space: . + @prefix vcard: . + @prefix wf: . + @prefix xsd: . + @prefix pub: . + @prefix c: . + @prefix pro: <./>. + @prefix inbox: . + @prefix j: . + @prefix c0: . + @prefix c1: . + @prefix c2: . + @prefix c3: . + @prefix c4: . + @prefix c5: . + @prefix c6: . + @prefix c7: . + @prefix pu: . + @prefix c8: . + @prefix publ: . + @prefix loc: . + @prefix sol: . + @prefix n0: . + @prefix n1: . + + pub:fd2af717 a meeting:LongChat; wf:participant c:me. + + pro:card a foaf:PersonalProfileDocument; foaf:maker :me; foaf:primaryTopic :me. + + :id1538406374276 a vcard:Postal; vcard:value . + + :id1538406392561 a vcard:Home; vcard:value . + + :id1555189453000 + vcard:country-name "United States"; + vcard:locality "Alpharetta"; + vcard:postal-code "30022"; + vcard:region "GA"; + vcard:street-address "610 Varina Way". + :me + a schema:Person, foaf:Person; + vcard:fn "Jackson Morgan"; + vcard:hasAddress :id1555189453000; + vcard:hasEmail :id1538406374276; + vcard:hasPhoto <_1564002423000_.jpeg>; + vcard:hasTelephone :id1538406392561; + vcard:organization-name "O"; + vcard:phone "6786999704"; + vcard:role "Software"; + acl:trustedApp + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin n1: + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin n0:localhost + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Control, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ], + [ + acl:mode acl:Append, acl:Read, acl:Write; + acl:origin + ]; + cert:key + [ + a cert:RSAPublicKey; + cert:exponent 65537; + cert:modulus + "AB564BF3F36A712A6D17CE87EE49185D802DAF82313C925D51E82ED618200CFDF1542717F41A6D39C01726967A40A170547B050540A089B61A4143DBD4E360EBAC6F086F37A40CDAE61F33AE2181A187B3BE861D9ABF8A439532D0B4DAAB83686508CFB88627F77A8F0D117231521AE095334B28CAEC8FD2928C8A29CB15C38C27DA8B9426478BFB00CED71FB1904C9B0D27E2C4FF9F37882A917BD54957D4D9215E3625B8E195CCF2E8B18A528F9E4D1A19E525AF54CDB0804599DA9786D210AA04821977C7AF8F9C03BA1094F695A19F3C4B52DE9FC11ED14616559FC1DE0C610FBDC0F0DE5D817C417A4A5E6AC3FCD1C7B3F6B574BAFBD36E4B23164CE7D9"^^xsd:hexBinary + ]; + ldp:inbox inbox:; + space:preferencesFile ; + space:storage j:; + solid:account j:; + solid:oidcIssuer loc:, sol:; + solid:oidcIssuerRegistrationToken "gx2hvELxRw5nYeBQMtdKm"; + solid:privateTypeIndex ; + solid:publicTypeIndex + , ; + foaf:img + "https://jackson.solid.community/profile/JacksonProfile_1555190418000_.png"; + foaf:knows pro:card, c0:me, c1:me, c2:me, c3:me, c4:me, c5:me, c6:me, c7:me; + foaf:name "Jackson". + pu:d3149ef5 a meeting:LongChat; wf:participant c8:me. + + publ:ab34c8d2 a meeting:LongChat; wf:participant c1:me, c2:me. + `, + baseNode: "https://jackson.solidcommunity.net/profile/card#me", + successfulContext: { + type: { "@id": "@type" }, + Person: "http://schema.org/Person", + Person2: "http://xmlns.com/foaf/0.1/Person", + fn: { + "@id": "http://www.w3.org/2006/vcard/ns#fn", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + name: { + "@id": "http://xmlns.com/foaf/0.1/name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + hasAddress: { + "@id": "http://www.w3.org/2006/vcard/ns#hasAddress", + "@type": "@id", + "@container": "@set", + }, + countryName: { + "@id": "http://www.w3.org/2006/vcard/ns#country-name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + locality: { + "@id": "http://www.w3.org/2006/vcard/ns#locality", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + postalCode: { + "@id": "http://www.w3.org/2006/vcard/ns#postal-code", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + region: { + "@id": "http://www.w3.org/2006/vcard/ns#region", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + streetAddress: { + "@id": "http://www.w3.org/2006/vcard/ns#street-address", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + hasEmail: { + "@id": "http://www.w3.org/2006/vcard/ns#hasEmail", + "@type": "@id", + "@container": "@set", + }, + Dom: "http://www.w3.org/2006/vcard/ns#Dom", + Home: "http://www.w3.org/2006/vcard/ns#Home", + ISDN: "http://www.w3.org/2006/vcard/ns#ISDN", + Internet: "http://www.w3.org/2006/vcard/ns#Internet", + Intl: "http://www.w3.org/2006/vcard/ns#Intl", + Label: "http://www.w3.org/2006/vcard/ns#Label", + Parcel: "http://www.w3.org/2006/vcard/ns#Parcel", + Postal: "http://www.w3.org/2006/vcard/ns#Postal", + Pref: "http://www.w3.org/2006/vcard/ns#Pref", + Work: "http://www.w3.org/2006/vcard/ns#Work", + X400: "http://www.w3.org/2006/vcard/ns#X400", + value: { + "@id": "http://www.w3.org/2006/vcard/ns#value", + "@type": "@id", + }, + hasPhoto: { + "@id": "http://www.w3.org/2006/vcard/ns#hasPhoto", + "@type": "@id", + }, + img: { + "@id": "http://xmlns.com/foaf/0.1/img", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + hasTelephone: { + "@id": "http://www.w3.org/2006/vcard/ns#hasTelephone", + "@type": "@id", + "@container": "@set", + }, + phone: { + "@id": "http://www.w3.org/2006/vcard/ns#phone", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + organizationName: { + "@id": "http://www.w3.org/2006/vcard/ns#organization-name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + role: { + "@id": "http://www.w3.org/2006/vcard/ns#role", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + trustedApp: { + "@id": "http://www.w3.org/ns/auth/acl#trustedApp", + "@type": "@id", + "@container": "@set", + }, + mode: { "@id": "http://www.w3.org/ns/auth/acl#mode", "@container": "@set" }, + Append: "http://www.w3.org/ns/auth/acl#Append", + Control: "http://www.w3.org/ns/auth/acl#Control", + Read: "http://www.w3.org/ns/auth/acl#Read", + Write: "http://www.w3.org/ns/auth/acl#Write", + origin: { "@id": "http://www.w3.org/ns/auth/acl#origin", "@type": "@id" }, + key: { + "@id": "http://www.w3.org/ns/auth/cert#key", + "@type": "@id", + "@container": "@set", + }, + modulus: { + "@id": "http://www.w3.org/ns/auth/cert#modulus", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + exponent: { + "@id": "http://www.w3.org/ns/auth/cert#exponent", + "@type": "http://www.w3.org/2001/XMLSchema#integer", + }, + inbox: { "@id": "http://www.w3.org/ns/ldp#inbox", "@type": "@id" }, + preferencesFile: { + "@id": "http://www.w3.org/ns/pim/space#preferencesFile", + "@type": "@id", + }, + storage: { + "@id": "http://www.w3.org/ns/pim/space#storage", + "@type": "@id", + "@container": "@set", + }, + account: { + "@id": "http://www.w3.org/ns/solid/terms#account", + "@type": "@id", + }, + privateTypeIndex: { + "@id": "http://www.w3.org/ns/solid/terms#privateTypeIndex", + "@type": "@id", + "@container": "@set", + }, + publicTypeIndex: { + "@id": "http://www.w3.org/ns/solid/terms#publicTypeIndex", + "@type": "@id", + "@container": "@set", + }, + knows: { + "@id": "http://xmlns.com/foaf/0.1/knows", + "@type": "@id", + "@container": "@set", + }, + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface SolidProfileShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Defines the node as a Person (from Schema.org) | Defines the node as a Person (from foaf)\r\n */\r\n type: ({\r\n "@id": "Person";\r\n } | {\r\n "@id": "Person2";\r\n })[];\r\n /**\r\n * The formatted name of a person. Example: John Smith\r\n */\r\n fn?: string;\r\n /**\r\n * An alternate way to define a person\'s name.\r\n */\r\n name?: string;\r\n /**\r\n * The person\'s street address.\r\n */\r\n hasAddress?: (AddressShape)[];\r\n /**\r\n * The person\'s email.\r\n */\r\n hasEmail?: (EmailShape)[];\r\n /**\r\n * A link to the person\'s photo\r\n */\r\n hasPhoto?: {\r\n "@id": string;\r\n };\r\n /**\r\n * Photo link but in string form\r\n */\r\n img?: string;\r\n /**\r\n * Person\'s telephone number\r\n */\r\n hasTelephone?: (PhoneNumberShape)[];\r\n /**\r\n * An alternative way to define a person\'s telephone number using a string\r\n */\r\n phone?: string;\r\n /**\r\n * The name of the organization with which the person is affiliated\r\n */\r\n organizationName?: string;\r\n /**\r\n * The name of the person\'s role in their organization\r\n */\r\n role?: string;\r\n /**\r\n * A list of app origins that are trusted by this user\r\n */\r\n trustedApp?: (TrustedAppShape)[];\r\n /**\r\n * A list of RSA public keys that are associated with private keys the user holds.\r\n */\r\n key?: (RSAPublicKeyShape)[];\r\n /**\r\n * The user\'s LDP inbox to which apps can post notifications\r\n */\r\n inbox: {\r\n "@id": string;\r\n };\r\n /**\r\n * The user\'s preferences\r\n */\r\n preferencesFile?: {\r\n "@id": string;\r\n };\r\n /**\r\n * The location of a Solid storage server related to this WebId\r\n */\r\n storage?: {\r\n "@id": string;\r\n }[];\r\n /**\r\n * The user\'s account\r\n */\r\n account?: {\r\n "@id": string;\r\n };\r\n /**\r\n * A registry of all types used on the user\'s Pod (for private access only)\r\n */\r\n privateTypeIndex?: {\r\n "@id": string;\r\n }[];\r\n /**\r\n * A registry of all types used on the user\'s Pod (for public access)\r\n */\r\n publicTypeIndex?: {\r\n "@id": string;\r\n }[];\r\n /**\r\n * A list of WebIds for all the people this user knows.\r\n */\r\n knows?: {\r\n "@id": string;\r\n }[];\r\n}\r\n\r\nexport interface AddressShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * The name of the user\'s country of residence\r\n */\r\n countryName?: string;\r\n /**\r\n * The name of the user\'s locality (City, Town etc.) of residence\r\n */\r\n locality?: string;\r\n /**\r\n * The user\'s postal code\r\n */\r\n postalCode?: string;\r\n /**\r\n * The name of the user\'s region (State, Province etc.) of residence\r\n */\r\n region?: string;\r\n /**\r\n * The user\'s street address\r\n */\r\n streetAddress?: string;\r\n}\r\n\r\nexport interface EmailShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * The type of email.\r\n */\r\n type?: {\r\n "@id": "Dom";\r\n } | {\r\n "@id": "Home";\r\n } | {\r\n "@id": "ISDN";\r\n } | {\r\n "@id": "Internet";\r\n } | {\r\n "@id": "Intl";\r\n } | {\r\n "@id": "Label";\r\n } | {\r\n "@id": "Parcel";\r\n } | {\r\n "@id": "Postal";\r\n } | {\r\n "@id": "Pref";\r\n } | {\r\n "@id": "Work";\r\n } | {\r\n "@id": "X400";\r\n };\r\n /**\r\n * The value of an email as a mailto link (Example )\r\n */\r\n value: {\r\n "@id": string;\r\n };\r\n}\r\n\r\nexport interface PhoneNumberShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * They type of Phone Number\r\n */\r\n type?: {\r\n "@id": "Dom";\r\n } | {\r\n "@id": "Home";\r\n } | {\r\n "@id": "ISDN";\r\n } | {\r\n "@id": "Internet";\r\n } | {\r\n "@id": "Intl";\r\n } | {\r\n "@id": "Label";\r\n } | {\r\n "@id": "Parcel";\r\n } | {\r\n "@id": "Postal";\r\n } | {\r\n "@id": "Pref";\r\n } | {\r\n "@id": "Work";\r\n } | {\r\n "@id": "X400";\r\n };\r\n /**\r\n * The value of a phone number as a tel link (Example )\r\n */\r\n value: {\r\n "@id": string;\r\n };\r\n}\r\n\r\nexport interface TrustedAppShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * The level of access provided to this origin\r\n */\r\n mode: ({\r\n "@id": "Append";\r\n } | {\r\n "@id": "Control";\r\n } | {\r\n "@id": "Read";\r\n } | {\r\n "@id": "Write";\r\n })[];\r\n /**\r\n * The app origin the user trusts\r\n */\r\n origin: {\r\n "@id": string;\r\n };\r\n}\r\n\r\nexport interface RSAPublicKeyShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * RSA Modulus\r\n */\r\n modulus: string;\r\n /**\r\n * RSA Exponent\r\n */\r\n exponent: number;\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/reducedProfile.ts b/packages/schema-converter-shex/test/testData/reducedProfile.ts new file mode 100644 index 0000000..5528dc0 --- /dev/null +++ b/packages/schema-converter-shex/test/testData/reducedProfile.ts @@ -0,0 +1,81 @@ +import type { TestData } from "./testData"; + +/** + * Reduced Profile + */ +export const reducedProfile: TestData = { + name: "reduced profile", + shexc: ` +PREFIX srs: +PREFIX foaf: +PREFIX rdfs: +PREFIX schem: +PREFIX vcard: +PREFIX xsd: +PREFIX acl: +PREFIX cert: +PREFIX ldp: +PREFIX sp: +PREFIX solid: + +srs:SolidProfileShape EXTRA a { + a [ schem:Person ] + // rdfs:comment "Defines the node as a Person" ; + a [ foaf:Person ] + // rdfs:comment "Defines the node as a Person" ; + vcard:hasEmail @srs:EmailShape * + // rdfs:comment "The person's email." ; + foaf:name xsd:string ? + // rdfs:comment "An alternate way to define a person's name" ; +} + +srs:EmailShape EXTRA a { + a [ + vcard:Dom + vcard:Home + vcard:ISDN + vcard:Internet + vcard:Intl + vcard:Label + vcard:Parcel + vcard:Postal + vcard:Pref + vcard:Work + vcard:X400 + ] ? + // rdfs:comment "The type of email." ; + vcard:value IRI + // rdfs:comment "The value of an email as a mailto link (Example )" ; +} + `, + sampleTurtle: ``, + baseNode: "", + successfulContext: { + type: { "@id": "@type" }, + Person: "http://schema.org/Person", + Person2: "http://xmlns.com/foaf/0.1/Person", + hasEmail: { + "@id": "http://www.w3.org/2006/vcard/ns#hasEmail", + "@type": "@id", + "@container": "@set", + }, + Dom: "http://www.w3.org/2006/vcard/ns#Dom", + Home: "http://www.w3.org/2006/vcard/ns#Home", + ISDN: "http://www.w3.org/2006/vcard/ns#ISDN", + Internet: "http://www.w3.org/2006/vcard/ns#Internet", + Intl: "http://www.w3.org/2006/vcard/ns#Intl", + Label: "http://www.w3.org/2006/vcard/ns#Label", + Parcel: "http://www.w3.org/2006/vcard/ns#Parcel", + Postal: "http://www.w3.org/2006/vcard/ns#Postal", + Pref: "http://www.w3.org/2006/vcard/ns#Pref", + Work: "http://www.w3.org/2006/vcard/ns#Work", + X400: "http://www.w3.org/2006/vcard/ns#X400", + value: { "@id": "http://www.w3.org/2006/vcard/ns#value", "@type": "@id" }, + name: { + "@id": "http://xmlns.com/foaf/0.1/name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface SolidProfileShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * Defines the node as a Person | Defines the node as a Person\r\n */\r\n type: ({\r\n "@id": "Person";\r\n } | {\r\n "@id": "Person2";\r\n })[];\r\n /**\r\n * The person\'s email.\r\n */\r\n hasEmail?: (EmailShape)[];\r\n /**\r\n * An alternate way to define a person\'s name\r\n */\r\n name?: string;\r\n}\r\n\r\nexport interface EmailShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n /**\r\n * The type of email.\r\n */\r\n type?: {\r\n "@id": "Dom";\r\n } | {\r\n "@id": "Home";\r\n } | {\r\n "@id": "ISDN";\r\n } | {\r\n "@id": "Internet";\r\n } | {\r\n "@id": "Intl";\r\n } | {\r\n "@id": "Label";\r\n } | {\r\n "@id": "Parcel";\r\n } | {\r\n "@id": "Postal";\r\n } | {\r\n "@id": "Pref";\r\n } | {\r\n "@id": "Work";\r\n } | {\r\n "@id": "X400";\r\n };\r\n /**\r\n * The value of an email as a mailto link (Example )\r\n */\r\n value: {\r\n "@id": string;\r\n };\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/reusedPredicates.ts b/packages/schema-converter-shex/test/testData/reusedPredicates.ts new file mode 100644 index 0000000..9b0702b --- /dev/null +++ b/packages/schema-converter-shex/test/testData/reusedPredicates.ts @@ -0,0 +1,60 @@ +import type { TestData } from "./testData"; + +/** + * Reused Predicate + */ +export const reusedPredicates: TestData = { + name: "reused predicates", + shexc: ` + PREFIX app: + PREFIX rdf: + PREFIX xsd: + + app:DocumentShape { + rdf:type [ app:Document ] ; + app:vocabulary @app:VocabularyShape* ; + app:law @app:LawShape ; + } + + app:LawShape { + rdf:type [ app:Law ] ; + app:name xsd:string ; + app:path IRI ; + } + + app:VocabularyShape { + rdf:type [ app:Vocabulary ] ; + app:name xsd:string ; + app:path IRI ; + } + `, + sampleTurtle: ``, + baseNode: "http://example.com/SampleParent", + successfulContext: { + type: { "@id": "@type" }, + Document: "https://www.forsakringskassan.se/vocabs/fk-sem-poc.ttl#Document", + vocabulary: { + "@id": + "https://www.forsakringskassan.se/vocabs/fk-sem-poc.ttl#vocabulary", + "@type": "@id", + "@container": "@set", + }, + Vocabulary: + "https://www.forsakringskassan.se/vocabs/fk-sem-poc.ttl#Vocabulary", + name: { + "@id": "https://www.forsakringskassan.se/vocabs/fk-sem-poc.ttl#name", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + path: { + "@id": "https://www.forsakringskassan.se/vocabs/fk-sem-poc.ttl#path", + "@type": "@id", + }, + law: { + "@id": "https://www.forsakringskassan.se/vocabs/fk-sem-poc.ttl#law", + "@type": "@id", + }, + Law: "https://www.forsakringskassan.se/vocabs/fk-sem-poc.ttl#Law", + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface DocumentShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n type: {\r\n "@id": "Document";\r\n };\r\n vocabulary?: (VocabularyShape)[];\r\n law: LawShape;\r\n}\r\n\r\nexport interface LawShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n type: {\r\n "@id": "Law";\r\n };\r\n name: string;\r\n path: {\r\n "@id": string;\r\n };\r\n}\r\n\r\nexport interface VocabularyShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n type: {\r\n "@id": "Vocabulary";\r\n };\r\n name: string;\r\n path: {\r\n "@id": string;\r\n };\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/simple.ts b/packages/schema-converter-shex/test/testData/simple.ts new file mode 100644 index 0000000..cc14a50 --- /dev/null +++ b/packages/schema-converter-shex/test/testData/simple.ts @@ -0,0 +1,50 @@ +import type { TestData } from "./testData"; + +/** + * SIMPLE + */ +export const simple: TestData = { + name: "simple", + shexc: ` + PREFIX foaf: + PREFIX xsd: + PREFIX example: + + example:EmployeeShape { # An has: + foaf:givenName xsd:string+, # at least one givenName. + foaf:familyName xsd:string, # one familyName. + foaf:phone IRI*, # any number of phone numbers. + foaf:mbox IRI # one FOAF mbox. + } + `, + sampleTurtle: ` + @prefix foaf: . + @prefix xsd: . + + foaf:givenName "Robert"^^xsd:string, "Taylor"^^xsd:string ; + foaf:familyName "Johnson"^^xsd:string ; + # no phone number needed + foaf:mbox + . + `, + baseNode: "http://a.example/Employee7", + successfulContext: { + givenName: { + "@id": "http://xmlns.com/foaf/0.1/givenName", + "@type": "http://www.w3.org/2001/XMLSchema#string", + "@container": "@set", + }, + familyName: { + "@id": "http://xmlns.com/foaf/0.1/familyName", + "@type": "http://www.w3.org/2001/XMLSchema#string", + }, + phone: { + "@id": "http://xmlns.com/foaf/0.1/phone", + "@type": "@id", + "@container": "@set", + }, + mbox: { "@id": "http://xmlns.com/foaf/0.1/mbox", "@type": "@id" }, + }, + successfulTypings: + 'import {ContextDefinition} from "jsonld"\n\nexport interface EmployeeShape {\n "@id"?: string;\r\n "@context"?: ContextDefinition;\r\n givenName: string[];\r\n familyName: string;\r\n phone?: {\r\n "@id": string;\r\n }[];\r\n mbox: {\r\n "@id": string;\r\n };\r\n}\r\n\r\n', +}; diff --git a/packages/schema-converter-shex/test/testData/testData.ts b/packages/schema-converter-shex/test/testData/testData.ts new file mode 100644 index 0000000..e5e6476 --- /dev/null +++ b/packages/schema-converter-shex/test/testData/testData.ts @@ -0,0 +1,29 @@ +import type { ContextDefinition } from "jsonld"; +import { activityPub } from "./activityPub"; +import { circular } from "./circular"; +import { profile } from "./profile"; +import { reducedProfile } from "./reducedProfile"; +import { simple } from "./simple"; +import { extendsSimple } from "./extendsSimple"; +import { reusedPredicates } from "./reusedPredicates"; +// import { oldExtends } from "./oldExtends"; + +export interface TestData { + name: string; + shexc: string; + sampleTurtle: string; + baseNode: string; + successfulContext: ContextDefinition; + successfulTypings: string; +} + +export const testData: TestData[] = [ + simple, + circular, + profile, + reducedProfile, + activityPub, + extendsSimple, + // oldExtends, + reusedPredicates, +]; diff --git a/packages/schema-converter-shex/test/typing.test.ts b/packages/schema-converter-shex/test/typing.test.ts new file mode 100644 index 0000000..6321e26 --- /dev/null +++ b/packages/schema-converter-shex/test/typing.test.ts @@ -0,0 +1,16 @@ +import parser from "@shexjs/parser"; +import { testData } from "./testData/testData"; +import { shexjToTyping } from "../src/typing/shexjToTyping"; +import type { Schema } from "shexj"; + +describe("typing", () => { + testData.forEach(({ name, shexc, successfulTypings }) => { + it(`Creates a typings for ${name}`, async () => { + const schema: Schema = parser + .construct("https://ldo.js.org/") + .parse(shexc); + const [typings] = await shexjToTyping(schema); + expect(typings.typingsString).toBe(successfulTypings); + }); + }); +}); diff --git a/packages/schema-converter-shex/tsconfig.build.json b/packages/schema-converter-shex/tsconfig.build.json new file mode 100644 index 0000000..ce7be9c --- /dev/null +++ b/packages/schema-converter-shex/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": ["./src"] +} \ No newline at end of file