zudoku 0.51.0 → 0.52.1
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/config/validators/InputNavigationSchema.d.ts +152 -0
- package/dist/config/validators/NavigationSchema.js +1 -1
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +38 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +10 -0
- package/dist/config/validators/validate.js +7 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +1 -1
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +2 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +4 -8
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
- package/dist/lib/plugins/custom-pages/index.js +1 -3
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
- package/dist/lib/plugins/markdown/MdxPage.js +22 -6
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +8 -1
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +14 -11
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +52 -34
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +66 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -32
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.js +3 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/ui/CodeBlock.js +5 -6
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/util/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/vite/api/SchemaManager.js +6 -2
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +42 -11
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +82 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +56 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/utils.d.ts +2 -0
- package/dist/vite/mdx/utils.js +31 -0
- package/dist/vite/mdx/utils.js.map +1 -0
- package/dist/vite/plugin-frontmatter.js +4 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.js +11 -33
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +21 -9
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +22 -1
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/lib/Alert-CT_ViLrJ.js +161 -0
- package/lib/Alert-CT_ViLrJ.js.map +1 -0
- package/lib/CodeBlock-DAKxs_Tu.js +85 -0
- package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
- package/lib/Command-CPtGTZAL.js +140 -0
- package/lib/Command-CPtGTZAL.js.map +1 -0
- package/lib/{Dialog-BxpuVLh9.js → Dialog-DGlrUTCS.js} +4 -4
- package/lib/Dialog-DGlrUTCS.js.map +1 -0
- package/lib/MdxPage-D-QSUlMf.js +110 -0
- package/lib/MdxPage-D-QSUlMf.js.map +1 -0
- package/lib/{OasProvider-BC0q5m3u.js → OasProvider-DKB2uJU-.js} +3 -3
- package/lib/{OasProvider-BC0q5m3u.js.map → OasProvider-DKB2uJU-.js.map} +1 -1
- package/lib/{OperationList-Dpip6ozi.js → OperationList-CccIt45w.js} +579 -567
- package/lib/OperationList-CccIt45w.js.map +1 -0
- package/lib/Pagination-ClHXydm9.js +36 -0
- package/lib/Pagination-ClHXydm9.js.map +1 -0
- package/lib/RouteGuard-Bd-ppFbi.js +737 -0
- package/lib/RouteGuard-Bd-ppFbi.js.map +1 -0
- package/lib/{SchemaList-t4BIfh6Z.js → SchemaList-DY3FBF2U.js} +26 -37
- package/lib/SchemaList-DY3FBF2U.js.map +1 -0
- package/lib/{SchemaView-CLxthVcA.js → SchemaView-matL2maR.js} +94 -103
- package/lib/SchemaView-matL2maR.js.map +1 -0
- package/lib/{SignUp-B6w5AwHM.js → SignUp-CfojO4Pb.js} +13 -13
- package/lib/{SignUp-B6w5AwHM.js.map → SignUp-CfojO4Pb.js.map} +1 -1
- package/lib/{Markdown-BQ8YqLsz.js → Slot-DwZlQ-vX.js} +3347 -3001
- package/lib/Slot-DwZlQ-vX.js.map +1 -0
- package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-CrjhGEwT.js} +3 -3
- package/lib/{SyntaxHighlight-C5ja40ix.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
- package/lib/{Toc-BS0f4GTe.js → Toc-WCmwFkX-.js} +2 -2
- package/lib/{Toc-BS0f4GTe.js.map → Toc-WCmwFkX-.js.map} +1 -1
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
- package/lib/{circular-DfOaDE_x.js → circular-CqHpo7-e.js} +2 -2
- package/lib/{circular-DfOaDE_x.js.map → circular-CqHpo7-e.js.map} +1 -1
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/{createServer-DjOMygls.js → createServer-ByKo3XCG.js} +4 -4
- package/lib/{createServer-DjOMygls.js.map → createServer-ByKo3XCG.js.map} +1 -1
- package/lib/{errors-D_5vKvUq.js → errors-BsabiSKg.js} +5 -5
- package/lib/{errors-D_5vKvUq.js.map → errors-BsabiSKg.js.map} +1 -1
- package/lib/{hook-CHXroBFt.js → hook-Bd0yS8M0.js} +36 -36
- package/lib/{hook-CHXroBFt.js.map → hook-Bd0yS8M0.js.map} +1 -1
- package/lib/index-BIbCx5Fh.js +3919 -0
- package/lib/index-BIbCx5Fh.js.map +1 -0
- package/lib/index-CEfpz8vY.js +3458 -0
- package/lib/index-CEfpz8vY.js.map +1 -0
- package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
- package/lib/index-ClhS5TxS.js +107 -0
- package/lib/index-ClhS5TxS.js.map +1 -0
- package/lib/ui/CodeBlock.js +6 -73
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +2 -2
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +33 -3534
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +10 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-keys.js +268 -321
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -20
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +4 -5
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +201 -111
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +5 -4
- package/src/lib/components/Autocomplete.tsx +1 -0
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Markdown.tsx +3 -5
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/Pagination.tsx +4 -4
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/errors/ErrorAlert.tsx +3 -9
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -9
- package/src/lib/plugins/custom-pages/index.tsx +2 -6
- package/src/lib/plugins/markdown/MdxPage.tsx +66 -15
- package/src/lib/plugins/markdown/index.tsx +10 -2
- package/src/lib/plugins/openapi/OperationList.tsx +7 -17
- package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +36 -28
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +3 -4
- package/src/lib/plugins/openapi/playground/Playground.tsx +196 -136
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +104 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +98 -97
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +62 -92
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
- package/src/lib/plugins/openapi/schema/utils.ts +3 -2
- package/src/lib/ui/CodeBlock.tsx +5 -6
- package/src/lib/ui/Dialog.tsx +1 -1
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/dist/flat-config.d.ts +0 -320
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/lib/Callout-CoVxYafP.js +0 -231
- package/lib/Callout-CoVxYafP.js.map +0 -1
- package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
- package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
- package/lib/Dialog-BxpuVLh9.js.map +0 -1
- package/lib/Markdown-BQ8YqLsz.js.map +0 -1
- package/lib/MdxPage-DJvKmI-r.js +0 -84
- package/lib/MdxPage-DJvKmI-r.js.map +0 -1
- package/lib/OperationList-Dpip6ozi.js.map +0 -1
- package/lib/Pagination-CCxhL836.js +0 -36
- package/lib/Pagination-CCxhL836.js.map +0 -1
- package/lib/RouteGuard-gV7nvzi7.js +0 -55
- package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
- package/lib/SchemaList-t4BIfh6Z.js.map +0 -1
- package/lib/SchemaView-CLxthVcA.js.map +0 -1
- package/lib/Slot-CSEIvwwO.js +0 -161
- package/lib/Slot-CSEIvwwO.js.map +0 -1
- package/lib/clerk-yAKDC3Qz.js +0 -24812
- package/lib/clerk-yAKDC3Qz.js.map +0 -1
- package/lib/index--oeBayMa.js +0 -86
- package/lib/index--oeBayMa.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-DW2qmCJa.js +0 -3227
- package/lib/index-DW2qmCJa.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/index.esm-BFcSKCe-.js +0 -683
- package/lib/index.esm-BFcSKCe-.js.map +0 -1
- package/lib/mutation-BpcyTgWI.js +0 -196
- package/lib/mutation-BpcyTgWI.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
- package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
- package/lib/useLatest-hmRS46UF.js +0 -11
- package/lib/useLatest-hmRS46UF.js.map +0 -1
- package/lib/useMutation-N4ockVKi.js +0 -97
- package/lib/useMutation-N4ockVKi.js.map +0 -1
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
|
@@ -1,51 +1,49 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { CircleSlashIcon as
|
|
3
|
-
import { D as
|
|
4
|
-
import { i as
|
|
5
|
-
import { O as
|
|
6
|
-
import {
|
|
7
|
-
import { Button as
|
|
8
|
-
import { u as
|
|
9
|
-
import * as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import { c as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
const
|
|
17
|
-
const t =
|
|
18
|
-
return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(
|
|
2
|
+
import { CircleSlashIcon as R, CheckIcon as _, XIcon as se, PencilLineIcon as ne, RefreshCwIcon as ie, EyeOffIcon as re, EyeIcon as ae, CopyIcon as oe, TrashIcon as le, KeyRoundIcon as ce } from "lucide-react";
|
|
3
|
+
import { D as de, a as F, R as ue } from "./Slot-DwZlQ-vX.js";
|
|
4
|
+
import { i as E } from "./invariant-DAFpPywt.js";
|
|
5
|
+
import { O as he, L as $ } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
6
|
+
import { e as pe, d as fe, g as me, c as xe } from "./hook-Bd0yS8M0.js";
|
|
7
|
+
import { Button as y } from "./ui/Button.js";
|
|
8
|
+
import { u as z, A as T, a as M } from "./Alert-CT_ViLrJ.js";
|
|
9
|
+
import * as q from "react";
|
|
10
|
+
import ye, { createContext as L, useLayoutEffect as ge, useEffect as je, useRef as k, useId as H, useContext as B, useInsertionEffect as Ce, useCallback as ve, useMemo as S, Children as we, isValidElement as ke, useState as b } from "react";
|
|
11
|
+
import { C as be, a as Ee } from "./Card-DPhGbYUM.js";
|
|
12
|
+
import { D as J, e as U, a as V, c as Y, b as G, d as Z, f as W, g as K } from "./Dialog-DGlrUTCS.js";
|
|
13
|
+
import { Input as Ne } from "./ui/Input.js";
|
|
14
|
+
import { c as P } from "./cn-wvCW-ho6.js";
|
|
15
|
+
import { u as De } from "./CodeBlock-DAKxs_Tu.js";
|
|
16
|
+
const Ie = () => {
|
|
17
|
+
const t = pe();
|
|
18
|
+
return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(he, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
|
|
19
19
|
"Please login first to view this page",
|
|
20
|
-
/* @__PURE__ */ e.jsx(
|
|
21
|
-
] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(
|
|
20
|
+
/* @__PURE__ */ e.jsx(y, { onClick: () => t.login(), children: "Login" })
|
|
21
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(de, { className: "max-w-[600px]", children: [
|
|
22
22
|
"Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
|
|
23
23
|
/* @__PURE__ */ e.jsx("code", { children: "authentication" }),
|
|
24
24
|
"."
|
|
25
25
|
] }) });
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return typeof t == "object" && t !== null;
|
|
34
|
-
}
|
|
35
|
-
function Se(t) {
|
|
36
|
-
return Me(t) && "offsetHeight" in t;
|
|
37
|
-
}
|
|
38
|
-
const qe = O({
|
|
26
|
+
}, Ke = (t) => t;
|
|
27
|
+
let X = Ke;
|
|
28
|
+
process.env.NODE_ENV !== "production" && (X = (t, i) => {
|
|
29
|
+
if (!t)
|
|
30
|
+
throw new Error(i);
|
|
31
|
+
});
|
|
32
|
+
const Pe = L(null), Ae = L({}), Re = L({
|
|
39
33
|
transformPagePoint: (t) => t,
|
|
40
34
|
isStatic: !1,
|
|
41
35
|
reducedMotion: "never"
|
|
42
|
-
});
|
|
43
|
-
|
|
36
|
+
}), ze = typeof window < "u", Te = ze ? ge : je;
|
|
37
|
+
function ee(t) {
|
|
38
|
+
const i = k(null);
|
|
39
|
+
return i.current === null && (i.current = t()), i.current;
|
|
40
|
+
}
|
|
41
|
+
class Me extends q.Component {
|
|
44
42
|
getSnapshotBeforeUpdate(i) {
|
|
45
43
|
const s = this.props.childRef.current;
|
|
46
44
|
if (s && i.isPresent && !this.props.isPresent) {
|
|
47
|
-
const n =
|
|
48
|
-
|
|
45
|
+
const n = this.props.sizeRef.current;
|
|
46
|
+
n.height = s.offsetHeight || 0, n.width = s.offsetWidth || 0, n.top = s.offsetTop, n.left = s.offsetLeft;
|
|
49
47
|
}
|
|
50
48
|
return null;
|
|
51
49
|
}
|
|
@@ -58,277 +56,230 @@ class Le extends F.Component {
|
|
|
58
56
|
return this.props.children;
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
59
|
+
function Se({ children: t, isPresent: i }) {
|
|
60
|
+
const s = H(), n = k(null), o = k({
|
|
63
61
|
width: 0,
|
|
64
62
|
height: 0,
|
|
65
63
|
top: 0,
|
|
66
|
-
left: 0
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (i || !o.current || !x || !f)
|
|
64
|
+
left: 0
|
|
65
|
+
}), { nonce: l } = B(Re);
|
|
66
|
+
return Ce(() => {
|
|
67
|
+
const { width: m, height: a, top: x, left: h } = o.current;
|
|
68
|
+
if (i || !n.current || !m || !a)
|
|
72
69
|
return;
|
|
73
|
-
|
|
74
|
-
o.current.dataset.motionPopId = n;
|
|
70
|
+
n.current.dataset.motionPopId = s;
|
|
75
71
|
const p = document.createElement("style");
|
|
76
|
-
return
|
|
77
|
-
[data-motion-pop-id="${
|
|
72
|
+
return l && (p.nonce = l), document.head.appendChild(p), p.sheet && p.sheet.insertRule(`
|
|
73
|
+
[data-motion-pop-id="${s}"] {
|
|
78
74
|
position: absolute !important;
|
|
79
|
-
width: ${
|
|
80
|
-
height: ${
|
|
81
|
-
${
|
|
82
|
-
|
|
75
|
+
width: ${m}px !important;
|
|
76
|
+
height: ${a}px !important;
|
|
77
|
+
top: ${x}px !important;
|
|
78
|
+
left: ${h}px !important;
|
|
83
79
|
}
|
|
84
80
|
`), () => {
|
|
85
|
-
document.head.
|
|
81
|
+
document.head.removeChild(p);
|
|
86
82
|
};
|
|
87
|
-
}, [i]), e.jsx(
|
|
83
|
+
}, [i]), e.jsx(Me, { isPresent: i, childRef: n, sizeRef: o, children: q.cloneElement(t, { ref: n }) });
|
|
88
84
|
}
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
85
|
+
const qe = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: o, presenceAffectsLayout: l, mode: m }) => {
|
|
86
|
+
const a = ee(Le), x = H(), h = ve((d) => {
|
|
87
|
+
a.set(d, !0);
|
|
88
|
+
for (const C of a.values())
|
|
89
|
+
if (!C)
|
|
90
|
+
return;
|
|
91
|
+
n && n();
|
|
92
|
+
}, [a, n]), p = S(
|
|
93
|
+
() => ({
|
|
94
|
+
id: x,
|
|
95
|
+
initial: i,
|
|
96
|
+
isPresent: s,
|
|
97
|
+
custom: o,
|
|
98
|
+
onExitComplete: h,
|
|
99
|
+
register: (d) => (a.set(d, !1), () => a.delete(d))
|
|
100
|
+
}),
|
|
101
|
+
/**
|
|
102
|
+
* If the presence of a child affects the layout of the components around it,
|
|
103
|
+
* we want to make a new context value to ensure they get re-rendered
|
|
104
|
+
* so they can detect that layout change.
|
|
105
|
+
*/
|
|
106
|
+
l ? [Math.random(), h] : [s, h]
|
|
107
|
+
);
|
|
108
|
+
return S(() => {
|
|
109
|
+
a.forEach((d, C) => a.set(C, !1));
|
|
110
|
+
}, [s]), q.useEffect(() => {
|
|
111
|
+
!s && !a.size && n && n();
|
|
112
|
+
}, [s]), m === "popLayout" && (t = e.jsx(Se, { isPresent: s, children: t })), e.jsx(Pe.Provider, { value: p, children: t });
|
|
110
113
|
};
|
|
111
|
-
function
|
|
114
|
+
function Le() {
|
|
112
115
|
return /* @__PURE__ */ new Map();
|
|
113
116
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (i === null)
|
|
117
|
-
return [!0, null];
|
|
118
|
-
const { isPresent: s, onExitComplete: n, register: o } = i, r = Q();
|
|
119
|
-
W(() => {
|
|
120
|
-
if (t)
|
|
121
|
-
return o(r);
|
|
122
|
-
}, [t]);
|
|
123
|
-
const u = be(() => t && n && n(r), [r, n, t]);
|
|
124
|
-
return !s && n ? [!1, u] : [!0];
|
|
125
|
-
}
|
|
126
|
-
const I = (t) => t.key || "";
|
|
127
|
-
function U(t) {
|
|
117
|
+
const N = (t) => t.key || "";
|
|
118
|
+
function Q(t) {
|
|
128
119
|
const i = [];
|
|
129
|
-
return
|
|
130
|
-
|
|
120
|
+
return we.forEach(t, (s) => {
|
|
121
|
+
ke(s) && i.push(s);
|
|
131
122
|
}), i;
|
|
132
123
|
}
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
const Oe = ({ children: t, exitBeforeEnter: i, custom: s, initial: n = !0, onExitComplete: o, presenceAffectsLayout: l = !0, mode: m = "sync" }) => {
|
|
125
|
+
X(!i, "Replace exitBeforeEnter with mode='wait'");
|
|
126
|
+
const a = S(() => Q(t), [t]), x = a.map(N), h = k(!0), p = k(a), d = ee(() => /* @__PURE__ */ new Map()), [C, w] = b(a), [j, r] = b(a);
|
|
127
|
+
Te(() => {
|
|
128
|
+
h.current = !1, p.current = a;
|
|
129
|
+
for (let f = 0; f < j.length; f++) {
|
|
130
|
+
const u = N(j[f]);
|
|
131
|
+
x.includes(u) ? d.delete(u) : d.get(u) !== !0 && d.set(u, !1);
|
|
140
132
|
}
|
|
141
|
-
}, [
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
let
|
|
145
|
-
for (let
|
|
146
|
-
const
|
|
147
|
-
|
|
133
|
+
}, [j, x.length, x.join("-")]);
|
|
134
|
+
const c = [];
|
|
135
|
+
if (a !== C) {
|
|
136
|
+
let f = [...a];
|
|
137
|
+
for (let u = 0; u < j.length; u++) {
|
|
138
|
+
const v = j[u], A = N(v);
|
|
139
|
+
x.includes(A) || (f.splice(u, 0, v), c.push(v));
|
|
148
140
|
}
|
|
149
|
-
|
|
141
|
+
m === "wait" && c.length && (f = c), r(Q(f)), w(a);
|
|
142
|
+
return;
|
|
150
143
|
}
|
|
151
|
-
process.env.NODE_ENV !== "production" &&
|
|
152
|
-
const { forceRender:
|
|
153
|
-
return e.jsx(e.Fragment, { children:
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
|
|
144
|
+
process.env.NODE_ENV !== "production" && m === "wait" && j.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
145
|
+
const { forceRender: g } = B(Ae);
|
|
146
|
+
return e.jsx(e.Fragment, { children: j.map((f) => {
|
|
147
|
+
const u = N(f), v = a === j || x.includes(u), A = () => {
|
|
148
|
+
if (d.has(u))
|
|
149
|
+
d.set(u, !0);
|
|
157
150
|
else
|
|
158
151
|
return;
|
|
159
|
-
let
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}),
|
|
152
|
+
let O = !0;
|
|
153
|
+
d.forEach((te) => {
|
|
154
|
+
te || (O = !1);
|
|
155
|
+
}), O && (g?.(), r(p.current), o && o());
|
|
163
156
|
};
|
|
164
|
-
return e.jsx(
|
|
157
|
+
return e.jsx(qe, { isPresent: v, initial: !h.current || n ? void 0 : !1, custom: v ? void 0 : s, presenceAffectsLayout: l, mode: m, onExitComplete: v ? void 0 : A, children: f }, u);
|
|
165
158
|
}) });
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
{
|
|
169
|
-
variants: {
|
|
170
|
-
variant: {
|
|
171
|
-
default: "bg-card text-card-foreground",
|
|
172
|
-
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
defaultVariants: {
|
|
176
|
-
variant: "default"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
);
|
|
180
|
-
function q({
|
|
181
|
-
className: t,
|
|
182
|
-
variant: i,
|
|
183
|
-
...s
|
|
184
|
-
}) {
|
|
185
|
-
return /* @__PURE__ */ e.jsx(
|
|
186
|
-
"div",
|
|
187
|
-
{
|
|
188
|
-
"data-slot": "alert",
|
|
189
|
-
role: "alert",
|
|
190
|
-
className: N(He({ variant: i }), t),
|
|
191
|
-
...s
|
|
192
|
-
}
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
function L({ className: t, ...i }) {
|
|
196
|
-
return /* @__PURE__ */ e.jsx(
|
|
197
|
-
"div",
|
|
198
|
-
{
|
|
199
|
-
"data-slot": "alert-title",
|
|
200
|
-
className: N(
|
|
201
|
-
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
202
|
-
t
|
|
203
|
-
),
|
|
204
|
-
...i
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
const Be = ({ service: t }) => {
|
|
209
|
-
const i = ge(), s = je(), [n, o] = E(
|
|
159
|
+
}, Fe = ({ service: t }) => {
|
|
160
|
+
const i = fe(), s = me(), [n, o] = b(
|
|
210
161
|
null
|
|
211
|
-
), [
|
|
162
|
+
), [l, m] = b(""), { data: a, isFetching: x } = xe({
|
|
212
163
|
queryFn: () => t.getConsumers(i),
|
|
213
164
|
queryKey: ["api-keys"],
|
|
214
165
|
retry: !1
|
|
215
|
-
}), h =
|
|
166
|
+
}), h = z({
|
|
216
167
|
mutationFn: ({
|
|
217
|
-
consumerId:
|
|
168
|
+
consumerId: r,
|
|
218
169
|
keyId: c
|
|
219
170
|
}) => {
|
|
220
171
|
if (!t.deleteKey)
|
|
221
172
|
throw new Error("deleteKey not implemented");
|
|
222
|
-
return t.deleteKey(
|
|
173
|
+
return t.deleteKey(r, c, i);
|
|
223
174
|
},
|
|
224
|
-
onMutate: async ({ consumerId:
|
|
175
|
+
onMutate: async ({ consumerId: r, keyId: c }) => {
|
|
225
176
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
226
|
-
const
|
|
177
|
+
const g = s.getQueryData([
|
|
227
178
|
"api-keys"
|
|
228
179
|
]);
|
|
229
|
-
return s.setQueryData(["api-keys"], (
|
|
230
|
-
...
|
|
231
|
-
apiKeys:
|
|
232
|
-
} :
|
|
180
|
+
return s.setQueryData(["api-keys"], (f) => f && f.map((u) => u.id === r ? {
|
|
181
|
+
...u,
|
|
182
|
+
apiKeys: u.apiKeys.filter((v) => v.id !== c)
|
|
183
|
+
} : u)), { previousData: g };
|
|
233
184
|
},
|
|
234
|
-
onError: (
|
|
235
|
-
|
|
185
|
+
onError: (r, c, g) => {
|
|
186
|
+
g?.previousData && s.setQueryData(["api-keys"], g.previousData);
|
|
236
187
|
},
|
|
237
188
|
onSuccess: () => {
|
|
238
189
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
239
190
|
}
|
|
240
|
-
}),
|
|
191
|
+
}), p = z({
|
|
241
192
|
mutationFn: ({
|
|
242
|
-
consumerId:
|
|
193
|
+
consumerId: r,
|
|
243
194
|
label: c
|
|
244
195
|
}) => {
|
|
245
196
|
if (!t.updateConsumer)
|
|
246
197
|
throw new Error("updateConsumer not implemented");
|
|
247
|
-
return t.updateConsumer({ id:
|
|
198
|
+
return t.updateConsumer({ id: r, label: c }, i);
|
|
248
199
|
},
|
|
249
|
-
onMutate: async ({ consumerId:
|
|
200
|
+
onMutate: async ({ consumerId: r, label: c }) => {
|
|
250
201
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
251
|
-
const
|
|
252
|
-
return s.setQueryData(["api-keys"], (
|
|
253
|
-
...
|
|
202
|
+
const g = s.getQueryData(["api-keys"]);
|
|
203
|
+
return s.setQueryData(["api-keys"], (f) => f && f.map((u) => u.id === r ? {
|
|
204
|
+
...u,
|
|
254
205
|
label: c
|
|
255
|
-
} :
|
|
206
|
+
} : u)), { previousData: g };
|
|
256
207
|
},
|
|
257
|
-
onError: (
|
|
258
|
-
|
|
208
|
+
onError: (r, c, g) => {
|
|
209
|
+
g?.previousData && s.setQueryData(["api-keys"], g.previousData);
|
|
259
210
|
},
|
|
260
211
|
onSuccess: () => {
|
|
261
212
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
262
213
|
}
|
|
263
|
-
}),
|
|
264
|
-
mutationFn: (
|
|
214
|
+
}), d = z({
|
|
215
|
+
mutationFn: (r) => {
|
|
265
216
|
if (!t.rollKey)
|
|
266
217
|
throw new Error("rollKey not implemented");
|
|
267
|
-
return t.rollKey(
|
|
218
|
+
return t.rollKey(r, i);
|
|
268
219
|
},
|
|
269
220
|
onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
|
|
270
|
-
}),
|
|
271
|
-
o(
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
consumerId:
|
|
275
|
-
label:
|
|
276
|
-
}), o(null),
|
|
277
|
-
},
|
|
278
|
-
o(null),
|
|
221
|
+
}), C = (r, c) => {
|
|
222
|
+
o(r), m(c);
|
|
223
|
+
}, w = (r) => {
|
|
224
|
+
l.trim() && p.mutate({
|
|
225
|
+
consumerId: r,
|
|
226
|
+
label: l.trim()
|
|
227
|
+
}), o(null), m("");
|
|
228
|
+
}, j = () => {
|
|
229
|
+
o(null), m("");
|
|
279
230
|
};
|
|
280
231
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
|
|
281
|
-
/* @__PURE__ */ e.jsx(
|
|
232
|
+
/* @__PURE__ */ e.jsx(F.Target, { name: "api-keys-list-page" }),
|
|
282
233
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
|
|
283
234
|
/* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
|
|
284
|
-
t.createKey && /* @__PURE__ */ e.jsx(
|
|
235
|
+
t.createKey && /* @__PURE__ */ e.jsx(y, { asChild: !0, children: /* @__PURE__ */ e.jsx($, { to: "/settings/api-keys/new", children: "Create API Key" }) })
|
|
285
236
|
] }),
|
|
286
237
|
/* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
|
|
287
|
-
/* @__PURE__ */ e.jsx(
|
|
238
|
+
/* @__PURE__ */ e.jsx(F.Target, { name: "api-keys-list-page-before-keys" }),
|
|
288
239
|
/* @__PURE__ */ e.jsx("div", { className: "h-8" }),
|
|
289
|
-
|
|
290
|
-
/* @__PURE__ */ e.jsx(
|
|
291
|
-
/* @__PURE__ */ e.jsx(
|
|
240
|
+
d.isError && /* @__PURE__ */ e.jsxs(T, { variant: "destructive", className: "mb-4", children: [
|
|
241
|
+
/* @__PURE__ */ e.jsx(R, { size: 16 }),
|
|
242
|
+
/* @__PURE__ */ e.jsx(M, { children: d.error.message })
|
|
292
243
|
] }),
|
|
293
|
-
|
|
294
|
-
/* @__PURE__ */ e.jsx(
|
|
295
|
-
/* @__PURE__ */ e.jsx(
|
|
244
|
+
p.isError && /* @__PURE__ */ e.jsxs(T, { variant: "destructive", className: "mb-4", children: [
|
|
245
|
+
/* @__PURE__ */ e.jsx(R, { size: 16 }),
|
|
246
|
+
/* @__PURE__ */ e.jsx(M, { children: p.error.message })
|
|
296
247
|
] }),
|
|
297
|
-
h.isError && /* @__PURE__ */ e.jsxs(
|
|
298
|
-
/* @__PURE__ */ e.jsx(
|
|
299
|
-
/* @__PURE__ */ e.jsx(
|
|
248
|
+
h.isError && /* @__PURE__ */ e.jsxs(T, { variant: "destructive", className: "mb-4", children: [
|
|
249
|
+
/* @__PURE__ */ e.jsx(R, { size: 16 }),
|
|
250
|
+
/* @__PURE__ */ e.jsx(M, { children: h.error.message })
|
|
300
251
|
] }),
|
|
301
|
-
/* @__PURE__ */ e.jsx("div", { className: "", children:
|
|
252
|
+
/* @__PURE__ */ e.jsx("div", { className: "", children: a.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex col-span-full flex-col justify-center gap-4 items-center p-8 border rounded-sm bg-muted/30 text-muted-foreground", children: [
|
|
302
253
|
/* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
|
|
303
254
|
"You have no API keys yet.",
|
|
304
255
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
305
256
|
t.createKey && "Get started and create your first key."
|
|
306
257
|
] }),
|
|
307
|
-
t.createKey && /* @__PURE__ */ e.jsx(
|
|
258
|
+
t.createKey && /* @__PURE__ */ e.jsx(y, { asChild: !0, variant: "outline", children: /* @__PURE__ */ e.jsx($, { to: "/settings/api-keys/new", children: "Create API Key" }) })
|
|
308
259
|
] }) : /* @__PURE__ */ e.jsx(
|
|
309
260
|
"ul",
|
|
310
261
|
{
|
|
311
|
-
className:
|
|
262
|
+
className: P(
|
|
312
263
|
"grid grid-cols-1 divide-y divide-border col-span-6",
|
|
313
264
|
"lg:grid-cols-[1fr_min-content]"
|
|
314
265
|
),
|
|
315
|
-
children:
|
|
316
|
-
|
|
266
|
+
children: a.map((r) => /* @__PURE__ */ e.jsxs(
|
|
267
|
+
be,
|
|
317
268
|
{
|
|
318
269
|
className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
|
|
319
270
|
children: [
|
|
320
|
-
/* @__PURE__ */ e.jsxs(
|
|
271
|
+
/* @__PURE__ */ e.jsxs(Ee, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
|
|
321
272
|
/* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
|
|
322
273
|
/* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
|
|
323
|
-
n ===
|
|
274
|
+
n === r.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
324
275
|
/* @__PURE__ */ e.jsx(
|
|
325
|
-
|
|
276
|
+
Ne,
|
|
326
277
|
{
|
|
327
278
|
maxLength: 32,
|
|
328
|
-
value:
|
|
329
|
-
onChange: (c) =>
|
|
279
|
+
value: l,
|
|
280
|
+
onChange: (c) => m(c.target.value),
|
|
330
281
|
onKeyDown: (c) => {
|
|
331
|
-
c.key === "Enter" ?
|
|
282
|
+
c.key === "Enter" ? w(r.id) : c.key === "Escape" && j();
|
|
332
283
|
},
|
|
333
284
|
className: "text-lg font-medium",
|
|
334
285
|
autoFocus: !0
|
|
@@ -336,90 +287,90 @@ const Be = ({ service: t }) => {
|
|
|
336
287
|
),
|
|
337
288
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
338
289
|
/* @__PURE__ */ e.jsx(
|
|
339
|
-
|
|
290
|
+
y,
|
|
340
291
|
{
|
|
341
292
|
size: "icon",
|
|
342
293
|
variant: "ghost",
|
|
343
|
-
onClick: () =>
|
|
344
|
-
disabled: !
|
|
345
|
-
children: /* @__PURE__ */ e.jsx(
|
|
294
|
+
onClick: () => w(r.id),
|
|
295
|
+
disabled: !l.trim(),
|
|
296
|
+
children: /* @__PURE__ */ e.jsx(_, { size: 16 })
|
|
346
297
|
}
|
|
347
298
|
),
|
|
348
299
|
/* @__PURE__ */ e.jsx(
|
|
349
|
-
|
|
300
|
+
y,
|
|
350
301
|
{
|
|
351
302
|
size: "icon",
|
|
352
303
|
variant: "ghost",
|
|
353
|
-
onClick:
|
|
354
|
-
children: /* @__PURE__ */ e.jsx(
|
|
304
|
+
onClick: j,
|
|
305
|
+
children: /* @__PURE__ */ e.jsx(se, { size: 16 })
|
|
355
306
|
}
|
|
356
307
|
)
|
|
357
308
|
] })
|
|
358
|
-
] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
359
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-muted-foreground text-xs", children:
|
|
309
|
+
] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: r.label }),
|
|
310
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-muted-foreground text-xs", children: r.createdOn })
|
|
360
311
|
] }),
|
|
361
312
|
/* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-xs", children: [
|
|
362
|
-
|
|
313
|
+
r.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
363
314
|
"Created on",
|
|
364
315
|
" ",
|
|
365
|
-
new Date(
|
|
316
|
+
new Date(r.createdOn).toLocaleDateString()
|
|
366
317
|
] }),
|
|
367
|
-
|
|
318
|
+
r.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
368
319
|
"Expires on",
|
|
369
320
|
" ",
|
|
370
|
-
new Date(
|
|
321
|
+
new Date(r.expiresOn).toLocaleDateString()
|
|
371
322
|
] })
|
|
372
323
|
] })
|
|
373
324
|
] }),
|
|
374
325
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-end", children: [
|
|
375
326
|
t.updateConsumer && /* @__PURE__ */ e.jsxs(
|
|
376
|
-
|
|
327
|
+
y,
|
|
377
328
|
{
|
|
378
329
|
variant: "ghost",
|
|
379
|
-
onClick: () =>
|
|
380
|
-
className:
|
|
330
|
+
onClick: () => C(r.id, r.label),
|
|
331
|
+
className: P(
|
|
381
332
|
"flex gap-2",
|
|
382
|
-
n ===
|
|
333
|
+
n === r.id && "opacity-0! pointer-events-none"
|
|
383
334
|
),
|
|
384
|
-
disabled: n ===
|
|
335
|
+
disabled: n === r.id,
|
|
385
336
|
children: [
|
|
386
|
-
/* @__PURE__ */ e.jsx(
|
|
337
|
+
/* @__PURE__ */ e.jsx(ne, { size: 16 }),
|
|
387
338
|
"Edit label"
|
|
388
339
|
]
|
|
389
340
|
}
|
|
390
341
|
),
|
|
391
|
-
t.rollKey && /* @__PURE__ */ e.jsxs(
|
|
392
|
-
/* @__PURE__ */ e.jsx(
|
|
393
|
-
|
|
342
|
+
t.rollKey && /* @__PURE__ */ e.jsxs(J, { children: [
|
|
343
|
+
/* @__PURE__ */ e.jsx(U, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
344
|
+
y,
|
|
394
345
|
{
|
|
395
346
|
title: "Roll this key",
|
|
396
347
|
variant: "ghost",
|
|
397
|
-
disabled:
|
|
348
|
+
disabled: d.isPending,
|
|
398
349
|
className: "flex items-center gap-2",
|
|
399
350
|
children: [
|
|
400
351
|
/* @__PURE__ */ e.jsx(
|
|
401
|
-
|
|
352
|
+
ie,
|
|
402
353
|
{
|
|
403
354
|
size: 16,
|
|
404
|
-
className:
|
|
355
|
+
className: d.isPending ? "animate-spin" : void 0
|
|
405
356
|
}
|
|
406
357
|
),
|
|
407
358
|
"Roll key"
|
|
408
359
|
]
|
|
409
360
|
}
|
|
410
361
|
) }),
|
|
411
|
-
/* @__PURE__ */ e.jsxs(
|
|
412
|
-
/* @__PURE__ */ e.jsxs(
|
|
413
|
-
/* @__PURE__ */ e.jsx(
|
|
414
|
-
/* @__PURE__ */ e.jsx(
|
|
362
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
363
|
+
/* @__PURE__ */ e.jsxs(Y, { children: [
|
|
364
|
+
/* @__PURE__ */ e.jsx(G, { children: "Roll API Key" }),
|
|
365
|
+
/* @__PURE__ */ e.jsx(Z, { children: "Are you sure you want to roll this API key?" })
|
|
415
366
|
] }),
|
|
416
|
-
/* @__PURE__ */ e.jsxs(
|
|
417
|
-
/* @__PURE__ */ e.jsx(
|
|
418
|
-
/* @__PURE__ */ e.jsx(
|
|
419
|
-
|
|
367
|
+
/* @__PURE__ */ e.jsxs(W, { children: [
|
|
368
|
+
/* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(y, { variant: "outline", children: "Cancel" }) }),
|
|
369
|
+
/* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
370
|
+
y,
|
|
420
371
|
{
|
|
421
372
|
onClick: () => {
|
|
422
|
-
|
|
373
|
+
d.mutate(r.id);
|
|
423
374
|
},
|
|
424
375
|
children: "Roll Key"
|
|
425
376
|
}
|
|
@@ -429,113 +380,109 @@ const Be = ({ service: t }) => {
|
|
|
429
380
|
] })
|
|
430
381
|
] })
|
|
431
382
|
] }),
|
|
432
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(
|
|
383
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(Oe, { children: r.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(ye.Fragment, { children: [
|
|
433
384
|
/* @__PURE__ */ e.jsx(
|
|
434
|
-
|
|
385
|
+
Qe,
|
|
435
386
|
{
|
|
436
387
|
apiKey: c,
|
|
437
388
|
onDeleteKey: () => {
|
|
438
389
|
h.mutate({
|
|
439
|
-
consumerId:
|
|
390
|
+
consumerId: r.id,
|
|
440
391
|
keyId: c.id
|
|
441
392
|
});
|
|
442
393
|
},
|
|
443
|
-
className: h.variables?.keyId === c.id && (h.isPending ||
|
|
394
|
+
className: h.variables?.keyId === c.id && (h.isPending || x) ? "opacity-10!" : void 0
|
|
444
395
|
}
|
|
445
396
|
),
|
|
446
397
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-full h-px bg-border" })
|
|
447
398
|
] }, c.id)) }) })
|
|
448
399
|
]
|
|
449
400
|
},
|
|
450
|
-
|
|
401
|
+
r.id
|
|
451
402
|
))
|
|
452
403
|
}
|
|
453
404
|
) })
|
|
454
405
|
] });
|
|
455
|
-
},
|
|
406
|
+
}, $e = (t) => {
|
|
456
407
|
const i = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((i.getTime() - s.getTime()) / 1e3), o = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
|
|
457
408
|
return n < 60 ? o.format(-n, "second") : n < 3600 ? o.format(-Math.floor(n / 60), "minute") : n < 86400 ? o.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? o.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? o.format(-Math.floor(n / 2592e3), "month") : o.format(-Math.floor(n / 31536e3), "year");
|
|
458
|
-
},
|
|
409
|
+
}, Qe = ({
|
|
459
410
|
apiKey: t,
|
|
460
411
|
onDeleteKey: i,
|
|
461
412
|
className: s
|
|
462
413
|
}) => {
|
|
463
|
-
const [n, o] =
|
|
414
|
+
const [n, o] = b(!1), [l, m] = De(), { key: a, createdOn: x, expiresOn: h } = t, p = h && new Date(h) < /* @__PURE__ */ new Date(), d = h ? Math.ceil(
|
|
464
415
|
(new Date(h).getTime() - (/* @__PURE__ */ new Date()).getTime()) / (1e3 * 60 * 60 * 24)
|
|
465
|
-
) : 1 / 0,
|
|
466
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
416
|
+
) : 1 / 0, C = d <= 7 && !p;
|
|
417
|
+
return /* @__PURE__ */ e.jsxs("div", { className: P("grid col-span-full grid-cols-subgrid p-6", s), children: [
|
|
467
418
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
468
419
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm border rounded-md w-fit px-1", children: [
|
|
469
420
|
/* @__PURE__ */ e.jsxs("div", { className: "font-mono truncate h-9 items-center flex px-2 text-xs gap-2", children: [
|
|
470
421
|
/* @__PURE__ */ e.jsx(
|
|
471
422
|
"div",
|
|
472
423
|
{
|
|
473
|
-
className:
|
|
424
|
+
className: P(
|
|
474
425
|
"rounded-full w-2 h-2 bg-emerald-400 mr-2",
|
|
475
|
-
(
|
|
426
|
+
(C || p) && "bg-neutral-200"
|
|
476
427
|
)
|
|
477
428
|
}
|
|
478
429
|
),
|
|
479
430
|
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
480
|
-
/* @__PURE__ */ e.jsx("span", { className: n ? "" : "opacity-20", children: n ?
|
|
481
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
431
|
+
/* @__PURE__ */ e.jsx("span", { className: n ? "" : "opacity-20", children: n ? a.slice(0, -5) : "**** ".repeat(a.slice(0, -5).length / 5) + "*".repeat(a.slice(0, -5).length % 5) }),
|
|
432
|
+
/* @__PURE__ */ e.jsx("span", { children: a.slice(-5) })
|
|
482
433
|
] })
|
|
483
434
|
] }),
|
|
484
435
|
/* @__PURE__ */ e.jsx(
|
|
485
|
-
|
|
436
|
+
y,
|
|
486
437
|
{
|
|
487
438
|
variant: "ghost",
|
|
488
|
-
onClick: () => o((
|
|
439
|
+
onClick: () => o((w) => !w),
|
|
489
440
|
size: "icon",
|
|
490
|
-
children: n ? /* @__PURE__ */ e.jsx(
|
|
441
|
+
children: n ? /* @__PURE__ */ e.jsx(re, { size: 16 }) : /* @__PURE__ */ e.jsx(ae, { size: 16 })
|
|
491
442
|
}
|
|
492
443
|
),
|
|
493
444
|
/* @__PURE__ */ e.jsx(
|
|
494
|
-
|
|
445
|
+
y,
|
|
495
446
|
{
|
|
496
447
|
variant: "ghost",
|
|
497
|
-
onClick: () =>
|
|
498
|
-
navigator.clipboard.writeText(x).then(() => {
|
|
499
|
-
u(!0), setTimeout(() => u(!1), 2e3);
|
|
500
|
-
});
|
|
501
|
-
},
|
|
448
|
+
onClick: () => m(a),
|
|
502
449
|
size: "icon",
|
|
503
|
-
children:
|
|
450
|
+
children: l ? /* @__PURE__ */ e.jsx(_, { size: 16 }) : /* @__PURE__ */ e.jsx(oe, { size: 16 })
|
|
504
451
|
}
|
|
505
452
|
)
|
|
506
453
|
] }),
|
|
507
454
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
|
|
508
|
-
|
|
455
|
+
x && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
509
456
|
"Created ",
|
|
510
|
-
|
|
457
|
+
$e(x),
|
|
511
458
|
"."
|
|
512
459
|
] }),
|
|
513
460
|
" ",
|
|
514
|
-
h &&
|
|
461
|
+
h && C && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
515
462
|
"Expires in ",
|
|
516
|
-
|
|
463
|
+
d,
|
|
517
464
|
" ",
|
|
518
|
-
|
|
465
|
+
d === 1 ? "day" : "days",
|
|
519
466
|
"."
|
|
520
467
|
] }),
|
|
521
|
-
h &&
|
|
468
|
+
h && p && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
522
469
|
"Expired",
|
|
523
470
|
" ",
|
|
524
|
-
|
|
471
|
+
d === 0 ? "today." : `${d * -1} days ago.`
|
|
525
472
|
] })
|
|
526
473
|
] })
|
|
527
474
|
] }),
|
|
528
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: h && i && /* @__PURE__ */ e.jsxs(
|
|
529
|
-
/* @__PURE__ */ e.jsx(
|
|
530
|
-
/* @__PURE__ */ e.jsxs(
|
|
531
|
-
/* @__PURE__ */ e.jsxs(
|
|
532
|
-
/* @__PURE__ */ e.jsx(
|
|
533
|
-
/* @__PURE__ */ e.jsx(
|
|
475
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: h && i && /* @__PURE__ */ e.jsxs(J, { children: [
|
|
476
|
+
/* @__PURE__ */ e.jsx(U, { asChild: !0, children: /* @__PURE__ */ e.jsx(y, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(le, { size: 16 }) }) }),
|
|
477
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
478
|
+
/* @__PURE__ */ e.jsxs(Y, { children: [
|
|
479
|
+
/* @__PURE__ */ e.jsx(G, { children: "Delete API Key" }),
|
|
480
|
+
/* @__PURE__ */ e.jsx(Z, { children: "Are you sure you want to delete this API key?" })
|
|
534
481
|
] }),
|
|
535
|
-
/* @__PURE__ */ e.jsxs(
|
|
536
|
-
/* @__PURE__ */ e.jsx(
|
|
537
|
-
/* @__PURE__ */ e.jsx(
|
|
538
|
-
|
|
482
|
+
/* @__PURE__ */ e.jsxs(W, { children: [
|
|
483
|
+
/* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(y, { variant: "outline", children: "Cancel" }) }),
|
|
484
|
+
/* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
485
|
+
y,
|
|
539
486
|
{
|
|
540
487
|
onClick: () => {
|
|
541
488
|
i();
|
|
@@ -547,36 +494,36 @@ const Be = ({ service: t }) => {
|
|
|
547
494
|
] })
|
|
548
495
|
] }) })
|
|
549
496
|
] });
|
|
550
|
-
},
|
|
497
|
+
}, D = "https://api.zuploedge.com/v2/client", _e = async (t) => {
|
|
551
498
|
try {
|
|
552
499
|
return await t.json();
|
|
553
500
|
} catch {
|
|
554
501
|
return;
|
|
555
502
|
}
|
|
556
|
-
},
|
|
503
|
+
}, I = async (t) => {
|
|
557
504
|
const i = t.headers.get("content-type");
|
|
558
505
|
if (!t.ok && i?.includes("application/problem+json")) {
|
|
559
|
-
const s = await
|
|
506
|
+
const s = await _e(t);
|
|
560
507
|
if (s.type && s.title)
|
|
561
508
|
throw new Error(s.detail ?? s.title);
|
|
562
509
|
}
|
|
563
|
-
},
|
|
510
|
+
}, He = (t) => ({
|
|
564
511
|
deleteKey: async (i, s, n) => {
|
|
565
512
|
const o = new Request(
|
|
566
|
-
|
|
513
|
+
D + `/${t}/consumers/${i}/keys/${s}`,
|
|
567
514
|
{
|
|
568
515
|
method: "DELETE"
|
|
569
516
|
}
|
|
570
517
|
);
|
|
571
518
|
await n.signRequest(o);
|
|
572
|
-
const
|
|
573
|
-
await
|
|
519
|
+
const l = await fetch(o);
|
|
520
|
+
await I(l), E(l.ok, "Failed to delete API key");
|
|
574
521
|
},
|
|
575
522
|
updateConsumer: async (i, s) => {
|
|
576
523
|
const n = await fetch(
|
|
577
524
|
await s.signRequest(
|
|
578
525
|
new Request(
|
|
579
|
-
|
|
526
|
+
D + `/${t}/consumers/${i.id}`,
|
|
580
527
|
{
|
|
581
528
|
method: "PATCH",
|
|
582
529
|
headers: {
|
|
@@ -589,13 +536,13 @@ const Be = ({ service: t }) => {
|
|
|
589
536
|
)
|
|
590
537
|
)
|
|
591
538
|
);
|
|
592
|
-
await
|
|
539
|
+
await I(n), E(n.ok, "Failed to update API key description");
|
|
593
540
|
},
|
|
594
541
|
rollKey: async (i, s) => {
|
|
595
542
|
const n = await fetch(
|
|
596
543
|
await s.signRequest(
|
|
597
544
|
new Request(
|
|
598
|
-
|
|
545
|
+
D + `/${t}/consumers/${i}/roll-key`,
|
|
599
546
|
{
|
|
600
547
|
method: "POST",
|
|
601
548
|
headers: {
|
|
@@ -606,39 +553,39 @@ const Be = ({ service: t }) => {
|
|
|
606
553
|
)
|
|
607
554
|
)
|
|
608
555
|
);
|
|
609
|
-
await
|
|
556
|
+
await I(n), E(n.ok, "Failed to delete API key");
|
|
610
557
|
},
|
|
611
558
|
getConsumers: async (i) => {
|
|
612
559
|
const s = new Request(
|
|
613
|
-
|
|
560
|
+
D + `/${t}/consumers`
|
|
614
561
|
);
|
|
615
562
|
await i.signRequest(s);
|
|
616
563
|
const n = await fetch(s);
|
|
617
|
-
return await
|
|
618
|
-
id:
|
|
619
|
-
label:
|
|
620
|
-
apiKeys:
|
|
621
|
-
key:
|
|
564
|
+
return await I(n), E(n.ok, "Failed to fetch API keys"), (await n.json()).data.map((l) => ({
|
|
565
|
+
id: l.id,
|
|
566
|
+
label: l.label ?? l.subject ?? "API Key",
|
|
567
|
+
apiKeys: l.apiKeys.data,
|
|
568
|
+
key: l.apiKeys.data.at(0)
|
|
622
569
|
}));
|
|
623
570
|
}
|
|
624
|
-
}),
|
|
625
|
-
const i = "deploymentName" in t ?
|
|
571
|
+
}), rt = (t) => t, at = (t) => {
|
|
572
|
+
const i = "deploymentName" in t ? He(t.deploymentName) : t;
|
|
626
573
|
return {
|
|
627
574
|
getProfileMenuItems: () => [
|
|
628
575
|
{
|
|
629
576
|
label: "API Keys",
|
|
630
577
|
path: "/settings/api-keys",
|
|
631
578
|
category: "middle",
|
|
632
|
-
icon:
|
|
579
|
+
icon: ce
|
|
633
580
|
}
|
|
634
581
|
],
|
|
635
582
|
getIdentities: async (s) => {
|
|
636
583
|
try {
|
|
637
584
|
return (await i.getConsumers(s)).map((o) => ({
|
|
638
|
-
authorizeRequest: (
|
|
585
|
+
authorizeRequest: (l) => (l.headers.set(
|
|
639
586
|
"Authorization",
|
|
640
587
|
`Bearer ${o.apiKeys.at(0)?.key}`
|
|
641
|
-
),
|
|
588
|
+
), l),
|
|
642
589
|
id: o.id,
|
|
643
590
|
label: o.label
|
|
644
591
|
}));
|
|
@@ -648,12 +595,12 @@ const Be = ({ service: t }) => {
|
|
|
648
595
|
},
|
|
649
596
|
getRoutes: () => [
|
|
650
597
|
{
|
|
651
|
-
element: /* @__PURE__ */ e.jsx(
|
|
652
|
-
errorElement: /* @__PURE__ */ e.jsx(
|
|
598
|
+
element: /* @__PURE__ */ e.jsx(Ie, {}),
|
|
599
|
+
errorElement: /* @__PURE__ */ e.jsx(ue, {}),
|
|
653
600
|
children: [
|
|
654
601
|
{
|
|
655
602
|
path: "/settings/api-keys",
|
|
656
|
-
element: /* @__PURE__ */ e.jsx(
|
|
603
|
+
element: /* @__PURE__ */ e.jsx(Fe, { service: i })
|
|
657
604
|
}
|
|
658
605
|
// {
|
|
659
606
|
// path: "/settings/api-keys/new",
|
|
@@ -665,7 +612,7 @@ const Be = ({ service: t }) => {
|
|
|
665
612
|
};
|
|
666
613
|
};
|
|
667
614
|
export {
|
|
668
|
-
|
|
669
|
-
|
|
615
|
+
at as apiKeyPlugin,
|
|
616
|
+
rt as createApiKeyService
|
|
670
617
|
};
|
|
671
618
|
//# sourceMappingURL=zudoku.plugin-api-keys.js.map
|