@betterportal/config-manager 10.0.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/lib/.bsb/clients/service-betterportal-config-manager.d.ts +1 -1
  2. package/lib/.bsb/clients/service-betterportal-config-manager.js +1 -1
  3. package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.d.ts.map +1 -1
  4. package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.js +96 -45
  5. package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.js.map +1 -1
  6. package/lib/plugins/service-betterportal-config-manager/adminApi.d.ts.map +1 -1
  7. package/lib/plugins/service-betterportal-config-manager/adminApi.js +3 -0
  8. package/lib/plugins/service-betterportal-config-manager/adminApi.js.map +1 -1
  9. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.d.ts +3 -0
  10. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.d.ts.map +1 -0
  11. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.js +3 -0
  12. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.js.map +1 -0
  13. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
  14. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/GET.d.ts.map +1 -0
  15. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/{index.js → GET.js} +1 -1
  16. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/GET.js.map +1 -0
  17. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.d.ts +1 -95
  18. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.d.ts.map +1 -1
  19. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.js +1 -77
  20. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.js.map +1 -1
  21. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.d.ts +96 -0
  22. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.d.ts.map +1 -0
  23. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.js +78 -0
  24. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.js.map +1 -0
  25. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.d.ts +3 -0
  26. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.d.ts.map +1 -0
  27. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.js +3 -0
  28. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.js.map +1 -0
  29. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
  30. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/GET.d.ts.map +1 -0
  31. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/{index.js → GET.js} +1 -1
  32. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/GET.js.map +1 -0
  33. package/lib/plugins/service-betterportal-config-manager/bp-routes/{routes/_theme.bootstrap1/index.d.ts → config/_theme.embedded/GET.d.ts} +2 -2
  34. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded/GET.d.ts.map +1 -0
  35. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/{_theme.embedded.js → _theme.embedded/GET.js} +1 -1
  36. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded/GET.js.map +1 -0
  37. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.d.ts +1 -42
  38. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.d.ts.map +1 -1
  39. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.js +1 -67
  40. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.js.map +1 -1
  41. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.d.ts +43 -0
  42. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.d.ts.map +1 -0
  43. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.js +68 -0
  44. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.js.map +1 -0
  45. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.d.ts +3 -0
  46. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.d.ts.map +1 -0
  47. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.js +3 -0
  48. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.js.map +1 -0
  49. package/lib/plugins/service-betterportal-config-manager/bp-routes/{services/_theme.bootstrap1/index.d.ts → fragments/_theme.bootstrap1/GET.d.ts} +2 -2
  50. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/GET.d.ts.map +1 -0
  51. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/{index.js → GET.js} +1 -1
  52. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/GET.js.map +1 -0
  53. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.d.ts +1 -31
  54. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.d.ts.map +1 -1
  55. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.js +1 -31
  56. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.js.map +1 -1
  57. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.d.ts +32 -0
  58. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.d.ts.map +1 -0
  59. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.js +32 -0
  60. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.js.map +1 -0
  61. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.d.ts +3 -0
  62. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.d.ts.map +1 -0
  63. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.js +3 -0
  64. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.js.map +1 -0
  65. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
  66. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/GET.d.ts.map +1 -0
  67. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/{index.js → GET.js} +1 -1
  68. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/GET.js.map +1 -0
  69. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.d.ts +1 -59
  70. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.d.ts.map +1 -1
  71. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.js +1 -47
  72. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.js.map +1 -1
  73. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.d.ts +60 -0
  74. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.d.ts.map +1 -0
  75. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.js +48 -0
  76. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.js.map +1 -0
  77. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.d.ts +3 -0
  78. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.d.ts.map +1 -0
  79. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.js +3 -0
  80. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.js.map +1 -0
  81. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
  82. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/GET.d.ts.map +1 -0
  83. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/{index.js → GET.js} +1 -1
  84. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/GET.js.map +1 -0
  85. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.d.ts +1 -47
  86. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.d.ts.map +1 -1
  87. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.js +1 -39
  88. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.js.map +1 -1
  89. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.d.ts +48 -0
  90. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.d.ts.map +1 -0
  91. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.js +40 -0
  92. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.js.map +1 -0
  93. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.d.ts +3 -0
  94. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.d.ts.map +1 -0
  95. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.js +3 -0
  96. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.js.map +1 -0
  97. package/lib/plugins/service-betterportal-config-manager/bp-routes/{settings/_theme.bootstrap1/index.d.ts → routes/_theme.bootstrap1/GET.d.ts} +2 -2
  98. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/GET.d.ts.map +1 -0
  99. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/{index.js → GET.js} +1 -1
  100. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/GET.js.map +1 -0
  101. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.d.ts +1 -79
  102. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.d.ts.map +1 -1
  103. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.js +1 -58
  104. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.js.map +1 -1
  105. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.d.ts +80 -0
  106. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.d.ts.map +1 -0
  107. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.js +59 -0
  108. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.js.map +1 -0
  109. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.d.ts +3 -0
  110. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.d.ts.map +1 -0
  111. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.js +3 -0
  112. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.js.map +1 -0
  113. package/lib/plugins/service-betterportal-config-manager/bp-routes/{fragments/_theme.bootstrap1/index.d.ts → services/_theme.bootstrap1/GET.d.ts} +2 -2
  114. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/GET.d.ts.map +1 -0
  115. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/{index.js → GET.js} +1 -1
  116. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/GET.js.map +1 -0
  117. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.d.ts +1 -127
  118. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.d.ts.map +1 -1
  119. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.js +1 -88
  120. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.js.map +1 -1
  121. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.d.ts +128 -0
  122. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.d.ts.map +1 -0
  123. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.js +89 -0
  124. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.js.map +1 -0
  125. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.d.ts +3 -0
  126. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.d.ts.map +1 -0
  127. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.js +3 -0
  128. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.js.map +1 -0
  129. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/GET.d.ts +5 -0
  130. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/GET.d.ts.map +1 -0
  131. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/{index.js → GET.js} +1 -1
  132. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/GET.js.map +1 -0
  133. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.d.ts +1 -88
  134. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.d.ts.map +1 -1
  135. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.js +1 -92
  136. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.js.map +1 -1
  137. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.d.ts +89 -0
  138. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.d.ts.map +1 -0
  139. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.js +93 -0
  140. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.js.map +1 -0
  141. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.d.ts +3 -0
  142. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.d.ts.map +1 -0
  143. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.js +3 -0
  144. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.js.map +1 -0
  145. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.d.ts +3 -0
  146. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.d.ts.map +1 -0
  147. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.js +3 -0
  148. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.js.map +1 -0
  149. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.d.ts +3 -0
  150. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.d.ts.map +1 -0
  151. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.js +3 -0
  152. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.js.map +1 -0
  153. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.d.ts +3 -0
  154. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.d.ts.map +1 -0
  155. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.js +3 -0
  156. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.js.map +1 -0
  157. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/GET.d.ts +4 -0
  158. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/GET.d.ts.map +1 -0
  159. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/{index.js → GET.js} +1 -1
  160. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/GET.js.map +1 -0
  161. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.d.ts +1 -179
  162. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.d.ts.map +1 -1
  163. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.js +1 -404
  164. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.js.map +1 -1
  165. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.d.ts +180 -0
  166. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.d.ts.map +1 -0
  167. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.js +405 -0
  168. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.js.map +1 -0
  169. package/lib/plugins/service-betterportal-config-manager/storage/core.d.ts.map +1 -1
  170. package/lib/plugins/service-betterportal-config-manager/storage/core.js +52 -0
  171. package/lib/plugins/service-betterportal-config-manager/storage/core.js.map +1 -1
  172. package/lib/plugins/service-betterportal-config-manager/syncApi.d.ts +4 -0
  173. package/lib/plugins/service-betterportal-config-manager/syncApi.d.ts.map +1 -1
  174. package/lib/plugins/service-betterportal-config-manager/syncApi.js +3 -0
  175. package/lib/plugins/service-betterportal-config-manager/syncApi.js.map +1 -1
  176. package/lib/schemas/service-betterportal-config-manager.json +1 -1
  177. package/lib/schemas/service-betterportal-config-manager.plugin.json +1 -1
  178. package/package.json +3 -3
  179. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/index.d.ts.map +0 -1
  180. package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/index.js.map +0 -1
  181. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/index.d.ts.map +0 -1
  182. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/index.js.map +0 -1
  183. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded.d.ts +0 -5
  184. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded.d.ts.map +0 -1
  185. package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded.js.map +0 -1
  186. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/index.d.ts.map +0 -1
  187. package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/index.js.map +0 -1
  188. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/index.d.ts.map +0 -1
  189. package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/index.js.map +0 -1
  190. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/index.d.ts.map +0 -1
  191. package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/index.js.map +0 -1
  192. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/index.d.ts.map +0 -1
  193. package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/index.js.map +0 -1
  194. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/index.d.ts.map +0 -1
  195. package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/index.js.map +0 -1
  196. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/index.d.ts.map +0 -1
  197. package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/index.js.map +0 -1
  198. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/index.d.ts +0 -4
  199. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/index.d.ts.map +0 -1
  200. package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/index.js.map +0 -1
