diff --git a/package-lock.json b/package-lock.json
index 5c64d33..cd5e0e1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,7 +24,7 @@
"front-matter": "^4.0.2",
"iframe-resizer-react": "1.0.13",
"lucide-react": "^0.358.0",
- "next": "14.1.3",
+ "next": "^14.2.14",
"react": "^18",
"react-dom": "^18",
"react-instantsearch": "^7.7.0",
@@ -3948,9 +3948,10 @@
}
},
"node_modules/@next/env": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.3.tgz",
- "integrity": "sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ=="
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.14.tgz",
+ "integrity": "sha512-/0hWQfiaD5//LvGNgc8PjvyqV50vGK0cADYzaoOOGN8fxzBn3iAiaq3S0tCRnFBldq0LVveLcxCTi41ZoYgAgg==",
+ "license": "MIT"
},
"node_modules/@next/eslint-plugin-next": {
"version": "14.1.3",
@@ -3982,12 +3983,13 @@
}
},
"node_modules/@next/swc-darwin-arm64": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.3.tgz",
- "integrity": "sha512-LALu0yIBPRiG9ANrD5ncB3pjpO0Gli9ZLhxdOu6ZUNf3x1r3ea1rd9Q+4xxUkGrUXLqKVK9/lDkpYIJaCJ6AHQ==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.14.tgz",
+ "integrity": "sha512-bsxbSAUodM1cjYeA4o6y7sp9wslvwjSkWw57t8DtC8Zig8aG8V6r+Yc05/9mDzLKcybb6EN85k1rJDnMKBd9Gw==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -3997,12 +3999,13 @@
}
},
"node_modules/@next/swc-darwin-x64": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.3.tgz",
- "integrity": "sha512-E/9WQeXxkqw2dfcn5UcjApFgUq73jqNKaE5bysDm58hEUdUGedVrnRhblhJM7HbCZNhtVl0j+6TXsK0PuzXTCg==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.14.tgz",
+ "integrity": "sha512-cC9/I+0+SK5L1k9J8CInahduTVWGMXhQoXFeNvF0uNs3Bt1Ub0Azb8JzTU9vNCr0hnaMqiWu/Z0S1hfKc3+dww==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -4012,12 +4015,13 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.3.tgz",
- "integrity": "sha512-USArX9B+3rZSXYLFvgy0NVWQgqh6LHWDmMt38O4lmiJNQcwazeI6xRvSsliDLKt+78KChVacNiwvOMbl6g6BBw==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.14.tgz",
+ "integrity": "sha512-RMLOdA2NU4O7w1PQ3Z9ft3PxD6Htl4uB2TJpocm+4jcllHySPkFaUIFacQ3Jekcg6w+LBaFvjSPthZHiPmiAUg==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -4027,12 +4031,13 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.3.tgz",
- "integrity": "sha512-esk1RkRBLSIEp1qaQXv1+s6ZdYzuVCnDAZySpa62iFTMGTisCyNQmqyCTL9P+cLJ4N9FKCI3ojtSfsyPHJDQNw==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.14.tgz",
+ "integrity": "sha512-WgLOA4hT9EIP7jhlkPnvz49iSOMdZgDJVvbpb8WWzJv5wBD07M2wdJXLkDYIpZmCFfo/wPqFsFR4JS4V9KkQ2A==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -4042,12 +4047,13 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.3.tgz",
- "integrity": "sha512-8uOgRlYEYiKo0L8YGeS+3TudHVDWDjPVDUcST+z+dUzgBbTEwSSIaSgF/vkcC1T/iwl4QX9iuUyUdQEl0Kxalg==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.14.tgz",
+ "integrity": "sha512-lbn7svjUps1kmCettV/R9oAvEW+eUI0lo0LJNFOXoQM5NGNxloAyFRNByYeZKL3+1bF5YE0h0irIJfzXBq9Y6w==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -4057,12 +4063,13 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.3.tgz",
- "integrity": "sha512-DX2zqz05ziElLoxskgHasaJBREC5Y9TJcbR2LYqu4r7naff25B4iXkfXWfcp69uD75/0URmmoSgT8JclJtrBoQ==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.14.tgz",
+ "integrity": "sha512-7TcQCvLQ/hKfQRgjxMN4TZ2BRB0P7HwrGAYL+p+m3u3XcKTraUFerVbV3jkNZNwDeQDa8zdxkKkw2els/S5onQ==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -4072,12 +4079,13 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.3.tgz",
- "integrity": "sha512-HjssFsCdsD4GHstXSQxsi2l70F/5FsRTRQp8xNgmQs15SxUfUJRvSI9qKny/jLkY3gLgiCR3+6A7wzzK0DBlfA==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.14.tgz",
+ "integrity": "sha512-8i0Ou5XjTLEje0oj0JiI0Xo9L/93ghFtAUYZ24jARSeTMXLUx8yFIdhS55mTExq5Tj4/dC2fJuaT4e3ySvXU1A==",
"cpu": [
"arm64"
],
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -4087,12 +4095,13 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.3.tgz",
- "integrity": "sha512-DRuxD5axfDM1/Ue4VahwSxl1O5rn61hX8/sF0HY8y0iCbpqdxw3rB3QasdHn/LJ6Wb2y5DoWzXcz3L1Cr+Thrw==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.14.tgz",
+ "integrity": "sha512-2u2XcSaDEOj+96eXpyjHjtVPLhkAFw2nlaz83EPeuK4obF+HmtDJHqgR1dZB7Gb6V/d55FL26/lYVd0TwMgcOQ==",
"cpu": [
"ia32"
],
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -4102,12 +4111,13 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.3.tgz",
- "integrity": "sha512-uC2DaDoWH7h1P/aJ4Fok3Xiw6P0Lo4ez7NbowW2VGNXw/Xv6tOuLUcxhBYZxsSUJtpeknCi8/fvnSpyCFp4Rcg==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.14.tgz",
+ "integrity": "sha512-MZom+OvZ1NZxuRovKt1ApevjiUJTcU2PmdJKL66xUPaJeRywnbGGRWUlaAOwunD6dX+pm83vj979NTC8QXjGWg==",
"cpu": [
"x64"
],
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -5104,11 +5114,19 @@
"url": "https://github.com/sponsors/gregberge"
}
},
+ "node_modules/@swc/counter": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
+ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
+ "license": "Apache-2.0"
+ },
"node_modules/@swc/helpers": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz",
- "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==",
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.5.tgz",
+ "integrity": "sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==",
+ "license": "Apache-2.0",
"dependencies": {
+ "@swc/counter": "^0.1.3",
"tslib": "^2.4.0"
}
},
@@ -5263,22 +5281,14 @@
"version": "8.56.5",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.5.tgz",
"integrity": "sha512-u5/YPJHo1tvkSF2CE0USEkxon82Z5DBy2xR+qfyYNszpX9qcs4sT6uq2kBbj4BXY1+DBGDPnrhMZV3pKWGNukw==",
+ "dev": true,
+ "optional": true,
"peer": true,
"dependencies": {
"@types/estree": "*",
"@types/json-schema": "*"
}
},
- "node_modules/@types/eslint-scope": {
- "version": "3.7.7",
- "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",
- "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",
- "peer": true,
- "dependencies": {
- "@types/eslint": "*",
- "@types/estree": "*"
- }
- },
"node_modules/@types/estree": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
@@ -5727,10 +5737,11 @@
"node": ">=0.4.0"
}
},
- "node_modules/acorn-import-assertions": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
- "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
+ "node_modules/acorn-import-attributes": {
+ "version": "1.9.5",
+ "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",
+ "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==",
+ "license": "MIT",
"peer": true,
"peerDependencies": {
"acorn": "^8"
@@ -6177,9 +6188,10 @@
}
},
"node_modules/axios": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz",
- "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==",
+ "version": "1.7.7",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
+ "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
+ "license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
@@ -7409,9 +7421,10 @@
"dev": true
},
"node_modules/enhanced-resolve": {
- "version": "5.16.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz",
- "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==",
+ "version": "5.17.1",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz",
+ "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==",
+ "license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
@@ -11581,12 +11594,13 @@
]
},
"node_modules/micromatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "braces": "^3.0.2",
+ "braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
@@ -11747,12 +11761,13 @@
"peer": true
},
"node_modules/next": {
- "version": "14.1.3",
- "resolved": "https://registry.npmjs.org/next/-/next-14.1.3.tgz",
- "integrity": "sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==",
+ "version": "14.2.14",
+ "resolved": "https://registry.npmjs.org/next/-/next-14.2.14.tgz",
+ "integrity": "sha512-Q1coZG17MW0Ly5x76shJ4dkC23woLAhhnDnw+DfTc7EpZSGuWrlsZ3bZaO8t6u1Yu8FVfhkqJE+U8GC7E0GLPQ==",
+ "license": "MIT",
"dependencies": {
- "@next/env": "14.1.3",
- "@swc/helpers": "0.5.2",
+ "@next/env": "14.2.14",
+ "@swc/helpers": "0.5.5",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001579",
"graceful-fs": "^4.2.11",
@@ -11766,18 +11781,19 @@
"node": ">=18.17.0"
},
"optionalDependencies": {
- "@next/swc-darwin-arm64": "14.1.3",
- "@next/swc-darwin-x64": "14.1.3",
- "@next/swc-linux-arm64-gnu": "14.1.3",
- "@next/swc-linux-arm64-musl": "14.1.3",
- "@next/swc-linux-x64-gnu": "14.1.3",
- "@next/swc-linux-x64-musl": "14.1.3",
- "@next/swc-win32-arm64-msvc": "14.1.3",
- "@next/swc-win32-ia32-msvc": "14.1.3",
- "@next/swc-win32-x64-msvc": "14.1.3"
+ "@next/swc-darwin-arm64": "14.2.14",
+ "@next/swc-darwin-x64": "14.2.14",
+ "@next/swc-linux-arm64-gnu": "14.2.14",
+ "@next/swc-linux-arm64-musl": "14.2.14",
+ "@next/swc-linux-x64-gnu": "14.2.14",
+ "@next/swc-linux-x64-musl": "14.2.14",
+ "@next/swc-win32-arm64-msvc": "14.2.14",
+ "@next/swc-win32-ia32-msvc": "14.2.14",
+ "@next/swc-win32-x64-msvc": "14.2.14"
},
"peerDependencies": {
"@opentelemetry/api": "^1.1.0",
+ "@playwright/test": "^1.41.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.3.0"
@@ -11786,6 +11802,9 @@
"@opentelemetry/api": {
"optional": true
},
+ "@playwright/test": {
+ "optional": true
+ },
"sass": {
"optional": true
}
@@ -15694,26 +15713,26 @@
}
},
"node_modules/webpack": {
- "version": "5.90.3",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.3.tgz",
- "integrity": "sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==",
+ "version": "5.95.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz",
+ "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==",
+ "license": "MIT",
"peer": true,
"dependencies": {
- "@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.5",
- "@webassemblyjs/ast": "^1.11.5",
- "@webassemblyjs/wasm-edit": "^1.11.5",
- "@webassemblyjs/wasm-parser": "^1.11.5",
+ "@webassemblyjs/ast": "^1.12.1",
+ "@webassemblyjs/wasm-edit": "^1.12.1",
+ "@webassemblyjs/wasm-parser": "^1.12.1",
"acorn": "^8.7.1",
- "acorn-import-assertions": "^1.9.0",
+ "acorn-import-attributes": "^1.9.5",
"browserslist": "^4.21.10",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.15.0",
+ "enhanced-resolve": "^5.17.1",
"es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
- "graceful-fs": "^4.2.9",
+ "graceful-fs": "^4.2.11",
"json-parse-even-better-errors": "^2.3.1",
"loader-runner": "^4.2.0",
"mime-types": "^2.1.27",
@@ -15721,7 +15740,7 @@
"schema-utils": "^3.2.0",
"tapable": "^2.1.1",
"terser-webpack-plugin": "^5.3.10",
- "watchpack": "^2.4.0",
+ "watchpack": "^2.4.1",
"webpack-sources": "^3.2.3"
},
"bin": {
diff --git a/package.json b/package.json
index f93fab2..0fa6bc8 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"front-matter": "^4.0.2",
"iframe-resizer-react": "1.0.13",
"lucide-react": "^0.358.0",
- "next": "14.1.3",
+ "next": "^14.2.14",
"react": "^18",
"react-dom": "^18",
"react-instantsearch": "^7.7.0",
diff --git a/src/components/CodeDemo.tsx b/src/components/CodeDemo.tsx
index 4faf924..1c93d7b 100644
--- a/src/components/CodeDemo.tsx
+++ b/src/components/CodeDemo.tsx
@@ -4,14 +4,18 @@ import IframeResizer from 'iframe-resizer-react'
import { DEMO_URL, PRO_DEMO_URL } from '@/utils/constants'
export type CodeDemoProps = {
+ src?: string
path: string
isPro?: boolean
}
-export const CodeDemo = ({ path, isPro }: CodeDemoProps) => {
+export const CodeDemo = ({ src, path, isPro }: CodeDemoProps) => {
return (
-
-
+
+
)
}
diff --git a/src/content/collaboration/documents/rest-api.mdx b/src/content/collaboration/documents/rest-api.mdx
index a660b15..4f9a147 100644
--- a/src/content/collaboration/documents/rest-api.mdx
+++ b/src/content/collaboration/documents/rest-api.mdx
@@ -8,40 +8,52 @@ meta:
import { Callout } from '@/components/ui/Callout'
-The Collaboration Management API provides a suite of RESTful endpoints for managing documents. This API can be used for document creation, listing, retrieval, updates, and deletion, along with the ability to duplicate documents.
+The Collaboration Management API provides a suite of RESTful endpoints for managing documents. This API can be used for document creation, listing, retrieval, updates, deletion, and duplication.
-
- You can also experiment with the REST API by heading over to our [Postman
- Collection](https://www.postman.com/docking-module-explorer-14290287/workspace/tiptap-collaboration-public/collection/33042171-cc186a66-df41-4df8-9c6e-e91b20deffe5?action=share&creator=32651125).
-
+You can experiment with the REST API by visiting our [Postman Collection](https://www.postman.com/docking-module-explorer-14290287/workspace/tiptap-collaboration-public/collection/33042171-cc186a66-df41-4df8-9c6e-e91b20deffe5?action=share&creator=32651125).
-## Access the API
+## Rate limits
-The REST API is exposed directly from your Collaboration app, available at your custom URL:
+To maintain system integrity and protect from misconfigured clients, our infrastructure—including the management API and websocket connections through the `TiptapCollabProvider`—is subject to rate limits.
-```bash
-https://YOUR_APP_ID.collab.tiptap.cloud/
-```
+### Default rate limits (per source IP):
-Authentication is done using an API secret which you can find in
-the [settings](https://cloud.tiptap.dev/apps/settings) of your Collaboration app. The secret must be sent as
-an `Authorization` header.
+ - **Requests:** 100
+ - **Time window:** 5 seconds
+ - **Burst capacity:** Up to 200 requests
-If your document identifier contains a slash (`/`), just make sure to encode it as `%2F`, e.g.
-using `encodeURIComponent`.
+If you encounter these limits under normal operation, please [email us](mailto:humans@tiptap.dev).
-## Review all API endpoints
+## Access the API
-Access the Collaboration Management API to manage your documents efficiently. You can create, list, retrieve, update, delete, and duplicate documents through our RESTful endpoints. For a comprehensive view of all endpoints across Tiptap products, review our [Postman Collection](https://www.postman.com/docking-module-explorer-14290287/workspace/tiptap-collaboration-public/collection/33042171-cc186a66-df41-4df8-9c6e-e91b20deffe5?action=share&creator=32651125) which includes detailed examples and configurations.
+The REST API is exposed directly from your Collaboration app at your custom URL:
-| Operation | Method | Endpoint | Description |
-| ------------------ | ---------- | ------------------------------------------ | ------------------------------------------------------------------------------ |
-| Create Document | POST | /api/documents/:identifier | Create a document using a Yjs update message. |
-| List Documents | GET | /api/documents | Retrieve a list of all documents with pagination options. |
-| Get Document | GET | /api/documents/:identifier | Export a document in 'json' or 'yjs' format. |
-| Update Document | PATCH | /api/documents/:identifier | Apply a Yjs update message to an existing document. |
-| Delete Document | DELETE | /api/documents/:identifier | Delete a document from the server. |
-| Duplicate Document | POST + GET | /api/documents/:identifier (GET then POST) | Duplicate a document by retrieving and then creating it with a new identifier. |
+```bash
+https://YOUR_APP_ID.collab.tiptap.cloud/
+```
+### Authentication
+Authenticate your API requests by including your API secret in the `Authorization` header. You can find your API secret in
+the [settings](https://cloud.tiptap.dev/apps/settings) of your Tiptap Cloud dashboard.
+
+### Document identifiers
+If your document identifier contains a slash (`/`), encode it as `%2F`, e.g., using `encodeURIComponent`.
+
+## API endpoints overview
+
+Access the Collaboration Management API to manage your documents efficiently. For a comprehensive view of all endpoints across Tiptap products, explore our [Postman Collection](https://www.postman.com/docking-module-explorer-14290287/workspace/tiptap-collaboration-public/collection/33042171-cc186a66-df41-4df8-9c6e-e91b20deffe5?action=share&creator=32651125), which includes detailed examples and configurations.
+
+| Operation | Method | Endpoint | Description |
+| ------------------ | ---------- | -------------------------------------------- | ------------------------------------------------------------------------------ |
+| Create Document | POST | `/api/documents/:identifier` | Create a document using a `yjs` or `json` update message. |
+| Batch Import Documents | PUT | `/api/admin/batch-import` | Import multiple documents in bulk. |
+| Get Document | GET | `/api/documents/:identifier` | Export a document in `json` or `yjs` format. |
+| List Documents | GET | `/api/documents` | Retrieve a list of all documents with pagination options. |
+| Duplicate Document | POST + GET | `/api/documents/:identifier` (GET then POST) | Duplicate a document by retrieving it and then creating it with a new identifier. |
+| Encrypt Document | POST | `/api/documents/:identifier/encrypt` | Encrypt a document using Base64. |
+| Revert to Version | POST | `/api/documents/:identifier/versions` | Import multiple documents in bulk. |
+| Update Document | PATCH | `/api/documents/:identifier` | Apply a Yjs update message to an existing document. |
+| Delete Document | DELETE | `/api/documents/:identifier` | Delete a document from the server. |
+| Search Documents | POST | `/api/search` | Execute a search on all documents. |
Take a look at the [metrics and statistics endpoints](/collaboration/operations/metrics) as well!
@@ -51,12 +63,12 @@ Take a look at the [metrics and statistics endpoints](/collaboration/operations/
POST /api/documents/:identifier
```
-This call takes a binary Yjs update message (an existing Yjs document on your side must be encoded
-using `Y.encodeStateAsUpdate`) and creates a document. This can be used to seed documents before a
-user connects to the Tiptap Collab server.
+This call lets you create a document using [binary Yjs](/collaboration/getting-started/overview#about-yjs) or JSON format (default: `yjs`). It can be used to seed documents before a user connects to the Tiptap Collaboration server.
+
+The endpoint returns HTTP status `204` if the document is created successfully, or `409`
+if the document already exists. To overwrite an existing document, you must [delete it](/collaboration/documents/rest-api#delete-a-document) first.
-This endpoint will return the HTTP status `204` if the document was created successfully, or `409`
-if the document already exists. If you want to overwrite it, you must delete it first.
+- **Yjs format**: To create a document using a Yjs binary update message, first encode the Yjs document using `Y.encodeStateAsUpdate`.
```bash
curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME' \
@@ -64,18 +76,70 @@ curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_
--data '@yjsUpdate.binary.txt'
```
-## List documents
+- **JSON format**: To create a document using JSON, pass the query parameter `format=json` and include the document's content in the Tiptap JSON format.
```bash
-GET /api/documents?take=100&skip=0
+curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME?format=json' \
+--header 'Authorization: YOUR_SECRET_FROM_SETTINGS_AREA' \
+--header 'Content-Type: application/json' \
+--data '{
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is your content."
+ }
+ ]
+ }
+ ]
+}'
+
```
-This call returns a list of all documents present on the servers storage. We're returning the first
-100 by default, pass `take` or `skip` parameters to adjust this.
+## Batch import documents
```bash
-curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents' \
---header 'Authorization: YOUR_SECRET_FROM_SETTINGS_AREA'
+PUT /api/admin/batch-import
+```
+
+This call lets you import multiple documents in bulk using a predefined JSON structure. Each document must include its metadata (such as created_at, name, and version) and its content in the Tiptap JSON format.
+
+The endpoint returns HTTP status `204` if the documents are imported successfully, or `400` if the request contains invalid data.
+
+```bash
+curl --location --request PUT 'https://YOUR_APP_ID.collab.tiptap.cloud/api/admin/batch-import' \
+--header 'Content-Type: application/json' \
+--data '[
+ {
+ "name": "document-1",
+ "versions": [
+ {
+ "created_at": "2024-05-01T10:00:00Z",
+ "version": 0,
+ "tiptap_json": {
+ "type": "doc",
+ "content": [
+ {"type": "paragraph", "content": [{"type": "text", "text": "Text of document-1: v0"}]}
+ ]
+ }
+ },
+ {
+ "created_at": "2024-05-01T11:00:00Z",
+ "version": 1,
+ "tiptap_json": {
+ "type": "doc",
+ "content": [
+ {"type": "paragraph", "content": [{"type": "text", "text": "Text of document-1: v1"}]}
+ ]
+ }
+ }
+ ]
+ }
+]'
+
```
## Get a document
@@ -84,27 +148,22 @@ curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents' \
GET /api/documents/:identifier?format=:format&fragment=:fragment
```
-This call exports the given document with all fragments in JSON format. We export either the current
-in-memory version or the version read from the database. If the document is currently open on your
-server, we will return the in-memory version.
+This call lets you export the specified document with all fragments in JSON or Yjs format. If the document is currently open on your
+server, we will return the in-memory version; otherwise, we read from the database.
-`format` supports `yjs`, `base64`, `text`, or `json`. Default: `json`
-
-If you choose the `yjs` format, you'll get the binary Yjs update message created
+- `format` supports either `yjs`, `base64`, `text`, or `json` (default: `json`). If you choose the `yjs` format, you'll get the binary Yjs update message created
with `Y.encodeStateAsUpdate`.
-`fragment` can be an array (`fragment=a&fragment=b`) of or a single fragment that you want to
-export. By default we only export the `default` fragment. Note that this is only taken into account when using
-the `json` or `text` format, otherwise you'll always get the whole Yjs document.
+- `fragment` can be an array (e.g., `fragment=a&fragment=b`) or a single fragment you want to
+export. By default, we only export the `default` fragment. This parameter is only applicable when using
+the `json` or `text`format; with `yjs`, you'll always get the entire Yjs document.
```bash
curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME' \
--header 'Authorization: YOUR_SECRET_FROM_SETTINGS_AREA'
```
-
- When using axios, you need to specify `responseType: arraybuffer` in the options of the request.
-
+ When using `axios`, you need to specify `responseType: arraybuffer` in the request options.
```typescript
import * as Y from 'yjs'
@@ -112,7 +171,7 @@ import * as Y from 'yjs'
const ydoc = new Y.Doc()
const axiosResult = await axios.get(
- 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/somedoc?format=yjs',
+ 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME?format=yjs',
{
headers: {
Authorization: 'YOUR_SECRET_FROM_SETTINGS_AREA',
@@ -124,7 +183,7 @@ const axiosResult = await axios.get(
Y.applyUpdate(ydoc, axiosResult.data)
```
-When using `node-fetch`, you need to use .arrayBuffer() and create a Buffer from it:
+When using `node-fetch`, you need to use `.arrayBuffer()` and create a Buffer from it:
```typescript
import * as Y from 'yjs'
@@ -132,7 +191,7 @@ import * as Y from 'yjs'
const ydoc = new Y.Doc()
const fetchResult = await fetch(
- 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/somedoc?format=yjs',
+ 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME?format=yjs',
{
headers: {
Authorization: 'YOUR_SECRET_FROM_SETTINGS_AREA',
@@ -143,14 +202,109 @@ const fetchResult = await fetch(
Y.applyUpdate(ydoc, Buffer.from(await docUpdateAsBinaryResponse.arrayBuffer()))
```
+## List documents
+
+```bash
+GET /api/documents?take=100&skip=0
+```
+
+This call returns a paginated list of all documents in storage. By default, we return the first
+100 documents. Pass `take` and `skip` parameters to adjust pagination.
+
+```bash
+curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents' \
+--header 'Authorization: YOUR_SECRET_FROM_SETTINGS_AREA'
+```
+
+
+## Duplicate a document
+
+This call lets you copy or duplicate a document. First, retrieve the document using the `GET` endpoint and then create a new one with the
+`POST` call. Here's an example in typescript:
+
+```typescript
+const docUpdateAsBinaryResponse = await axios.get(
+ 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME?format=yjs',
+ {
+ headers: {
+ Authorization: 'YOUR_SECRET_FROM_SETTINGS_AREA',
+ },
+ responseType: 'arraybuffer',
+ },
+)
+
+await axios.post(
+ 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME-duplicated',
+ docUpdateAsBinaryResponse.data,
+ {
+ headers: {
+ Authorization: 'YOUR_SECRET_FROM_SETTINGS_AREA',
+ },
+ },
+)
+```
+
+## Encrypt a document
+
+```bash
+POST /api/documents/:identifier/encrypt
+```
+
+This call lets you encrypt a document with the specified identifier using Base64 encryption.
+
+The endpoint returns HTTP status `204` if the document is successfully encrypted, or `404` if the document does not exist.
+
+```bash
+curl --location 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME/encrypt' \
+--header 'Content-Type: application/json' \
+--header 'Authorization: YOUR_SECRET_FROM_SETTINGS_AREA' \
+--data '{
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "attrs": {
+ "indent": 0,
+ "textAlign": "left"
+ },
+ "content": [
+ {
+ "text": "the entire document is replaced by this (except if you changed the mode parameter to '\''append'\'')",
+ "type": "text"
+ }
+ ]
+ }
+ ]
+ }'
+```
+
+## Revert to version
+
+```bash
+POST /api/documents/:identifier/versions
+```
+
+This call lets you revert a document to a specific previous version by applying an update that corresponds to a prior state of the document. You must specify the version to revert to in the request body.
+
+The endpoint returns HTTP status `204` if the document is successfully reverted, or `404` if the document or version is not found.
+
+```bash
+curl --location --request POST 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME/versions/VERSION_ID/revertTo' \
+--header 'Content-Type: application/json' \
+--header 'Authorization: YOUR_SECRET_FROM_SETTINGS_AREA'
+
+```
+
+
## Update a document
```bash
PATCH /api/documents/:identifier
```
-This call accepts a Yjs update message and will apply it on the existing document on the server.
-This endpoint will return the HTTP status `204` if the document was updated successfully, `404` is
+This call accepts a Yjs update message and applies it to the existing document on the server.
+
+The endpoint returns the HTTP status `204` if the document was updated successfully, `404` if
the document does not exist, or `422` if the payload is invalid or the update cannot be applied.
```bash
@@ -159,7 +313,7 @@ curl --location --request PATCH 'https://YOUR_APP_ID.collab.tiptap.cloud/api/doc
--data '@yjsUpdate.binary.txt'
```
-The API endpoint is also capable of JSON document updates. It also supports document history, allowing you to track changes without replacing the entire document, and enables node-specific updates.
+The API endpoint also supports JSON document updates, document history for tracking changes without replacing the entire document, and node-specific updates.
For more detailed information on manipulating documents using JSON instead of Yjs, refer to our [Content injection](/collaboration/documents/content-injection) page.
@@ -169,60 +323,52 @@ For more detailed information on manipulating documents using JSON instead of Yj
DELETE /api/documents/:identifier
```
-This endpoint deletes a document from the server after closing any open connection to the document.
+This call deletes a document from the server after closing any open connection to the document.
-It returns either HTTP status `204` if the document was deleted successfully or `404` if the
+It returns either HTTP status `204` if the document was deleted successfully, or `404` if the
document was not found.
-If the endpoint returned `204`, but the document still exists, make sure that there is no user
-re-creating the document from the provider.
-We are closing all connections before deleting a document, but your error handling might re-create
-the provider, and thus create the document again.
-
```bash
curl --location --request DELETE 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/DOCUMENT_NAME' \
--header 'Authorization: YOUR_SECRET_FROM_SETTINGS_AREA'
```
-## Duplicate a document
+
+ If the endpoint returns `204` but the document still exists, make sure that no user is re-creating the document from the provider. We close all connections before deleting a document, but your error handling might recreate the provider, thus creating the document again.
+
-In order to copy a document, you can just use the GET endpoint and then create it again with the
-POST endpoint, here's an example in typescript:
-```typescript
-const docUpdateAsBinaryResponse = await axios.get(
- 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/somedoc?format=yjs',
- {
- headers: {
- Authorization: 'YOUR_SECRET_FROM_SETTINGS_AREA',
- },
- responseType: 'arraybuffer',
- },
-)
+## Search documents
-await axios.post(
- 'https://YOUR_APP_ID.collab.tiptap.cloud/api/documents/somedoc-duplicated',
- docUpdateAsBinaryResponse.data,
- {
- headers: {
- Authorization: 'YOUR_SECRET_FROM_SETTINGS_AREA',
- },
- },
-)
+```bash
+POST /api/search
```
-## Rate limits
+When [Tiptap Semantic Search](/collaboration/documents/semantic-search) is enabled, you can perform contextually aware searches across all your documents.
+
+
+ Please handle the search requests in your backend to keep your API
+ key secret. Consider enforcing rate limits in your application as necessary.
+
-To maintain system integrity and prevent abuse, our infrastructure—including the management API and websocket connections through the TiptapCollabProvider—is subject to rate limits. These are designed to protect from misconfigured clients and ensure service reliability.
+### Query parameters
-### Default Rate Limits (per source IP):
+You can use the following query parameters to adjust the search results:
-```json
-{
- "requests": 100,
- "within_seconds": 5,
- "burst_capacity": 200
-}
-```
+| Query parameter | Type | Default | Description |
+| --------------- | ----- | ------- | --------------------------------------------------------------------------------- |
+| `threshold` | float | `0.5` | Describes the similarity factor of documents. The value can be between `0` an `1`. |
+| `limit` | int | `20` | Limit the number of results. The value can be between `1` an `100`. |
-If you encounter these limits under normal operations, please contact us for assistance.
+### Body parameters
+
+| Body parameter | Type | Default | Description |
+| -------------- | ------ | ------- | ---------------- |
+| `content` | string | - | Your search terms. |
+
+```bash
+curl -X POST https://YOUR_APP_ID.collab.tiptap.cloud/api/search \
+ -H "Authorization: YOUR_SECRET_FROM_SETTINGS_AREA" \
+ -H "Content-Type: application/json" \
+ -d '{"content": "Your search terms"}'
+```
\ No newline at end of file
diff --git a/src/content/collaboration/documents/semantic-search.mdx b/src/content/collaboration/documents/semantic-search.mdx
new file mode 100644
index 0000000..5ed976f
--- /dev/null
+++ b/src/content/collaboration/documents/semantic-search.mdx
@@ -0,0 +1,71 @@
+---
+title: Semantic Search
+meta:
+ title: Semantic Search | Tiptap Editor Docs
+ description: Semantic Search across your documents. Learn how to set up and use it here in the Docs!
+ category: Collaboration
+---
+
+import { Callout } from '@/components/ui/Callout'
+import { CodeDemo } from '@/components/CodeDemo'
+
+Tiptap Semantic Search brings AI-native search capabilities to your document library, making it easy to discover relationships and connections across all your documents through contextual understanding provided by large language models.
+
+Searching through large document archives can be challenging, especially if you miss the exact keywords. Semantic Search addresses this by interpreting the intent behind the search query and the contextual meaning within your documents.
+
+The LLM’s interpretation is encoded as numerical representations, known as vectors or embeddings, which capture the semantic meaning of both new and existing content. These embeddings can then be easily compared to retrieve the most relevant documents.
+
+
+ This feature is currently in private beta and available by invite only. Tell us about your use case at [humans@tiptap.dev](mailto:humans@tiptap.dev) to be considered for early access to Tiptap Semantic Search.
+
+
+## Live demo
+
+Below is an interactive demo of Tiptap Semantic Search. Type into the editor on the left, and watch as the search results update in real time with the most contextually relevant pages from our public documentation. Discover more details about the demo in our [examples](https://ai-demo.tiptap.dev/preview/Examples/SemanticSearch).
+
+
+
+## Getting started
+
+### Prerequisites
+
+- Tiptap Collaboration
+- Access to private beta (request an invite [here](mailto:humans@tiptap.dev))
+
+### How it works
+
+When you input a query, the following things happen:
+1. **Embedding**: Your query is transformed into a high-dimensional vector using a model optimized for similarity search.
+2. **Vector search**: This vector is compared with the existing vectors of your document library. The comparison process is based on similarity metrics to identify the most relevant documents.
+3. **Context-aware results**: Documents are ranked according to their semantic similarity to the query, so that even if the words don't match, the most relevant content is surfaced.
+
+We have configured these operations in the background, making the complex process transparent to you as you set up and use this new Tiptap feature. With Tiptap Semantic Search, you can:
+
+- **Improve search relevance**: Retrieve documents that match the intent of a query, not just keywords.
+- **Understand context**: Recognize synonyms, related concepts, and varying word order to find the most pertinent results.
+- **Enhance user experience**: Deliver more accurate and meaningful search results, improving their interaction with content.
+
+This is particularly valuable for knowledge management systems, document retrieval, idea generation, or any application where precise, context-aware search results are critical.
+
+### Perform a search
+
+To perform a search, use the search endpoint as described [in the REST API documentation](/collaboration/documents/rest-api#search-documents).
+
+```bash
+curl -X POST https://YOUR_APP_ID.collab.tiptap.cloud/api/search \
+ -H "Authorization: YOUR_SECRET_FROM_SETTINGS_AREA" \
+ -H "Content-Type: application/json" \
+ -d '{"content": "Your search terms"}'
+```
+
+
+ Please make sure that you handle the requests in your own backend in order to keep your API key
+ secret.
+
+
+
+## Using Retrieval-Augmented Generation (RAG)
+
+Use RAG to pull relevant information from your library and feed it into large language models, improving the quality of AI-generated content with contextually accurate data. Discover more details about the demo in our [examples](https://ai-demo.tiptap.dev/preview/Examples/RAG).
+
+
diff --git a/src/content/collaboration/sidebar.ts b/src/content/collaboration/sidebar.ts
index 516bb42..9ce81a1 100644
--- a/src/content/collaboration/sidebar.ts
+++ b/src/content/collaboration/sidebar.ts
@@ -80,6 +80,11 @@ export const sidebarConfig: SidebarConfig = {
href: '/collaboration/documents/conversion',
tags: ['Beta'],
},
+ {
+ title: 'Semantic Search',
+ href: '/collaboration/documents/semantic-search',
+ tags: ['Beta'],
+ },
],
},
{
diff --git a/src/content/examples/advanced/retrieval-augmented-generation-rag.mdx b/src/content/examples/advanced/retrieval-augmented-generation-rag.mdx
new file mode 100644
index 0000000..f99850e
--- /dev/null
+++ b/src/content/examples/advanced/retrieval-augmented-generation-rag.mdx
@@ -0,0 +1,15 @@
+---
+title: Retrieval-Augmented Generation (RAG)
+meta:
+ title: Retrieval-Augmented Generation (RAG) | Tiptap Editor Docs
+ description: Using Tiptap Semantic Search to retrieve context for your Tiptap AI commands.
+ category: Examples
+---
+
+import { CodeDemo } from '@/components/CodeDemo'
+
+The following example shows how you can use [Tiptap Semantic Search](/collaboration/documents/semantic-search) to generate meaningful context for Tiptap AI.
+
+With this approach, your AI commands can use existing documents as knowledge, improving the quality of the answer.
+
+
diff --git a/src/content/examples/sidebar.ts b/src/content/examples/sidebar.ts
index e579db9..afe51ea 100644
--- a/src/content/examples/sidebar.ts
+++ b/src/content/examples/sidebar.ts
@@ -80,6 +80,10 @@ export const sidebarConfig: SidebarConfig = {
title: 'Interactive React & Vue views',
href: '/examples/advanced/interactive-react-and-vue-views',
},
+ {
+ title: 'Retrieval-Augmented Generation (RAG)',
+ href: '/examples/advanced/retrieval-augmented-generation-rag',
+ },
{
title: 'React performance',
href: '/examples/advanced/react-performance',