@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.
- package/lib/.bsb/clients/service-betterportal-config-manager.d.ts +1 -1
- package/lib/.bsb/clients/service-betterportal-config-manager.js +1 -1
- package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.js +96 -45
- package/lib/plugins/service-betterportal-config-manager/.bp-generated/registry.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/adminApi.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/adminApi.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/adminApi.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.d.ts +1 -95
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.js +1 -77
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.d.ts +96 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.js +78 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/{routes/_theme.bootstrap1/index.d.ts → config/_theme.embedded/GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/{_theme.embedded.js → _theme.embedded/GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.d.ts +1 -42
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.js +1 -67
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.d.ts +43 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.js +68 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/{services/_theme.bootstrap1/index.d.ts → fragments/_theme.bootstrap1/GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.d.ts +1 -31
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.js +1 -31
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.d.ts +32 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.js +32 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.d.ts +1 -59
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.js +1 -47
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.d.ts +60 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.js +48 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/{index.d.ts → GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.d.ts +1 -47
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.js +1 -39
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.d.ts +48 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.js +40 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/{settings/_theme.bootstrap1/index.d.ts → routes/_theme.bootstrap1/GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.d.ts +1 -79
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.js +1 -58
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.d.ts +80 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.js +59 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/{fragments/_theme.bootstrap1/index.d.ts → services/_theme.bootstrap1/GET.d.ts} +2 -2
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.d.ts +1 -127
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.js +1 -88
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.d.ts +128 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.js +89 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/GET.d.ts +5 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.d.ts +1 -88
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.js +1 -92
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.d.ts +89 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.js +93 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/DELETE.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/POST.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.d.ts +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/PUT.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/GET.d.ts +4 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/GET.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/{index.js → GET.js} +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/GET.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.d.ts +1 -179
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.js +1 -404
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/index.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.d.ts +180 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.js +405 -0
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/route.impl.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/storage/core.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/storage/core.js +52 -0
- package/lib/plugins/service-betterportal-config-manager/storage/core.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/syncApi.d.ts +4 -0
- package/lib/plugins/service-betterportal-config-manager/syncApi.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/syncApi.js +3 -0
- package/lib/plugins/service-betterportal-config-manager/syncApi.js.map +1 -1
- package/lib/schemas/service-betterportal-config-manager.json +1 -1
- package/lib/schemas/service-betterportal-config-manager.plugin.json +1 -1
- package/package.json +3 -3
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/auth/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded.d.ts +0 -5
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/fragments/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/menu/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/preview/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/routes/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/services/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/settings/_theme.bootstrap1/index.js.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/index.d.ts +0 -4
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/index.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-config-manager/bp-routes/tenants/_theme.bootstrap1/index.js.map +0 -1
|
@@ -1,78 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { createHandler } from "@betterportal/framework";
|
|
3
|
-
const PermissionActionSchema = av.enum_(["read", "create", "update", "delete"]);
|
|
4
|
-
const ViewWithPermsSchema = av.object({
|
|
5
|
-
viewId: av.string().minLength(1),
|
|
6
|
-
path: av.string().minLength(1),
|
|
7
|
-
methods: av.array(av.string()).default([]),
|
|
8
|
-
role: av.optional(av.string()),
|
|
9
|
-
requiredPermissions: av.array(av.object({
|
|
10
|
-
serviceId: av.string().minLength(1),
|
|
11
|
-
viewId: av.string().minLength(1),
|
|
12
|
-
permissions: av.array(av.string())
|
|
13
|
-
}, { unknownKeys: "strip" })).default([])
|
|
14
|
-
}, { unknownKeys: "strip" });
|
|
15
|
-
const ServiceWithViewsSchema = av.object({
|
|
16
|
-
serviceId: av.string().minLength(1),
|
|
17
|
-
title: av.string().minLength(1),
|
|
18
|
-
hostname: av.string(),
|
|
19
|
-
manifestVersion: av.optional(av.string()),
|
|
20
|
-
views: av.array(ViewWithPermsSchema).default([])
|
|
21
|
-
}, { unknownKeys: "strip" });
|
|
22
|
-
const RolePermissionGrantSchema = av.object({
|
|
23
|
-
serviceId: av.string().minLength(1),
|
|
24
|
-
viewId: av.string().minLength(1),
|
|
25
|
-
permissions: av.array(PermissionActionSchema).minItems(1)
|
|
26
|
-
}, { unknownKeys: "strip" });
|
|
27
|
-
const AppRoleSchema = av.object({
|
|
28
|
-
id: av.string().minLength(1),
|
|
29
|
-
title: av.string().minLength(1),
|
|
30
|
-
description: av.optional(av.string()),
|
|
31
|
-
permissions: av.array(RolePermissionGrantSchema).default([])
|
|
32
|
-
}, { unknownKeys: "strip" });
|
|
33
|
-
const AppSummarySchema = av.object({
|
|
34
|
-
id: av.string().minLength(1),
|
|
35
|
-
tenantId: av.string().minLength(1),
|
|
36
|
-
title: av.string().minLength(1)
|
|
37
|
-
}, { unknownKeys: "strip" });
|
|
38
|
-
export const QuerySchema = av.object({
|
|
39
|
-
appId: av.optional(av.string().minLength(1))
|
|
40
|
-
}, { unknownKeys: "strip" });
|
|
41
|
-
export const HeadersSchema = av.object({}, { unknownKeys: "strip" });
|
|
42
|
-
export const RequestSchema = av.object({}, { unknownKeys: "strip" });
|
|
43
|
-
export const ResponseSchema = av.object({
|
|
44
|
-
title: av.string().minLength(1),
|
|
45
|
-
apps: av.array(AppSummarySchema).default([]),
|
|
46
|
-
selectedAppId: av.optional(av.string()),
|
|
47
|
-
selectedTenantId: av.optional(av.string()),
|
|
48
|
-
authConfigured: av.bool().default(false),
|
|
49
|
-
servicePermissions: av.array(ServiceWithViewsSchema).default([]),
|
|
50
|
-
currentRoles: av.array(AppRoleSchema).default([]),
|
|
51
|
-
adminApiBase: av.string().default("/.well-known/bp/admin"),
|
|
52
|
-
serviceBaseUrl: av.optional(av.string())
|
|
53
|
-
}, { unknownKeys: "strip" });
|
|
54
|
-
export const title = "Permission Manager";
|
|
55
|
-
export const description = "Define role -> permission grants per app. Services advertise per-view permission requirements via their manifest.";
|
|
56
|
-
export const auth = {
|
|
57
|
-
required: true,
|
|
58
|
-
permissions: [
|
|
59
|
-
{ serviceId: "service.betterportal.config-manager", viewId: "auth.index", permissions: ["read", "create", "update", "delete"] }
|
|
60
|
-
]
|
|
61
|
-
};
|
|
62
|
-
export const cacheHints = {
|
|
63
|
-
ttlSeconds: 0,
|
|
64
|
-
varyBy: ["accept", "origin"]
|
|
65
|
-
};
|
|
66
|
-
export const handleGet = createHandler({ response: ResponseSchema, query: QuerySchema }, (ctx) => {
|
|
67
|
-
if (ctx.responseModel)
|
|
68
|
-
return ctx.responseModel;
|
|
69
|
-
return {
|
|
70
|
-
title: "Permission Manager",
|
|
71
|
-
apps: [],
|
|
72
|
-
authConfigured: false,
|
|
73
|
-
servicePermissions: [],
|
|
74
|
-
currentRoles: [],
|
|
75
|
-
adminApiBase: "/.well-known/bp/admin"
|
|
76
|
-
};
|
|
77
|
-
});
|
|
1
|
+
export { title, description, auth, cacheHints } from "./route.impl.js";
|
|
78
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import type { Infer } from "anyvali";
|
|
3
|
+
import { type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
|
|
4
|
+
export declare const QuerySchema: av.ObjectSchema<{
|
|
5
|
+
appId: av.OptionalSchema<av.StringSchema>;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const HeadersSchema: av.ObjectSchema<{}>;
|
|
8
|
+
export declare const RequestSchema: av.ObjectSchema<{}>;
|
|
9
|
+
export declare const ResponseSchema: av.ObjectSchema<{
|
|
10
|
+
title: av.StringSchema;
|
|
11
|
+
apps: av.ArraySchema<av.ObjectSchema<{
|
|
12
|
+
id: av.StringSchema;
|
|
13
|
+
tenantId: av.StringSchema;
|
|
14
|
+
title: av.StringSchema;
|
|
15
|
+
}>>;
|
|
16
|
+
selectedAppId: av.OptionalSchema<av.StringSchema>;
|
|
17
|
+
selectedTenantId: av.OptionalSchema<av.StringSchema>;
|
|
18
|
+
authConfigured: av.BoolSchema;
|
|
19
|
+
servicePermissions: av.ArraySchema<av.ObjectSchema<{
|
|
20
|
+
serviceId: av.StringSchema;
|
|
21
|
+
title: av.StringSchema;
|
|
22
|
+
hostname: av.StringSchema;
|
|
23
|
+
manifestVersion: av.OptionalSchema<av.StringSchema>;
|
|
24
|
+
views: av.ArraySchema<av.ObjectSchema<{
|
|
25
|
+
viewId: av.StringSchema;
|
|
26
|
+
path: av.StringSchema;
|
|
27
|
+
methods: av.ArraySchema<av.StringSchema>;
|
|
28
|
+
role: av.OptionalSchema<av.StringSchema>;
|
|
29
|
+
requiredPermissions: av.ArraySchema<av.ObjectSchema<{
|
|
30
|
+
serviceId: av.StringSchema;
|
|
31
|
+
viewId: av.StringSchema;
|
|
32
|
+
permissions: av.ArraySchema<av.StringSchema>;
|
|
33
|
+
}>>;
|
|
34
|
+
}>>;
|
|
35
|
+
}>>;
|
|
36
|
+
currentRoles: av.ArraySchema<av.ObjectSchema<{
|
|
37
|
+
id: av.StringSchema;
|
|
38
|
+
title: av.StringSchema;
|
|
39
|
+
description: av.OptionalSchema<av.StringSchema>;
|
|
40
|
+
permissions: av.ArraySchema<av.ObjectSchema<{
|
|
41
|
+
serviceId: av.StringSchema;
|
|
42
|
+
viewId: av.StringSchema;
|
|
43
|
+
permissions: av.ArraySchema<av.EnumSchema<readonly ["read", "create", "update", "delete"]>>;
|
|
44
|
+
}>>;
|
|
45
|
+
}>>;
|
|
46
|
+
adminApiBase: av.StringSchema;
|
|
47
|
+
serviceBaseUrl: av.OptionalSchema<av.StringSchema>;
|
|
48
|
+
}>;
|
|
49
|
+
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
50
|
+
export declare const title = "Permission Manager";
|
|
51
|
+
export declare const description = "Define role -> permission grants per app. Services advertise per-view permission requirements via their manifest.";
|
|
52
|
+
export declare const auth: ApiAuthRequirement;
|
|
53
|
+
export declare const cacheHints: CacheHints;
|
|
54
|
+
export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
55
|
+
appId?: string | undefined;
|
|
56
|
+
}, Record<string, string>, Record<string, unknown>, {
|
|
57
|
+
title: string;
|
|
58
|
+
apps: {
|
|
59
|
+
id: string;
|
|
60
|
+
tenantId: string;
|
|
61
|
+
title: string;
|
|
62
|
+
}[];
|
|
63
|
+
authConfigured: boolean;
|
|
64
|
+
servicePermissions: {
|
|
65
|
+
serviceId: string;
|
|
66
|
+
title: string;
|
|
67
|
+
hostname: string;
|
|
68
|
+
views: {
|
|
69
|
+
viewId: string;
|
|
70
|
+
path: string;
|
|
71
|
+
methods: string[];
|
|
72
|
+
requiredPermissions: {
|
|
73
|
+
serviceId: string;
|
|
74
|
+
viewId: string;
|
|
75
|
+
permissions: string[];
|
|
76
|
+
}[];
|
|
77
|
+
role?: string | undefined;
|
|
78
|
+
}[];
|
|
79
|
+
manifestVersion?: string | undefined;
|
|
80
|
+
}[];
|
|
81
|
+
currentRoles: {
|
|
82
|
+
id: string;
|
|
83
|
+
title: string;
|
|
84
|
+
permissions: {
|
|
85
|
+
serviceId: string;
|
|
86
|
+
viewId: string;
|
|
87
|
+
permissions: ("read" | "create" | "update" | "delete")[];
|
|
88
|
+
}[];
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
}[];
|
|
91
|
+
adminApiBase: string;
|
|
92
|
+
selectedAppId?: string | undefined;
|
|
93
|
+
selectedTenantId?: string | undefined;
|
|
94
|
+
serviceBaseUrl?: string | undefined;
|
|
95
|
+
}, unknown, Record<string, unknown>>;
|
|
96
|
+
//# 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/auth/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AA2CjC,eAAO,MAAM,WAAW;;EAEI,CAAC;AAE7B,eAAO,MAAM,aAAa,qBAA0C,CAAC;AAErE,eAAO,MAAM,aAAa,qBAA0C,CAAC;AAErE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUC,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,uBAAuB,CAAC;AAC1C,eAAO,MAAM,WAAW,sHAAsH,CAAC;AAE/I,eAAO,MAAM,IAAI,EAAE,kBAKlB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAGxB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAarB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import { createHandler } from "@betterportal/framework";
|
|
3
|
+
const PermissionActionSchema = av.enum_(["read", "create", "update", "delete"]);
|
|
4
|
+
const ViewWithPermsSchema = av.object({
|
|
5
|
+
viewId: av.string().minLength(1),
|
|
6
|
+
path: av.string().minLength(1),
|
|
7
|
+
methods: av.array(av.string()).default([]),
|
|
8
|
+
role: av.optional(av.string()),
|
|
9
|
+
requiredPermissions: av.array(av.object({
|
|
10
|
+
serviceId: av.string().minLength(1),
|
|
11
|
+
viewId: av.string().minLength(1),
|
|
12
|
+
permissions: av.array(av.string())
|
|
13
|
+
}, { unknownKeys: "strip" })).default([])
|
|
14
|
+
}, { unknownKeys: "strip" });
|
|
15
|
+
const ServiceWithViewsSchema = av.object({
|
|
16
|
+
serviceId: av.string().minLength(1),
|
|
17
|
+
title: av.string().minLength(1),
|
|
18
|
+
hostname: av.string(),
|
|
19
|
+
manifestVersion: av.optional(av.string()),
|
|
20
|
+
views: av.array(ViewWithPermsSchema).default([])
|
|
21
|
+
}, { unknownKeys: "strip" });
|
|
22
|
+
const RolePermissionGrantSchema = av.object({
|
|
23
|
+
serviceId: av.string().minLength(1),
|
|
24
|
+
viewId: av.string().minLength(1),
|
|
25
|
+
permissions: av.array(PermissionActionSchema).minItems(1)
|
|
26
|
+
}, { unknownKeys: "strip" });
|
|
27
|
+
const AppRoleSchema = av.object({
|
|
28
|
+
id: av.string().minLength(1),
|
|
29
|
+
title: av.string().minLength(1),
|
|
30
|
+
description: av.optional(av.string()),
|
|
31
|
+
permissions: av.array(RolePermissionGrantSchema).default([])
|
|
32
|
+
}, { unknownKeys: "strip" });
|
|
33
|
+
const AppSummarySchema = av.object({
|
|
34
|
+
id: av.string().minLength(1),
|
|
35
|
+
tenantId: av.string().minLength(1),
|
|
36
|
+
title: av.string().minLength(1)
|
|
37
|
+
}, { unknownKeys: "strip" });
|
|
38
|
+
export const QuerySchema = av.object({
|
|
39
|
+
appId: av.optional(av.string().minLength(1))
|
|
40
|
+
}, { unknownKeys: "strip" });
|
|
41
|
+
export const HeadersSchema = av.object({}, { unknownKeys: "strip" });
|
|
42
|
+
export const RequestSchema = av.object({}, { unknownKeys: "strip" });
|
|
43
|
+
export const ResponseSchema = av.object({
|
|
44
|
+
title: av.string().minLength(1),
|
|
45
|
+
apps: av.array(AppSummarySchema).default([]),
|
|
46
|
+
selectedAppId: av.optional(av.string()),
|
|
47
|
+
selectedTenantId: av.optional(av.string()),
|
|
48
|
+
authConfigured: av.bool().default(false),
|
|
49
|
+
servicePermissions: av.array(ServiceWithViewsSchema).default([]),
|
|
50
|
+
currentRoles: av.array(AppRoleSchema).default([]),
|
|
51
|
+
adminApiBase: av.string().default("/.well-known/bp/admin"),
|
|
52
|
+
serviceBaseUrl: av.optional(av.string())
|
|
53
|
+
}, { unknownKeys: "strip" });
|
|
54
|
+
export const title = "Permission Manager";
|
|
55
|
+
export const description = "Define role -> permission grants per app. Services advertise per-view permission requirements via their manifest.";
|
|
56
|
+
export const auth = {
|
|
57
|
+
required: true,
|
|
58
|
+
permissions: [
|
|
59
|
+
{ serviceId: "service.betterportal.config-manager", viewId: "auth.index", permissions: ["read", "create", "update", "delete"] }
|
|
60
|
+
]
|
|
61
|
+
};
|
|
62
|
+
export const cacheHints = {
|
|
63
|
+
ttlSeconds: 0,
|
|
64
|
+
varyBy: ["accept", "origin"]
|
|
65
|
+
};
|
|
66
|
+
export const handleGet = createHandler({ response: ResponseSchema, query: QuerySchema }, (ctx) => {
|
|
67
|
+
if (ctx.responseModel)
|
|
68
|
+
return ctx.responseModel;
|
|
69
|
+
return {
|
|
70
|
+
title: "Permission Manager",
|
|
71
|
+
apps: [],
|
|
72
|
+
authConfigured: false,
|
|
73
|
+
servicePermissions: [],
|
|
74
|
+
currentRoles: [],
|
|
75
|
+
adminApiBase: "/.well-known/bp/admin"
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=route.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.impl.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/auth/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,aAAa,EAGd,MAAM,yBAAyB,CAAC;AAEjC,MAAM,sBAAsB,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC,CAAC;AAEzF,MAAM,mBAAmB,GAAG,EAAE,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAChC,IAAI,EA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E,YAAY,EAAE,WAAW,EAAE,CAAC,MAAM,EAAC,QAAQ,EAAC,QAAQ,EAAC,QAAQ,CAAC,EAAE;KAC7H;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CACpC,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,EAChD,CAAC,GAAG,EAAE,EAAE;IACN,IAAI,GAAG,CAAC,aAAa;QAAE,OAAO,GAAG,CAAC,aAA6B,CAAC;IAChE,OAAO;QACL,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,EAAE;QACR,cAAc,EAAE,KAAK;QACrB,kBAAkB,EAAE,EAAE;QACtB,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,uBAAuB;KACtC,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { HtmlRenderable } from "@betterportal/framework";
|
|
2
|
-
import type { ResponseData } from "../
|
|
2
|
+
import type { ResponseData } from "../route.impl.js";
|
|
3
3
|
export declare function render(data: ResponseData): HtmlRenderable;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=GET.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/GET.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA0DrD,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CA+DzD"}
|
|
@@ -59,4 +59,4 @@ function configManagerRuntimeSource(timeoutMs) {
|
|
|
59
59
|
export function render(data) {
|
|
60
60
|
return (_jsxs("div", { class: "container-fluid px-0", children: [_jsxs("div", { class: "d-flex flex-wrap justify-content-between align-items-start gap-3 mb-4", children: [_jsxs("div", { children: [_jsx("div", { class: "text-uppercase small text-secondary fw-semibold", children: "Admin Config" }), _jsx("h2", { class: "mb-2", children: data.title }), _jsxs("p", { class: "text-secondary mb-0", children: ["Tenant ", _jsx("strong", { children: data.tenantId }), ", app ", _jsx("strong", { children: data.appId })] })] }), _jsxs("div", { class: "d-flex gap-2 flex-wrap", children: [_jsxs("span", { class: "badge text-bg-primary", children: [data.services.length, " services"] }), _jsx("span", { class: "badge text-bg-dark", children: "Client-side discovery" })] })] }), _jsx("div", { class: "row g-3", children: data.services.map((service) => (_jsx("div", { class: "col-12 col-xl-6", children: _jsx("article", { class: "card border-0 shadow-sm h-100", "data-bp-config-card": "", "data-bp-health-url": service.healthUrl, "data-bp-schema-url": service.schemaUrl, children: _jsxs("div", { class: "card-body", children: [_jsxs("div", { class: "d-flex justify-content-between align-items-start gap-3 mb-3", children: [_jsxs("div", { children: [_jsx("div", { class: "text-uppercase small text-secondary fw-semibold", children: "Service" }), _jsx("h5", { class: "mb-1", children: service.serviceId }), _jsx("div", { class: "text-secondary small", children: service.endpointBaseUrl })] }), _jsx("span", { class: "badge text-bg-secondary", "data-bp-config-status": "", children: "pending" })] }), _jsxs("div", { class: "row g-2 mb-3", children: [_jsx("div", { class: "col-6", children: _jsxs("div", { class: "rounded-3 bg-body-tertiary p-3", children: [_jsx("div", { class: "small text-secondary", children: "Mode" }), _jsx("div", { class: "fw-semibold", "data-bp-config-mode": "", children: "Waiting..." })] }) }), _jsx("div", { class: "col-6", children: _jsxs("div", { class: "rounded-3 bg-body-tertiary p-3", children: [_jsx("div", { class: "small text-secondary", children: "Schemas" }), _jsx("div", { class: "fw-semibold", "data-bp-config-schema-count": "", children: "..." })] }) })] }), _jsxs("div", { class: "small text-secondary mb-2", children: ["Binding: ", service.bindingId] }), _jsxs("div", { class: "small text-secondary mb-3", children: ["Deployment: ", service.deploymentMode] }), _jsxs("div", { class: "d-flex gap-2 flex-wrap", children: [_jsx("a", { class: "btn btn-sm btn-primary", href: service.schemaUrl, target: "_blank", rel: "noreferrer", children: "Schema" }), _jsx("a", { class: "btn btn-sm btn-outline-secondary", href: service.manifestUrl, target: "_blank", rel: "noreferrer", children: "Manifest" }), _jsx("span", { class: "badge text-bg-secondary", "data-bp-config-write": "", children: "unknown" })] })] }) }) }))) }), _jsx("script", { children: configManagerRuntimeSource(data.requestTimeoutMs) })] }));
|
|
61
61
|
}
|
|
62
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=GET.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/_theme.bootstrap1/GET.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAI9B,SAAS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,EAAC,OAAO,YAChB,eAAK,KAAK,EAAC,gCAAgC,aACzC,cAAK,KAAK,EAAC,sBAAsB,qBAAW,EAC5C,cAAK,KAAK,EAAC,aAAa,yBAAqB,EAAE,2BAAiB,IAC5D,GACF,EACN,cAAK,KAAK,EAAC,OAAO,YAChB,eAAK,KAAK,EAAC,gCAAgC,aACzC,cAAK,KAAK,EAAC,sBAAsB,wBAAc,EAC/C,cAAK,KAAK,EAAC,aAAa,iCAA6B,EAAE,oBAAU,IAC7D,GACF,IACF,EACN,eAAK,KAAK,EAAC,2BAA2B,0BAAW,OAAO,CAAC,SAAS,IAAO,EACzE,eAAK,KAAK,EAAC,2BAA2B,6BAAc,OAAO,CAAC,cAAc,IAAO,EACjF,eAAK,KAAK,EAAC,wBAAwB,aACjC,YAAG,KAAK,EAAC,wBAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,uBAAW,EACtG,YAAG,KAAK,EAAC,kCAAkC,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,yBAAa,EACpH,eAAM,KAAK,EAAC,yBAAyB,0BAAsB,EAAE,wBAAe,IACxE,IACF,GACE,GACN,CACP,CAAC,GACE,EACN,2BAAS,0BAA0B,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAU,IAChE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource jsx-htmx */
|
|
2
2
|
import type { HtmlRenderable } from "@betterportal/framework";
|
|
3
|
-
import type { ResponseData } from "../
|
|
3
|
+
import type { ResponseData } from "../route.impl.js";
|
|
4
4
|
export declare function render(data: ResponseData): HtmlRenderable;
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=GET.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded/GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAezD"}
|
|
@@ -2,4 +2,4 @@ import { jsx as _jsx, jsxs as _jsxs } from "jsx-htmx/jsx-runtime";
|
|
|
2
2
|
export function render(data) {
|
|
3
3
|
return (_jsxs("div", { class: "p-3", "data-bp-config-root": "", "data-bp-request-timeout": String(data.requestTimeoutMs), children: [_jsx("div", { class: "fw-semibold mb-2", children: data.title }), _jsxs("div", { class: "text-secondary small mb-3", children: [data.services.length, " services discovered"] }), _jsx("div", { class: "list-group", children: data.services.map((service) => (_jsxs("div", { class: "list-group-item", children: [_jsx("div", { class: "fw-semibold", children: service.serviceId }), _jsx("div", { class: "small text-secondary", children: service.endpointBaseUrl })] }))) })] }));
|
|
4
4
|
}
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=GET.js.map
|
package/lib/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded/GET.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/_theme.embedded/GET.tsx"],"names":[],"mappings":";AAIA,MAAM,UAAU,MAAM,CAAC,IAAkB;IACvC,OAAO,CACL,eAAK,KAAK,EAAC,KAAK,yBAAqB,EAAE,6BAA0B,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,aAC5F,cAAK,KAAK,EAAC,kBAAkB,YAAE,IAAI,CAAC,KAAK,GAAO,EAChD,eAAK,KAAK,EAAC,2BAA2B,aAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,4BAA2B,EACvF,cAAK,KAAK,EAAC,YAAY,YACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAC9B,eAAK,KAAK,EAAC,iBAAiB,aAC1B,cAAK,KAAK,EAAC,aAAa,YAAE,OAAO,CAAC,SAAS,GAAO,EAClD,cAAK,KAAK,EAAC,sBAAsB,YAAE,OAAO,CAAC,eAAe,GAAO,IAC7D,CACP,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Infer } from "anyvali";
|
|
3
|
-
import { type DemoScenario, type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
|
|
4
|
-
export declare const QuerySchema: av.ObjectSchema<{}>;
|
|
5
|
-
export declare const HeadersSchema: av.ObjectSchema<{}>;
|
|
6
|
-
export declare const RequestSchema: av.ObjectSchema<{}>;
|
|
7
|
-
export declare const ResponseSchema: av.ObjectSchema<{
|
|
8
|
-
title: av.StringSchema;
|
|
9
|
-
tenantId: av.StringSchema;
|
|
10
|
-
appId: av.StringSchema;
|
|
11
|
-
requestTimeoutMs: av.IntSchema;
|
|
12
|
-
services: av.ArraySchema<av.ObjectSchema<{
|
|
13
|
-
serviceId: av.StringSchema;
|
|
14
|
-
bindingId: av.StringSchema;
|
|
15
|
-
endpointBaseUrl: av.StringSchema;
|
|
16
|
-
deploymentMode: av.StringSchema;
|
|
17
|
-
healthUrl: av.StringSchema;
|
|
18
|
-
schemaUrl: av.StringSchema;
|
|
19
|
-
manifestUrl: av.StringSchema;
|
|
20
|
-
}>>;
|
|
21
|
-
}>;
|
|
22
|
-
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
23
|
-
export declare const title = "Config Manager";
|
|
24
|
-
export declare const description = "Admin service that discovers BetterPortal service config surfaces.";
|
|
25
|
-
export declare const auth: ApiAuthRequirement;
|
|
26
|
-
export declare const cacheHints: CacheHints;
|
|
27
|
-
export declare const demoScenarios: DemoScenario<ResponseData>[];
|
|
28
|
-
export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, Record<string, unknown>, {
|
|
29
|
-
title: string;
|
|
30
|
-
tenantId: string;
|
|
31
|
-
appId: string;
|
|
32
|
-
requestTimeoutMs: number;
|
|
33
|
-
services: {
|
|
34
|
-
serviceId: string;
|
|
35
|
-
bindingId: string;
|
|
36
|
-
endpointBaseUrl: string;
|
|
37
|
-
deploymentMode: string;
|
|
38
|
-
healthUrl: string;
|
|
39
|
-
schemaUrl: string;
|
|
40
|
-
manifestUrl: string;
|
|
41
|
-
}[];
|
|
42
|
-
}, unknown, Record<string, unknown>>;
|
|
1
|
+
export { title, description, auth, cacheHints, demoScenarios } from "./route.impl.js";
|
|
43
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,68 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { createHandler } from "@betterportal/framework";
|
|
3
|
-
// -- Schemas ---------------------------------------------------------
|
|
4
|
-
export const QuerySchema = av.object({}, { unknownKeys: "strip" });
|
|
5
|
-
export const HeadersSchema = av.object({}, { unknownKeys: "strip" });
|
|
6
|
-
export const RequestSchema = av.object({}, { unknownKeys: "strip" });
|
|
7
|
-
const ConfigManagerServiceSchema = av.object({
|
|
8
|
-
serviceId: av.string().minLength(1),
|
|
9
|
-
bindingId: av.string().minLength(1),
|
|
10
|
-
endpointBaseUrl: av.string().format("url"),
|
|
11
|
-
deploymentMode: av.string().minLength(1),
|
|
12
|
-
healthUrl: av.string().format("url"),
|
|
13
|
-
schemaUrl: av.string().format("url"),
|
|
14
|
-
manifestUrl: av.string().format("url")
|
|
15
|
-
}, { unknownKeys: "strip" });
|
|
16
|
-
export const ResponseSchema = av.object({
|
|
17
|
-
title: av.string().minLength(1),
|
|
18
|
-
tenantId: av.string().minLength(1),
|
|
19
|
-
appId: av.string().minLength(1),
|
|
20
|
-
requestTimeoutMs: av.int().min(1),
|
|
21
|
-
services: av.array(ConfigManagerServiceSchema)
|
|
22
|
-
}, { unknownKeys: "strip" });
|
|
23
|
-
// -- Metadata --------------------------------------------------------
|
|
24
|
-
export const title = "Config Manager";
|
|
25
|
-
export const description = "Admin service that discovers BetterPortal service config surfaces.";
|
|
26
|
-
export const auth = {
|
|
27
|
-
required: true,
|
|
28
|
-
permissions: [
|
|
29
|
-
{ serviceId: "service.betterportal.config-manager", viewId: "config.index", permissions: ["read", "update"] }
|
|
30
|
-
]
|
|
31
|
-
};
|
|
32
|
-
export const cacheHints = {
|
|
33
|
-
ttlSeconds: 30,
|
|
34
|
-
varyBy: ["accept", "origin", "referer", ":origin", ":referer"]
|
|
35
|
-
};
|
|
36
|
-
export const demoScenarios = [
|
|
37
|
-
{
|
|
38
|
-
id: "default",
|
|
39
|
-
title: "Default Config Admin",
|
|
40
|
-
match: { query: {} },
|
|
41
|
-
response: {
|
|
42
|
-
title: "Config Manager",
|
|
43
|
-
tenantId: "tenant-main",
|
|
44
|
-
appId: "app-main",
|
|
45
|
-
requestTimeoutMs: 2000,
|
|
46
|
-
services: []
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
];
|
|
50
|
-
// -- Handler ---------------------------------------------------------
|
|
51
|
-
export const handleGet = createHandler({ response: ResponseSchema }, (ctx) => {
|
|
52
|
-
// The actual data is injected by the main plugin via the handler context.
|
|
53
|
-
// This handler is a passthrough - the plugin builds the response model
|
|
54
|
-
// from config/bindings and attaches it to the event before the H3 adapter
|
|
55
|
-
// calls this handler.
|
|
56
|
-
if (ctx.responseModel) {
|
|
57
|
-
return ctx.responseModel;
|
|
58
|
-
}
|
|
59
|
-
// Fallback: return empty state (should not happen in normal flow)
|
|
60
|
-
return {
|
|
61
|
-
title: "Config Manager",
|
|
62
|
-
tenantId: "unknown",
|
|
63
|
-
appId: "unknown",
|
|
64
|
-
requestTimeoutMs: 2000,
|
|
65
|
-
services: []
|
|
66
|
-
};
|
|
67
|
-
});
|
|
1
|
+
export { title, description, auth, cacheHints, demoScenarios } from "./route.impl.js";
|
|
68
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 QuerySchema: av.ObjectSchema<{}>;
|
|
5
|
+
export declare const HeadersSchema: av.ObjectSchema<{}>;
|
|
6
|
+
export declare const RequestSchema: av.ObjectSchema<{}>;
|
|
7
|
+
export declare const ResponseSchema: av.ObjectSchema<{
|
|
8
|
+
title: av.StringSchema;
|
|
9
|
+
tenantId: av.StringSchema;
|
|
10
|
+
appId: av.StringSchema;
|
|
11
|
+
requestTimeoutMs: av.IntSchema;
|
|
12
|
+
services: av.ArraySchema<av.ObjectSchema<{
|
|
13
|
+
serviceId: av.StringSchema;
|
|
14
|
+
bindingId: av.StringSchema;
|
|
15
|
+
endpointBaseUrl: av.StringSchema;
|
|
16
|
+
deploymentMode: av.StringSchema;
|
|
17
|
+
healthUrl: av.StringSchema;
|
|
18
|
+
schemaUrl: av.StringSchema;
|
|
19
|
+
manifestUrl: av.StringSchema;
|
|
20
|
+
}>>;
|
|
21
|
+
}>;
|
|
22
|
+
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
23
|
+
export declare const title = "Config Manager";
|
|
24
|
+
export declare const description = "Admin service that discovers BetterPortal service config surfaces.";
|
|
25
|
+
export declare const auth: ApiAuthRequirement;
|
|
26
|
+
export declare const cacheHints: CacheHints;
|
|
27
|
+
export declare const demoScenarios: DemoScenario<ResponseData>[];
|
|
28
|
+
export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, Record<string, unknown>, {
|
|
29
|
+
title: string;
|
|
30
|
+
tenantId: string;
|
|
31
|
+
appId: string;
|
|
32
|
+
requestTimeoutMs: number;
|
|
33
|
+
services: {
|
|
34
|
+
serviceId: string;
|
|
35
|
+
bindingId: string;
|
|
36
|
+
endpointBaseUrl: string;
|
|
37
|
+
deploymentMode: string;
|
|
38
|
+
healthUrl: string;
|
|
39
|
+
schemaUrl: string;
|
|
40
|
+
manifestUrl: string;
|
|
41
|
+
}[];
|
|
42
|
+
}, unknown, Record<string, unknown>>;
|
|
43
|
+
//# 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/config/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAIjC,eAAO,MAAM,WAAW,qBAA0C,CAAC;AAEnE,eAAO,MAAM,aAAa,qBAA0C,CAAC;AAErE,eAAO,MAAM,aAAa,qBAA0C,CAAC;AAYrE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;EAMC,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAIxD,eAAO,MAAM,KAAK,mBAAmB,CAAC;AACtC,eAAO,MAAM,WAAW,uEAAuE,CAAC;AAEhG,eAAO,MAAM,IAAI,EAAE,kBAKlB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAGxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,YAAY,CAAC,EAarD,CAAC;AAIF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;oCAoBrB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import { createHandler } from "@betterportal/framework";
|
|
3
|
+
// -- Schemas ---------------------------------------------------------
|
|
4
|
+
export const QuerySchema = av.object({}, { unknownKeys: "strip" });
|
|
5
|
+
export const HeadersSchema = av.object({}, { unknownKeys: "strip" });
|
|
6
|
+
export const RequestSchema = av.object({}, { unknownKeys: "strip" });
|
|
7
|
+
const ConfigManagerServiceSchema = av.object({
|
|
8
|
+
serviceId: av.string().minLength(1),
|
|
9
|
+
bindingId: av.string().minLength(1),
|
|
10
|
+
endpointBaseUrl: av.string().format("url"),
|
|
11
|
+
deploymentMode: av.string().minLength(1),
|
|
12
|
+
healthUrl: av.string().format("url"),
|
|
13
|
+
schemaUrl: av.string().format("url"),
|
|
14
|
+
manifestUrl: av.string().format("url")
|
|
15
|
+
}, { unknownKeys: "strip" });
|
|
16
|
+
export const ResponseSchema = av.object({
|
|
17
|
+
title: av.string().minLength(1),
|
|
18
|
+
tenantId: av.string().minLength(1),
|
|
19
|
+
appId: av.string().minLength(1),
|
|
20
|
+
requestTimeoutMs: av.int().min(1),
|
|
21
|
+
services: av.array(ConfigManagerServiceSchema)
|
|
22
|
+
}, { unknownKeys: "strip" });
|
|
23
|
+
// -- Metadata --------------------------------------------------------
|
|
24
|
+
export const title = "Config Manager";
|
|
25
|
+
export const description = "Admin service that discovers BetterPortal service config surfaces.";
|
|
26
|
+
export const auth = {
|
|
27
|
+
required: true,
|
|
28
|
+
permissions: [
|
|
29
|
+
{ serviceId: "service.betterportal.config-manager", viewId: "config.index", permissions: ["read", "update"] }
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
export const cacheHints = {
|
|
33
|
+
ttlSeconds: 30,
|
|
34
|
+
varyBy: ["accept", "origin", "referer", ":origin", ":referer"]
|
|
35
|
+
};
|
|
36
|
+
export const demoScenarios = [
|
|
37
|
+
{
|
|
38
|
+
id: "default",
|
|
39
|
+
title: "Default Config Admin",
|
|
40
|
+
match: { query: {} },
|
|
41
|
+
response: {
|
|
42
|
+
title: "Config Manager",
|
|
43
|
+
tenantId: "tenant-main",
|
|
44
|
+
appId: "app-main",
|
|
45
|
+
requestTimeoutMs: 2000,
|
|
46
|
+
services: []
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
// -- Handler ---------------------------------------------------------
|
|
51
|
+
export const handleGet = createHandler({ response: ResponseSchema }, (ctx) => {
|
|
52
|
+
// The actual data is injected by the main plugin via the handler context.
|
|
53
|
+
// This handler is a passthrough - the plugin builds the response model
|
|
54
|
+
// from config/bindings and attaches it to the event before the H3 adapter
|
|
55
|
+
// calls this handler.
|
|
56
|
+
if (ctx.responseModel) {
|
|
57
|
+
return ctx.responseModel;
|
|
58
|
+
}
|
|
59
|
+
// Fallback: return empty state (should not happen in normal flow)
|
|
60
|
+
return {
|
|
61
|
+
title: "Config Manager",
|
|
62
|
+
tenantId: "unknown",
|
|
63
|
+
appId: "unknown",
|
|
64
|
+
requestTimeoutMs: 2000,
|
|
65
|
+
services: []
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=route.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.impl.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/config/route.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,aAAa,EAId,MAAM,yBAAyB,CAAC;AAEjC,uEAAuE;AAEvE,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AAErE,MAAM,0BAA0B,GAAG,EAAE,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IACnC,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IACnC,eAAe,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;IAC1C,cAAc,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IACxC,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;IACpC,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;IACpC,WAAW,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;CACvC,EAAE,EAAE,WAAW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gB,EAAE,IAAI;YACtB,QAAQ,EAAE,EAAE;SACb;KACF;CACF,CAAC;AAEF,uEAAuE;AAEvE,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CACpC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAC5B,CAAC,GAAG,EAAE,EAAE;IACN,0EAA0E;IAC1E,uEAAuE;IACvE,0EAA0E;IAC1E,sBAAsB;IACtB,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;QACtB,OAAO,GAAG,CAAC,aAA6B,CAAC;IAC3C,CAAC;IAED,kEAAkE;IAClE,OAAO;QACL,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,SAAS;QAChB,gBAAgB,EAAE,IAAI;QACtB,QAAQ,EAAE,EAAE;KACb,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-config-manager/bp-routes/fragments/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|