@cloudigniter/next 0.0.0-stage → 0.2.0

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 (234) hide show
  1. package/README.md +34 -2
  2. package/dist/client/i18n/CiNextLocaleSwitcher.js +1 -0
  3. package/dist/client/i18n/index.js +1 -0
  4. package/dist/client/index.d.ts +304 -0
  5. package/dist/client/index.js +1 -0
  6. package/dist/client/navigation/ci-next-navigate-with-loader.js +1 -0
  7. package/dist/client/navigation/index.js +1 -0
  8. package/dist/client/page/CiBreadcrumbs.js +1 -0
  9. package/dist/client/page/CiPage.js +1 -0
  10. package/dist/client/page/index.js +1 -0
  11. package/dist/client/providers/aws/amplify/components/ci-amplify-client-configurer.js +1 -0
  12. package/dist/client/providers/aws/amplify/components/index.js +1 -0
  13. package/dist/client/providers/aws/amplify/index.js +1 -0
  14. package/dist/client/providers/aws/index.js +1 -0
  15. package/dist/client/providers/index.js +1 -0
  16. package/dist/client/settings/ci-settings-provider.js +1 -0
  17. package/dist/client/settings/ci-use-setting-value.js +1 -0
  18. package/dist/client/settings/ci-use-settings.js +1 -0
  19. package/dist/client/settings/index.js +1 -0
  20. package/dist/client/settings/ui/CiSettingsPage.js +1 -0
  21. package/dist/client/settings/ui/index.js +1 -0
  22. package/dist/client/theme/CiThemeSwitcher.js +1 -0
  23. package/dist/client/theme/ci-theme-provider.js +1 -0
  24. package/dist/client/theme/index.js +1 -0
  25. package/dist/client/wrapper/CiClientWrapper.js +1 -0
  26. package/dist/client/wrapper/index.js +1 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.js +0 -0
  29. package/dist/layout/app-standard/CiLayout.js +1 -0
  30. package/dist/layout/app-standard/container/CiContainer.js +1 -0
  31. package/dist/layout/app-standard/container/index.js +1 -0
  32. package/dist/layout/app-standard/footer/CiCopyright.js +1 -0
  33. package/dist/layout/app-standard/footer/CiFooter.js +1 -0
  34. package/dist/layout/app-standard/footer/index.js +1 -0
  35. package/dist/layout/app-standard/header/CiHeader.js +1 -0
  36. package/dist/layout/app-standard/header/index.js +1 -0
  37. package/dist/layout/app-standard/index.d.ts +61 -0
  38. package/dist/layout/app-standard/index.js +1 -0
  39. package/dist/layout/cp-standard/CiLayout.js +1 -0
  40. package/dist/layout/cp-standard/container/CiContainer.js +1 -0
  41. package/dist/layout/cp-standard/container/index.js +1 -0
  42. package/dist/layout/cp-standard/footer/CiCopyright.js +1 -0
  43. package/dist/layout/cp-standard/footer/CiFooter.js +1 -0
  44. package/dist/layout/cp-standard/footer/CiSystemStatusDialog.js +0 -0
  45. package/dist/layout/cp-standard/footer/index.js +1 -0
  46. package/dist/layout/cp-standard/header/CiHeader.js +1 -0
  47. package/dist/layout/cp-standard/header/CiMainHeaderUserBox.js +1 -0
  48. package/dist/layout/cp-standard/header/index.js +1 -0
  49. package/dist/layout/cp-standard/index.d.ts +61 -0
  50. package/dist/layout/cp-standard/index.js +1 -0
  51. package/dist/layout/login-standard/CiLayout.js +1 -0
  52. package/dist/layout/login-standard/container/CiContainer.js +1 -0
  53. package/dist/layout/login-standard/container/index.js +1 -0
  54. package/dist/layout/login-standard/footer/CiCopyright.js +1 -0
  55. package/dist/layout/login-standard/footer/CiFooter.js +1 -0
  56. package/dist/layout/login-standard/footer/CiSystemStatusDialog.js +0 -0
  57. package/dist/layout/login-standard/footer/index.js +1 -0
  58. package/dist/layout/login-standard/header/CiHeader.js +1 -0
  59. package/dist/layout/login-standard/header/CiMainHeaderUserBox.js +1 -0
  60. package/dist/layout/login-standard/header/index.js +1 -0
  61. package/dist/layout/login-standard/index.d.ts +61 -0
  62. package/dist/layout/login-standard/index.js +1 -0
  63. package/dist/layout/shared/CiLayoutFrame.js +1 -0
  64. package/dist/layout/shared/CiLayoutParts.js +1 -0
  65. package/dist/layout/shared/ci-layout-style.js +1 -0
  66. package/dist/lib/auth/ci-resolve-auth-provider.js +1 -0
  67. package/dist/lib/i18n/index.js +0 -0
  68. package/dist/lib/index.d.ts +102 -0
  69. package/dist/lib/index.js +1 -0
  70. package/dist/lib/navigation/ci-is-external-href.js +1 -0
  71. package/dist/lib/navigation/index.js +1 -0
  72. package/dist/lib/resource-studio/ci-plan-next-data-entities.js +1 -0
  73. package/dist/lib/resource-studio/index.js +1 -0
  74. package/dist/lib/theme/ci-map-theme-config-to-next-theme-provider-props.js +1 -0
  75. package/dist/lib/theme/ci-resolve-next-theme-provider-props.js +1 -0
  76. package/dist/lib/theme/constants.js +1 -0
  77. package/dist/lib/theme/index.js +1 -0
  78. package/dist/locales/ar/common.json +115 -0
  79. package/dist/locales/ar/dashboard-dev.json +11 -0
  80. package/dist/locales/ar/dashboard-modules.json +69 -0
  81. package/dist/locales/ar/dashboard-org-units.json +5 -0
  82. package/dist/locales/ar/dashboard-settings.json +75 -0
  83. package/dist/locales/ar/dashboard-tenants.json +5 -0
  84. package/dist/locales/ar/dashboard-theme.json +6 -0
  85. package/dist/locales/ar/dashboard-trash.json +3 -0
  86. package/dist/locales/ar/dashboard.json +16 -0
  87. package/dist/locales/ar/home.json +3 -0
  88. package/dist/locales/en/common.json +115 -0
  89. package/dist/locales/en/dashboard-dev.json +11 -0
  90. package/dist/locales/en/dashboard-modules.json +69 -0
  91. package/dist/locales/en/dashboard-org-units.json +5 -0
  92. package/dist/locales/en/dashboard-settings.json +75 -0
  93. package/dist/locales/en/dashboard-tenants.json +5 -0
  94. package/dist/locales/en/dashboard-theme.json +6 -0
  95. package/dist/locales/en/dashboard-trash.json +3 -0
  96. package/dist/locales/en/dashboard.json +16 -0
  97. package/dist/locales/en/home.json +3 -0
  98. package/dist/locales/index.d.ts +7 -0
  99. package/dist/locales/index.js +1 -0
  100. package/dist/server/aws/ci-create-next-aws-auth-session-route.js +1 -0
  101. package/dist/server/aws/ci-get-next-amplify-server-runner.js +1 -0
  102. package/dist/server/aws/ci-resolve-next-aws-auth-mode.js +1 -0
  103. package/dist/server/aws/ci-run-with-amplify-server-context.js +1 -0
  104. package/dist/server/aws/index.js +1 -0
  105. package/dist/server/aws/system/index.js +1 -0
  106. package/dist/server/aws/system/server-status.js +1 -0
  107. package/dist/server/aws/user/ci-aws-get-current-user.js +1 -0
  108. package/dist/server/aws/user/index.js +1 -0
  109. package/dist/server/context/ci-get-request-context.js +1 -0
  110. package/dist/server/context/ci-resolve-request-context-from-request.js +1 -0
  111. package/dist/server/context/index.js +1 -0
  112. package/dist/server/cookie/ci-get-cookies.js +1 -0
  113. package/dist/server/cookie/ci-get-next-server-cookie.js +1 -0
  114. package/dist/server/cookie/ci-set-next-server-cookie.js +1 -0
  115. package/dist/server/cookie/index.js +1 -0
  116. package/dist/server/dev/index.js +1 -0
  117. package/dist/server/dev/seeder/ci-read-mocks.js +1 -0
  118. package/dist/server/dev/seeder/index.js +1 -0
  119. package/dist/server/emberguard/ci-create-next-security-administration.js +1 -0
  120. package/dist/server/emberguard/index.js +1 -0
  121. package/dist/server/env/ci-get-env-mode.js +1 -0
  122. package/dist/server/env/index.js +1 -0
  123. package/dist/server/header/ci-get-headers.js +1 -0
  124. package/dist/server/header/index.js +1 -0
  125. package/dist/server/i18n/ci-get-server-locale.js +1 -0
  126. package/dist/server/i18n/ci-resolve-locale.js +1 -0
  127. package/dist/server/i18n/ci-set-server-locale.js +1 -0
  128. package/dist/server/i18n/index.js +1 -0
  129. package/dist/server/index.d.ts +641 -0
  130. package/dist/server/index.js +1 -0
  131. package/dist/server/modules/ci-create-next-extension-client.js +1 -0
  132. package/dist/server/org-unit/ci-get-org-unit-context.js +1 -0
  133. package/dist/server/org-unit/ci-resolve-org-unit-context.js +1 -0
  134. package/dist/server/org-unit/ci-resolve-org-unit.js +1 -0
  135. package/dist/server/org-unit/index.js +1 -0
  136. package/dist/server/proxy/index.d.ts +191 -0
  137. package/dist/server/proxy/index.js +1 -0
  138. package/dist/server/settings/ci-create-next-aws-settings-manager.js +1 -0
  139. package/dist/server/settings/ci-delete-settings.js +1 -0
  140. package/dist/server/settings/ci-get-next-aws-settings-access.js +1 -0
  141. package/dist/server/settings/ci-get-settings.js +1 -0
  142. package/dist/server/settings/ci-initialize-core-user-settings-if-missing.js +1 -0
  143. package/dist/server/settings/ci-initialize-settings-if-missing.js +1 -0
  144. package/dist/server/settings/ci-seed-core-private-settings.js +1 -0
  145. package/dist/server/settings/ci-seed-core-public-settings.js +1 -0
  146. package/dist/server/settings/ci-seed-core-settings.js +1 -0
  147. package/dist/server/settings/ci-seed-core-user-settings.js +1 -0
  148. package/dist/server/settings/ci-set-settings.js +1 -0
  149. package/dist/server/settings/index.js +1 -0
  150. package/dist/server/tenant/ci-get-tenant-context.js +1 -0
  151. package/dist/server/tenant/ci-handle-tenant-logic.js +1 -0
  152. package/dist/server/tenant/ci-resolve-tenant-context.js +1 -0
  153. package/dist/server/tenant/ci-rewrite-tenant-route.js +1 -0
  154. package/dist/server/tenant/index.js +1 -0
  155. package/dist/server/wrapper/CiNextRootWrapper.js +1 -0
  156. package/dist/server/wrapper/CiPageWrapper.js +1 -0
  157. package/dist/server/wrapper/index.js +1 -0
  158. package/dist/styles/standard/style.css +2 -0
  159. package/dist/styles/standard/theme/colors/ci-palette.css +64 -0
  160. package/dist/styles/standard/theme/colors/ci-status.css +52 -0
  161. package/dist/styles/standard/theme/colors/ci-system.css +131 -0
  162. package/dist/styles/standard/theme/foundations/ci-base.css +21 -0
  163. package/dist/styles/standard/theme/foundations/ci-layout.css +39 -0
  164. package/dist/styles/standard/theme/foundations/ci-motion.css +47 -0
  165. package/dist/styles/standard/theme/foundations/ci-radius.css +11 -0
  166. package/dist/styles/standard/theme/foundations/ci-shadow.css +11 -0
  167. package/dist/styles/standard/theme/foundations/ci-typography.css +33 -0
  168. package/dist/styles/standard/theme/theme.generated.css +560 -0
  169. package/dist/styles/standard/theme/utilities/ci-animation-utilities.css +92 -0
  170. package/dist/styles/standard/theme.css +12 -0
  171. package/dist/tooling/modules.d.ts +4 -0
  172. package/dist/tooling/modules.js +1 -0
  173. package/dist/types/index.d.ts +343 -0
  174. package/dist/ui/client/components/dashboard/CiNextDashboardCard.js +1 -0
  175. package/dist/ui/client/components/dashboard/CiNextDashboardHeaderButton.js +1 -0
  176. package/dist/ui/client/components/dashboard/index.js +1 -0
  177. package/dist/ui/client/components/index.js +1 -0
  178. package/dist/ui/client/components/main-menu/CiNextMainMenu.js +1 -0
  179. package/dist/ui/client/components/main-menu/CiNextMenuItem.js +1 -0
  180. package/dist/ui/client/components/main-menu/CiNextNavigationMenu.js +1 -0
  181. package/dist/ui/client/components/main-menu/index.js +1 -0
  182. package/dist/ui/client/components/mark/CiNextHeaderLogo.js +1 -0
  183. package/dist/ui/client/components/mark/index.js +1 -0
  184. package/dist/ui/client/components/modules/CiNextModuleManagementPage.js +1 -0
  185. package/dist/ui/client/components/profile-menu/CiNextProfileMenu.js +1 -0
  186. package/dist/ui/client/components/profile-menu/index.js +1 -0
  187. package/dist/ui/client/components/settings/CiNextAwsPersonalSettings.js +1 -0
  188. package/dist/ui/client/components/settings/CiNextSettingsManager.js +1 -0
  189. package/dist/ui/client/dev/debug-probe/CiDebugProbeClient.js +1 -0
  190. package/dist/ui/client/dev/debug-probe/CiDebugProbeProvider.js +1 -0
  191. package/dist/ui/client/dev/debug-probe/index.js +1 -0
  192. package/dist/ui/client/dev/index.js +1 -0
  193. package/dist/ui/client/dev/trace/ci-start-trace-client.js +1 -0
  194. package/dist/ui/client/dev/trace/ci-trace-logger-client.js +1 -0
  195. package/dist/ui/client/dev/trace/index.js +1 -0
  196. package/dist/ui/client/index.d.ts +244 -0
  197. package/dist/ui/client/index.js +1 -0
  198. package/dist/ui/client/pages/dashboard/dev/CiDevToolsPage.js +0 -0
  199. package/dist/ui/client/pages/dashboard/dev/sandbox/CiSandboxPage.js +1 -0
  200. package/dist/ui/client/pages/dashboard/dev/seeder/CiSeederPage.js +1 -0
  201. package/dist/ui/client/pages/dashboard/index.js +1 -0
  202. package/dist/ui/client/pages/dashboard/resources/CiNextResourceCatalogPage.js +1 -0
  203. package/dist/ui/client/pages/dashboard/resources/index.js +1 -0
  204. package/dist/ui/client/pages/dashboard/security/CiNextSecurityDataPage.js +1 -0
  205. package/dist/ui/client/pages/dashboard/security/index.js +1 -0
  206. package/dist/ui/client/pages/dashboard/tenants/CiTenantsPage.js +1 -0
  207. package/dist/ui/client/pages/dashboard/theme/CiThemePresentationPage.js +1 -0
  208. package/dist/ui/client/pages/dashboard/theme/index.js +1 -0
  209. package/dist/ui/client/pages/dashboard/users/index.js +1 -0
  210. package/dist/ui/client/pages/dashboard/users/users-management-page.js +0 -0
  211. package/dist/ui/client/pages/index.js +1 -0
  212. package/dist/ui/client/pages/login/CiNextAwsLoginPage.js +1 -0
  213. package/dist/ui/common/icon/CiIcon.js +1 -0
  214. package/dist/ui/common/icon/index.js +1 -0
  215. package/dist/ui/common/index.js +1 -0
  216. package/dist/ui/common/round-button-fallback/CiRoundButtonFallback.js +1 -0
  217. package/dist/ui/common/round-button-fallback/index.js +1 -0
  218. package/dist/ui/index.d.ts +5 -0
  219. package/dist/ui/index.js +1 -0
  220. package/dist/ui/server/dashboard/CiNextDashboardOverview.js +1 -0
  221. package/dist/ui/server/dashboard/CiNextDashboardPage.js +1 -0
  222. package/dist/ui/server/dashboard/index.js +1 -0
  223. package/dist/ui/server/dev/index.js +0 -0
  224. package/dist/ui/server/index.d.ts +113 -0
  225. package/dist/ui/server/index.js +1 -0
  226. package/dist/ui/server/main-header-navigation-box/CiMainHeaderNavigationBox.js +1 -0
  227. package/dist/ui/server/main-header-navigation-box/index.js +1 -0
  228. package/dist/ui/server/main-header-user-box/CiMainHeaderUserBox.js +1 -0
  229. package/dist/ui/server/main-header-user-box/index.js +1 -0
  230. package/dist/ui/server/main-header-user-box/types/CiMainHeaderUserBoxProps.js +0 -0
  231. package/dist/ui/server/main-header-user-box/types/index.js +0 -0
  232. package/dist/ui/server/page/CiNextAccessDeniedPreview.js +1 -0
  233. package/dist/ui/server/page/CiNextHttpErrorPage.js +1 -0
  234. package/package.json +181 -3