@@ -1,405 +1,2 @@
1
- import * as av from "anyvali";
2
- import { createHandler, uuidv7 } from "@betterportal/framework";
3
- import { getConfigManagerRouteContext } from "../../routeContext.js";
4
- import { getManifestCache } from "../../syncApi.js";
5
- const TenantItemSchema = av.object({
6
- id: av.string().minLength(1),
7
- slug: av.string().minLength(1),
8
- title: av.string().minLength(1),
9
- active: av.bool(),
10
- serviceCount: av.int().min(0)
11
- }, { unknownKeys: "strip" });
12
- const AppItemSchema = av.object({
13
- id: av.string().minLength(1),
14
- tenantId: av.string().minLength(1),
15
- slug: av.string().minLength(1),
16
- title: av.string().minLength(1),
17
- hostnames: av.array(av.string()),
18
- shellServiceId: av.optional(av.string().minLength(1)),
19
- authServiceId: av.optional(av.string().minLength(1)),
20
- routeCount: av.int().min(0)
21
- }, { unknownKeys: "strip" });
22
- const ShellServiceSchema = av.object({
23
- id: av.string().minLength(1),
24
- tenantId: av.string().minLength(1),
25
- title: av.string().minLength(1),
26
- serviceId: av.optional(av.string())
27
- }, { unknownKeys: "strip" });
28
- export const ResponseSchema = av.object({
29
- title: av.string().minLength(1),
30
- tenants: av.array(TenantItemSchema),
31
- apps: av.array(AppItemSchema),
32
- shellServices: av.array(ShellServiceSchema).default([]),
33
- authServices: av.array(ShellServiceSchema).default([]),
34
- adminApiBase: av.string().minLength(1),
35
- serviceBaseUrl: av.optional(av.string())
36
- }, { unknownKeys: "strip" });
37
- export const title = "Tenants & Apps";
38
- export const description = "Manage tenants and applications.";
39
- export const auth = {
40
- required: true,
41
- permissions: [
42
- { serviceId: "service.betterportal.config-manager", viewId: "tenants.index", permissions: ["read", "create", "update", "delete"] }
43
- ]
44
- };
45
- export const cacheHints = { ttlSeconds: 0, varyBy: ["accept", "origin"] };
46
- export const demoScenarios = [
47
- { id: "default", title: "Default", response: { title: "Tenants & Apps", tenants: [], apps: [], shellServices: [], authServices: [], adminApiBase: "/.well-known/bp/admin" } }
48
- ];
49
- export const handleGet = createHandler({ response: ResponseSchema }, () => buildResponseModel());
50
- export const handlePost = createHandler({ response: ResponseSchema }, async (ctx) => {
51
- const body = ctx.request;
52
- if (stringValue(body.entity) === "app") {
53
- await createApp(body);
54
- }
55
- else {
56
- await createTenant(body);
57
- }
58
- return buildResponseModel();
59
- });
60
- export const handlePut = createHandler({ response: ResponseSchema }, async (ctx) => {
61
- const body = ctx.request;
62
- if (stringValue(body.entity) === "app") {
63
- await updateApp(body);
64
- }
65
- else {
66
- await updateTenant(body);
67
- }
68
- return buildResponseModel();
69
- });
70
- export const handleDelete = createHandler({ response: ResponseSchema }, async (ctx) => {
71
- const entity = stringValue(ctx.query.entity);
72
- const id = stringValue(ctx.query.id);
73
- if (entity === "app") {
74
- await deleteApp(id);
75
- }
76
- else {
77
- await deleteTenant(id);
78
- }
79
- return buildResponseModel();
80
- });
81
- async function buildResponseModel() {
82
- const routeContext = getConfigManagerRouteContext();
83
- const config = await routeContext.storage.loadConfig();
84
- return {
85
- title: "Tenants & Apps",
86
- tenants: config.tenants.map((t) => ({
87
- id: t.id,
88
- slug: t.slug,
89
- title: t.title,
90
- active: t.active,
91
- serviceCount: t.services.length + config.sharedServiceActivations.filter((activation) => activation.enabled && activation.tenantId === t.id).length
92
- })),
93
- apps: config.apps.map((a) => ({
94
- id: a.id,
95
- tenantId: a.tenantId,
96
- slug: a.slug,
97
- title: a.title,
98
- hostnames: a.hostnames,
99
- shellServiceId: a.shell?.serviceId,
100
- authServiceId: a.auth?.serviceId,
101
- routeCount: a.routes.length
102
- })),
103
- shellServices: config.tenants.flatMap((tenant) => themeShellServicesForTenant(config, tenant.id)),
104
- authServices: config.tenants.flatMap((tenant) => authServicesForTenant(config, tenant.id)),
105
- adminApiBase: "/.well-known/bp/admin",
106
- serviceBaseUrl: routeContext.serviceBaseUrl
107
- };
108
- }
109
- async function createTenant(body) {
110
- const title = stringValue(body.title);
111
- if (!title)
112
- return;
113
- const routeContext = getConfigManagerRouteContext();
114
- const config = await routeContext.storage.loadConfig();
115
- const id = uuidv7();
116
- config.tenants.push({
117
- id,
118
- slug: stringValue(body.slug) || id,
119
- title,
120
- active: true,
121
- branding: {},
122
- services: [],
123
- activatedPlatformServices: []
124
- });
125
- await routeContext.storage.saveConfig(config);
126
- }
127
- async function updateTenant(body) {
128
- const id = stringValue(body.tenantId);
129
- if (!id)
130
- return;
131
- const routeContext = getConfigManagerRouteContext();
132
- const config = await routeContext.storage.loadConfig();
133
- const tenant = config.tenants.find((t) => t.id === id);
134
- if (!tenant)
135
- return;
136
- const title = stringValue(body.title);
137
- const slug = stringValue(body.slug);
138
- if (title)
139
- tenant.title = title;
140
- if (slug)
141
- tenant.slug = slug;
142
- tenant.active = boolValue(body.active);
143
- await routeContext.storage.saveConfig(config);
144
- }
145
- async function deleteTenant(id) {
146
- if (!id)
147
- return;
148
- const routeContext = getConfigManagerRouteContext();
149
- const config = await routeContext.storage.loadConfig();
150
- config.tenants = config.tenants.filter((tenant) => tenant.id !== id);
151
- config.apps = config.apps.filter((app) => app.tenantId !== id);
152
- await routeContext.storage.saveConfig(config);
153
- }
154
- async function createApp(body) {
155
- const tenantId = stringValue(body.tenantId);
156
- const title = stringValue(body.title);
157
- if (!tenantId || !title)
158
- return;
159
- const routeContext = getConfigManagerRouteContext();
160
- const config = await routeContext.storage.loadConfig();
161
- const tenant = config.tenants.find((candidate) => candidate.id === tenantId);
162
- if (!tenant)
163
- return;
164
- const shellServiceId = stringValue(body.shellServiceId);
165
- if (shellServiceId && !isThemeShellServiceForTenant(config, tenantId, shellServiceId))
166
- return;
167
- const authServiceId = stringValue(body.authServiceId);
168
- if (authServiceId && !isAuthServiceForTenant(config, tenantId, authServiceId))
169
- return;
170
- const id = uuidv7();
171
- const app = {
172
- id,
173
- tenantId,
174
- slug: stringValue(body.slug) || id,
175
- title,
176
- hostnames: hostnamesFromBody(body),
177
- originOverrides: [],
178
- refererOverrides: [],
179
- ...(shellServiceId ? { shell: { serviceId: shellServiceId } } : {}),
180
- themeConfig: body.themeConfig ?? { mode: "system", bootstrap: {}, light: {}, dark: {} },
181
- defaultRoute: stringValue(body.defaultRoute) || "/",
182
- routes: [],
183
- menu: [],
184
- slots: [],
185
- fragments: {}
186
- };
187
- if (authServiceId) {
188
- app.auth = buildAppAuthConfig(config, tenantId, authServiceId);
189
- ensureAuthRouteMounts(config, app);
190
- }
191
- config.apps.push(app);
192
- await routeContext.storage.saveConfig(config);
193
- }
194
- async function updateApp(body) {
195
- const id = stringValue(body.appId);
196
- if (!id)
197
- return;
198
- const routeContext = getConfigManagerRouteContext();
199
- const config = await routeContext.storage.loadConfig();
200
- const appDef = config.apps.find((app) => app.id === id);
201
- if (!appDef)
202
- return;
203
- const title = stringValue(body.title);
204
- const slug = stringValue(body.slug);
205
- if (title)
206
- appDef.title = title;
207
- if (slug)
208
- appDef.slug = slug;
209
- if (body.hostnames !== undefined || body.hostname !== undefined) {
210
- appDef.hostnames = hostnamesFromBody(body);
211
- }
212
- const shellServiceId = stringValue(body.shellServiceId);
213
- if (shellServiceId) {
214
- if (isThemeShellServiceForTenant(config, appDef.tenantId, shellServiceId)) {
215
- appDef.shell = { serviceId: shellServiceId };
216
- }
217
- }
218
- else {
219
- delete appDef.shell;
220
- }
221
- const authServiceId = stringValue(body.authServiceId);
222
- if (authServiceId) {
223
- if (isAuthServiceForTenant(config, appDef.tenantId, authServiceId)) {
224
- const existingRoles = appDef.auth?.roles ?? [];
225
- appDef.auth = {
226
- ...buildAppAuthConfig(config, appDef.tenantId, authServiceId, appDef.auth),
227
- roles: existingRoles
228
- };
229
- ensureAuthRouteMounts(config, appDef);
230
- }
231
- }
232
- else {
233
- delete appDef.auth;
234
- }
235
- await routeContext.storage.saveConfig(config);
236
- }
237
- async function deleteApp(id) {
238
- if (!id)
239
- return;
240
- const routeContext = getConfigManagerRouteContext();
241
- const config = await routeContext.storage.loadConfig();
242
- config.apps = config.apps.filter((app) => app.id !== id);
243
- await routeContext.storage.saveConfig(config);
244
- }
245
- function themeShellServicesForTenant(config, tenantId) {
246
- const tenant = config.tenants.find((candidate) => candidate.id === tenantId);
247
- const tenantServices = (tenant?.services ?? [])
248
- .filter((service) => service.enabled && service.capabilities?.includes("theme"))
249
- .map((service) => ({
250
- id: service.id,
251
- tenantId,
252
- title: service.title ?? service.serviceId ?? service.hostname,
253
- serviceId: service.serviceId
254
- }));
255
- const sharedServices = config.sharedServiceActivations
256
- .filter((activation) => activation.enabled && activation.tenantId === tenantId)
257
- .map((activation) => {
258
- const shared = config.sharedServiceCatalog.find((service) => service.enabled
259
- && service.id === activation.sharedServiceId
260
- && service.tags.includes("theme"));
261
- if (!shared)
262
- return undefined;
263
- return {
264
- id: activation.id,
265
- tenantId,
266
- title: shared.title,
267
- serviceId: shared.serviceId ?? shared.id
268
- };
269
- })
270
- .filter((service) => !!service);
271
- return [...tenantServices, ...sharedServices];
272
- }
273
- function isThemeShellServiceForTenant(config, tenantId, shellServiceId) {
274
- return themeShellServicesForTenant(config, tenantId).some((service) => service.id === shellServiceId);
275
- }
276
- function authServicesForTenant(config, tenantId) {
277
- const tenant = config.tenants.find((candidate) => candidate.id === tenantId);
278
- const tenantServices = (tenant?.services ?? [])
279
- .filter((service) => service.enabled && service.capabilities?.includes("auth"))
280
- .map((service) => ({
281
- id: service.id,
282
- tenantId,
283
- title: service.title ?? service.serviceId ?? service.hostname,
284
- serviceId: service.serviceId,
285
- hostname: service.hostname
286
- }));
287
- const sharedServices = config.sharedServiceActivations
288
- .filter((activation) => activation.enabled && activation.tenantId === tenantId)
289
- .map((activation) => {
290
- const shared = config.sharedServiceCatalog.find((service) => service.enabled
291
- && service.id === activation.sharedServiceId
292
- && service.tags.includes("auth"));
293
- if (!shared)
294
- return undefined;
295
- return {
296
- id: activation.id,
297
- tenantId,
298
- title: shared.title,
299
- serviceId: shared.serviceId ?? shared.id,
300
- hostname: shared.baseUrl
301
- };
302
- })
303
- .filter((service) => !!service);
304
- return [...tenantServices, ...sharedServices];
305
- }
306
- function isAuthServiceForTenant(config, tenantId, authServiceId) {
307
- return authServicesForTenant(config, tenantId).some((service) => service.id === authServiceId);
308
- }
309
- function buildAppAuthConfig(config, tenantId, authServiceId, existing) {
310
- const authService = authServicesForTenant(config, tenantId).find((service) => service.id === authServiceId);
311
- const publicKeys = existing?.publicKeys ?? findKnownAuthPublicKeys(config, authServiceId);
312
- const providerKind = authService?.serviceId === "service.betterportal.auth.authress-io"
313
- ? "authress.io"
314
- : "betterportal.default";
315
- const expectedIssuer = providerKind === "authress.io" && existing?.expectedIssuer === "https://authress.io"
316
- ? undefined
317
- : existing?.expectedIssuer;
318
- const expectedAudience = providerKind === "authress.io" && existing?.expectedAudience === "authress"
319
- ? undefined
320
- : existing?.expectedAudience;
321
- return {
322
- serviceId: authServiceId,
323
- loginViewId: existing?.loginViewId ?? "/login",
324
- logoutViewId: existing?.logoutViewId ?? "/logout",
325
- refreshViewId: existing?.refreshViewId ?? "/refresh",
326
- provider: existing?.provider ?? (providerKind === "authress.io"
327
- ? { kind: "authress.io", roleClaimPath: "roles", subjectClaimPath: "sub" }
328
- : { kind: "betterportal.default" }),
329
- expectedIssuer: expectedIssuer ?? (providerKind === "authress.io" ? "https://authress.betterportal.local" : "https://auth.betterportal.local"),
330
- expectedAudience: expectedAudience ?? "betterportal-runtime",
331
- jwksUri: existing?.jwksUri ?? `${(authService?.hostname ?? "").replace(/\/+$/, "")}/.well-known/jwks.json`,
332
- ...(publicKeys ? { publicKeys } : {}),
333
- roles: existing?.roles ?? []
334
- };
335
- }
336
- function numberedPath(basePath, usedPaths) {
337
- const normalized = basePath.startsWith("/") ? basePath : `/${basePath}`;
338
- if (!usedPaths.has(normalized))
339
- return normalized;
340
- let i = 2;
341
- while (usedPaths.has(`${normalized}-${i}`))
342
- i += 1;
343
- return `${normalized}-${i}`;
344
- }
345
- function ensureAuthRouteMounts(config, appDef) {
346
- const authServiceId = appDef.auth?.serviceId;
347
- if (!authServiceId)
348
- return;
349
- const manifest = getManifestCache().get(authServiceId);
350
- if (!manifest)
351
- return;
352
- const desiredViewIds = ["login.index", "logout.index", "refresh.index", "register.index"];
353
- const usedPaths = new Set(appDef.routes.map((route) => route.path));
354
- for (const viewId of desiredViewIds) {
355
- const view = manifest.viewIndex[viewId];
356
- if (!view)
357
- continue;
358
- if (appDef.routes.some((route) => route.serviceId === authServiceId && route.viewId === viewId))
359
- continue;
360
- const path = numberedPath(view.path, usedPaths);
361
- const methods = view.methods.filter((method) => method === "GET" || method === "POST" || method === "PUT" || method === "PATCH" || method === "DELETE" || method === "OPTIONS");
362
- usedPaths.add(path);
363
- appDef.routes.push({
364
- id: uuidv7(),
365
- path,
366
- serviceId: authServiceId,
367
- viewId,
368
- targetPath: view.path,
369
- title: viewId.replace(".index", "").replace(/^\w/, (char) => char.toUpperCase()),
370
- enabled: true,
371
- methods: methods.length ? methods : ["GET"]
372
- });
373
- }
374
- }
375
- function findKnownAuthPublicKeys(config, authServiceId) {
376
- const activation = config.sharedServiceActivations.find((candidate) => candidate.id === authServiceId);
377
- const sharedServiceId = activation?.sharedServiceId;
378
- for (const app of config.apps) {
379
- const auth = app.auth;
380
- if (!auth?.publicKeys)
381
- continue;
382
- if (auth.serviceId === authServiceId)
383
- return auth.publicKeys;
384
- if (sharedServiceId) {
385
- const appActivation = config.sharedServiceActivations.find((candidate) => candidate.id === auth.serviceId);
386
- if (appActivation?.sharedServiceId === sharedServiceId)
387
- return auth.publicKeys;
388
- }
389
- }
390
- return undefined;
391
- }
392
- function hostnamesFromBody(body) {
393
- if (Array.isArray(body.hostnames)) {
394
- return body.hostnames.filter((value) => typeof value === "string" && value.length > 0);
395
- }
396
- const raw = stringValue(body.hostnames) || stringValue(body.hostname);
397
- return raw.split(",").map((hostname) => hostname.trim()).filter(Boolean);
398
- }
399
- function stringValue(value) {
400
- return typeof value === "string" ? value.trim() : "";
401
- }
402
- function boolValue(value) {
403
- return value === true || value === "true" || value === "on";
404
- }
1
+ export { title, description, auth, cacheHints, demoScenarios } from "./route.impl.js";
405
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/tenants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,aAAa,EACb,MAAM,EAKP,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,gBAAgB,GAAG,EAAE,CAAC,MAAM,CAAC;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ACjF,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,iBAAiB,CAAC,IAA6B;IACtD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1G,CAAC;IACD,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtE,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,IAAI,CAAC;AAC9D,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/tenants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,180 @@
1
+ import * as av from "anyvali";
2
+ import type { Infer } from "anyvali";
3
+ import { type DemoScenario, type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
4
+ export declare const ResponseSchema: av.ObjectSchema<{
5
+ title: av.StringSchema;
6
+ tenants: av.ArraySchema<av.ObjectSchema<{
7
+ id: av.StringSchema;
8
+ slug: av.StringSchema;
9
+ title: av.StringSchema;
10
+ active: av.BoolSchema;
11
+ serviceCount: av.IntSchema;
12
+ }>>;
13
+ apps: av.ArraySchema<av.ObjectSchema<{
14
+ id: av.StringSchema;
15
+ tenantId: av.StringSchema;
16
+ slug: av.StringSchema;
17
+ title: av.StringSchema;
18
+ hostnames: av.ArraySchema<av.StringSchema>;
19
+ shellServiceId: av.OptionalSchema<av.StringSchema>;
20
+ authServiceId: av.OptionalSchema<av.StringSchema>;
21
+ routeCount: av.IntSchema;
22
+ }>>;
23
+ shellServices: av.ArraySchema<av.ObjectSchema<{
24
+ id: av.StringSchema;
25
+ tenantId: av.StringSchema;
26
+ title: av.StringSchema;
27
+ serviceId: av.OptionalSchema<av.StringSchema>;
28
+ }>>;
29
+ authServices: av.ArraySchema<av.ObjectSchema<{
30
+ id: av.StringSchema;
31
+ tenantId: av.StringSchema;
32
+ title: av.StringSchema;
33
+ serviceId: av.OptionalSchema<av.StringSchema>;
34
+ }>>;
35
+ adminApiBase: av.StringSchema;
36
+ serviceBaseUrl: av.OptionalSchema<av.StringSchema>;
37
+ }>;
38
+ export type ResponseData = Infer<typeof ResponseSchema>;
39
+ export declare const title = "Tenants & Apps";
40
+ export declare const description = "Manage tenants and applications.";
41
+ export declare const auth: ApiAuthRequirement;
42
+ export declare const cacheHints: CacheHints;
43
+ export declare const demoScenarios: DemoScenario<ResponseData>[];
44
+ export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, Record<string, unknown>, {
45
+ title: string;
46
+ tenants: {
47
+ id: string;
48
+ slug: string;
49
+ title: string;
50
+ active: boolean;
51
+ serviceCount: number;
52
+ }[];
53
+ apps: {
54
+ id: string;
55
+ tenantId: string;
56
+ slug: string;
57
+ title: string;
58
+ hostnames: string[];
59
+ routeCount: number;
60
+ shellServiceId?: string | undefined;
61
+ authServiceId?: string | undefined;
62
+ }[];
63
+ shellServices: {
64
+ id: string;
65
+ tenantId: string;
66
+ title: string;
67
+ serviceId?: string | undefined;
68
+ }[];
69
+ authServices: {
70
+ id: string;
71
+ tenantId: string;
72
+ title: string;
73
+ serviceId?: string | undefined;
74
+ }[];
75
+ adminApiBase: string;
76
+ serviceBaseUrl?: string | undefined;
77
+ }, unknown, Record<string, unknown>>;
78
+ export declare const handlePost: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, Record<string, unknown>, {
79
+ title: string;
80
+ tenants: {
81
+ id: string;
82
+ slug: string;
83
+ title: string;
84
+ active: boolean;
85
+ serviceCount: number;
86
+ }[];
87
+ apps: {
88
+ id: string;
89
+ tenantId: string;
90
+ slug: string;
91
+ title: string;
92
+ hostnames: string[];
93
+ routeCount: number;
94
+ shellServiceId?: string | undefined;
95
+ authServiceId?: string | undefined;
96
+ }[];
97
+ shellServices: {
98
+ id: string;
99
+ tenantId: string;
100
+ title: string;
101
+ serviceId?: string | undefined;
102
+ }[];
103
+ authServices: {
104
+ id: string;
105
+ tenantId: string;
106
+ title: string;
107
+ serviceId?: string | undefined;
108
+ }[];
109
+ adminApiBase: string;
110
+ serviceBaseUrl?: string | undefined;
111
+ }, unknown, Record<string, unknown>>;
112
+ export declare const handlePut: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, Record<string, unknown>, {
113
+ title: string;
114
+ tenants: {
115
+ id: string;
116
+ slug: string;
117
+ title: string;
118
+ active: boolean;
119
+ serviceCount: number;
120
+ }[];
121
+ apps: {
122
+ id: string;
123
+ tenantId: string;
124
+ slug: string;
125
+ title: string;
126
+ hostnames: string[];
127
+ routeCount: number;
128
+ shellServiceId?: string | undefined;
129
+ authServiceId?: string | undefined;
130
+ }[];
131
+ shellServices: {
132
+ id: string;
133
+ tenantId: string;
134
+ title: string;
135
+ serviceId?: string | undefined;
136
+ }[];
137
+ authServices: {
138
+ id: string;
139
+ tenantId: string;
140
+ title: string;
141
+ serviceId?: string | undefined;
142
+ }[];
143
+ adminApiBase: string;
144
+ serviceBaseUrl?: string | undefined;
145
+ }, unknown, Record<string, unknown>>;
146
+ export declare const handleDelete: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, Record<string, unknown>, {
147
+ title: string;
148
+ tenants: {
149
+ id: string;
150
+ slug: string;
151
+ title: string;
152
+ active: boolean;
153
+ serviceCount: number;
154
+ }[];
155
+ apps: {
156
+ id: string;
157
+ tenantId: string;
158
+ slug: string;
159
+ title: string;
160
+ hostnames: string[];
161
+ routeCount: number;
162
+ shellServiceId?: string | undefined;
163
+ authServiceId?: string | undefined;
164
+ }[];
165
+ shellServices: {
166
+ id: string;
167
+ tenantId: string;
168
+ title: string;
169
+ serviceId?: string | undefined;
170
+ }[];
171
+ authServices: {
172
+ id: string;
173
+ tenantId: string;
174
+ title: string;
175
+ serviceId?: string | undefined;
176
+ }[];
177
+ adminApiBase: string;
178
+ serviceBaseUrl?: string | undefined;
179
+ }, unknown, Record<string, unknown>>;
180
+ //# sourceMappingURL=route.impl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.impl.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAEvB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AA+BjC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQC,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,mBAAmB,CAAC;AACtC,eAAO,MAAM,WAAW,qCAAqC,CAAC;AAE9D,eAAO,MAAM,IAAI,EAAE,kBAKlB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAA4D,CAAC;AAEtF,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,YAAY,CAAC,EAErD,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAGrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAWtB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAWrB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAYxB,CAAC"}