@inf-monkeys-tech/monkeys 1.0.34 → 1.0.36
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/contracts/tenant.d.ts +337 -4
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +125 -2
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +112 -1
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +112 -1
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +99 -1
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +107 -1
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/tenant-product-config.schema.json +194 -2
- package/lib/json-schema/tenant-runtime-config.schema.json +194 -2
- package/lib/schemas/index.d.ts +91 -3
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +11 -2
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/current-user-menu-profile.v1.json +22 -0
- package/test/fixtures/tenant-product-config.public.json +10 -0
package/lib/esm/index.mjs
CHANGED
|
@@ -10995,15 +10995,112 @@ var TenantDataBindingsSchema = z12.record(
|
|
|
10995
10995
|
ContractIdentifierSchema,
|
|
10996
10996
|
TenantDataBindingSchema
|
|
10997
10997
|
);
|
|
10998
|
+
var TenantTrendRadarSourceSchema = z12.object({
|
|
10999
|
+
ontologyId: ContractIdentifierSchema,
|
|
11000
|
+
viewId: ContractIdentifierSchema
|
|
11001
|
+
}).strict();
|
|
11002
|
+
var TenantTrendRadarSourcesSchema = z12.object({
|
|
11003
|
+
hotwords: TenantTrendRadarSourceSchema.optional(),
|
|
11004
|
+
brands: TenantTrendRadarSourceSchema.optional()
|
|
11005
|
+
}).strict();
|
|
10998
11006
|
var AssetVariantsSchema = z12.object({
|
|
10999
11007
|
light: z12.string().optional(),
|
|
11000
11008
|
dark: z12.string().optional()
|
|
11001
11009
|
}).strict();
|
|
11010
|
+
var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
|
|
11011
|
+
var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
|
|
11012
|
+
var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
|
|
11013
|
+
var CurrentUserMenuIdentifierSchema = z12.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/, "Expected a stable current-user menu identifier.");
|
|
11014
|
+
var CurrentUserMenuDisplayTextSchema = z12.union([
|
|
11015
|
+
z12.string().trim().min(1),
|
|
11016
|
+
z12.record(z12.string().trim().min(1), z12.string().trim().min(1)).refine((value) => Object.keys(value).length > 0, "Localized menu text must contain at least one locale.")
|
|
11017
|
+
]);
|
|
11018
|
+
var CurrentUserMenuNavigationItemSchema = z12.object({
|
|
11019
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11020
|
+
kind: z12.literal("navigation"),
|
|
11021
|
+
ref: CurrentUserMenuIdentifierSchema
|
|
11022
|
+
}).strict();
|
|
11023
|
+
var CurrentUserMenuControlItemSchema = z12.object({
|
|
11024
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11025
|
+
kind: z12.literal("control"),
|
|
11026
|
+
ref: z12.enum(CURRENT_USER_MENU_CONTROL_REFS)
|
|
11027
|
+
}).strict();
|
|
11028
|
+
var CurrentUserMenuActionItemSchema = z12.object({
|
|
11029
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11030
|
+
kind: z12.literal("action"),
|
|
11031
|
+
ref: z12.enum(CURRENT_USER_MENU_ACTION_REFS),
|
|
11032
|
+
tone: z12.enum(["default", "danger"]).optional()
|
|
11033
|
+
}).strict();
|
|
11034
|
+
var CurrentUserMenuItemSchema = z12.discriminatedUnion("kind", [
|
|
11035
|
+
CurrentUserMenuNavigationItemSchema,
|
|
11036
|
+
CurrentUserMenuControlItemSchema,
|
|
11037
|
+
CurrentUserMenuActionItemSchema
|
|
11038
|
+
]);
|
|
11039
|
+
var CurrentUserMenuSectionSchema = z12.object({
|
|
11040
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11041
|
+
label: CurrentUserMenuDisplayTextSchema.optional(),
|
|
11042
|
+
dividerBefore: z12.boolean().optional(),
|
|
11043
|
+
items: z12.array(CurrentUserMenuItemSchema)
|
|
11044
|
+
}).strict();
|
|
11045
|
+
var CurrentUserMenuConfigSchema = z12.object({
|
|
11046
|
+
version: z12.literal(1),
|
|
11047
|
+
sections: z12.array(CurrentUserMenuSectionSchema).max(20)
|
|
11048
|
+
}).strict().superRefine((value, context) => {
|
|
11049
|
+
const sectionIds = /* @__PURE__ */ new Set();
|
|
11050
|
+
const itemIds = /* @__PURE__ */ new Set();
|
|
11051
|
+
let itemCount = 0;
|
|
11052
|
+
value.sections.forEach((section, sectionIndex) => {
|
|
11053
|
+
if (sectionIds.has(section.id)) {
|
|
11054
|
+
context.addIssue({
|
|
11055
|
+
code: "custom",
|
|
11056
|
+
message: `Duplicate current-user menu section id ${section.id}.`,
|
|
11057
|
+
path: ["sections", sectionIndex, "id"]
|
|
11058
|
+
});
|
|
11059
|
+
}
|
|
11060
|
+
sectionIds.add(section.id);
|
|
11061
|
+
itemCount += section.items.length;
|
|
11062
|
+
section.items.forEach((item, itemIndex) => {
|
|
11063
|
+
if (itemIds.has(item.id)) {
|
|
11064
|
+
context.addIssue({
|
|
11065
|
+
code: "custom",
|
|
11066
|
+
message: `Duplicate current-user menu item id ${item.id}.`,
|
|
11067
|
+
path: ["sections", sectionIndex, "items", itemIndex, "id"]
|
|
11068
|
+
});
|
|
11069
|
+
}
|
|
11070
|
+
itemIds.add(item.id);
|
|
11071
|
+
});
|
|
11072
|
+
});
|
|
11073
|
+
if (itemCount > 100) {
|
|
11074
|
+
context.addIssue({
|
|
11075
|
+
code: "custom",
|
|
11076
|
+
message: "Current-user menu supports at most 100 items.",
|
|
11077
|
+
path: ["sections"]
|
|
11078
|
+
});
|
|
11079
|
+
}
|
|
11080
|
+
});
|
|
11081
|
+
var LegacyCurrentUserMenuProfileSchema = z12.array(z12.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
|
|
11082
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11083
|
+
value.forEach((item, index) => {
|
|
11084
|
+
if (seen.has(item)) {
|
|
11085
|
+
context.addIssue({
|
|
11086
|
+
code: "custom",
|
|
11087
|
+
message: `Duplicate legacy current-user menu item ${item}.`,
|
|
11088
|
+
path: [index]
|
|
11089
|
+
});
|
|
11090
|
+
}
|
|
11091
|
+
seen.add(item);
|
|
11092
|
+
});
|
|
11093
|
+
});
|
|
11094
|
+
var CurrentUserMenuProfileSchema = z12.union([
|
|
11095
|
+
z12.literal("*"),
|
|
11096
|
+
LegacyCurrentUserMenuProfileSchema,
|
|
11097
|
+
CurrentUserMenuConfigSchema
|
|
11098
|
+
]);
|
|
11002
11099
|
var ThemeHeadbarSchema = z12.object({
|
|
11003
11100
|
theme: z12.enum(["card", "glassy", "ghost"]).optional(),
|
|
11004
11101
|
navPosition: z12.enum(["left", "center", "right"]).optional(),
|
|
11005
11102
|
actions: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional(),
|
|
11006
|
-
profile:
|
|
11103
|
+
profile: CurrentUserMenuProfileSchema.optional(),
|
|
11007
11104
|
showTeamQuota: z12.boolean().optional()
|
|
11008
11105
|
}).strict();
|
|
11009
11106
|
var TenantHeadbarModuleLeafSchema = z12.object({
|
|
@@ -11375,6 +11472,7 @@ var TenantApplicationConfigSchema = z12.object({
|
|
|
11375
11472
|
tep: z12.object({ baseUrl: z12.string().optional(), timeoutMs: z12.number().int().positive().optional() }).strict().optional(),
|
|
11376
11473
|
runtime: z12.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z12.boolean(), tepAuthorizationConfigured: z12.boolean(), tepCookieConfigured: z12.boolean() }).strict().optional()
|
|
11377
11474
|
}).strict().optional(),
|
|
11475
|
+
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
11378
11476
|
sharing: z12.object({
|
|
11379
11477
|
silentViewLinks: z12.object({ enabled: z12.boolean().optional(), placement: z12.object({ mode: z12.enum(["sourceOntology", "ontology"]).optional(), ontologyId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
|
|
11380
11478
|
shareAccess: z12.object({ publicLinksEnabled: z12.boolean().optional(), passwordGateEnabled: z12.boolean().optional(), passwordAccessTtlSeconds: z12.number().int().positive().optional(), defaultViewTreeDelivery: z12.enum(["manual", "auto"]).optional() }).strict().optional(),
|
|
@@ -13647,6 +13745,8 @@ export {
|
|
|
13647
13745
|
BrandBodySchema,
|
|
13648
13746
|
BrandGeneticsProfileSchema,
|
|
13649
13747
|
CODE_LANGUAGES,
|
|
13748
|
+
CURRENT_USER_MENU_ACTION_REFS,
|
|
13749
|
+
CURRENT_USER_MENU_CONTROL_REFS,
|
|
13650
13750
|
CapabilityManifestSchema,
|
|
13651
13751
|
CapabilityProviderBindingSchema,
|
|
13652
13752
|
CapabilityRegistryDocumentSchema,
|
|
@@ -13666,6 +13766,14 @@ export {
|
|
|
13666
13766
|
ContractMetadataSchema,
|
|
13667
13767
|
ContractPortSchema,
|
|
13668
13768
|
ContractVersionSchema,
|
|
13769
|
+
CurrentUserMenuActionItemSchema,
|
|
13770
|
+
CurrentUserMenuConfigSchema,
|
|
13771
|
+
CurrentUserMenuControlItemSchema,
|
|
13772
|
+
CurrentUserMenuDisplayTextSchema,
|
|
13773
|
+
CurrentUserMenuItemSchema,
|
|
13774
|
+
CurrentUserMenuNavigationItemSchema,
|
|
13775
|
+
CurrentUserMenuProfileSchema,
|
|
13776
|
+
CurrentUserMenuSectionSchema,
|
|
13669
13777
|
DEFAULT_CONDUCTOR_OWNER_EMAIL,
|
|
13670
13778
|
DataContinuityEnvelopeSchema,
|
|
13671
13779
|
DeclarationGraphEdgeSchema,
|
|
@@ -13680,6 +13788,7 @@ export {
|
|
|
13680
13788
|
IsoDateTimeSchema,
|
|
13681
13789
|
JsonObjectSchema,
|
|
13682
13790
|
JsonValueSchema,
|
|
13791
|
+
LEGACY_CURRENT_USER_MENU_ITEM_IDS,
|
|
13683
13792
|
LineageRecordSchema,
|
|
13684
13793
|
LocaleIdentifierSchema,
|
|
13685
13794
|
LocalizedTextSchema,
|
|
@@ -13743,6 +13852,8 @@ export {
|
|
|
13743
13852
|
TenantLandingPageConfigSchema,
|
|
13744
13853
|
TenantProductConfigSchema,
|
|
13745
13854
|
TenantRuntimeConfigSchema,
|
|
13855
|
+
TenantTrendRadarSourceSchema,
|
|
13856
|
+
TenantTrendRadarSourcesSchema,
|
|
13746
13857
|
TenantWorkbenchConfigSchema,
|
|
13747
13858
|
TenantWorkbenchPageContextSchema,
|
|
13748
13859
|
TenantWorkbenchPageEnvelopeSchema,
|