@@ -0,0 +1 @@
1
+ (function(_0x4e53a5,_0x2ce297){const _0x9eccdc=_0x6714,_0x49189f=_0x4e53a5();while(!![]){try{const _0x147d05=-parseInt(_0x9eccdc(0x15b))/0x1+-parseInt(_0x9eccdc(0x160))/0x2*(-parseInt(_0x9eccdc(0x161))/0x3)+-parseInt(_0x9eccdc(0x164))/0x4*(parseInt(_0x9eccdc(0x163))/0x5)+-parseInt(_0x9eccdc(0x15c))/0x6+-parseInt(_0x9eccdc(0x15a))/0x7*(parseInt(_0x9eccdc(0x159))/0x8)+parseInt(_0x9eccdc(0x15f))/0x9+parseInt(_0x9eccdc(0x165))/0xa;if(_0x147d05===_0x2ce297)break;else _0x49189f['push'](_0x49189f['shift']());}catch(_0x8b7af0){_0x49189f['push'](_0x49189f['shift']());}}}(_0x2d4c,0xbdc0d));import{cookies}from'next/headers';function _0x6714(_0x20330f,_0x2a0843){_0x20330f=_0x20330f-0x159;const _0x2d4cef=_0x2d4c();let _0x6714b1=_0x2d4cef[_0x20330f];if(_0x6714['KClsaF']===undefined){var _0x342e8e=function(_0x19c2e7){const _0x6c085c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26bee7='',_0x1696b8='';for(let _0x13c3dc=0x0,_0x3a06b2,_0x2004b7,_0x4f5021=0x0;_0x2004b7=_0x19c2e7['charAt'](_0x4f5021++);~_0x2004b7&&(_0x3a06b2=_0x13c3dc%0x4?_0x3a06b2*0x40+_0x2004b7:_0x2004b7,_0x13c3dc++%0x4)?_0x26bee7+=String['fromCharCode'](0xff&_0x3a06b2>>(-0x2*_0x13c3dc&0x6)):0x0){_0x2004b7=_0x6c085c['indexOf'](_0x2004b7);}for(let _0x47c398=0x0,_0x24d31d=_0x26bee7['length'];_0x47c398<_0x24d31d;_0x47c398++){_0x1696b8+='%'+('00'+_0x26bee7['charCodeAt'](_0x47c398)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1696b8);};_0x6714['Mqxluk']=_0x342e8e,_0x6714['Jhksyb']={},_0x6714['KClsaF']=!![];}const _0x5ca12a=_0x2d4cef[0x0],_0x4196ed=_0x20330f+_0x5ca12a,_0x488f95=_0x6714['Jhksyb'][_0x4196ed];return!_0x488f95?(_0x6714b1=_0x6714['Mqxluk'](_0x6714b1),_0x6714['Jhksyb'][_0x4196ed]=_0x6714b1):_0x6714b1=_0x488f95,_0x6714b1;}import{CI_DEFAULT_LOCALE_COOKIE_NAME,CI_DEFAULT_LOCALE,CI_LANGUAGES,ciGetLangDir}from'@cloudigniter/core/lib';function _0x2d4c(){const _0x72e796=['odq0ndr6CKTHthC','mJe1ndu2mtbxDLDAChe','ntG3ndmYugXXrK9R','otflCeDJCLi','mZu0mtG5sK1crfPU','odi0nJCYner2EKjgDW','DMfSDwu','zgvMyxvSDeXVy2fSzq','otCYmJmZmw1mAM9RtW','mtqYmJm2neDgt3zfCW','m2L6r3Lfrq','y29VA2LLtMfTzq','mte1t1b0zwPx'];_0x2d4c=function(){return _0x72e796;};return _0x2d4c();}async function A(_0x26bee7={}){const _0x292b2f=_0x6714;let _0x1696b8=_0x26bee7[_0x292b2f(0x162)]??CI_DEFAULT_LOCALE_COOKIE_NAME,_0x13c3dc=_0x26bee7[_0x292b2f(0x15e)]??CI_DEFAULT_LOCALE,_0x3a06b2=(await cookies())['get'](_0x1696b8)?.[_0x292b2f(0x15d)]??_0x13c3dc,_0x2004b7=CI_LANGUAGES[_0x3a06b2],_0x4f5021=ciGetLangDir(_0x3a06b2);return{'code':_0x3a06b2,'name':_0x2004b7,'direction':_0x4f5021};}export{A as ciGetServerLocale};
@@ -0,0 +1 @@
1
+ (function(_0x542ba4,_0x4ecdd3){var _0x553517=_0x1a18,_0x32f3ea=_0x542ba4();while(!![]){try{var _0x1b3a73=parseInt(_0x553517(0x161))/0x1+-parseInt(_0x553517(0x15e))/0x2*(parseInt(_0x553517(0x164))/0x3)+-parseInt(_0x553517(0x15c))/0x4*(parseInt(_0x553517(0x163))/0x5)+parseInt(_0x553517(0x162))/0x6*(-parseInt(_0x553517(0x15d))/0x7)+parseInt(_0x553517(0x15f))/0x8+parseInt(_0x553517(0x160))/0x9*(-parseInt(_0x553517(0x165))/0xa)+parseInt(_0x553517(0x15b))/0xb;if(_0x1b3a73===_0x4ecdd3)break;else _0x32f3ea['push'](_0x32f3ea['shift']());}catch(_0x3e6d62){_0x32f3ea['push'](_0x32f3ea['shift']());}}}(_0x1eb5,0x981d9));function _0x1a18(_0x1d0ff8,_0x42e6f3){_0x1d0ff8=_0x1d0ff8-0x15b;var _0x1eb5ff=_0x1eb5();var _0x1a189e=_0x1eb5ff[_0x1d0ff8];if(_0x1a18['tsMqZc']===undefined){var _0x453d90=function(_0x5a642f){var _0x4bda24='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x1d02b5='',_0x37a62c='';for(var _0x503259=0x0,_0x4407fa,_0x48aebf,_0x33d623=0x0;_0x48aebf=_0x5a642f['charAt'](_0x33d623++);~_0x48aebf&&(_0x4407fa=_0x503259%0x4?_0x4407fa*0x40+_0x48aebf:_0x48aebf,_0x503259++%0x4)?_0x1d02b5+=String['fromCharCode'](0xff&_0x4407fa>>(-0x2*_0x503259&0x6)):0x0){_0x48aebf=_0x4bda24['indexOf'](_0x48aebf);}for(var _0x376e0d=0x0,_0x5baab7=_0x1d02b5['length'];_0x376e0d<_0x5baab7;_0x376e0d++){_0x37a62c+='%'+('00'+_0x1d02b5['charCodeAt'](_0x376e0d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x37a62c);};_0x1a18['ulMgzr']=_0x453d90,_0x1a18['Lzkpgv']={},_0x1a18['tsMqZc']=!![];}var _0x38eb06=_0x1eb5ff[0x0],_0x535bae=_0x1d0ff8+_0x38eb06,_0x13af04=_0x1a18['Lzkpgv'][_0x535bae];return!_0x13af04?(_0x1a189e=_0x1a18['ulMgzr'](_0x1a189e),_0x1a18['Lzkpgv'][_0x535bae]=_0x1a189e):_0x1a189e=_0x13af04,_0x1a189e;}import{deepmerge}from'deepmerge-ts';function _0x1eb5(){var _0x1a99fd=['mteWq3DAzgnT','nty4nJa5ogvnEvbnvq','mJC1mtz5s29rAva','n0DqsKXIua','mNrMt29Vyq','otGZmta2nhftBu9tBG','ntqXmJC4uwjKu0TL','mte0otqXm2XpyKvlCq','mJu4mZaWnMDgCwzozG','mtm1AKTKCNzY','mJK4mZa1ou5osNflAq'];_0x1eb5=function(){return _0x1a99fd;};return _0x1eb5();}import'next-intl';function b(_0x1d02b5,_0x37a62c,_0x503259,_0x4407fa,_0x48aebf,_0x33d623){return deepmerge(_0x1d02b5,_0x37a62c,_0x503259,_0x4407fa,_0x48aebf,_0x33d623);}export{b as ciResolveLocale};
@@ -0,0 +1 @@
1
+ function _0x459b(_0x17ceb0,_0x55f581){_0x17ceb0=_0x17ceb0-0x83;const _0x26fd78=_0x26fd();let _0x459b42=_0x26fd78[_0x17ceb0];if(_0x459b['iCPkBK']===undefined){var _0x26bab1=function(_0x4abe2e){const _0x4ca032='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x761f66='',_0x3b792f='';for(let _0x41c0fe=0x0,_0x3235c7,_0x2449c7,_0x4abbe0=0x0;_0x2449c7=_0x4abe2e['charAt'](_0x4abbe0++);~_0x2449c7&&(_0x3235c7=_0x41c0fe%0x4?_0x3235c7*0x40+_0x2449c7:_0x2449c7,_0x41c0fe++%0x4)?_0x761f66+=String['fromCharCode'](0xff&_0x3235c7>>(-0x2*_0x41c0fe&0x6)):0x0){_0x2449c7=_0x4ca032['indexOf'](_0x2449c7);}for(let _0xdcee66=0x0,_0x51b7f8=_0x761f66['length'];_0xdcee66<_0x51b7f8;_0xdcee66++){_0x3b792f+='%'+('00'+_0x761f66['charCodeAt'](_0xdcee66)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3b792f);};_0x459b['ZFsnSU']=_0x26bab1,_0x459b['OQFzXV']={},_0x459b['iCPkBK']=!![];}const _0x456be4=_0x26fd78[0x0],_0x1aaa98=_0x17ceb0+_0x456be4,_0x42cba5=_0x459b['OQFzXV'][_0x1aaa98];return!_0x42cba5?(_0x459b42=_0x459b['ZFsnSU'](_0x459b42),_0x459b['OQFzXV'][_0x1aaa98]=_0x459b42):_0x459b42=_0x42cba5,_0x459b42;}const _0x2e0a03=_0x459b;(function(_0x49f001,_0xb878f6){const _0x8d932c=_0x459b,_0x33785e=_0x49f001();while(!![]){try{const _0x544fe0=-parseInt(_0x8d932c(0x85))/0x1+parseInt(_0x8d932c(0x88))/0x2*(parseInt(_0x8d932c(0x83))/0x3)+-parseInt(_0x8d932c(0x86))/0x4+-parseInt(_0x8d932c(0x8d))/0x5+parseInt(_0x8d932c(0x8c))/0x6*(parseInt(_0x8d932c(0x8a))/0x7)+-parseInt(_0x8d932c(0x8e))/0x8*(parseInt(_0x8d932c(0x87))/0x9)+parseInt(_0x8d932c(0x8b))/0xa;if(_0x544fe0===_0xb878f6)break;else _0x33785e['push'](_0x33785e['shift']());}catch(_0x8fc251){_0x33785e['push'](_0x33785e['shift']());}}}(_0x26fd,0xc498a));import{cookies}from'next/headers';function _0x26fd(){const _0x27779d=['nJm5nZCZnu1mtfDguW','ntaXndm3nNDoDhjwsa','m0TQEuXuyq','y2KTBg9JywXL','mte0ndqYmfPTzxbwqq','ndGZote4mgXcvxLxEG','ovfxwLrxuW','mJi5odK2nKn3sfPXAq','C2v0','mZvxC3Hxy3O','mZuYmJKYotb0tuTzB2S','ndCYmdG2z3bdEgnt'];_0x26fd=function(){return _0x27779d;};return _0x26fd();}async function n(_0x761f66,_0x3b792f=_0x2e0a03(0x84),_0x41c0fe={}){const _0x461627=_0x2e0a03;let _0x3235c7=await cookies(),_0x2449c7={'name':_0x3b792f,'value':_0x761f66,'path':'/','httpOnly':!![],'sameSite':'lax','secure':!![],..._0x41c0fe};_0x3235c7[_0x461627(0x89)](_0x2449c7);}export{n as ciSetServerLocale};
@@ -0,0 +1 @@
1
+ const _0x3e41de=_0x112b;(function(_0x3c44fa,_0x260e1f){const _0x29f24c=_0x112b,_0xf07313=_0x3c44fa();while(!![]){try{const _0x1d4ed9=-parseInt(_0x29f24c(0x1d3))/0x1+-parseInt(_0x29f24c(0x1da))/0x2+-parseInt(_0x29f24c(0x1dd))/0x3+-parseInt(_0x29f24c(0x1de))/0x4*(-parseInt(_0x29f24c(0x1d6))/0x5)+-parseInt(_0x29f24c(0x1e0))/0x6+-parseInt(_0x29f24c(0x1db))/0x7*(-parseInt(_0x29f24c(0x1d4))/0x8)+-parseInt(_0x29f24c(0x1d9))/0x9*(-parseInt(_0x29f24c(0x1d8))/0xa);if(_0x1d4ed9===_0x260e1f)break;else _0xf07313['push'](_0xf07313['shift']());}catch(_0x16d757){_0xf07313['push'](_0xf07313['shift']());}}}(_0x497a,0x41b80));import{cookies}from'next/headers';import{CI_DEFAULT_LOCALE_COOKIE_NAME,CI_DEFAULT_LOCALE,CI_LANGUAGES,ciGetLangDir}from'@cloudigniter/core/lib';import{deepmerge}from'deepmerge-ts';import'next-intl';async function f(_0x5c47c8={}){const _0x5acd8b=_0x112b;let _0x1ecd99=_0x5c47c8[_0x5acd8b(0x1d5)]??CI_DEFAULT_LOCALE_COOKIE_NAME,_0x409be7=_0x5c47c8[_0x5acd8b(0x1df)]??CI_DEFAULT_LOCALE,_0x55aaaf=(await cookies())[_0x5acd8b(0x1dc)](_0x1ecd99)?.['value']??_0x409be7,_0x2bc8bc=CI_LANGUAGES[_0x55aaaf],_0x365595=ciGetLangDir(_0x55aaaf);return{'code':_0x55aaaf,'name':_0x2bc8bc,'direction':_0x365595};}function _0x497a(){const _0x1157a1=['mJHlq0PeyKS','zgvMyxvSDeXVy2fSzq','nJqZode4yKTxDNrg','nJu3ntfnvwDAvhi','mZy4vg5mCfnz','y29VA2LLtMfTzq','mZK3ndvUtvvsy1e','y2KTBg9JywXL','mZq2mtqXmhHUqunpyW','owLSvfPbza','mJm0mtjOq1zzEuy','nZm5mZrYDNnmDKS','z2v0','mtmWmta3nKvOwLrquW'];_0x497a=function(){return _0x1157a1;};return _0x497a();}function _0x112b(_0x3aafeb,_0x43385e){_0x3aafeb=_0x3aafeb-0x1d3;const _0x497ae9=_0x497a();let _0x112bff=_0x497ae9[_0x3aafeb];if(_0x112b['aBaVHM']===undefined){var _0x4d63f4=function(_0x37d660){const _0x1cf43b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5c47c8='',_0x1ecd99='';for(let _0x409be7=0x0,_0x55aaaf,_0x2bc8bc,_0x365595=0x0;_0x2bc8bc=_0x37d660['charAt'](_0x365595++);~_0x2bc8bc&&(_0x55aaaf=_0x409be7%0x4?_0x55aaaf*0x40+_0x2bc8bc:_0x2bc8bc,_0x409be7++%0x4)?_0x5c47c8+=String['fromCharCode'](0xff&_0x55aaaf>>(-0x2*_0x409be7&0x6)):0x0){_0x2bc8bc=_0x1cf43b['indexOf'](_0x2bc8bc);}for(let _0x25f28e=0x0,_0x31072c=_0x5c47c8['length'];_0x25f28e<_0x31072c;_0x25f28e++){_0x1ecd99+='%'+('00'+_0x5c47c8['charCodeAt'](_0x25f28e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ecd99);};_0x112b['FWxOcg']=_0x4d63f4,_0x112b['DmHspZ']={},_0x112b['aBaVHM']=!![];}const _0xc99c35=_0x497ae9[0x0],_0x209db6=_0x3aafeb+_0xc99c35,_0x45d8e4=_0x112b['DmHspZ'][_0x209db6];return!_0x45d8e4?(_0x112bff=_0x112b['FWxOcg'](_0x112bff),_0x112b['DmHspZ'][_0x209db6]=_0x112bff):_0x112bff=_0x45d8e4,_0x112bff;}function C(_0x25f28e,_0x31072c,_0x1d5e1b,_0x16e3c0,_0x47de87,_0x30f14e){return deepmerge(_0x25f28e,_0x31072c,_0x1d5e1b,_0x16e3c0,_0x47de87,_0x30f14e);}async function A(_0x1e7e10,_0x3a1fad=_0x3e41de(0x1d7),_0x14a5a2={}){let _0xf11bd0=await cookies(),_0x2ab6a7={'name':_0x3a1fad,'value':_0x1e7e10,'path':'/','httpOnly':!![],'sameSite':'lax','secure':!![],..._0x14a5a2};_0xf11bd0['set'](_0x2ab6a7);}export{f as ciGetServerLocale,C as ciResolveLocale,A as ciSetServerLocale};
@@ -0,0 +1,641 @@
1
+ import { CiAmplifyOutputs, CiAwsAuthMode, CiAwsStatus, CiAwsProviderConfig, CiAwsEmberguardGraphqlOperations } from '@cloudigniter/aws/types';
2
+ import * as _aws_amplify_adapter_nextjs from '@aws-amplify/adapter-nextjs';
3
+ import { CiCoreSettings, CiSystemStatus, CiRequestContext, CiRequestSettings, CiAuthMode, CiUser, CiEnvMode, CiTenantContext, CiOrgUnitContext, CiRoute, CiRootLayoutContext, CiPlatformId, CiCoreConfig, CiResolvedCoreConfig, CiPageCoreConfig, CiAccessControlDefinition, CiSecurityAdministrationOptions, CiSettingsManagerOptions, CiSettingsUpdate, CiSettingsTarget, CiGraphQLResponse, CiSettingsOverwriteSelection, CiSettingsTenantTarget, CiExtensionManifest, CiModuleHost, CiResult, CiExtensionCatalog, CiExtensionCommand, CiExtensionConfiguration, CiDevBeaconActor, CiSeederItemKey, CiSecurityAdministration, CiGetServerLocaleInterface, CiLocale, CiCookieOptions, CiResolveOrgUnitInput, CiResolveOrgUnitResult, CiTenantRoutingOptions, CiSettingsService, CiDeleteSettingsInput, CiSettings, CiGetSettingsInput, CiResolvedSettings, CiSettingsScope, CiTargetTenantScope, CiSettingsRecord, CiSetSettingsInput, CiSettingsManager, CiSettingsAccess, CiResolveTenantContextResult, CiDevBeaconProps } from '@cloudigniter/core/types';
4
+ import { AuthUser } from '@aws-amplify/auth';
5
+ import { NextRequest, NextResponse } from 'next/server';
6
+ import { CiNextResolvedConfig as CiNextResolvedConfig$1 } from '@cloudigniter/next/types';
7
+ import { AbstractIntlMessages } from 'next-intl';
8
+ import * as _ci_core_types from '@ci-core/types';
9
+ import * as react from 'react';
10
+ import { ReactNode } from 'react';
11
+ import { ThemeProviderProps } from 'next-themes';
12
+
13
+ /**
14
+ * Create a reusable AWS Amplify server runner for Next.js.
15
+ *
16
+ * Overview
17
+ * --------
18
+ * AWS Amplify's Next.js adapter exposes `createServerRunner(...)`, which
19
+ * returns a `runWithAmplifyServerContext(...)` function. That runner is the
20
+ * official mechanism used to execute Amplify server-side APIs within an
21
+ * isolated Next.js request context.
22
+ *
23
+ * This helper wraps that setup so CloudIgniter can:
24
+ *
25
+ * - initialize the runner once
26
+ * - reuse it throughout the application
27
+ * - keep Next.js-specific adapter code out of the AWS package
28
+ *
29
+ * Why this helper belongs in the Next package
30
+ * -------------------------------------------
31
+ * This helper is inherently framework-specific because it depends on:
32
+ *
33
+ * - `@aws-amplify/adapter-nextjs`
34
+ * - the Next.js request model
35
+ *
36
+ * Therefore it should remain in the Next package rather than the AWS package.
37
+ *
38
+ * Typical usage
39
+ * -------------
40
+ * Call this once during application bootstrap or in a central module, then
41
+ * reuse the returned `runWithAmplifyServerContext(...)` function anywhere you
42
+ * need to execute Amplify server-side APIs.
43
+ *
44
+ * @param config
45
+ * Amplify outputs/configuration used to initialize the Next.js Amplify server
46
+ * runner.
47
+ *
48
+ * @returns
49
+ * The `runWithAmplifyServerContext(...)` function created by the Amplify
50
+ * Next.js adapter.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const runWithAmplifyServerContext =
55
+ * ciGetNextAmplifyServerRunner(amplifyOutputs);
56
+ *
57
+ * const result = await runWithAmplifyServerContext({
58
+ * nextServerContext: { cookies },
59
+ * operation: (contextSpec) => getCurrentUser(contextSpec),
60
+ * });
61
+ * ```
62
+ */
63
+ declare function ciGetNextAmplifyServerRunner(config: CiAmplifyOutputs): _aws_amplify_adapter_nextjs.NextServer.RunOperationWithContext;
64
+
65
+ /**
66
+ * Resolve the AWS auth mode for the current Next.js server request.
67
+ *
68
+ * Overview
69
+ * --------
70
+ * This helper is the Next.js adapter/wrapper around the framework-agnostic
71
+ * AWS helper `ciResolveAwsAuthMode(...)`.
72
+ *
73
+ * The AWS helper only knows how to answer:
74
+ *
75
+ * - "is there an authenticated Amplify server session?"
76
+ *
77
+ * It does not know how to obtain or pass a Next.js server context. This helper
78
+ * supplies that missing bridge by:
79
+ *
80
+ * 1. reading the current Next.js cookies function
81
+ * 2. adapting the generic AWS runner contract to the Next.js Amplify adapter
82
+ * 3. delegating the actual auth-mode decision to the AWS helper
83
+ *
84
+ * Why this split is useful
85
+ * ------------------------
86
+ * This architecture keeps responsibilities separated:
87
+ *
88
+ * - AWS package:
89
+ * provider-specific auth decision logic
90
+ *
91
+ * - Next package:
92
+ * framework-specific request context plumbing
93
+ *
94
+ * That means the AWS package no longer imports:
95
+ *
96
+ * - `next/headers`
97
+ * - `@aws-amplify/adapter-nextjs`
98
+ * - Next.js-specific context shapes
99
+ *
100
+ * @param runWithAmplifyServerContext
101
+ * The reusable Next.js Amplify server runner produced by
102
+ * `ciGetNextAmplifyServerRunner(...)`.
103
+ *
104
+ * @returns
105
+ * A Promise resolving to the AWS auth mode that should be used for the current
106
+ * Next.js server request:
107
+ *
108
+ * - `"userPool"` when an authenticated server session exists
109
+ * - `"apiKey"` when the request should be treated as guest/public
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * const runWithAmplifyServerContext =
114
+ * ciGetNextAmplifyServerRunner(amplifyOutputs);
115
+ *
116
+ * const authMode = await ciResolveNextAwsAuthMode(
117
+ * runWithAmplifyServerContext
118
+ * );
119
+ * ```
120
+ */
121
+ declare function ciResolveNextAwsAuthMode(runWithAmplifyServerContext: ReturnType<typeof ciGetNextAmplifyServerRunner>): Promise<CiAwsAuthMode>;
122
+
123
+ /**
124
+ * You can use the exported runWithAmplifyServerContext function to call Amplify APIs
125
+ * within isolated request contexts. You can review examples here:
126
+ * https://docs.amplify.aws/nextjs/build-a-backend/server-side-rendering/#calling-amplify-category-apis-on-the-server-side.
127
+ *
128
+ * You only need to call the createServerRunner function once and reuse the runWithAmplifyServerContext function throughout.
129
+ * @param config
130
+ * @returns
131
+ */
132
+ declare function ciGetAmplifyServerContext(config: CiAmplifyOutputs): _aws_amplify_adapter_nextjs.NextServer.RunOperationWithContext;
133
+
134
+ declare const ciGetServerStatus: (settings: CiCoreSettings, amplifyConfig: CiAmplifyOutputs, isOk: boolean) => Promise<CiSystemStatus>;
135
+
136
+ type CurrentUserResult = {
137
+ user: AuthUser | null;
138
+ userId: string | null;
139
+ groups: readonly string[];
140
+ isAuthenticated: boolean;
141
+ email: string | null;
142
+ emailVerified: boolean | null;
143
+ displayName: string | null;
144
+ username: string | null;
145
+ signInId: string | null;
146
+ authFlow: string | null;
147
+ sessionExpiresAt: string | null;
148
+ accessToken: string | null;
149
+ idToken: string | null;
150
+ };
151
+ declare function ciAwsGetCurrentUser(amplifyOutputs: CiAmplifyOutputs): Promise<CurrentUserResult>;
152
+
153
+ /** Creates a cookie-preserving session check for the Next.js authentication gate. */
154
+ declare function ciCreateNextAwsAuthSessionRoute(outputs: CiAmplifyOutputs): (request: NextRequest) => Promise<NextResponse>;
155
+
156
+ /**
157
+ * Reads and deserializes the unified CloudIgniter request context
158
+ * forwarded by Proxy.
159
+ *
160
+ * Returns null when the header does not exist. A malformed header throws
161
+ * because it indicates that Proxy and the server are using incompatible
162
+ * request-context formats.
163
+ */
164
+ declare const ciGetRequestContext: (headerName?: string) => Promise<CiRequestContext | null>;
165
+
166
+ type CiNextContext = {
167
+ config: CiNextConfig;
168
+ settings?: CiRequestSettings;
169
+ auth: {
170
+ mode: CiAuthMode;
171
+ user: CiUser;
172
+ };
173
+ env: {
174
+ mode: CiEnvMode;
175
+ };
176
+ tenant: CiTenantContext | null;
177
+ orgUnit: CiOrgUnitContext | null;
178
+ featurePathname: string | null;
179
+ route: CiRoute | null;
180
+ headers?: Record<string, string>;
181
+ cookies?: Record<string, string>;
182
+ status?: CiNextStatus;
183
+ };
184
+
185
+ type CiNextRootLayoutContext = CiRootLayoutContext & {
186
+ ctx: CiNextContext;
187
+ };
188
+
189
+ type CiNextStatus = {
190
+ providers?: {
191
+ aws?: CiAwsStatus;
192
+ };
193
+ };
194
+
195
+ type CiNextAppConfig = {
196
+ platform: CiPlatformId;
197
+ version?: string;
198
+ routerMode?: "App Router" | "Pages Router";
199
+ url?: string;
200
+ github?: string;
201
+ };
202
+
203
+ type CiNextCoreConfig = CiCoreConfig & {
204
+ providers?: {
205
+ aws?: CiAwsProviderConfig;
206
+ };
207
+ app?: CiNextAppConfig;
208
+ };
209
+
210
+ type CiNextConfig = {
211
+ appCoreConfig: CiNextCoreConfig;
212
+ appResolvedCoreConfig: CiResolvedCoreConfig;
213
+ appNextResolvedConfig: CiNextResolvedConfig$1;
214
+ };
215
+
216
+ /**
217
+ * Next.js-extended resolved config.
218
+ */
219
+ type CiNextResolvedConfig = {
220
+ version: string | undefined;
221
+ routerMode: "App Router" | "Pages Router";
222
+ messages: AbstractIntlMessages;
223
+ appThemeProviderProps: ThemeProviderProps;
224
+ };
225
+
226
+ interface CiResolveRequestContextFromRequestOptions {
227
+ request: Pick<NextRequest, "cookies" | "headers">;
228
+ headerName?: string;
229
+ cookieName?: string;
230
+ preferredSource?: "header" | "cookie";
231
+ /**
232
+ * When provided, only a resolved context for this public or feature
233
+ * pathname is returned. This prevents stale request transports from being
234
+ * used for a different browser route.
235
+ */
236
+ pathname?: string;
237
+ }
238
+
239
+ type CiNextPageConfig = CiPageCoreConfig & {
240
+ coreConfig: CiCoreConfig;
241
+ resolvedCoreConfig: CiResolvedCoreConfig;
242
+ nextResolvedConfig: CiNextResolvedConfig;
243
+ };
244
+
245
+ type CiNextSecurityAdministrationOptions = Omit<CiSecurityAdministrationOptions, "actor"> & {
246
+ context: CiNextContext;
247
+ };
248
+ type CiNextAwsSecurityAdministrationOptions = {
249
+ context: CiNextContext;
250
+ definition: CiAccessControlDefinition;
251
+ amplifyOutputs: unknown;
252
+ operations: CiAwsEmberguardGraphqlOperations;
253
+ createId?: () => string;
254
+ };
255
+
256
+ type CiNextAwsSettingsManagerOptions = Omit<CiSettingsManagerOptions, "store"> & {
257
+ /** False only when the generated backend has no Settings operations yet. Reads use registry defaults; writes fail. */
258
+ provisioned?: boolean;
259
+ operations: {
260
+ /** Sends all updates through an atomic, independently authorized backend operation. */
261
+ setMany?: (input: {
262
+ groups: readonly CiSettingsUpdate[];
263
+ target?: CiSettingsTarget;
264
+ }) => Promise<CiGraphQLResponse>;
265
+ overwrite?: (input: {
266
+ selection: readonly CiSettingsOverwriteSelection[];
267
+ target: CiSettingsTenantTarget;
268
+ }) => Promise<CiGraphQLResponse>;
269
+ get: (input: {
270
+ id: string;
271
+ target?: CiSettingsTarget;
272
+ manage?: boolean;
273
+ }, authenticated: boolean) => Promise<CiGraphQLResponse>;
274
+ set: (input: CiSettingsUpdate & {
275
+ target?: CiSettingsTarget;
276
+ }) => Promise<CiGraphQLResponse>;
277
+ };
278
+ };
279
+
280
+ type CiNextEnabledExtension = {
281
+ manifest: CiExtensionManifest;
282
+ configuration: CiExtensionConfiguration;
283
+ };
284
+ type CiNextExtensionClientOptions = {
285
+ context: Pick<CiNextContext, "auth" | "env">;
286
+ manifests: readonly CiExtensionManifest[];
287
+ host: CiModuleHost;
288
+ operations: {
289
+ manage?: (input: Record<string, unknown>) => Promise<CiGraphQLResponse>;
290
+ execute?: (input: Record<string, unknown>) => Promise<CiGraphQLResponse>;
291
+ };
292
+ };
293
+ type CiNextExtensionClient = {
294
+ list(): Promise<CiResult<CiExtensionCatalog>>;
295
+ command(command: CiExtensionCommand): Promise<CiResult<CiExtensionCatalog>>;
296
+ enabled(): Promise<CiResult<CiNextEnabledExtension[]>>;
297
+ execute(id: string, input: unknown): Promise<CiResult<unknown>>;
298
+ detected(): CiExtensionCatalog;
299
+ };
300
+
301
+ interface CiTemplateUpdateRouteOptions {
302
+ applicationRoot: string;
303
+ getActor: () => Promise<CiDevBeaconActor>;
304
+ getEnvironment: () => string | undefined;
305
+ }
306
+
307
+ /**
308
+ * Resolves a serialized CloudIgniter context from a concrete Next.js request.
309
+ *
310
+ * Both the proxy-only header and browser cookie are validated independently.
311
+ * When a pathname is supplied, a candidate is accepted only when its resolved
312
+ * route belongs to that pathname. The caller can then choose the transport
313
+ * appropriate to its runtime boundary without an invalid or stale candidate
314
+ * masking the other one.
315
+ */
316
+ declare function ciResolveRequestContextFromRequest({ request, headerName, cookieName, preferredSource, pathname, }: CiResolveRequestContextFromRequestOptions): CiRequestContext | null;
317
+
318
+ /**
319
+ * Read all request cookies whose name starts with "ci-".
320
+ * - Returns a plain object map.
321
+ * - If duplicate cookie names exist, later ones overwrite earlier ones.
322
+ * - A Server-only utility (Next.js App Router)!
323
+ * - e.g. const ciCookies = await getCiCookies();
324
+ */
325
+ declare function ciGetCookies(): Promise<Record<string, string>>;
326
+
327
+ /**
328
+ * Get a server-side cookie in Next.js.
329
+ * @param name The name of the cookie.
330
+ * @returns The value of the cookie or null if not found.
331
+ */
332
+ declare function ciGetNextServerCookie(name: string): Promise<string | undefined>;
333
+
334
+ /**
335
+ * Set a server-side cookie in Next.js.
336
+ * @param name The name of the cookie.
337
+ * @param value The value of the cookie.
338
+ * @param options Additional options for the cookie (e.g., expires, path, etc.).
339
+ */
340
+ declare function ciSetNextServerCookie(name: string, value: string, options?: {
341
+ expires?: Date;
342
+ maxAge?: number;
343
+ path?: string;
344
+ domain?: string;
345
+ httpOnly?: boolean;
346
+ secure?: boolean;
347
+ sameSite?: 'lax' | 'strict' | 'none';
348
+ }): Promise<void>;
349
+
350
+ /**
351
+ * Baseline rule:
352
+ * - Look for JSON files matching:
353
+ * - `${item}-mock.json`
354
+ * - OR any file that ends with `-mock.json` and starts with `${item}`
355
+ *
356
+ * You can extend to TS modules later (dynamic import) if you decide to allow `export default`.
357
+ */
358
+ declare function ciReadMocksForItem(item: CiSeederItemKey): Promise<unknown>;
359
+
360
+ declare function ciGetEnvMode(): CiEnvMode | undefined;
361
+
362
+ /** Adapts the authenticated Next.js context to a generic security actor. */
363
+ declare function ciCreateNextSecurityAdministration(options: CiNextSecurityAdministrationOptions): CiSecurityAdministration;
364
+ /** Binds Next.js security administration to the AWS Amplify/Cognito adapter. */
365
+ declare function ciCreateNextAwsSecurityAdministration(options: CiNextAwsSecurityAdministrationOptions): CiSecurityAdministration;
366
+
367
+ /**
368
+ * Read all request headers whose name starts with "x-ci-".
369
+ * - Returns a plain object map.
370
+ * - Header names are matched case-insensitively (HTTP headers are case-insensitive).
371
+ * - A Server-only utility (Next.js App Router)!
372
+ * - e.g. const ciHeaders = await getCiHeaders();
373
+ */
374
+ declare function ciGetHeaders(prefix?: string): Promise<Record<string, string>>;
375
+
376
+ declare function ciGetServerLocale(input?: CiGetServerLocaleInterface): Promise<CiLocale>;
377
+
378
+ declare function ciResolveLocale(commonMessages: AbstractIntlMessages, customCommonMessages: AbstractIntlMessages, publicMessages: AbstractIntlMessages, customPublicMessages: AbstractIntlMessages, namespaceMessages: AbstractIntlMessages, customNamespaceMessages: AbstractIntlMessages): AbstractIntlMessages;
379
+
380
+ declare function ciSetServerLocale(locale: string, cookieName?: string, options?: CiCookieOptions): Promise<void>;
381
+
382
+ /**
383
+ * Returns the canonical Org Unit context for the current server request.
384
+ *
385
+ * The Org Unit is read from the authoritative CiRequestContext header written
386
+ * by the CloudIgniter proxy.
387
+ *
388
+ * This function does not resolve Org Units from the URL, cookies, or individual
389
+ * Org Unit headers. Resolution must happen in the proxy layer.
390
+ */
391
+ declare function ciGetOrgUnitContext(): Promise<CiOrgUnitContext | null>;
392
+
393
+ /**
394
+ * Resolves the current Org Unit from the feature pathname.
395
+ *
396
+ * Uses longest-prefix matching so nested Org Units are supported.
397
+ *
398
+ * Example:
399
+ * "/academic/grade-10/math/dashboard"
400
+ *
401
+ * Tries:
402
+ * - "/academic/grade-10/math/dashboard"
403
+ * - "/academic/grade-10/math"
404
+ * - "/academic/grade-10"
405
+ * - "/academic"
406
+ */
407
+ declare function ciResolveOrgUnit({ tenantId, featurePathname, maxDepth, lookupOrgUnit, }: CiResolveOrgUnitInput): Promise<CiResolveOrgUnitResult>;
408
+
409
+ type CiOrgUnitRequest = Pick<Request, "headers" | "url">;
410
+ /**
411
+ * Resolves the canonical Org Unit context for the current request.
412
+ *
413
+ * This function:
414
+ * - runs only for tenant-scoped routes
415
+ * - supports nested Org Unit paths using longest-prefix matching
416
+ * - resolves an Org Unit through the configured lookup source
417
+ * - returns the remaining feature pathname after removing the resolved
418
+ * Org Unit path
419
+ *
420
+ * Org Unit status enforcement is intentionally handled by
421
+ * ciHandleTenantLogic(), where middleware can rewrite suspended or archived
422
+ * Org Units to the appropriate informational page.
423
+ */
424
+ declare function ciResolveOrgUnitContext({ request, tenantContext, featurePathname, tenantRoutingConfig, }: {
425
+ request: CiOrgUnitRequest;
426
+ tenantContext: CiTenantContext;
427
+ featurePathname: string;
428
+ tenantRoutingConfig: CiTenantRoutingOptions;
429
+ }): Promise<CiResolveOrgUnitResult>;
430
+
431
+ declare function ciDeleteSettings(service: CiSettingsService, input: CiDeleteSettingsInput): Promise<void>;
432
+
433
+ /**
434
+ * Get settings through the provided settings service.
435
+ */
436
+ declare function ciGetSettings<TSettings extends CiSettings = CiSettings>(service: CiSettingsService, input: CiGetSettingsInput): Promise<CiResolvedSettings<TSettings>>;
437
+
438
+ type CiInitializeSettingsIfMissingInput<TSettings extends CiSettings = CiSettings> = {
439
+ service: CiSettingsService;
440
+ settingsId: string;
441
+ scope: CiSettingsScope;
442
+ targetTenantScope: CiTargetTenantScope;
443
+ tenantId?: string;
444
+ userId?: string;
445
+ value: Partial<TSettings>;
446
+ };
447
+ type CiInitializeSettingsIfMissingResult<TSettings extends CiSettings = CiSettings> = {
448
+ initialized: false;
449
+ record: CiSettingsRecord<TSettings>;
450
+ } | {
451
+ initialized: true;
452
+ record: CiSettingsRecord<TSettings>;
453
+ };
454
+ declare function ciInitializeSettingsIfMissing<TSettings extends CiSettings = CiSettings>(input: CiInitializeSettingsIfMissingInput<TSettings>): Promise<CiInitializeSettingsIfMissingResult<TSettings>>;
455
+
456
+ /**
457
+ * Set a settings record through the provided settings service.
458
+ */
459
+ declare function ciSetSettings<TSettings extends CiSettings = CiSettings>(service: CiSettingsService, input: CiSetSettingsInput<TSettings>): Promise<CiSettingsRecord<TSettings>>;
460
+
461
+ /** The backend resolves tenant copies and enforcement once; transport preserves that effective snapshot. */
462
+ declare function ciCreateNextAwsSettingsManager({ operations, provisioned, ...options }: CiNextAwsSettingsManagerOptions): CiSettingsManager;
463
+
464
+ /** Expected access failures are safe results, not server-render exceptions. */
465
+ declare function ciGetNextAwsSettingsAccess(getAccess: () => Promise<CiGraphQLResponse>): Promise<CiResult<CiSettingsAccess>>;
466
+
467
+ /**
468
+ * Returns the tenant context resolved by the Next.js Proxy.
469
+ *
470
+ * Returns null when the request-context header is missing or invalid.
471
+ */
472
+ declare function ciGetTenantContext(headerName?: string): Promise<CiTenantContext | null>;
473
+
474
+ type CiTenantRequest$1 = Pick<Request, "headers" | "url"> & {
475
+ cookies: {
476
+ get(name: string): {
477
+ value: string;
478
+ } | undefined;
479
+ };
480
+ };
481
+ interface CiHandleTenantLogicParams {
482
+ request: CiTenantRequest$1;
483
+ pathnameNormalized: string;
484
+ /**
485
+ * Tenant-routing options after top-level defaults have been applied.
486
+ */
487
+ tenantRoutingOptions: Required<CiTenantRoutingOptions>;
488
+ }
489
+ interface CiTenantLogicBaseResult {
490
+ tenant: CiTenantContext;
491
+ orgUnit: CiOrgUnitContext | null;
492
+ /**
493
+ * Logical application pathname after removing Tenant and resolved Org Unit
494
+ * transport segments.
495
+ */
496
+ featurePathname: string;
497
+ }
498
+ type CiHandleTenantLogicResult = (CiTenantLogicBaseResult & {
499
+ action: "info";
500
+ /**
501
+ * Internal Tenant or Org Unit information-page pathname.
502
+ */
503
+ infoPagePath: string;
504
+ }) | (CiTenantLogicBaseResult & {
505
+ action: "continue";
506
+ });
507
+ /**
508
+ * Resolves the Tenant and optional Org Unit associated with a request.
509
+ *
510
+ * This function performs resolution and status evaluation only. It does not
511
+ * create responses or persist individual Tenant or Org Unit values. Response
512
+ * construction and serialized CiRequestContext transport are owned by
513
+ * ciNextProxyResponse().
514
+ */
515
+ declare function ciHandleTenantLogic({ request, pathnameNormalized, tenantRoutingOptions, }: CiHandleTenantLogicParams): Promise<CiHandleTenantLogicResult>;
516
+
517
+ type CiTenantRequest = Pick<Request, "headers" | "url">;
518
+ /**
519
+ * Resolves the canonical Tenant context and logical feature pathname for the
520
+ * current request.
521
+ *
522
+ * Route resolution identifies the Tenant slug. When Tenant validation is
523
+ * enabled, the lookup step resolves the internal Tenant identifier and
524
+ * lifecycle information.
525
+ *
526
+ * This function does not create responses, perform informational-page
527
+ * navigation, or serialize CiRequestContext.
528
+ */
529
+ declare function ciResolveTenantContext({ request, pathnameNormalized, tenantRoutingConfig, }: {
530
+ /**
531
+ * Active request containing the URL and routing headers.
532
+ */
533
+ request: CiTenantRequest;
534
+ /**
535
+ * Normalized public request pathname.
536
+ */
537
+ pathnameNormalized: string;
538
+ /**
539
+ * Optional Tenant-routing configuration.
540
+ */
541
+ tenantRoutingConfig?: CiTenantRoutingOptions;
542
+ }): Promise<CiResolveTenantContextResult>;
543
+
544
+ type CiTenantRewriteRequest = Pick<Request, "url">;
545
+ /**
546
+ * Rewrites a validated logical feature route to the internal Tenant or Global
547
+ * application route while preserving forwarded request context headers.
548
+ *
549
+ * Examples:
550
+ * - Tenant: /dashboard -> /ci-tenant/dashboard
551
+ * - Global: /dashboard -> /ci-global/dashboard
552
+ */
553
+ declare function ciRewriteTenantRoute({ request, requestHeaders, tenant, featurePathname, }: {
554
+ request: CiTenantRewriteRequest;
555
+ requestHeaders: Headers;
556
+ tenant: CiTenantContext;
557
+ featurePathname: string;
558
+ }): NextResponse;
559
+
560
+ declare const ciAuthServerModule: {
561
+ manifest: {
562
+ readonly schemaVersion: 1;
563
+ readonly id: "cloudigniter.auth";
564
+ readonly name: "Auth";
565
+ readonly description: "Provides authentication, session management, and authorization (access control management).";
566
+ readonly enabledByDefault: true;
567
+ readonly runtime: {
568
+ readonly client: true;
569
+ readonly server: true;
570
+ };
571
+ readonly target: {
572
+ readonly framework: "next";
573
+ readonly clouds: readonly ["aws"];
574
+ };
575
+ readonly dependencies: readonly [{
576
+ readonly id: "cloudigniter.i18n";
577
+ readonly environments: readonly ["client", "server"];
578
+ }, {
579
+ readonly id: "cloudigniter.theme";
580
+ readonly environments: readonly ["client"];
581
+ }];
582
+ readonly packageDependencies: readonly [{
583
+ readonly name: "@aws-amplify/ui-react";
584
+ readonly specifier: "catalog:";
585
+ readonly sections: readonly ["dependencies"];
586
+ }, {
587
+ readonly name: "aws-amplify";
588
+ readonly specifier: "catalog:";
589
+ readonly sections: readonly ["dependencies"];
590
+ }];
591
+ };
592
+ register(context: _ci_core_types.CiServerModuleContext<unknown>): void;
593
+ };
594
+
595
+ /**
596
+ * DevBeacon (Server Component).
597
+ *
598
+ * Responsibilities:
599
+ * - Apply server-side visibility gating (avoid shipping client UI when not needed).
600
+ * - Normalize and pass only serializable props to the Client wrapper.
601
+ *
602
+ * The Client wrapper (`DevBeaconWrapper`) is responsible for:
603
+ * - DOM measurement (header/footer offsets)
604
+ * - interactive state (open/close, loaded state)
605
+ * - rendering tabs and client-only content (Trace, Monaco, etc.)
606
+ */
607
+ declare function CiDevBeacon({ context, updatesOnly, position, visibleWhenEnv, defaultTab, logo, extraTabSpecs, viewportTopOffset, viewportBottomOffset, }: CiDevBeaconProps<CiNextContext>): Promise<react.JSX.Element | null>;
608
+
609
+ type CiNexAwsDevBeaconProps = {
610
+ config: CiDevBeaconProps<CiNextPageConfig> & {
611
+ messages?: AbstractIntlMessages;
612
+ themeProviderProps?: ThemeProviderProps;
613
+ amplifyOutputs?: CiAmplifyOutputs;
614
+ };
615
+ };
616
+
617
+ interface CloudIgniterClientWrapperInterface {
618
+ context: CiNextContext;
619
+ protect?: boolean;
620
+ children: ReactNode;
621
+ }
622
+ declare function CiPageWrapper({ context, protect, children, }: CloudIgniterClientWrapperInterface): Promise<react.JSX.Element>;
623
+
624
+ interface CiNextRootWrapperInterface {
625
+ context: CiNextRootLayoutContext;
626
+ children: ReactNode;
627
+ }
628
+ /**
629
+ * Server component: installs locale/messages and developer tools from the root
630
+ * render context. Authentication transitions must reload this shared layout.
631
+ */
632
+ declare function CiNextRootWrapper({ context, children, }: CiNextRootWrapperInterface): Promise<react.JSX.Element>;
633
+
634
+ /** Next.js application/server-action boundary. The provider repeats every authoritative check. */
635
+ declare function ciCreateNextExtensionClient(options: CiNextExtensionClientOptions): CiNextExtensionClient;
636
+
637
+ /** Authenticates every request independently of proxy/page context. */
638
+ declare function ciCreateTemplateUpdateRoute(options: CiTemplateUpdateRouteOptions): (request: Request) => Promise<Response>;
639
+
640
+ export { CiDevBeacon, CiNextRootWrapper, CiPageWrapper, ciAuthServerModule, ciAwsGetCurrentUser, ciCreateNextAwsAuthSessionRoute, ciCreateNextAwsSecurityAdministration, ciCreateNextAwsSettingsManager, ciCreateNextExtensionClient, ciCreateNextSecurityAdministration, ciCreateTemplateUpdateRoute, ciDeleteSettings, ciGetAmplifyServerContext, ciGetCookies, ciGetEnvMode, ciGetHeaders, ciGetNextAmplifyServerRunner, ciGetNextAwsSettingsAccess, ciGetNextServerCookie, ciGetOrgUnitContext, ciGetRequestContext, ciGetServerLocale, ciGetServerStatus, ciGetSettings, ciGetTenantContext, ciHandleTenantLogic, ciInitializeSettingsIfMissing, ciReadMocksForItem, ciResolveLocale, ciResolveNextAwsAuthMode, ciResolveOrgUnit, ciResolveOrgUnitContext, ciResolveRequestContextFromRequest, ciResolveTenantContext, ciRewriteTenantRoute, ciSetNextServerCookie, ciSetServerLocale, ciSetSettings };
641
+ export type { CiNexAwsDevBeaconProps };