@cosmicdrift/kumiko-framework 0.417.0 → 0.418.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/agents/api/framework-engine.md +1 -0
- package/agents/api/framework-ui-types.md +14 -5
- package/agents/api/renderer-web.md +1 -0
- package/agents/api/types.md +27 -4
- package/agents/api.md +1 -1
- package/agents/boot-rules.md +20 -0
- package/agents/examples/crypto-shredding-hr.md +2 -2
- package/agents/examples/list-table-options.md +275 -7
- package/agents/features.md +1 -1
- package/dist/api/server-boot-checks.d.ts +1 -0
- package/dist/api/server-boot-checks.js +25 -0
- package/dist/api/server-rate-limit-wiring.js +2 -1
- package/dist/engine/boot-validator/action-form-preview-rules.d.ts +22 -0
- package/dist/engine/boot-validator/action-form-preview-rules.js +22 -0
- package/dist/engine/boot-validator/action-form-preview.d.ts +2 -0
- package/dist/engine/boot-validator/action-form-preview.js +54 -0
- package/dist/engine/boot-validator/boot-rules.d.ts +76 -0
- package/dist/engine/boot-validator/boot-rules.js +2 -0
- package/dist/engine/boot-validator/config-key-rules.d.ts +5 -0
- package/dist/engine/boot-validator/config-key-rules.js +5 -0
- package/dist/engine/boot-validator/date-only-after-days.d.ts +4 -0
- package/dist/engine/boot-validator/date-only-after-days.js +32 -0
- package/dist/engine/boot-validator/entity-handler.d.ts +1 -0
- package/dist/engine/boot-validator/entity-handler.js +1 -1
- package/dist/engine/boot-validator/list-bulk-actions-rules.d.ts +40 -0
- package/dist/engine/boot-validator/list-bulk-actions-rules.js +40 -0
- package/dist/engine/boot-validator/list-bulk-actions.d.ts +2 -1
- package/dist/engine/boot-validator/list-bulk-actions.js +79 -9
- package/dist/engine/boot-validator/query-output-columns.js +25 -2
- package/dist/engine/boot-validator/query-refs.js +3 -0
- package/dist/engine/boot-validator/screens-actions.d.ts +6 -1
- package/dist/engine/boot-validator/screens-actions.js +2 -2
- package/dist/engine/boot-validator/screens-forms.js +2 -0
- package/dist/engine/boot-validator/screens-kind-entity-list.js +2 -2
- package/dist/engine/boot-validator/screens-kind-projection-list.js +1 -1
- package/dist/engine/boot-validator/screens-kind-shared.d.ts +1 -1
- package/dist/engine/boot-validator/screens-kind-shared.js +3 -1
- package/dist/engine/boot-validator/screens-lists-rules.d.ts +10 -0
- package/dist/engine/boot-validator/screens-lists-rules.js +10 -0
- package/dist/engine/boot-validator/screens-lists.js +13 -1
- package/dist/engine/boot-validator/url-prefill-fields.js +8 -1
- package/dist/engine/boot-validator/zod-shape.d.ts +1 -0
- package/dist/engine/boot-validator/zod-shape.js +7 -0
- package/dist/engine/build-config-feature-schema.js +5 -1
- package/dist/engine/types/screen.d.ts +1 -1
- package/dist/engine/types/screen.js +1 -1
- package/dist/i18n/required-surface-keys.js +47 -13
- package/dist/ui-types/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/changes.json +30 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPayloadDigest, createRateLimitResolver } from "../rate-limit/index.js";
|
|
2
|
-
import { assertNoPayloadRateLimitsWithoutResolver, warnUnlimitedSystemScopeFeatures, } from "./server-boot-checks.js";
|
|
2
|
+
import { assertNoPayloadRateLimitsWithoutResolver, warnNonIpRateLimitsWithoutResolver, warnUnlimitedSystemScopeFeatures, } from "./server-boot-checks.js";
|
|
3
3
|
export function resolveServerRateLimit(options, tracedRedis, bootLog) {
|
|
4
4
|
// Auto-wire the rate-limit resolver, but ONLY when at least one
|
|
5
5
|
// handler actually declared a rateLimit option. Apps that don't use
|
|
@@ -22,6 +22,7 @@ export function resolveServerRateLimit(options, tracedRedis, bootLog) {
|
|
|
22
22
|
(tracedRedis && wantsResolver ? createRateLimitResolver({ redis: tracedRedis }) : undefined);
|
|
23
23
|
if (!rateLimitResolver) {
|
|
24
24
|
assertNoPayloadRateLimitsWithoutResolver(options.registry);
|
|
25
|
+
warnNonIpRateLimitsWithoutResolver(options.registry, bootLog);
|
|
25
26
|
warnUnlimitedSystemScopeFeatures(options.registry, bootLog);
|
|
26
27
|
}
|
|
27
28
|
return { resolver: rateLimitResolver, middlewareRequested: wantsL1L2, payloadDigest };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const ACTION_FORM_PREVIEW_RULES: {
|
|
2
|
+
readonly fieldUnknown: {
|
|
3
|
+
readonly id: "action-form-preview/field-unknown";
|
|
4
|
+
readonly summary: "preview.fields names fields of the form.";
|
|
5
|
+
readonly fix: "Name an existing field of the form, or drop fields to send all of them.";
|
|
6
|
+
};
|
|
7
|
+
readonly labelMissing: {
|
|
8
|
+
readonly id: "action-form-preview/label-missing";
|
|
9
|
+
readonly summary: "Every preview fact and list column has a label.";
|
|
10
|
+
readonly fix: "Add label: the i18n key of the fact or column header.";
|
|
11
|
+
};
|
|
12
|
+
readonly listFieldMissing: {
|
|
13
|
+
readonly id: "action-form-preview/list-field-missing";
|
|
14
|
+
readonly summary: "preview.list names the result field of its rows and at least one column.";
|
|
15
|
+
readonly fix: "Set list.field to the array in the query result and list the columns to show.";
|
|
16
|
+
};
|
|
17
|
+
readonly empty: {
|
|
18
|
+
readonly id: "action-form-preview/empty";
|
|
19
|
+
readonly summary: "A preview shows facts or a list.";
|
|
20
|
+
readonly fix: "Add facts or list, or remove preview.";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const ACTION_FORM_PREVIEW_RULES = {
|
|
2
|
+
fieldUnknown: {
|
|
3
|
+
id: "action-form-preview/field-unknown",
|
|
4
|
+
summary: "preview.fields names fields of the form.",
|
|
5
|
+
fix: "Name an existing field of the form, or drop fields to send all of them.",
|
|
6
|
+
},
|
|
7
|
+
labelMissing: {
|
|
8
|
+
id: "action-form-preview/label-missing",
|
|
9
|
+
summary: "Every preview fact and list column has a label.",
|
|
10
|
+
fix: "Add label: the i18n key of the fact or column header.",
|
|
11
|
+
},
|
|
12
|
+
listFieldMissing: {
|
|
13
|
+
id: "action-form-preview/list-field-missing",
|
|
14
|
+
summary: "preview.list names the result field of its rows and at least one column.",
|
|
15
|
+
fix: "Set list.field to the array in the query result and list the columns to show.",
|
|
16
|
+
},
|
|
17
|
+
empty: {
|
|
18
|
+
id: "action-form-preview/empty",
|
|
19
|
+
summary: "A preview shows facts or a list.",
|
|
20
|
+
fix: "Add facts or list, or remove preview.",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ACTION_FORM_PREVIEW_RULES } from "./action-form-preview-rules.js";
|
|
2
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
3
|
+
function isBlank(value) {
|
|
4
|
+
return typeof value !== "string" || value === "";
|
|
5
|
+
}
|
|
6
|
+
function validateSentFields(where, preview, fieldNames) {
|
|
7
|
+
for (const field of preview.fields ?? []) {
|
|
8
|
+
if (fieldNames.has(field))
|
|
9
|
+
continue;
|
|
10
|
+
throw bootRuleError(ACTION_FORM_PREVIEW_RULES.fieldUnknown, {
|
|
11
|
+
message: `${where} sends field "${field}", which the form does not declare. Form fields: ${[...fieldNames].sort().join(", ") || "(none)"}.`,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function validateFacts(where, facts) {
|
|
16
|
+
for (const fact of facts) {
|
|
17
|
+
if (!isBlank(fact.label))
|
|
18
|
+
continue;
|
|
19
|
+
throw bootRuleError(ACTION_FORM_PREVIEW_RULES.labelMissing, {
|
|
20
|
+
message: `${where} fact "${fact.field}" needs label: the i18n key shown before the value.`,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function validateList(where, list) {
|
|
25
|
+
if (isBlank(list.field) || list.columns.length === 0) {
|
|
26
|
+
throw bootRuleError(ACTION_FORM_PREVIEW_RULES.listFieldMissing, {
|
|
27
|
+
message: `${where} list needs field (the array in the query result) and at least one column.`,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
for (const column of list.columns) {
|
|
31
|
+
if (!isBlank(column.label))
|
|
32
|
+
continue;
|
|
33
|
+
throw bootRuleError(ACTION_FORM_PREVIEW_RULES.labelMissing, {
|
|
34
|
+
message: `${where} list column "${column.field}" needs label: the i18n key of its header.`,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function validateActionFormPreview(featureName, screenId, screen, fieldNames) {
|
|
39
|
+
const { preview } = screen;
|
|
40
|
+
// skip: no preview declared
|
|
41
|
+
if (preview === undefined)
|
|
42
|
+
return;
|
|
43
|
+
const where = `[Feature ${featureName}] Screen "${screenId}" (actionForm) preview`;
|
|
44
|
+
validateSentFields(where, preview, fieldNames);
|
|
45
|
+
const facts = preview.facts ?? [];
|
|
46
|
+
if (facts.length === 0 && preview.list === undefined) {
|
|
47
|
+
throw bootRuleError(ACTION_FORM_PREVIEW_RULES.empty, {
|
|
48
|
+
message: `${where} has neither facts nor list, so the panel would stay empty. Add facts: [{ field, label }] or list: { field, columns }.`,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
validateFacts(where, facts);
|
|
52
|
+
if (preview.list !== undefined)
|
|
53
|
+
validateList(where, preview.list);
|
|
54
|
+
}
|
|
@@ -1364,6 +1364,16 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
1364
1364
|
readonly summary: "relatedList toolbarActions use visible instead of visibleWhen.";
|
|
1365
1365
|
readonly fix: "Use visible, a condition on the enclosing record.";
|
|
1366
1366
|
};
|
|
1367
|
+
readonly dateOnlyAfterDaysInvalid: {
|
|
1368
|
+
readonly id: "list/date-only-after-days-invalid";
|
|
1369
|
+
readonly summary: "A column's dateOnlyAfterDays is a non-negative whole number of days.";
|
|
1370
|
+
readonly fix: "Set dateOnlyAfterDays to 0 or a positive integer.";
|
|
1371
|
+
};
|
|
1372
|
+
readonly dateOnlyAfterDaysWrongType: {
|
|
1373
|
+
readonly id: "list/date-only-after-days-wrong-type";
|
|
1374
|
+
readonly summary: "dateOnlyAfterDays sits on a timestamp, locatedTimestamp or date column or a relativeTime column.";
|
|
1375
|
+
readonly fix: "Remove dateOnlyAfterDays from the column or point it at a timestamp, locatedTimestamp or date field.";
|
|
1376
|
+
};
|
|
1367
1377
|
readonly columnSortableInert: {
|
|
1368
1378
|
readonly id: "list/column-sortable-inert";
|
|
1369
1379
|
readonly summary: "A column only sets sortable where the screen type honors it.";
|
|
@@ -2885,6 +2895,67 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2885
2895
|
readonly summary: "Bulk actions run one server write per row, so they point at writeHandler row actions.";
|
|
2886
2896
|
readonly fix: "Point rowAction at a writeHandler row action.";
|
|
2887
2897
|
};
|
|
2898
|
+
readonly formLabelMissing: {
|
|
2899
|
+
readonly id: "list-bulk/form-label-missing";
|
|
2900
|
+
readonly summary: "A bulk form action has a label (i18n key) for its button.";
|
|
2901
|
+
readonly fix: "Set label to an i18n key.";
|
|
2902
|
+
};
|
|
2903
|
+
readonly formScreenMissing: {
|
|
2904
|
+
readonly id: "list-bulk/form-screen-missing";
|
|
2905
|
+
readonly summary: "A bulk form action names the screen it opens in screen.";
|
|
2906
|
+
readonly fix: "Set screen to the id of an actionForm screen.";
|
|
2907
|
+
};
|
|
2908
|
+
readonly formScreenUnresolved: {
|
|
2909
|
+
readonly id: "list-bulk/form-screen-unresolved";
|
|
2910
|
+
readonly summary: "A bulk form action's screen resolves to a registered screen.";
|
|
2911
|
+
readonly fix: "Use the id of a screen in this feature or a fully-qualified <feature>:screen:<id>.";
|
|
2912
|
+
};
|
|
2913
|
+
readonly formScreenNotActionForm: {
|
|
2914
|
+
readonly id: "list-bulk/form-screen-not-action-form";
|
|
2915
|
+
readonly summary: "A bulk form action opens an actionForm screen.";
|
|
2916
|
+
readonly fix: "Point screen at an actionForm screen.";
|
|
2917
|
+
};
|
|
2918
|
+
readonly formIdsFieldMissing: {
|
|
2919
|
+
readonly id: "list-bulk/form-ids-field-missing";
|
|
2920
|
+
readonly summary: "A bulk form action names the form field that receives the selected ids.";
|
|
2921
|
+
readonly fix: "Set idsField to a field of the target form.";
|
|
2922
|
+
};
|
|
2923
|
+
readonly formIdsFieldUnknown: {
|
|
2924
|
+
readonly id: "list-bulk/form-ids-field-unknown";
|
|
2925
|
+
readonly summary: "A bulk form action's idsField is a field of the target form.";
|
|
2926
|
+
readonly fix: "Declare the field on the target form or point idsField at a declared one.";
|
|
2927
|
+
};
|
|
2928
|
+
readonly formIdsFieldNotList: {
|
|
2929
|
+
readonly id: "list-bulk/form-ids-field-not-list";
|
|
2930
|
+
readonly summary: 'A bulk form action\'s idsField is a multiSelect field with display: "count".';
|
|
2931
|
+
readonly fix: 'Declare the field as { type: "multiSelect", options: [], display: "count" } on the target form.';
|
|
2932
|
+
};
|
|
2933
|
+
readonly formIdsFieldNotRendered: {
|
|
2934
|
+
readonly id: "list-bulk/form-ids-field-not-rendered";
|
|
2935
|
+
readonly summary: "A bulk form action's idsField is shown by the target form's layout and not sensitive.";
|
|
2936
|
+
readonly fix: "Add the field to the form layout (visible: false hides it but keeps the value) and drop sensitive.";
|
|
2937
|
+
};
|
|
2938
|
+
}, {
|
|
2939
|
+
readonly fieldUnknown: {
|
|
2940
|
+
readonly id: "action-form-preview/field-unknown";
|
|
2941
|
+
readonly summary: "preview.fields names fields of the form.";
|
|
2942
|
+
readonly fix: "Name an existing field of the form, or drop fields to send all of them.";
|
|
2943
|
+
};
|
|
2944
|
+
readonly labelMissing: {
|
|
2945
|
+
readonly id: "action-form-preview/label-missing";
|
|
2946
|
+
readonly summary: "Every preview fact and list column has a label.";
|
|
2947
|
+
readonly fix: "Add label: the i18n key of the fact or column header.";
|
|
2948
|
+
};
|
|
2949
|
+
readonly listFieldMissing: {
|
|
2950
|
+
readonly id: "action-form-preview/list-field-missing";
|
|
2951
|
+
readonly summary: "preview.list names the result field of its rows and at least one column.";
|
|
2952
|
+
readonly fix: "Set list.field to the array in the query result and list the columns to show.";
|
|
2953
|
+
};
|
|
2954
|
+
readonly empty: {
|
|
2955
|
+
readonly id: "action-form-preview/empty";
|
|
2956
|
+
readonly summary: "A preview shows facts or a list.";
|
|
2957
|
+
readonly fix: "Add facts or list, or remove preview.";
|
|
2958
|
+
};
|
|
2888
2959
|
}, {
|
|
2889
2960
|
readonly notRegistered: {
|
|
2890
2961
|
readonly id: "query/not-registered";
|
|
@@ -2978,6 +3049,11 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2978
3049
|
readonly summary: "A config key that declares optionsQueryPayload also declares optionsQuery.";
|
|
2979
3050
|
readonly fix: "Set optionsQuery or remove optionsQueryPayload.";
|
|
2980
3051
|
};
|
|
3052
|
+
readonly maskReadOnlyRequired: {
|
|
3053
|
+
readonly id: "config-key/mask-read-only-required";
|
|
3054
|
+
readonly summary: "A config key is not both mask.readOnly and required, because nobody could fill it.";
|
|
3055
|
+
readonly fix: "Drop required or mask.readOnly.";
|
|
3056
|
+
};
|
|
2981
3057
|
readonly optionsQueryEmpty: {
|
|
2982
3058
|
readonly id: "config-key/options-query-empty";
|
|
2983
3059
|
readonly summary: "A config key's optionsQuery is a non-empty query name when present.";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ACTION_FORM_PREVIEW_RULES } from "./action-form-preview-rules.js";
|
|
1
2
|
import { AGENT_EFFECT_RULES } from "./agent-effect-rules.js";
|
|
2
3
|
import { API_EXT_RULES } from "./api-ext-rules.js";
|
|
3
4
|
import { BOOT_CHECK_RULES } from "./boot-check-rules.js";
|
|
@@ -79,6 +80,7 @@ export const FRAMEWORK_BOOT_RULE_TABLES = [
|
|
|
79
80
|
LIST_QUERY_RULES,
|
|
80
81
|
LIST_SORT_SUMMARY_RULES,
|
|
81
82
|
LIST_BULK_ACTION_RULES,
|
|
83
|
+
ACTION_FORM_PREVIEW_RULES,
|
|
82
84
|
QUERY_RULES,
|
|
83
85
|
BOOT_ENVIRONMENT_RULES,
|
|
84
86
|
CONFIG_KEY_RULES,
|
|
@@ -44,6 +44,11 @@ export declare const CONFIG_KEY_RULES: {
|
|
|
44
44
|
readonly summary: "A config key that declares optionsQueryPayload also declares optionsQuery.";
|
|
45
45
|
readonly fix: "Set optionsQuery or remove optionsQueryPayload.";
|
|
46
46
|
};
|
|
47
|
+
readonly maskReadOnlyRequired: {
|
|
48
|
+
readonly id: "config-key/mask-read-only-required";
|
|
49
|
+
readonly summary: "A config key is not both mask.readOnly and required, because nobody could fill it.";
|
|
50
|
+
readonly fix: "Drop required or mask.readOnly.";
|
|
51
|
+
};
|
|
47
52
|
readonly optionsQueryEmpty: {
|
|
48
53
|
readonly id: "config-key/options-query-empty";
|
|
49
54
|
readonly summary: "A config key's optionsQuery is a non-empty query name when present.";
|
|
@@ -44,6 +44,11 @@ export const CONFIG_KEY_RULES = {
|
|
|
44
44
|
summary: "A config key that declares optionsQueryPayload also declares optionsQuery.",
|
|
45
45
|
fix: "Set optionsQuery or remove optionsQueryPayload.",
|
|
46
46
|
},
|
|
47
|
+
maskReadOnlyRequired: {
|
|
48
|
+
id: "config-key/mask-read-only-required",
|
|
49
|
+
summary: "A config key is not both mask.readOnly and required, because nobody could fill it.",
|
|
50
|
+
fix: "Drop required or mask.readOnly.",
|
|
51
|
+
},
|
|
47
52
|
optionsQueryEmpty: {
|
|
48
53
|
id: "config-key/options-query-empty",
|
|
49
54
|
summary: "A config key's optionsQuery is a non-empty query name when present.",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EntityDefinition } from "@cosmicdrift/kumiko-types/fields";
|
|
2
|
+
import type { normalizeListColumn } from "../screen-helpers.ts";
|
|
3
|
+
export declare function entityColumnType(entity: EntityDefinition, field: string): string | undefined;
|
|
4
|
+
export declare function validateDateOnlyAfterDays(prefix: string, column: ReturnType<typeof normalizeListColumn>, entityType: string | undefined): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { propertyOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
2
|
+
import { LIST_ROW_META_COLUMNS } from "../../ui-types/list-row-meta.js";
|
|
3
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
4
|
+
import { LIST_SCREEN_RULES } from "./screens-lists-rules.js";
|
|
5
|
+
const DATE_FIELD_TYPES = ["timestamp", "date", "locatedTimestamp"];
|
|
6
|
+
// Mirrors how the list view-model types a column: stored field, then derived field, then row meta.
|
|
7
|
+
export function entityColumnType(entity, field) {
|
|
8
|
+
return (entity.fields[field]?.type ??
|
|
9
|
+
entity.derivedFields?.[field]?.valueType ??
|
|
10
|
+
LIST_ROW_META_COLUMNS[field]);
|
|
11
|
+
}
|
|
12
|
+
// `entityType` is the column's type on a known entity; without one only the column's own
|
|
13
|
+
// `valueType` is known, and a column without any type information stays allowed.
|
|
14
|
+
export function validateDateOnlyAfterDays(prefix, column, entityType) {
|
|
15
|
+
const days = column.dateOnlyAfterDays;
|
|
16
|
+
if (days === undefined)
|
|
17
|
+
return;
|
|
18
|
+
const where = `${prefix} column "${column.field}"`;
|
|
19
|
+
if (!Number.isInteger(days) || days < 0) {
|
|
20
|
+
throw bootRuleError(LIST_SCREEN_RULES.dateOnlyAfterDaysInvalid, {
|
|
21
|
+
message: `${where} sets dateOnlyAfterDays to ${String(days)}, which is not a non-negative whole number of days. Use 0 or a positive integer.`,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
if (propertyOf(column.renderer, "format") === "relativeTime")
|
|
25
|
+
return;
|
|
26
|
+
const type = entityType ?? column.valueType;
|
|
27
|
+
if (type === undefined || DATE_FIELD_TYPES.includes(type))
|
|
28
|
+
return;
|
|
29
|
+
throw bootRuleError(LIST_SCREEN_RULES.dateOnlyAfterDaysWrongType, {
|
|
30
|
+
message: `${where} sets dateOnlyAfterDays on a ${type} column. It only applies to timestamp, locatedTimestamp or date fields and relativeTime columns; remove it.`,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -7,6 +7,7 @@ export declare const PII_USER_REFERENCE_NAME_HINTS: ReadonlySet<string>;
|
|
|
7
7
|
/** Extensions with preSave must target an entity that has mapped write handlers. */
|
|
8
8
|
export declare function validateExtensionPreSaveWiring(features: readonly FeatureDefinition[]): void;
|
|
9
9
|
export declare function validateHandlerAccess(feature: FeatureDefinition): void;
|
|
10
|
+
export declare const IP_BUCKETED_RATE_LIMIT_PER: ReadonlySet<string>;
|
|
10
11
|
export declare function validateAdditionalRateLimits(featureName: string, handlerName: string, handler: FeatureDefinition["writeHandlers"][string]): void;
|
|
11
12
|
export declare function validateTenantlessAnonymous(featureName: string, handlerName: string, handler: FeatureDefinition["writeHandlers"][string]): void;
|
|
12
13
|
export declare function validateRateLimitCost(featureName: string, handlerName: string, handler: FeatureDefinition["writeHandlers"][string]): void;
|
|
@@ -157,7 +157,7 @@ export function validateHandlerAccess(feature) {
|
|
|
157
157
|
validateAgentProposalEffect(feature.name, "query", name, handler.agent);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
const IP_BUCKETED_RATE_LIMIT_PER = new Set(["ip", "ip+handler"]);
|
|
160
|
+
export const IP_BUCKETED_RATE_LIMIT_PER = new Set(["ip", "ip+handler"]);
|
|
161
161
|
// Payload buckets only complement the per-IP bucket: an anonymous caller
|
|
162
162
|
// who rotates IPs is what they exist for, and without the IP bucket a single
|
|
163
163
|
// IP could still burn through unlimited distinct addresses.
|
|
@@ -39,4 +39,44 @@ export declare const LIST_BULK_ACTION_RULES: {
|
|
|
39
39
|
readonly summary: "Bulk actions run one server write per row, so they point at writeHandler row actions.";
|
|
40
40
|
readonly fix: "Point rowAction at a writeHandler row action.";
|
|
41
41
|
};
|
|
42
|
+
readonly formLabelMissing: {
|
|
43
|
+
readonly id: "list-bulk/form-label-missing";
|
|
44
|
+
readonly summary: "A bulk form action has a label (i18n key) for its button.";
|
|
45
|
+
readonly fix: "Set label to an i18n key.";
|
|
46
|
+
};
|
|
47
|
+
readonly formScreenMissing: {
|
|
48
|
+
readonly id: "list-bulk/form-screen-missing";
|
|
49
|
+
readonly summary: "A bulk form action names the screen it opens in screen.";
|
|
50
|
+
readonly fix: "Set screen to the id of an actionForm screen.";
|
|
51
|
+
};
|
|
52
|
+
readonly formScreenUnresolved: {
|
|
53
|
+
readonly id: "list-bulk/form-screen-unresolved";
|
|
54
|
+
readonly summary: "A bulk form action's screen resolves to a registered screen.";
|
|
55
|
+
readonly fix: "Use the id of a screen in this feature or a fully-qualified <feature>:screen:<id>.";
|
|
56
|
+
};
|
|
57
|
+
readonly formScreenNotActionForm: {
|
|
58
|
+
readonly id: "list-bulk/form-screen-not-action-form";
|
|
59
|
+
readonly summary: "A bulk form action opens an actionForm screen.";
|
|
60
|
+
readonly fix: "Point screen at an actionForm screen.";
|
|
61
|
+
};
|
|
62
|
+
readonly formIdsFieldMissing: {
|
|
63
|
+
readonly id: "list-bulk/form-ids-field-missing";
|
|
64
|
+
readonly summary: "A bulk form action names the form field that receives the selected ids.";
|
|
65
|
+
readonly fix: "Set idsField to a field of the target form.";
|
|
66
|
+
};
|
|
67
|
+
readonly formIdsFieldUnknown: {
|
|
68
|
+
readonly id: "list-bulk/form-ids-field-unknown";
|
|
69
|
+
readonly summary: "A bulk form action's idsField is a field of the target form.";
|
|
70
|
+
readonly fix: "Declare the field on the target form or point idsField at a declared one.";
|
|
71
|
+
};
|
|
72
|
+
readonly formIdsFieldNotList: {
|
|
73
|
+
readonly id: "list-bulk/form-ids-field-not-list";
|
|
74
|
+
readonly summary: 'A bulk form action\'s idsField is a multiSelect field with display: "count".';
|
|
75
|
+
readonly fix: 'Declare the field as { type: "multiSelect", options: [], display: "count" } on the target form.';
|
|
76
|
+
};
|
|
77
|
+
readonly formIdsFieldNotRendered: {
|
|
78
|
+
readonly id: "list-bulk/form-ids-field-not-rendered";
|
|
79
|
+
readonly summary: "A bulk form action's idsField is shown by the target form's layout and not sensitive.";
|
|
80
|
+
readonly fix: "Add the field to the form layout (visible: false hides it but keeps the value) and drop sensitive.";
|
|
81
|
+
};
|
|
42
82
|
};
|
|
@@ -39,4 +39,44 @@ export const LIST_BULK_ACTION_RULES = {
|
|
|
39
39
|
summary: "Bulk actions run one server write per row, so they point at writeHandler row actions.",
|
|
40
40
|
fix: "Point rowAction at a writeHandler row action.",
|
|
41
41
|
},
|
|
42
|
+
formLabelMissing: {
|
|
43
|
+
id: "list-bulk/form-label-missing",
|
|
44
|
+
summary: "A bulk form action has a label (i18n key) for its button.",
|
|
45
|
+
fix: "Set label to an i18n key.",
|
|
46
|
+
},
|
|
47
|
+
formScreenMissing: {
|
|
48
|
+
id: "list-bulk/form-screen-missing",
|
|
49
|
+
summary: "A bulk form action names the screen it opens in screen.",
|
|
50
|
+
fix: "Set screen to the id of an actionForm screen.",
|
|
51
|
+
},
|
|
52
|
+
formScreenUnresolved: {
|
|
53
|
+
id: "list-bulk/form-screen-unresolved",
|
|
54
|
+
summary: "A bulk form action's screen resolves to a registered screen.",
|
|
55
|
+
fix: "Use the id of a screen in this feature or a fully-qualified <feature>:screen:<id>.",
|
|
56
|
+
},
|
|
57
|
+
formScreenNotActionForm: {
|
|
58
|
+
id: "list-bulk/form-screen-not-action-form",
|
|
59
|
+
summary: "A bulk form action opens an actionForm screen.",
|
|
60
|
+
fix: "Point screen at an actionForm screen.",
|
|
61
|
+
},
|
|
62
|
+
formIdsFieldMissing: {
|
|
63
|
+
id: "list-bulk/form-ids-field-missing",
|
|
64
|
+
summary: "A bulk form action names the form field that receives the selected ids.",
|
|
65
|
+
fix: "Set idsField to a field of the target form.",
|
|
66
|
+
},
|
|
67
|
+
formIdsFieldUnknown: {
|
|
68
|
+
id: "list-bulk/form-ids-field-unknown",
|
|
69
|
+
summary: "A bulk form action's idsField is a field of the target form.",
|
|
70
|
+
fix: "Declare the field on the target form or point idsField at a declared one.",
|
|
71
|
+
},
|
|
72
|
+
formIdsFieldNotList: {
|
|
73
|
+
id: "list-bulk/form-ids-field-not-list",
|
|
74
|
+
summary: 'A bulk form action\'s idsField is a multiSelect field with display: "count".',
|
|
75
|
+
fix: 'Declare the field as { type: "multiSelect", options: [], display: "count" } on the target form.',
|
|
76
|
+
},
|
|
77
|
+
formIdsFieldNotRendered: {
|
|
78
|
+
id: "list-bulk/form-ids-field-not-rendered",
|
|
79
|
+
summary: "A bulk form action's idsField is shown by the target form's layout and not sensitive.",
|
|
80
|
+
fix: "Add the field to the form layout (visible: false hides it but keeps the value) and drop sensitive.",
|
|
81
|
+
},
|
|
42
82
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type RowAction } from "../types/screen.ts";
|
|
2
|
+
import { type NavigateTargetLookups } from "./screens-actions.ts";
|
|
2
3
|
/** `where` is the full message prefix, e.g. `[Feature x] Screen "y" (entityList)`. */
|
|
3
|
-
export declare function validateListBulkActions(where: string, bulkActions: unknown, rowActions: readonly RowAction[] | undefined): void;
|
|
4
|
+
export declare function validateListBulkActions(where: string, bulkActions: unknown, rowActions: readonly RowAction[] | undefined, featureName: string, lookups: NavigateTargetLookups): void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
2
2
|
import { isKebabSegment } from "../qualified-name.js";
|
|
3
|
-
import { LIST_BULK_ACTION_KEYS } from "../types/screen.js";
|
|
3
|
+
import { LIST_BULK_ACTION_KEYS, LIST_BULK_FORM_ACTION_KEYS, } from "../types/screen.js";
|
|
4
4
|
import { bootRuleError } from "./boot-rule.js";
|
|
5
5
|
import { LIST_BULK_ACTION_RULES } from "./list-bulk-actions-rules.js";
|
|
6
|
+
import { findNavTargetEntry, isSensitiveOrPasswordField, renderedEditFieldNames, } from "./screens-actions.js";
|
|
6
7
|
function validateBulkActionTarget(where, bulkId, target, rowActions) {
|
|
7
8
|
if (typeof target !== "string" || target === "") {
|
|
8
9
|
throw bootRuleError(LIST_BULK_ACTION_RULES.rowActionMissing, {
|
|
@@ -24,8 +25,73 @@ function validateBulkActionTarget(where, bulkId, target, rowActions) {
|
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
}
|
|
28
|
+
function resolveBulkFormScreen(where, bulkId, entry, featureName, lookups) {
|
|
29
|
+
const label = entry["label"];
|
|
30
|
+
if (typeof label !== "string" || label === "") {
|
|
31
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formLabelMissing, {
|
|
32
|
+
message: `${where} bulk action "${bulkId}" needs label: the i18n key of its button.`,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const screenId = entry["screen"];
|
|
36
|
+
if (typeof screenId !== "string" || screenId === "") {
|
|
37
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formScreenMissing, {
|
|
38
|
+
message: `${where} bulk action "${bulkId}" needs screen: the id of an actionForm screen.`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const target = findNavTargetEntry({ name: featureName }, screenId, lookups);
|
|
42
|
+
if (target === undefined) {
|
|
43
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formScreenUnresolved, {
|
|
44
|
+
message: `${where} bulk action "${bulkId}" opens screen "${screenId}", which does not resolve to a ` +
|
|
45
|
+
`registered screen. Use the id of a screen in this feature or <feature>:screen:<id>.`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const form = target.screen;
|
|
49
|
+
if (form.type !== "actionForm") {
|
|
50
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formScreenNotActionForm, {
|
|
51
|
+
message: `${where} bulk action "${bulkId}" opens screen "${screenId}", a "${form.type}" screen. ` +
|
|
52
|
+
`Point screen at an actionForm screen; it receives the selected ids in idsField.`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return { screenId, form };
|
|
56
|
+
}
|
|
57
|
+
function validateBulkIdsField(where, bulkId, entry, screenId, form) {
|
|
58
|
+
const idsField = entry["idsField"];
|
|
59
|
+
if (typeof idsField !== "string" || idsField === "") {
|
|
60
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formIdsFieldMissing, {
|
|
61
|
+
message: `${where} bulk action "${bulkId}" needs idsField: the field of form "${screenId}" that ` +
|
|
62
|
+
`receives the selected ids.`,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const field = Object.hasOwn(form.fields, idsField) ? form.fields[idsField] : undefined;
|
|
66
|
+
if (field === undefined) {
|
|
67
|
+
const known = Object.keys(form.fields).sort().join(", ") || "(none)";
|
|
68
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formIdsFieldUnknown, {
|
|
69
|
+
message: `${where} bulk action "${bulkId}" has idsField "${idsField}", which form "${screenId}" does ` +
|
|
70
|
+
`not declare. Form fields: ${known}.`,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (field.type !== "multiSelect" || field.display !== "count") {
|
|
74
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formIdsFieldNotList, {
|
|
75
|
+
message: `${where} bulk action "${bulkId}" has idsField "${idsField}", which is not a list field. ` +
|
|
76
|
+
`Declare it on form "${screenId}" as { type: "multiSelect", options: [], display: "count" }; ` +
|
|
77
|
+
`the handler then receives the ids as a string array.`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
if (isSensitiveOrPasswordField(field) ||
|
|
81
|
+
!renderedEditFieldNames(form.layout.sections).has(idsField)) {
|
|
82
|
+
throw bootRuleError(LIST_BULK_ACTION_RULES.formIdsFieldNotRendered, {
|
|
83
|
+
message: `${where} bulk action "${bulkId}" has idsField "${idsField}", which form "${screenId}" ` +
|
|
84
|
+
`marks sensitive or leaves out of its layout; the renderer would drop the ids. Add the ` +
|
|
85
|
+
`field to the layout (visible: false still carries the value) and remove sensitive.`,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function validateBulkFormTarget(where, bulkId, entry, featureName, lookups) {
|
|
90
|
+
const { screenId, form } = resolveBulkFormScreen(where, bulkId, entry, featureName, lookups);
|
|
91
|
+
validateBulkIdsField(where, bulkId, entry, screenId, form);
|
|
92
|
+
}
|
|
27
93
|
/** `where` is the full message prefix, e.g. `[Feature x] Screen "y" (entityList)`. */
|
|
28
|
-
export function validateListBulkActions(where, bulkActions, rowActions) {
|
|
94
|
+
export function validateListBulkActions(where, bulkActions, rowActions, featureName, lookups) {
|
|
29
95
|
// skip: no bulk actions declared
|
|
30
96
|
if (bulkActions === undefined)
|
|
31
97
|
return;
|
|
@@ -38,7 +104,7 @@ export function validateListBulkActions(where, bulkActions, rowActions) {
|
|
|
38
104
|
for (const entry of bulkActions) {
|
|
39
105
|
if (!isPlainObject(entry)) {
|
|
40
106
|
throw bootRuleError(LIST_BULK_ACTION_RULES.entryNotObject, {
|
|
41
|
-
message: `${where} bulkActions entries must be objects with id and rowAction.`,
|
|
107
|
+
message: `${where} bulkActions entries must be objects with id and rowAction, or id, label, screen and idsField.`,
|
|
42
108
|
});
|
|
43
109
|
}
|
|
44
110
|
const id = entry["id"];
|
|
@@ -52,16 +118,20 @@ export function validateListBulkActions(where, bulkActions, rowActions) {
|
|
|
52
118
|
message: `${where} declares bulk action "${id}" twice.`,
|
|
53
119
|
});
|
|
54
120
|
seen.add(id);
|
|
55
|
-
const
|
|
121
|
+
const opensForm = Object.hasOwn(entry, "screen");
|
|
122
|
+
const allowedKeys = opensForm
|
|
123
|
+
? LIST_BULK_FORM_ACTION_KEYS
|
|
124
|
+
: LIST_BULK_ACTION_KEYS;
|
|
125
|
+
const unknown = Object.keys(entry).filter((key) => !allowedKeys.includes(key));
|
|
56
126
|
if (unknown.length > 0) {
|
|
57
127
|
throw bootRuleError(LIST_BULK_ACTION_RULES.unknownKey, {
|
|
58
128
|
message: `${where} bulk action "${id}" has unknown key(s) ${unknown.map((k) => `"${k}"`).join(", ")}. ` +
|
|
59
|
-
`Allowed keys: ${
|
|
129
|
+
`Allowed keys: ${allowedKeys.join(", ")}.`,
|
|
60
130
|
});
|
|
61
131
|
}
|
|
62
|
-
|
|
132
|
+
if (opensForm)
|
|
133
|
+
validateBulkFormTarget(where, id, entry, featureName, lookups);
|
|
134
|
+
else
|
|
135
|
+
validateBulkActionTarget(where, id, entry["rowAction"], rowActions ?? []);
|
|
63
136
|
}
|
|
64
137
|
}
|
|
65
|
-
function isOneOfBulkKeys(key) {
|
|
66
|
-
return LIST_BULK_ACTION_KEYS.some((allowed) => allowed === key);
|
|
67
|
-
}
|
|
@@ -6,7 +6,7 @@ import { detailGuidanceFieldRefs, listGuidanceFieldRefs } from "./query-output-g
|
|
|
6
6
|
import { QUERY_RULES } from "./query-rules.js";
|
|
7
7
|
import { validateActionFieldRefs } from "./screens.js";
|
|
8
8
|
import { DASHBOARD_RULES } from "./screens-dashboard-rules.js";
|
|
9
|
-
import { getZodObjectShape, getZodRowShape } from "./zod-shape.js";
|
|
9
|
+
import { getZodArrayFieldElementShape, getZodObjectShape, getZodRowShape } from "./zod-shape.js";
|
|
10
10
|
function checkFieldExists(shape, field, buildMessage) {
|
|
11
11
|
// skip: capability absent (no introspectable shape) or field already present — nothing to validate
|
|
12
12
|
if (shape === undefined || field in shape)
|
|
@@ -299,8 +299,10 @@ function checkScreenOutputColumns(queryHandlers, featureName, screenId, screen)
|
|
|
299
299
|
screen.type === "configEdit" ||
|
|
300
300
|
screen.type === "secretMint") {
|
|
301
301
|
checkEditLayoutOutputColumns(queryHandlers, featureName, screenId, screen.type, screen.layout);
|
|
302
|
-
if (screen.type === "actionForm")
|
|
302
|
+
if (screen.type === "actionForm") {
|
|
303
303
|
checkSummaryLoadFields(queryHandlers, featureName, screenId, screen);
|
|
304
|
+
checkPreviewOutputFields(queryHandlers, featureName, screenId, screen);
|
|
305
|
+
}
|
|
304
306
|
}
|
|
305
307
|
else if (screen.type === "dashboard") {
|
|
306
308
|
checkDashboardOutputFields(queryHandlers, featureName, screenId, screen);
|
|
@@ -313,6 +315,27 @@ function checkSummaryLoadFields(queryHandlers, featureName, screenId, screen) {
|
|
|
313
315
|
checkFieldExists(shape, field, () => `[Feature ${featureName}] Screen "${screenId}" (actionForm) summary.paramsFromLoad references field "${field}" which is not present in load query "${screen.load?.query}"'s outputSchema. Check the field name for a typo or add the field to the outputSchema.`);
|
|
314
316
|
}
|
|
315
317
|
}
|
|
318
|
+
// preview facts and list read the preview query's result, so each name must be an output field of it.
|
|
319
|
+
function checkPreviewOutputFields(queryHandlers, featureName, screenId, screen) {
|
|
320
|
+
const { preview } = screen;
|
|
321
|
+
// skip: no preview declared
|
|
322
|
+
if (preview === undefined)
|
|
323
|
+
return;
|
|
324
|
+
const outputSchema = queryHandlers.get(preview.query)?.outputSchema;
|
|
325
|
+
const shape = getZodObjectShape(outputSchema);
|
|
326
|
+
const missing = (what, field) => `[Feature ${featureName}] Screen "${screenId}" (actionForm) preview ${what} "${field}" is not present in query "${preview.query}"'s outputSchema. Check the field name for a typo or add the field to the outputSchema.`;
|
|
327
|
+
for (const fact of preview.facts ?? []) {
|
|
328
|
+
checkFieldExists(shape, fact.field, () => missing("fact", fact.field));
|
|
329
|
+
}
|
|
330
|
+
if (preview.list === undefined)
|
|
331
|
+
return;
|
|
332
|
+
const listField = preview.list.field;
|
|
333
|
+
checkFieldExists(shape, listField, () => missing("list field", listField));
|
|
334
|
+
const rowShape = getZodArrayFieldElementShape(outputSchema, listField);
|
|
335
|
+
for (const column of preview.list.columns) {
|
|
336
|
+
checkFieldExists(rowShape, column.field, () => missing("list column", column.field));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
316
339
|
export function validateQueryOutputColumns(features) {
|
|
317
340
|
const queryHandlers = buildQueryHandlerMap(features);
|
|
318
341
|
checkPagedHandlerOutputSchemaShape(queryHandlers);
|
|
@@ -119,6 +119,9 @@ function checkEditFormScreenQueryRefs(queryHandlers, featureName, screenId, scre
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
+
if (screen.type === "actionForm" && screen.preview !== undefined) {
|
|
123
|
+
checkQueryRef(queryHandlers, screen.preview.query, () => `[Feature ${featureName}] Screen "${screenId}" (actionForm) preview`);
|
|
124
|
+
}
|
|
122
125
|
if (screen.type !== "entityEdit") {
|
|
123
126
|
checkFormFieldQueryRefs(queryHandlers, featureName, screenId, screen.type, screen.fields);
|
|
124
127
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IconKey } from "@cosmicdrift/kumiko-types/nav-icon";
|
|
2
2
|
import type { FeatureDefinition } from "../types/index.ts";
|
|
3
|
-
import type { ActionFormRedirect, ActionFormScreenDefinition, ActionFormSuccessLink, ProjectionDetailScreenDefinition, RelatedListToolbarAction, RowAction, RowActionNavigateBase, RowFieldExtractor, ScreenDefinition, SecretMintScreenDefinition, ToolbarAction } from "../types/screen.ts";
|
|
3
|
+
import type { ActionFormRedirect, ActionFormScreenDefinition, ActionFormSuccessLink, EditLayout, ProjectionDetailScreenDefinition, RelatedListToolbarAction, RowAction, RowActionNavigateBase, RowFieldExtractor, ScreenDefinition, SecretMintScreenDefinition, ToolbarAction } from "../types/screen.ts";
|
|
4
4
|
export declare function isRowClickAction(action: RowAction): boolean;
|
|
5
5
|
export declare function validateAtMostOneRowClick(featureName: string, screenId: string, screenType: "entityList" | "projectionList", rowActions: readonly RowAction[]): void;
|
|
6
6
|
export declare function rowFieldExtractorKeys(params: RowFieldExtractor): readonly string[];
|
|
@@ -26,6 +26,7 @@ export declare function validateDrawerTargetAction(featureName: string, screenId
|
|
|
26
26
|
readonly screen: string;
|
|
27
27
|
readonly params?: RowFieldExtractor;
|
|
28
28
|
}, screens: FeatureDefinition["screens"]): void;
|
|
29
|
+
export declare function renderedEditFieldNames(sections: EditLayout["sections"]): ReadonlySet<string>;
|
|
29
30
|
export declare function isSensitiveOrPasswordField(field: object | undefined): boolean;
|
|
30
31
|
export declare function validateDrawerPrefillKeys(where: string, targetLabel: "drawer-target" | "navigate-target", targetScreenId: string, target: ActionFormScreenDefinition | SecretMintScreenDefinition, params: RowFieldExtractor): void;
|
|
31
32
|
type RowActionNavigateRuntime = RowActionNavigateBase & {
|
|
@@ -43,6 +44,10 @@ export declare function resolveRowActionNavigateTarget(featureName: string, scre
|
|
|
43
44
|
readonly screen: ScreenDefinition;
|
|
44
45
|
} | undefined;
|
|
45
46
|
export declare function validateRedirectTarget(feature: FeatureDefinition, screenId: string, screenKind: "actionForm" | "secretMint" | "entityEdit" | "projectionDetail", redirect: string | ActionFormRedirect, lookups: NavigateTargetLookups, propertyPath?: string): void;
|
|
47
|
+
export declare function findNavTargetEntry(feature: Pick<FeatureDefinition, "name">, target: string, lookups: NavigateTargetLookups): {
|
|
48
|
+
readonly featureName: string;
|
|
49
|
+
readonly screen: ScreenDefinition;
|
|
50
|
+
} | undefined;
|
|
46
51
|
export declare function validateIdlessSuccessLink(feature: FeatureDefinition, screenId: string, screenKind: "actionForm", link: ActionFormSuccessLink, lookups: NavigateTargetLookups, propertyPath: string): void;
|
|
47
52
|
export declare function validateClientActionName(featureName: string, screenId: string, screenKind: string, actionLabel: "rowAction" | "emptyState action" | "action", action: Extract<RowAction, {
|
|
48
53
|
readonly kind: "clientAction";
|