@cdmbase/wiki-browser 12.0.18-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/LICENSE +21 -0
  2. package/lib/components/Logo.d.ts +4 -0
  3. package/lib/components/Logo.d.ts.map +1 -0
  4. package/lib/components/Logo.js +16 -0
  5. package/lib/components/Logo.js.map +1 -0
  6. package/lib/components/help/SidebarSearch.d.ts +8 -0
  7. package/lib/components/help/SidebarSearch.d.ts.map +1 -0
  8. package/lib/components/help/SidebarSearch.js +111 -0
  9. package/lib/components/help/SidebarSearch.js.map +1 -0
  10. package/lib/components/help/index.d.ts +2 -0
  11. package/lib/components/help/index.d.ts.map +1 -0
  12. package/lib/components/landing/FeatureCard.d.ts +13 -0
  13. package/lib/components/landing/FeatureCard.d.ts.map +1 -0
  14. package/lib/components/landing/FeatureCard.js +85 -0
  15. package/lib/components/landing/FeatureCard.js.map +1 -0
  16. package/lib/components/landing/QuickLinkCard.d.ts +8 -0
  17. package/lib/components/landing/QuickLinkCard.d.ts.map +1 -0
  18. package/lib/components/landing/QuickLinkCard.js +26 -0
  19. package/lib/components/landing/QuickLinkCard.js.map +1 -0
  20. package/lib/components/landing/SearchInput.d.ts +10 -0
  21. package/lib/components/landing/SearchInput.d.ts.map +1 -0
  22. package/lib/components/landing/SearchInput.js +223 -0
  23. package/lib/components/landing/SearchInput.js.map +1 -0
  24. package/lib/components/landing/index.d.ts +4 -0
  25. package/lib/components/landing/index.d.ts.map +1 -0
  26. package/lib/components/welcome.d.ts +3 -0
  27. package/lib/components/welcome.d.ts.map +1 -0
  28. package/lib/compute.d.ts +4 -0
  29. package/lib/compute.d.ts.map +1 -0
  30. package/lib/compute.js +96 -0
  31. package/lib/compute.js.map +1 -0
  32. package/lib/config/env-config.d.ts +4 -0
  33. package/lib/config/env-config.d.ts.map +1 -0
  34. package/lib/config/env-config.js +7 -0
  35. package/lib/config/env-config.js.map +1 -0
  36. package/lib/docs.config.d.ts +48 -0
  37. package/lib/docs.config.d.ts.map +1 -0
  38. package/lib/index.d.ts +4 -0
  39. package/lib/index.d.ts.map +1 -0
  40. package/lib/index.js +2 -0
  41. package/lib/index.js.map +1 -0
  42. package/lib/loaders/search.d.ts +1 -0
  43. package/lib/loaders/search.d.ts.map +1 -0
  44. package/lib/module.d.ts +4 -0
  45. package/lib/module.d.ts.map +1 -0
  46. package/lib/module.js +11 -0
  47. package/lib/module.js.map +1 -0
  48. package/lib/pages/ArticlePage/ArticlePage.d.ts +4 -0
  49. package/lib/pages/ArticlePage/ArticlePage.d.ts.map +1 -0
  50. package/lib/pages/ArticlePage/ArticlePage.js +222 -0
  51. package/lib/pages/ArticlePage/ArticlePage.js.map +1 -0
  52. package/lib/pages/ArticlePage/index.d.ts +3 -0
  53. package/lib/pages/ArticlePage/index.d.ts.map +1 -0
  54. package/lib/pages/ArticlePage/index.js +3 -0
  55. package/lib/pages/ArticlePage/index.js.map +1 -0
  56. package/lib/pages/CategoryCollection/CategoryCollection.d.ts +4 -0
  57. package/lib/pages/CategoryCollection/CategoryCollection.d.ts.map +1 -0
  58. package/lib/pages/CategoryCollection/CategoryCollection.js +103 -0
  59. package/lib/pages/CategoryCollection/CategoryCollection.js.map +1 -0
  60. package/lib/pages/CategoryCollection/index.d.ts +3 -0
  61. package/lib/pages/CategoryCollection/index.d.ts.map +1 -0
  62. package/lib/pages/CategoryCollection/index.js +3 -0
  63. package/lib/pages/CategoryCollection/index.js.map +1 -0
  64. package/lib/pages/Help/HelpIndex.d.ts +4 -0
  65. package/lib/pages/Help/HelpIndex.d.ts.map +1 -0
  66. package/lib/pages/Help/HelpIndex.js +44 -0
  67. package/lib/pages/Help/HelpIndex.js.map +1 -0
  68. package/lib/pages/Help/index.d.ts +4 -0
  69. package/lib/pages/Help/index.d.ts.map +1 -0
  70. package/lib/pages/Help/index.js +226 -0
  71. package/lib/pages/Help/index.js.map +1 -0
  72. package/lib/pages/Landing/index.d.ts +3 -0
  73. package/lib/pages/Landing/index.d.ts.map +1 -0
  74. package/lib/pages/Landing/index.js +281 -0
  75. package/lib/pages/Landing/index.js.map +1 -0
  76. package/lib/routes.json +2533 -0
  77. package/lib/seo.d.ts +22 -0
  78. package/lib/seo.d.ts.map +1 -0
  79. package/lib/slot-fill/FooterFill.d.ts +3 -0
  80. package/lib/slot-fill/FooterFill.d.ts.map +1 -0
  81. package/lib/slot-fill/FooterFill.js +18 -0
  82. package/lib/slot-fill/FooterFill.js.map +1 -0
  83. package/lib/slot-fill/LogoFill.d.ts +5 -0
  84. package/lib/slot-fill/LogoFill.d.ts.map +1 -0
  85. package/lib/slot-fill/LogoFill.js +74 -0
  86. package/lib/slot-fill/LogoFill.js.map +1 -0
  87. package/lib/slot-fill/consts.d.ts +5 -0
  88. package/lib/slot-fill/consts.d.ts.map +1 -0
  89. package/lib/slot-fill/consts.js +1 -0
  90. package/lib/slot-fill/consts.js.map +1 -0
  91. package/lib/slot-fill/index.d.ts +4 -0
  92. package/lib/slot-fill/index.d.ts.map +1 -0
  93. package/lib/templates/assets/images/add-link-frontend.png +0 -0
  94. package/lib/templates/assets/images/add-package-backend.png +0 -0
  95. package/lib/templates/assets/images/add-to-backend-module.png +0 -0
  96. package/lib/templates/assets/images/add-upload-client-frontend.png +0 -0
  97. package/lib/templates/assets/images/additional-parameters.png +0 -0
  98. package/lib/templates/assets/images/aeh-implementation.png +0 -0
  99. package/lib/templates/assets/images/aeh-usage.png +0 -0
  100. package/lib/templates/assets/images/apollo-client/recommendation_cache_mgmt.png +0 -0
  101. package/lib/templates/assets/images/app-deploy-new-version/jenkins1.PNG +0 -0
  102. package/lib/templates/assets/images/app-deploy-new-version/jenkins2.PNG +0 -0
  103. package/lib/templates/assets/images/auth-wrapper-code.png +0 -0
  104. package/lib/templates/assets/images/cdebase.png +0 -0
  105. package/lib/templates/assets/images/cdm-locales-directory.png +0 -0
  106. package/lib/templates/assets/images/client-settings.png +0 -0
  107. package/lib/templates/assets/images/codegen_file_update.png +0 -0
  108. package/lib/templates/assets/images/configuration.png +0 -0
  109. package/lib/templates/assets/images/copy-plugin.png +0 -0
  110. package/lib/templates/assets/images/docusaurus.png +0 -0
  111. package/lib/templates/assets/images/error-link.png +0 -0
  112. package/lib/templates/assets/images/error-sample.png +0 -0
  113. package/lib/templates/assets/images/extension copy.png +0 -0
  114. package/lib/templates/assets/images/extension.png +0 -0
  115. package/lib/templates/assets/images/graphql/graphql-folder-backend.png +0 -0
  116. package/lib/templates/assets/images/graphql/graphql-folder-with-gql.png +0 -0
  117. package/lib/templates/assets/images/i18n-config.png +0 -0
  118. package/lib/templates/assets/images/image.png +0 -0
  119. package/lib/templates/assets/images/logo.svg +10 -0
  120. package/lib/templates/assets/images/logo1.svg +1 -0
  121. package/lib/templates/assets/images/modify-upload-false-server.png +0 -0
  122. package/lib/templates/assets/images/navigation-auth-enabled.png +0 -0
  123. package/lib/templates/assets/images/org-dashboard-navigation.png +0 -0
  124. package/lib/templates/assets/images/org-navigation.png +0 -0
  125. package/lib/templates/assets/images/preferences_graphql_type.png +0 -0
  126. package/lib/templates/assets/images/provider.png +0 -0
  127. package/lib/templates/assets/images/route-config.png +0 -0
  128. package/lib/templates/assets/images/service-accounts.png +0 -0
  129. package/lib/templates/assets/images/source-code/source-code-environments.png +0 -0
  130. package/lib/templates/assets/images/source-code/source-code-organization.png +0 -0
  131. package/lib/templates/assets/images/spin-clone-develop-deployment/jenkins-changes.png +0 -0
  132. package/lib/templates/assets/images/spin-clone-develop-deployment/lerna-changes.png +0 -0
  133. package/lib/templates/assets/images/spin-clone-develop-deployment/root-package-json-changes.png +0 -0
  134. package/lib/templates/assets/images/spin-clone-develop-deployment/values-dev-changes.png +0 -0
  135. package/lib/templates/assets/images/sso-mappers.png +0 -0
  136. package/lib/templates/assets/images/sso-picture-mapper.png +0 -0
  137. package/lib/templates/assets/images/sso-settings.png +0 -0
  138. package/lib/templates/assets/images/timesheet_apollo_cache.png +0 -0
  139. package/lib/templates/assets/images/timesheet_query.png +0 -0
  140. package/lib/templates/assets/images/tutorial/docsVersionDropdown.png +0 -0
  141. package/lib/templates/assets/images/tutorial/localeDropdown.png +0 -0
  142. package/lib/templates/assets/images/unauthenticated.png +0 -0
  143. package/lib/templates/assets/images/undraw_docusaurus_mountain.svg +170 -0
  144. package/lib/templates/assets/images/undraw_docusaurus_react.svg +169 -0
  145. package/lib/templates/assets/images/undraw_docusaurus_tree.svg +1 -0
  146. package/lib/templates/assets/images/vite-plugin-config.png +0 -0
  147. package/lib/templates/content/docs/Generators/Project/generate-fullproject.md +12 -0
  148. package/lib/templates/content/docs/LLM/Logger.llm.md +194 -0
  149. package/lib/templates/content/docs/LLM/backend-proxies-services-llm.md +2687 -0
  150. package/lib/templates/content/docs/LLM/backend-service-llm.md +3384 -0
  151. package/lib/templates/content/docs/LLM/db_migration_llm.md +954 -0
  152. package/lib/templates/content/docs/LLM/frontend/REMIX-15.3-upgrade-llm.md +1245 -0
  153. package/lib/templates/content/docs/LLM/inngest/INNGEST_FUNCTION_DEVELOPMENT_GUIDE_LLM.md +1241 -0
  154. package/lib/templates/content/docs/LLM/inngest/INNGEST_NAMESPACE_LLM.md +384 -0
  155. package/lib/templates/content/docs/LLM/llm_workflow_namespace.md +384 -0
  156. package/lib/templates/content/docs/LLM/organization-components-form-llm.md +1395 -0
  157. package/lib/templates/content/docs/LLM/page-component-llm.md +173 -0
  158. package/lib/templates/content/docs/LLM/preferences-settings-llm.md +2781 -0
  159. package/lib/templates/content/docs/LLM/tailwind-css-llm.md +502 -0
  160. package/lib/templates/content/docs/UI/SchemaBasedUI.md +334 -0
  161. package/lib/templates/content/docs/UI/SlotFillComponent.md +334 -0
  162. package/lib/templates/content/docs/adminide-modules/account/auth0-login.md +31 -0
  163. package/lib/templates/content/docs/adminide-modules/account/index.md +14 -0
  164. package/lib/templates/content/docs/adminide-modules/account/keycloak-remix-setup.md +86 -0
  165. package/lib/templates/content/docs/adminide-modules/account/remix-auth-setup.md +79 -0
  166. package/lib/templates/content/docs/adminide-modules/account/various-auth-qatest.md +157 -0
  167. package/lib/templates/content/docs/adminide-modules/api-builders/graphql.md +906 -0
  168. package/lib/templates/content/docs/adminide-modules/billing/payments/index.md +14 -0
  169. package/lib/templates/content/docs/adminide-modules/billing/payments/stripe/index.md +14 -0
  170. package/lib/templates/content/docs/adminide-modules/billing/payments/stripe/settingup-stripe-locally.md +25 -0
  171. package/lib/templates/content/docs/adminide-modules/billing/tier-config.md +293 -0
  172. package/lib/templates/content/docs/adminide-modules/connectors/Connector.md +207 -0
  173. package/lib/templates/content/docs/adminide-modules/file-upload/index.md +16 -0
  174. package/lib/templates/content/docs/adminide-modules/file-upload/setup.md +435 -0
  175. package/lib/templates/content/docs/adminide-modules/file-upload/upload-file-using-signed-url.md +161 -0
  176. package/lib/templates/content/docs/adminide-modules/preferences/AddAdditionalPermissions.md +151 -0
  177. package/lib/templates/content/docs/adminide-modules/preferences/Configuration.md +241 -0
  178. package/lib/templates/content/docs/adminide-modules/preferences/Policy-Configuration.md +61 -0
  179. package/lib/templates/content/docs/adminide-modules/preferences/UI-components/ResourceSettingsLoader.md +319 -0
  180. package/lib/templates/content/docs/adminide-modules/preferences/contribute_scope_target.md +280 -0
  181. package/lib/templates/content/docs/adminide-modules/preferences/generate-urii.md +94 -0
  182. package/lib/templates/content/docs/adminide-modules/preferences/index.md +28 -0
  183. package/lib/templates/content/docs/adminide-modules/preferences/machine-configuration.md +157 -0
  184. package/lib/templates/content/docs/adminide-modules/preferences/pageSettings/generateCdecodeUri.md +1289 -0
  185. package/lib/templates/content/docs/adminide-modules/preferences/pageSettings/migratingFromUseSettings.md +215 -0
  186. package/lib/templates/content/docs/adminide-modules/preferences/permissions/Roles-Permissions.md +72 -0
  187. package/lib/templates/content/docs/adminide-modules/preferences/permissions/settingUserPermissions.md +139 -0
  188. package/lib/templates/content/docs/adminide-modules/preferences/preference-dependency.md +138 -0
  189. package/lib/templates/content/docs/adminide-modules/preferences/route-based-configuration.md +41 -0
  190. package/lib/templates/content/docs/adminide-modules/preferences/schema-configuration.md +71 -0
  191. package/lib/templates/content/docs/adminide-modules/preferences/supported.md +24 -0
  192. package/lib/templates/content/docs/adminide-modules/preferences/useSettingsLoader.md +248 -0
  193. package/lib/templates/content/docs/adminide-modules/project-tools/auth-providers.md +1317 -0
  194. package/lib/templates/content/docs/adminide-modules/project-tools/keycloak-guide.md +543 -0
  195. package/lib/templates/content/docs/adminide-modules/project-tools/tenant-management/tenant-based-authentication.md +846 -0
  196. package/lib/templates/content/docs/adminide-modules/project-tools/tenant-management/tenant-management.md +708 -0
  197. package/lib/templates/content/docs/adminide-modules/project-tools/tenant-management/tenants.md +1117 -0
  198. package/lib/templates/content/docs/chrome-extension/index.md +14 -0
  199. package/lib/templates/content/docs/chrome-extension/setup.md +30 -0
  200. package/lib/templates/content/docs/contributing/adding-package.md +23 -0
  201. package/lib/templates/content/docs/contributing/adding_new_modules.md +99 -0
  202. package/lib/templates/content/docs/contributing/architecture-updates.md +19 -0
  203. package/lib/templates/content/docs/contributing/avoid-using-promises-ui.md +116 -0
  204. package/lib/templates/content/docs/contributing/coding-guidelines.md +111 -0
  205. package/lib/templates/content/docs/contributing/do-and-dont.md +42 -0
  206. package/lib/templates/content/docs/contributing/faq.md +22 -0
  207. package/lib/templates/content/docs/contributing/folder-setup/browser.md +12 -0
  208. package/lib/templates/content/docs/contributing/folder-setup/config.md +12 -0
  209. package/lib/templates/content/docs/contributing/folder-setup/containers-server.md +12 -0
  210. package/lib/templates/content/docs/contributing/folder-setup/core.md +12 -0
  211. package/lib/templates/content/docs/contributing/folder-setup/graphql.md +12 -0
  212. package/lib/templates/content/docs/contributing/folder-setup/index.md +30 -0
  213. package/lib/templates/content/docs/contributing/folder-setup/module.md +12 -0
  214. package/lib/templates/content/docs/contributing/folder-setup/server.md +12 -0
  215. package/lib/templates/content/docs/contributing/folder-setup/services.md +12 -0
  216. package/lib/templates/content/docs/contributing/folder-setup/store.md +12 -0
  217. package/lib/templates/content/docs/contributing/frontend-coding.md +30 -0
  218. package/lib/templates/content/docs/contributing/git-subtree-sharing.md +73 -0
  219. package/lib/templates/content/docs/contributing/graphql-subscriptions.md +69 -0
  220. package/lib/templates/content/docs/contributing/how-to-contribute.md +30 -0
  221. package/lib/templates/content/docs/contributing/how_to_check_pure_esm.md +29 -0
  222. package/lib/templates/content/docs/contributing/index.md +60 -0
  223. package/lib/templates/content/docs/contributing/installation-issues.md +23 -0
  224. package/lib/templates/content/docs/contributing/keyboard-shortcut.md +131 -0
  225. package/lib/templates/content/docs/contributing/language/locale-support.md +12 -0
  226. package/lib/templates/content/docs/contributing/lerna-build-tools.md +516 -0
  227. package/lib/templates/content/docs/contributing/lerna-yarn-workspaces.md +95 -0
  228. package/lib/templates/content/docs/contributing/lint-and-formatter.md +20 -0
  229. package/lib/templates/content/docs/contributing/mobile-setup.md +16 -0
  230. package/lib/templates/content/docs/contributing/project-setup.md +233 -0
  231. package/lib/templates/content/docs/contributing/react/index.md +14 -0
  232. package/lib/templates/content/docs/contributing/react/lazy-component.md +70 -0
  233. package/lib/templates/content/docs/contributing/run-various-options.md +124 -0
  234. package/lib/templates/content/docs/contributing/schema-first-graphql-types.md +37 -0
  235. package/lib/templates/content/docs/contributing/source-code-organization.md +57 -0
  236. package/lib/templates/content/docs/contributing/staging-docker.md +88 -0
  237. package/lib/templates/content/docs/contributing/third-party/apollo-client-v3-tutorials.md +28 -0
  238. package/lib/templates/content/docs/contributing/third-party/index.md +18 -0
  239. package/lib/templates/content/docs/contributing/typescript-contribution.md +16 -0
  240. package/lib/templates/content/docs/devops/app-deploy-new-version.md +30 -0
  241. package/lib/templates/content/docs/devops/index.md +14 -0
  242. package/lib/templates/content/docs/devops/mobile-jenkins-build.md +40 -0
  243. package/lib/templates/content/docs/devops/versioning-the-project.md +128 -0
  244. package/lib/templates/content/docs/error-handler/application-error-handler.md +40 -0
  245. package/lib/templates/content/docs/error-handler/error-handling.md +26 -0
  246. package/lib/templates/content/docs/error-handler/index.md +16 -0
  247. package/lib/templates/content/docs/error-handler/logging-errors.md +14 -0
  248. package/lib/templates/content/docs/feature-api/copy-operation.md +427 -0
  249. package/lib/templates/content/docs/feature-api/feature-browser/assets.md +46 -0
  250. package/lib/templates/content/docs/feature-api/feature-browser/auth-permissions.md +12 -0
  251. package/lib/templates/content/docs/feature-api/feature-browser/feature.md +131 -0
  252. package/lib/templates/content/docs/feature-api/feature-browser/index.md +22 -0
  253. package/lib/templates/content/docs/feature-api/feature-browser/routes-menu.md +110 -0
  254. package/lib/templates/content/docs/feature-api/feature-browser/routing-convention.md +124 -0
  255. package/lib/templates/content/docs/feature-api/feature-browser/routing.md +338 -0
  256. package/lib/templates/content/docs/feature-api/feature-mobile/auth-permissions.md +20 -0
  257. package/lib/templates/content/docs/feature-api/feature-mobile/feature.md +130 -0
  258. package/lib/templates/content/docs/feature-api/feature-mobile/index.md +18 -0
  259. package/lib/templates/content/docs/feature-api/feature-mobile/navigation.md +187 -0
  260. package/lib/templates/content/docs/feature-api/feature-server/Scheduling.md +44 -0
  261. package/lib/templates/content/docs/feature-api/feature-server/dataloader.md +320 -0
  262. package/lib/templates/content/docs/feature-api/feature-server/dependency-injection.md +81 -0
  263. package/lib/templates/content/docs/feature-api/feature-server/feature.md +65 -0
  264. package/lib/templates/content/docs/feature-api/feature-server/generic-dataloader.md +135 -0
  265. package/lib/templates/content/docs/feature-api/feature-server/index.md +40 -0
  266. package/lib/templates/content/docs/feature-api/feature-server/migration.md +127 -0
  267. package/lib/templates/content/docs/feature-api/feature-server/mongo-model.md +72 -0
  268. package/lib/templates/content/docs/feature-api/feature-server/permissions.md +12 -0
  269. package/lib/templates/content/docs/feature-api/feature-server/policies.md +57 -0
  270. package/lib/templates/content/docs/feature-api/feature-server/preferences.md +57 -0
  271. package/lib/templates/content/docs/feature-api/feature-server/repositories.md +114 -0
  272. package/lib/templates/content/docs/feature-api/feature-server/resolvers.md +126 -0
  273. package/lib/templates/content/docs/feature-api/feature-server/rules.md +132 -0
  274. package/lib/templates/content/docs/feature-api/feature-server/schema.md +12 -0
  275. package/lib/templates/content/docs/feature-api/feature-server/services.md +102 -0
  276. package/lib/templates/content/docs/feature-api/feature-server/setup-resource-crud.md +359 -0
  277. package/lib/templates/content/docs/feature-api/index.md +18 -0
  278. package/lib/templates/content/docs/graphql/apolloClient-mutation.md +94 -0
  279. package/lib/templates/content/docs/graphql/index.md +14 -0
  280. package/lib/templates/content/docs/graphql/scalars.md +15 -0
  281. package/lib/templates/content/docs/help/index.md +14 -0
  282. package/lib/templates/content/docs/help/intro.md +16 -0
  283. package/lib/templates/content/docs/intl/ant-design-menu-translation.md +74 -0
  284. package/lib/templates/content/docs/intl/intl-namespace.md +129 -0
  285. package/lib/templates/content/docs/intl/vite-plugin-intl.md +87 -0
  286. package/lib/templates/content/docs/intl/webpack-plugin-intl.md +12 -0
  287. package/lib/templates/content/docs/intro.md +18 -0
  288. package/lib/templates/content/docs/knowledge/basic-fullstack.md +238 -0
  289. package/lib/templates/content/docs/mailing/index.md +14 -0
  290. package/lib/templates/content/docs/mailing/mailing-template.md +148 -0
  291. package/lib/templates/content/docs/mobile/App-navigation-generator.md +410 -0
  292. package/lib/templates/content/docs/mobile/MobileTestCases.md +264 -0
  293. package/lib/templates/content/docs/mobile/eas-profile-build.md +107 -0
  294. package/lib/templates/content/docs/mobile/expo-push-notification-setup.md +216 -0
  295. package/lib/templates/content/docs/mobile/index.md +14 -0
  296. package/lib/templates/content/docs/mobile/routes.md +83 -0
  297. package/lib/templates/content/docs/organization/adding-account-context.md +116 -0
  298. package/lib/templates/content/docs/organization/adding-org-mobile-navigation.md +22 -0
  299. package/lib/templates/content/docs/organization/adding-org-web-navigation.md +12 -0
  300. package/lib/templates/content/docs/organization/index.md +20 -0
  301. package/lib/templates/content/docs/organization/initialization.md +20 -0
  302. package/lib/templates/content/docs/organization/organization-resource-vs-resource.md +112 -0
  303. package/lib/templates/content/docs/remix/configuration/component-structure-best-practices.md +152 -0
  304. package/lib/templates/content/docs/remix/configuration/configurations.md +218 -0
  305. package/lib/templates/content/docs/remix/configuration/css-import-and-stylesheets.md +142 -0
  306. package/lib/templates/content/docs/remix/configuration/dont-subcomponent-network.md +166 -0
  307. package/lib/templates/content/docs/remix/configuration/generated-data-loaders.md +122 -0
  308. package/lib/templates/content/docs/remix/configuration/generated-resource-loaders.md +257 -0
  309. package/lib/templates/content/docs/remix/configuration/query-params-generator.md +216 -0
  310. package/lib/templates/content/docs/remix/configuration/routes-extra-icons.md +103 -0
  311. package/lib/templates/content/docs/remix/configuration/routes-json-advanced.md +86 -0
  312. package/lib/templates/content/docs/remix/configuration/routes-json-auth.md +113 -0
  313. package/lib/templates/content/docs/remix/configuration/routes-json-best-practices.md +55 -0
  314. package/lib/templates/content/docs/remix/configuration/routes-json-fields.md +79 -0
  315. package/lib/templates/content/docs/remix/configuration/routes-json-graphql.md +79 -0
  316. package/lib/templates/content/docs/remix/configuration/routes-json-index.md +112 -0
  317. package/lib/templates/content/docs/remix/configuration/routes-json-loaders.md +165 -0
  318. package/lib/templates/content/docs/remix/configuration/routes-json-middleware.md +196 -0
  319. package/lib/templates/content/docs/remix/configuration/routes-json-overview.md +53 -0
  320. package/lib/templates/content/docs/remix/data-loaders.md +43 -0
  321. package/lib/templates/content/docs/remix/devtools/remix-devtools.md +58 -0
  322. package/lib/templates/content/docs/remix/examples/changes-using-servercode.md +79 -0
  323. package/lib/templates/content/docs/remix/extra-icons.md +62 -0
  324. package/lib/templates/content/docs/remix/extra-links.md +65 -0
  325. package/lib/templates/content/docs/remix/generated-data-loaders.md +114 -0
  326. package/lib/templates/content/docs/remix/queryParamsGenerator.md +89 -0
  327. package/lib/templates/content/docs/remix/resources.md +16 -0
  328. package/lib/templates/content/docs/remix/styles.md +132 -0
  329. package/lib/templates/content/docs/remix/wiki.md +12 -0
  330. package/lib/templates/content/docs/security/auth-wrapper/auth-wrapper.md +24 -0
  331. package/lib/templates/content/docs/security/index.md +18 -0
  332. package/lib/templates/content/docs/security/secure-button-mobilenative.md +88 -0
  333. package/lib/templates/content/docs/security/secure-button-web.md +89 -0
  334. package/lib/templates/content/docs/server-side/account-customization.md +82 -0
  335. package/lib/templates/content/docs/server-side/apollo/caching.md +164 -0
  336. package/lib/templates/content/docs/server-side/backend-architecture/FINAL-DECISION.md +209 -0
  337. package/lib/templates/content/docs/server-side/backend-architecture/TRUE-FINAL-ARCHITECTURE.md +603 -0
  338. package/lib/templates/content/docs/server-side/backend-architecture/index1.md +0 -0
  339. package/lib/templates/content/docs/server-side/backend-coding.md +839 -0
  340. package/lib/templates/content/docs/server-side/e2b/manageing-template.md +197 -0
  341. package/lib/templates/content/docs/server-side/index.md +14 -0
  342. package/lib/templates/content/docs/server-side/inngest-functions-module.md +309 -0
  343. package/lib/templates/content/docs/server-side/listen-stripe-events.md +43 -0
  344. package/lib/templates/content/docs/server-side/slug-service.md +323 -0
  345. package/lib/templates/content/docs/tests/index.md +18 -0
  346. package/lib/templates/content/docs/tests/jest-test-debug-vscode.md +40 -0
  347. package/lib/templates/content/docs/tests/known-errors.md +116 -0
  348. package/lib/templates/content/docs/tests/service-test-template.md +118 -0
  349. package/lib/templates/content/docs/tests/test-setup.md +93 -0
  350. package/lib/templates/content/docs/xstate.md +23 -0
  351. package/lib/types.d.ts +37 -0
  352. package/lib/types.d.ts.map +1 -0
  353. package/lib/utils/docsNavigation.d.ts +9 -0
  354. package/lib/utils/docsNavigation.d.ts.map +1 -0
  355. package/lib/utils/docsNavigation.js +37 -0
  356. package/lib/utils/docsNavigation.js.map +1 -0
  357. package/lib/utils/helpCenterUtils.d.ts +26 -0
  358. package/lib/utils/helpCenterUtils.d.ts.map +1 -0
  359. package/lib/utils/index.d.ts +3 -0
  360. package/lib/utils/index.d.ts.map +1 -0
  361. package/lib/utils/index.js +3 -0
  362. package/lib/utils/index.js.map +1 -0
  363. package/lib/utils/markdownLoader.d.ts +36 -0
  364. package/lib/utils/markdownLoader.d.ts.map +1 -0
  365. package/lib/utils/markdownLoader.js +2242 -0
  366. package/lib/utils/markdownLoader.js.map +1 -0
  367. package/package.json +71 -0
