zudoku 0.1.1-dev.9 → 0.3.0-dev.3
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/app/App.js +15 -6
- package/dist/app/App.js.map +1 -1
- package/dist/app/main.js +10 -2
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.js +3 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/logger.js +3 -1
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/outdated.js +4 -4
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/output.js +4 -4
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/box.js +2 -2
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/dev/handler.js +4 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +30 -6
- package/dist/config/validators/auth.d.ts +2 -0
- package/dist/config/validators/auth.js +2 -0
- package/dist/config/validators/auth.js.map +1 -0
- package/dist/config/validators/validate.d.ts +2 -0
- package/dist/config/validators/validate.js +4 -0
- package/dist/config/validators/validate.js.map +1 -0
- package/dist/index.d.ts +2 -6
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/Callback.d.ts +3 -0
- package/dist/lib/authentication/Callback.js +34 -0
- package/dist/lib/authentication/Callback.js.map +1 -0
- package/dist/lib/authentication/authentication.d.ts +14 -0
- package/dist/lib/authentication/authentication.js.map +1 -0
- package/dist/lib/authentication/errors.d.ts +15 -0
- package/dist/lib/authentication/errors.js +10 -0
- package/dist/lib/authentication/errors.js.map +1 -0
- package/dist/lib/authentication/hook.d.ts +7 -0
- package/dist/lib/authentication/hook.js +29 -0
- package/dist/lib/authentication/hook.js.map +1 -0
- package/dist/lib/authentication/providers/auth0.d.ts +4 -0
- package/dist/lib/authentication/providers/auth0.js +40 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.d.ts +4 -0
- package/dist/lib/authentication/providers/clerk.js +54 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -0
- package/dist/lib/authentication/providers/openid.d.ts +35 -0
- package/dist/lib/authentication/providers/openid.js +204 -0
- package/dist/lib/authentication/providers/openid.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +13 -0
- package/dist/lib/authentication/state.js +5 -0
- package/dist/lib/authentication/state.js.map +1 -0
- package/dist/{app → lib}/components/AnchorLink.js.map +1 -1
- package/dist/{app → lib}/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/DevPortal.d.ts +25 -0
- package/dist/lib/components/DevPortal.js +32 -0
- package/dist/lib/components/DevPortal.js.map +1 -0
- package/dist/{app → lib}/components/Dialog.d.ts +2 -2
- package/dist/{app → lib}/components/Dialog.js +3 -3
- package/dist/lib/components/Dialog.js.map +1 -0
- package/dist/lib/components/Header.d.ts +1 -0
- package/dist/lib/components/Header.js +15 -0
- package/dist/lib/components/Header.js.map +1 -0
- package/dist/{app → lib/components}/Heading.js +2 -2
- package/dist/lib/components/Heading.js.map +1 -0
- package/dist/{app → lib}/components/Input.js.map +1 -1
- package/dist/{app → lib}/components/Layout.js +4 -7
- package/dist/lib/components/Layout.js.map +1 -0
- package/dist/lib/components/Link.d.ts +1 -0
- package/dist/lib/components/Link.js +2 -0
- package/dist/lib/components/Link.js.map +1 -0
- package/dist/{app → lib}/components/Markdown.js.map +1 -1
- package/dist/lib/components/Router.d.ts +4 -0
- package/dist/lib/components/Router.js +20 -0
- package/dist/lib/components/Router.js.map +1 -0
- package/dist/lib/components/Select.d.ts +13 -0
- package/dist/lib/components/Select.js +27 -0
- package/dist/lib/components/Select.js.map +1 -0
- package/dist/lib/components/Spinner.d.ts +3 -0
- package/dist/lib/components/Spinner.js +4 -0
- package/dist/lib/components/Spinner.js.map +1 -0
- package/dist/{app → lib}/components/SyntaxHighlight.d.ts +2 -1
- package/dist/{app → lib}/components/SyntaxHighlight.js +4 -1
- package/dist/lib/components/SyntaxHighlight.js.map +1 -0
- package/dist/{app → lib}/components/TopNavigation.js.map +1 -1
- package/dist/{app → lib}/components/context/ComponentsContext.d.ts +1 -1
- package/dist/{app → lib}/components/context/ComponentsContext.js.map +1 -1
- package/dist/{app → lib}/components/context/DevPortalProvider.js +1 -1
- package/dist/lib/components/context/DevPortalProvider.js.map +1 -0
- package/dist/lib/components/context/PluginSystem.js.map +1 -0
- package/dist/{app → lib}/components/context/ThemeContext.js +1 -1
- package/dist/{app → lib}/components/context/ThemeContext.js.map +1 -1
- package/dist/{app → lib}/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +3 -0
- package/dist/lib/components/index.js +4 -0
- package/dist/lib/components/index.js.map +1 -0
- package/dist/{app → lib}/components/navigation/SideNavigation.js +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigation.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationCategory.js +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationCategory.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationItem.d.ts +2 -1
- package/dist/{app → lib}/components/navigation/SideNavigationItem.js +12 -6
- package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -0
- package/dist/{app → lib}/components/navigation/SideNavigationWrapper.d.ts +3 -0
- package/dist/lib/components/navigation/SideNavigationWrapper.js +7 -0
- package/dist/lib/components/navigation/SideNavigationWrapper.js.map +1 -0
- package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js.map +1 -1
- package/dist/{app → lib}/components/navigation/util.js.map +1 -1
- package/dist/{app → lib}/core/DevPortalContext.d.ts +10 -32
- package/dist/lib/core/DevPortalContext.js +48 -0
- package/dist/lib/core/DevPortalContext.js.map +1 -0
- package/dist/{app → lib}/core/helmet.js.map +1 -1
- package/dist/lib/core/icons.js.map +1 -0
- package/dist/{app → lib}/core/plugins.d.ts +2 -7
- package/dist/{app → lib}/core/plugins.js +1 -1
- package/dist/{app → lib}/core/plugins.js.map +1 -1
- package/dist/lib/core/router.js.map +1 -0
- package/dist/{app → lib}/oas/graphql/index.js +2 -2
- package/dist/lib/oas/graphql/index.js.map +1 -0
- package/dist/{app → lib}/oas/parser/dereference/index.js.map +1 -1
- package/dist/{app → lib}/oas/parser/dereference/resolveRef.js.map +1 -1
- package/dist/{app → lib}/oas/parser/index.js.map +1 -1
- package/dist/{app → lib}/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-key/CreateApiKey.d.ts +5 -0
- package/dist/lib/plugins/api-key/CreateApiKey.js +37 -0
- package/dist/lib/plugins/api-key/CreateApiKey.js.map +1 -0
- package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +5 -0
- package/dist/lib/plugins/api-key/SettingsApiKeys.js +38 -0
- package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +1 -0
- package/dist/lib/plugins/api-key/index.d.ts +30 -0
- package/dist/lib/plugins/api-key/index.js +67 -0
- package/dist/lib/plugins/api-key/index.js.map +1 -0
- package/dist/lib/plugins/index.d.ts +4 -0
- package/dist/lib/plugins/index.js +5 -0
- package/dist/lib/plugins/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +5 -0
- package/dist/lib/plugins/markdown/MdxPage.js +60 -0
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -0
- package/dist/{app → lib}/plugins/markdown/Toc.js.map +1 -1
- package/dist/{app → lib}/plugins/markdown/generateRoutes.js +1 -6
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -0
- package/dist/{app → lib}/plugins/markdown/index.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ColorizedParam.d.ts +1 -2
- package/dist/{app → lib}/plugins/openapi/ColorizedParam.js +2 -2
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -0
- package/dist/lib/plugins/openapi/MakeRequest.js +43 -0
- package/dist/lib/plugins/openapi/MakeRequest.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/MethodBadge.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/OperationList.js +12 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationListItem.js +17 -0
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/ParameterList.d.ts +2 -2
- package/dist/lib/plugins/openapi/ParameterList.js +5 -0
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterListItem.js +13 -0
- package/dist/{app → lib}/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js +1 -1
- package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js +3 -3
- package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListView.d.ts +7 -0
- package/dist/lib/plugins/openapi/SchemaListView.js +43 -0
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/Select.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/Sidecar.js +15 -15
- package/dist/{app → lib}/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/gql.d.ts +5 -5
- package/dist/{app → lib}/plugins/openapi/graphql/gql.js +2 -3
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/graphql/graphql.d.ts +9 -0
- package/dist/{app → lib}/plugins/openapi/graphql/graphql.js +50 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/index.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/index.js +3 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/Editor.js +5 -0
- package/dist/lib/plugins/openapi/playground/Editor.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Headers.js +15 -0
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.js +3 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +21 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +31 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +97 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.js +22 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +22 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/createUrl.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/createUrl.js +15 -0
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.js +17 -9
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/util/urql.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.js +2 -1
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +1 -0
- package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +1 -0
- package/dist/lib/plugins/openapi/worker/shared-worker.js +6 -0
- package/dist/lib/plugins/openapi/worker/shared-worker.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/worker/worker.js.map +1 -1
- package/dist/lib/plugins/openapi-worker.d.ts +1 -0
- package/dist/lib/plugins/openapi-worker.js +2 -0
- package/dist/lib/plugins/openapi-worker.js.map +1 -0
- package/dist/{app → lib}/plugins/redirect/index.d.ts +1 -2
- package/dist/{app → lib}/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +7 -0
- package/dist/lib/ui/Button.js +11 -0
- package/dist/lib/ui/Button.js.map +1 -0
- package/dist/{app → lib}/ui/Callout.js.map +1 -1
- package/dist/{app → lib}/ui/Card.js.map +1 -1
- package/dist/{app → lib}/ui/Note.js.map +1 -1
- package/dist/{app → lib}/ui/Tabs.d.ts +2 -2
- package/dist/{app → lib}/ui/Tabs.js +2 -2
- package/dist/{app → lib}/ui/Tabs.js.map +1 -1
- package/dist/lib/ui/button-variants.d.ts +4 -0
- package/dist/{app/ui/Button.js → lib/ui/button-variants.js} +2 -12
- package/dist/lib/ui/button-variants.js.map +1 -0
- package/dist/{app → lib}/util/MdxComponents.js +9 -9
- package/dist/lib/util/MdxComponents.js.map +1 -0
- package/dist/{app → lib}/util/cn.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +9 -0
- package/dist/lib/util/createVariantComponent.js +17 -0
- package/dist/lib/util/createVariantComponent.js.map +1 -0
- package/dist/{app → lib}/util/createWaitForNotify.js.map +1 -1
- package/dist/{app → lib}/util/groupBy.js.map +1 -1
- package/dist/{app → lib}/util/joinPath.js.map +1 -1
- package/dist/{app → lib}/util/pastellize.js.map +1 -1
- package/dist/lib/util/slugify.js.map +1 -0
- package/dist/{app → lib}/util/traverseNavigation.js.map +1 -1
- package/dist/{app → lib}/util/useScrollToAnchor.js.map +1 -1
- package/dist/{app → lib}/util/useScrollToTop.js.map +1 -1
- package/dist/ts.js +1 -2
- package/dist/ts.js.map +1 -1
- package/dist/vite/build.js +2 -8
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/common.d.ts +1 -0
- package/dist/vite/common.js +5 -0
- package/dist/vite/common.js.map +1 -0
- package/dist/vite/config.d.ts +9 -2
- package/dist/vite/config.js +69 -28
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.d.ts +2 -0
- package/dist/vite/dev-server.js +30 -10
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +4 -0
- package/dist/vite/plugin-api-keys.js +33 -0
- package/dist/vite/plugin-api-keys.js.map +1 -0
- package/dist/vite/plugin-api.js +4 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +3 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +4 -0
- package/dist/vite/plugin-component.js +16 -0
- package/dist/vite/plugin-component.js.map +1 -0
- package/dist/vite/plugin-config.d.ts +1 -0
- package/dist/vite/plugin-config.js +4 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-docs.js +4 -2
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-docs.test.js +1 -2
- package/dist/vite/plugin-docs.test.js.map +1 -1
- package/dist/vite/plugin-html.js +0 -3
- package/dist/vite/plugin-html.js.map +1 -1
- package/dist/vite/plugin-mdx.js +3 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.d.ts +6 -0
- package/dist/vite/plugin-metadata.js +24 -0
- package/dist/vite/plugin-metadata.js.map +1 -0
- package/dist/vite/plugin-openapi-worker.d.ts +4 -0
- package/dist/vite/plugin-openapi-worker.js +28 -0
- package/dist/vite/plugin-openapi-worker.js.map +1 -0
- package/dist/vite/plugin-redirect.d.ts +4 -0
- package/dist/vite/plugin-redirect.js +32 -0
- package/dist/vite/plugin-redirect.js.map +1 -0
- package/dist/vite/plugin.js +8 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/Spinner-7LezPqGn.js +8393 -0
- package/lib/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/lib/assets/index-BPdJm2ty.js +4764 -0
- package/lib/assets/worker-BCcpCNJ7.js +14473 -0
- package/lib/clerk-Wslx_mPo.js +19685 -0
- package/lib/index-DNx3xWa2.js +3461 -0
- package/lib/prism-bash.min-DadFsM4Z.js +6 -0
- package/lib/prism-java.min-d5iT_mOd.js +6 -0
- package/lib/prism-json.min-B1GJqK1k.js +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js +61 -0
- package/lib/prism-php.min-o7FpoMP_.js +10 -0
- package/lib/prism-ruby.min-C7LwcKyz.js +9 -0
- package/lib/state-oycsxkHz.js +287 -0
- package/lib/urql-DMlBWUKL.js +1591 -0
- package/lib/zudoku.auth-auth0.js +26 -0
- package/lib/zudoku.auth-clerk.js +47 -0
- package/lib/zudoku.auth-openid.js +1058 -0
- package/lib/zudoku.components.js +925 -0
- package/lib/zudoku.openapi-worker.js +225 -0
- package/lib/zudoku.plugins.js +19863 -0
- package/package.json +69 -39
- package/src/app/App.tsx +16 -6
- package/src/app/main.css +1 -0
- package/src/app/main.tsx +12 -3
- package/src/lib/authentication/Callback.tsx +60 -0
- package/src/lib/authentication/authentication.ts +19 -0
- package/src/lib/authentication/errors.ts +21 -0
- package/src/lib/authentication/hook.ts +33 -0
- package/src/lib/authentication/providers/auth0.tsx +52 -0
- package/src/lib/authentication/providers/clerk.tsx +64 -0
- package/src/lib/authentication/providers/openid.tsx +312 -0
- package/src/lib/authentication/state.ts +19 -0
- package/src/{app → lib/components}/DevPortal.tsx +30 -42
- package/src/{app → lib}/components/Dialog.tsx +37 -37
- package/src/{app → lib}/components/Header.tsx +25 -20
- package/src/{app → lib/components}/Heading.tsx +2 -2
- package/src/{app → lib}/components/Layout.tsx +18 -12
- package/src/lib/components/Link.tsx +1 -0
- package/src/lib/components/Router.tsx +28 -0
- package/src/lib/components/Select.tsx +157 -0
- package/src/lib/components/Spinner.tsx +5 -0
- package/src/{app → lib}/components/SyntaxHighlight.tsx +10 -3
- package/src/{app → lib}/components/context/DevPortalProvider.ts +1 -1
- package/src/lib/components/index.ts +3 -0
- package/src/{app → lib}/components/navigation/SideNavigation.tsx +4 -1
- package/src/{app → lib}/components/navigation/SideNavigationCategory.tsx +3 -1
- package/src/{app → lib}/components/navigation/SideNavigationItem.tsx +16 -7
- package/src/lib/components/navigation/SideNavigationWrapper.tsx +24 -0
- package/src/{app → lib}/core/DevPortalContext.ts +28 -64
- package/src/{app → lib}/core/plugins.ts +5 -5
- package/src/{app → lib}/oas/graphql/index.ts +2 -2
- package/src/lib/plugins/api-key/CreateApiKey.tsx +100 -0
- package/src/lib/plugins/api-key/SettingsApiKeys.tsx +125 -0
- package/src/lib/plugins/api-key/index.tsx +115 -0
- package/src/lib/plugins/index.ts +4 -0
- package/src/{app → lib}/plugins/markdown/MdxPage.tsx +32 -10
- package/src/{app → lib}/plugins/markdown/generateRoutes.tsx +1 -16
- package/src/{app → lib}/plugins/openapi/ColorizedParam.tsx +1 -3
- package/src/lib/plugins/openapi/MakeRequest.tsx +63 -0
- package/src/{app → lib}/plugins/openapi/OperationList.tsx +14 -4
- package/src/{app → lib}/plugins/openapi/OperationListItem.tsx +40 -6
- package/src/{app → lib}/plugins/openapi/ParameterList.tsx +4 -4
- package/src/{app → lib}/plugins/openapi/ParameterListItem.tsx +5 -2
- package/src/{app → lib}/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
- package/src/{app → lib}/plugins/openapi/ResponsesSidecarBox.tsx +2 -3
- package/src/lib/plugins/openapi/SchemaListView.tsx +228 -0
- package/src/{app → lib}/plugins/openapi/Sidecar.tsx +23 -23
- package/src/{app → lib}/plugins/openapi/graphql/gql.ts +7 -7
- package/src/{app → lib}/plugins/openapi/graphql/graphql.ts +59 -0
- package/src/{app → lib}/plugins/openapi/index.tsx +8 -2
- package/src/lib/plugins/openapi/playground/Editor.tsx +4 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +60 -0
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +6 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +63 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +366 -0
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +89 -0
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +32 -0
- package/src/lib/plugins/openapi/playground/createUrl.ts +22 -0
- package/src/{app → lib}/plugins/openapi/util/generateSchemaExample.ts +22 -9
- package/src/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.ts +2 -1
- package/src/lib/plugins/openapi/worker/shared-worker.ts +5 -0
- package/src/lib/plugins/openapi-worker.ts +1 -0
- package/src/{app → lib}/plugins/redirect/index.tsx +1 -1
- package/src/lib/ui/Button.tsx +25 -0
- package/src/{app → lib}/ui/Tabs.tsx +2 -2
- package/src/{app/ui/Button.tsx → lib/ui/button-variants.ts} +4 -29
- package/src/{app → lib}/util/MdxComponents.tsx +33 -8
- package/src/{app → lib}/util/createVariantComponent.tsx +12 -7
- package/dist/app/DevPortal.d.ts +0 -25
- package/dist/app/DevPortal.js +0 -41
- package/dist/app/DevPortal.js.map +0 -1
- package/dist/app/Heading.js.map +0 -1
- package/dist/app/authentication/authentication.d.ts +0 -13
- package/dist/app/authentication/authentication.js.map +0 -1
- package/dist/app/authentication/clerk.d.ts +0 -5
- package/dist/app/authentication/clerk.js +0 -36
- package/dist/app/authentication/clerk.js.map +0 -1
- package/dist/app/authentication/openid.d.ts +0 -11
- package/dist/app/authentication/openid.js +0 -118
- package/dist/app/authentication/openid.js.map +0 -1
- package/dist/app/components/Dialog.js.map +0 -1
- package/dist/app/components/DynamicIcon.d.ts +0 -6
- package/dist/app/components/DynamicIcon.js +0 -6
- package/dist/app/components/DynamicIcon.js.map +0 -1
- package/dist/app/components/Header.d.ts +0 -1
- package/dist/app/components/Header.js +0 -15
- package/dist/app/components/Header.js.map +0 -1
- package/dist/app/components/Layout.js.map +0 -1
- package/dist/app/components/SyntaxHighlight.js.map +0 -1
- package/dist/app/components/context/DevPortalProvider.js.map +0 -1
- package/dist/app/components/context/PluginSystem.js.map +0 -1
- package/dist/app/components/navigation/SideNavigationItem.js.map +0 -1
- package/dist/app/components/navigation/SideNavigationWrapper.js +0 -6
- package/dist/app/components/navigation/SideNavigationWrapper.js.map +0 -1
- package/dist/app/core/DevPortalContext.js +0 -68
- package/dist/app/core/DevPortalContext.js.map +0 -1
- package/dist/app/core/icons.js.map +0 -1
- package/dist/app/core/router.js.map +0 -1
- package/dist/app/core/types/combine.d.ts +0 -4
- package/dist/app/core/types/combine.js +0 -2
- package/dist/app/core/types/combine.js.map +0 -1
- package/dist/app/oas/graphql/index.js.map +0 -1
- package/dist/app/oas/graphql/server.d.ts +0 -1
- package/dist/app/oas/graphql/server.js +0 -8
- package/dist/app/oas/graphql/server.js.map +0 -1
- package/dist/app/plugins/api-key/SettingsApiKeys.d.ts +0 -4
- package/dist/app/plugins/api-key/SettingsApiKeys.js +0 -7
- package/dist/app/plugins/api-key/SettingsApiKeys.js.map +0 -1
- package/dist/app/plugins/api-key/index.d.ts +0 -32
- package/dist/app/plugins/api-key/index.js +0 -55
- package/dist/app/plugins/api-key/index.js.map +0 -1
- package/dist/app/plugins/markdown/MdxPage.d.ts +0 -3
- package/dist/app/plugins/markdown/MdxPage.js +0 -55
- package/dist/app/plugins/markdown/MdxPage.js.map +0 -1
- package/dist/app/plugins/markdown/generateRoutes.js.map +0 -1
- package/dist/app/plugins/openapi/ColorizedParam.js.map +0 -1
- package/dist/app/plugins/openapi/MakeRequest.js +0 -23
- package/dist/app/plugins/openapi/MakeRequest.js.map +0 -1
- package/dist/app/plugins/openapi/OperationList.js.map +0 -1
- package/dist/app/plugins/openapi/OperationListItem.js +0 -15
- package/dist/app/plugins/openapi/OperationListItem.js.map +0 -1
- package/dist/app/plugins/openapi/ParameterList.js +0 -5
- package/dist/app/plugins/openapi/ParameterList.js.map +0 -1
- package/dist/app/plugins/openapi/ParameterListItem.js +0 -13
- package/dist/app/plugins/openapi/graphql/gql.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/graphql.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/index.js.map +0 -1
- package/dist/app/plugins/openapi/index.js.map +0 -1
- package/dist/app/plugins/openapi/playground/Playground.d.ts +0 -8
- package/dist/app/plugins/openapi/playground/Playground.js +0 -98
- package/dist/app/plugins/openapi/playground/Playground.js.map +0 -1
- package/dist/app/plugins/openapi/util/generateSchemaExample.js.map +0 -1
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
- package/dist/app/ui/Button.d.ts +0 -11
- package/dist/app/ui/Button.js.map +0 -1
- package/dist/app/util/MdxComponents.js.map +0 -1
- package/dist/app/util/createVariantComponent.d.ts +0 -15
- package/dist/app/util/createVariantComponent.js +0 -12
- package/dist/app/util/createVariantComponent.js.map +0 -1
- package/dist/app/util/slugify.js.map +0 -1
- package/dist/auth.d.ts +0 -2
- package/dist/auth.js +0 -3
- package/dist/auth.js.map +0 -1
- package/dist/plugins.d.ts +0 -4
- package/dist/plugins.js +0 -6
- package/dist/plugins.js.map +0 -1
- package/src/app/authentication/authentication.ts +0 -18
- package/src/app/authentication/clerk.ts +0 -47
- package/src/app/authentication/openid.ts +0 -192
- package/src/app/components/DynamicIcon.tsx +0 -60
- package/src/app/components/navigation/SideNavigationWrapper.tsx +0 -15
- package/src/app/core/types/combine.ts +0 -16
- package/src/app/oas/graphql/server.ts +0 -10
- package/src/app/plugins/api-key/SettingsApiKeys.tsx +0 -22
- package/src/app/plugins/api-key/index.tsx +0 -123
- package/src/app/plugins/openapi/MakeRequest.tsx +0 -49
- package/src/app/plugins/openapi/playground/Playground.tsx +0 -309
- package/src/app/plugins/openapi/queries.graphql +0 -6
- package/dist/{app → lib}/authentication/authentication.js +0 -0
- package/dist/{app → lib}/components/AnchorLink.d.ts +0 -0
- package/dist/{app → lib}/components/AnchorLink.js +0 -0
- package/dist/{app → lib}/components/CategoryHeading.d.ts +0 -0
- package/dist/{app → lib}/components/CategoryHeading.js +0 -0
- package/dist/{app → lib/components}/Heading.d.ts +0 -0
- package/dist/{app → lib}/components/Input.d.ts +0 -0
- package/dist/{app → lib}/components/Input.js +0 -0
- package/dist/{app → lib}/components/Layout.d.ts +0 -0
- package/dist/{app → lib}/components/Markdown.d.ts +0 -0
- package/dist/{app → lib}/components/Markdown.js +0 -0
- package/dist/{app → lib}/components/TopNavigation.d.ts +0 -0
- package/dist/{app → lib}/components/TopNavigation.js +0 -0
- package/dist/{app → lib}/components/context/ComponentsContext.js +0 -0
- package/dist/{app → lib}/components/context/DevPortalProvider.d.ts +0 -0
- package/dist/{app → lib}/components/context/PluginSystem.d.ts +0 -0
- package/dist/{app → lib}/components/context/PluginSystem.js +0 -0
- package/dist/{app → lib}/components/context/ThemeContext.d.ts +0 -0
- package/dist/{app → lib}/components/context/ViewportAnchorContext.d.ts +0 -0
- package/dist/{app → lib}/components/context/ViewportAnchorContext.js +0 -0
- package/dist/{app → lib}/components/navigation/SideNavigation.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/SideNavigationCategory.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js +0 -0
- package/dist/{app → lib}/components/navigation/util.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/util.js +0 -0
- package/dist/{app → lib}/core/helmet.d.ts +0 -0
- package/dist/{app → lib}/core/helmet.js +0 -0
- package/dist/{app → lib}/core/icons.d.ts +0 -0
- package/dist/{app → lib}/core/icons.js +0 -0
- package/dist/{app → lib}/core/router.d.ts +0 -0
- package/dist/{app → lib}/core/router.js +0 -0
- package/dist/{app → lib}/oas/graphql/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/dereference/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/dereference/index.js +0 -0
- package/dist/{app → lib}/oas/parser/dereference/resolveRef.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/dereference/resolveRef.js +0 -0
- package/dist/{app → lib}/oas/parser/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/index.js +0 -0
- package/dist/{app → lib}/oas/parser/upgrade/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/upgrade/index.js +0 -0
- package/dist/{app → lib}/plugins/markdown/Toc.d.ts +0 -0
- package/dist/{app → lib}/plugins/markdown/Toc.js +0 -0
- package/dist/{app → lib}/plugins/markdown/generateRoutes.d.ts +0 -0
- package/dist/{app → lib}/plugins/markdown/index.d.ts +0 -0
- package/dist/{app → lib}/plugins/markdown/index.js +0 -0
- package/dist/{app → lib}/plugins/openapi/MakeRequest.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/MethodBadge.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/MethodBadge.js +0 -0
- package/dist/{app → lib}/plugins/openapi/OperationList.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/OperationListItem.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/ParameterListItem.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/Select.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/Select.js +0 -0
- package/dist/{app → lib}/plugins/openapi/Sidecar.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/SidecarBox.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/SidecarBox.js +0 -0
- package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js +0 -0
- package/dist/{app → lib}/plugins/openapi/graphql/index.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/graphql/index.js +0 -0
- package/dist/{app → lib}/plugins/openapi/index.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/util/urql.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/util/urql.js +0 -0
- package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/worker/worker.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/worker/worker.js +0 -0
- package/dist/{app → lib}/plugins/redirect/index.js +0 -0
- package/dist/{app → lib}/ui/Callout.d.ts +0 -0
- package/dist/{app → lib}/ui/Callout.js +0 -0
- package/dist/{app → lib}/ui/Card.d.ts +0 -0
- package/dist/{app → lib}/ui/Card.js +0 -0
- package/dist/{app → lib}/ui/Note.d.ts +0 -0
- package/dist/{app → lib}/ui/Note.js +0 -0
- package/dist/{app → lib}/util/MdxComponents.d.ts +0 -0
- package/dist/{app → lib}/util/cn.d.ts +0 -0
- package/dist/{app → lib}/util/cn.js +0 -0
- package/dist/{app → lib}/util/createWaitForNotify.d.ts +0 -0
- package/dist/{app → lib}/util/createWaitForNotify.js +0 -0
- package/dist/{app → lib}/util/groupBy.d.ts +0 -0
- package/dist/{app → lib}/util/groupBy.js +0 -0
- package/dist/{app → lib}/util/joinPath.d.ts +0 -0
- package/dist/{app → lib}/util/joinPath.js +0 -0
- package/dist/{app → lib}/util/pastellize.d.ts +0 -0
- package/dist/{app → lib}/util/pastellize.js +0 -0
- package/dist/{app → lib}/util/slugify.d.ts +0 -0
- package/dist/{app → lib}/util/slugify.js +0 -0
- package/dist/{app → lib}/util/traverseNavigation.d.ts +0 -0
- package/dist/{app → lib}/util/traverseNavigation.js +0 -0
- package/dist/{app → lib}/util/useScrollToAnchor.d.ts +0 -0
- package/dist/{app → lib}/util/useScrollToAnchor.js +0 -0
- package/dist/{app → lib}/util/useScrollToTop.d.ts +0 -0
- package/dist/{app → lib}/util/useScrollToTop.js +0 -0
- package/src/{app → lib}/components/AnchorLink.tsx +0 -0
- package/src/{app → lib}/components/CategoryHeading.tsx +1 -1
- package/src/{app → lib}/components/Input.tsx +0 -0
- package/src/{app → lib}/components/Markdown.tsx +0 -0
- package/src/{app → lib}/components/TopNavigation.tsx +0 -0
- package/src/{app → lib}/components/context/ComponentsContext.tsx +0 -0
- package/src/{app → lib}/components/context/PluginSystem.ts +0 -0
- package/src/{app → lib}/components/context/ThemeContext.tsx +1 -1
- package/src/{app → lib}/components/context/ViewportAnchorContext.tsx +0 -0
- package/src/{app → lib}/components/navigation/useNavigationCollapsibleState.ts +0 -0
- package/src/{app → lib}/components/navigation/util.ts +0 -0
- package/src/{app → lib}/core/helmet.ts +0 -0
- package/src/{app → lib}/core/icons.tsx +0 -0
- package/src/{app → lib}/core/router.tsx +0 -0
- package/src/{app → lib}/oas/parser/dereference/index.ts +0 -0
- package/src/{app → lib}/oas/parser/dereference/resolveRef.ts +0 -0
- package/src/{app → lib}/oas/parser/index.ts +0 -0
- package/src/{app → lib}/oas/parser/schemas/v3.0.json +0 -0
- package/src/{app → lib}/oas/parser/schemas/v3.1.json +0 -0
- package/src/{app → lib}/oas/parser/upgrade/index.ts +0 -0
- package/src/{app → lib}/plugins/markdown/Toc.tsx +0 -0
- package/src/{app → lib}/plugins/markdown/index.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/MethodBadge.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/Select.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/SidecarBox.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/graphql/fragment-masking.ts +1 -1
- /package/src/{app → lib}/plugins/openapi/graphql/index.ts +0 -0
- /package/src/{app → lib}/plugins/openapi/util/urql.ts +0 -0
- /package/src/{app → lib}/plugins/openapi/worker/worker.ts +0 -0
- /package/src/{app → lib}/ui/Callout.tsx +0 -0
- /package/src/{app → lib}/ui/Card.tsx +0 -0
- /package/src/{app → lib}/ui/Note.tsx +0 -0
- /package/src/{app → lib}/util/cn.ts +0 -0
- /package/src/{app → lib}/util/createWaitForNotify.ts +0 -0
- /package/src/{app → lib}/util/groupBy.ts +0 -0
- /package/src/{app → lib}/util/joinPath.tsx +0 -0
- /package/src/{app → lib}/util/pastellize.ts +0 -0
- /package/src/{app → lib}/util/slugify.ts +0 -0
- /package/src/{app → lib}/util/traverseNavigation.ts +0 -0
- /package/src/{app → lib}/util/useScrollToAnchor.ts +0 -0
- /package/src/{app → lib}/util/useScrollToTop.ts +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
import { ClassValue } from "clsx";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { JSX } from "react/jsx-runtime";
|
|
5
|
-
declare const createVariantComponent: <E extends keyof React.ReactHTML, C extends ReturnType<typeof cva>>(tag: E, cvx: ClassValue | C) => {
|
|
6
|
-
({ className, ...props }: JSX.IntrinsicElements[E] & {
|
|
7
|
-
className?: ClassValue;
|
|
8
|
-
}): React.DetailedReactHTMLElement<Omit<JSX.IntrinsicElements[E] & {
|
|
9
|
-
className?: ClassValue;
|
|
10
|
-
}, "className"> & {
|
|
11
|
-
className: any;
|
|
12
|
-
}, HTMLWebViewElement>;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
15
|
-
export default createVariantComponent;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "./cn.js";
|
|
3
|
-
const createVariantComponent = (tag, cvx) => {
|
|
4
|
-
const MyVariant = ({ className, ...props }) => React.createElement(tag, {
|
|
5
|
-
...props,
|
|
6
|
-
className: typeof cvx === "function" ? cvx({ className }) : cn(cvx, className),
|
|
7
|
-
});
|
|
8
|
-
MyVariant.displayName = `VariantComponent(${tag})`;
|
|
9
|
-
return MyVariant;
|
|
10
|
-
};
|
|
11
|
-
export default createVariantComponent;
|
|
12
|
-
//# sourceMappingURL=createVariantComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createVariantComponent.js","sourceRoot":"","sources":["../../../src/app/util/createVariantComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,MAAM,sBAAsB,GAAG,CAI7B,GAAM,EACN,GAAmB,EAEnB,EAAE;IACF,MAAM,SAAS,GAAG,CAAC,EACjB,SAAS,EACT,GAAG,KAAK,EAC8C,EAAE,EAAE,CAC1D,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE;QACvB,GAAG,KAAK;QACR,SAAS,EACP,OAAO,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC;KACtE,CAAC,CAAC;IAEL,SAAS,CAAC,WAAW,GAAG,oBAAoB,GAAG,GAAG,CAAC;IAEnD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slugify.js","sourceRoot":"","sources":["../../../src/app/util/slugify.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,eAAe,OAAO,CAAC"}
|
package/dist/auth.d.ts
DELETED
package/dist/auth.js
DELETED
package/dist/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,+BAA+B,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/plugins.d.ts
DELETED
package/dist/plugins.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Plugins
|
|
2
|
-
export { apiKeyPlugin } from "./app/plugins/api-key/index.js";
|
|
3
|
-
export { markdownPlugin } from "./app/plugins/markdown/index.js";
|
|
4
|
-
export { openApiPlugin } from "./app/plugins/openapi/index.js";
|
|
5
|
-
export { redirectPlugin } from "./app/plugins/redirect/index.js";
|
|
6
|
-
//# sourceMappingURL=plugins.js.map
|
package/dist/plugins.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DevPortalContext } from "../core/DevPortalContext.js";
|
|
2
|
-
|
|
3
|
-
export interface AuthProvider {
|
|
4
|
-
initialize(context: DevPortalContext): Promise<unknown>;
|
|
5
|
-
login(context: DevPortalContext): Promise<unknown>;
|
|
6
|
-
getToken?: (context: DevPortalContext) => Promise<string | undefined>;
|
|
7
|
-
handleAuthenticationResponse?: (
|
|
8
|
-
path: Path,
|
|
9
|
-
context: DevPortalContext,
|
|
10
|
-
) => Promise<unknown>;
|
|
11
|
-
signOut(context: DevPortalContext): void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type Path = {
|
|
15
|
-
pathname: string;
|
|
16
|
-
search: string;
|
|
17
|
-
hash: string;
|
|
18
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Clerk } from "@clerk/clerk-js";
|
|
2
|
-
import { type AuthProvider } from "./authentication.js";
|
|
3
|
-
|
|
4
|
-
const clerkProvider = ({
|
|
5
|
-
clerkPubKey,
|
|
6
|
-
}: {
|
|
7
|
-
clerkPubKey: string;
|
|
8
|
-
}): AuthProvider => {
|
|
9
|
-
const clerkApi = new Clerk(clerkPubKey);
|
|
10
|
-
|
|
11
|
-
const clerkIsLoaded = clerkApi.load({});
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
initialize: async (context) => {
|
|
15
|
-
await clerkIsLoaded;
|
|
16
|
-
|
|
17
|
-
if (clerkApi.session) {
|
|
18
|
-
await context.setUserProfile({
|
|
19
|
-
isLoggedIn: true,
|
|
20
|
-
name: clerkApi.session.user.fullName ?? undefined,
|
|
21
|
-
email:
|
|
22
|
-
clerkApi.session.user.emailAddresses.at(0)?.emailAddress ??
|
|
23
|
-
undefined,
|
|
24
|
-
});
|
|
25
|
-
} else {
|
|
26
|
-
await context.setUserProfile({
|
|
27
|
-
isLoggedIn: false,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
getToken: async () => {
|
|
33
|
-
await clerkIsLoaded;
|
|
34
|
-
const token = await clerkApi.session?.getToken();
|
|
35
|
-
return token ?? undefined;
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
signOut() {
|
|
39
|
-
clerkApi.signOut();
|
|
40
|
-
},
|
|
41
|
-
login: async () => {
|
|
42
|
-
await clerkApi.redirectToSignIn();
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default clerkProvider;
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import * as oauth from "oauth4webapi";
|
|
2
|
-
import { DevPortalContext } from "../core/DevPortalContext.js";
|
|
3
|
-
import { type AuthProvider } from "./authentication.js";
|
|
4
|
-
const algorithm = "oauth2";
|
|
5
|
-
|
|
6
|
-
const getAuthServerByIssuer = async (issuer: string) => {
|
|
7
|
-
const authorizationServer = await oauth
|
|
8
|
-
.discoveryRequest(new URL(issuer), { algorithm })
|
|
9
|
-
.then((response) =>
|
|
10
|
-
oauth.processDiscoveryResponse(new URL(issuer), response),
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
return authorizationServer;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type AuthServerOption = {
|
|
17
|
-
issuer?: string;
|
|
18
|
-
authorizationEndpoint?: string;
|
|
19
|
-
tokenEndpoint?: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const getAuthServer = async ({
|
|
23
|
-
issuer,
|
|
24
|
-
authorizationEndpoint,
|
|
25
|
-
tokenEndpoint,
|
|
26
|
-
}: AuthServerOption) => {
|
|
27
|
-
return issuer
|
|
28
|
-
? await getAuthServerByIssuer(issuer)
|
|
29
|
-
: ({
|
|
30
|
-
issuer: new URL(authorizationEndpoint!).origin,
|
|
31
|
-
authorization_endpoint: authorizationEndpoint,
|
|
32
|
-
token_endpoint: tokenEndpoint,
|
|
33
|
-
code_challenge_methods_supported: [],
|
|
34
|
-
} satisfies oauth.AuthorizationServer);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const openIdAuth = ({
|
|
38
|
-
clientId,
|
|
39
|
-
clientSecret,
|
|
40
|
-
issuer,
|
|
41
|
-
authorizationEndpoint,
|
|
42
|
-
tokenEndpoint,
|
|
43
|
-
}: {
|
|
44
|
-
clientId: string;
|
|
45
|
-
clientSecret?: string;
|
|
46
|
-
audience?: string;
|
|
47
|
-
} & AuthServerOption): AuthProvider => {
|
|
48
|
-
const client: oauth.Client = {
|
|
49
|
-
client_id: clientId,
|
|
50
|
-
client_secret: clientSecret,
|
|
51
|
-
token_endpoint_auth_method: "none",
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const redirect_uri = "http://localhost:5173/oauth/callback";
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
initialize() {
|
|
58
|
-
return Promise.resolve();
|
|
59
|
-
},
|
|
60
|
-
signOut() {},
|
|
61
|
-
login: async (context: DevPortalContext) => {
|
|
62
|
-
const code_challenge_method = "S256";
|
|
63
|
-
const authorizationServer = await getAuthServer({
|
|
64
|
-
issuer,
|
|
65
|
-
authorizationEndpoint,
|
|
66
|
-
tokenEndpoint,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
if (!authorizationServer.authorization_endpoint) {
|
|
70
|
-
throw new Error("No authorization endpoint");
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The following MUST be generated for every redirect to the authorization_endpoint. You must store
|
|
75
|
-
* the codeVerifier and nonce in the end-user session such that it can be recovered as the user
|
|
76
|
-
* gets redirected from the authorization server back to your application.
|
|
77
|
-
*/
|
|
78
|
-
const codeVerifier = oauth.generateRandomCodeVerifier();
|
|
79
|
-
const codeChallenge =
|
|
80
|
-
await oauth.calculatePKCECodeChallenge(codeVerifier);
|
|
81
|
-
|
|
82
|
-
await context.sessionStorage.set("codeVerifier", codeVerifier);
|
|
83
|
-
|
|
84
|
-
// redirect user to as.authorization_endpoint
|
|
85
|
-
const authorizationUrl = new URL(
|
|
86
|
-
authorizationServer.authorization_endpoint,
|
|
87
|
-
);
|
|
88
|
-
authorizationUrl.searchParams.set("client_id", client.client_id);
|
|
89
|
-
authorizationUrl.searchParams.set("redirect_uri", redirect_uri);
|
|
90
|
-
authorizationUrl.searchParams.set("response_type", "code");
|
|
91
|
-
// authorizationUrl.searchParams.set("scope", "api:read");
|
|
92
|
-
authorizationUrl.searchParams.set("code_challenge", codeChallenge);
|
|
93
|
-
authorizationUrl.searchParams.set(
|
|
94
|
-
"code_challenge_method",
|
|
95
|
-
code_challenge_method,
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* We cannot be sure the AS supports PKCE so we're going to use state too. Use of PKCE is
|
|
100
|
-
* backwards compatible even if the AS doesn't support it which is why we're using it regardless.
|
|
101
|
-
*/
|
|
102
|
-
if (
|
|
103
|
-
authorizationServer.code_challenge_methods_supported?.includes(
|
|
104
|
-
"S256",
|
|
105
|
-
) !== true
|
|
106
|
-
) {
|
|
107
|
-
const state = oauth.generateRandomState();
|
|
108
|
-
authorizationUrl.searchParams.set("state", state);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// now redirect the user to authorizationUrl.href
|
|
112
|
-
location.href = authorizationUrl.href;
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
handleAuthenticationResponse: async ({ search }, { sessionStorage }) => {
|
|
116
|
-
const searchParams = new URLSearchParams(search);
|
|
117
|
-
const state = searchParams.get("state");
|
|
118
|
-
if (!state) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// one eternity later, the user lands back on the redirect_uri
|
|
123
|
-
// Authorization Code Grant Request & Response
|
|
124
|
-
const codeVerifier = await sessionStorage.get("codeVerifier");
|
|
125
|
-
|
|
126
|
-
if (!codeVerifier) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const as = await getAuthServer({
|
|
131
|
-
issuer,
|
|
132
|
-
authorizationEndpoint,
|
|
133
|
-
tokenEndpoint,
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
const params = oauth.validateAuthResponse(
|
|
137
|
-
as,
|
|
138
|
-
client,
|
|
139
|
-
searchParams,
|
|
140
|
-
state,
|
|
141
|
-
);
|
|
142
|
-
if (oauth.isOAuth2Error(params)) {
|
|
143
|
-
console.error("Error Response", params);
|
|
144
|
-
throw new Error(); // Handle OAuth 2.0 redirect error
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const response = await oauth.authorizationCodeGrantRequest(
|
|
148
|
-
as,
|
|
149
|
-
client,
|
|
150
|
-
params,
|
|
151
|
-
redirect_uri,
|
|
152
|
-
codeVerifier,
|
|
153
|
-
);
|
|
154
|
-
|
|
155
|
-
// @todo do we need to do these
|
|
156
|
-
// const challenges = oauth.parseWwwAuthenticateChallenges(response);
|
|
157
|
-
// if (challenges) {
|
|
158
|
-
// for (const challenge of challenges) {
|
|
159
|
-
// console.error("WWW-Authenticate Challenge", challenge);
|
|
160
|
-
// }
|
|
161
|
-
// throw new Error(); // Handle WWW-Authenticate Challenges as needed
|
|
162
|
-
// }
|
|
163
|
-
|
|
164
|
-
const oauthResult = await oauth.processAuthorizationCodeOpenIDResponse(
|
|
165
|
-
as,
|
|
166
|
-
client,
|
|
167
|
-
response,
|
|
168
|
-
);
|
|
169
|
-
if (oauth.isOAuth2Error(oauthResult)) {
|
|
170
|
-
console.error("Error Response", oauthResult);
|
|
171
|
-
throw new Error(oauthResult.error);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const userInfoResponse = await oauth.userInfoRequest(
|
|
175
|
-
as,
|
|
176
|
-
client,
|
|
177
|
-
oauthResult.access_token,
|
|
178
|
-
);
|
|
179
|
-
const userInfo = await userInfoResponse.json();
|
|
180
|
-
|
|
181
|
-
// void storage.setProfile({
|
|
182
|
-
// sub: userInfo.sub,
|
|
183
|
-
// email: userInfo.email,
|
|
184
|
-
// name: userInfo.name,
|
|
185
|
-
// email_verified: userInfo.email_verified ?? false,
|
|
186
|
-
// picture: userInfo.picture,
|
|
187
|
-
// id_token: oauthResult.id_token,
|
|
188
|
-
// access_token: oauthResult.access_token,
|
|
189
|
-
// });
|
|
190
|
-
},
|
|
191
|
-
};
|
|
192
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// import { type LucideProps } from "lucide-react";
|
|
2
|
-
// import dynamicIconImports from "lucide-react/dynamicIconImports.js";
|
|
3
|
-
// import { Suspense, lazy, memo } from "react";
|
|
4
|
-
// import { cn } from "../util/cn.js";
|
|
5
|
-
|
|
6
|
-
// export type IconName = keyof typeof dynamicIconImports;
|
|
7
|
-
|
|
8
|
-
// const IconNames = Object.keys(dynamicIconImports) as IconName[];
|
|
9
|
-
|
|
10
|
-
// export const isValidIcon = (name: unknown): name is IconName =>
|
|
11
|
-
// typeof name === "string" && IconNames.includes(name as IconName);
|
|
12
|
-
|
|
13
|
-
// type IconProps = Omit<LucideProps, "ref"> & {
|
|
14
|
-
// name: IconName;
|
|
15
|
-
// inline?: boolean;
|
|
16
|
-
// };
|
|
17
|
-
|
|
18
|
-
// const Fallback = ({
|
|
19
|
-
// inline,
|
|
20
|
-
// size,
|
|
21
|
-
// }: {
|
|
22
|
-
// inline?: boolean;
|
|
23
|
-
// size?: string | number;
|
|
24
|
-
// }) => (
|
|
25
|
-
// <span
|
|
26
|
-
// className={cn(inline ? "inline-block" : "block", "bg-background")}
|
|
27
|
-
// style={{ height: size, width: size }}
|
|
28
|
-
// role="presentation"
|
|
29
|
-
// />
|
|
30
|
-
// );
|
|
31
|
-
|
|
32
|
-
// export const DynamicIcon = memo(function ({
|
|
33
|
-
// name,
|
|
34
|
-
// inline,
|
|
35
|
-
// className,
|
|
36
|
-
// size = 16,
|
|
37
|
-
// ...props
|
|
38
|
-
// }: IconProps) {
|
|
39
|
-
// const LucideIcon = lazy(dynamicIconImports[name]);
|
|
40
|
-
|
|
41
|
-
// return (
|
|
42
|
-
// <Suspense fallback={<Fallback inline={inline} size={size} />}>
|
|
43
|
-
// <LucideIcon
|
|
44
|
-
// {...props}
|
|
45
|
-
// size={size}
|
|
46
|
-
// className={cn(inline && "inline-block align-[-0.125em]", className)}
|
|
47
|
-
// />
|
|
48
|
-
// </Suspense>
|
|
49
|
-
// );
|
|
50
|
-
// });
|
|
51
|
-
|
|
52
|
-
export type IconName = string;
|
|
53
|
-
|
|
54
|
-
export function isValidIcon(name: unknown): name is IconName {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export const DynamicIcon = (props: { name: string; size?: number }) => (
|
|
59
|
-
<div></div>
|
|
60
|
-
);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type PropsWithChildren } from "react";
|
|
2
|
-
|
|
3
|
-
export const SideNavigationWrapper = forwardRef<
|
|
4
|
-
HTMLDivElement,
|
|
5
|
-
PropsWithChildren
|
|
6
|
-
>(({ children }, ref) => {
|
|
7
|
-
return (
|
|
8
|
-
<nav
|
|
9
|
-
className="hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2"
|
|
10
|
-
ref={ref}
|
|
11
|
-
>
|
|
12
|
-
{children}
|
|
13
|
-
</nav>
|
|
14
|
-
);
|
|
15
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
3
|
-
k: infer I,
|
|
4
|
-
) => void
|
|
5
|
-
? I
|
|
6
|
-
: never;
|
|
7
|
-
|
|
8
|
-
type AnyCombination<T, U = T> = T extends any
|
|
9
|
-
? U extends any
|
|
10
|
-
? T | (T & U)
|
|
11
|
-
: never
|
|
12
|
-
: never;
|
|
13
|
-
|
|
14
|
-
export type Combine<T extends any[]> =
|
|
15
|
-
| UnionToIntersection<T[number]>
|
|
16
|
-
| AnyCombination<T[number]>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createServer } from "node:http";
|
|
2
|
-
import { createGraphQLServer } from "./index.js";
|
|
3
|
-
|
|
4
|
-
const yoga = createGraphQLServer();
|
|
5
|
-
|
|
6
|
-
const server = createServer(yoga);
|
|
7
|
-
|
|
8
|
-
server.listen(4000, () => {
|
|
9
|
-
console.log(`🚀 Server ready at http://localhost:4000/graphql`);
|
|
10
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useApiIdentities } from "../../components/context/DevPortalProvider.js";
|
|
2
|
-
import { type ApiKeyPluginOptions } from "./index.js";
|
|
3
|
-
|
|
4
|
-
export const SettingsApiKeys = ({
|
|
5
|
-
options,
|
|
6
|
-
}: {
|
|
7
|
-
options: ApiKeyPluginOptions;
|
|
8
|
-
}) => {
|
|
9
|
-
const keys = useApiIdentities();
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div className="prose dark:prose-invert">
|
|
13
|
-
<h1>Who's who</h1>
|
|
14
|
-
<button className="border">Create API Key</button>
|
|
15
|
-
<ul>
|
|
16
|
-
{keys.data.map((key) => (
|
|
17
|
-
<li>{key.name}</li>
|
|
18
|
-
))}
|
|
19
|
-
</ul>
|
|
20
|
-
</div>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { DevPortalSystemPaths } from "../../DevPortal.js";
|
|
2
|
-
import { DevPortalContext } from "../../core/DevPortalContext.js";
|
|
3
|
-
import {
|
|
4
|
-
type ApiIdentityPlugin,
|
|
5
|
-
type DevPortalPlugin,
|
|
6
|
-
} from "../../core/plugins.js";
|
|
7
|
-
import { SettingsApiKeys } from "./SettingsApiKeys.js";
|
|
8
|
-
|
|
9
|
-
export type GetConsumerOptions =
|
|
10
|
-
| {
|
|
11
|
-
getConsumers: (context: DevPortalContext) => Promise<ConsumerData | void>;
|
|
12
|
-
}
|
|
13
|
-
| { consumerEndpoint: string };
|
|
14
|
-
|
|
15
|
-
export type ApiKeyPluginOptions = {
|
|
16
|
-
rollKey?: (
|
|
17
|
-
id: string,
|
|
18
|
-
consumerName: string,
|
|
19
|
-
context: DevPortalContext,
|
|
20
|
-
) => Promise<void>;
|
|
21
|
-
deleteKey?: (
|
|
22
|
-
id: string,
|
|
23
|
-
consumerName: string,
|
|
24
|
-
context: DevPortalContext,
|
|
25
|
-
) => Promise<void>;
|
|
26
|
-
updateConsumerDescription?: (
|
|
27
|
-
consumerName: string,
|
|
28
|
-
description: string,
|
|
29
|
-
context: DevPortalContext,
|
|
30
|
-
) => Promise<void>;
|
|
31
|
-
createConsumer?: (
|
|
32
|
-
description: string,
|
|
33
|
-
context: DevPortalContext,
|
|
34
|
-
) => Promise<void>;
|
|
35
|
-
deleteConsumer?: (
|
|
36
|
-
consumerName: string,
|
|
37
|
-
context: DevPortalContext,
|
|
38
|
-
) => Promise<void>;
|
|
39
|
-
} & GetConsumerOptions;
|
|
40
|
-
|
|
41
|
-
export interface ConsumerData {
|
|
42
|
-
consumers: Consumer[];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface Consumer {
|
|
46
|
-
name: string;
|
|
47
|
-
createdOn?: string;
|
|
48
|
-
description?: string;
|
|
49
|
-
apiKeys: ConsumerApiKey[];
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface ConsumerApiKey {
|
|
53
|
-
id: string;
|
|
54
|
-
description?: string;
|
|
55
|
-
createdOn?: string;
|
|
56
|
-
updatedOn?: string;
|
|
57
|
-
expiresOn?: string;
|
|
58
|
-
key: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const defaultGetConsumers = async (context: DevPortalContext) => {
|
|
62
|
-
const accessToken = await context.authentication?.getToken?.(context);
|
|
63
|
-
|
|
64
|
-
if (!accessToken) {
|
|
65
|
-
throw new Error("No token found");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const consumers = await fetch(
|
|
69
|
-
"https://zudoku-customer-main-b36fa2f.d2.zuplo.dev/v1/developer/api-keys",
|
|
70
|
-
{
|
|
71
|
-
headers: {
|
|
72
|
-
Authorization: `Bearer ${accessToken}`,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
return { consumers: [await consumers.json()] };
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const apiKeyPlugin = (
|
|
81
|
-
options: ApiKeyPluginOptions,
|
|
82
|
-
): DevPortalPlugin & ApiIdentityPlugin => {
|
|
83
|
-
const getConsumers =
|
|
84
|
-
"getConsumers" in options ? options.getConsumers : defaultGetConsumers;
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
getNavigation: async (path: string) => {
|
|
88
|
-
if (path !== DevPortalSystemPaths.Settings) {
|
|
89
|
-
return [];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return [
|
|
93
|
-
{
|
|
94
|
-
path: "settings/api-keys",
|
|
95
|
-
label: "API Keys",
|
|
96
|
-
children: [],
|
|
97
|
-
},
|
|
98
|
-
];
|
|
99
|
-
},
|
|
100
|
-
getIdentities: async (context) => {
|
|
101
|
-
return [];
|
|
102
|
-
// throw new Error("Not implemented");
|
|
103
|
-
// const keys = await getConsumers(context);
|
|
104
|
-
// return (keys ?? { consumers: [] }).consumers
|
|
105
|
-
// .flatMap((consumer) => consumer.apiKeys)
|
|
106
|
-
// .map((key) => ({
|
|
107
|
-
// authorizeRequest: (request: Request) => {
|
|
108
|
-
// request.headers.set("Authorization", `Bearer ${key.key}`);
|
|
109
|
-
// },
|
|
110
|
-
// id: key.id,
|
|
111
|
-
// name: key.id,
|
|
112
|
-
// }));
|
|
113
|
-
},
|
|
114
|
-
getRoutes: () => {
|
|
115
|
-
return [
|
|
116
|
-
{
|
|
117
|
-
path: "/settings/api-keys",
|
|
118
|
-
element: <SettingsApiKeys options={options} />,
|
|
119
|
-
},
|
|
120
|
-
];
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { useApiIdentities } from "../../components/context/DevPortalProvider.js";
|
|
2
|
-
import type { OperationListItemResult } from "./OperationList.js";
|
|
3
|
-
import { Playground } from "./playground/Playground.js";
|
|
4
|
-
import { useOasConfig } from "./index.js";
|
|
5
|
-
import { gql, useQuery } from "urql";
|
|
6
|
-
|
|
7
|
-
const getServerQuery = gql`
|
|
8
|
-
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
9
|
-
schema(input: $input, type: $type) {
|
|
10
|
-
url
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
export const MakeRequest = ({
|
|
16
|
-
operation,
|
|
17
|
-
}: {
|
|
18
|
-
operation: OperationListItemResult;
|
|
19
|
-
}) => {
|
|
20
|
-
const identities = useApiIdentities();
|
|
21
|
-
const variables = useOasConfig();
|
|
22
|
-
const [server] = useQuery({ query: getServerQuery, variables });
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div>
|
|
26
|
-
<Playground
|
|
27
|
-
host={server.data?.schema.url}
|
|
28
|
-
method={operation.method}
|
|
29
|
-
url={operation.path}
|
|
30
|
-
defaultHeaders={[]}
|
|
31
|
-
/>
|
|
32
|
-
{identities.data.map((identity) => (
|
|
33
|
-
<button
|
|
34
|
-
key={identity.id}
|
|
35
|
-
onClick={() => {
|
|
36
|
-
const test = new Request(
|
|
37
|
-
"https://zudoku-customer-main-b36fa2f.d2.zuplo.dev" +
|
|
38
|
-
operation.path,
|
|
39
|
-
);
|
|
40
|
-
void fetch(identity.authorizeRequest(test));
|
|
41
|
-
}}
|
|
42
|
-
className="p-2 border border-border rounded hover:bg-accent"
|
|
43
|
-
>
|
|
44
|
-
Test Request {operation.path} ({identity.name})
|
|
45
|
-
</button>
|
|
46
|
-
))}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|