@dyrected/core 2.24.3 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-Bg34iyUz.d.cts → app-Ti5woUOq.d.cts} +113 -3
- package/dist/{app-Bg34iyUz.d.ts → app-Ti5woUOq.d.ts} +113 -3
- package/dist/index.cjs +130 -21
- package/dist/index.d.cts +64 -4
- package/dist/index.d.ts +64 -4
- package/dist/index.js +123 -21
- package/dist/server.cjs +215 -51
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +215 -51
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1810,6 +1810,7 @@ __export(index_exports, {
|
|
|
1810
1810
|
LIFECYCLE_EVENT_NAMES: () => LIFECYCLE_EVENT_NAMES,
|
|
1811
1811
|
MatchBuilder: () => MatchBuilder,
|
|
1812
1812
|
NANOID_ALPHABET: () => NANOID_ALPHABET,
|
|
1813
|
+
NAVIGATION_POLICY_KEY: () => NAVIGATION_POLICY_KEY,
|
|
1813
1814
|
NON_NEGOTIABLE_CREDENTIAL_FIELDS: () => NON_NEGOTIABLE_CREDENTIAL_FIELDS,
|
|
1814
1815
|
NotFoundError: () => NotFoundError,
|
|
1815
1816
|
PII_REGEX_PATTERNS: () => PII_REGEX_PATTERNS,
|
|
@@ -1824,6 +1825,7 @@ __export(index_exports, {
|
|
|
1824
1825
|
abs: () => abs,
|
|
1825
1826
|
addDays: () => addDays,
|
|
1826
1827
|
alertBox: () => alertBox,
|
|
1828
|
+
applyNavigationRolePolicies: () => applyNavigationRolePolicies,
|
|
1827
1829
|
asCollection: () => asCollection,
|
|
1828
1830
|
assertValidAdminConditionsInConfig: () => assertValidAdminConditionsInConfig,
|
|
1829
1831
|
assertValidDeclarativeAccessInConfig: () => assertValidDeclarativeAccessInConfig,
|
|
@@ -1979,6 +1981,7 @@ __export(index_exports, {
|
|
|
1979
1981
|
paragraph: () => paragraph,
|
|
1980
1982
|
parseCron: () => parseCron,
|
|
1981
1983
|
parseMongoWhere: () => parseMongoWhere,
|
|
1984
|
+
parseNavigationRolePolicy: () => parseNavigationRolePolicy,
|
|
1982
1985
|
parseSort: () => parseSort,
|
|
1983
1986
|
parseSqlWhere: () => parseSqlWhere,
|
|
1984
1987
|
pow: () => pow,
|
|
@@ -1992,12 +1995,15 @@ __export(index_exports, {
|
|
|
1992
1995
|
registerJexlHelpers: () => registerJexlHelpers,
|
|
1993
1996
|
replace: () => replace,
|
|
1994
1997
|
resolveAdminAuthCollection: () => resolveAdminAuthCollection,
|
|
1998
|
+
resolveAdminString: () => resolveAdminString,
|
|
1995
1999
|
resolveAllCollectionViews: () => resolveAllCollectionViews,
|
|
2000
|
+
resolveAppName: () => resolveAppName,
|
|
1996
2001
|
resolveAuthorizedSiteId: () => resolveAuthorizedSiteId,
|
|
1997
2002
|
resolveBlocks: () => resolveBlocks,
|
|
1998
2003
|
resolveDocumentTitle: () => resolveDocumentTitle,
|
|
1999
2004
|
resolveIndexName: () => resolveIndexName,
|
|
2000
2005
|
resolvePrefix: () => resolvePrefix,
|
|
2006
|
+
resolveTitleSuffix: () => resolveTitleSuffix,
|
|
2001
2007
|
resolveTrashConfig: () => resolveTrashConfig,
|
|
2002
2008
|
restoreDocument: () => restoreDocument,
|
|
2003
2009
|
round: () => round,
|
|
@@ -2005,6 +2011,7 @@ __export(index_exports, {
|
|
|
2005
2011
|
runCollectionHooks: () => runCollectionHooks,
|
|
2006
2012
|
safeLinkDetailBox: () => safeLinkDetailBox,
|
|
2007
2013
|
sanitizeDocForAI: () => sanitizeDocForAI,
|
|
2014
|
+
sanitizeNavigationLayout: () => sanitizeNavigationLayout,
|
|
2008
2015
|
saveWorkflowDraft: () => saveWorkflowDraft,
|
|
2009
2016
|
sectionLabel: () => sectionLabel,
|
|
2010
2017
|
simplePublishingWorkflow: () => simplePublishingWorkflow,
|
|
@@ -2125,6 +2132,7 @@ var DyrectedAIError = class _DyrectedAIError extends Error {
|
|
|
2125
2132
|
function defineWorkspace(options) {
|
|
2126
2133
|
return options;
|
|
2127
2134
|
}
|
|
2135
|
+
var NAVIGATION_POLICY_KEY = "admin:navigation-policy";
|
|
2128
2136
|
var CURRENT_NAV_PREFERENCES_VERSION = 1;
|
|
2129
2137
|
var DEFAULT_USER_NAV_PREFERENCES = {
|
|
2130
2138
|
_version: CURRENT_NAV_PREFERENCES_VERSION,
|
|
@@ -4466,6 +4474,32 @@ function isUserAdmin(user, collection) {
|
|
|
4466
4474
|
return false;
|
|
4467
4475
|
}
|
|
4468
4476
|
|
|
4477
|
+
// src/utils/app-name.ts
|
|
4478
|
+
var SUFFIX_SEPARATOR = /^[\s\-\u2013\u2014|\u00b7:]+/;
|
|
4479
|
+
function resolveAppName(admin) {
|
|
4480
|
+
const candidates = [
|
|
4481
|
+
admin?.branding?.appName,
|
|
4482
|
+
admin?.branding?.logoText,
|
|
4483
|
+
admin?.meta?.titleSuffix?.replace(SUFFIX_SEPARATOR, "")
|
|
4484
|
+
];
|
|
4485
|
+
for (const candidate of candidates) {
|
|
4486
|
+
const value = typeof candidate === "string" ? candidate.trim() : "";
|
|
4487
|
+
if (value) return value;
|
|
4488
|
+
}
|
|
4489
|
+
return "";
|
|
4490
|
+
}
|
|
4491
|
+
function resolveTitleSuffix(admin) {
|
|
4492
|
+
const explicit = admin?.meta?.titleSuffix;
|
|
4493
|
+
if (typeof explicit === "string") return explicit.trim();
|
|
4494
|
+
const name = resolveAppName(admin);
|
|
4495
|
+
return name ? `- ${name}` : "";
|
|
4496
|
+
}
|
|
4497
|
+
function resolveAdminString(admin, key, fallback) {
|
|
4498
|
+
const override = admin?.strings?.[key];
|
|
4499
|
+
const text = typeof override === "string" && override.trim() ? override : fallback;
|
|
4500
|
+
return text.replace(/\{appName\}/g, resolveAppName(admin));
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4469
4503
|
// src/utils/block-references.ts
|
|
4470
4504
|
function mergeUniqueBlocks(blocks) {
|
|
4471
4505
|
const seen = /* @__PURE__ */ new Map();
|
|
@@ -4835,7 +4869,7 @@ function layout({ preheader, title, content, footer, siteName }) {
|
|
|
4835
4869
|
${table(
|
|
4836
4870
|
row(
|
|
4837
4871
|
table(
|
|
4838
|
-
row(" ", `height:5px;background:${emailTokens.colors.accent};font-size:0;line-height:0`) + row(`${sectionLabel(siteName
|
|
4872
|
+
row(" ", `height:5px;background:${emailTokens.colors.accent};font-size:0;line-height:0`) + row(`${siteName?.trim() ? sectionLabel(siteName) : ""}${heading(title)}`, "padding:30px 32px 24px") + row(resolvedContent, "padding:0 32px 32px") + row(
|
|
4839
4873
|
`${divider()}${paragraph(resolvedFooter, "20px 0 6px")}${paragraph("Privacy: this message contains account-related information; please avoid forwarding it.", "10px 0px 0px 0px", "12px")}`,
|
|
4840
4874
|
"padding:0 32px 28px"
|
|
4841
4875
|
),
|
|
@@ -4850,14 +4884,15 @@ function layout({ preheader, title, content, footer, siteName }) {
|
|
|
4850
4884
|
</html>`;
|
|
4851
4885
|
}
|
|
4852
4886
|
function getDefaultEmailTemplate(purpose, options) {
|
|
4853
|
-
const siteName = options?.siteName ?? "
|
|
4887
|
+
const siteName = options?.siteName?.trim() ?? "";
|
|
4888
|
+
const account = siteName ? `${siteName} account` : "account";
|
|
4854
4889
|
switch (purpose) {
|
|
4855
4890
|
case "invite":
|
|
4856
4891
|
return {
|
|
4857
|
-
subject: `You've been invited to ${siteName}
|
|
4892
|
+
subject: siteName ? `You've been invited to ${siteName}` : "You've been invited",
|
|
4858
4893
|
rawHtml: layout({
|
|
4859
4894
|
siteName,
|
|
4860
|
-
preheader: `You've been invited to join ${siteName}
|
|
4895
|
+
preheader: siteName ? `You've been invited to join ${siteName}.` : "You've been invited to join.",
|
|
4861
4896
|
title: "You've been invited",
|
|
4862
4897
|
content: [
|
|
4863
4898
|
paragraph("Use the invitation link below to create your account. The link expires in 7 days."),
|
|
@@ -4874,7 +4909,7 @@ function getDefaultEmailTemplate(purpose, options) {
|
|
|
4874
4909
|
subject: "Reset your password",
|
|
4875
4910
|
rawHtml: layout({
|
|
4876
4911
|
siteName,
|
|
4877
|
-
preheader: `Reset your ${siteName} password
|
|
4912
|
+
preheader: siteName ? `Reset your ${siteName} password.` : "Reset your password.",
|
|
4878
4913
|
title: "Reset your password",
|
|
4879
4914
|
content: [
|
|
4880
4915
|
paragraph("We received a request to reset your password. The reset link expires in 1 hour."),
|
|
@@ -4888,10 +4923,10 @@ function getDefaultEmailTemplate(purpose, options) {
|
|
|
4888
4923
|
};
|
|
4889
4924
|
case "welcome":
|
|
4890
4925
|
return {
|
|
4891
|
-
subject: `Welcome to ${siteName} \u2014 your account is ready
|
|
4926
|
+
subject: siteName ? `Welcome to ${siteName} \u2014 your account is ready` : "Welcome \u2014 your account is ready",
|
|
4892
4927
|
rawHtml: layout({
|
|
4893
4928
|
siteName,
|
|
4894
|
-
preheader: `Your ${
|
|
4929
|
+
preheader: `Your ${account} is ready.`,
|
|
4895
4930
|
title: "Welcome \u2014 your account is ready",
|
|
4896
4931
|
content: [paragraph("Your account has been created. You can now log in with:"), detailBox("{{email}}")],
|
|
4897
4932
|
footer: "If you didn't create this account, you can safely ignore this email."
|
|
@@ -4902,7 +4937,7 @@ function getDefaultEmailTemplate(purpose, options) {
|
|
|
4902
4937
|
subject: "Your password has been changed",
|
|
4903
4938
|
rawHtml: layout({
|
|
4904
4939
|
siteName,
|
|
4905
|
-
preheader: `Your ${siteName} password was changed
|
|
4940
|
+
preheader: siteName ? `Your ${siteName} password was changed.` : "Your password was changed.",
|
|
4906
4941
|
title: "Password changed",
|
|
4907
4942
|
content: [
|
|
4908
4943
|
paragraph("The password for your account has been changed."),
|
|
@@ -4913,12 +4948,12 @@ function getDefaultEmailTemplate(purpose, options) {
|
|
|
4913
4948
|
};
|
|
4914
4949
|
default:
|
|
4915
4950
|
return {
|
|
4916
|
-
subject: `Notification from ${siteName}
|
|
4951
|
+
subject: siteName ? `Notification from ${siteName}` : "Account notification",
|
|
4917
4952
|
rawHtml: layout({
|
|
4918
4953
|
siteName,
|
|
4919
|
-
preheader: `Account notification from ${siteName}
|
|
4954
|
+
preheader: siteName ? `Account notification from ${siteName}.` : "Account notification.",
|
|
4920
4955
|
title: "Account Notification",
|
|
4921
|
-
content: [paragraph(`This is an account notification from ${siteName}.`)],
|
|
4956
|
+
content: [paragraph(siteName ? `This is an account notification from ${siteName}.` : "This is an account notification.")],
|
|
4922
4957
|
footer: "If you have any questions, please reach out to our team."
|
|
4923
4958
|
})
|
|
4924
4959
|
};
|
|
@@ -5154,7 +5189,7 @@ var EMAIL_TEMPLATES_COLLECTION_CONFIG = {
|
|
|
5154
5189
|
beforeChange: [
|
|
5155
5190
|
async ({ data, req }) => {
|
|
5156
5191
|
if (data && data.format === "html") {
|
|
5157
|
-
const siteName = req?.config?.admin
|
|
5192
|
+
const siteName = resolveAppName(req?.config?.admin);
|
|
5158
5193
|
const defaults = getDefaultEmailTemplate(data.purpose || "invite", { siteName });
|
|
5159
5194
|
if (!data.subject) {
|
|
5160
5195
|
data.subject = defaults.subject;
|
|
@@ -6027,12 +6062,13 @@ function getGlobalTag(global) {
|
|
|
6027
6062
|
return `Global: ${global.label || global.slug}`;
|
|
6028
6063
|
}
|
|
6029
6064
|
function generateOpenApi(config) {
|
|
6065
|
+
const appName = resolveAppName(config.admin);
|
|
6030
6066
|
const spec = {
|
|
6031
6067
|
openapi: "3.0.0",
|
|
6032
6068
|
info: {
|
|
6033
|
-
title:
|
|
6069
|
+
title: appName ? `${appName} API` : "API",
|
|
6034
6070
|
version: "1.0.0",
|
|
6035
|
-
description: "Automatically generated OpenAPI specification for
|
|
6071
|
+
description: appName ? `Automatically generated OpenAPI specification for ${appName}.` : "Automatically generated OpenAPI specification for this project."
|
|
6036
6072
|
},
|
|
6037
6073
|
components: {
|
|
6038
6074
|
schemas: {
|
|
@@ -6143,7 +6179,7 @@ function generateOpenApi(config) {
|
|
|
6143
6179
|
spec.paths["/api/schemas"] = {
|
|
6144
6180
|
get: {
|
|
6145
6181
|
tags: ["System"],
|
|
6146
|
-
summary: "Get the serialized
|
|
6182
|
+
summary: "Get the serialized schema",
|
|
6147
6183
|
security: [],
|
|
6148
6184
|
responses: {
|
|
6149
6185
|
200: { description: "Collection and global schema definitions" }
|
|
@@ -8241,6 +8277,7 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8241
8277
|
};
|
|
8242
8278
|
}
|
|
8243
8279
|
const includeHidden = options?.includeHidden ?? false;
|
|
8280
|
+
const allowUserItems = options?.allowUserItems ?? true;
|
|
8244
8281
|
const effectivePrefs = prefs || DEFAULT_USER_NAV_PREFERENCES;
|
|
8245
8282
|
const hiddenSet = new Set(effectivePrefs.hidden || []);
|
|
8246
8283
|
const knownCollectionSlugs = new Set((schemas?.collections || []).map((c) => c.slug));
|
|
@@ -8272,8 +8309,14 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8272
8309
|
});
|
|
8273
8310
|
}
|
|
8274
8311
|
}
|
|
8312
|
+
const ungroupedKeys = /* @__PURE__ */ new Set();
|
|
8313
|
+
for (const item of baseTree.ungrouped || []) {
|
|
8314
|
+
ungroupedKeys.add(item.id);
|
|
8315
|
+
if (item.slug) ungroupedKeys.add(item.slug);
|
|
8316
|
+
}
|
|
8275
8317
|
for (const itemOpt of effectivePrefs.items || []) {
|
|
8276
8318
|
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
8319
|
+
if (ungroupedKeys.has(itemId) || itemOpt.slug && ungroupedKeys.has(itemOpt.slug)) continue;
|
|
8277
8320
|
let existingItem;
|
|
8278
8321
|
let existingParentGroup;
|
|
8279
8322
|
for (const g of groupsList) {
|
|
@@ -8284,6 +8327,7 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8284
8327
|
break;
|
|
8285
8328
|
}
|
|
8286
8329
|
}
|
|
8330
|
+
if (!existingItem && !allowUserItems) continue;
|
|
8287
8331
|
const targetGroup = typeof itemOpt.group === "object" ? itemOpt.group?.name : itemOpt.group || existingParentGroup?.name || "Custom";
|
|
8288
8332
|
const groupKey = targetGroup;
|
|
8289
8333
|
let group = findGroup(groupKey);
|
|
@@ -8313,7 +8357,7 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8313
8357
|
const baseViews = existingItem?.views || [];
|
|
8314
8358
|
const userViews = (itemOpt.views || []).map((uv) => {
|
|
8315
8359
|
const bv = baseViews.find((b) => b.slug === uv.slug);
|
|
8316
|
-
if (!bv) return uv;
|
|
8360
|
+
if (!bv) return { ...uv, access: void 0 };
|
|
8317
8361
|
const metricsScope = uv.metricsScope ?? bv.metricsScope;
|
|
8318
8362
|
let metrics = uv.metrics;
|
|
8319
8363
|
if (Array.isArray(uv.metrics) && Array.isArray(bv.metrics)) {
|
|
@@ -8334,6 +8378,7 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8334
8378
|
return {
|
|
8335
8379
|
...bv,
|
|
8336
8380
|
...uv,
|
|
8381
|
+
access: bv.access,
|
|
8337
8382
|
metricsScope,
|
|
8338
8383
|
metrics
|
|
8339
8384
|
};
|
|
@@ -8370,10 +8415,12 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8370
8415
|
group: group.name,
|
|
8371
8416
|
order: itemOpt.order ?? existingItem?.order ?? 100,
|
|
8372
8417
|
views: mergedViews,
|
|
8373
|
-
collection:
|
|
8374
|
-
global:
|
|
8375
|
-
|
|
8376
|
-
|
|
8418
|
+
collection: existingItem?.collection || itemOpt.collection,
|
|
8419
|
+
global: existingItem?.global || itemOpt.global,
|
|
8420
|
+
// Access and badges are policy/server-computed: only the server tree may set them.
|
|
8421
|
+
badge: existingItem?.badge,
|
|
8422
|
+
access: existingItem?.access,
|
|
8423
|
+
...existingItem ? existingItem.userDefined ? { userDefined: true } : {} : { userDefined: true }
|
|
8377
8424
|
};
|
|
8378
8425
|
if (existingIndex >= 0) {
|
|
8379
8426
|
group.items[existingIndex] = compiledItem;
|
|
@@ -8472,7 +8519,7 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8472
8519
|
label: pin.label || match.label,
|
|
8473
8520
|
icon: pin.icon || match.icon
|
|
8474
8521
|
});
|
|
8475
|
-
} else {
|
|
8522
|
+
} else if (allowUserItems) {
|
|
8476
8523
|
pinnedItems.push({
|
|
8477
8524
|
id: `pin_${pin.slug}`,
|
|
8478
8525
|
type: pin.type,
|
|
@@ -8491,6 +8538,61 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8491
8538
|
};
|
|
8492
8539
|
}
|
|
8493
8540
|
|
|
8541
|
+
// src/utils/navigation-policy.ts
|
|
8542
|
+
var isStringArray = (value) => Array.isArray(value) && value.every((v) => typeof v === "string");
|
|
8543
|
+
var itemKeys = (item) => [item.id, ...item.slug ? [item.slug] : []];
|
|
8544
|
+
var allTreeItems = (tree) => [
|
|
8545
|
+
...tree.groups.flatMap((g) => g.items),
|
|
8546
|
+
...tree.ungrouped
|
|
8547
|
+
];
|
|
8548
|
+
function sanitizeNavigationLayout(prefs, tree) {
|
|
8549
|
+
const known = new Set(allTreeItems(tree).flatMap(itemKeys));
|
|
8550
|
+
return {
|
|
8551
|
+
_version: CURRENT_NAV_PREFERENCES_VERSION,
|
|
8552
|
+
hidden: isStringArray(prefs?.hidden) ? prefs.hidden : [],
|
|
8553
|
+
groupOrder: isStringArray(prefs?.groupOrder) ? prefs.groupOrder : [],
|
|
8554
|
+
itemOrder: Object.fromEntries(
|
|
8555
|
+
Object.entries(prefs?.itemOrder ?? {}).filter(([, order]) => isStringArray(order))
|
|
8556
|
+
),
|
|
8557
|
+
groups: Array.isArray(prefs?.groups) ? prefs.groups : [],
|
|
8558
|
+
items: (Array.isArray(prefs?.items) ? prefs.items : []).filter((item) => {
|
|
8559
|
+
if (item.slug) return known.has(item.slug) || known.has(`workspace_${item.slug}`);
|
|
8560
|
+
if (item.collection) return known.has(`collection_${item.collection}`);
|
|
8561
|
+
if (item.global) return known.has(`global_${item.global}`);
|
|
8562
|
+
return false;
|
|
8563
|
+
})
|
|
8564
|
+
};
|
|
8565
|
+
}
|
|
8566
|
+
function parseNavigationRolePolicy(value, tree) {
|
|
8567
|
+
if (!value || typeof value !== "object") return null;
|
|
8568
|
+
const raw = value;
|
|
8569
|
+
if (typeof raw.enforced !== "boolean" || !isStringArray(raw.allowed)) return null;
|
|
8570
|
+
const layout2 = sanitizeNavigationLayout(raw.layout, tree);
|
|
8571
|
+
return {
|
|
8572
|
+
_version: CURRENT_NAV_PREFERENCES_VERSION,
|
|
8573
|
+
enforced: raw.enforced,
|
|
8574
|
+
allowed: raw.allowed,
|
|
8575
|
+
layout: {
|
|
8576
|
+
_version: layout2._version,
|
|
8577
|
+
hidden: layout2.hidden,
|
|
8578
|
+
groupOrder: layout2.groupOrder,
|
|
8579
|
+
itemOrder: layout2.itemOrder,
|
|
8580
|
+
groups: layout2.groups,
|
|
8581
|
+
items: layout2.items
|
|
8582
|
+
}
|
|
8583
|
+
};
|
|
8584
|
+
}
|
|
8585
|
+
function applyNavigationRolePolicies(tree, policies) {
|
|
8586
|
+
const enforced = policies.filter((p) => !!p?.enforced);
|
|
8587
|
+
if (policies.length === 0 || enforced.length !== policies.length) return tree;
|
|
8588
|
+
const allowed = new Set(enforced.flatMap((p) => p.allowed));
|
|
8589
|
+
const isAllowed = (item) => itemKeys(item).some((key) => allowed.has(key));
|
|
8590
|
+
const groups = tree.groups.map((g) => ({ ...g, items: g.items.filter(isAllowed) })).filter((g) => g.items.length > 0);
|
|
8591
|
+
const filtered = { groups, ungrouped: tree.ungrouped.filter(isAllowed) };
|
|
8592
|
+
const reconciled = reconcileNavigation(filtered, enforced[0].layout, void 0, { allowUserItems: false });
|
|
8593
|
+
return { groups: reconciled.groups, ungrouped: reconciled.ungrouped, locked: true };
|
|
8594
|
+
}
|
|
8595
|
+
|
|
8494
8596
|
// src/utils/navigation.ts
|
|
8495
8597
|
var RESERVED_NAVIGATION_SLUGS = /* @__PURE__ */ new Set([
|
|
8496
8598
|
"collections",
|
|
@@ -9139,6 +9241,7 @@ function defineTab(args) {
|
|
|
9139
9241
|
LIFECYCLE_EVENT_NAMES,
|
|
9140
9242
|
MatchBuilder,
|
|
9141
9243
|
NANOID_ALPHABET,
|
|
9244
|
+
NAVIGATION_POLICY_KEY,
|
|
9142
9245
|
NON_NEGOTIABLE_CREDENTIAL_FIELDS,
|
|
9143
9246
|
NotFoundError,
|
|
9144
9247
|
PII_REGEX_PATTERNS,
|
|
@@ -9153,6 +9256,7 @@ function defineTab(args) {
|
|
|
9153
9256
|
abs,
|
|
9154
9257
|
addDays,
|
|
9155
9258
|
alertBox,
|
|
9259
|
+
applyNavigationRolePolicies,
|
|
9156
9260
|
asCollection,
|
|
9157
9261
|
assertValidAdminConditionsInConfig,
|
|
9158
9262
|
assertValidDeclarativeAccessInConfig,
|
|
@@ -9308,6 +9412,7 @@ function defineTab(args) {
|
|
|
9308
9412
|
paragraph,
|
|
9309
9413
|
parseCron,
|
|
9310
9414
|
parseMongoWhere,
|
|
9415
|
+
parseNavigationRolePolicy,
|
|
9311
9416
|
parseSort,
|
|
9312
9417
|
parseSqlWhere,
|
|
9313
9418
|
pow,
|
|
@@ -9321,12 +9426,15 @@ function defineTab(args) {
|
|
|
9321
9426
|
registerJexlHelpers,
|
|
9322
9427
|
replace,
|
|
9323
9428
|
resolveAdminAuthCollection,
|
|
9429
|
+
resolveAdminString,
|
|
9324
9430
|
resolveAllCollectionViews,
|
|
9431
|
+
resolveAppName,
|
|
9325
9432
|
resolveAuthorizedSiteId,
|
|
9326
9433
|
resolveBlocks,
|
|
9327
9434
|
resolveDocumentTitle,
|
|
9328
9435
|
resolveIndexName,
|
|
9329
9436
|
resolvePrefix,
|
|
9437
|
+
resolveTitleSuffix,
|
|
9330
9438
|
resolveTrashConfig,
|
|
9331
9439
|
restoreDocument,
|
|
9332
9440
|
round,
|
|
@@ -9334,6 +9442,7 @@ function defineTab(args) {
|
|
|
9334
9442
|
runCollectionHooks,
|
|
9335
9443
|
safeLinkDetailBox,
|
|
9336
9444
|
sanitizeDocForAI,
|
|
9445
|
+
sanitizeNavigationLayout,
|
|
9337
9446
|
saveWorkflowDraft,
|
|
9338
9447
|
sectionLabel,
|
|
9339
9448
|
simplePublishingWorkflow,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as DatabaseAdapter, f as BaseDocument, H as HookRequestContext, T as TaskRunResult, g as TaskConfig, h as DetailActionOptions, i as DetailAction, j as DetailComputedOptions, k as ComputedHandler, l as DetailComputed, m as DetailCustomOptions, n as DetailCustom, o as DetailDividerOptions, p as DetailDivider, q as DisplayFieldOptions, r as DetailField, s as DetailItem, t as DetailGridOptions, u as DetailGrid, v as DetailRepeatOptions, w as DetailRepeat, x as DetailSectionOptions, y as DetailSection, z as DetailTabOptions, E as DetailTab, I as DetailTabsOptions, J as DetailTabs, K as DetailTextOptions, M as DetailText, N as DetailSchema, O as DyrectedContext, Q as AIConfig, R as AIPIIConfig, S as IdStrategy, U as CompiledNavTree, V as CompiledNavItem, X as UserNavigationPreferences, Y as
|
|
2
|
-
export {
|
|
1
|
+
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as DatabaseAdapter, f as BaseDocument, H as HookRequestContext, T as TaskRunResult, g as TaskConfig, h as DetailActionOptions, i as DetailAction, j as DetailComputedOptions, k as ComputedHandler, l as DetailComputed, m as DetailCustomOptions, n as DetailCustom, o as DetailDividerOptions, p as DetailDivider, q as DisplayFieldOptions, r as DetailField, s as DetailItem, t as DetailGridOptions, u as DetailGrid, v as DetailRepeatOptions, w as DetailRepeat, x as DetailSectionOptions, y as DetailSection, z as DetailTabOptions, E as DetailTab, I as DetailTabsOptions, J as DetailTabs, K as DetailTextOptions, M as DetailText, N as DetailSchema, O as DyrectedContext, Q as AIConfig, R as AIPIIConfig, S as IdStrategy, U as CompiledNavTree, V as CompiledNavItem, X as UserNavigationPreferences, Y as NavigationRolePolicy, Z as DefineWorkspaceOptions, _ as ViewConfig, $ as AdminConfig, a0 as AdminStringKey, a1 as DateTimeField, a2 as RelationshipField, a3 as SelectField, a4 as ArrayField, a5 as FieldType, a6 as BooleanField, a7 as AuthConfig, a8 as AccessPolicyResolver, a9 as DateField, aa as TextField, ab as EmailField, ac as IconField, ad as ImageField, ae as JoinField, af as JsonField, ag as MoneyField, ah as MultiSelectField, ai as NumberField, aj as ObjectField, ak as RadioField, al as RichTextField, am as RowField, an as TextareaField, ao as TimeField, ap as UrlField } from './app-Ti5woUOq.cjs';
|
|
2
|
+
export { aq as AIAction, ar as AIActionStatus, as as AIActionType, at as AIAuditActionType, au as AIAuditRecord, av as AIChunk, aw as AIMessage, ax as AIPIIPattern, ay as AIRateLimitResult, az as AIRateLimitStore, aA as AIThread, aB as AIToolContext, aC as AIToolDefinition, aD as AI_ACTIONS_COLLECTION, aE as AI_AUDIT_COLLECTION, aF as AI_CHUNKS_COLLECTION, aG as AI_MESSAGES_COLLECTION, aH as AI_THREADS_COLLECTION, aI as AccessConfig, aJ as AccessFunction, aK as AccessFunctionArgs, aL as AccessResult, aM as AccessRule, aN as ActionConfig, aO as ActionConfigBase, aP as ActionConfigWithHandler, aQ as ActionConfigWithMutation, aR as ActionContext, aS as ActionType, aT as AdminAuthAccessResolution, aU as AdminAuthClaimMapping, aV as AdminAuthMember, aW as AdminAuthProvider, aX as AdminAuthProviderMembersConfig, aY as AdminAuthProvisioningMode, aZ as AdminAuthResolveAccessArgs, a_ as AdminAuthResolvedIdentity, a$ as AdminDashboardComponentSlots, b0 as AdminIconName, b1 as AdminStrings, b2 as AggregateArgs, b3 as AggregateCastType, b4 as AggregateCollectionResult, b5 as AggregateInput, b6 as AggregateOperation, b7 as AggregateResult, b8 as AppTrashConfig, b9 as BaseAdminAuthProvider, ba as BaseFieldAdmin, bb as BlockVariant, bc as BlocksField, bd as BooleanFieldAdmin, be as BooleanFormat, bf as CURRENT_NAV_PREFERENCES_VERSION, bg as CUSTOM_VIEW_FETCH_ALL_LIMIT, bh as CalendarViewConfig, bi as CardsViewConfig, bj as CharacterLimitFieldAdmin, bk as CharacterLimitFieldConfig, bl as CollectionAfterChangeHook, bm as CollectionAfterDeleteHook, bn as CollectionAfterReadHook, bo as CollectionAfterReadHookEntry, bp as CollectionAfterRestoreHook, bq as CollectionAfterTransitionHook, br as CollectionAfterTrashHook, bs as CollectionBeforeChangeHook, bt as CollectionBeforeChangeHookEntry, bu as CollectionBeforeCommitHook, bv as CollectionBeforeDeleteHook, bw as CollectionBeforeReadHook, bx as CollectionBeforeReadHookEntry, by as CollectionBeforeRestoreHook, bz as CollectionBeforeTransitionHook, bA as CollectionBeforeTrashHook, bB as CollectionEmailConfig, bC as CollectionIndex, bD as CollectionListComponentSlots, bE as CollectionRAGConfig, bF as CollectionSchemaResult, bG as CollectionSummaryResult, bH as CollectionViewComponentSlots, bI as CompiledNavGroup, bJ as CountOperation, bK as CustomAdminAuthProvider, bL as CustomViewConfig, bM as CustomViewDataConfig, bN as DEFAULT_USER_NAV_PREFERENCES, bO as DateFieldAdmin, bP as DateFormat, bQ as DefaultValueContext, bR as DefineActionOptions, bS as DefineCalendarViewOptions, bT as DefineCardsViewOptions, bU as DefineCustomViewOptions, bV as DefineGanttViewOptions, bW as DefineKanbanViewOptions, bX as DefinePageInput, bY as DefineTableViewOptions, bZ as DefineViewBaseOptions, b_ as DefineViewOptions, b$ as DetailSpan, c0 as DisplayTone, c1 as DisplayVariant, c2 as DistinctCountOperation, c3 as DistinctValuesOperation, c4 as DocumentFormComponentSlots, c5 as DynamicOptionItem, c6 as DynamicOptionsConfig, c7 as DynamicOptionsResolver, c8 as DynamicOptionsResolverArgs, c9 as DyrectedAIContext, ca as DyrectedLoggerConfig, cb as DyrectedObservabilityConfig, cc as EmailFieldAdmin, cd as EmailTemplateArgs, ce as EmailTemplateResult, cf as FORM_SHELLS, cg as FieldAdminHooks, ch as FieldAdminOnChangeHook, ci as FieldAdminOnChangeHookArgs, cj as FieldAdminOptionsHook, ck as FieldAdminOptionsHookArgs, cl as FieldAdminOptionsHookResult, cm as FieldAfterReadHook, cn as FieldAfterReadHookArgs, co as FieldBase, cp as FieldBeforeChangeHook, cq as FieldBeforeChangeHookArgs, cr as FieldHook, cs as FieldHooks, ct as FileData, cu as FormShell, cv as GanttViewConfig, cw as GetDocumentResult, cx as GlobalAfterChangeHook, cy as GlobalAfterReadHook, cz as GlobalAfterReadHookEntry, cA as GlobalBeforeChangeHook, cB as GlobalBeforeChangeHookEntry, cC as GlobalBeforeReadHook, cD as GlobalBeforeReadHookEntry, cE as GlobalFormComponentSlots, cF as GlobalRAGConfig, cG as GlobalSchemaResult, cH as GlobalSummaryResult, cI as HeadingLevel, cJ as HookFunction, cK as IconFieldAdmin, cL as ImageService, cM as ImageTransformOptions, cN as InferAggregateResult, cO as JoinFieldAdmin, cP as JsonFieldAdmin, cQ as JsonFormat, cR as KanbanViewConfig, cS as LIFECYCLE_EVENT_NAMES, cT as LifecycleEventHandler, cU as LinkFormat, cV as MetricColor, cW as MoneyFieldAdmin, cX as MoneyFieldConfig, cY as MultiSelectFieldAdmin, cZ as NAVIGATION_POLICY_KEY, c_ as NamedAccessPolicy, c$ as NavBadgeConfig, d0 as NavGroup, d1 as NumberFieldAdmin, d2 as NumberFormat, d3 as NumberLimitFieldAdmin, d4 as NumberLimitFieldConfig, d5 as NumericOperation, d6 as NumericUpdateOperator, d7 as OIDCAdminAuthProvider, d8 as OptionFormat, d9 as OutboundEmail, da as PageAction, db as PageBreadcrumbItem, dc as PageConfig, dd as PaginatedResult, de as PinnedNavItemRef, df as PublicAdminAuthProvider, dg as QueryCollectionResult, dh as RAGSearchResult, di as RadioFieldAdmin, dj as RateLimitConfig, dk as ReadonlyDatabaseAdapter, dl as RichTextFeature, dm as RichTextFieldConfig, dn as SelectFieldAdmin, dp as SqlWhereResult, dq as StorageAdapter, dr as TableViewConfig, ds as TaskContext, dt as TaskLogger, du as TaskRunStatus, dv as TextFieldAdmin, dw as TextFormat, dx as TextareaFieldAdmin, dy as TrashConfig, dz as TrustProxyConfig, dA as TypedField, dB as UploadConfig, dC as UrlFieldAdmin, dD as UrlLinkValue, dE as ViewActionFeatures, dF as ViewComponentSlots, dG as ViewConfigBase, dH as ViewLayout, dI as ViewMetric, dJ as ViewMetricGroupBy, dK as ViewMetricGroupByConfig, dL as ViewMetricTrendConfig, dM as ViewSubMetric, dN as WhereClause, dO as WhereOperator, dP as WhereOperatorName, dQ as WordLimitFieldAdmin, dR as WordLimitFieldConfig, dS as WorkflowMetadata, dT as WorkflowOnTransitionContext, dU as WorkflowOnTransitionHook, dV as WorkflowRole, dW as WorkflowState, dX as WorkflowTransitionContext, dY as coerceBooleanWhere, dZ as defineAction, d_ as defineCalendarView, d$ as defineCardsView, e0 as defineCustomView, e1 as defineGanttView, e2 as defineKanbanView, e3 as definePage, e4 as defineTableView, e5 as defineView, e6 as defineWorkspace, e7 as isAICollection, e8 as parseMongoWhere, e9 as parseSqlWhere } from './app-Ti5woUOq.cjs';
|
|
3
3
|
import jexl from 'jexl';
|
|
4
4
|
import { Context } from 'hono';
|
|
5
5
|
export { z } from 'zod';
|
|
@@ -1537,7 +1537,9 @@ interface ReconciledNavTree extends CompiledNavTree {
|
|
|
1537
1537
|
* Reconciles developer-defined navigation tree from code (`baseTree`)
|
|
1538
1538
|
* with operator personal/role preferences (`prefs`), ensuring:
|
|
1539
1539
|
* 1. Sparse delta merging (newly deployed code resources are never dropped).
|
|
1540
|
-
* 2. User-created custom groups and operational workspaces are injected.
|
|
1540
|
+
* 2. User-created custom groups and operational workspaces are injected. Items
|
|
1541
|
+
* already in the server tree keep the server's `access` and `badge`; a
|
|
1542
|
+
* preference can never replace them. Injected items are flagged `userDefined`.
|
|
1541
1543
|
* 3. User visibility overrides (`hidden`) are respected.
|
|
1542
1544
|
* 4. User ordering overrides (`groupOrder`, `itemOrder`) are applied.
|
|
1543
1545
|
* 5. Pinned favorite shortcuts are extracted.
|
|
@@ -1550,12 +1552,46 @@ interface ReconcileNavigationOptions {
|
|
|
1550
1552
|
* If false (default), hidden groups, items, and views are omitted.
|
|
1551
1553
|
*/
|
|
1552
1554
|
includeHidden?: boolean;
|
|
1555
|
+
/**
|
|
1556
|
+
* If false, preferences can only reorder, rename, regroup or hide items that
|
|
1557
|
+
* already exist in the base tree. Items and pins the base tree does not contain
|
|
1558
|
+
* are ignored. Use this when the server has locked the user's menu to a role
|
|
1559
|
+
* policy. Defaults to true.
|
|
1560
|
+
*/
|
|
1561
|
+
allowUserItems?: boolean;
|
|
1553
1562
|
}
|
|
1554
1563
|
declare function reconcileNavigation(baseTree: CompiledNavTree | null | undefined, prefs: UserNavigationPreferences | null | undefined, schemas?: {
|
|
1555
1564
|
collections?: Array<any>;
|
|
1556
1565
|
globals?: Array<any>;
|
|
1557
1566
|
}, options?: ReconcileNavigationOptions): ReconciledNavTree;
|
|
1558
1567
|
|
|
1568
|
+
/**
|
|
1569
|
+
* Reduces a navigation preference to the parts that are safe to share as a
|
|
1570
|
+
* role or global default: ordering, hiding, groups, and regrouped items that
|
|
1571
|
+
* already exist in the server tree. Pinned shortcuts and any item the server
|
|
1572
|
+
* tree does not contain (the publisher's own workspaces) are dropped, so
|
|
1573
|
+
* publishing a layout can never smuggle the publisher's items to other users.
|
|
1574
|
+
*/
|
|
1575
|
+
declare function sanitizeNavigationLayout(prefs: UserNavigationPreferences | null | undefined, tree: CompiledNavTree): UserNavigationPreferences;
|
|
1576
|
+
/**
|
|
1577
|
+
* Validates a stored or submitted role policy and returns a normalised copy,
|
|
1578
|
+
* or `null` when the value is not a policy.
|
|
1579
|
+
*/
|
|
1580
|
+
declare function parseNavigationRolePolicy(value: unknown, tree: CompiledNavTree): NavigationRolePolicy | null;
|
|
1581
|
+
/**
|
|
1582
|
+
* Applies the role menu policies that govern a user to their access-pruned tree.
|
|
1583
|
+
*
|
|
1584
|
+
* `policies` has one entry per role the user holds: the role's policy, or `null`
|
|
1585
|
+
* when the role has none. The menu is locked only if every role has an enforced
|
|
1586
|
+
* policy; a role without one leaves the user unrestricted, because policy narrows
|
|
1587
|
+
* the menu and never grants access. A locked menu is the union of what the
|
|
1588
|
+
* enforced roles allow, arranged by the first policy's layout.
|
|
1589
|
+
*
|
|
1590
|
+
* `access` is applied before this runs, so a policy can never reveal an item the
|
|
1591
|
+
* user cannot access.
|
|
1592
|
+
*/
|
|
1593
|
+
declare function applyNavigationRolePolicies(tree: CompiledNavTree, policies: Array<NavigationRolePolicy | null | undefined>): CompiledNavTree;
|
|
1594
|
+
|
|
1559
1595
|
/**
|
|
1560
1596
|
* System route prefixes reserved by Dyrected.
|
|
1561
1597
|
* Cannot be used as operational workspace slugs.
|
|
@@ -1731,6 +1767,30 @@ declare function getDefaultEmailTemplate(purpose: "invite" | "resetPassword" | "
|
|
|
1731
1767
|
rawHtml: string;
|
|
1732
1768
|
};
|
|
1733
1769
|
|
|
1770
|
+
type BrandingSource = Pick<AdminConfig, "branding" | "meta" | "strings"> | null | undefined;
|
|
1771
|
+
/**
|
|
1772
|
+
* The name of the product as editors should see it.
|
|
1773
|
+
*
|
|
1774
|
+
* Resolution order: `branding.appName`, `branding.logoText`, then the name inside
|
|
1775
|
+
* `meta.titleSuffix` (without its leading `-` or `—`). Returns an empty string when
|
|
1776
|
+
* none is set. It never returns "Dyrected", so white-labelled products do not show
|
|
1777
|
+
* the underlying CMS name; callers decide what neutral wording to use instead.
|
|
1778
|
+
*
|
|
1779
|
+
* @example
|
|
1780
|
+
* resolveAppName({ meta: { titleSuffix: '— Acme Admin' } }) // 'Acme Admin'
|
|
1781
|
+
*/
|
|
1782
|
+
declare function resolveAppName(admin: BrandingSource): string;
|
|
1783
|
+
/**
|
|
1784
|
+
* The text appended to every admin page `<title>`: `meta.titleSuffix` when set,
|
|
1785
|
+
* otherwise `- <app name>`, otherwise an empty string.
|
|
1786
|
+
*/
|
|
1787
|
+
declare function resolveTitleSuffix(admin: BrandingSource): string;
|
|
1788
|
+
/**
|
|
1789
|
+
* Looks up an overridable admin string, replacing `{appName}` with the resolved app name.
|
|
1790
|
+
* Returns `fallback` when the host did not override the key.
|
|
1791
|
+
*/
|
|
1792
|
+
declare function resolveAdminString(admin: BrandingSource, key: AdminStringKey, fallback: string): string;
|
|
1793
|
+
|
|
1734
1794
|
type TopLevelFieldName<TFields extends readonly Field[]> = Extract<TFields[number], {
|
|
1735
1795
|
name: string;
|
|
1736
1796
|
}>["name"];
|
|
@@ -2390,4 +2450,4 @@ declare function defineTab<const T extends readonly Field[]>(args: {
|
|
|
2390
2450
|
fields: T;
|
|
2391
2451
|
}): T;
|
|
2392
2452
|
|
|
2393
|
-
export { AIConfig, type AIErrorCode, AIPIIConfig, type AccessConditions, AccessPolicyResolver, AdminAuthConfig, type AdminComponentsValidationIssue, ArrayField, AuthConfig, type AuthDocFields, AuthenticatedUser, BASE62_ALPHABET, BUILTIN_JEXL_HELPERS, BaseDocument, Block, BooleanField, CROCKFORD_BASE32, CollectionConfig, CompiledNavItem, CompiledNavTree, ComputedHandler, type ConfigDiagnostic, ConfigValidationError, ConflictError, type CreatedAtFieldOptions, type CreatedByFieldOptions, DatabaseAdapter, DateField, DateTimeField, type DeclarativeAccessSurface, type DeclarativeAccessValidationIssue, type DeclarativeAdminSurface, type DeclarativeAdminValidationIssue, DeclarativeHookExpression, type DeclarativeHookSurface, type DeclarativeHookValidationIssue, type DeclarativePreviewSurface, type DeclarativePreviewValidationIssue, DefineWorkspaceOptions, DetailAction, DetailActionOptions, DetailComputed, DetailComputedOptions, DetailCustom, DetailCustomOptions, DetailDivider, DetailDividerOptions, DetailField, DetailGrid, DetailGridOptions, DetailItem, DetailRepeat, DetailRepeatOptions, DetailSchema, DetailSection, DetailSectionOptions, DetailTab, DetailTabOptions, DetailTabs, DetailTabsOptions, DetailText, DetailTextOptions, DisplayFieldOptions, DuplicateKeyError, DyrectedAIError, DyrectedConfig, DyrectedError, EMAIL_TEMPLATES_COLLECTION_CONFIG, EMAIL_TEMPLATES_COLLECTION_SLUG, EmailField, type ExprFunction, type ExtractCollectionSlugs, Field, FieldConditionBuilder, FieldType, ForbiddenError, type GenerateIdOptions, GlobalConfig, HookRequestContext, INTERNAL_SYSTEM_COLLECTIONS, IconField, IdStrategy, ImageField, type InferDocShape, JoinField, JsonField, LIFECYCLE_EVENTS_COLLECTION, type LayoutOptions, LifecycleEvent, LifecycleEventName, MatchBuilder, MoneyField, MultiSelectField, NANOID_ALPHABET, NON_NEGOTIABLE_CREDENTIAL_FIELDS, NotFoundError, NumberField, ObjectField, PII_REGEX_PATTERNS, type Prettify, PublicAdminAuthConfig, type PublishingWorkflowOptions, RESERVED_NAVIGATION_SLUGS, RadioField, type ReconcileNavigationOptions, type ReconciledNavTree, type ReferencedComponentKeys, RelationshipField, type ResolvedTrashConfig, type RestoreDocumentOptions, RichTextField, type RoleOption, type RolesFieldOptions, RowField, type SanitizeDocForAIOptions, SelectField, type SoftDeleteOptions, type SortClause, type SortDirection, type SqlSortDialect, type SystemDocFields, TASK_LOCKS_COLLECTION, TASK_LOCKS_COLLECTION_CONFIG, TRASH_COLLECTION, TRASH_COLLECTION_CONFIG, TaskConfig, TaskRunResult, type TaskRunner, type TemplateBlock, TextField, TextareaField, TimeField, UNASSIGNED_GROUP_KEY, type UpdatedAtFieldOptions, type UpdatedByFieldOptions, type UploadDocFields, UrlField, UserNavigationPreferences, ValidationError, ViewConfig, WORKFLOW_HISTORY_COLLECTION, type WhenFunction, WorkflowConfig, WorkflowTransition, abs, addDays, alertBox, asCollection, assertValidAdminConditionsInConfig, assertValidDeclarativeAccessInConfig, assertValidDeclarativeHookExpression, assertValidDeclarativeHookResult, assertValidDeclarativeHooksInConfig, assertValidNavigationSlugs, assertValidPreviewUrlsInConfig, assertValidTrashInConfig, availableWorkflowTransitions, buildSqlOrderBy, canViewWorkflowDraft, capitalize, ceil, clamp, coalesce, collectAdminComponentsValidationIssues, collectAdminConditionValidationIssues, collectConfigDiagnostics, collectDeclarativeAccessValidationIssues, collectDeclarativeHookValidationIssues, collectPreviewUrlValidationIssues, collectReferencedComponentKeys, compact, compileNavigation, count, createLifecycleEvent, createTaskRunner, createTrashPurgeTask, createWorkflowDocument, ctaButton, defaultValue, defineArrayField, defineBlock, defineBlocksField, defineBooleanField, defineCollection, defineConfig, defineCreatedAtField, defineCreatedByField, defineDateField, defineDateTimeField, defineEmailField, defineField, defineGlobal, defineIconField, defineImageField, defineJoinField, defineJsonField, defineMoneyField, defineMultiSelectField, defineNumberField, defineObjectField, definePublishingWorkflow, defineRadioField, defineRelationshipField, defineRichTextField, defineRoles, defineRolesField, defineRowField, defineSelectField, defineTab, defineTask, defineTextField, defineTextareaField, defineTimeField, defineUpdatedAtField, defineUpdatedByField, defineUrlField, detailBox, diffDays, dispatchLifecycleEvent, dispatchPendingLifecycleEvents, displayAction, displayComputed, displayCustom, displayCustomComponent, displayDivider, displayField, displayGrid, displayRepeat, displaySection, displayTab, displayTabs, displayText, divider, emailTokens, endsWith, escapeHtml, evaluateDetailComputed, evaluateJexl, evaluateJexlSync, eventList, executeFieldAfterRead, executeFieldBeforeChange, expr, first, floor, formatConfigDiagnostics, formatDate, formatJexlValue, generateDefaultDetailSchema, generateDocumentId, generateId, generateOpenApi, get, getAdminAuthCollection, getAdminRoleForCollection, getAllowedSitesForUser, getDefaultEmailTemplate, getPublicAdminAuthConfig, getTrashEntryId, heading, includes, initializeWorkflowDocument, isConfigValidationError, isDetailItemVisible, isEmpty, isFuture, isPast, isSiteAuthorized, isUserAdmin, join, last, layout, length, lower, maskEmail, maskPhone, maskTextPII, materializeWorkflowDocument, max, min, nanoid, nextCronRun, normalizeConfig, normalizeDetailItem, normalizeGroupKey, now, numericFieldNames, paragraph, parseCron, parseSort, pow, prefixedId, pruneNavigationByAccess, pruneNavigationForUser, publishedStateName, publishingWorkflow, readingTime, reconcileNavigation, registerJexlHelpers, replace, resolveAdminAuthCollection, resolveAllCollectionViews, resolveAuthorizedSiteId, resolveBlocks, resolveDocumentTitle, resolveIndexName, resolvePrefix, resolveTrashConfig, restoreDocument, round, row, runCollectionHooks, safeLinkDetailBox, sanitizeDocForAI, saveWorkflowDraft, sectionLabel, simplePublishingWorkflow, slugify, softDeleteDocument, spacer, sqrt, startsWith, sum, table, today, transitionWorkflow, trim, truncate, ulid, unique, upper, uuid, validateAdminConditionExpression, validateDeclarativeAccessExpression, validateDeclarativeHookExpression, validatePreviewUrlExpression, when, wordCount, workflowCapabilities };
|
|
2453
|
+
export { AIConfig, type AIErrorCode, AIPIIConfig, type AccessConditions, AccessPolicyResolver, AdminAuthConfig, type AdminComponentsValidationIssue, AdminConfig, AdminStringKey, ArrayField, AuthConfig, type AuthDocFields, AuthenticatedUser, BASE62_ALPHABET, BUILTIN_JEXL_HELPERS, BaseDocument, Block, BooleanField, CROCKFORD_BASE32, CollectionConfig, CompiledNavItem, CompiledNavTree, ComputedHandler, type ConfigDiagnostic, ConfigValidationError, ConflictError, type CreatedAtFieldOptions, type CreatedByFieldOptions, DatabaseAdapter, DateField, DateTimeField, type DeclarativeAccessSurface, type DeclarativeAccessValidationIssue, type DeclarativeAdminSurface, type DeclarativeAdminValidationIssue, DeclarativeHookExpression, type DeclarativeHookSurface, type DeclarativeHookValidationIssue, type DeclarativePreviewSurface, type DeclarativePreviewValidationIssue, DefineWorkspaceOptions, DetailAction, DetailActionOptions, DetailComputed, DetailComputedOptions, DetailCustom, DetailCustomOptions, DetailDivider, DetailDividerOptions, DetailField, DetailGrid, DetailGridOptions, DetailItem, DetailRepeat, DetailRepeatOptions, DetailSchema, DetailSection, DetailSectionOptions, DetailTab, DetailTabOptions, DetailTabs, DetailTabsOptions, DetailText, DetailTextOptions, DisplayFieldOptions, DuplicateKeyError, DyrectedAIError, DyrectedConfig, DyrectedError, EMAIL_TEMPLATES_COLLECTION_CONFIG, EMAIL_TEMPLATES_COLLECTION_SLUG, EmailField, type ExprFunction, type ExtractCollectionSlugs, Field, FieldConditionBuilder, FieldType, ForbiddenError, type GenerateIdOptions, GlobalConfig, HookRequestContext, INTERNAL_SYSTEM_COLLECTIONS, IconField, IdStrategy, ImageField, type InferDocShape, JoinField, JsonField, LIFECYCLE_EVENTS_COLLECTION, type LayoutOptions, LifecycleEvent, LifecycleEventName, MatchBuilder, MoneyField, MultiSelectField, NANOID_ALPHABET, NON_NEGOTIABLE_CREDENTIAL_FIELDS, NavigationRolePolicy, NotFoundError, NumberField, ObjectField, PII_REGEX_PATTERNS, type Prettify, PublicAdminAuthConfig, type PublishingWorkflowOptions, RESERVED_NAVIGATION_SLUGS, RadioField, type ReconcileNavigationOptions, type ReconciledNavTree, type ReferencedComponentKeys, RelationshipField, type ResolvedTrashConfig, type RestoreDocumentOptions, RichTextField, type RoleOption, type RolesFieldOptions, RowField, type SanitizeDocForAIOptions, SelectField, type SoftDeleteOptions, type SortClause, type SortDirection, type SqlSortDialect, type SystemDocFields, TASK_LOCKS_COLLECTION, TASK_LOCKS_COLLECTION_CONFIG, TRASH_COLLECTION, TRASH_COLLECTION_CONFIG, TaskConfig, TaskRunResult, type TaskRunner, type TemplateBlock, TextField, TextareaField, TimeField, UNASSIGNED_GROUP_KEY, type UpdatedAtFieldOptions, type UpdatedByFieldOptions, type UploadDocFields, UrlField, UserNavigationPreferences, ValidationError, ViewConfig, WORKFLOW_HISTORY_COLLECTION, type WhenFunction, WorkflowConfig, WorkflowTransition, abs, addDays, alertBox, applyNavigationRolePolicies, asCollection, assertValidAdminConditionsInConfig, assertValidDeclarativeAccessInConfig, assertValidDeclarativeHookExpression, assertValidDeclarativeHookResult, assertValidDeclarativeHooksInConfig, assertValidNavigationSlugs, assertValidPreviewUrlsInConfig, assertValidTrashInConfig, availableWorkflowTransitions, buildSqlOrderBy, canViewWorkflowDraft, capitalize, ceil, clamp, coalesce, collectAdminComponentsValidationIssues, collectAdminConditionValidationIssues, collectConfigDiagnostics, collectDeclarativeAccessValidationIssues, collectDeclarativeHookValidationIssues, collectPreviewUrlValidationIssues, collectReferencedComponentKeys, compact, compileNavigation, count, createLifecycleEvent, createTaskRunner, createTrashPurgeTask, createWorkflowDocument, ctaButton, defaultValue, defineArrayField, defineBlock, defineBlocksField, defineBooleanField, defineCollection, defineConfig, defineCreatedAtField, defineCreatedByField, defineDateField, defineDateTimeField, defineEmailField, defineField, defineGlobal, defineIconField, defineImageField, defineJoinField, defineJsonField, defineMoneyField, defineMultiSelectField, defineNumberField, defineObjectField, definePublishingWorkflow, defineRadioField, defineRelationshipField, defineRichTextField, defineRoles, defineRolesField, defineRowField, defineSelectField, defineTab, defineTask, defineTextField, defineTextareaField, defineTimeField, defineUpdatedAtField, defineUpdatedByField, defineUrlField, detailBox, diffDays, dispatchLifecycleEvent, dispatchPendingLifecycleEvents, displayAction, displayComputed, displayCustom, displayCustomComponent, displayDivider, displayField, displayGrid, displayRepeat, displaySection, displayTab, displayTabs, displayText, divider, emailTokens, endsWith, escapeHtml, evaluateDetailComputed, evaluateJexl, evaluateJexlSync, eventList, executeFieldAfterRead, executeFieldBeforeChange, expr, first, floor, formatConfigDiagnostics, formatDate, formatJexlValue, generateDefaultDetailSchema, generateDocumentId, generateId, generateOpenApi, get, getAdminAuthCollection, getAdminRoleForCollection, getAllowedSitesForUser, getDefaultEmailTemplate, getPublicAdminAuthConfig, getTrashEntryId, heading, includes, initializeWorkflowDocument, isConfigValidationError, isDetailItemVisible, isEmpty, isFuture, isPast, isSiteAuthorized, isUserAdmin, join, last, layout, length, lower, maskEmail, maskPhone, maskTextPII, materializeWorkflowDocument, max, min, nanoid, nextCronRun, normalizeConfig, normalizeDetailItem, normalizeGroupKey, now, numericFieldNames, paragraph, parseCron, parseNavigationRolePolicy, parseSort, pow, prefixedId, pruneNavigationByAccess, pruneNavigationForUser, publishedStateName, publishingWorkflow, readingTime, reconcileNavigation, registerJexlHelpers, replace, resolveAdminAuthCollection, resolveAdminString, resolveAllCollectionViews, resolveAppName, resolveAuthorizedSiteId, resolveBlocks, resolveDocumentTitle, resolveIndexName, resolvePrefix, resolveTitleSuffix, resolveTrashConfig, restoreDocument, round, row, runCollectionHooks, safeLinkDetailBox, sanitizeDocForAI, sanitizeNavigationLayout, saveWorkflowDraft, sectionLabel, simplePublishingWorkflow, slugify, softDeleteDocument, spacer, sqrt, startsWith, sum, table, today, transitionWorkflow, trim, truncate, ulid, unique, upper, uuid, validateAdminConditionExpression, validateDeclarativeAccessExpression, validateDeclarativeHookExpression, validatePreviewUrlExpression, when, wordCount, workflowCapabilities };
|