@@ -0,0 +1,1289 @@
1
+ # How to Use PageSettings with cdecode URIs
2
+
3
+ This comprehensive guide explains how to properly use PageSettings with cdecode URIs, including URI generation, configuration parameters, and best practices. **Stop manually constructing URI objects** and use the `generateCdecodeUri` utility instead.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Why Use generateCdecodeUri?](#why-use-generatecdecodeuri)
8
+ - [Understanding Key Concepts](#understanding-key-concepts)
9
+ - [target (ConfigurationTarget)](#target-configurationtarget)
10
+ - [schemaId (ContributionSchemaId)](#schemaid-contributionschemaid)
11
+ - [meta\_\* Parameters](#meta_-parameters)
12
+ - [idField Parameter](#idfield-parameter)
13
+ - [fragment (ConfigFragmentName)](#fragment-configfragmentname)
14
+ - [Quick Start](#quick-start)
15
+ - [Common Patterns](#common-patterns)
16
+ - [Real Examples](#real-examples)
17
+ - [Migration Guide](#migration-guide)
18
+ - [Best Practices](#best-practices)
19
+ - [Troubleshooting](#troubleshooting)
20
+
21
+ ## Why Use generateCdecodeUri?
22
+
23
+ ### ❌ Don't Do This (Manual Construction)
24
+
25
+ ```typescript
26
+ // WRONG: Manual URI construction is error-prone
27
+ resourceUri: {
28
+ $mid: 1,
29
+ path: `//applications/${envConfig.APPLICATION_ID}`,
30
+ scheme: 'cdecode',
31
+ authority: 'default',
32
+ query: 'meta_idField=appId',
33
+ fragment: 'uiSettings',
34
+ }
35
+ ```
36
+
37
+ **Problems with manual construction:**
38
+
39
+ - Easy to make mistakes in path formatting
40
+ - Inconsistent handling of special characters
41
+ - Doesn't handle reserved parameters correctly
42
+ - Hard to maintain when URI structure changes
43
+ - Missing proper type safety
44
+
45
+ ### ✅ Do This Instead (Use generateCdecodeUri)
46
+
47
+ ```typescript
48
+ // CORRECT: Type-safe, validated URI generation
49
+ import { generateCdecodeUri, DEFAULT_CONTRIBUTION_TENANT_ID } from '@adminide-stack/core';
50
+ import { ConfigCollectionName, ConfigFragmentName } from 'common';
51
+
52
+ const resourceUri = generateCdecodeUri(
53
+ DEFAULT_CONTRIBUTION_TENANT_ID, // or 'default'
54
+ {
55
+ resourceType: ConfigCollectionName.Applications,
56
+ resourceId: envConfig.APPLICATION_ID,
57
+ idField: 'appId', // Automatically converts to meta_idField query param
58
+ },
59
+ {}, // Additional query parameters (optional)
60
+ ConfigFragmentName.UiSettings as string, // Fragment (optional)
61
+ );
62
+
63
+ // Use with query
64
+ const { data } = useGetPageSettingsQuery({
65
+ variables: {
66
+ resourceUri: resourceUri.toJSON(), // Convert to JSON format
67
+ options: {
68
+ /* ... */
69
+ },
70
+ },
71
+ });
72
+ ```
73
+
74
+ ## Understanding Key Concepts
75
+
76
+ Before diving into URI generation, it's crucial to understand the key parameters used with PageSettings queries. These parameters control what data you retrieve and where it's stored.
77
+
78
+ ### target (ConfigurationTarget)
79
+
80
+ `ConfigurationTarget` defines the **scope** or **level** at which configuration settings are stored and retrieved.
81
+
82
+ #### What is ConfigurationTarget?
83
+
84
+ Think of ConfigurationTarget as the "layer" where settings live in a hierarchical configuration system, similar to VS Code's settings hierarchy (User → Workspace → Folder).
85
+
86
+ ```typescript
87
+ export enum ConfigurationTarget {
88
+ USER = 1, // User-level settings (global across all orgs)
89
+ APPLICATION = 2, // Application-level defaults
90
+ MACHINE = 3, // Machine-specific settings
91
+ ORGANIZATION = 4, // Organization-level settings
92
+ ORGANIZATION_RESOURCE = 5, // Resource-specific within org (e.g., project, team)
93
+ DEFAULT = 6, // System/marketplace defaults (read-only)
94
+ MEMORY = 7, // Temporary in-memory settings
95
+ RESOURCE_OVERRIDABLE = 8, // Resource-specific overrides
96
+ }
97
+ ```
98
+
99
+ #### Common Target Values
100
+
101
+ | Target | Numeric Value | Use Case | Example |
102
+ | ----------------------- | ------------- | --------------------------- | --------------------------- |
103
+ | `USER` | 1 | Personal user preferences | Theme, editor settings |
104
+ | `APPLICATION` | 2 | App-wide defaults | Default port, app version |
105
+ | `ORGANIZATION` | 4 | Org-level settings | Billing, org features |
106
+ | `ORGANIZATION_RESOURCE` | 5 | Project/team settings | Project config, team access |
107
+ | `DEFAULT` | 6 | Marketplace/system defaults | Extension contributions |
108
+
109
+ #### When to Use Each Target
110
+
111
+ ```typescript
112
+ // USER - Personal preferences
113
+ target: ConfigurationTarget.USER;
114
+ // URI: cdecode://default/userId#settings
115
+
116
+ // ORGANIZATION - Org-wide settings
117
+ target: ConfigurationTarget.ORGANIZATION;
118
+ // URI: cdecode://default/orgName#settings
119
+
120
+ // ORGANIZATION_RESOURCE - Specific resource (project, team)
121
+ target: ConfigurationTarget.ORGANIZATION_RESOURCE;
122
+ // URI: cdecode://default/orgName/project/projectId#settings
123
+
124
+ // DEFAULT - Marketplace extensions (most common for templates/contributions)
125
+ target: 6; // or ConfigurationTarget.DEFAULT
126
+ // Used when includeMarketplace: true
127
+ ```
128
+
129
+ #### Automatic Target Determination
130
+
131
+ The system can automatically determine the target from your URI using `determineConfigurationTarget()`:
132
+
133
+ ```typescript
134
+ import { determineConfigurationTarget, parseCdecodeUri } from '@adminide-stack/core';
135
+
136
+ const uri = generateCdecodeUri('default', {
137
+ organization: 'myorg',
138
+ resourceType: ConfigCollectionName.Projects,
139
+ resourceId: 'proj123',
140
+ });
141
+
142
+ const parsed = parseCdecodeUri(uri);
143
+ const target = determineConfigurationTarget(parsed);
144
+ // Returns: ConfigurationTarget.ORGANIZATION_RESOURCE
145
+ ```
146
+
147
+ **Rule of thumb:**
148
+
149
+ - Has `resourceType`? → `ORGANIZATION_RESOURCE`
150
+ - Has `organization` only? → `ORGANIZATION`
151
+ - Neither? → `USER`
152
+
153
+ ---
154
+
155
+ ### schemaId (ContributionSchemaId)
156
+
157
+ `schemaId` specifies the **type of configuration schema** you're querying. It determines which JSON schema is used to validate and structure the settings.
158
+
159
+ #### What is schemaId?
160
+
161
+ Each `schemaId` represents a different "category" or "type" of configuration with its own validation schema and purpose.
162
+
163
+ ```typescript
164
+ export enum ContributionSchemaId {
165
+ Configuration = 'configuration', // General app configuration
166
+ UiLayout = 'uiLayout', // UI contributions (menus, commands, templates)
167
+ Permission = 'permission', // Permission rules
168
+ Policy = 'policy', // Policy definitions
169
+ UserRole = 'userRole', // Role-based access control
170
+ Secrets = 'secrets', // Secret/credential storage
171
+ SubscriptionPlan = 'subscriptionPlan', // Billing plans
172
+ }
173
+ ```
174
+
175
+ #### Common schemaId Values
176
+
177
+ | schemaId | Purpose | Typical configKey Examples |
178
+ | --------------- | -------------------------------- | -------------------------------------------------------------------- |
179
+ | `uiLayout` | UI contributions from extensions | `marketplace.templates`, `credential.templates`, `commands.registry` |
180
+ | `configuration` | Application settings | `editor.fontSize`, `app.theme`, `server.port` |
181
+ | `permission` | Access control | `resource.permissions`, `user.roles` |
182
+ | `policy` | Security policies | `security.rules`, `data.policies` |
183
+ | `secrets` | Sensitive credentials | `api.keys`, `tokens` |
184
+
185
+ #### When to Use Each schemaId
186
+
187
+ ```typescript
188
+ // UiLayout - Most common for extension contributions and templates
189
+ options: {
190
+ schemaId: ContributionSchemaId.UiLayout,
191
+ configKey: 'marketplace.templates',
192
+ includeMarketplace: true, // Include installed extensions
193
+ }
194
+ // Use for: Templates, commands, menus, UI contributions from extensions
195
+
196
+ // Configuration - General app settings
197
+ options: {
198
+ schemaId: ContributionSchemaId.Configuration,
199
+ configKey: 'editor.fontSize',
200
+ }
201
+ // Use for: App preferences, feature flags, general settings
202
+
203
+ // Permission - Access control
204
+ options: {
205
+ schemaId: ContributionSchemaId.Permission,
206
+ configKey: 'project.access',
207
+ }
208
+ // Use for: User permissions, resource access rules
209
+
210
+ // Secrets - Sensitive data (be careful with client-side usage!)
211
+ options: {
212
+ schemaId: ContributionSchemaId.Secrets,
213
+ configKey: 'api.credentials',
214
+ }
215
+ // Use for: API keys, tokens (usually server-side)
216
+ ```
217
+
218
+ #### schemaId and includeMarketplace
219
+
220
+ When using `schemaId: 'uiLayout'`, you almost always want `includeMarketplace: true`:
221
+
222
+ ```typescript
223
+ // Fetching extension contributions (templates, commands, etc.)
224
+ options: {
225
+ schemaId: ContributionSchemaId.UiLayout,
226
+ configKey: 'deepSearch.templates',
227
+ includeMarketplace: true, // ← Include installed extensions!
228
+ }
229
+ ```
230
+
231
+ **Why?** Extension contributions are stored separately from user settings and need to be explicitly included.
232
+
233
+ ---
234
+
235
+ ### meta\_\* Parameters
236
+
237
+ `meta_*` parameters are **reserved query parameters** with special handling in cdecode URIs. They provide metadata about how to interpret the URI.
238
+
239
+ #### Reserved Parameters
240
+
241
+ | Parameter | Type | Purpose | Example |
242
+ | --------------------- | -------- | ---------------------------------------- | ------------------------ |
243
+ | `meta_idField` | string | Specifies which field is the resource ID | `appId`, `email`, `slug` |
244
+ | `meta_extensionNames` | string[] | Filter by specific extensions | `['ext1', 'ext2']` |
245
+ | `meta_schemaId` | string | Alternative way to specify schema | `'uiLayout'` |
246
+
247
+ #### meta_idField
248
+
249
+ **Problem:** Not all resources use `_id` as their primary key.
250
+
251
+ ```typescript
252
+ // Applications use 'appId' instead of '_id'
253
+ // Accounts might use 'email' or 'accountId'
254
+ // Slugs might use 'slug'
255
+ ```
256
+
257
+ **Solution:** Use `idField` in params (auto-converts to `meta_idField`):
258
+
259
+ ```typescript
260
+ // CORRECT: Use idField in params
261
+ const uri = generateCdecodeUri('default', {
262
+ resourceType: ConfigCollectionName.Applications,
263
+ resourceId: 'my-app-123',
264
+ idField: 'appId', // ← Automatically becomes meta_idField=appId
265
+ });
266
+ // Generates: cdecode://default//applications/my-app-123?meta_idField=appId
267
+
268
+ // WRONG: Don't add to query manually
269
+ const uri = generateCdecodeUri(
270
+ 'default',
271
+ { resourceType: ConfigCollectionName.Applications, resourceId: 'my-app-123' },
272
+ { meta_idField: 'appId' }, // ❌ This triggers a warning!
273
+ );
274
+ ```
275
+
276
+ #### meta_extensionNames
277
+
278
+ Filter results to specific extensions:
279
+
280
+ ```typescript
281
+ // Query only specific extensions
282
+ options: {
283
+ schemaId: ContributionSchemaId.UiLayout,
284
+ configKey: 'commands',
285
+ includeMarketplace: true,
286
+ // Server-side filtering by extension names
287
+ }
288
+
289
+ // In query parameters (advanced)
290
+ const query = {
291
+ meta_extensionNames: ['my-extension', 'other-extension']
292
+ };
293
+ ```
294
+
295
+ #### Why meta\_\* is Reserved
296
+
297
+ These parameters have **special processing logic**:
298
+
299
+ - They're handled differently during URI parsing
300
+ - They affect query execution on the server
301
+ - They're validated separately from user-defined parameters
302
+
303
+ **Never use these names for your own parameters!**
304
+
305
+ ```typescript
306
+ // ❌ WRONG: Using reserved parameter names
307
+ const query = {
308
+ meta_myCustomField: 'value', // Don't prefix with meta_!
309
+ };
310
+
311
+ // ✅ CORRECT: Use regular parameter names
312
+ const query = {
313
+ myCustomField: 'value', // OK
314
+ };
315
+ ```
316
+
317
+ ---
318
+
319
+ ### idField Parameter
320
+
321
+ `idField` tells the system which field to use as the **primary identifier** for a resource.
322
+
323
+ #### Why idField Matters
324
+
325
+ Different resource types use different ID fields:
326
+
327
+ | Resource Type | ID Field | Example |
328
+ | ------------------- | -------- | ---------------------------- |
329
+ | Most resources | `_id` | `"507f1f77bcf86cd799439011"` |
330
+ | Applications | `appId` | `"my-app-name"` |
331
+ | Accounts (by email) | `email` | `"user@example.com"` |
332
+ | Slugs | `slug` | `"my-project"` |
333
+ | Organizations | `name` | `"acme-corp"` |
334
+
335
+ #### How to Use idField
336
+
337
+ ```typescript
338
+ // Application URI with appId
339
+ const appUri = generateCdecodeUri(
340
+ 'default',
341
+ {
342
+ resourceType: ConfigCollectionName.Applications,
343
+ resourceId: 'yantra-app',
344
+ idField: 'appId', // ← Tells system to look up by appId, not _id
345
+ },
346
+ {},
347
+ ConfigFragmentName.UiSettings,
348
+ );
349
+ // Result: cdecode://default//applications/yantra-app?meta_idField=appId#uiSettings
350
+
351
+ // Account URI with email
352
+ const accountUri = generateCdecodeUri('default', {
353
+ organization: 'acme',
354
+ resourceType: ConfigCollectionName.Accounts,
355
+ resourceId: 'john@acme.com',
356
+ idField: 'email', // ← Look up account by email
357
+ });
358
+ // Result: cdecode://default/acme/accounts/john@acme.com?meta_idField=email
359
+
360
+ // Default behavior (no idField = uses _id)
361
+ const projectUri = generateCdecodeUri('default', {
362
+ organization: 'acme',
363
+ resourceType: ConfigCollectionName.Projects,
364
+ resourceId: '507f1f77bcf86cd799439011',
365
+ // No idField = defaults to _id
366
+ });
367
+ // Result: cdecode://default/acme/projects/507f1f77bcf86cd799439011
368
+ ```
369
+
370
+ #### idField Auto-Conversion
371
+
372
+ When you specify `idField` in params:
373
+
374
+ 1. It's **removed** from the path parameters
375
+ 2. It's **added** to the query string as `meta_idField`
376
+ 3. The server uses it to determine which field to query
377
+
378
+ ```typescript
379
+ // Input params
380
+ {
381
+ resourceType: ConfigCollectionName.Applications,
382
+ resourceId: 'my-app',
383
+ idField: 'appId' // This param...
384
+ }
385
+
386
+ // Becomes URI
387
+ // path: //applications/my-app
388
+ // query: meta_idField=appId // ...becomes this query param
389
+ ```
390
+
391
+ #### Common idField Values by Resource
392
+
393
+ ```typescript
394
+ // Applications
395
+ idField: 'appId';
396
+
397
+ // Accounts (by email)
398
+ idField: 'email';
399
+
400
+ // Accounts (by username)
401
+ idField: 'username';
402
+
403
+ // Organizations (by name)
404
+ idField: 'name';
405
+
406
+ // Projects/Resources with slugs
407
+ idField: 'slug';
408
+
409
+ // Most other resources (default)
410
+ // idField: undefined (uses _id)
411
+ ```
412
+
413
+ ---
414
+
415
+ ### fragment (ConfigFragmentName)
416
+
417
+ `fragment` specifies the **section** or **view** of the resource you're accessing. Think of it as a "tab" or "page" within a resource.
418
+
419
+ #### What is a Fragment?
420
+
421
+ In a URI, the fragment comes after the `#` symbol:
422
+
423
+ ```
424
+ cdecode://default/myorg/projects/proj123#settings
425
+
426
+ fragment
427
+ ```
428
+
429
+ Fragments represent different **aspects** or **views** of the same resource.
430
+
431
+ #### Common Fragment Values
432
+
433
+ ```typescript
434
+ export enum ConfigFragmentName {
435
+ Settings = 'settings', // Main settings page
436
+ UiSettings = 'uiSettings', // UI-specific settings
437
+ Permissions = 'permissions', // Access control view
438
+ Policies = 'policies', // Policy configuration
439
+ // ... more fragments
440
+ }
441
+ ```
442
+
443
+ #### Fragment Use Cases
444
+
445
+ | Fragment | Purpose | Example Usage |
446
+ | ------------- | ----------------- | ------------------------------ |
447
+ | `settings` | General settings | Org settings, project settings |
448
+ | `uiSettings` | UI contributions | Extension templates, commands |
449
+ | `permissions` | Access control | Who can access this resource |
450
+ | `policies` | Security policies | Data access rules |
451
+
452
+ #### How to Use Fragments
453
+
454
+ ```typescript
455
+ // Application UI settings (for extensions/templates)
456
+ const appUri = generateCdecodeUri(
457
+ 'default',
458
+ {
459
+ resourceType: ConfigCollectionName.Applications,
460
+ resourceId: 'my-app',
461
+ idField: 'appId',
462
+ },
463
+ {},
464
+ ConfigFragmentName.UiSettings, // ← Fourth parameter
465
+ );
466
+ // Result: cdecode://default//applications/my-app?meta_idField=appId#uiSettings
467
+
468
+ // Organization general settings
469
+ const orgUri = generateCdecodeUri('default', { organization: 'acme' }, {}, ConfigFragmentName.Settings);
470
+ // Result: cdecode://default/acme#settings
471
+
472
+ // Project permissions
473
+ const projectUri = generateCdecodeUri(
474
+ 'default',
475
+ {
476
+ organization: 'acme',
477
+ resourceType: ConfigCollectionName.Projects,
478
+ resourceId: 'proj123',
479
+ },
480
+ {},
481
+ ConfigFragmentName.Permissions,
482
+ );
483
+ // Result: cdecode://default/acme/projects/proj123#permissions
484
+ ```
485
+
486
+ #### Fragment as String
487
+
488
+ You can also pass fragments as strings:
489
+
490
+ ```typescript
491
+ // Using enum (recommended)
492
+ ConfigFragmentName.Settings;
493
+
494
+ // Using string (also works)
495
+ 'settings' as string;
496
+
497
+ // Why cast to string? TypeScript strict typing
498
+ ConfigFragmentName.UiSettings as string;
499
+ ```
500
+
501
+ #### Fragment vs schemaId
502
+
503
+ **Don't confuse these!**
504
+
505
+ - **Fragment** = URI component (what "view" of the resource)
506
+ - **schemaId** = Query option (what "type" of config schema)
507
+
508
+ ```typescript
509
+ // Fragment in URI
510
+ const uri = generateCdecodeUri(
511
+ 'default',
512
+ { organization: 'acme' },
513
+ {},
514
+ 'uiSettings', // ← Fragment (part of URI)
515
+ );
516
+
517
+ // schemaId in options
518
+ const { data } = useGetPageSettingsQuery({
519
+ variables: {
520
+ resourceUri: uri.toJSON(),
521
+ options: {
522
+ schemaId: 'uiLayout', // ← schemaId (query option)
523
+ configKey: 'templates',
524
+ },
525
+ },
526
+ });
527
+ ```
528
+
529
+ **Common pattern:**
530
+
531
+ ```typescript
532
+ fragment: ConfigFragmentName.UiSettings; // URI fragment
533
+ schemaId: ContributionSchemaId.UiLayout; // Query schema
534
+ ```
535
+
536
+ ---
537
+
538
+ ## Quick Start
539
+
540
+ ### Basic Imports
541
+
542
+ ```typescript
543
+ import { generateCdecodeUri, DEFAULT_CONTRIBUTION_TENANT_ID } from '@adminide-stack/core';
544
+ import { ConfigCollectionName, ConfigFragmentName, ContributionSchemaId } from 'common';
545
+ import { useGetPageSettingsQuery } from 'common/graphql';
546
+ ```
547
+
548
+ ### Function Signature
549
+
550
+ ```typescript
551
+ generateCdecodeUri(
552
+ authority: string | IAuthorityComponent,
553
+ params: ICdecodeUriPathSegment,
554
+ query?: { [key: string]: string | number | string[] },
555
+ fragment?: ConfigFragmentName | string
556
+ ): URI
557
+ ```
558
+
559
+ ### Parameters Explained
560
+
561
+ #### 1. **authority** (string | IAuthorityComponent)
562
+
563
+ The tenant/authority identifier. Use `DEFAULT_CONTRIBUTION_TENANT_ID` or `'default'` for most cases.
564
+
565
+ ```typescript
566
+ // Simple string authority
567
+ const uri = generateCdecodeUri('default', {
568
+ /* ... */
569
+ });
570
+
571
+ // Or use constant
572
+ const uri = generateCdecodeUri(DEFAULT_CONTRIBUTION_TENANT_ID, {
573
+ /* ... */
574
+ });
575
+
576
+ // Object format (advanced)
577
+ const uri = generateCdecodeUri(
578
+ {
579
+ domain: 'cdecode.com',
580
+ region: 'us-west-2',
581
+ bucketOrAppName: 'myApp',
582
+ },
583
+ {
584
+ /* ... */
585
+ },
586
+ );
587
+ ```
588
+
589
+ #### 2. **params** (ICdecodeUriPathSegment)
590
+
591
+ The resource path parameters:
592
+
593
+ ```typescript
594
+ interface ICdecodeUriPathSegment {
595
+ organization?: string | null; // Organization name
596
+ resourceGroup?: string | null; // Project/workspace name
597
+ resourceType?: ConfigCollectionName; // Type of resource
598
+ resourceId?: string | null; // Specific resource ID
599
+ idField?: string; // ID field name (auto-converts to meta_idField)
600
+ }
601
+ ```
602
+
603
+ #### 3. **query** (optional)
604
+
605
+ Additional query parameters as key-value pairs:
606
+
607
+ ```typescript
608
+ const query = {
609
+ param1: 'value1',
610
+ param2: 123,
611
+ meta_extensionNames: ['ext1', 'ext2'], // Arrays supported
612
+ };
613
+ ```
614
+
615
+ **Reserved parameters** (handled automatically):
616
+
617
+ - `meta_idField` - Use `idField` in params instead
618
+ - `meta_extensionNames` - Always treated as array
619
+ - `meta_schemaId` - Always treated as string
620
+
621
+ #### 4. **fragment** (optional)
622
+
623
+ The URI fragment (usually a ConfigFragmentName):
624
+
625
+ ```typescript
626
+ ConfigFragmentName.Settings; // 'settings'
627
+ ConfigFragmentName.UiSettings; // 'uiSettings'
628
+ ConfigFragmentName.Permissions; // 'permissions'
629
+ ```
630
+
631
+ ## Common Patterns
632
+
633
+ ### Pattern 1: Application Settings
634
+
635
+ **Use Case:** Fetching marketplace templates, UI layouts, or app-level settings
636
+
637
+ ```typescript
638
+ const resourceUri = generateCdecodeUri(
639
+ DEFAULT_CONTRIBUTION_TENANT_ID,
640
+ {
641
+ resourceType: ConfigCollectionName.Applications,
642
+ resourceId: config.APPLICATION_ID,
643
+ idField: 'appId', // Important: apps use 'appId' not '_id'
644
+ },
645
+ {},
646
+ ConfigFragmentName.UiSettings,
647
+ );
648
+
649
+ const { data } = useGetPageSettingsQuery({
650
+ variables: {
651
+ resourceUri: resourceUri.toJSON(),
652
+ options: {
653
+ schemaId: ContributionSchemaId.UiLayout,
654
+ configKey: 'marketplace.templates',
655
+ includeMarketplace: true,
656
+ },
657
+ },
658
+ });
659
+ ```
660
+
661
+ **Generates:** `cdecode://default//applications/${appId}?meta_idField=appId#uiSettings`
662
+
663
+ ### Pattern 2: Organization Settings
664
+
665
+ **Use Case:** Organization-level configurations
666
+
667
+ ```typescript
668
+ const resourceUri = generateCdecodeUri(
669
+ DEFAULT_CONTRIBUTION_TENANT_ID,
670
+ {
671
+ organization: orgName,
672
+ },
673
+ {},
674
+ ConfigFragmentName.Settings,
675
+ );
676
+
677
+ const { data } = useGetPageSettingsQuery({
678
+ variables: {
679
+ resourceUri: resourceUri.toJSON(),
680
+ options: {
681
+ schemaId: ContributionSchemaId.Settings,
682
+ configKey: 'org.preferences',
683
+ },
684
+ },
685
+ });
686
+ ```
687
+
688
+ **Generates:** `cdecode://default/${orgName}#settings`
689
+
690
+ ### Pattern 3: Project Settings
691
+
692
+ **Use Case:** Project-specific settings (environment tags, project config)
693
+
694
+ ```typescript
695
+ const resourceUri = generateCdecodeUri(
696
+ DEFAULT_CONTRIBUTION_TENANT_ID,
697
+ {
698
+ organization: orgName,
699
+ resourceGroup: projectId,
700
+ resourceType: ConfigCollectionName.Projects,
701
+ resourceId: projectId,
702
+ },
703
+ {},
704
+ ConfigFragmentName.Settings,
705
+ );
706
+
707
+ const { data } = useGetPageSettingsQuery({
708
+ variables: {
709
+ resourceUri: resourceUri.toJSON(),
710
+ options: {
711
+ schemaId: ContributionSchemaId.Settings,
712
+ },
713
+ },
714
+ });
715
+ ```
716
+
717
+ **Generates:** `cdecode://default/${orgName}/${projectId}/projects/${projectId}#settings`
718
+
719
+ ### Pattern 4: User Resource Settings
720
+
721
+ **Use Case:** User-specific resources (accounts, profiles)
722
+
723
+ ```typescript
724
+ const resourceUri = generateCdecodeUri(
725
+ DEFAULT_CONTRIBUTION_TENANT_ID,
726
+ {
727
+ organization: orgName,
728
+ resourceType: ConfigCollectionName.Accounts,
729
+ resourceId: userId,
730
+ },
731
+ {},
732
+ ConfigFragmentName.Settings,
733
+ );
734
+ ```
735
+
736
+ **Generates:** `cdecode://default/${orgName}/accounts/${userId}#settings`
737
+
738
+ ### Pattern 5: Wildcard Queries
739
+
740
+ **Use Case:** Querying all resources of a type
741
+
742
+ ```typescript
743
+ // For deep search templates across all resources
744
+ const resourceUri = generateCdecodeUri(
745
+ DEFAULT_CONTRIBUTION_TENANT_ID,
746
+ {
747
+ organization: '*', // Wildcard
748
+ },
749
+ {},
750
+ ConfigFragmentName.Settings,
751
+ );
752
+ ```
753
+
754
+ **Generates:** `cdecode://default/*#settings`
755
+
756
+ ### Pattern 6: Reusable URI Generation
757
+
758
+ **Best Practice:** Generate URIs outside components for reusability
759
+
760
+ ```typescript
761
+ // At module level or in a constants file
762
+ const genApplicationResourceUri = generateCdecodeUri(
763
+ DEFAULT_CONTRIBUTION_TENANT_ID,
764
+ {
765
+ resourceType: ConfigCollectionName.Applications,
766
+ resourceId: config.APPLICATION_ID,
767
+ idField: 'appId',
768
+ },
769
+ {},
770
+ ConfigFragmentName.UiSettings,
771
+ );
772
+
773
+ // Use in multiple hooks/components
774
+ export function useMarketplaceTemplates() {
775
+ const { data } = useGetPageSettingsQuery({
776
+ variables: {
777
+ resourceUri: genApplicationResourceUri.toJSON(),
778
+ options: {
779
+ schemaId: ContributionSchemaId.UiLayout,
780
+ configKey: 'marketplace.templates',
781
+ includeMarketplace: true,
782
+ },
783
+ },
784
+ });
785
+ // ...
786
+ }
787
+
788
+ export function useCredentialTemplates() {
789
+ const { data } = useGetPageSettingsQuery({
790
+ variables: {
791
+ resourceUri: genApplicationResourceUri.toJSON(),
792
+ options: {
793
+ schemaId: ContributionSchemaId.UiLayout,
794
+ configKey: 'credential.templates',
795
+ includeMarketplace: true,
796
+ },
797
+ },
798
+ });
799
+ // ...
800
+ }
801
+ ```
802
+
803
+ ## Real Examples
804
+
805
+ ### Example 1: useTemplates Hook (Correct ✅)
806
+
807
+ **File:** `packages-modules/account/browser/src/hooks/useTemplates.ts`
808
+
809
+ ```typescript
810
+ import { DEFAULT_CONTRIBUTION_TENANT_ID, generateCdecodeUri } from '@adminide-stack/core';
811
+ import { ConfigCollectionName, ConfigFragmentName, ContributionSchemaId } from 'common';
812
+ import { useGetPageSettingsQuery } from 'common/graphql';
813
+
814
+ // Generate once at module level
815
+ const genResourceUri = generateCdecodeUri(
816
+ DEFAULT_CONTRIBUTION_TENANT_ID,
817
+ {
818
+ resourceType: ConfigCollectionName.Applications,
819
+ resourceId: config.APPLICATION_ID,
820
+ idField: 'appId',
821
+ },
822
+ {},
823
+ ConfigFragmentName.UiSettings as string,
824
+ );
825
+
826
+ export function useTemplates() {
827
+ // Fetch marketplace templates
828
+ const { data: marketplaceData } = useGetPageSettingsQuery({
829
+ variables: {
830
+ resourceUri: genResourceUri.toJSON(),
831
+ options: {
832
+ schemaId: ContributionSchemaId.UiLayout,
833
+ configKey: 'marketplace.templates.codeAssistant',
834
+ includeMarketplace: true,
835
+ },
836
+ },
837
+ fetchPolicy: 'no-cache',
838
+ });
839
+
840
+ // Fetch credential templates
841
+ const { data: credentialData } = useGetPageSettingsQuery({
842
+ variables: {
843
+ resourceUri: genResourceUri.toJSON(),
844
+ options: {
845
+ schemaId: ContributionSchemaId.UiLayout,
846
+ configKey: 'credential.templates',
847
+ },
848
+ },
849
+ fetchPolicy: 'no-cache',
850
+ });
851
+
852
+ return {
853
+ marketplaceTemplates: marketplaceData?.pageSettings?.settings || [],
854
+ credentialTemplates: credentialData?.pageSettings?.settings || [],
855
+ };
856
+ }
857
+ ```
858
+
859
+ ### Example 2: CredentialsTable (Correct ✅)
860
+
861
+ **File:** `packages/credentials/browser/src/components/CredentialsTable.tsx`
862
+
863
+ ```typescript
864
+ import { generateCdecodeUri, DEFAULT_CONTRIBUTION_TENANT_ID } from '@adminide-stack/core';
865
+ import { ConfigCollectionName, ConfigFragmentName } from 'common';
866
+ import { useGetPageSettingsQuery } from 'common/graphql';
867
+
868
+ function CredentialsTable({ selectedProjectId, orgName }) {
869
+ // Generate URI dynamically based on selected project
870
+ const editableSettingsInput = useMemo(() => {
871
+ if (selectedProjectId) {
872
+ return generateCdecodeUri(
873
+ DEFAULT_CONTRIBUTION_TENANT_ID,
874
+ {
875
+ resourceType: ConfigCollectionName.Projects,
876
+ resourceId: selectedProjectId,
877
+ resourceGroup: selectedProjectId,
878
+ organization: orgName,
879
+ },
880
+ {},
881
+ ConfigFragmentName.Settings,
882
+ );
883
+ }
884
+ return null;
885
+ }, [selectedProjectId, orgName]);
886
+
887
+ const { data: settingsData } = useGetPageSettingsQuery({
888
+ variables: {
889
+ resourceUri: editableSettingsInput!,
890
+ },
891
+ skip: !editableSettingsInput,
892
+ fetchPolicy: 'no-cache',
893
+ });
894
+
895
+ // Use settingsData...
896
+ }
897
+ ```
898
+
899
+ ### Example 3: FormCatalogWrapper (WRONG ❌ - Needs Migration)
900
+
901
+ **File:** `packages/credentials/browser/src/pages/FormCatalogWrapper.tsx`
902
+
903
+ ```typescript
904
+ // BEFORE (INCORRECT ❌)
905
+ export const queryParamsGenerator = (params) => {
906
+ return {
907
+ pageSettings: {
908
+ resourceUri: {
909
+ $mid: 1,
910
+ path: `//${ConfigCollectionName.Applications}/${config.APPLICATION_ID}`,
911
+ scheme: 'cdecode',
912
+ authority: 'default',
913
+ query: 'meta_idField=appId',
914
+ fragment: 'uiSettings',
915
+ },
916
+ options: {
917
+ configKey: 'credential.templates',
918
+ target: 6,
919
+ schemaId: 'uiLayout',
920
+ includeMarketplace: true,
921
+ },
922
+ },
923
+ };
924
+ };
925
+
926
+ // AFTER (CORRECT ✅)
927
+ import { generateCdecodeUri, DEFAULT_CONTRIBUTION_TENANT_ID } from '@adminide-stack/core';
928
+ import { ConfigCollectionName, ConfigFragmentName, ContributionSchemaId } from 'common';
929
+
930
+ const genResourceUri = generateCdecodeUri(
931
+ DEFAULT_CONTRIBUTION_TENANT_ID,
932
+ {
933
+ resourceType: ConfigCollectionName.Applications,
934
+ resourceId: config.APPLICATION_ID,
935
+ idField: 'appId',
936
+ },
937
+ {},
938
+ ConfigFragmentName.UiSettings,
939
+ );
940
+
941
+ export const queryParamsGenerator = (params) => {
942
+ return {
943
+ pageSettings: {
944
+ resourceUri: genResourceUri.toJSON(),
945
+ options: {
946
+ configKey: 'credential.templates',
947
+ target: 6,
948
+ schemaId: ContributionSchemaId.UiLayout,
949
+ includeMarketplace: true,
950
+ },
951
+ },
952
+ };
953
+ };
954
+ ```
955
+
956
+ ### Example 4: Deep Search Config (Mixed - Partially Correct)
957
+
958
+ **File:** `packages-modules/account/browser/src/hooks/useDeepSearchConfig.ts`
959
+
960
+ ```typescript
961
+ // CURRENT (INCORRECT ❌) - Manual construction
962
+ export function useDeepSearchConfig() {
963
+ const { data } = useGetPageSettingsQuery({
964
+ variables: {
965
+ resourceUri: {
966
+ scheme: 'cdecode',
967
+ authority: 'default',
968
+ path: '*',
969
+ query: 'deepSearch.templates',
970
+ fragment: 'settings',
971
+ },
972
+ options: {
973
+ schemaId: 'uiLayout',
974
+ configKey: 'deepSearch.templates',
975
+ includeMarketplace: true,
976
+ },
977
+ },
978
+ });
979
+ }
980
+
981
+ // SHOULD BE (CORRECT ✅)
982
+ import { generateCdecodeUri, DEFAULT_CONTRIBUTION_TENANT_ID } from '@adminide-stack/core';
983
+ import { ConfigFragmentName } from 'common';
984
+
985
+ const deepSearchResourceUri = generateCdecodeUri(
986
+ DEFAULT_CONTRIBUTION_TENANT_ID,
987
+ {
988
+ organization: '*', // Wildcard for all orgs
989
+ },
990
+ {},
991
+ ConfigFragmentName.Settings,
992
+ );
993
+
994
+ export function useDeepSearchConfig() {
995
+ const { data } = useGetPageSettingsQuery({
996
+ variables: {
997
+ resourceUri: deepSearchResourceUri.toJSON(),
998
+ options: {
999
+ schemaId: ContributionSchemaId.UiLayout,
1000
+ configKey: 'deepSearch.templates',
1001
+ includeMarketplace: true,
1002
+ },
1003
+ },
1004
+ fetchPolicy: 'cache-first',
1005
+ });
1006
+ }
1007
+ ```
1008
+
1009
+ ## Migration Guide
1010
+
1011
+ ### Step 1: Add Imports
1012
+
1013
+ ```typescript
1014
+ import { generateCdecodeUri, DEFAULT_CONTRIBUTION_TENANT_ID } from '@adminide-stack/core';
1015
+ import { ConfigCollectionName, ConfigFragmentName, ContributionSchemaId } from 'common';
1016
+ ```
1017
+
1018
+ ### Step 2: Identify Manual URI Objects
1019
+
1020
+ Search your codebase for:
1021
+
1022
+ - `resourceUri: { $mid: 1, path: `, scheme: 'cdecode'`
1023
+ - Manual path construction like `path: \`//applications/${id}\``
1024
+ - Manual query strings like `query: 'meta_idField=appId'`
1025
+
1026
+ ### Step 3: Convert to generateCdecodeUri
1027
+
1028
+ #### Conversion Table
1029
+
1030
+ | Manual Construction | generateCdecodeUri Equivalent |
1031
+ | -------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
1032
+ | `path: '//applications/${id}'` | `{ resourceType: ConfigCollectionName.Applications, resourceId: id, idField: 'appId' }` |
1033
+ | `path: '/org'` | `{ organization: 'org' }` |
1034
+ | `path: '/org/proj/accounts/123'` | `{ organization: 'org', resourceGroup: 'proj', resourceType: ConfigCollectionName.Accounts, resourceId: '123' }` |
1035
+ | `query: 'meta_idField=appId'` | `idField: 'appId'` in params |
1036
+ | `fragment: 'settings'` | `ConfigFragmentName.Settings` |
1037
+ | `authority: 'default'` | `DEFAULT_CONTRIBUTION_TENANT_ID` |
1038
+
1039
+ ### Step 4: Update Query Variables
1040
+
1041
+ ```typescript
1042
+ // Before
1043
+ variables: {
1044
+ resourceUri: { $mid: 1, path: '//...', scheme: 'cdecode', authority: 'default' }
1045
+ }
1046
+
1047
+ // After
1048
+ variables: {
1049
+ resourceUri: generatedUri.toJSON() // Don't forget .toJSON()!
1050
+ }
1051
+ ```
1052
+
1053
+ ### Step 5: Test
1054
+
1055
+ - Verify queries still return expected data
1056
+ - Check browser network tab for correct URI format
1057
+ - Ensure TypeScript compilation succeeds
1058
+
1059
+ ## Best Practices
1060
+
1061
+ ### ✅ Do's
1062
+
1063
+ 1. **Generate URIs at module level when possible**
1064
+
1065
+ ```typescript
1066
+ // At top of file, outside components
1067
+ const APP_RESOURCE_URI = generateCdecodeUri(
1068
+ DEFAULT_CONTRIBUTION_TENANT_ID,
1069
+ { resourceType: ConfigCollectionName.Applications, resourceId: APP_ID, idField: 'appId' },
1070
+ {},
1071
+ ConfigFragmentName.UiSettings,
1072
+ );
1073
+ ```
1074
+
1075
+ 2. **Use memoization for dynamic URIs**
1076
+
1077
+ ```typescript
1078
+ const resourceUri = useMemo(() => generateCdecodeUri(authority, { organization: orgId }), [orgId]);
1079
+ ```
1080
+
1081
+ 3. **Always call `.toJSON()` when passing to queries**
1082
+
1083
+ ```typescript
1084
+ resourceUri: myUri.toJSON(); // Required!
1085
+ ```
1086
+
1087
+ 4. **Use ConfigCollectionName enum**
1088
+
1089
+ ```typescript
1090
+ resourceType: ConfigCollectionName.Applications; // Not: 'applications'
1091
+ ```
1092
+
1093
+ 5. **Use ConfigFragmentName enum**
1094
+
1095
+ ```typescript
1096
+ fragment: ConfigFragmentName.Settings; // Not: 'settings'
1097
+ ```
1098
+
1099
+ 6. **Use idField for non-\_id fields**
1100
+ ```typescript
1101
+ {
1102
+ resourceType: ConfigCollectionName.Applications,
1103
+ resourceId: appId,
1104
+ idField: 'appId' // Automatically becomes meta_idField query param
1105
+ }
1106
+ ```
1107
+
1108
+ ### ❌ Don'ts
1109
+
1110
+ 1. **Don't manually construct URI objects**
1111
+
1112
+ ```typescript
1113
+ // WRONG
1114
+ resourceUri: { $mid: 1, path: '//...', scheme: 'cdecode' }
1115
+ ```
1116
+
1117
+ 2. **Don't manually build query strings**
1118
+
1119
+ ```typescript
1120
+ // WRONG
1121
+ query: 'meta_idField=appId&param=value'
1122
+
1123
+ // RIGHT
1124
+ { idField: 'appId' }, { param: 'value' }
1125
+ ```
1126
+
1127
+ 3. **Don't use string literals for collections**
1128
+
1129
+ ```typescript
1130
+ // WRONG
1131
+ resourceType: 'applications';
1132
+
1133
+ // RIGHT
1134
+ resourceType: ConfigCollectionName.Applications;
1135
+ ```
1136
+
1137
+ 4. **Don't forget .toJSON()**
1138
+
1139
+ ```typescript
1140
+ // WRONG
1141
+ resourceUri: generateCdecodeUri(...)
1142
+
1143
+ // RIGHT
1144
+ resourceUri: generateCdecodeUri(...).toJSON()
1145
+ ```
1146
+
1147
+ 5. **Don't mix path construction styles**
1148
+
1149
+ ```typescript
1150
+ // WRONG
1151
+ path: `//${resourceType}/${resourceId}`; // Manual path
1152
+
1153
+ // RIGHT
1154
+ {
1155
+ (resourceType, resourceId);
1156
+ } // Use params
1157
+ ```
1158
+
1159
+ ## Troubleshooting
1160
+
1161
+ ### Issue: Query returns no data
1162
+
1163
+ **Check:**
1164
+
1165
+ 1. Did you call `.toJSON()` on the URI?
1166
+ 2. Is the `idField` correct for your resource type?
1167
+ 3. Does your resource ID actually exist?
1168
+ 4. Is the fragment correct?
1169
+
1170
+ ```typescript
1171
+ // Debug by logging
1172
+ const uri = generateCdecodeUri(...);
1173
+ console.log('Generated URI:', uri.toString());
1174
+ console.log('URI JSON:', uri.toJSON());
1175
+ ```
1176
+
1177
+ ### Issue: TypeScript errors
1178
+
1179
+ **Solution:** Ensure you're importing types correctly:
1180
+
1181
+ ```typescript
1182
+ import { ConfigCollectionName, ConfigFragmentName } from 'common';
1183
+ import type { ICdecodeUriPathSegment } from '@adminide-stack/core';
1184
+ ```
1185
+
1186
+ ### Issue: Reserved parameter warnings
1187
+
1188
+ **Solution:** Use the appropriate param field instead of query:
1189
+
1190
+ ```typescript
1191
+ // WRONG - Reserved parameter in query
1192
+ { resourceType: ..., resourceId: ... }, { meta_idField: 'appId' }
1193
+
1194
+ // RIGHT - Use idField in params
1195
+ { resourceType: ..., resourceId: ..., idField: 'appId' }, {}
1196
+ ```
1197
+
1198
+ ### Issue: Empty/null resource IDs
1199
+
1200
+ **Solution:** Handle conditional URI generation:
1201
+
1202
+ ```typescript
1203
+ const resourceUri = useMemo(() => {
1204
+ if (!projectId) return null;
1205
+
1206
+ return generateCdecodeUri(DEFAULT_CONTRIBUTION_TENANT_ID, {
1207
+ organization: orgName,
1208
+ resourceType: ConfigCollectionName.Projects,
1209
+ resourceId: projectId,
1210
+ });
1211
+ }, [projectId, orgName]);
1212
+
1213
+ // Skip query if no URI
1214
+ const { data } = useGetPageSettingsQuery({
1215
+ variables: { resourceUri: resourceUri?.toJSON() },
1216
+ skip: !resourceUri, // Important!
1217
+ });
1218
+ ```
1219
+
1220
+ ### Issue: URI doesn't match expected format
1221
+
1222
+ **Debug approach:**
1223
+
1224
+ ```typescript
1225
+ const uri = generateCdecodeUri(authority, params, query, fragment);
1226
+
1227
+ // Log different formats
1228
+ console.log('String:', uri.toString());
1229
+ console.log('Path:', uri.path);
1230
+ console.log('Query:', uri.query);
1231
+ console.log('Fragment:', uri.fragment);
1232
+ console.log('JSON:', uri.toJSON());
1233
+
1234
+ // Parse it back to verify
1235
+ import { parseCdecodeUri } from '@adminide-stack/core';
1236
+ const parsed = parseCdecodeUri(uri);
1237
+ console.log('Parsed segments:', parsed.pathSegments);
1238
+ console.log('Parsed query:', parsed.queryData);
1239
+ ```
1240
+
1241
+ ## Reference: ConfigCollectionName Values
1242
+
1243
+ ```typescript
1244
+ enum ConfigCollectionName {
1245
+ Applications = 'applications',
1246
+ Accounts = 'accounts',
1247
+ Projects = 'projects',
1248
+ Teams = 'teams',
1249
+ Organizations = 'organizations',
1250
+ Workflows = 'workflows',
1251
+ // ... check common package for full list
1252
+ }
1253
+ ```
1254
+
1255
+ ## Reference: ConfigFragmentName Values
1256
+
1257
+ ```typescript
1258
+ enum ConfigFragmentName {
1259
+ Settings = 'settings',
1260
+ UiSettings = 'uiSettings',
1261
+ Permissions = 'permissions',
1262
+ // ... check common package for full list
1263
+ }
1264
+ ```
1265
+
1266
+ ## Summary Checklist
1267
+
1268
+ Before using `GetPageSettingsQuery`, verify:
1269
+
1270
+ - [ ] Using `generateCdecodeUri` instead of manual construction
1271
+ - [ ] Imported necessary types and enums from `@adminide-stack/core` and `common`
1272
+ - [ ] Using `DEFAULT_CONTRIBUTION_TENANT_ID` or appropriate authority
1273
+ - [ ] Using `ConfigCollectionName` enum for resource types
1274
+ - [ ] Using `ConfigFragmentName` enum for fragments
1275
+ - [ ] Using `idField` in params for non-\_id identifiers
1276
+ - [ ] Calling `.toJSON()` when passing URI to query
1277
+ - [ ] Handling null/undefined cases with `skip` option
1278
+ - [ ] Using `useMemo` for dynamic URIs to prevent unnecessary re-generation
1279
+
1280
+ ## Additional Resources
1281
+
1282
+ - [cdecodeUri.ts](../../packages/adminide-core/src/utils/cdecodeUri.ts) - Implementation source
1283
+ - [cdecodeUri.test.ts](../../packages/adminide-core/src/utils/cdecodeUri.test.ts) - Unit tests with examples
1284
+ - [README-PageSettings.md](./README-PageSettings.md) - PageSettings usage guide
1285
+
1286
+ ---
1287
+
1288
+ **Last Updated:** January 18, 2026
1289
+ **Version:** 1.0.0