{"_id":"@dokieli/notifications","_rev":"3-47292a33c3992c69b77896cb5600dbb1","name":"@dokieli/notifications","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@dokieli/notifications","version":"1.0.0","keywords":["activitypub","activitystreams","consumer","inbox","json-ld","ldn","linked data","linked data notifications","messaging","notifications","protocol","rdfa","sender","typescript","w3c"],"author":{"name":"dokieli"},"license":"Apache-2.0","_id":"@dokieli/notifications@1.0.0","maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"homepage":"https://dokieli.github.io/notifications/","bugs":{"url":"https://github.com/dokieli/notifications/issues"},"dist":{"shasum":"c5a3dc37e11670aa4f7effeeeebca815693ffa1b","tarball":"https://registry.npmjs.org/@dokieli/notifications/-/notifications-1.0.0.tgz","fileCount":33,"integrity":"sha512-zQQYC87xUru6mx/RxslKgr4OkrsfH17nDrtgVJ3wMcavcl2g6aKXYimpafVoEpjd5/VArAIg27jw5qtVcdqIvg==","signatures":[{"sig":"MEUCIQCjCvDfX87Ecg/nKuYiXnlh6uhLT2KXizpHcSXGVa9s7wIgWHd06n87yXFJR6/fGw9tk/0en15cXGC8RDCqPLip/DE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96666},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"726e4830ca56d87d97f6283daa41b3d91031eb65","scripts":{"docs":"typedoc","lint":"eslint .","test":"vitest run","build":"tsc","prepare":"tsc","lint:fix":"eslint . --fix","test:all":"vitest run && tsc --noEmit"},"_npmUser":{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},"repository":{"url":"git+https://github.com/dokieli/notifications.git","type":"git"},"_npmVersion":"10.9.0","description":"W3C Linked Data Notifications (LDN) implementation of the Sender and Consumer roles, using the Activity Vocabulary and ActivityStreams 2.0 (AS2) as compacted JSON-LD, with support for HTML+RDFa serialization. The library allows clients to use their own pa","directories":{},"_nodeVersion":"22.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@4.17.0","devDependencies":{"eslint":"^10.6.0","vitest":"^3.0.0","typedoc":"^0.28.20","typescript":"^6.0.2","@types/node":"^25.5.2","@typescript-eslint/parser":"^8.63.0","eslint-plugin-license-header":"^0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/notifications_1.0.0_1785858728218_0.17399832126689807","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dokieli/notifications","version":"1.0.1","keywords":["activitypub","activitystreams","consumer","inbox","json-ld","ldn","linked data","linked data notifications","messaging","notifications","protocol","rdfa","sender","typescript","w3c"],"author":{"name":"dokieli"},"license":"Apache-2.0","_id":"@dokieli/notifications@1.0.1","maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"homepage":"https://dokieli.github.io/notifications/","bugs":{"url":"https://github.com/dokieli/notifications/issues"},"dist":{"shasum":"6f76899b048fb0934906537771454b45a207f920","tarball":"https://registry.npmjs.org/@dokieli/notifications/-/notifications-1.0.1.tgz","fileCount":33,"integrity":"sha512-w5zoApmmLPVieCn8w7UNjnG1PPf1xltUNCCmHBuhhN/HlnluMQ7XaKX4llzzboO/xFEjK9Ue2RrdkpEjhZ2f7A==","signatures":[{"sig":"MEQCIH2L2OKMie2NmqP5URTNWYN0E7Bw5E3fnDU+hOzbmGzUAiBu7pp5Icf/ArV6E9/5NIIm1SsvyFwULh4utGZKNnTHMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dokieli%2fnotifications@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":96801},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d57c693fbebde2781d73f29afec61514778135de","scripts":{"docs":"typedoc","lint":"eslint .","test":"vitest run","build":"tsc","prepare":"tsc","lint:fix":"eslint . --fix","test:all":"vitest run && tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58e26400-5a3f-4002-a6d1-d8457e5b0475"}},"repository":{"url":"git+https://github.com/dokieli/notifications.git","type":"git"},"_npmVersion":"11.16.0","description":"W3C Linked Data Notifications (LDN) implementation of the Sender and Consumer roles, using the Activity Vocabulary and ActivityStreams 2.0 (AS2) as compacted JSON-LD, with support for HTML+RDFa serialization. The library allows clients to use their own pa","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@4.17.0","devDependencies":{"eslint":"^10.6.0","vitest":"^3.0.0","typedoc":"^0.28.20","typescript":"^6.0.2","@types/node":"^25.5.2","@typescript-eslint/parser":"^8.63.0","eslint-plugin-license-header":"^0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/notifications_1.0.1_1786367288674_0.12106149283393974","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@dokieli/notifications","version":"1.1.0","description":"W3C Linked Data Notifications (LDN) implementation of the Sender and Consumer roles, using the Activity Vocabulary and ActivityStreams 2.0 (AS2) as compacted JSON-LD, with support for HTML+RDFa serialization. The library allows clients to use their own pa","type":"module","packageManager":"yarn@4.17.0","author":{"name":"dokieli"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/dokieli/notifications.git"},"bugs":{"url":"https://github.com/dokieli/notifications/issues"},"homepage":"https://dokieli.github.io/notifications/","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","docs":"typedoc","prepare":"tsc","lint":"eslint .","lint:fix":"eslint . --fix","test":"vitest run","test:all":"vitest run && tsc --noEmit"},"keywords":["activitypub","activitystreams","consumer","inbox","json-ld","ldn","linked data","linked data notifications","messaging","notifications","protocol","rdfa","sender","typescript","w3c"],"devDependencies":{"@types/jsonld":"^1.5.15","@types/node":"^25.5.2","@typescript-eslint/parser":"^8.63.0","eslint":"^10.6.0","eslint-plugin-license-header":"^0.9.0","typedoc":"^0.28.20","typescript":"^6.0.2","vitest":"^3.0.0"},"dependencies":{"jsonld":"^9.0.0"},"gitHead":"c9e3225224905dc900d6022e1276c3d06b37f17d","_id":"@dokieli/notifications@1.1.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-7kYWJY4lclCIolK8iEcpubSormUL1entdP7qHN52xAu5LKudYPldudGMz5RyZUzn2tcSLcPTRJAhzDIOigtpBw==","shasum":"cb5c3d4d7ab268111bf3145e7da6d6b97290b426","tarball":"https://registry.npmjs.org/@dokieli/notifications/-/notifications-1.1.0.tgz","fileCount":39,"unpackedSize":127742,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dokieli%2fnotifications@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDqCHvmfNoIFBDOlKydnXMwfVG53CTnZLptqjN+HVgWBAiANoYB3H9Di3nUtolDHgd52VswqJAJst8ABP87ahestIg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58e26400-5a3f-4002-a6d1-d8457e5b0475"}},"directories":{},"maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/notifications_1.1.0_1786375561034_0.9327750975926747"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T15:52:07.953Z","modified":"2026-08-10T15:26:01.594Z","1.0.0":"2026-08-04T15:52:08.348Z","1.0.1":"2026-08-10T13:08:08.820Z","1.1.0":"2026-08-10T15:26:01.210Z"},"bugs":{"url":"https://github.com/dokieli/notifications/issues"},"author":{"name":"dokieli"},"license":"Apache-2.0","homepage":"https://dokieli.github.io/notifications/","keywords":["activitypub","activitystreams","consumer","inbox","json-ld","ldn","linked data","linked data notifications","messaging","notifications","protocol","rdfa","sender","typescript","w3c"],"repository":{"type":"git","url":"git+https://github.com/dokieli/notifications.git"},"description":"W3C Linked Data Notifications (LDN) implementation of the Sender and Consumer roles, using the Activity Vocabulary and ActivityStreams 2.0 (AS2) as compacted JSON-LD, with support for HTML+RDFa serialization. The library allows clients to use their own pa","maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"readme":"# @dokieli/notifications\n\nW3C [Linked Data Notifications](https://www.w3.org/TR/ldn/) (LDN) implementation of Sender and Consumer roles, and implements [Activity Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/) and [Activity Streams 2.0](https://www.w3.org/TR/activitystreams-core/) (AS2) compacted JSON-LD, with support for HTML+RDFa serialization. The library allows clients to use their own parsers and own notification payloads.\n\n* [Code of Conduct](https://github.com/dokieli/notifications/blob/main/CODE-OF-CONDUCT.md)\n* [Contributing Guide](https://github.com/dokieli/notifications/blob/main/CONTRIBUTING.md)\n* [API Reference](https://dokieli.github.io/notifications/)\n* [Security Policy](https://github.com/dokieli/notifications/blob/main/SECURITY.md)\n\n## License\n\n* Source code is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n* Unless otherwise noted, images and other media assets are licensed under the [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/).\n\n## Installation\n\n```sh\nnpm install @dokieli/notifications\n```\n\nor\n\n```sh\nyarn install @dokieli/notifications\n```\n\n```js\nimport { createNotification, serializeNotificationToJSONLD, serializeNotificationToHTML, sendNotification } from '@dokieli/notifications';\n\nconst notification = createNotification({\n  type: 'Announce',\n  actor: { id: 'https://example.org/profile#me', name: 'Virginia' },\n  object: 'https://example.org/annotations/1',\n  target: 'https://example.org/article'\n});\n\nconst jsonld = serializeNotificationToJSONLD(notification);\nconst html = serializeNotificationToHTML(notification);\n\n/* Discovers the target's inbox, negotiates via Accept-Post, serializes, POSTs */\nconst result = await sendNotification('https://example.org/article', notification);\n```\n\n```js\nimport { getNotifications } from '@dokieli/notifications';\n\nfor await (const { iri, notification } of getNotifications('https://example.org/inbox/')) {\n  console.log(iri, notification?.type);\n}\n```\n\n## Documentation\n\nSee [API Reference](https://dokieli.github.io/notifications/) and [Examples](https://github.com/dokieli/notifications/blob/main/examples/).\n\n## Features\n\n* Built-in inbox discovery for `ldp:inbox` (LDN) and `as:inbox` (ActivityPub), or client-preferred inbox property.\n* Sending server-supported media types for notifications by checking `Accept-Post`.\n* Support for reading inbox items via `ldp:contains` and `as:items`, and AS2 pagination.\n* Activity Streams 2.0 notification model, serialized to JSON-LD and HTML+RDFa.\n* Embedding caller-supplied object payloads verbatim (JSON-LD or HTML+RDFa).\n* Authentication left to the caller via an injected `fetch`.\n* Built-in JSON-LD processing.\n* Support for reading additional serializations via a caller-supplied parser.\n\n## Specifications\n\n* W3C [Linked Data Notifications](https://www.w3.org/TR/ldn/)\n* W3C [Activity Streams 2.0](https://www.w3.org/TR/activitystreams-core/)\n* W3C [Activity Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/)\n\n## Supported By\n\n* This project was funded by [NLnet](https://nlnet.nl/) (2025-09–2026-08) as part of [NLnet Dokieli Collaborative](https://nlnet.nl/project/Dokieli-Collaborative/).\n\n## Support the project\n\nHelp the project grow by sponsoring it on [Open Collective](https://opencollective.com/dokieli/) or reach out to us.\n","readmeFilename":"README.md"}