{"_id":"@roam-research/roam-api-sdk","_rev":"9-d4877a608a454804bc3039ed950855e9","name":"@roam-research/roam-api-sdk","dist-tags":{"latest":"0.10.0"},"versions":{"0.0.2":{"name":"@roam-research/roam-api-sdk","version":"0.0.2","keywords":[],"author":{"name":"Roam Research"},"license":"ISC","_id":"@roam-research/roam-api-sdk@0.0.2","maintainers":[{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},{"name":"brownjoshua490","email":"josh@roamresearch.com"}],"homepage":"https://github.com/Roam-Research/backend-sdks#readme","bugs":{"url":"https://github.com/Roam-Research/backend-sdks/issues"},"dist":{"shasum":"fdc801a9715036ef069a14299a89a4ba3d8eb0c1","tarball":"https://registry.npmjs.org/@roam-research/roam-api-sdk/-/roam-api-sdk-0.0.2.tgz","fileCount":3,"integrity":"sha512-1Gsw4VXJXbuIKInZLhxH7FVaoHaNmSbOtmNI6a8Ve20qnGqTP555IUJdYL8vX2ehNbtz67rqaBcJHtc6NYM3qg==","signatures":[{"sig":"MEQCID5/Y+IE5H9wty+VnJ0YfK5F5NEXTgQFyaI/AYlvu601AiAN/T770EUyj+H+F0OUL0vKvfeOUVMSsDJJbsVPz2FFvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5739},"main":"dist/roamapisdk.js","gitHead":"ce341a6e06d75c1613a57c6bf7bb05711aa6b5e3","scripts":{"lint":"eslint . --ext .ts","build":"webpack --config webpack.prod.js --mode production","develop":"webpack-dev-server --config webpack.dev.js --mode development","prepare":"webpack --config webpack.prod.js --mode production"},"_npmUser":{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},"repository":{"url":"git+https://github.com/Roam-Research/backend-sdks.git","type":"git"},"_npmVersion":"8.19.4","description":"SDK to use Roam Reasearch API.","directories":{},"_nodeVersion":"16.20.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.42.0","webpack":"^5.86.0","prettier":"2.8.8","ts-loader":"^9.4.2","typescript":"^4.9.4","webpack-cli":"^5.0.1","webpack-dev-server":"^4.11.1","html-webpack-plugin":"^5.5.0","eslint-config-prettier":"^8.8.0","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/roam-api-sdk_0.0.2_1686559822318_0.33198355077246333","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@roam-research/roam-api-sdk","version":"0.0.3","keywords":[],"author":{"name":"Roam Research"},"license":"ISC","_id":"@roam-research/roam-api-sdk@0.0.3","maintainers":[{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},{"name":"brownjoshua490","email":"josh@roamresearch.com"}],"homepage":"https://github.com/Roam-Research/backend-sdks#readme","bugs":{"url":"https://github.com/Roam-Research/backend-sdks/issues"},"dist":{"shasum":"f8322d0ce50e8076cf25e684d4cbf791ba1109e0","tarball":"https://registry.npmjs.org/@roam-research/roam-api-sdk/-/roam-api-sdk-0.0.3.tgz","fileCount":3,"integrity":"sha512-PLjjdmnZ9QAdHJ8WpbKYb6nDTU5RBZyTijC0gOgdxUgI+u+RPxaDkOgaAsLkZ0VzQPbD5C+vBMWtZ5AGtnE4Pw==","signatures":[{"sig":"MEQCIBtt7q8G74eH/92JXgcviuLiuAHB0AtStbQe5em0iF1ZAiASIPbxtW4HEREF+HUul2Iu8spkMxCh4N982tdglf2XeA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6889},"main":"dist/roamapisdk.js","gitHead":"acd6fa4dcb98cb094c7ced3561d1dd01b294a7f6","scripts":{"lint":"eslint . --ext .ts","build":"webpack --config webpack.prod.js --mode production","develop":"webpack-dev-server --config webpack.dev.js --mode development","prepare":"webpack --config webpack.prod.js --mode production"},"_npmUser":{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},"repository":{"url":"git+https://github.com/Roam-Research/backend-sdks.git","type":"git"},"_npmVersion":"8.19.4","description":"SDK to use Roam Reasearch API.","directories":{},"_nodeVersion":"16.20.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.42.0","webpack":"^5.86.0","prettier":"2.8.8","ts-loader":"^9.4.2","typescript":"^4.9.4","webpack-cli":"^5.0.1","webpack-dev-server":"^4.11.1","html-webpack-plugin":"^5.5.0","eslint-config-prettier":"^8.8.0","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/roam-api-sdk_0.0.3_1686561821028_0.47795102160491587","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@roam-research/roam-api-sdk","version":"0.0.4","keywords":[],"author":{"name":"Roam Research"},"license":"ISC","_id":"@roam-research/roam-api-sdk@0.0.4","maintainers":[{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},{"name":"brownjoshua490","email":"josh@roamresearch.com"}],"homepage":"https://github.com/Roam-Research/backend-sdks#readme","bugs":{"url":"https://github.com/Roam-Research/backend-sdks/issues"},"dist":{"shasum":"90ddc1cad964f59a85782637d5ab286027ff1430","tarball":"https://registry.npmjs.org/@roam-research/roam-api-sdk/-/roam-api-sdk-0.0.4.tgz","fileCount":4,"integrity":"sha512-APL9IrXvPGIt/dlXp3YdEWdmIoaETLGjLrbdI82Gv1MWQh0MZWE/pHzy/nQTgNfJOngpUarWkaBDVau2F6uo2g==","signatures":[{"sig":"MEYCIQD1Y7H47WgGq5oV2pG9ZRhzKAbe68gFaMtqYNCQ/CRhzQIhAN55/U2O21dIyRbEfgrlnYwSvAGBmvqP7J2MP3sf7N1B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11158},"main":"dist/roamapisdk.js","type":"module","gitHead":"001ef0dd7f6e429a1d144e435d3bd38bc0530622","scripts":{"lint":"eslint . --ext .ts","build":"webpack --config webpack.prod.js --mode production","develop":"webpack-dev-server --config webpack.dev.js --mode development","prepare":"webpack --config webpack.prod.js --mode production"},"_npmUser":{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},"repository":{"url":"git+https://github.com/Roam-Research/backend-sdks.git","type":"git"},"_npmVersion":"8.19.4","description":"SDK to use Roam Reasearch API.","directories":{},"_nodeVersion":"16.20.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.42.0","webpack":"^5.86.0","prettier":"2.8.8","ts-loader":"^9.4.2","typescript":"^4.9.4","webpack-cli":"^5.0.1","webpack-dev-server":"^4.11.1","html-webpack-plugin":"^5.5.0","eslint-config-prettier":"^8.8.0","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/roam-api-sdk_0.0.4_1686581700754_0.9774083213816163","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@roam-research/roam-api-sdk","version":"0.0.5","keywords":[],"author":{"name":"Roam Research"},"license":"ISC","_id":"@roam-research/roam-api-sdk@0.0.5","maintainers":[{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},{"name":"brownjoshua490","email":"josh@roamresearch.com"}],"homepage":"https://github.com/Roam-Research/backend-sdks#readme","bugs":{"url":"https://github.com/Roam-Research/backend-sdks/issues"},"dist":{"shasum":"d6f6222c539f4d4951da68de2e2410d93a05d1fb","tarball":"https://registry.npmjs.org/@roam-research/roam-api-sdk/-/roam-api-sdk-0.0.5.tgz","fileCount":3,"integrity":"sha512-l2VOyMLch6csQbs3okekn1xh8ESuA5+3KxhsaPrr4OePrYNhufG/t1VQYfEUF6IshpqaFyTv70EnPXq9F6ROeQ==","signatures":[{"sig":"MEQCIE8Rsgf3YXDJElLymH09aXOJNoNe/DB1zY+bBBcn0bglAiAl6MlfL+QaorShM8Z/40ABSlBQ6qGO+a2lgnuhZU7ATQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6909},"main":"dist/roamapisdk.js","type":"module","gitHead":"001ef0dd7f6e429a1d144e435d3bd38bc0530622","scripts":{"lint":"eslint . --ext .ts","build":"webpack --config webpack.prod.js --mode production","develop":"webpack-dev-server --config webpack.dev.js --mode development","prepare":"webpack --config webpack.prod.js --mode production"},"_npmUser":{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},"repository":{"url":"git+https://github.com/Roam-Research/backend-sdks.git","type":"git"},"_npmVersion":"8.19.4","description":"SDK to use Roam Reasearch API.","directories":{},"_nodeVersion":"16.20.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.42.0","webpack":"^5.86.0","prettier":"2.8.8","ts-loader":"^9.4.2","typescript":"^4.9.4","webpack-cli":"^5.0.1","webpack-dev-server":"^4.11.1","html-webpack-plugin":"^5.5.0","eslint-config-prettier":"^8.8.0","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/roam-api-sdk_0.0.5_1686581838588_0.03265158594784601","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@roam-research/roam-api-sdk","version":"0.9.0","keywords":[],"author":{"name":"Roam Research"},"license":"ISC","_id":"@roam-research/roam-api-sdk@0.9.0","maintainers":[{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},{"name":"brownjoshua490","email":"josh@roamresearch.com"}],"homepage":"https://github.com/Roam-Research/backend-sdks#readme","bugs":{"url":"https://github.com/Roam-Research/backend-sdks/issues"},"dist":{"shasum":"2eb4dd61b45b439b1ab64c97a84c35d55f3ee9a8","tarball":"https://registry.npmjs.org/@roam-research/roam-api-sdk/-/roam-api-sdk-0.9.0.tgz","fileCount":3,"integrity":"sha512-ulUT2DinIBOHmnG0qiArFOjfWnF4SLaG8Ik61Wb+syvLZQMr6GZeoRIBr25VHMhAyi9hh1SHA8Apv1PefK9SgQ==","signatures":[{"sig":"MEUCIQDgLWswuqyR/wSx4YPkRyfIfuNGjFnPvIDjQHrpeVTZEQIgaG+tFj7HpMzGJvEsCdK44G86dj3E9ePE0hsc//7VhJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8514},"main":"dist/roamapisdk.js","type":"module","gitHead":"a8820d6a88fb671eef7e515e31fe3ac697f73170","scripts":{"lint":"eslint . --ext .ts","build":"webpack --config webpack.prod.js --mode production","develop":"webpack-dev-server --config webpack.dev.js --mode development","prepare":"webpack --config webpack.prod.js --mode production"},"_npmUser":{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},"repository":{"url":"git+https://github.com/Roam-Research/backend-sdks.git","type":"git"},"_npmVersion":"8.19.4","description":"SDK to use Roam Reasearch API.","directories":{},"_nodeVersion":"16.20.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.42.0","webpack":"^5.86.0","prettier":"2.8.8","ts-loader":"^9.4.2","typescript":"^4.9.4","webpack-cli":"^5.0.1","webpack-dev-server":"^4.11.1","html-webpack-plugin":"^5.5.0","eslint-config-prettier":"^8.8.0","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/roam-api-sdk_0.9.0_1686585146681_0.9541433947617526","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@roam-research/roam-api-sdk","version":"0.10.0","keywords":[],"author":{"name":"Roam Research"},"license":"ISC","_id":"@roam-research/roam-api-sdk@0.10.0","maintainers":[{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},{"name":"brownjoshua490","email":"josh@roamresearch.com"}],"homepage":"https://github.com/Roam-Research/backend-sdks#readme","bugs":{"url":"https://github.com/Roam-Research/backend-sdks/issues"},"dist":{"shasum":"ffb33ae38b487aab39c0dc03c16924219d7b6f5a","tarball":"https://registry.npmjs.org/@roam-research/roam-api-sdk/-/roam-api-sdk-0.10.0.tgz","fileCount":3,"integrity":"sha512-7LdbYF7s3XLdlhTu0DgxZCDMyZOPR7KscsXwUfW8gMIg2uVeuSkKKlCfNwCj0edhs13wGfTovxF99ZbwVS4D5A==","signatures":[{"sig":"MEQCIGRBHNpn0UehaIsudfCbwmA4mi6gs2TsZLmmfglV6TizAiBvnLFph9e6p0j0F1vHF6VDFDeGl4aNYTA/IGmCKBe44A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8867},"main":"dist/roamapisdk.js","type":"module","gitHead":"3687e01580371c36aa4ff203411fc16efd15b0cd","scripts":{"lint":"eslint . --ext .ts","build":"webpack --config webpack.prod.js --mode production","format":"prettier --config .prettierrc.json 'src/index.ts' --write","develop":"webpack-dev-server --config webpack.dev.js --mode development","prepare":"webpack --config webpack.prod.js --mode production"},"_npmUser":{"name":"dupuchba","email":"baptiste.dupuch@gmail.com"},"repository":{"url":"git+https://github.com/Roam-Research/backend-sdks.git","type":"git"},"_npmVersion":"8.19.4","description":"SDK to use Roam Reasearch API.","directories":{},"_nodeVersion":"16.20.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.42.0","webpack":"^5.86.0","prettier":"2.8.8","ts-loader":"^9.4.2","typescript":"^4.9.4","webpack-cli":"^5.0.1","webpack-dev-server":"^4.11.1","html-webpack-plugin":"^5.5.0","eslint-config-prettier":"^8.8.0","@typescript-eslint/parser":"^5.59.9","@typescript-eslint/eslint-plugin":"^5.59.9"},"_npmOperationalInternal":{"tmp":"tmp/roam-api-sdk_0.10.0_1686735264067_0.38933230080106074","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-06-12T08:50:22.262Z","modified":"2026-02-10T18:40:59.771Z","0.0.1":"2023-06-12T08:48:20.976Z","0.0.2":"2023-06-12T08:50:22.455Z","0.0.3":"2023-06-12T09:23:41.135Z","0.0.4":"2023-06-12T14:55:00.962Z","0.0.5":"2023-06-12T14:57:18.794Z","0.9.0":"2023-06-12T15:52:26.862Z","0.10.0":"2023-06-14T09:34:24.199Z"},"bugs":{"url":"https://github.com/Roam-Research/backend-sdks/issues"},"author":{"name":"Roam Research"},"license":"ISC","homepage":"https://github.com/Roam-Research/backend-sdks#readme","keywords":[],"repository":{"url":"git+https://github.com/Roam-Research/backend-sdks.git","type":"git"},"description":"SDK to use Roam Reasearch API.","maintainers":[{"email":"josh@roamresearch.com","name":"brownjoshua490"},{"email":"baibhav@roamresearch.com","name":"baibhav_roam"}],"readme":"# SDK for Roam Reasearch API\n\nThis JS module allows to use the [Roam API](https://roamresearch.com/#/app/developer-documentation/page/tIaOPdXCj) outside of the Roam Research webapp.\n\n## Usage\n### 1. Create a token\n\nYou can create and edit roam-graph-tokens from a new section \"API tokens\" in the \"Graph\" tab in the Settings:\n\n![https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%2Fapp%2Froamteam%2FkqaM1ePPbV.png?alt=media&token=e113f2b5-4fbe-4b75-8d30-a114a6aa0f8d]\n\nFor more details, see [https://roamresearch.com/#/app/developer-documentation/page/bmYYKQ4vf].\n\n### 2. Create the graph object\n\nThe graph object bundles a graph and its token, it will be passed to all other functions.\n\n```js\nconst graph = initializeGraph({\n  token: \"roam-graph-token-XYZ\",\n  graph: \"YourGraphName\",\n});\n```\n\n### 3. Call the API functions\n\nThese \"other functions\" are: `q`, `pull`, `createBlock`, `moveBlock`, `updateBlock`, `deleteBlock`, `createPage`, `updatePage` and `deletePage`.\n\nFor example you can search for all blocks containing the string \"sdk\" in your graph:\n\n```js\nq(graph,\n  \"[:find ?block-uid ?block-str :in $ ?search-string :where [?b :block/uid ?block-uid] [?b :block/string ?block-str] [(clojure.string/includes? ?block-str ?search-string)]]\",\n  [\"sdk\"])\n.then((r) => {\n  console.log(r);\n});\n```\n\nRefer to the [Roam API documentation](https://roamresearch.com/#/app/developer-documentation/page/tIaOPdXCj) for an exhaustive reference of the provided functions.\n\n## Using into the browser\n```html\n<script type=\"module\">\nimport {initializeGraph, q} from 'https://unpkg.com/@roam-research/roam-api-sdk@0.9.0/dist/roamapisdk.js';\nconst graph = initializeGraph({\n  token: \"roam-graph-token-XYZ\",\n  graph: \"YourGraphName\",\n});\nq(graph,\n  \"[:find ?block-uid ?block-str :in $ ?search-string :where [?b :block/uid ?block-uid] [?b :block/string ?block-str] [(clojure.string/includes? ?block-str ?search-string)]]\",\n  [\"sdk\"])\n.then((r) => {\n  console.log(r);\n});\n</script>\n```\n\n\n## Using from Node.js\nDepending on the `type` set in your `package.json`\n\nCommon JS (the default):\n```js\n// this works also in ES module mode\nimport('@roam-research/roam-api-sdk')\n.then(({initializeGraph, q}) => {\n  const graph = initializeGraph({\n    token: \"roam-graph-token-XYZ\",\n    graph: \"YourGraphName\",\n  });\n  q(graph,\n    \"[:find ?block-uid ?block-str :in $ ?search-string :where [?b :block/uid ?block-uid] [?b :block/string ?block-str] [(clojure.string/includes? ?block-str ?search-string)]]\",\n    [\"sdk\"])\n  .then((r) => {\n    console.log(r);\n  });\n});\n```\n\nES Module (for `type: 'module'`)\n```js\nimport {initializeGraph, q} from 'https://unpkg.com/@roam-research/roam-api-sdk@0.0.5/dist/roamapisdk.js';\nconst graph = initializeGraph({\n  token: \"roam-graph-token-XYZ\",\n  graph: \"YourGraphName\",\n});\nq(graph,\n  \"[:find ?block-uid ?block-str :in $ ?search-string :where [?b :block/uid ?block-uid] [?b :block/string ?block-str] [(clojure.string/includes? ?block-str ?search-string)]]\",\n  [\"sdk\"])\n.then((r) => {\n  console.log(r);\n});\n```\n","readmeFilename":"README.md"}