From c3aa86a7a8698274b890cf682f47e4185d7083e7 Mon Sep 17 00:00:00 2001 From: Bilal ABBAD Date: Tue, 10 Dec 2024 13:28:38 +0100 Subject: [PATCH] Refresh menu after access token has expired (#5180) Issue: https://github.com/opsmill/infrahub/issues/5099 --- changelog/5099.fixed.md | 1 + frontend/app/biome.json | 5 +- frontend/app/package-lock.json | 40 +- frontend/app/package.json | 5 +- frontend/app/src/api/client.ts | 38 + .../src/components/search/search-actions.tsx | 38 +- frontend/app/src/infraops.d.ts | 6153 ++++++++--------- .../layout/menu-navigation/get-menu.ts | 32 + .../menu-navigation/menu-navigation.tsx | 38 +- frontend/app/src/state/atoms/schema.atom.ts | 23 - frontend/app/tsconfig.json | 1 + 11 files changed, 3219 insertions(+), 3155 deletions(-) create mode 100644 changelog/5099.fixed.md create mode 100644 frontend/app/src/screens/layout/menu-navigation/get-menu.ts diff --git a/changelog/5099.fixed.md b/changelog/5099.fixed.md new file mode 100644 index 0000000000..b7291e8dd3 --- /dev/null +++ b/changelog/5099.fixed.md @@ -0,0 +1 @@ +Correctly refresh menu after access token has expired diff --git a/frontend/app/biome.json b/frontend/app/biome.json index bf337a6dc0..e837b999f1 100644 --- a/frontend/app/biome.json +++ b/frontend/app/biome.json @@ -7,9 +7,10 @@ "./coverage", "./dist", "./playwright-report", - "./src/generated", "./test-results", - "./tests/e2e/.auth" + "./tests/e2e/.auth", + "./src/generated", + "./src/infraops.d.ts" ] }, "formatter": { diff --git a/frontend/app/package-lock.json b/frontend/app/package-lock.json index f8a1c4610b..92ab59fb28 100644 --- a/frontend/app/package-lock.json +++ b/frontend/app/package-lock.json @@ -50,6 +50,7 @@ "handlebars": "^4.7.8", "jotai": "^2.10.0", "json-to-graphql-query": "^2.2.5", + "openapi-fetch": "^0.13.3", "prismjs": "^1.29.0", "query-string": "^9.0.0", "ramda": "^0.29.1", @@ -99,7 +100,7 @@ "cypress": "^13.15.0", "jsdom": "^24.0.0", "lint-staged": "^15.2.10", - "openapi-typescript": "^7.0.2", + "openapi-typescript": "^7.4.4", "postcss": "^8.4.23", "react-test-renderer": "^18.2.0", "tailwindcss": "^3.4.3", @@ -5153,21 +5154,21 @@ } }, "node_modules/@redocly/config": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.12.1.tgz", - "integrity": "sha512-RW3rSirfsPdr0uvATijRDU3f55SuZV3m7/ppdTDvGw4IB0cmeZRkFmqTrchxMqWP50Gfg1tpHnjdxUCNo0E2qg==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.17.1.tgz", + "integrity": "sha512-CEmvaJuG7pm2ylQg53emPmtgm4nW2nxBgwXzbVEHpGas/lGnMyN8Zlkgiz6rPw0unASg6VW3wlz27SOL5XFHYQ==", "dev": true, "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.25.7", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.25.7.tgz", - "integrity": "sha512-qidGKk4Bq0Ud0O8gRuXnDSLwVopwrf5+roNvpkvdQPVIHFSYJ5dscJkThdsn7OW8bNqahumQPWWczEh9l93FZw==", + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.26.0.tgz", + "integrity": "sha512-8Ofu6WpBp7eoLmf1qQ4+T0W4LRr8es+4Drw/RJG+acPXmaT2TmHk2B2v+3+1R9GqSIj6kx3N7JmQkxAPCnvDLw==", "dev": true, "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.12.1", + "@redocly/config": "^0.17.0", "colorette": "^1.2.0", "https-proxy-agent": "^7.0.4", "js-levenshtein": "^1.1.6", @@ -14051,14 +14052,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/openapi-fetch": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.13.3.tgz", + "integrity": "sha512-M1THnPkNOXUPsQKZfqunhW/wqH8l3/W3Vlj4lemQynf4mTaTwBTvL2pgjBe0zerL/GFT5ttCHu9fYvanUI3tOw==", + "license": "MIT", + "dependencies": { + "openapi-typescript-helpers": "^0.0.15" + } + }, "node_modules/openapi-typescript": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.4.1.tgz", - "integrity": "sha512-HrRoWveViADezHCNgQqZmPKmQ74q7nuH/yg9ursFucZaYQNUqsX38fE/V2sKBHVM+pws4tAHpuh/ext2UJ/AoQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.4.4.tgz", + "integrity": "sha512-7j3nktnRzlQdlHnHsrcr6Gqz8f80/RhfA2I8s1clPI+jkY0hLNmnYVKBfuUEli5EEgK1B6M+ibdS5REasPlsUw==", "dev": true, "license": "MIT", "dependencies": { - "@redocly/openapi-core": "^1.25.3", + "@redocly/openapi-core": "^1.25.9", "ansi-colors": "^4.1.3", "change-case": "^5.4.4", "parse-json": "^8.1.0", @@ -14072,6 +14082,12 @@ "typescript": "^5.x" } }, + "node_modules/openapi-typescript-helpers": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.15.tgz", + "integrity": "sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==", + "license": "MIT" + }, "node_modules/openapi-typescript/node_modules/change-case": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", diff --git a/frontend/app/package.json b/frontend/app/package.json index 600299dcb9..96f1af7b6f 100644 --- a/frontend/app/package.json +++ b/frontend/app/package.json @@ -25,7 +25,7 @@ "cypress:run:component": "cypress run --component", "cypress:run:spec": "ELECTRON_ENABLE_LOGGING=1 cypress run --spec", "biome": "biome check .", - "biome:fix": "biome check --apply ." + "biome:fix": "biome check --write ." }, "dependencies": { "@apollo/client": "^3.9.10", @@ -70,6 +70,7 @@ "handlebars": "^4.7.8", "jotai": "^2.10.0", "json-to-graphql-query": "^2.2.5", + "openapi-fetch": "^0.13.3", "prismjs": "^1.29.0", "query-string": "^9.0.0", "ramda": "^0.29.1", @@ -119,7 +120,7 @@ "cypress": "^13.15.0", "jsdom": "^24.0.0", "lint-staged": "^15.2.10", - "openapi-typescript": "^7.0.2", + "openapi-typescript": "^7.4.4", "postcss": "^8.4.23", "react-test-renderer": "^18.2.0", "tailwindcss": "^3.4.3", diff --git a/frontend/app/src/api/client.ts b/frontend/app/src/api/client.ts index b31e4c824e..ac02cc5d96 100644 --- a/frontend/app/src/api/client.ts +++ b/frontend/app/src/api/client.ts @@ -1,4 +1,11 @@ import { QueryClient } from "@tanstack/react-query"; +import createClient, { Middleware } from "openapi-fetch"; + +import { INFRAHUB_API_SERVER_URL } from "@/config/config"; + +import { ACCESS_TOKEN_KEY } from "@/config/localStorage"; +import { getNewToken } from "@/hooks/useAuth"; +import type { paths } from "@/infraops"; export const queryClient = new QueryClient({ defaultOptions: { @@ -7,3 +14,34 @@ export const queryClient = new QueryClient({ }, }, }); + +export const apiClient = createClient({ baseUrl: INFRAHUB_API_SERVER_URL }); + +const authMiddleware: Middleware = { + async onRequest({ request }) { + const accessToken = localStorage.getItem(ACCESS_TOKEN_KEY); + + if (!accessToken) return request; + + request.headers.set("Authorization", `Bearer ${accessToken}`); + return request; + }, + async onResponse({ request, response }) { + if (response.status === 401) { + try { + const newToken = await getNewToken(); + + if (!newToken?.access_token) { + return response; + } + + request.headers.set("Authorization", `Bearer ${newToken.access_token}`); + return fetch(request); + } catch (e) { + return response; + } + } + }, +}; + +apiClient.use(authMiddleware); diff --git a/frontend/app/src/components/search/search-actions.tsx b/frontend/app/src/components/search/search-actions.tsx index 734686c61b..a7a295ad44 100644 --- a/frontend/app/src/components/search/search-actions.tsx +++ b/frontend/app/src/components/search/search-actions.tsx @@ -1,12 +1,15 @@ import { SearchAnywhereGroup } from "@/components/search/search-anywhere-group"; import { SearchAnywhereItem } from "@/components/search/search-anywhere-item"; import { Badge } from "@/components/ui/badge"; +import { menuQueryOptions } from "@/screens/layout/menu-navigation/get-menu"; import { MenuItem } from "@/screens/layout/menu-navigation/types"; -import { IModelSchema, genericsState, menuFlatAtom, schemaState } from "@/state/atoms/schema.atom"; +import { IModelSchema, genericsState, schemaState } from "@/state/atoms/schema.atom"; import { constructPath } from "@/utils/fetch"; import { Icon } from "@iconify-icon/react"; +import { useQuery } from "@tanstack/react-query"; import { useCommandState } from "cmdk"; import { useAtomValue } from "jotai"; +import { useMemo } from "react"; export const SearchActions = () => { const query = useCommandState((state) => state.search); @@ -14,10 +17,41 @@ export const SearchActions = () => { const generics = useAtomValue(genericsState); const models: IModelSchema[] = [...nodes, ...generics]; - const menuItems = useAtomValue(menuFlatAtom); + const { data: menuData, isPending, isError } = useQuery(menuQueryOptions()); + + const menuItems = useMemo(() => { + if (!menuData) return []; + + const menuItems: MenuItem[] = []; + + const flattenMenuItems = (menuItem: MenuItem) => { + if (menuItem.path !== "") menuItems.push(menuItem); + + if (menuItem.children && menuItem.children.length > 0) { + menuItem.children.forEach(flattenMenuItems); + } + }; + + menuData.sections.object.forEach(flattenMenuItems); + menuData.sections.internal.forEach(flattenMenuItems); + + return menuItems; + }, [menuData]); if (query === "") return null; + if (isPending) { + return ( + + + Loading... + + + ); + } + + if (isError || menuItems.length === 0) return null; + const queryLowerCased = query.toLowerCase(); const resultsMenu = menuItems.filter(({ label }) => label.toLowerCase().includes(queryLowerCased) diff --git a/frontend/app/src/infraops.d.ts b/frontend/app/src/infraops.d.ts index e8a4d30f6d..943838d9a0 100644 --- a/frontend/app/src/infraops.d.ts +++ b/frontend/app/src/infraops.d.ts @@ -4,3151 +4,3138 @@ */ export interface paths { - "/api/artifact/{artifact_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + "/api/artifact/{artifact_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Artifact */ + get: operations["get_artifact_api_artifact__artifact_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/artifact/generate/{artifact_definition_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Generate Artifact */ + post: operations["generate_artifact_api_artifact_generate__artifact_definition_id__post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/auth/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Login User */ + post: operations["login_user_api_auth_login_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/auth/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Refresh Jwt Token */ + post: operations["refresh_jwt_token_api_auth_refresh_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/auth/logout": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Logout */ + post: operations["logout_api_auth_logout_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/diff/data": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Diff Data */ + get: operations["get_diff_data_api_diff_data_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/diff/schema": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Diff Schema */ + get: operations["get_diff_schema_api_diff_schema_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/diff/files": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Diff Files */ + get: operations["get_diff_files_api_diff_files_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/diff/artifacts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Diff Artifacts */ + get: operations["get_diff_artifacts_api_diff_artifacts_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/file/{repository_id}/{file_path}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get File + * @description Retrieve a file from a git repository. + */ + get: operations["get_file_api_file__repository_id___file_path__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Config */ + get: operations["get_config_api_config_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Info */ + get: operations["get_info_api_info_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/menu": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Menu */ + get: operations["get_menu_api_menu_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/oauth2/{provider_name}/authorize": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Authorize */ + get: operations["authorize_api_oauth2__provider_name__authorize_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/oauth2/{provider_name}/token": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Token */ + get: operations["token_api_oauth2__provider_name__token_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/oidc/{provider_name}/authorize": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Authorize */ + get: operations["authorize_api_oidc__provider_name__authorize_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/oidc/{provider_name}/token": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Token */ + get: operations["token_api_oidc__provider_name__token_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/query/{query_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Graphql Query Get */ + get: operations["graphql_query_get_api_query__query_id__get"]; + put?: never; + /** Graphql Query Post */ + post: operations["graphql_query_post_api_query__query_id__post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/schema": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Schema */ + get: operations["get_schema_api_schema_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/schema/summary": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Schema Summary */ + get: operations["get_schema_summary_api_schema_summary_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/schema/{schema_kind}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Schema By Kind */ + get: operations["get_schema_by_kind_api_schema__schema_kind__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/schema/json_schema/{schema_kind}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Json Schema By Kind */ + get: operations["get_json_schema_by_kind_api_schema_json_schema__schema_kind__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/schema/load": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Load Schema */ + post: operations["load_schema_api_schema_load_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/schema/check": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Check Schema */ + post: operations["check_schema_api_schema_check_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/storage/object/{identifier}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get File */ + get: operations["get_file_api_storage_object__identifier__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/storage/upload/content": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Upload Content */ + post: operations["upload_content_api_storage_upload_content_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/storage/upload/file": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Upload File */ + post: operations["upload_file_api_storage_upload_file_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/transform/python/{transform_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Transform Python */ + get: operations["transform_python_api_transform_python__transform_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/transform/jinja2/{transform_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Transform Jinja2 */ + get: operations["transform_jinja2_api_transform_jinja2__transform_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - /** Get Artifact */ - get: operations["get_artifact_api_artifact__artifact_id__get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/artifact/generate/{artifact_definition_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Generate Artifact */ - post: operations["generate_artifact_api_artifact_generate__artifact_definition_id__post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/auth/login": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Login User */ - post: operations["login_user_api_auth_login_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/auth/refresh": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Refresh Jwt Token */ - post: operations["refresh_jwt_token_api_auth_refresh_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/auth/logout": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Logout */ - post: operations["logout_api_auth_logout_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/diff/data": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Diff Data */ - get: operations["get_diff_data_api_diff_data_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/diff/schema": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Diff Schema */ - get: operations["get_diff_schema_api_diff_schema_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/diff/files": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Diff Files */ - get: operations["get_diff_files_api_diff_files_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/diff/artifacts": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Diff Artifacts */ - get: operations["get_diff_artifacts_api_diff_artifacts_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/file/{repository_id}/{file_path}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get File - * @description Retrieve a file from a git repository. - */ - get: operations["get_file_api_file__repository_id___file_path__get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Config */ - get: operations["get_config_api_config_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/info": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Info */ - get: operations["get_info_api_info_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/menu": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Menu */ - get: operations["get_menu_api_menu_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/oauth2/{provider_name}/authorize": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Authorize */ - get: operations["authorize_api_oauth2__provider_name__authorize_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/oauth2/{provider_name}/token": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Token */ - get: operations["token_api_oauth2__provider_name__token_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/oidc/{provider_name}/authorize": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Authorize */ - get: operations["authorize_api_oidc__provider_name__authorize_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/oidc/{provider_name}/token": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Token */ - get: operations["token_api_oidc__provider_name__token_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/query/{query_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Graphql Query Get */ - get: operations["graphql_query_get_api_query__query_id__get"]; - put?: never; - /** Graphql Query Post */ - post: operations["graphql_query_post_api_query__query_id__post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/schema": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Schema */ - get: operations["get_schema_api_schema_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/schema/summary": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Schema Summary */ - get: operations["get_schema_summary_api_schema_summary_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/schema/{schema_kind}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Schema By Kind */ - get: operations["get_schema_by_kind_api_schema__schema_kind__get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/schema/json_schema/{schema_kind}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Json Schema By Kind */ - get: operations["get_json_schema_by_kind_api_schema_json_schema__schema_kind__get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/schema/load": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Load Schema */ - post: operations["load_schema_api_schema_load_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/schema/check": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Check Schema */ - post: operations["check_schema_api_schema_check_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/storage/object/{identifier}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get File */ - get: operations["get_file_api_storage_object__identifier__get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/storage/upload/content": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Upload Content */ - post: operations["upload_content_api_storage_upload_content_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/storage/upload/file": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Upload File */ - post: operations["upload_file_api_storage_upload_file_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/transform/python/{transform_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Transform Python */ - get: operations["transform_python_api_transform_python__transform_id__get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/transform/jinja2/{transform_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Transform Jinja2 */ - get: operations["transform_jinja2_api_transform_jinja2__transform_id__get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; } export type webhooks = Record; export interface components { - schemas: { - /** APIGenericSchema */ - APIGenericSchema: { - /** - * Id - * @description The ID of the node - */ - id?: string | null; - /** - * @description Expected state of the node/generic after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Node name, must be unique within a namespace and must start with an uppercase letter. - */ - name: string; - /** - * Namespace - * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. - */ - namespace: string; - /** - * Description - * @description Short description of the model, will be visible in the frontend. - */ - description?: string | null; - /** - * Label - * @description Human friendly representation of the name/kind - */ - label?: string | null; - /** - * @description Type of branch support for the model. - * @default aware - */ - branch: components["schemas"]["BranchSupportType"]; - /** - * Default Filter - * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) - */ - default_filter?: string | null; - /** - * Human Friendly Id - * @description Human friendly and unique identifier for the object. - */ - human_friendly_id?: string[] | null; - /** - * Display Labels - * @description List of attributes to use to generate the display label - */ - display_labels?: string[] | null; - /** - * Include In Menu - * @description Defines if objects of this kind should be included in the menu. - */ - include_in_menu?: boolean | null; - /** - * Menu Placement - * @description Defines where in the menu this object should be placed. - */ - menu_placement?: string | null; - /** - * Icon - * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ - */ - icon?: string | null; - /** - * Order By - * @description List of attributes to use to order the results by default - */ - order_by?: string[] | null; - /** - * Uniqueness Constraints - * @description List of multi-element uniqueness constraints that can combine relationships and attributes - */ - uniqueness_constraints?: string[][] | null; - /** - * Documentation - * @description Link to a documentation associated with this object, can be internal or external. - */ - documentation?: string | null; - /** - * Attributes - * @description Node attributes - */ - attributes?: components["schemas"]["AttributeSchema-Output"][]; - /** - * Relationships - * @description Node Relationships - */ - relationships?: components["schemas"]["RelationshipSchema"][]; - /** - * Hierarchical - * @description Defines if the Generic support the hierarchical mode. - * @default false - */ - hierarchical: boolean; - /** - * Generate Profile - * @description Indicate if a profile schema should be generated for this schema - * @default true - */ - generate_profile: boolean; - /** - * Used By - * @description List of Nodes that are referencing this Generic - */ - used_by?: string[]; - /** Kind */ - kind?: string | null; - /** Hash */ - hash: string; - }; - /** APINodeSchema */ - APINodeSchema: { - /** - * Id - * @description The ID of the node - */ - id?: string | null; - /** - * @description Expected state of the node/generic after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Node name, must be unique within a namespace and must start with an uppercase letter. - */ - name: string; - /** - * Namespace - * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. - */ - namespace: string; - /** - * Description - * @description Short description of the model, will be visible in the frontend. - */ - description?: string | null; - /** - * Label - * @description Human friendly representation of the name/kind - */ - label?: string | null; - /** - * @description Type of branch support for the model. - * @default aware - */ - branch: components["schemas"]["BranchSupportType"]; - /** - * Default Filter - * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) - */ - default_filter?: string | null; - /** - * Human Friendly Id - * @description Human friendly and unique identifier for the object. - */ - human_friendly_id?: string[] | null; - /** - * Display Labels - * @description List of attributes to use to generate the display label - */ - display_labels?: string[] | null; - /** - * Include In Menu - * @description Defines if objects of this kind should be included in the menu. - */ - include_in_menu?: boolean | null; - /** - * Menu Placement - * @description Defines where in the menu this object should be placed. - */ - menu_placement?: string | null; - /** - * Icon - * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ - */ - icon?: string | null; - /** - * Order By - * @description List of attributes to use to order the results by default - */ - order_by?: string[] | null; - /** - * Uniqueness Constraints - * @description List of multi-element uniqueness constraints that can combine relationships and attributes - */ - uniqueness_constraints?: string[][] | null; - /** - * Documentation - * @description Link to a documentation associated with this object, can be internal or external. - */ - documentation?: string | null; - /** - * Attributes - * @description Node attributes - */ - attributes?: components["schemas"]["AttributeSchema-Output"][]; - /** - * Relationships - * @description Node Relationships - */ - relationships?: components["schemas"]["RelationshipSchema"][]; - /** - * Inherit From - * @description List of Generic Kind that this node is inheriting from - */ - inherit_from?: string[]; - /** - * Generate Profile - * @description Indicate if a profile schema should be generated for this schema - * @default true - */ - generate_profile: boolean; - /** - * Hierarchy - * @description Internal value to track the name of the Hierarchy, must match the name of a Generic supporting hierarchical mode - */ - hierarchy?: string | null; - /** - * Parent - * @description Expected Kind for the parent node in a Hierarchy, default to the main generic defined if not defined. - */ - parent?: string | null; - /** - * Children - * @description Expected Kind for the children nodes in a Hierarchy, default to the main generic defined if not defined. - */ - children?: string | null; - /** Kind */ - kind?: string | null; - /** Hash */ - hash: string; - }; - /** APIProfileSchema */ - APIProfileSchema: { - /** - * Id - * @description The ID of the node - */ - id?: string | null; - /** - * @description Expected state of the node/generic after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Node name, must be unique within a namespace and must start with an uppercase letter. - */ - name: string; - /** - * Namespace - * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. - */ - namespace: string; - /** - * Description - * @description Short description of the model, will be visible in the frontend. - */ - description?: string | null; - /** - * Label - * @description Human friendly representation of the name/kind - */ - label?: string | null; - /** - * @description Type of branch support for the model. - * @default aware - */ - branch: components["schemas"]["BranchSupportType"]; - /** - * Default Filter - * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) - */ - default_filter?: string | null; - /** - * Human Friendly Id - * @description Human friendly and unique identifier for the object. - */ - human_friendly_id?: string[] | null; - /** - * Display Labels - * @description List of attributes to use to generate the display label - */ - display_labels?: string[] | null; - /** - * Include In Menu - * @description Defines if objects of this kind should be included in the menu. - */ - include_in_menu?: boolean | null; - /** - * Menu Placement - * @description Defines where in the menu this object should be placed. - */ - menu_placement?: string | null; - /** - * Icon - * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ - */ - icon?: string | null; - /** - * Order By - * @description List of attributes to use to order the results by default - */ - order_by?: string[] | null; - /** - * Uniqueness Constraints - * @description List of multi-element uniqueness constraints that can combine relationships and attributes - */ - uniqueness_constraints?: string[][] | null; - /** - * Documentation - * @description Link to a documentation associated with this object, can be internal or external. - */ - documentation?: string | null; - /** - * Attributes - * @description Node attributes - */ - attributes?: components["schemas"]["AttributeSchema-Output"][]; - /** - * Relationships - * @description Node Relationships - */ - relationships?: components["schemas"]["RelationshipSchema"][]; - /** - * Inherit From - * @description List of Generic Kind that this profile is inheriting from - */ - inherit_from?: string[]; - /** Kind */ - kind?: string | null; - /** Hash */ - hash: string; - }; - /** AccessTokenResponse */ - AccessTokenResponse: { - /** - * Access Token - * @description JWT access_token - */ - access_token: string; - }; - /** - * AllowOverrideType - * @enum {string} - */ - AllowOverrideType: "none" | "any"; - /** AnalyticsSettings */ - AnalyticsSettings: { - /** - * Enable - * @default true - */ - enable: boolean; - /** Address */ - address?: string | null; - /** Api Key */ - api_key?: string | null; - }; - /** ArtifactGeneratePayload */ - ArtifactGeneratePayload: { - /** Nodes */ - nodes?: string[]; - }; - /** ArtifactTarget */ - ArtifactTarget: { - /** Id */ - id: string; - /** Kind */ - kind: string; - /** Display Label */ - display_label?: string | null; - }; - /** AttributeSchema */ - "AttributeSchema-Input": { - /** - * Id - * @description The ID of the attribute - */ - id?: string | null; - /** - * @description Expected state of the attribute after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Attribute name, must be unique within a model and must be all lowercase. - */ - name: string; - /** - * Kind - * @description Defines the type of the attribute. - */ - kind: string; - /** - * Enum - * @description Define a list of valid values for the attribute. - */ - enum?: unknown[] | null; - /** - * Choices - * @description Define a list of valid choices for a dropdown attribute. - */ - choices?: components["schemas"]["DropdownChoice"][] | null; - /** - * Regex - * @description Regex uses to limit the characters allowed in for the attributes. - */ - regex?: string | null; - /** - * Max Length - * @description Set a maximum number of characters allowed for a given attribute. - */ - max_length?: number | null; - /** - * Min Length - * @description Set a minimum number of characters allowed for a given attribute. - */ - min_length?: number | null; - /** - * Label - * @description Human friendly representation of the name. Will be autogenerated if not provided - */ - label?: string | null; - /** - * Description - * @description Short description of the attribute. - */ - description?: string | null; - /** - * Read Only - * @description Set the attribute as Read-Only, users won't be able to change its value. Mainly relevant for internal object. - * @default false - */ - read_only: boolean; - /** - * Unique - * @description Indicate if the value of this attribute must be unique in the database for a given model. - * @default false - */ - unique: boolean; - /** - * Optional - * @description Indicate if this attribute is mandatory or optional. - * @default false - */ - optional: boolean; - /** @description Type of branch support for the attribute, if not defined it will be inherited from the node. */ - branch?: components["schemas"]["BranchSupportType"] | null; - /** - * Order Weight - * @description Number used to order the attribute in the frontend (table and view). Lowest value will be ordered first. - */ - order_weight?: number | null; - /** - * Default Value - * @description Default value of the attribute. - */ - default_value?: unknown | null; - /** - * Inherited - * @description Internal value to indicate if the attribute was inherited from a Generic node. - * @default false - */ - inherited: boolean; - /** - * @description Type of allowed override for the attribute. - * @default any - */ - allow_override: components["schemas"]["AllowOverrideType"]; - }; - /** AttributeSchema */ - "AttributeSchema-Output": { - /** - * Id - * @description The ID of the attribute - */ - id?: string | null; - /** - * @description Expected state of the attribute after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Attribute name, must be unique within a model and must be all lowercase. - */ - name: string; - /** - * Kind - * @description Defines the type of the attribute. - */ - kind: string; - /** - * Enum - * @description Define a list of valid values for the attribute. - */ - enum?: unknown[] | null; - /** - * Choices - * @description Define a list of valid choices for a dropdown attribute. - */ - choices?: components["schemas"]["DropdownChoice"][] | null; - /** - * Regex - * @description Regex uses to limit the characters allowed in for the attributes. - */ - regex?: string | null; - /** - * Max Length - * @description Set a maximum number of characters allowed for a given attribute. - */ - max_length?: number | null; - /** - * Min Length - * @description Set a minimum number of characters allowed for a given attribute. - */ - min_length?: number | null; - /** - * Label - * @description Human friendly representation of the name. Will be autogenerated if not provided - */ - label?: string | null; - /** - * Description - * @description Short description of the attribute. - */ - description?: string | null; - /** - * Read Only - * @description Set the attribute as Read-Only, users won't be able to change its value. Mainly relevant for internal object. - * @default false - */ - read_only: boolean; - /** - * Unique - * @description Indicate if the value of this attribute must be unique in the database for a given model. - * @default false - */ - unique: boolean; - /** - * Optional - * @description Indicate if this attribute is mandatory or optional. - * @default false - */ - optional: boolean; - /** @description Type of branch support for the attribute, if not defined it will be inherited from the node. */ - branch?: components["schemas"]["BranchSupportType"] | null; - /** - * Order Weight - * @description Number used to order the attribute in the frontend (table and view). Lowest value will be ordered first. - */ - order_weight?: number | null; - /** - * Default Value - * @description Default value of the attribute. - */ - default_value?: unknown | null; - /** - * Inherited - * @description Internal value to indicate if the attribute was inherited from a Generic node. - * @default false - */ - inherited: boolean; - /** - * @description Type of allowed override for the attribute. - * @default any - */ - allow_override: components["schemas"]["AllowOverrideType"]; - }; - /** Body_upload_file_api_storage_upload_file_post */ - Body_upload_file_api_storage_upload_file_post: { - /** - * File - * Format: binary - */ - file: string; - }; - /** BranchDiff */ - BranchDiff: { - /** Diffs */ - diffs?: components["schemas"]["BranchDiffEntry"][]; - }; - /** BranchDiffArtifact */ - BranchDiffArtifact: { - /** Branch */ - branch: string; - /** Id */ - id: string; - /** Display Label */ - display_label?: string | null; - action: components["schemas"]["DiffAction"]; - target?: components["schemas"]["ArtifactTarget"] | null; - item_new?: components["schemas"]["BranchDiffArtifactStorage"] | null; - item_previous?: components["schemas"]["BranchDiffArtifactStorage"] | null; - }; - /** BranchDiffArtifactStorage */ - BranchDiffArtifactStorage: { - /** Storage Id */ - storage_id: string; - /** Checksum */ - checksum: string; - }; - /** BranchDiffElement */ - BranchDiffElement: { - type: components["schemas"]["DiffElementType"]; - /** Name */ - name: string; - /** Path */ - path: string; - /** Change */ - change: - | components["schemas"]["BranchDiffElementAttribute"] - | components["schemas"]["BranchDiffElementRelationshipOne"] - | components["schemas"]["BranchDiffElementRelationshipMany"]; - }; - /** BranchDiffElementAttribute */ - BranchDiffElementAttribute: { - /** @default Attribute */ - type: components["schemas"]["DiffElementType"]; - /** Branches */ - branches?: string[]; - /** - * Id - * @default - */ - id: string; - summary?: components["schemas"]["DiffSummary"]; - /** @default unchanged */ - action: components["schemas"]["DiffAction"]; - value?: components["schemas"]["BranchDiffPropertyCollection"] | null; - /** Properties */ - properties?: { - [key: string]: components["schemas"]["BranchDiffPropertyCollection"]; - }; - }; - /** BranchDiffElementRelationshipMany */ - BranchDiffElementRelationshipMany: { - /** @default RelationshipMany */ - type: components["schemas"]["DiffElementType"]; - /** - * Identifier - * @default - */ - identifier: string; - /** Branches */ - branches?: string[]; - summary?: components["schemas"]["DiffSummary"]; - /** Peers */ - peers?: { - [key: string]: components["schemas"]["BranchDiffElementRelationshipManyPeer"]; - }; - }; - /** BranchDiffElementRelationshipManyPeer */ - BranchDiffElementRelationshipManyPeer: { - /** Branches */ - branches?: string[]; - peer: components["schemas"]["BranchDiffRelationshipPeerNode"]; - /** Path */ - path: string; - /** Properties */ - properties?: { - [key: string]: components["schemas"]["BranchDiffPropertyCollection"]; - }; - /** Changed At */ - changed_at?: string | null; - /** Action */ - action?: { - [key: string]: components["schemas"]["DiffAction"]; - }; - }; - /** BranchDiffElementRelationshipOne */ - BranchDiffElementRelationshipOne: { - /** @default RelationshipOne */ - type: components["schemas"]["DiffElementType"]; - /** - * Id - * @default - */ - id: string; - /** - * Identifier - * @default - */ - identifier: string; - /** Branches */ - branches?: string[]; - summary?: components["schemas"]["DiffSummary"]; - peer?: components["schemas"]["BranchDiffRelationshipOnePeerCollection"] | null; - /** Properties */ - properties?: { - [key: string]: components["schemas"]["BranchDiffPropertyCollection"]; - }; - /** Changed At */ - changed_at?: string | null; - /** Action */ - action?: { - [key: string]: components["schemas"]["DiffAction"]; - }; - }; - /** BranchDiffEntry */ - BranchDiffEntry: { - /** Kind */ - kind: string; - /** Id */ - id: string; - /** Path */ - path: string; - /** Elements */ - elements?: { - [key: string]: components["schemas"]["BranchDiffElement"]; - }; - summary?: components["schemas"]["DiffSummary"]; - /** Action */ - action?: { - [key: string]: components["schemas"]["DiffAction"]; - }; - /** Display Label */ - display_label?: { - [key: string]: string; - }; - }; - /** BranchDiffFile */ - BranchDiffFile: { - /** Branch */ - branch: string; - /** Location */ - location: string; - action: components["schemas"]["DiffAction"]; - }; - /** BranchDiffProperty */ - BranchDiffProperty: { - /** Branch */ - branch: string; - /** Type */ - type: string; - /** Changed At */ - changed_at?: string | null; - action: components["schemas"]["DiffAction"]; - value: components["schemas"]["BranchDiffPropertyValue"]; - }; - /** BranchDiffPropertyCollection */ - BranchDiffPropertyCollection: { - /** Path */ - path: string; - /** Changes */ - changes?: components["schemas"]["BranchDiffProperty"][]; - }; - /** BranchDiffPropertyValue */ - BranchDiffPropertyValue: { - /** New */ - new?: unknown; - /** Previous */ - previous?: unknown; - }; - /** BranchDiffRelationshipOnePeer */ - BranchDiffRelationshipOnePeer: { - /** Branch */ - branch: string; - new?: components["schemas"]["BranchDiffRelationshipPeerNode"] | null; - previous?: components["schemas"]["BranchDiffRelationshipPeerNode"] | null; - }; - /** BranchDiffRelationshipOnePeerCollection */ - BranchDiffRelationshipOnePeerCollection: { - /** Path */ - path: string; - /** Changes */ - changes?: components["schemas"]["BranchDiffRelationshipOnePeer"][]; - }; - /** BranchDiffRelationshipPeerNode */ - BranchDiffRelationshipPeerNode: { - /** Id */ - id: string; - /** Kind */ - kind: string; - /** Display Label */ - display_label?: string | null; - }; - /** BranchDiffRepository */ - BranchDiffRepository: { - /** Branch */ - branch: string; - /** Id */ - id: string; - /** Display Name */ - display_name?: string | null; - /** Commit From */ - commit_from: string; - /** Commit To */ - commit_to: string; - /** Files */ - files?: components["schemas"]["BranchDiffFile"][]; - }; - /** - * BranchSupportType - * @enum {string} - */ - BranchSupportType: "aware" | "agnostic" | "local"; - /** ConfigAPI */ - ConfigAPI: { - main: components["schemas"]["MainSettings"]; - logging: components["schemas"]["LoggingSettings"]; - analytics: components["schemas"]["AnalyticsSettings"]; - experimental_features: components["schemas"]["ExperimentalFeaturesSettings"]; - sso: components["schemas"]["SSOInfo"]; - }; - /** - * DiffAction - * @enum {string} - */ - DiffAction: "added" | "removed" | "updated" | "unchanged"; - /** - * DiffElementType - * @enum {string} - */ - DiffElementType: "Attribute" | "RelationshipOne" | "RelationshipMany"; - /** DiffSummary */ - DiffSummary: { - /** - * Added - * @default 0 - */ - added: number; - /** - * Removed - * @default 0 - */ - removed: number; - /** - * Updated - * @default 0 - */ - updated: number; - }; - /** DropdownChoice */ - DropdownChoice: { - /** Id */ - id?: string | null; - /** @default present */ - state: components["schemas"]["HashableModelState"]; - /** Name */ - name: string; - /** Description */ - description?: string | null; - /** Color */ - color?: string | null; - /** Label */ - label?: string | null; - }; - /** ExperimentalFeaturesSettings */ - ExperimentalFeaturesSettings: { - /** - * Pull Request - * @default false - */ - pull_request: boolean; - /** - * Graphql Enums - * @default false - */ - graphql_enums: boolean; - }; - /** - * GenericSchema - * @description A Generic can be either an Interface or a Union depending if there are some Attributes or Relationships defined. - */ - GenericSchema: { - /** - * Id - * @description The ID of the node - */ - id?: string | null; - /** - * @description Expected state of the node/generic after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Node name, must be unique within a namespace and must start with an uppercase letter. - */ - name: string; - /** - * Namespace - * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. - */ - namespace: string; - /** - * Description - * @description Short description of the model, will be visible in the frontend. - */ - description?: string | null; - /** - * Label - * @description Human friendly representation of the name/kind - */ - label?: string | null; - /** - * @description Type of branch support for the model. - * @default aware - */ - branch: components["schemas"]["BranchSupportType"]; - /** - * Default Filter - * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) - */ - default_filter?: string | null; - /** - * Human Friendly Id - * @description Human friendly and unique identifier for the object. - */ - human_friendly_id?: string[] | null; - /** - * Display Labels - * @description List of attributes to use to generate the display label - */ - display_labels?: string[] | null; - /** - * Include In Menu - * @description Defines if objects of this kind should be included in the menu. - */ - include_in_menu?: boolean | null; - /** - * Menu Placement - * @description Defines where in the menu this object should be placed. - */ - menu_placement?: string | null; - /** - * Icon - * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ - */ - icon?: string | null; - /** - * Order By - * @description List of attributes to use to order the results by default - */ - order_by?: string[] | null; - /** - * Uniqueness Constraints - * @description List of multi-element uniqueness constraints that can combine relationships and attributes - */ - uniqueness_constraints?: string[][] | null; - /** - * Documentation - * @description Link to a documentation associated with this object, can be internal or external. - */ - documentation?: string | null; - /** - * Attributes - * @description Node attributes - */ - attributes?: components["schemas"]["AttributeSchema-Input"][]; - /** - * Relationships - * @description Node Relationships - */ - relationships?: components["schemas"]["RelationshipSchema"][]; - /** - * Hierarchical - * @description Defines if the Generic support the hierarchical mode. - * @default false - */ - hierarchical: boolean; - /** - * Generate Profile - * @description Indicate if a profile schema should be generated for this schema - * @default true - */ - generate_profile: boolean; - /** - * Used By - * @description List of Nodes that are referencing this Generic - */ - used_by?: string[]; - }; - /** HTTPValidationError */ - HTTPValidationError: { - /** Detail */ - detail?: components["schemas"]["ValidationError"][]; - }; - /** HashableModelDiff */ - HashableModelDiff: { - /** Added */ - added?: { - [key: string]: components["schemas"]["HashableModelDiff"] | null; - }; - /** Changed */ - changed?: { - [key: string]: components["schemas"]["HashableModelDiff"] | null; - }; - /** Removed */ - removed?: { - [key: string]: components["schemas"]["HashableModelDiff"] | null; - }; - }; - /** - * HashableModelState - * @enum {string} - */ - HashableModelState: "present" | "absent"; - /** InfoAPI */ - InfoAPI: { - /** Deployment Id */ - deployment_id: string; - /** Version */ - version: string; - }; - /** JSONSchema */ - JSONSchema: { - /** - * Title - * @description Title of the schema - */ - title?: string | null; - /** - * Description - * @description Description of the schema - */ - description?: string | null; - /** - * Type - * @description Type of the schema element (e.g., 'object', 'array', 'string') - */ - type: string; - /** - * Properties - * @description Properties of the object if type is 'object' - */ - properties?: Record | null; - /** - * Items - * @description Items of the array if type is 'array' - */ - items?: Record | Record[] | null; - /** - * Required - * @description List of required properties if type is 'object' - */ - required?: string[] | null; - /** - * $Schema - * @description Schema version identifier - */ - $schema?: string | null; - /** - * Additionalproperties - * @description Specifies whether additional properties are allowed - */ - additionalProperties?: boolean | Record | null; - }; - /** LoggingSettings */ - LoggingSettings: { - /** @default { - * "enable": false - * } */ - remote: components["schemas"]["RemoteLoggingSettings"]; - }; - /** MainSettings */ - MainSettings: { - /** - * Docs Index Path - * @description Full path of saved json containing pre-indexed documentation - * @default /opt/infrahub/docs/build/search-index.json - */ - docs_index_path: string; - /** Internal Address */ - internal_address?: string | null; - /** - * Allow Anonymous Access - * @description Indicates if the system allows anonymous read access - * @default true - */ - allow_anonymous_access: boolean; - /** - * Anonymous Access Role - * @description Name of the role defining which permissions anonymous users have - * @default Anonymous User - */ - anonymous_access_role: string; - /** - * Telemetry Optout - * @description Disable anonymous usage reporting - * @default false - */ - telemetry_optout: boolean; - /** - * Telemetry Endpoint - * @default https://telemetry.opsmill.cloud/infrahub - */ - telemetry_endpoint: string; - /** - * Permission Backends - * @description List of modules to handle permissions, they will be run in the given order - * @default [ - * "infrahub.permissions.LocalPermissionBackend" - * ] - */ - permission_backends: string[]; - }; - /** Menu */ - Menu: { - /** Sections */ - sections?: { - [key: string]: components["schemas"]["MenuItemList"][]; - }; - }; - /** MenuItemList */ - MenuItemList: { - /** - * Identifier - * @description Unique identifier for this menu item - */ - identifier: string; - /** - * Label - * @description Title of the menu item - */ - label: string; - /** - * Path - * @description URL endpoint if applicable - * @default - */ - path: string; - /** - * Icon - * @description The icon to show for the current view - * @default - */ - icon: string; - /** - * Kind - * @description Kind of the model associated with this menuitem if applicable - * @default - */ - kind: string; - /** - * Order Weight - * @default 5000 - */ - order_weight: number; - /** @default object */ - section: components["schemas"]["MenuSection"]; - /** Permissions */ - permissions?: string[]; - /** - * Children - * @description Child objects - */ - children?: components["schemas"]["MenuItemList"][]; - }; - /** - * MenuSection - * @enum {string} - */ - MenuSection: "object" | "internal"; - /** NodeExtensionSchema */ - NodeExtensionSchema: { - /** Id */ - id?: string | null; - /** @default present */ - state: components["schemas"]["HashableModelState"]; - /** Kind */ - kind: string; - /** Attributes */ - attributes?: components["schemas"]["AttributeSchema-Input"][]; - /** Relationships */ - relationships?: components["schemas"]["RelationshipSchema"][]; - }; - /** NodeSchema */ - NodeSchema: { - /** - * Id - * @description The ID of the node - */ - id?: string | null; - /** - * @description Expected state of the node/generic after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Node name, must be unique within a namespace and must start with an uppercase letter. - */ - name: string; - /** - * Namespace - * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. - */ - namespace: string; - /** - * Description - * @description Short description of the model, will be visible in the frontend. - */ - description?: string | null; - /** - * Label - * @description Human friendly representation of the name/kind - */ - label?: string | null; - /** - * @description Type of branch support for the model. - * @default aware - */ - branch: components["schemas"]["BranchSupportType"]; - /** - * Default Filter - * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) - */ - default_filter?: string | null; - /** - * Human Friendly Id - * @description Human friendly and unique identifier for the object. - */ - human_friendly_id?: string[] | null; - /** - * Display Labels - * @description List of attributes to use to generate the display label - */ - display_labels?: string[] | null; - /** - * Include In Menu - * @description Defines if objects of this kind should be included in the menu. - */ - include_in_menu?: boolean | null; - /** - * Menu Placement - * @description Defines where in the menu this object should be placed. - */ - menu_placement?: string | null; - /** - * Icon - * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ - */ - icon?: string | null; - /** - * Order By - * @description List of attributes to use to order the results by default - */ - order_by?: string[] | null; - /** - * Uniqueness Constraints - * @description List of multi-element uniqueness constraints that can combine relationships and attributes - */ - uniqueness_constraints?: string[][] | null; - /** - * Documentation - * @description Link to a documentation associated with this object, can be internal or external. - */ - documentation?: string | null; - /** - * Attributes - * @description Node attributes - */ - attributes?: components["schemas"]["AttributeSchema-Input"][]; - /** - * Relationships - * @description Node Relationships - */ - relationships?: components["schemas"]["RelationshipSchema"][]; - /** - * Inherit From - * @description List of Generic Kind that this node is inheriting from - */ - inherit_from?: string[]; - /** - * Generate Profile - * @description Indicate if a profile schema should be generated for this schema - * @default true - */ - generate_profile: boolean; - /** - * Hierarchy - * @description Internal value to track the name of the Hierarchy, must match the name of a Generic supporting hierarchical mode - */ - hierarchy?: string | null; - /** - * Parent - * @description Expected Kind for the parent node in a Hierarchy, default to the main generic defined if not defined. - */ - parent?: string | null; - /** - * Children - * @description Expected Kind for the children nodes in a Hierarchy, default to the main generic defined if not defined. - */ - children?: string | null; - }; - /** PasswordCredential */ - PasswordCredential: { - /** - * Username - * @description Name of the user that is logging in. - */ - username: string; - /** - * Password - * @description The password of the user. - */ - password: string; - }; - /** QueryPayload */ - QueryPayload: { - /** Variables */ - variables?: { - [key: string]: string; - }; - }; - /** - * RelationshipCardinality - * @enum {string} - */ - RelationshipCardinality: "one" | "many"; - /** - * RelationshipDeleteBehavior - * @enum {string} - */ - RelationshipDeleteBehavior: "no-action" | "cascade"; - /** - * RelationshipDirection - * @enum {string} - */ - RelationshipDirection: "bidirectional" | "outbound" | "inbound"; - /** - * RelationshipKind - * @enum {string} - */ - RelationshipKind: - | "Generic" - | "Attribute" - | "Component" - | "Parent" - | "Group" - | "Hierarchy" - | "Profile"; - /** RelationshipSchema */ - RelationshipSchema: { - /** - * Id - * @description The ID of the relationship schema - */ - id?: string | null; - /** - * @description Expected state of the relationship after loading the schema - * @default present - */ - state: components["schemas"]["HashableModelState"]; - /** - * Name - * @description Relationship name, must be unique within a model and must be all lowercase. - */ - name: string; - /** - * Peer - * @description Type (kind) of objects supported on the other end of the relationship. - */ - peer: string; - /** - * @description Defines the type of the relationship. - * @default Generic - */ - kind: components["schemas"]["RelationshipKind"]; - /** - * Label - * @description Human friendly representation of the name. Will be autogenerated if not provided - */ - label?: string | null; - /** - * Description - * @description Short description of the relationship. - */ - description?: string | null; - /** - * Identifier - * @description Unique identifier of the relationship within a model, identifiers must match to traverse a relationship on both direction. - */ - identifier?: string | null; - /** - * @description Defines how many objects are expected on the other side of the relationship. - * @default many - */ - cardinality: components["schemas"]["RelationshipCardinality"]; - /** - * Min Count - * @description Defines the minimum objects allowed on the other side of the relationship. - * @default 0 - */ - min_count: number; - /** - * Max Count - * @description Defines the maximum objects allowed on the other side of the relationship. - * @default 0 - */ - max_count: number; - /** - * Order Weight - * @description Number used to order the relationship in the frontend (table and view). Lowest value will be ordered first. - */ - order_weight?: number | null; - /** - * Optional - * @description Indicate if this relationship is mandatory or optional. - * @default true - */ - optional: boolean; - /** @description Type of branch support for the relatioinship, if not defined it will be determine based both peers. */ - branch?: components["schemas"]["BranchSupportType"] | null; - /** - * Inherited - * @description Internal value to indicate if the relationship was inherited from a Generic node. - * @default false - */ - inherited: boolean; - /** - * @description Defines the direction of the relationship, Unidirectional relationship are required when the same model is on both side. - * @default bidirectional - */ - direction: components["schemas"]["RelationshipDirection"]; - /** - * Hierarchical - * @description Internal attribute to track the type of hierarchy this relationship is part of, must match a valid Generic Kind - */ - hierarchical?: string | null; - /** @description Default is no-action. If cascade, related node(s) are deleted when this node is deleted. */ - on_delete?: components["schemas"]["RelationshipDeleteBehavior"] | null; - /** - * @description Type of allowed override for the relationship. - * @default any - */ - allow_override: components["schemas"]["AllowOverrideType"]; - /** - * Read Only - * @description Set the relationship as read-only, users won't be able to change its value. - * @default false - */ - read_only: boolean; - }; - /** RemoteLoggingSettings */ - RemoteLoggingSettings: { - /** - * Enable - * @default false - */ - enable: boolean; - /** Frontend Dsn */ - frontend_dsn?: string | null; - /** Api Server Dsn */ - api_server_dsn?: string | null; - /** Git Agent Dsn */ - git_agent_dsn?: string | null; - }; - /** SSOInfo */ - SSOInfo: { - /** Providers */ - providers?: components["schemas"]["SSOProviderInfo"][]; - /** Enabled */ - readonly enabled: boolean; - }; - /** - * SSOProtocol - * @enum {string} - */ - SSOProtocol: "oauth2" | "oidc"; - /** SSOProviderInfo */ - SSOProviderInfo: { - /** Name */ - name: string; - /** Display Label */ - display_label: string; - /** Icon */ - icon: string; - protocol: components["schemas"]["SSOProtocol"]; - /** Authorize Path */ - readonly authorize_path: string; - /** Token Path */ - readonly token_path: string; - }; - /** SchemaBranchHash */ - SchemaBranchHash: { - /** Main */ - main: string; - /** Nodes */ - nodes?: { - [key: string]: string; - }; - /** Generics */ - generics?: { - [key: string]: string; - }; - }; - /** SchemaDiff */ - SchemaDiff: { - /** Added */ - added?: { - [key: string]: components["schemas"]["HashableModelDiff"]; - }; - /** Changed */ - changed?: { - [key: string]: components["schemas"]["HashableModelDiff"]; - }; - /** Removed */ - removed?: { - [key: string]: components["schemas"]["HashableModelDiff"]; - }; - }; - /** SchemaExtension */ - SchemaExtension: { - /** Id */ - id?: string | null; - /** @default present */ - state: components["schemas"]["HashableModelState"]; - /** Nodes */ - nodes?: components["schemas"]["NodeExtensionSchema"][]; - }; - /** SchemaLoadAPI */ - SchemaLoadAPI: { - /** Version */ - version: string; - /** Generics */ - generics?: components["schemas"]["GenericSchema"][]; - /** Nodes */ - nodes?: components["schemas"]["NodeSchema"][]; - /** @default { - * "state": "present", - * "nodes": [] - * } */ - extensions: components["schemas"]["SchemaExtension"]; - }; - /** SchemaNamespace */ - SchemaNamespace: { - /** Name */ - name: string; - /** User Editable */ - user_editable: boolean; - }; - /** SchemaReadAPI */ - SchemaReadAPI: { - /** - * Main - * @description Main hash for the entire schema - */ - main: string; - /** Nodes */ - nodes?: components["schemas"]["APINodeSchema"][]; - /** Generics */ - generics?: components["schemas"]["APIGenericSchema"][]; - /** Profiles */ - profiles?: components["schemas"]["APIProfileSchema"][]; - /** Namespaces */ - namespaces?: components["schemas"]["SchemaNamespace"][]; - }; - /** SchemaUpdate */ - SchemaUpdate: { - /** - * Hash - * @description The new hash for the entire schema - */ - hash: string; - /** - * Previous Hash - * @description The previous hash for the entire schema - */ - previous_hash: string; - /** @description The modifications to the schema */ - diff: components["schemas"]["SchemaDiff"]; - /** - * Schema Updated - * @description Indicates if the loading of the schema changed the existing schema - */ - readonly schema_updated: boolean; - }; - /** SchemasLoadAPI */ - SchemasLoadAPI: { - /** Schemas */ - schemas: components["schemas"]["SchemaLoadAPI"][]; - }; - /** UploadContentPayload */ - UploadContentPayload: { - /** Content */ - content: string; - }; - /** UploadResponse */ - UploadResponse: { - /** Identifier */ - identifier: string; - /** Checksum */ - checksum: string; - }; - /** UserToken */ - UserToken: { - /** - * Access Token - * @description JWT access_token - */ - access_token: string; - /** - * Refresh Token - * @description JWT refresh_token - */ - refresh_token: string; - }; - /** UserTokenWithUrl */ - UserTokenWithUrl: { - /** - * Access Token - * @description JWT access_token - */ - access_token: string; - /** - * Refresh Token - * @description JWT refresh_token - */ - refresh_token: string; - /** - * Final Url - * @description The final url after logged in - */ - final_url: string; - }; - /** ValidationError */ - ValidationError: { - /** Location */ - loc: (string | number)[]; - /** Message */ - msg: string; - /** Error Type */ - type: string; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} -export type $defs = Record; -export interface operations { - get_artifact_api_artifact__artifact_id__get: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - /** @description Time to use for the query, in absolute or relative format */ - at?: string | null; - }; - header?: never; - path: { - artifact_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - generate_artifact_api_artifact_generate__artifact_definition_id__post: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - /** @description Time to use for the query, in absolute or relative format */ - at?: string | null; - }; - header?: never; - path: { - artifact_definition_id: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ArtifactGeneratePayload"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": null; + schemas: { + /** APIGenericSchema */ + APIGenericSchema: { + /** + * Id + * @description The ID of the node + */ + id?: string | null; + /** + * @description Expected state of the node/generic after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Node name, must be unique within a namespace and must start with an uppercase letter. + */ + name: string; + /** + * Namespace + * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. + */ + namespace: string; + /** + * Description + * @description Short description of the model, will be visible in the frontend. + */ + description?: string | null; + /** + * Label + * @description Human friendly representation of the name/kind + */ + label?: string | null; + /** + * @description Type of branch support for the model. + * @default aware + */ + branch: components["schemas"]["BranchSupportType"]; + /** + * Default Filter + * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) + */ + default_filter?: string | null; + /** + * Human Friendly Id + * @description Human friendly and unique identifier for the object. + */ + human_friendly_id?: string[] | null; + /** + * Display Labels + * @description List of attributes to use to generate the display label + */ + display_labels?: string[] | null; + /** + * Include In Menu + * @description Defines if objects of this kind should be included in the menu. + */ + include_in_menu?: boolean | null; + /** + * Menu Placement + * @description Defines where in the menu this object should be placed. + */ + menu_placement?: string | null; + /** + * Icon + * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ + */ + icon?: string | null; + /** + * Order By + * @description List of attributes to use to order the results by default + */ + order_by?: string[] | null; + /** + * Uniqueness Constraints + * @description List of multi-element uniqueness constraints that can combine relationships and attributes + */ + uniqueness_constraints?: string[][] | null; + /** + * Documentation + * @description Link to a documentation associated with this object, can be internal or external. + */ + documentation?: string | null; + /** + * Attributes + * @description Node attributes + */ + attributes?: components["schemas"]["AttributeSchema-Output"][]; + /** + * Relationships + * @description Node Relationships + */ + relationships?: components["schemas"]["RelationshipSchema"][]; + /** + * Hierarchical + * @description Defines if the Generic support the hierarchical mode. + * @default false + */ + hierarchical: boolean; + /** + * Generate Profile + * @description Indicate if a profile schema should be generated for this schema + * @default true + */ + generate_profile: boolean; + /** + * Used By + * @description List of Nodes that are referencing this Generic + */ + used_by?: string[]; + /** Kind */ + kind?: string | null; + /** Hash */ + hash: string; + }; + /** APINodeSchema */ + APINodeSchema: { + /** + * Id + * @description The ID of the node + */ + id?: string | null; + /** + * @description Expected state of the node/generic after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Node name, must be unique within a namespace and must start with an uppercase letter. + */ + name: string; + /** + * Namespace + * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. + */ + namespace: string; + /** + * Description + * @description Short description of the model, will be visible in the frontend. + */ + description?: string | null; + /** + * Label + * @description Human friendly representation of the name/kind + */ + label?: string | null; + /** + * @description Type of branch support for the model. + * @default aware + */ + branch: components["schemas"]["BranchSupportType"]; + /** + * Default Filter + * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) + */ + default_filter?: string | null; + /** + * Human Friendly Id + * @description Human friendly and unique identifier for the object. + */ + human_friendly_id?: string[] | null; + /** + * Display Labels + * @description List of attributes to use to generate the display label + */ + display_labels?: string[] | null; + /** + * Include In Menu + * @description Defines if objects of this kind should be included in the menu. + */ + include_in_menu?: boolean | null; + /** + * Menu Placement + * @description Defines where in the menu this object should be placed. + */ + menu_placement?: string | null; + /** + * Icon + * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ + */ + icon?: string | null; + /** + * Order By + * @description List of attributes to use to order the results by default + */ + order_by?: string[] | null; + /** + * Uniqueness Constraints + * @description List of multi-element uniqueness constraints that can combine relationships and attributes + */ + uniqueness_constraints?: string[][] | null; + /** + * Documentation + * @description Link to a documentation associated with this object, can be internal or external. + */ + documentation?: string | null; + /** + * Attributes + * @description Node attributes + */ + attributes?: components["schemas"]["AttributeSchema-Output"][]; + /** + * Relationships + * @description Node Relationships + */ + relationships?: components["schemas"]["RelationshipSchema"][]; + /** + * Inherit From + * @description List of Generic Kind that this node is inheriting from + */ + inherit_from?: string[]; + /** + * Generate Profile + * @description Indicate if a profile schema should be generated for this schema + * @default true + */ + generate_profile: boolean; + /** + * Hierarchy + * @description Internal value to track the name of the Hierarchy, must match the name of a Generic supporting hierarchical mode + */ + hierarchy?: string | null; + /** + * Parent + * @description Expected Kind for the parent node in a Hierarchy, default to the main generic defined if not defined. + */ + parent?: string | null; + /** + * Children + * @description Expected Kind for the children nodes in a Hierarchy, default to the main generic defined if not defined. + */ + children?: string | null; + /** Kind */ + kind?: string | null; + /** Hash */ + hash: string; + }; + /** APIProfileSchema */ + APIProfileSchema: { + /** + * Id + * @description The ID of the node + */ + id?: string | null; + /** + * @description Expected state of the node/generic after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Node name, must be unique within a namespace and must start with an uppercase letter. + */ + name: string; + /** + * Namespace + * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. + */ + namespace: string; + /** + * Description + * @description Short description of the model, will be visible in the frontend. + */ + description?: string | null; + /** + * Label + * @description Human friendly representation of the name/kind + */ + label?: string | null; + /** + * @description Type of branch support for the model. + * @default aware + */ + branch: components["schemas"]["BranchSupportType"]; + /** + * Default Filter + * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) + */ + default_filter?: string | null; + /** + * Human Friendly Id + * @description Human friendly and unique identifier for the object. + */ + human_friendly_id?: string[] | null; + /** + * Display Labels + * @description List of attributes to use to generate the display label + */ + display_labels?: string[] | null; + /** + * Include In Menu + * @description Defines if objects of this kind should be included in the menu. + */ + include_in_menu?: boolean | null; + /** + * Menu Placement + * @description Defines where in the menu this object should be placed. + */ + menu_placement?: string | null; + /** + * Icon + * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ + */ + icon?: string | null; + /** + * Order By + * @description List of attributes to use to order the results by default + */ + order_by?: string[] | null; + /** + * Uniqueness Constraints + * @description List of multi-element uniqueness constraints that can combine relationships and attributes + */ + uniqueness_constraints?: string[][] | null; + /** + * Documentation + * @description Link to a documentation associated with this object, can be internal or external. + */ + documentation?: string | null; + /** + * Attributes + * @description Node attributes + */ + attributes?: components["schemas"]["AttributeSchema-Output"][]; + /** + * Relationships + * @description Node Relationships + */ + relationships?: components["schemas"]["RelationshipSchema"][]; + /** + * Inherit From + * @description List of Generic Kind that this profile is inheriting from + */ + inherit_from?: string[]; + /** Kind */ + kind?: string | null; + /** Hash */ + hash: string; + }; + /** AccessTokenResponse */ + AccessTokenResponse: { + /** + * Access Token + * @description JWT access_token + */ + access_token: string; + }; + /** + * AllowOverrideType + * @enum {string} + */ + AllowOverrideType: "none" | "any"; + /** AnalyticsSettings */ + AnalyticsSettings: { + /** + * Enable + * @default true + */ + enable: boolean; + /** Address */ + address?: string | null; + /** Api Key */ + api_key?: string | null; + }; + /** ArtifactGeneratePayload */ + ArtifactGeneratePayload: { + /** Nodes */ + nodes?: string[]; + }; + /** ArtifactTarget */ + ArtifactTarget: { + /** Id */ + id: string; + /** Kind */ + kind: string; + /** Display Label */ + display_label?: string | null; + }; + /** AttributeSchema */ + "AttributeSchema-Input": { + /** + * Id + * @description The ID of the attribute + */ + id?: string | null; + /** + * @description Expected state of the attribute after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Attribute name, must be unique within a model and must be all lowercase. + */ + name: string; + /** + * Kind + * @description Defines the type of the attribute. + */ + kind: string; + /** + * Enum + * @description Define a list of valid values for the attribute. + */ + enum?: unknown[] | null; + /** + * Choices + * @description Define a list of valid choices for a dropdown attribute. + */ + choices?: components["schemas"]["DropdownChoice"][] | null; + /** + * Regex + * @description Regex uses to limit the characters allowed in for the attributes. + */ + regex?: string | null; + /** + * Max Length + * @description Set a maximum number of characters allowed for a given attribute. + */ + max_length?: number | null; + /** + * Min Length + * @description Set a minimum number of characters allowed for a given attribute. + */ + min_length?: number | null; + /** + * Label + * @description Human friendly representation of the name. Will be autogenerated if not provided + */ + label?: string | null; + /** + * Description + * @description Short description of the attribute. + */ + description?: string | null; + /** + * Read Only + * @description Set the attribute as Read-Only, users won't be able to change its value. Mainly relevant for internal object. + * @default false + */ + read_only: boolean; + /** + * Unique + * @description Indicate if the value of this attribute must be unique in the database for a given model. + * @default false + */ + unique: boolean; + /** + * Optional + * @description Indicate if this attribute is mandatory or optional. + * @default false + */ + optional: boolean; + /** @description Type of branch support for the attribute, if not defined it will be inherited from the node. */ + branch?: components["schemas"]["BranchSupportType"] | null; + /** + * Order Weight + * @description Number used to order the attribute in the frontend (table and view). Lowest value will be ordered first. + */ + order_weight?: number | null; + /** + * Default Value + * @description Default value of the attribute. + */ + default_value?: unknown | null; + /** + * Inherited + * @description Internal value to indicate if the attribute was inherited from a Generic node. + * @default false + */ + inherited: boolean; + /** + * @description Type of allowed override for the attribute. + * @default any + */ + allow_override: components["schemas"]["AllowOverrideType"]; + }; + /** AttributeSchema */ + "AttributeSchema-Output": { + /** + * Id + * @description The ID of the attribute + */ + id?: string | null; + /** + * @description Expected state of the attribute after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Attribute name, must be unique within a model and must be all lowercase. + */ + name: string; + /** + * Kind + * @description Defines the type of the attribute. + */ + kind: string; + /** + * Enum + * @description Define a list of valid values for the attribute. + */ + enum?: unknown[] | null; + /** + * Choices + * @description Define a list of valid choices for a dropdown attribute. + */ + choices?: components["schemas"]["DropdownChoice"][] | null; + /** + * Regex + * @description Regex uses to limit the characters allowed in for the attributes. + */ + regex?: string | null; + /** + * Max Length + * @description Set a maximum number of characters allowed for a given attribute. + */ + max_length?: number | null; + /** + * Min Length + * @description Set a minimum number of characters allowed for a given attribute. + */ + min_length?: number | null; + /** + * Label + * @description Human friendly representation of the name. Will be autogenerated if not provided + */ + label?: string | null; + /** + * Description + * @description Short description of the attribute. + */ + description?: string | null; + /** + * Read Only + * @description Set the attribute as Read-Only, users won't be able to change its value. Mainly relevant for internal object. + * @default false + */ + read_only: boolean; + /** + * Unique + * @description Indicate if the value of this attribute must be unique in the database for a given model. + * @default false + */ + unique: boolean; + /** + * Optional + * @description Indicate if this attribute is mandatory or optional. + * @default false + */ + optional: boolean; + /** @description Type of branch support for the attribute, if not defined it will be inherited from the node. */ + branch?: components["schemas"]["BranchSupportType"] | null; + /** + * Order Weight + * @description Number used to order the attribute in the frontend (table and view). Lowest value will be ordered first. + */ + order_weight?: number | null; + /** + * Default Value + * @description Default value of the attribute. + */ + default_value?: unknown | null; + /** + * Inherited + * @description Internal value to indicate if the attribute was inherited from a Generic node. + * @default false + */ + inherited: boolean; + /** + * @description Type of allowed override for the attribute. + * @default any + */ + allow_override: components["schemas"]["AllowOverrideType"]; + }; + /** Body_upload_file_api_storage_upload_file_post */ + Body_upload_file_api_storage_upload_file_post: { + /** + * File + * Format: binary + */ + file: string; + }; + /** BranchDiff */ + BranchDiff: { + /** Diffs */ + diffs?: components["schemas"]["BranchDiffEntry"][]; + }; + /** BranchDiffArtifact */ + BranchDiffArtifact: { + /** Branch */ + branch: string; + /** Id */ + id: string; + /** Display Label */ + display_label?: string | null; + action: components["schemas"]["DiffAction"]; + target?: components["schemas"]["ArtifactTarget"] | null; + item_new?: components["schemas"]["BranchDiffArtifactStorage"] | null; + item_previous?: components["schemas"]["BranchDiffArtifactStorage"] | null; + }; + /** BranchDiffArtifactStorage */ + BranchDiffArtifactStorage: { + /** Storage Id */ + storage_id: string; + /** Checksum */ + checksum: string; + }; + /** BranchDiffElement */ + BranchDiffElement: { + type: components["schemas"]["DiffElementType"]; + /** Name */ + name: string; + /** Path */ + path: string; + /** Change */ + change: components["schemas"]["BranchDiffElementAttribute"] | components["schemas"]["BranchDiffElementRelationshipOne"] | components["schemas"]["BranchDiffElementRelationshipMany"]; + }; + /** BranchDiffElementAttribute */ + BranchDiffElementAttribute: { + /** @default Attribute */ + type: components["schemas"]["DiffElementType"]; + /** Branches */ + branches?: string[]; + /** + * Id + * @default + */ + id: string; + summary?: components["schemas"]["DiffSummary"]; + /** @default unchanged */ + action: components["schemas"]["DiffAction"]; + value?: components["schemas"]["BranchDiffPropertyCollection"] | null; + /** Properties */ + properties?: { + [key: string]: components["schemas"]["BranchDiffPropertyCollection"]; + }; }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; + /** BranchDiffElementRelationshipMany */ + BranchDiffElementRelationshipMany: { + /** @default RelationshipMany */ + type: components["schemas"]["DiffElementType"]; + /** + * Identifier + * @default + */ + identifier: string; + /** Branches */ + branches?: string[]; + summary?: components["schemas"]["DiffSummary"]; + /** Peers */ + peers?: { + [key: string]: components["schemas"]["BranchDiffElementRelationshipManyPeer"]; + }; }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; + /** BranchDiffElementRelationshipManyPeer */ + BranchDiffElementRelationshipManyPeer: { + /** Branches */ + branches?: string[]; + peer: components["schemas"]["BranchDiffRelationshipPeerNode"]; + /** Path */ + path: string; + /** Properties */ + properties?: { + [key: string]: components["schemas"]["BranchDiffPropertyCollection"]; + }; + /** Changed At */ + changed_at?: string | null; + /** Action */ + action?: { + [key: string]: components["schemas"]["DiffAction"]; + }; }; - }; - }; - }; - login_user_api_auth_login_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PasswordCredential"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + /** BranchDiffElementRelationshipOne */ + BranchDiffElementRelationshipOne: { + /** @default RelationshipOne */ + type: components["schemas"]["DiffElementType"]; + /** + * Id + * @default + */ + id: string; + /** + * Identifier + * @default + */ + identifier: string; + /** Branches */ + branches?: string[]; + summary?: components["schemas"]["DiffSummary"]; + peer?: components["schemas"]["BranchDiffRelationshipOnePeerCollection"] | null; + /** Properties */ + properties?: { + [key: string]: components["schemas"]["BranchDiffPropertyCollection"]; + }; + /** Changed At */ + changed_at?: string | null; + /** Action */ + action?: { + [key: string]: components["schemas"]["DiffAction"]; + }; }; - content: { - "application/json": components["schemas"]["UserToken"]; + /** BranchDiffEntry */ + BranchDiffEntry: { + /** Kind */ + kind: string; + /** Id */ + id: string; + /** Path */ + path: string; + /** Elements */ + elements?: { + [key: string]: components["schemas"]["BranchDiffElement"]; + }; + summary?: components["schemas"]["DiffSummary"]; + /** Action */ + action?: { + [key: string]: components["schemas"]["DiffAction"]; + }; + /** Display Label */ + display_label?: { + [key: string]: string; + }; }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; + /** BranchDiffFile */ + BranchDiffFile: { + /** Branch */ + branch: string; + /** Location */ + location: string; + action: components["schemas"]["DiffAction"]; + }; + /** BranchDiffProperty */ + BranchDiffProperty: { + /** Branch */ + branch: string; + /** Type */ + type: string; + /** Changed At */ + changed_at?: string | null; + action: components["schemas"]["DiffAction"]; + value: components["schemas"]["BranchDiffPropertyValue"]; + }; + /** BranchDiffPropertyCollection */ + BranchDiffPropertyCollection: { + /** Path */ + path: string; + /** Changes */ + changes?: components["schemas"]["BranchDiffProperty"][]; + }; + /** BranchDiffPropertyValue */ + BranchDiffPropertyValue: { + /** New */ + new?: unknown; + /** Previous */ + previous?: unknown; + }; + /** BranchDiffRelationshipOnePeer */ + BranchDiffRelationshipOnePeer: { + /** Branch */ + branch: string; + new?: components["schemas"]["BranchDiffRelationshipPeerNode"] | null; + previous?: components["schemas"]["BranchDiffRelationshipPeerNode"] | null; + }; + /** BranchDiffRelationshipOnePeerCollection */ + BranchDiffRelationshipOnePeerCollection: { + /** Path */ + path: string; + /** Changes */ + changes?: components["schemas"]["BranchDiffRelationshipOnePeer"][]; + }; + /** BranchDiffRelationshipPeerNode */ + BranchDiffRelationshipPeerNode: { + /** Id */ + id: string; + /** Kind */ + kind: string; + /** Display Label */ + display_label?: string | null; + }; + /** BranchDiffRepository */ + BranchDiffRepository: { + /** Branch */ + branch: string; + /** Id */ + id: string; + /** Display Name */ + display_name?: string | null; + /** Commit From */ + commit_from: string; + /** Commit To */ + commit_to: string; + /** Files */ + files?: components["schemas"]["BranchDiffFile"][]; + }; + /** + * BranchSupportType + * @enum {string} + */ + BranchSupportType: "aware" | "agnostic" | "local"; + /** ConfigAPI */ + ConfigAPI: { + main: components["schemas"]["MainSettings"]; + logging: components["schemas"]["LoggingSettings"]; + analytics: components["schemas"]["AnalyticsSettings"]; + experimental_features: components["schemas"]["ExperimentalFeaturesSettings"]; + sso: components["schemas"]["SSOInfo"]; + }; + /** + * DiffAction + * @enum {string} + */ + DiffAction: "added" | "removed" | "updated" | "unchanged"; + /** + * DiffElementType + * @enum {string} + */ + DiffElementType: "Attribute" | "RelationshipOne" | "RelationshipMany"; + /** DiffSummary */ + DiffSummary: { + /** + * Added + * @default 0 + */ + added: number; + /** + * Removed + * @default 0 + */ + removed: number; + /** + * Updated + * @default 0 + */ + updated: number; + }; + /** DropdownChoice */ + DropdownChoice: { + /** Id */ + id?: string | null; + /** @default present */ + state: components["schemas"]["HashableModelState"]; + /** Name */ + name: string; + /** Description */ + description?: string | null; + /** Color */ + color?: string | null; + /** Label */ + label?: string | null; + }; + /** ExperimentalFeaturesSettings */ + ExperimentalFeaturesSettings: { + /** + * Pull Request + * @default false + */ + pull_request: boolean; + /** + * Graphql Enums + * @default false + */ + graphql_enums: boolean; + }; + /** + * GenericSchema + * @description A Generic can be either an Interface or a Union depending if there are some Attributes or Relationships defined. + */ + GenericSchema: { + /** + * Id + * @description The ID of the node + */ + id?: string | null; + /** + * @description Expected state of the node/generic after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Node name, must be unique within a namespace and must start with an uppercase letter. + */ + name: string; + /** + * Namespace + * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. + */ + namespace: string; + /** + * Description + * @description Short description of the model, will be visible in the frontend. + */ + description?: string | null; + /** + * Label + * @description Human friendly representation of the name/kind + */ + label?: string | null; + /** + * @description Type of branch support for the model. + * @default aware + */ + branch: components["schemas"]["BranchSupportType"]; + /** + * Default Filter + * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) + */ + default_filter?: string | null; + /** + * Human Friendly Id + * @description Human friendly and unique identifier for the object. + */ + human_friendly_id?: string[] | null; + /** + * Display Labels + * @description List of attributes to use to generate the display label + */ + display_labels?: string[] | null; + /** + * Include In Menu + * @description Defines if objects of this kind should be included in the menu. + */ + include_in_menu?: boolean | null; + /** + * Menu Placement + * @description Defines where in the menu this object should be placed. + */ + menu_placement?: string | null; + /** + * Icon + * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ + */ + icon?: string | null; + /** + * Order By + * @description List of attributes to use to order the results by default + */ + order_by?: string[] | null; + /** + * Uniqueness Constraints + * @description List of multi-element uniqueness constraints that can combine relationships and attributes + */ + uniqueness_constraints?: string[][] | null; + /** + * Documentation + * @description Link to a documentation associated with this object, can be internal or external. + */ + documentation?: string | null; + /** + * Attributes + * @description Node attributes + */ + attributes?: components["schemas"]["AttributeSchema-Input"][]; + /** + * Relationships + * @description Node Relationships + */ + relationships?: components["schemas"]["RelationshipSchema"][]; + /** + * Hierarchical + * @description Defines if the Generic support the hierarchical mode. + * @default false + */ + hierarchical: boolean; + /** + * Generate Profile + * @description Indicate if a profile schema should be generated for this schema + * @default true + */ + generate_profile: boolean; + /** + * Used By + * @description List of Nodes that are referencing this Generic + */ + used_by?: string[]; + }; + /** HTTPValidationError */ + HTTPValidationError: { + /** Detail */ + detail?: components["schemas"]["ValidationError"][]; + }; + /** HashableModelDiff */ + HashableModelDiff: { + /** Added */ + added?: { + [key: string]: components["schemas"]["HashableModelDiff"] | null; + }; + /** Changed */ + changed?: { + [key: string]: components["schemas"]["HashableModelDiff"] | null; + }; + /** Removed */ + removed?: { + [key: string]: components["schemas"]["HashableModelDiff"] | null; + }; }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; + /** + * HashableModelState + * @enum {string} + */ + HashableModelState: "present" | "absent"; + /** InfoAPI */ + InfoAPI: { + /** Deployment Id */ + deployment_id: string; + /** Version */ + version: string; + }; + /** JSONSchema */ + JSONSchema: { + /** + * Title + * @description Title of the schema + */ + title?: string | null; + /** + * Description + * @description Description of the schema + */ + description?: string | null; + /** + * Type + * @description Type of the schema element (e.g., 'object', 'array', 'string') + */ + type: string; + /** + * Properties + * @description Properties of the object if type is 'object' + */ + properties?: Record | null; + /** + * Items + * @description Items of the array if type is 'array' + */ + items?: Record | Record[] | null; + /** + * Required + * @description List of required properties if type is 'object' + */ + required?: string[] | null; + /** + * $Schema + * @description Schema version identifier + */ + $schema?: string | null; + /** + * Additionalproperties + * @description Specifies whether additional properties are allowed + */ + additionalProperties?: boolean | Record | null; + }; + /** LoggingSettings */ + LoggingSettings: { + /** @default { + * "enable": false + * } */ + remote: components["schemas"]["RemoteLoggingSettings"]; + }; + /** MainSettings */ + MainSettings: { + /** + * Docs Index Path + * @description Full path of saved json containing pre-indexed documentation + * @default /opt/infrahub/docs/build/search-index.json + */ + docs_index_path: string; + /** Internal Address */ + internal_address?: string | null; + /** + * Allow Anonymous Access + * @description Indicates if the system allows anonymous read access + * @default true + */ + allow_anonymous_access: boolean; + /** + * Anonymous Access Role + * @description Name of the role defining which permissions anonymous users have + * @default Anonymous User + */ + anonymous_access_role: string; + /** + * Telemetry Optout + * @description Disable anonymous usage reporting + * @default false + */ + telemetry_optout: boolean; + /** + * Telemetry Endpoint + * @default https://telemetry.opsmill.cloud/infrahub + */ + telemetry_endpoint: string; + /** + * Permission Backends + * @description List of modules to handle permissions, they will be run in the given order + * @default [ + * "infrahub.permissions.LocalPermissionBackend" + * ] + */ + permission_backends: string[]; + }; + /** Menu */ + Menu: { + /** Sections */ + sections?: { + [key: string]: components["schemas"]["MenuItemList"][]; + }; }; - }; - }; - }; - refresh_jwt_token_api_auth_refresh_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + /** MenuItemList */ + MenuItemList: { + /** + * Identifier + * @description Unique identifier for this menu item + */ + identifier: string; + /** + * Label + * @description Title of the menu item + */ + label: string; + /** + * Path + * @description URL endpoint if applicable + * @default + */ + path: string; + /** + * Icon + * @description The icon to show for the current view + * @default + */ + icon: string; + /** + * Kind + * @description Kind of the model associated with this menuitem if applicable + * @default + */ + kind: string; + /** + * Order Weight + * @default 5000 + */ + order_weight: number; + /** @default object */ + section: components["schemas"]["MenuSection"]; + /** Permissions */ + permissions?: string[]; + /** + * Children + * @description Child objects + */ + children?: components["schemas"]["MenuItemList"][]; + }; + /** + * MenuSection + * @enum {string} + */ + MenuSection: "object" | "internal"; + /** NodeExtensionSchema */ + NodeExtensionSchema: { + /** Id */ + id?: string | null; + /** @default present */ + state: components["schemas"]["HashableModelState"]; + /** Kind */ + kind: string; + /** Attributes */ + attributes?: components["schemas"]["AttributeSchema-Input"][]; + /** Relationships */ + relationships?: components["schemas"]["RelationshipSchema"][]; + }; + /** NodeSchema */ + NodeSchema: { + /** + * Id + * @description The ID of the node + */ + id?: string | null; + /** + * @description Expected state of the node/generic after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Node name, must be unique within a namespace and must start with an uppercase letter. + */ + name: string; + /** + * Namespace + * @description Node Namespace, Namespaces are used to organize models into logical groups and to prevent name collisions. + */ + namespace: string; + /** + * Description + * @description Short description of the model, will be visible in the frontend. + */ + description?: string | null; + /** + * Label + * @description Human friendly representation of the name/kind + */ + label?: string | null; + /** + * @description Type of branch support for the model. + * @default aware + */ + branch: components["schemas"]["BranchSupportType"]; + /** + * Default Filter + * @description Default filter used to search for a node in addition to its ID. (deprecated: please use human_friendly_id instead) + */ + default_filter?: string | null; + /** + * Human Friendly Id + * @description Human friendly and unique identifier for the object. + */ + human_friendly_id?: string[] | null; + /** + * Display Labels + * @description List of attributes to use to generate the display label + */ + display_labels?: string[] | null; + /** + * Include In Menu + * @description Defines if objects of this kind should be included in the menu. + */ + include_in_menu?: boolean | null; + /** + * Menu Placement + * @description Defines where in the menu this object should be placed. + */ + menu_placement?: string | null; + /** + * Icon + * @description Defines the icon to use in the menu. Must be a valid value from the MDI library https://icon-sets.iconify.design/mdi/ + */ + icon?: string | null; + /** + * Order By + * @description List of attributes to use to order the results by default + */ + order_by?: string[] | null; + /** + * Uniqueness Constraints + * @description List of multi-element uniqueness constraints that can combine relationships and attributes + */ + uniqueness_constraints?: string[][] | null; + /** + * Documentation + * @description Link to a documentation associated with this object, can be internal or external. + */ + documentation?: string | null; + /** + * Attributes + * @description Node attributes + */ + attributes?: components["schemas"]["AttributeSchema-Input"][]; + /** + * Relationships + * @description Node Relationships + */ + relationships?: components["schemas"]["RelationshipSchema"][]; + /** + * Inherit From + * @description List of Generic Kind that this node is inheriting from + */ + inherit_from?: string[]; + /** + * Generate Profile + * @description Indicate if a profile schema should be generated for this schema + * @default true + */ + generate_profile: boolean; + /** + * Hierarchy + * @description Internal value to track the name of the Hierarchy, must match the name of a Generic supporting hierarchical mode + */ + hierarchy?: string | null; + /** + * Parent + * @description Expected Kind for the parent node in a Hierarchy, default to the main generic defined if not defined. + */ + parent?: string | null; + /** + * Children + * @description Expected Kind for the children nodes in a Hierarchy, default to the main generic defined if not defined. + */ + children?: string | null; + }; + /** PasswordCredential */ + PasswordCredential: { + /** + * Username + * @description Name of the user that is logging in. + */ + username: string; + /** + * Password + * @description The password of the user. + */ + password: string; + }; + /** QueryPayload */ + QueryPayload: { + /** Variables */ + variables?: { + [key: string]: string; + }; }; - content: { - "application/json": components["schemas"]["AccessTokenResponse"]; + /** + * RelationshipCardinality + * @enum {string} + */ + RelationshipCardinality: "one" | "many"; + /** + * RelationshipDeleteBehavior + * @enum {string} + */ + RelationshipDeleteBehavior: "no-action" | "cascade"; + /** + * RelationshipDirection + * @enum {string} + */ + RelationshipDirection: "bidirectional" | "outbound" | "inbound"; + /** + * RelationshipKind + * @enum {string} + */ + RelationshipKind: "Generic" | "Attribute" | "Component" | "Parent" | "Group" | "Hierarchy" | "Profile"; + /** RelationshipSchema */ + RelationshipSchema: { + /** + * Id + * @description The ID of the relationship schema + */ + id?: string | null; + /** + * @description Expected state of the relationship after loading the schema + * @default present + */ + state: components["schemas"]["HashableModelState"]; + /** + * Name + * @description Relationship name, must be unique within a model and must be all lowercase. + */ + name: string; + /** + * Peer + * @description Type (kind) of objects supported on the other end of the relationship. + */ + peer: string; + /** + * @description Defines the type of the relationship. + * @default Generic + */ + kind: components["schemas"]["RelationshipKind"]; + /** + * Label + * @description Human friendly representation of the name. Will be autogenerated if not provided + */ + label?: string | null; + /** + * Description + * @description Short description of the relationship. + */ + description?: string | null; + /** + * Identifier + * @description Unique identifier of the relationship within a model, identifiers must match to traverse a relationship on both direction. + */ + identifier?: string | null; + /** + * @description Defines how many objects are expected on the other side of the relationship. + * @default many + */ + cardinality: components["schemas"]["RelationshipCardinality"]; + /** + * Min Count + * @description Defines the minimum objects allowed on the other side of the relationship. + * @default 0 + */ + min_count: number; + /** + * Max Count + * @description Defines the maximum objects allowed on the other side of the relationship. + * @default 0 + */ + max_count: number; + /** + * Order Weight + * @description Number used to order the relationship in the frontend (table and view). Lowest value will be ordered first. + */ + order_weight?: number | null; + /** + * Optional + * @description Indicate if this relationship is mandatory or optional. + * @default true + */ + optional: boolean; + /** @description Type of branch support for the relatioinship, if not defined it will be determine based both peers. */ + branch?: components["schemas"]["BranchSupportType"] | null; + /** + * Inherited + * @description Internal value to indicate if the relationship was inherited from a Generic node. + * @default false + */ + inherited: boolean; + /** + * @description Defines the direction of the relationship, Unidirectional relationship are required when the same model is on both side. + * @default bidirectional + */ + direction: components["schemas"]["RelationshipDirection"]; + /** + * Hierarchical + * @description Internal attribute to track the type of hierarchy this relationship is part of, must match a valid Generic Kind + */ + hierarchical?: string | null; + /** @description Default is no-action. If cascade, related node(s) are deleted when this node is deleted. */ + on_delete?: components["schemas"]["RelationshipDeleteBehavior"] | null; + /** + * @description Type of allowed override for the relationship. + * @default any + */ + allow_override: components["schemas"]["AllowOverrideType"]; + /** + * Read Only + * @description Set the relationship as read-only, users won't be able to change its value. + * @default false + */ + read_only: boolean; + }; + /** RemoteLoggingSettings */ + RemoteLoggingSettings: { + /** + * Enable + * @default false + */ + enable: boolean; + /** Frontend Dsn */ + frontend_dsn?: string | null; + /** Api Server Dsn */ + api_server_dsn?: string | null; + /** Git Agent Dsn */ + git_agent_dsn?: string | null; + }; + /** SSOInfo */ + SSOInfo: { + /** Providers */ + providers?: components["schemas"]["SSOProviderInfo"][]; + /** Enabled */ + readonly enabled: boolean; + }; + /** + * SSOProtocol + * @enum {string} + */ + SSOProtocol: "oauth2" | "oidc"; + /** SSOProviderInfo */ + SSOProviderInfo: { + /** Name */ + name: string; + /** Display Label */ + display_label: string; + /** Icon */ + icon: string; + protocol: components["schemas"]["SSOProtocol"]; + /** Authorize Path */ + readonly authorize_path: string; + /** Token Path */ + readonly token_path: string; + }; + /** SchemaBranchHash */ + SchemaBranchHash: { + /** Main */ + main: string; + /** Nodes */ + nodes?: { + [key: string]: string; + }; + /** Generics */ + generics?: { + [key: string]: string; + }; }; - }; - }; - }; - logout_api_auth_logout_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + /** SchemaDiff */ + SchemaDiff: { + /** Added */ + added?: { + [key: string]: components["schemas"]["HashableModelDiff"]; + }; + /** Changed */ + changed?: { + [key: string]: components["schemas"]["HashableModelDiff"]; + }; + /** Removed */ + removed?: { + [key: string]: components["schemas"]["HashableModelDiff"]; + }; }; - content: { - "application/json": unknown; + /** SchemaExtension */ + SchemaExtension: { + /** Id */ + id?: string | null; + /** @default present */ + state: components["schemas"]["HashableModelState"]; + /** Nodes */ + nodes?: components["schemas"]["NodeExtensionSchema"][]; + }; + /** SchemaLoadAPI */ + SchemaLoadAPI: { + /** Version */ + version: string; + /** Generics */ + generics?: components["schemas"]["GenericSchema"][]; + /** Nodes */ + nodes?: components["schemas"]["NodeSchema"][]; + /** @default { + * "state": "present", + * "nodes": [] + * } */ + extensions: components["schemas"]["SchemaExtension"]; + }; + /** SchemaNamespace */ + SchemaNamespace: { + /** Name */ + name: string; + /** User Editable */ + user_editable: boolean; + }; + /** SchemaReadAPI */ + SchemaReadAPI: { + /** + * Main + * @description Main hash for the entire schema + */ + main: string; + /** Nodes */ + nodes?: components["schemas"]["APINodeSchema"][]; + /** Generics */ + generics?: components["schemas"]["APIGenericSchema"][]; + /** Profiles */ + profiles?: components["schemas"]["APIProfileSchema"][]; + /** Namespaces */ + namespaces?: components["schemas"]["SchemaNamespace"][]; + }; + /** SchemaUpdate */ + SchemaUpdate: { + /** + * Hash + * @description The new hash for the entire schema + */ + hash: string; + /** + * Previous Hash + * @description The previous hash for the entire schema + */ + previous_hash: string; + /** @description The modifications to the schema */ + diff: components["schemas"]["SchemaDiff"]; + /** + * Schema Updated + * @description Indicates if the loading of the schema changed the existing schema + */ + readonly schema_updated: boolean; + }; + /** SchemasLoadAPI */ + SchemasLoadAPI: { + /** Schemas */ + schemas: components["schemas"]["SchemaLoadAPI"][]; + }; + /** UploadContentPayload */ + UploadContentPayload: { + /** Content */ + content: string; + }; + /** UploadResponse */ + UploadResponse: { + /** Identifier */ + identifier: string; + /** Checksum */ + checksum: string; + }; + /** UserToken */ + UserToken: { + /** + * Access Token + * @description JWT access_token + */ + access_token: string; + /** + * Refresh Token + * @description JWT refresh_token + */ + refresh_token: string; + }; + /** UserTokenWithUrl */ + UserTokenWithUrl: { + /** + * Access Token + * @description JWT access_token + */ + access_token: string; + /** + * Refresh Token + * @description JWT refresh_token + */ + refresh_token: string; + /** + * Final Url + * @description The final url after logged in + */ + final_url: string; + }; + /** ValidationError */ + ValidationError: { + /** Location */ + loc: (string | number)[]; + /** Message */ + msg: string; + /** Error Type */ + type: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + get_artifact_api_artifact__artifact_id__get: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + /** @description Time to use for the query, in absolute or relative format */ + at?: string | null; + }; + header?: never; + path: { + artifact_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; - }; - }; - get_diff_data_api_diff_data_get: { - parameters: { - query?: { - time_from?: string | null; - time_to?: string | null; - branch_only?: boolean; - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BranchDiff"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_diff_schema_api_diff_schema_get: { - parameters: { - query?: { - time_from?: string | null; - time_to?: string | null; - branch_only?: boolean; - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["BranchDiff"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_diff_files_api_diff_files_get: { - parameters: { - query?: { - time_from?: string | null; - time_to?: string | null; - branch_only?: boolean; - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: { - [key: string]: components["schemas"]["BranchDiffRepository"]; - }; - }; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_diff_artifacts_api_diff_artifacts_get: { - parameters: { - query?: { - time_from?: string | null; - time_to?: string | null; - branch_only?: boolean; - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - [key: string]: components["schemas"]["BranchDiffArtifact"]; - }; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_file_api_file__repository_id___file_path__get: { - parameters: { - query?: { - commit?: string | null; - /** @description Name of the branch to use for the query */ - branch?: string | null; - /** @description Time to use for the query, in absolute or relative format */ - at?: string | null; - }; - header?: never; - path: { - repository_id: string; - file_path: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; }; - }; - get_config_api_config_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + generate_artifact_api_artifact_generate__artifact_definition_id__post: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + /** @description Time to use for the query, in absolute or relative format */ + at?: string | null; + }; + header?: never; + path: { + artifact_definition_id: string; + }; + cookie?: never; }; - content: { - "application/json": components["schemas"]["ConfigAPI"]; + requestBody?: { + content: { + "application/json": components["schemas"]["ArtifactGeneratePayload"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": null; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; - }; - }; - get_info_api_info_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + login_user_api_auth_login_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PasswordCredential"]; + }; }; - content: { - "application/json": components["schemas"]["InfoAPI"]; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UserToken"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; }; - }; - get_menu_api_menu_get: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; + refresh_jwt_token_api_auth_refresh_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AccessTokenResponse"]; + }; + }; + }; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Menu"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + logout_api_auth_logout_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; }; - }; - authorize_api_oauth2__provider_name__authorize_get: { - parameters: { - query?: { - final_url?: string | null; - }; - header?: never; - path: { - provider_name: string; - }; - cookie?: never; + get_diff_data_api_diff_data_get: { + parameters: { + query?: { + time_from?: string | null; + time_to?: string | null; + branch_only?: boolean; + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BranchDiff"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + get_diff_schema_api_diff_schema_get: { + parameters: { + query?: { + time_from?: string | null; + time_to?: string | null; + branch_only?: boolean; + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["BranchDiff"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - token_api_oauth2__provider_name__token_get: { - parameters: { - query: { - state: string; - code: string; - }; - header?: never; - path: { - provider_name: string; - }; - cookie?: never; + get_diff_files_api_diff_files_get: { + parameters: { + query?: { + time_from?: string | null; + time_to?: string | null; + branch_only?: boolean; + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: { + [key: string]: components["schemas"]["BranchDiffRepository"]; + }; + }; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UserTokenWithUrl"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + get_diff_artifacts_api_diff_artifacts_get: { + parameters: { + query?: { + time_from?: string | null; + time_to?: string | null; + branch_only?: boolean; + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + [key: string]: components["schemas"]["BranchDiffArtifact"]; + }; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - authorize_api_oidc__provider_name__authorize_get: { - parameters: { - query?: { - final_url?: string | null; - }; - header?: never; - path: { - provider_name: string; - }; - cookie?: never; + get_file_api_file__repository_id___file_path__get: { + parameters: { + query?: { + commit?: string | null; + /** @description Name of the branch to use for the query */ + branch?: string | null; + /** @description Time to use for the query, in absolute or relative format */ + at?: string | null; + }; + header?: never; + path: { + repository_id: string; + file_path: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + get_config_api_config_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ConfigAPI"]; + }; + }; + }; }; - }; - token_api_oidc__provider_name__token_get: { - parameters: { - query: { - state: string; - code: string; - }; - header?: never; - path: { - provider_name: string; - }; - cookie?: never; + get_info_api_info_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["InfoAPI"]; + }; + }; + }; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UserTokenWithUrl"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + get_menu_api_menu_get: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Menu"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - graphql_query_get_api_query__query_id__get: { - parameters: { - query?: { - /** @description List of subscribers to attach to the CoreGraphQLQueryGroup */ - subscribers?: string[]; - /** @description When True create or update a CoreGraphQLQueryGroup with all nodes related to this query. */ - update_group?: boolean; - /** @description Name of the branch to use for the query */ - branch?: string | null; - /** @description Time to use for the query, in absolute or relative format */ - at?: string | null; - }; - header?: never; - path: { - /** @description ID or Name of the GraphQL query to execute */ - query_id: string; - }; - cookie?: never; + authorize_api_oauth2__provider_name__authorize_get: { + parameters: { + query?: { + final_url?: string | null; + }; + header?: never; + path: { + provider_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": Record; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + token_api_oauth2__provider_name__token_get: { + parameters: { + query: { + state: string; + code: string; + }; + header?: never; + path: { + provider_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UserTokenWithUrl"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - graphql_query_post_api_query__query_id__post: { - parameters: { - query?: { - /** @description List of subscribers to attach to the CoreGraphQLQueryGroup */ - subscribers?: string[]; - /** @description When True create or update a CoreGraphQLQueryGroup with all nodes related to this query. */ - update_group?: boolean; - /** @description Name of the branch to use for the query */ - branch?: string | null; - /** @description Time to use for the query, in absolute or relative format */ - at?: string | null; - }; - header?: never; - path: { - /** @description ID or Name of the GraphQL query to execute */ - query_id: string; - }; - cookie?: never; + authorize_api_oidc__provider_name__authorize_get: { + parameters: { + query?: { + final_url?: string | null; + }; + header?: never; + path: { + provider_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - requestBody?: { - content: { - "application/json": components["schemas"]["QueryPayload"]; - }; + token_api_oidc__provider_name__token_get: { + parameters: { + query: { + state: string; + code: string; + }; + header?: never; + path: { + provider_name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UserTokenWithUrl"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + graphql_query_get_api_query__query_id__get: { + parameters: { + query?: { + /** @description List of subscribers to attach to the CoreGraphQLQueryGroup */ + subscribers?: string[]; + /** @description When True create or update a CoreGraphQLQueryGroup with all nodes related to this query. */ + update_group?: boolean; + /** @description Name of the branch to use for the query */ + branch?: string | null; + /** @description Time to use for the query, in absolute or relative format */ + at?: string | null; + }; + header?: never; + path: { + /** @description ID or Name of the GraphQL query to execute */ + query_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - content: { - "application/json": Record; + }; + graphql_query_post_api_query__query_id__post: { + parameters: { + query?: { + /** @description List of subscribers to attach to the CoreGraphQLQueryGroup */ + subscribers?: string[]; + /** @description When True create or update a CoreGraphQLQueryGroup with all nodes related to this query. */ + update_group?: boolean; + /** @description Name of the branch to use for the query */ + branch?: string | null; + /** @description Time to use for the query, in absolute or relative format */ + at?: string | null; + }; + header?: never; + path: { + /** @description ID or Name of the GraphQL query to execute */ + query_id: string; + }; + cookie?: never; }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; + requestBody?: { + content: { + "application/json": components["schemas"]["QueryPayload"]; + }; }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; - }; - }; - get_schema_api_schema_get: { - parameters: { - query?: { - namespaces?: string[] | null; - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SchemaReadAPI"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_schema_summary_api_schema_summary_get: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SchemaBranchHash"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; }; - }; - get_schema_by_kind_api_schema__schema_kind__get: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path: { - schema_kind: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": - | components["schemas"]["APIProfileSchema"] - | components["schemas"]["APINodeSchema"] - | components["schemas"]["APIGenericSchema"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_json_schema_by_kind_api_schema_json_schema__schema_kind__get: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path: { - schema_kind: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["JSONSchema"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + get_schema_api_schema_get: { + parameters: { + query?: { + namespaces?: string[] | null; + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SchemaReadAPI"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - load_schema_api_schema_load_post: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; + get_schema_summary_api_schema_summary_get: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SchemaBranchHash"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - requestBody: { - content: { - "application/json": components["schemas"]["SchemasLoadAPI"]; - }; + get_schema_by_kind_api_schema__schema_kind__get: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path: { + schema_kind: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["APIProfileSchema"] | components["schemas"]["APINodeSchema"] | components["schemas"]["APIGenericSchema"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + get_json_schema_by_kind_api_schema_json_schema__schema_kind__get: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path: { + schema_kind: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["JSONSchema"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - content: { - "application/json": components["schemas"]["SchemaUpdate"]; + }; + load_schema_api_schema_load_post: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; + requestBody: { + content: { + "application/json": components["schemas"]["SchemasLoadAPI"]; + }; }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SchemaUpdate"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; - }; - }; - check_schema_api_schema_check_post: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - }; - header?: never; - path?: never; - cookie?: never; }; - requestBody: { - content: { - "application/json": components["schemas"]["SchemasLoadAPI"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; + check_schema_api_schema_check_post: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + }; + header?: never; + path?: never; + cookie?: never; }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; + requestBody: { + content: { + "application/json": components["schemas"]["SchemasLoadAPI"]; + }; }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; - }; - }; - get_file_api_storage_object__identifier__get: { - parameters: { - query?: never; - header?: never; - path: { - identifier: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - upload_content_api_storage_upload_content_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; }; - requestBody: { - content: { - "application/json": components["schemas"]["UploadContentPayload"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + get_file_api_storage_object__identifier__get: { + parameters: { + query?: never; + header?: never; + path: { + identifier: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - content: { - "application/json": components["schemas"]["UploadResponse"]; + }; + upload_content_api_storage_upload_content_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; + requestBody: { + content: { + "application/json": components["schemas"]["UploadContentPayload"]; + }; }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UploadResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; - }; - }; - upload_file_api_storage_upload_file_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; }; - requestBody: { - content: { - "multipart/form-data": components["schemas"]["Body_upload_file_api_storage_upload_file_post"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UploadResponse"]; + upload_file_api_storage_upload_file_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; + requestBody: { + content: { + "multipart/form-data": components["schemas"]["Body_upload_file_api_storage_upload_file_post"]; + }; }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UploadResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; }; - }; }; - }; - transform_python_api_transform_python__transform_id__get: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - /** @description Time to use for the query, in absolute or relative format */ - at?: string | null; - }; - header?: never; - path: { - transform_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - transform_jinja2_api_transform_jinja2__transform_id__get: { - parameters: { - query?: { - /** @description Name of the branch to use for the query */ - branch?: string | null; - /** @description Time to use for the query, in absolute or relative format */ - at?: string | null; - }; - header?: never; - path: { - /** @description ID or Name of the Jinja2 Transform to render */ - transform_id: string; - }; - cookie?: never; + transform_python_api_transform_python__transform_id__get: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + /** @description Time to use for the query, in absolute or relative format */ + at?: string | null; + }; + header?: never; + path: { + transform_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "text/plain": string; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + transform_jinja2_api_transform_jinja2__transform_id__get: { + parameters: { + query?: { + /** @description Name of the branch to use for the query */ + branch?: string | null; + /** @description Time to use for the query, in absolute or relative format */ + at?: string | null; + }; + header?: never; + path: { + /** @description ID or Name of the Jinja2 Transform to render */ + transform_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/plain": string; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; } diff --git a/frontend/app/src/screens/layout/menu-navigation/get-menu.ts b/frontend/app/src/screens/layout/menu-navigation/get-menu.ts new file mode 100644 index 0000000000..02e8e3ff92 --- /dev/null +++ b/frontend/app/src/screens/layout/menu-navigation/get-menu.ts @@ -0,0 +1,32 @@ +import { apiClient } from "@/api/client"; +import { DEFAULT_BRANCH_NAME } from "@/config/constants"; +import { MenuData } from "@/screens/layout/menu-navigation/types"; +import { store } from "@/state"; +import { currentBranchAtom } from "@/state/atoms/branches.atom"; +import { queryOptions } from "@tanstack/react-query"; + +type GetMenu = ({ branchName }: { branchName: string }) => Promise; + +const getMenu: GetMenu = async ({ branchName }) => { + const { data, error } = await apiClient.GET("/api/menu", { + params: { + query: { + branch: branchName, + }, + }, + }); + + if (error) throw error; + + return data as MenuData; +}; + +export function menuQueryOptions() { + const currentBranch = store.get(currentBranchAtom); + + return queryOptions({ + queryKey: ["menu", currentBranch?.name], + queryFn: () => getMenu({ branchName: currentBranch?.name ?? DEFAULT_BRANCH_NAME }), + enabled: !!currentBranch, + }); +} diff --git a/frontend/app/src/screens/layout/menu-navigation/menu-navigation.tsx b/frontend/app/src/screens/layout/menu-navigation/menu-navigation.tsx index e37a4530a5..dd73d4d7b1 100644 --- a/frontend/app/src/screens/layout/menu-navigation/menu-navigation.tsx +++ b/frontend/app/src/screens/layout/menu-navigation/menu-navigation.tsx @@ -1,46 +1,22 @@ -import { ALERT_TYPES, Alert } from "@/components/ui/alert"; import { Divider } from "@/components/ui/divider"; import { ScrollArea } from "@/components/ui/scroll-area"; -import { CONFIG } from "@/config/config"; -import { useAuth } from "@/hooks/useAuth"; +import { Spinner } from "@/components/ui/spinner"; +import ErrorScreen from "@/screens/errors/error-screen"; import { MenuSectionInternal } from "@/screens/layout/menu-navigation/components/menu-section-internal"; import { MenuSectionObject } from "@/screens/layout/menu-navigation/components/menu-section-object"; -import { currentBranchAtom } from "@/state/atoms/branches.atom"; -import { menuAtom } from "@/state/atoms/schema.atom"; -import { fetchUrl } from "@/utils/fetch"; -import { useAtom, useAtomValue } from "jotai"; -import { useEffect, useState } from "react"; -import { toast } from "react-toastify"; +import { menuQueryOptions } from "@/screens/layout/menu-navigation/get-menu"; +import { useQuery } from "@tanstack/react-query"; export interface MenuNavigationProps { isCollapsed?: boolean; } export default function MenuNavigation({ isCollapsed }: MenuNavigationProps) { - const { accessToken } = useAuth(); - const currentBranch = useAtomValue(currentBranchAtom); - const [menu, setMenu] = useAtom(menuAtom); - const [isLoading, setIsLoading] = useState(false); + const { data: menu, isPending, error } = useQuery(menuQueryOptions()); - useEffect(() => { - if (!currentBranch) return; + if (isPending) return ; + if (error) return ; - const headers = accessToken && { - authorization: `Bearer ${accessToken}`, - }; - - try { - setIsLoading(true); - fetchUrl(CONFIG.MENU_URL(currentBranch?.name), { headers }).then((menu) => setMenu(menu)); - } catch (error) { - console.error("error: ", error); - toast(); - } finally { - setIsLoading(false); - } - }, [currentBranch, accessToken]); - - if (isLoading) return
Loading...
; if (!menu?.sections) return
; return ( diff --git a/frontend/app/src/state/atoms/schema.atom.ts b/frontend/app/src/state/atoms/schema.atom.ts index 0f5aabc5b3..642dae67b9 100644 --- a/frontend/app/src/state/atoms/schema.atom.ts +++ b/frontend/app/src/state/atoms/schema.atom.ts @@ -1,5 +1,4 @@ import { components } from "@/infraops"; -import { MenuData, MenuItem } from "@/screens/layout/menu-navigation/types"; import { atom } from "jotai"; export type iNodeSchema = components["schemas"]["APINodeSchema"]; @@ -20,25 +19,3 @@ export type iNamespace = { export const namespacesState = atom([]); export const currentSchemaHashAtom = atom(null); - -export const menuAtom = atom(); - -export const menuFlatAtom = atom((get) => { - const menuData = get(menuAtom); - if (!menuData) return []; - - const menuItems: MenuItem[] = []; - - const flattenMenuItems = (menuItem: MenuItem) => { - if (menuItem.path !== "") menuItems.push(menuItem); - - if (menuItem.children && menuItem.children.length > 0) { - menuItem.children.forEach(flattenMenuItems); - } - }; - - menuData.sections.object.forEach(flattenMenuItems); - menuData.sections.internal.forEach(flattenMenuItems); - - return menuItems; -}); diff --git a/frontend/app/tsconfig.json b/frontend/app/tsconfig.json index fc9b09f9a5..cf3ba9b291 100644 --- a/frontend/app/tsconfig.json +++ b/frontend/app/tsconfig.json @@ -13,6 +13,7 @@ "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, "module": "ESNext", "moduleResolution": "node", "resolveJsonModule": true,