@payloadcms/plugin-mcp 4.0.0-internal.688c4d0 → 4.0.0-internal.bc5cf8c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/defaultAccess.d.ts +3 -0
- package/dist/defaultAccess.d.ts.map +1 -0
- package/dist/defaultAccess.js +3 -0
- package/dist/defaultAccess.js.map +1 -0
- package/dist/endpoint/access.d.ts +17 -5
- package/dist/endpoint/access.d.ts.map +1 -1
- package/dist/endpoint/access.js +81 -103
- package/dist/endpoint/access.js.map +1 -1
- package/dist/endpoint/index.d.ts.map +1 -1
- package/dist/endpoint/index.js +11 -0
- package/dist/endpoint/index.js.map +1 -1
- package/dist/exports/client.d.ts +1 -4
- package/dist/exports/client.d.ts.map +1 -1
- package/dist/exports/client.js +1 -4
- package/dist/exports/client.js.map +1 -1
- package/dist/exports/internal.d.ts +2 -0
- package/dist/exports/internal.d.ts.map +1 -0
- package/dist/exports/internal.js +3 -0
- package/dist/exports/internal.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -49
- package/dist/index.js.map +1 -1
- package/dist/mcp/buildMcpServer.d.ts.map +1 -1
- package/dist/mcp/buildMcpServer.js +2 -0
- package/dist/mcp/buildMcpServer.js.map +1 -1
- package/dist/mcp/builtin/collections/authTools.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/authTools.js +44 -6
- package/dist/mcp/builtin/collections/authTools.js.map +1 -1
- package/dist/mcp/builtin/collections/countTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/countTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/countTool.js +69 -0
- package/dist/mcp/builtin/collections/countTool.js.map +1 -0
- package/dist/mcp/builtin/collections/countVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/countVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/countVersionsTool.js +65 -0
- package/dist/mcp/builtin/collections/countVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/collections/createTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/createTool.js +12 -19
- package/dist/mcp/builtin/collections/createTool.js.map +1 -1
- package/dist/mcp/builtin/collections/deleteTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/deleteTool.js +9 -0
- package/dist/mcp/builtin/collections/deleteTool.js.map +1 -1
- package/dist/mcp/builtin/collections/duplicateTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/duplicateTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/duplicateTool.js +97 -0
- package/dist/mcp/builtin/collections/duplicateTool.js.map +1 -0
- package/dist/mcp/builtin/collections/findDistinctTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/findDistinctTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/findDistinctTool.js +93 -0
- package/dist/mcp/builtin/collections/findDistinctTool.js.map +1 -0
- package/dist/mcp/builtin/collections/findTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/findTool.js +43 -22
- package/dist/mcp/builtin/collections/findTool.js.map +1 -1
- package/dist/mcp/builtin/collections/findVersionByIDTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/findVersionByIDTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/findVersionByIDTool.js +84 -0
- package/dist/mcp/builtin/collections/findVersionByIDTool.js.map +1 -0
- package/dist/mcp/builtin/collections/findVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/findVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/findVersionsTool.js +99 -0
- package/dist/mcp/builtin/collections/findVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/collections/formatCollectionError.d.ts +1 -1
- package/dist/mcp/builtin/collections/formatCollectionError.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/formatCollectionError.js.map +1 -1
- package/dist/mcp/builtin/collections/getCollectionSchemaTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/getCollectionSchemaTool.js +12 -0
- package/dist/mcp/builtin/collections/getCollectionSchemaTool.js.map +1 -1
- package/dist/mcp/builtin/collections/restoreVersionTool.d.ts +2 -0
- package/dist/mcp/builtin/collections/restoreVersionTool.d.ts.map +1 -0
- package/dist/mcp/builtin/collections/restoreVersionTool.js +82 -0
- package/dist/mcp/builtin/collections/restoreVersionTool.js.map +1 -0
- package/dist/mcp/builtin/collections/updateTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/updateTool.js +14 -21
- package/dist/mcp/builtin/collections/updateTool.js.map +1 -1
- package/dist/mcp/builtin/getConfigInfoTool.d.ts.map +1 -1
- package/dist/mcp/builtin/getConfigInfoTool.js +27 -5
- package/dist/mcp/builtin/getConfigInfoTool.js.map +1 -1
- package/dist/mcp/builtin/globals/countVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/countVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/countVersionsTool.js +65 -0
- package/dist/mcp/builtin/globals/countVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/globals/findTool.d.ts.map +1 -1
- package/dist/mcp/builtin/globals/findTool.js +17 -20
- package/dist/mcp/builtin/globals/findTool.js.map +1 -1
- package/dist/mcp/builtin/globals/findVersionByIDTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/findVersionByIDTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/findVersionByIDTool.js +80 -0
- package/dist/mcp/builtin/globals/findVersionByIDTool.js.map +1 -0
- package/dist/mcp/builtin/globals/findVersionsTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/findVersionsTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/findVersionsTool.js +95 -0
- package/dist/mcp/builtin/globals/findVersionsTool.js.map +1 -0
- package/dist/mcp/builtin/globals/getGlobalSchemaTool.d.ts.map +1 -1
- package/dist/mcp/builtin/globals/getGlobalSchemaTool.js +12 -0
- package/dist/mcp/builtin/globals/getGlobalSchemaTool.js.map +1 -1
- package/dist/mcp/builtin/globals/restoreVersionTool.d.ts +2 -0
- package/dist/mcp/builtin/globals/restoreVersionTool.d.ts.map +1 -0
- package/dist/mcp/builtin/globals/restoreVersionTool.js +78 -0
- package/dist/mcp/builtin/globals/restoreVersionTool.js.map +1 -0
- package/dist/mcp/builtin/globals/updateTool.d.ts.map +1 -1
- package/dist/mcp/builtin/globals/updateTool.js +12 -19
- package/dist/mcp/builtin/globals/updateTool.js.map +1 -1
- package/dist/mcp/builtinTools.d.ts +69 -12
- package/dist/mcp/builtinTools.d.ts.map +1 -1
- package/dist/mcp/builtinTools.js +66 -10
- package/dist/mcp/builtinTools.js.map +1 -1
- package/dist/mcp/sanitizeMCPConfig.d.ts +0 -1
- package/dist/mcp/sanitizeMCPConfig.d.ts.map +1 -1
- package/dist/mcp/sanitizeMCPConfig.js +68 -27
- package/dist/mcp/sanitizeMCPConfig.js.map +1 -1
- package/dist/stdio.d.ts +3 -2
- package/dist/stdio.d.ts.map +1 -1
- package/dist/stdio.js +27 -8
- package/dist/stdio.js.map +1 -1
- package/dist/types.d.ts +50 -90
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -4
- package/dist/types.js.map +1 -1
- package/dist/utils/getPluginConfig.d.ts +1 -1
- package/dist/utils/getPluginConfig.js +1 -1
- package/dist/utils/getPluginConfig.js.map +1 -1
- package/package.json +9 -13
- package/src/defaultAccess.ts +3 -0
- package/src/endpoint/access.ts +87 -112
- package/src/endpoint/index.ts +14 -1
- package/src/exports/client.ts +2 -4
- package/src/exports/internal.ts +1 -0
- package/src/index.ts +1 -55
- package/src/mcp/buildMcpServer.ts +8 -1
- package/src/mcp/builtin/collections/authTools.ts +45 -9
- package/src/mcp/builtin/collections/countTool.ts +74 -0
- package/src/mcp/builtin/collections/countVersionsTool.ts +70 -0
- package/src/mcp/builtin/collections/createTool.ts +13 -13
- package/src/mcp/builtin/collections/deleteTool.ts +10 -0
- package/src/mcp/builtin/collections/duplicateTool.ts +135 -0
- package/src/mcp/builtin/collections/findDistinctTool.ts +120 -0
- package/src/mcp/builtin/collections/findTool.ts +56 -16
- package/src/mcp/builtin/collections/findVersionByIDTool.ts +110 -0
- package/src/mcp/builtin/collections/findVersionsTool.ts +155 -0
- package/src/mcp/builtin/collections/formatCollectionError.ts +1 -1
- package/src/mcp/builtin/collections/getCollectionSchemaTool.ts +18 -0
- package/src/mcp/builtin/collections/restoreVersionTool.ts +108 -0
- package/src/mcp/builtin/collections/updateTool.ts +14 -14
- package/src/mcp/builtin/getConfigInfoTool.ts +29 -4
- package/src/mcp/builtin/globals/countVersionsTool.ts +69 -0
- package/src/mcp/builtin/globals/findTool.ts +25 -16
- package/src/mcp/builtin/globals/findVersionByIDTool.ts +104 -0
- package/src/mcp/builtin/globals/findVersionsTool.ts +148 -0
- package/src/mcp/builtin/globals/getGlobalSchemaTool.ts +13 -0
- package/src/mcp/builtin/globals/restoreVersionTool.ts +100 -0
- package/src/mcp/builtin/globals/updateTool.ts +14 -14
- package/src/mcp/builtinTools.ts +72 -16
- package/src/mcp/sanitizeMCPConfig.ts +47 -30
- package/src/stdio.ts +23 -8
- package/src/types.ts +57 -92
- package/src/utils/getPluginConfig.ts +1 -1
- package/dist/collection/getAccessField.d.ts +0 -12
- package/dist/collection/getAccessField.d.ts.map +0 -1
- package/dist/collection/getAccessField.js +0 -72
- package/dist/collection/getAccessField.js.map +0 -1
- package/dist/collection/index.d.ts +0 -6
- package/dist/collection/index.d.ts.map +0 -1
- package/dist/collection/index.js +0 -105
- package/dist/collection/index.js.map +0 -1
- package/dist/components/APIKeyField/index.client.d.ts +0 -9
- package/dist/components/APIKeyField/index.client.d.ts.map +0 -1
- package/dist/components/APIKeyField/index.client.js +0 -85
- package/dist/components/APIKeyField/index.client.js.map +0 -1
- package/dist/components/APIKeyField/index.css +0 -105
- package/dist/components/APIKeysEmptyState/index.client.d.ts +0 -4
- package/dist/components/APIKeysEmptyState/index.client.d.ts.map +0 -1
- package/dist/components/APIKeysEmptyState/index.client.js +0 -21
- package/dist/components/APIKeysEmptyState/index.client.js.map +0 -1
- package/dist/components/AccessField/index.client.d.ts +0 -10
- package/dist/components/AccessField/index.client.d.ts.map +0 -1
- package/dist/components/AccessField/index.client.js +0 -247
- package/dist/components/AccessField/index.client.js.map +0 -1
- package/dist/components/AccessField/index.css +0 -99
- package/dist/components/SettingsMenu/index.client.d.ts +0 -8
- package/dist/components/SettingsMenu/index.client.d.ts.map +0 -1
- package/dist/components/SettingsMenu/index.client.js +0 -29
- package/dist/components/SettingsMenu/index.client.js.map +0 -1
- package/dist/translations/index.d.ts +0 -11
- package/dist/translations/index.d.ts.map +0 -1
- package/dist/translations/index.js +0 -92
- package/dist/translations/index.js.map +0 -1
- package/dist/translations/languages/ar.d.ts +0 -31
- package/dist/translations/languages/ar.d.ts.map +0 -1
- package/dist/translations/languages/ar.js +0 -34
- package/dist/translations/languages/ar.js.map +0 -1
- package/dist/translations/languages/az.d.ts +0 -31
- package/dist/translations/languages/az.d.ts.map +0 -1
- package/dist/translations/languages/az.js +0 -34
- package/dist/translations/languages/az.js.map +0 -1
- package/dist/translations/languages/bg.d.ts +0 -31
- package/dist/translations/languages/bg.d.ts.map +0 -1
- package/dist/translations/languages/bg.js +0 -34
- package/dist/translations/languages/bg.js.map +0 -1
- package/dist/translations/languages/bnBd.d.ts +0 -31
- package/dist/translations/languages/bnBd.d.ts.map +0 -1
- package/dist/translations/languages/bnBd.js +0 -34
- package/dist/translations/languages/bnBd.js.map +0 -1
- package/dist/translations/languages/bnIn.d.ts +0 -31
- package/dist/translations/languages/bnIn.d.ts.map +0 -1
- package/dist/translations/languages/bnIn.js +0 -34
- package/dist/translations/languages/bnIn.js.map +0 -1
- package/dist/translations/languages/ca.d.ts +0 -31
- package/dist/translations/languages/ca.d.ts.map +0 -1
- package/dist/translations/languages/ca.js +0 -34
- package/dist/translations/languages/ca.js.map +0 -1
- package/dist/translations/languages/cs.d.ts +0 -31
- package/dist/translations/languages/cs.d.ts.map +0 -1
- package/dist/translations/languages/cs.js +0 -34
- package/dist/translations/languages/cs.js.map +0 -1
- package/dist/translations/languages/da.d.ts +0 -31
- package/dist/translations/languages/da.d.ts.map +0 -1
- package/dist/translations/languages/da.js +0 -34
- package/dist/translations/languages/da.js.map +0 -1
- package/dist/translations/languages/de.d.ts +0 -31
- package/dist/translations/languages/de.d.ts.map +0 -1
- package/dist/translations/languages/de.js +0 -34
- package/dist/translations/languages/de.js.map +0 -1
- package/dist/translations/languages/en.d.ts +0 -31
- package/dist/translations/languages/en.d.ts.map +0 -1
- package/dist/translations/languages/en.js +0 -34
- package/dist/translations/languages/en.js.map +0 -1
- package/dist/translations/languages/es.d.ts +0 -31
- package/dist/translations/languages/es.d.ts.map +0 -1
- package/dist/translations/languages/es.js +0 -34
- package/dist/translations/languages/es.js.map +0 -1
- package/dist/translations/languages/et.d.ts +0 -31
- package/dist/translations/languages/et.d.ts.map +0 -1
- package/dist/translations/languages/et.js +0 -34
- package/dist/translations/languages/et.js.map +0 -1
- package/dist/translations/languages/fa.d.ts +0 -31
- package/dist/translations/languages/fa.d.ts.map +0 -1
- package/dist/translations/languages/fa.js +0 -34
- package/dist/translations/languages/fa.js.map +0 -1
- package/dist/translations/languages/fr.d.ts +0 -31
- package/dist/translations/languages/fr.d.ts.map +0 -1
- package/dist/translations/languages/fr.js +0 -34
- package/dist/translations/languages/fr.js.map +0 -1
- package/dist/translations/languages/he.d.ts +0 -31
- package/dist/translations/languages/he.d.ts.map +0 -1
- package/dist/translations/languages/he.js +0 -34
- package/dist/translations/languages/he.js.map +0 -1
- package/dist/translations/languages/hr.d.ts +0 -31
- package/dist/translations/languages/hr.d.ts.map +0 -1
- package/dist/translations/languages/hr.js +0 -34
- package/dist/translations/languages/hr.js.map +0 -1
- package/dist/translations/languages/hu.d.ts +0 -31
- package/dist/translations/languages/hu.d.ts.map +0 -1
- package/dist/translations/languages/hu.js +0 -34
- package/dist/translations/languages/hu.js.map +0 -1
- package/dist/translations/languages/hy.d.ts +0 -31
- package/dist/translations/languages/hy.d.ts.map +0 -1
- package/dist/translations/languages/hy.js +0 -34
- package/dist/translations/languages/hy.js.map +0 -1
- package/dist/translations/languages/id.d.ts +0 -31
- package/dist/translations/languages/id.d.ts.map +0 -1
- package/dist/translations/languages/id.js +0 -34
- package/dist/translations/languages/id.js.map +0 -1
- package/dist/translations/languages/is.d.ts +0 -31
- package/dist/translations/languages/is.d.ts.map +0 -1
- package/dist/translations/languages/is.js +0 -34
- package/dist/translations/languages/is.js.map +0 -1
- package/dist/translations/languages/it.d.ts +0 -31
- package/dist/translations/languages/it.d.ts.map +0 -1
- package/dist/translations/languages/it.js +0 -34
- package/dist/translations/languages/it.js.map +0 -1
- package/dist/translations/languages/ja.d.ts +0 -31
- package/dist/translations/languages/ja.d.ts.map +0 -1
- package/dist/translations/languages/ja.js +0 -34
- package/dist/translations/languages/ja.js.map +0 -1
- package/dist/translations/languages/ko.d.ts +0 -31
- package/dist/translations/languages/ko.d.ts.map +0 -1
- package/dist/translations/languages/ko.js +0 -34
- package/dist/translations/languages/ko.js.map +0 -1
- package/dist/translations/languages/lt.d.ts +0 -31
- package/dist/translations/languages/lt.d.ts.map +0 -1
- package/dist/translations/languages/lt.js +0 -34
- package/dist/translations/languages/lt.js.map +0 -1
- package/dist/translations/languages/lv.d.ts +0 -31
- package/dist/translations/languages/lv.d.ts.map +0 -1
- package/dist/translations/languages/lv.js +0 -34
- package/dist/translations/languages/lv.js.map +0 -1
- package/dist/translations/languages/my.d.ts +0 -31
- package/dist/translations/languages/my.d.ts.map +0 -1
- package/dist/translations/languages/my.js +0 -34
- package/dist/translations/languages/my.js.map +0 -1
- package/dist/translations/languages/nb.d.ts +0 -31
- package/dist/translations/languages/nb.d.ts.map +0 -1
- package/dist/translations/languages/nb.js +0 -34
- package/dist/translations/languages/nb.js.map +0 -1
- package/dist/translations/languages/nl.d.ts +0 -31
- package/dist/translations/languages/nl.d.ts.map +0 -1
- package/dist/translations/languages/nl.js +0 -34
- package/dist/translations/languages/nl.js.map +0 -1
- package/dist/translations/languages/pl.d.ts +0 -31
- package/dist/translations/languages/pl.d.ts.map +0 -1
- package/dist/translations/languages/pl.js +0 -34
- package/dist/translations/languages/pl.js.map +0 -1
- package/dist/translations/languages/pt.d.ts +0 -31
- package/dist/translations/languages/pt.d.ts.map +0 -1
- package/dist/translations/languages/pt.js +0 -34
- package/dist/translations/languages/pt.js.map +0 -1
- package/dist/translations/languages/ro.d.ts +0 -31
- package/dist/translations/languages/ro.d.ts.map +0 -1
- package/dist/translations/languages/ro.js +0 -34
- package/dist/translations/languages/ro.js.map +0 -1
- package/dist/translations/languages/rs.d.ts +0 -31
- package/dist/translations/languages/rs.d.ts.map +0 -1
- package/dist/translations/languages/rs.js +0 -34
- package/dist/translations/languages/rs.js.map +0 -1
- package/dist/translations/languages/rsLatin.d.ts +0 -31
- package/dist/translations/languages/rsLatin.d.ts.map +0 -1
- package/dist/translations/languages/rsLatin.js +0 -34
- package/dist/translations/languages/rsLatin.js.map +0 -1
- package/dist/translations/languages/ru.d.ts +0 -31
- package/dist/translations/languages/ru.d.ts.map +0 -1
- package/dist/translations/languages/ru.js +0 -34
- package/dist/translations/languages/ru.js.map +0 -1
- package/dist/translations/languages/sk.d.ts +0 -31
- package/dist/translations/languages/sk.d.ts.map +0 -1
- package/dist/translations/languages/sk.js +0 -34
- package/dist/translations/languages/sk.js.map +0 -1
- package/dist/translations/languages/sl.d.ts +0 -31
- package/dist/translations/languages/sl.d.ts.map +0 -1
- package/dist/translations/languages/sl.js +0 -34
- package/dist/translations/languages/sl.js.map +0 -1
- package/dist/translations/languages/sv.d.ts +0 -31
- package/dist/translations/languages/sv.d.ts.map +0 -1
- package/dist/translations/languages/sv.js +0 -34
- package/dist/translations/languages/sv.js.map +0 -1
- package/dist/translations/languages/ta.d.ts +0 -31
- package/dist/translations/languages/ta.d.ts.map +0 -1
- package/dist/translations/languages/ta.js +0 -34
- package/dist/translations/languages/ta.js.map +0 -1
- package/dist/translations/languages/th.d.ts +0 -31
- package/dist/translations/languages/th.d.ts.map +0 -1
- package/dist/translations/languages/th.js +0 -34
- package/dist/translations/languages/th.js.map +0 -1
- package/dist/translations/languages/tr.d.ts +0 -31
- package/dist/translations/languages/tr.d.ts.map +0 -1
- package/dist/translations/languages/tr.js +0 -34
- package/dist/translations/languages/tr.js.map +0 -1
- package/dist/translations/languages/uk.d.ts +0 -31
- package/dist/translations/languages/uk.d.ts.map +0 -1
- package/dist/translations/languages/uk.js +0 -34
- package/dist/translations/languages/uk.js.map +0 -1
- package/dist/translations/languages/vi.d.ts +0 -31
- package/dist/translations/languages/vi.d.ts.map +0 -1
- package/dist/translations/languages/vi.js +0 -34
- package/dist/translations/languages/vi.js.map +0 -1
- package/dist/translations/languages/zh.d.ts +0 -31
- package/dist/translations/languages/zh.d.ts.map +0 -1
- package/dist/translations/languages/zh.js +0 -34
- package/dist/translations/languages/zh.js.map +0 -1
- package/dist/translations/languages/zhTw.d.ts +0 -31
- package/dist/translations/languages/zhTw.d.ts.map +0 -1
- package/dist/translations/languages/zhTw.js +0 -34
- package/dist/translations/languages/zhTw.js.map +0 -1
- package/dist/translations/types.d.ts +0 -32
- package/dist/translations/types.d.ts.map +0 -1
- package/dist/translations/types.js +0 -3
- package/dist/translations/types.js.map +0 -1
- package/src/collection/getAccessField.ts +0 -84
- package/src/collection/index.ts +0 -105
- package/src/components/APIKeyField/index.client.tsx +0 -73
- package/src/components/APIKeyField/index.css +0 -105
- package/src/components/APIKeysEmptyState/index.client.tsx +0 -36
- package/src/components/AccessField/index.client.tsx +0 -299
- package/src/components/AccessField/index.css +0 -99
- package/src/components/SettingsMenu/index.client.tsx +0 -34
- package/src/translations/index.ts +0 -108
- package/src/translations/languages/ar.ts +0 -35
- package/src/translations/languages/az.ts +0 -35
- package/src/translations/languages/bg.ts +0 -35
- package/src/translations/languages/bnBd.ts +0 -35
- package/src/translations/languages/bnIn.ts +0 -35
- package/src/translations/languages/ca.ts +0 -35
- package/src/translations/languages/cs.ts +0 -35
- package/src/translations/languages/da.ts +0 -35
- package/src/translations/languages/de.ts +0 -35
- package/src/translations/languages/en.ts +0 -35
- package/src/translations/languages/es.ts +0 -35
- package/src/translations/languages/et.ts +0 -35
- package/src/translations/languages/fa.ts +0 -35
- package/src/translations/languages/fr.ts +0 -35
- package/src/translations/languages/he.ts +0 -35
- package/src/translations/languages/hr.ts +0 -35
- package/src/translations/languages/hu.ts +0 -35
- package/src/translations/languages/hy.ts +0 -35
- package/src/translations/languages/id.ts +0 -35
- package/src/translations/languages/is.ts +0 -35
- package/src/translations/languages/it.ts +0 -35
- package/src/translations/languages/ja.ts +0 -35
- package/src/translations/languages/ko.ts +0 -35
- package/src/translations/languages/lt.ts +0 -35
- package/src/translations/languages/lv.ts +0 -35
- package/src/translations/languages/my.ts +0 -35
- package/src/translations/languages/nb.ts +0 -35
- package/src/translations/languages/nl.ts +0 -35
- package/src/translations/languages/pl.ts +0 -35
- package/src/translations/languages/pt.ts +0 -35
- package/src/translations/languages/ro.ts +0 -35
- package/src/translations/languages/rs.ts +0 -35
- package/src/translations/languages/rsLatin.ts +0 -35
- package/src/translations/languages/ru.ts +0 -35
- package/src/translations/languages/sk.ts +0 -35
- package/src/translations/languages/sl.ts +0 -35
- package/src/translations/languages/sv.ts +0 -35
- package/src/translations/languages/ta.ts +0 -35
- package/src/translations/languages/th.ts +0 -35
- package/src/translations/languages/tr.ts +0 -35
- package/src/translations/languages/uk.ts +0 -35
- package/src/translations/languages/vi.ts +0 -35
- package/src/translations/languages/zh.ts +0 -35
- package/src/translations/languages/zhTw.ts +0 -35
- package/src/translations/types.ts +0 -34
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Language } from '@payloadcms/translations';
|
|
2
|
-
import type { enTranslations } from './languages/en.js';
|
|
3
|
-
export type PluginLanguage = Language<{
|
|
4
|
-
'plugin-mcp': {
|
|
5
|
-
apiKeyDescription: string;
|
|
6
|
-
apiKeys: string;
|
|
7
|
-
authentication: string;
|
|
8
|
-
description: string;
|
|
9
|
-
descriptionDescription: string;
|
|
10
|
-
dismiss: string;
|
|
11
|
-
keepKeyPrivate: string;
|
|
12
|
-
keyPrivateDescription: string;
|
|
13
|
-
lastUsed: string;
|
|
14
|
-
manageAPIKeys: string;
|
|
15
|
-
mcp: string;
|
|
16
|
-
noAPIKeys: string;
|
|
17
|
-
operations: string;
|
|
18
|
-
overrideAccess: string;
|
|
19
|
-
overrideAccessDescription: string;
|
|
20
|
-
permissions: string;
|
|
21
|
-
permissionsDescription: string;
|
|
22
|
-
prompts: string;
|
|
23
|
-
resources: string;
|
|
24
|
-
server: string;
|
|
25
|
-
title: string;
|
|
26
|
-
titleDescription: string;
|
|
27
|
-
tools: string;
|
|
28
|
-
userDescription: string;
|
|
29
|
-
};
|
|
30
|
-
}>;
|
|
31
|
-
export type PluginDefaultTranslationsObject = typeof enTranslations;
|
|
32
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/translations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,YAAY,EAAE;QACZ,iBAAiB,EAAE,MAAM,CAAA;QACzB,OAAO,EAAE,MAAM,CAAA;QACf,cAAc,EAAE,MAAM,CAAA;QACtB,WAAW,EAAE,MAAM,CAAA;QACnB,sBAAsB,EAAE,MAAM,CAAA;QAC9B,OAAO,EAAE,MAAM,CAAA;QACf,cAAc,EAAE,MAAM,CAAA;QACtB,qBAAqB,EAAE,MAAM,CAAA;QAC7B,QAAQ,EAAE,MAAM,CAAA;QAChB,aAAa,EAAE,MAAM,CAAA;QACrB,GAAG,EAAE,MAAM,CAAA;QACX,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,EAAE,MAAM,CAAA;QAClB,cAAc,EAAE,MAAM,CAAA;QACtB,yBAAyB,EAAE,MAAM,CAAA;QACjC,WAAW,EAAE,MAAM,CAAA;QACnB,sBAAsB,EAAE,MAAM,CAAA;QAC9B,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;QACb,gBAAgB,EAAE,MAAM,CAAA;QACxB,KAAK,EAAE,MAAM,CAAA;QACb,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;CACF,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,OAAO,cAAc,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/translations/types.ts"],"sourcesContent":["import type { Language } from '@payloadcms/translations'\n\nimport type { enTranslations } from './languages/en.js'\n\nexport type PluginLanguage = Language<{\n 'plugin-mcp': {\n apiKeyDescription: string\n apiKeys: string\n authentication: string\n description: string\n descriptionDescription: string\n dismiss: string\n keepKeyPrivate: string\n keyPrivateDescription: string\n lastUsed: string\n manageAPIKeys: string\n mcp: string\n noAPIKeys: string\n operations: string\n overrideAccess: string\n overrideAccessDescription: string\n permissions: string\n permissionsDescription: string\n prompts: string\n resources: string\n server: string\n title: string\n titleDescription: string\n tools: string\n userDescription: string\n }\n}>\n\nexport type PluginDefaultTranslationsObject = typeof enTranslations\n"],"names":[],"mappings":"AAiCA,WAAmE"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { JSONField } from 'payload'
|
|
2
|
-
|
|
3
|
-
import type { ClientMCPPluginConfig, MCPItem, SanitizedMCPPluginConfig } from '../types.js'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
COLLECTION_AUTH_BUILTINS,
|
|
7
|
-
COLLECTION_BUILTINS,
|
|
8
|
-
GLOBAL_BUILTINS,
|
|
9
|
-
} from '../mcp/builtinTools.js'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Returns the API key collection's `access` field — a JSON field whose value
|
|
13
|
-
* is the `MCPAPIKeysDocAccessTree` the endpoint consults. The actual UI is
|
|
14
|
-
* a custom client component (`AccessField`) which renders a permissions
|
|
15
|
-
* matrix; the field's stored shape is just the runtime access tree.
|
|
16
|
-
*/
|
|
17
|
-
export const getAccessField = ({
|
|
18
|
-
pluginConfig,
|
|
19
|
-
}: {
|
|
20
|
-
pluginConfig: SanitizedMCPPluginConfig
|
|
21
|
-
}): JSONField => {
|
|
22
|
-
const clientPluginConfig = sanitizeClientPluginConfig(pluginConfig)
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
name: 'access',
|
|
26
|
-
type: 'json',
|
|
27
|
-
admin: {
|
|
28
|
-
components: {
|
|
29
|
-
Field: {
|
|
30
|
-
clientProps: { pluginConfig: clientPluginConfig },
|
|
31
|
-
path: '@payloadcms/plugin-mcp/client#AccessField',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
defaultValue: {},
|
|
36
|
-
label: false,
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Strips the non-serializable parts of `SanitizedMCPPluginConfig` (handlers,
|
|
42
|
-
* input/argsSchema functions, etc.) so the result is safe to thread to a
|
|
43
|
-
* client component via `clientProps`.
|
|
44
|
-
*/
|
|
45
|
-
const sanitizeClientPluginConfig = (
|
|
46
|
-
pluginConfig: SanitizedMCPPluginConfig,
|
|
47
|
-
): ClientMCPPluginConfig => ({
|
|
48
|
-
items: pluginConfig.items.map((item) => {
|
|
49
|
-
const group = itemGroup(item)
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
...(item.type === 'collectionTool' ? { collectionSlug: item.collectionSlug } : {}),
|
|
53
|
-
...(item.type === 'globalTool' ? { globalSlug: item.globalSlug } : {}),
|
|
54
|
-
type: item.type,
|
|
55
|
-
configKey: item.configKey,
|
|
56
|
-
...(group === 'operations' ? {} : { description: itemDescription(item) }),
|
|
57
|
-
group,
|
|
58
|
-
label: item.label,
|
|
59
|
-
}
|
|
60
|
-
}),
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
const itemDescription = (item: MCPItem): string => {
|
|
64
|
-
if (item.type === 'prompt') {
|
|
65
|
-
return item.prompt.description
|
|
66
|
-
}
|
|
67
|
-
if (item.type === 'resource') {
|
|
68
|
-
return item.resource.description
|
|
69
|
-
}
|
|
70
|
-
return item.tool.description
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const itemGroup = (item: MCPItem): 'auth' | 'custom' | 'operations' | undefined => {
|
|
74
|
-
if (item.type === 'collectionTool') {
|
|
75
|
-
if (item.configKey in COLLECTION_BUILTINS) {
|
|
76
|
-
return 'operations'
|
|
77
|
-
}
|
|
78
|
-
return item.configKey in COLLECTION_AUTH_BUILTINS ? 'auth' : 'custom'
|
|
79
|
-
}
|
|
80
|
-
if (item.type === 'globalTool') {
|
|
81
|
-
return item.configKey in GLOBAL_BUILTINS ? 'operations' : 'custom'
|
|
82
|
-
}
|
|
83
|
-
return undefined
|
|
84
|
-
}
|
package/src/collection/index.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import type { CollectionConfig } from 'payload'
|
|
2
|
-
|
|
3
|
-
import { createAPIKeyFields } from 'payload'
|
|
4
|
-
|
|
5
|
-
import type { SanitizedMCPPluginConfig } from '../types.js'
|
|
6
|
-
|
|
7
|
-
import { getAccessField } from './getAccessField.js'
|
|
8
|
-
|
|
9
|
-
const apiKeyStorageFields = createAPIKeyFields({
|
|
10
|
-
apiKeyField: {
|
|
11
|
-
admin: {
|
|
12
|
-
components: { Field: '@payloadcms/plugin-mcp/client#APIKeyField' },
|
|
13
|
-
},
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
apiKeyIndexField: {
|
|
17
|
-
index: true,
|
|
18
|
-
required: true,
|
|
19
|
-
},
|
|
20
|
-
includeEnableAPIKey: false,
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
export const getAPIKeysCollection = ({
|
|
24
|
-
pluginConfig,
|
|
25
|
-
}: {
|
|
26
|
-
pluginConfig: SanitizedMCPPluginConfig
|
|
27
|
-
}): CollectionConfig => {
|
|
28
|
-
const collection: CollectionConfig = {
|
|
29
|
-
slug: 'payload-mcp-api-keys',
|
|
30
|
-
admin: {
|
|
31
|
-
components: {
|
|
32
|
-
views: {
|
|
33
|
-
list: {
|
|
34
|
-
NoResults: '@payloadcms/plugin-mcp/client#APIKeysEmptyState',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
defaultColumns: ['label', 'lastUsed', 'user'],
|
|
39
|
-
// Kept out of the main nav — reachable through the user menu's settings instead.
|
|
40
|
-
group: false,
|
|
41
|
-
useAsTitle: 'label',
|
|
42
|
-
},
|
|
43
|
-
fields: [
|
|
44
|
-
...apiKeyStorageFields,
|
|
45
|
-
getAccessField({ pluginConfig }),
|
|
46
|
-
{
|
|
47
|
-
name: 'label',
|
|
48
|
-
type: 'text',
|
|
49
|
-
admin: {
|
|
50
|
-
description: ({ t }) => t('plugin-mcp:titleDescription'),
|
|
51
|
-
position: 'sidebar',
|
|
52
|
-
},
|
|
53
|
-
label: ({ t }) => t('plugin-mcp:title'),
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: 'description',
|
|
57
|
-
type: 'text',
|
|
58
|
-
admin: {
|
|
59
|
-
description: ({ t }) => t('plugin-mcp:descriptionDescription'),
|
|
60
|
-
position: 'sidebar',
|
|
61
|
-
},
|
|
62
|
-
label: ({ t }) => t('plugin-mcp:description'),
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'lastUsed',
|
|
66
|
-
type: 'date',
|
|
67
|
-
admin: {
|
|
68
|
-
date: { pickerAppearance: 'dayAndTime' },
|
|
69
|
-
disabled: { field: true },
|
|
70
|
-
},
|
|
71
|
-
label: ({ t }) => t('plugin-mcp:lastUsed'),
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: 'user',
|
|
75
|
-
type: 'relationship',
|
|
76
|
-
admin: {
|
|
77
|
-
description: ({ t }) => t('plugin-mcp:userDescription'),
|
|
78
|
-
position: 'sidebar',
|
|
79
|
-
},
|
|
80
|
-
label: ({ t }) => t('general:user'),
|
|
81
|
-
relationTo: pluginConfig.userCollection,
|
|
82
|
-
required: true,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: 'overrideAccess',
|
|
86
|
-
type: 'checkbox',
|
|
87
|
-
admin: {
|
|
88
|
-
description: ({ t }) => t('plugin-mcp:overrideAccessDescription'),
|
|
89
|
-
position: 'sidebar',
|
|
90
|
-
},
|
|
91
|
-
defaultValue: false,
|
|
92
|
-
label: ({ t }) => t('plugin-mcp:overrideAccess'),
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
labels: {
|
|
96
|
-
plural: ({ t }) => `${t('plugin-mcp:mcp')} ${t('plugin-mcp:apiKeys')}`,
|
|
97
|
-
singular: ({ t }) => `${t('plugin-mcp:mcp')} ${t('authentication:apiKey')}`,
|
|
98
|
-
},
|
|
99
|
-
versions: false,
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return pluginConfig.overrideApiKeyCollection
|
|
103
|
-
? pluginConfig.overrideApiKeyCollection(collection)
|
|
104
|
-
: collection
|
|
105
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { APIKeyInput, Button, useField, useTranslation, WarningTriangleIcon } from '@payloadcms/ui'
|
|
4
|
-
import React, { useState } from 'react'
|
|
5
|
-
|
|
6
|
-
import type {
|
|
7
|
-
PluginMCPTranslationKeys,
|
|
8
|
-
PluginMCPTranslations,
|
|
9
|
-
} from '../../translations/index.js'
|
|
10
|
-
|
|
11
|
-
import './index.css'
|
|
12
|
-
|
|
13
|
-
const baseClass = 'mcp-api-key-field'
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Custom component for the MCP API-keys collection's `apiKey` field:
|
|
17
|
-
* - no key yet: a "Generate new key" button
|
|
18
|
-
* - key set: a dismissible privacy warning + the shared masked-key input
|
|
19
|
-
*/
|
|
20
|
-
export const APIKeyField: React.FC = () => {
|
|
21
|
-
const { setValue: setApiKey, value: apiKey } = useField<string>({ path: 'apiKey' })
|
|
22
|
-
const { t } = useTranslation<PluginMCPTranslations, PluginMCPTranslationKeys>()
|
|
23
|
-
const [isWarningDismissed, setIsWarningDismissed] = useState(false)
|
|
24
|
-
|
|
25
|
-
const generateKey = () => {
|
|
26
|
-
setApiKey(crypto.randomUUID())
|
|
27
|
-
setIsWarningDismissed(false)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div className={baseClass}>
|
|
32
|
-
<p className={`${baseClass}__description`}>
|
|
33
|
-
{t('plugin-mcp:apiKeyDescription')}
|
|
34
|
-
</p>
|
|
35
|
-
<div className={`${baseClass}__panel`}>
|
|
36
|
-
<div className={`${baseClass}__header`}>
|
|
37
|
-
<span className={`${baseClass}__title`}>{t('authentication:apiKey')}</span>
|
|
38
|
-
{!apiKey && (
|
|
39
|
-
<Button
|
|
40
|
-
buttonStyle="primary"
|
|
41
|
-
className={`${baseClass}__generate`}
|
|
42
|
-
onClick={generateKey}
|
|
43
|
-
>
|
|
44
|
-
{t('authentication:generateNewAPIKey')}
|
|
45
|
-
</Button>
|
|
46
|
-
)}
|
|
47
|
-
</div>
|
|
48
|
-
{Boolean(apiKey) && (
|
|
49
|
-
<div className={`${baseClass}__body`}>
|
|
50
|
-
{!isWarningDismissed && (
|
|
51
|
-
<div className={`${baseClass}__warning`}>
|
|
52
|
-
<WarningTriangleIcon className={`${baseClass}__warning-icon`} />
|
|
53
|
-
<p className={`${baseClass}__warning-text`}>
|
|
54
|
-
<strong>{t('plugin-mcp:keepKeyPrivate')}</strong>
|
|
55
|
-
{` ${t('plugin-mcp:keyPrivateDescription')}`}
|
|
56
|
-
</p>
|
|
57
|
-
<button
|
|
58
|
-
aria-label={t('plugin-mcp:dismiss')}
|
|
59
|
-
className={`${baseClass}__warning-dismiss`}
|
|
60
|
-
onClick={() => setIsWarningDismissed(true)}
|
|
61
|
-
type="button"
|
|
62
|
-
>
|
|
63
|
-
×
|
|
64
|
-
</button>
|
|
65
|
-
</div>
|
|
66
|
-
)}
|
|
67
|
-
<APIKeyInput aria-label={t('authentication:apiKey')} value={apiKey} />
|
|
68
|
-
</div>
|
|
69
|
-
)}
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
@layer payload-default {
|
|
2
|
-
/* Section wrapper: description + panel, closed off by a full-bleed divider
|
|
3
|
-
that spans the fields column past its horizontal gutter. */
|
|
4
|
-
.mcp-api-key-field {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: var(--base);
|
|
8
|
-
margin-inline: calc(-1 * var(--gutter-h));
|
|
9
|
-
padding-inline: var(--gutter-h);
|
|
10
|
-
padding-block-end: var(--spacer-4);
|
|
11
|
-
border-block-end: var(--stroke-width-small) solid var(--color-border);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.mcp-api-key-field__description {
|
|
15
|
-
margin: 0;
|
|
16
|
-
color: var(--color-text);
|
|
17
|
-
font-family: var(--text-body-medium-font-family);
|
|
18
|
-
font-size: var(--text-body-medium-font-size);
|
|
19
|
-
font-weight: var(--text-body-medium-font-weight);
|
|
20
|
-
line-height: var(--text-body-medium-line-height);
|
|
21
|
-
letter-spacing: var(--text-body-medium-letter-spacing);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.mcp-api-key-field__panel {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
background: var(--color-bg);
|
|
27
|
-
border: var(--stroke-width-small) solid var(--color-border);
|
|
28
|
-
border-radius: var(--button-radius);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.mcp-api-key-field__header {
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: space-between;
|
|
35
|
-
gap: var(--spacer-2);
|
|
36
|
-
min-height: var(--spacer-5);
|
|
37
|
-
padding: var(--spacer-2) var(--spacer-3);
|
|
38
|
-
background: var(--color-bg-secondary);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Holds the warning + key row; its top border is the full-width divider
|
|
42
|
-
under the header. Only rendered once a key exists. */
|
|
43
|
-
.mcp-api-key-field__body {
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
gap: var(--spacer-2);
|
|
47
|
-
padding: var(--spacer-3);
|
|
48
|
-
border-block-start: var(--stroke-width-small) solid var(--color-border);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.mcp-api-key-field__title {
|
|
52
|
-
color: var(--color-text);
|
|
53
|
-
font-family: var(--text-body-medium-strong-font-family);
|
|
54
|
-
font-size: var(--text-body-medium-strong-font-size);
|
|
55
|
-
font-weight: var(--text-body-medium-strong-font-weight);
|
|
56
|
-
line-height: var(--text-body-medium-strong-line-height);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.mcp-api-key-field__generate {
|
|
60
|
-
margin: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Matches the core Banner's warning treatment: theme-adaptive warning-tertiary
|
|
64
|
-
bg with regular --color-text (NOT --color-text-onwarning, which is only
|
|
65
|
-
defined for light mode and reads as muddy dark-on-dark in dark mode). */
|
|
66
|
-
.mcp-api-key-field__warning {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
gap: calc(var(--base) / 2);
|
|
70
|
-
padding: calc(var(--spacer-2) + (var(--spacer-1) / 2)) calc(var(--base) / 2);
|
|
71
|
-
background: var(--color-bg-warning-tertiary);
|
|
72
|
-
border: none;
|
|
73
|
-
border-radius: var(--radius-medium);
|
|
74
|
-
color: var(--color-text);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.mcp-api-key-field__warning-icon {
|
|
78
|
-
flex-shrink: 0;
|
|
79
|
-
width: 15px;
|
|
80
|
-
height: 13px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.mcp-api-key-field__warning-text {
|
|
84
|
-
flex-grow: 1;
|
|
85
|
-
margin: 0;
|
|
86
|
-
font-family: var(--text-body-medium-font-family);
|
|
87
|
-
font-size: var(--text-body-medium-font-size);
|
|
88
|
-
line-height: var(--text-body-medium-line-height);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.mcp-api-key-field__warning-text strong {
|
|
92
|
-
font-weight: var(--text-body-medium-strong-font-weight);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.mcp-api-key-field__warning-dismiss {
|
|
96
|
-
appearance: none;
|
|
97
|
-
background: none;
|
|
98
|
-
border: none;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
color: inherit;
|
|
101
|
-
font-size: 1rem;
|
|
102
|
-
line-height: 1;
|
|
103
|
-
padding: 0;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import type { NoResultsClientProps } from 'payload'
|
|
4
|
-
|
|
5
|
-
import { Button, NoListResults, useTranslation } from '@payloadcms/ui'
|
|
6
|
-
import React from 'react'
|
|
7
|
-
|
|
8
|
-
import type {
|
|
9
|
-
PluginMCPTranslationKeys,
|
|
10
|
-
PluginMCPTranslations,
|
|
11
|
-
} from '../../translations/index.js'
|
|
12
|
-
|
|
13
|
-
export const APIKeysEmptyState: React.FC<NoResultsClientProps> = ({
|
|
14
|
-
hasCreatePermission,
|
|
15
|
-
newDocumentURL,
|
|
16
|
-
viewType,
|
|
17
|
-
}) => {
|
|
18
|
-
const { t } = useTranslation<PluginMCPTranslations, PluginMCPTranslationKeys>()
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<NoListResults
|
|
22
|
-
Actions={
|
|
23
|
-
hasCreatePermission && newDocumentURL && viewType !== 'trash'
|
|
24
|
-
? [
|
|
25
|
-
<Button el="link" key="create" to={newDocumentURL}>
|
|
26
|
-
{t('authentication:generateNewAPIKey')}
|
|
27
|
-
</Button>,
|
|
28
|
-
]
|
|
29
|
-
: []
|
|
30
|
-
}
|
|
31
|
-
description={t('plugin-mcp:apiKeyDescription')}
|
|
32
|
-
title={t('plugin-mcp:noAPIKeys')}
|
|
33
|
-
withMargin
|
|
34
|
-
/>
|
|
35
|
-
)
|
|
36
|
-
}
|