@cosmicdrift/kumiko-framework 0.405.0 → 0.409.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.
Files changed (214) hide show
  1. package/agents/api/framework-db.md +1 -0
  2. package/agents/api/framework-engine.md +18 -2
  3. package/agents/api/framework-ui-types.md +15 -0
  4. package/agents/api/renderer-web.md +156 -2
  5. package/agents/api/types.md +113 -71
  6. package/agents/api.md +4 -4
  7. package/agents/boot-rules.md +743 -0
  8. package/agents/examples/contact.md +167 -0
  9. package/agents/examples/delivery-notifications.md +34 -1
  10. package/agents/examples/lane-routing.md +13 -0
  11. package/agents/examples/record-detail-layout.md +13 -2
  12. package/agents/examples/search.md +65 -3
  13. package/agents/examples/secrets-demo.md +96 -2
  14. package/agents/examples/tenant-inactivity.md +138 -0
  15. package/agents/examples.md +2 -0
  16. package/agents/features-index.md +4 -0
  17. package/agents/features.md +24 -1
  18. package/agents/widgets.md +12 -1
  19. package/dist/api/export/export-rows.js +1 -0
  20. package/dist/compliance/index.d.ts +1 -1
  21. package/dist/db/event-store-executor-read-where.js +15 -5
  22. package/dist/db/index.d.ts +1 -1
  23. package/dist/db/index.js +1 -1
  24. package/dist/db/migrate-generator.js +3 -1
  25. package/dist/db/queries/event-consumer.js +11 -7
  26. package/dist/db/queries/event-store.d.ts +2 -1
  27. package/dist/db/queries/event-store.js +25 -6
  28. package/dist/db/queries/rls-boot-catalog.js +3 -1
  29. package/dist/db/queries/session-advisory-lock.d.ts +7 -0
  30. package/dist/db/queries/session-advisory-lock.js +23 -0
  31. package/dist/db/query.js +7 -10
  32. package/dist/db/row-level-security-connection.js +4 -2
  33. package/dist/engine/active-membership.js +1 -0
  34. package/dist/engine/boot-validator/access-declarations.js +57 -33
  35. package/dist/engine/boot-validator/action-wiring.js +8 -6
  36. package/dist/engine/boot-validator/agent-effect-rules.d.ts +12 -0
  37. package/dist/engine/boot-validator/agent-effect-rules.js +12 -0
  38. package/dist/engine/boot-validator/agent-effect.d.ts +2 -0
  39. package/dist/engine/boot-validator/agent-effect.js +20 -0
  40. package/dist/engine/boot-validator/boot-context.js +5 -1
  41. package/dist/engine/boot-validator/boot-environment-rules.d.ts +12 -0
  42. package/dist/engine/boot-validator/boot-environment-rules.js +12 -0
  43. package/dist/engine/boot-validator/boot-phases-app.js +5 -1
  44. package/dist/engine/boot-validator/boot-phases.js +3 -1
  45. package/dist/engine/boot-validator/boot-rules.d.ts +2619 -0
  46. package/dist/engine/boot-validator/boot-rules.js +58 -0
  47. package/dist/engine/boot-validator/bundled-lists-table.js +23 -9
  48. package/dist/engine/boot-validator/config-deps.js +71 -23
  49. package/dist/engine/boot-validator/config-edit-action-rules.d.ts +17 -0
  50. package/dist/engine/boot-validator/config-edit-action-rules.js +17 -0
  51. package/dist/engine/boot-validator/config-key-rules.d.ts +117 -0
  52. package/dist/engine/boot-validator/config-key-rules.js +117 -0
  53. package/dist/engine/boot-validator/custom-screen-write-qns.js +6 -2
  54. package/dist/engine/boot-validator/derived-sql-fields-rules.d.ts +77 -0
  55. package/dist/engine/boot-validator/derived-sql-fields-rules.js +77 -0
  56. package/dist/engine/boot-validator/derived-sql-fields.js +53 -17
  57. package/dist/engine/boot-validator/detail-screens.js +10 -4
  58. package/dist/engine/boot-validator/entity-declaration-rules.d.ts +92 -0
  59. package/dist/engine/boot-validator/entity-declaration-rules.js +92 -0
  60. package/dist/engine/boot-validator/entity-handler-access-rules.d.ts +102 -0
  61. package/dist/engine/boot-validator/entity-handler-access-rules.js +102 -0
  62. package/dist/engine/boot-validator/entity-handler.d.ts +0 -7
  63. package/dist/engine/boot-validator/entity-handler.js +259 -355
  64. package/dist/engine/boot-validator/entity-image-variants.d.ts +2 -0
  65. package/dist/engine/boot-validator/entity-image-variants.js +91 -0
  66. package/dist/engine/boot-validator/entity-list-aggregate-options.js +8 -2
  67. package/dist/engine/boot-validator/entity-reference-embedded-rules.d.ts +117 -0
  68. package/dist/engine/boot-validator/entity-reference-embedded-rules.js +117 -0
  69. package/dist/engine/boot-validator/entity-select-image-rules.d.ts +122 -0
  70. package/dist/engine/boot-validator/entity-select-image-rules.js +122 -0
  71. package/dist/engine/boot-validator/entity-select.d.ts +8 -0
  72. package/dist/engine/boot-validator/entity-select.js +197 -0
  73. package/dist/engine/boot-validator/entity-structure-rules.d.ts +107 -0
  74. package/dist/engine/boot-validator/entity-structure-rules.js +107 -0
  75. package/dist/engine/boot-validator/field-conditions-rules.d.ts +92 -0
  76. package/dist/engine/boot-validator/field-conditions-rules.js +92 -0
  77. package/dist/engine/boot-validator/field-conditions.js +67 -22
  78. package/dist/engine/boot-validator/form-derivations-rules.d.ts +77 -0
  79. package/dist/engine/boot-validator/form-derivations-rules.js +77 -0
  80. package/dist/engine/boot-validator/form-derivations.js +52 -18
  81. package/dist/engine/boot-validator/global-tenancy.js +13 -7
  82. package/dist/engine/boot-validator/handler-declaration-rules.d.ts +72 -0
  83. package/dist/engine/boot-validator/handler-declaration-rules.js +72 -0
  84. package/dist/engine/boot-validator/handler-field-references-rules.d.ts +22 -0
  85. package/dist/engine/boot-validator/handler-field-references-rules.js +22 -0
  86. package/dist/engine/boot-validator/handler-field-references.js +14 -6
  87. package/dist/engine/boot-validator/list-bulk-actions-rules.d.ts +42 -0
  88. package/dist/engine/boot-validator/list-bulk-actions-rules.js +42 -0
  89. package/dist/engine/boot-validator/list-bulk-actions.js +29 -11
  90. package/dist/engine/boot-validator/list-column-layout.js +22 -10
  91. package/dist/engine/boot-validator/list-query-rules.d.ts +107 -0
  92. package/dist/engine/boot-validator/list-query-rules.js +107 -0
  93. package/dist/engine/boot-validator/list-table-aggregate-options.js +43 -15
  94. package/dist/engine/boot-validator/list-table-aggregate-query.js +7 -3
  95. package/dist/engine/boot-validator/list-table-aggregate-rules.d.ts +82 -0
  96. package/dist/engine/boot-validator/list-table-aggregate-rules.js +82 -0
  97. package/dist/engine/boot-validator/list-table-export-options.js +19 -7
  98. package/dist/engine/boot-validator/list-table-options.js +33 -13
  99. package/dist/engine/boot-validator/list-table-reject-unknown-keys.js +6 -2
  100. package/dist/engine/boot-validator/list-table-rules.d.ts +132 -0
  101. package/dist/engine/boot-validator/list-table-rules.js +132 -0
  102. package/dist/engine/boot-validator/nav-rules.d.ts +42 -0
  103. package/dist/engine/boot-validator/nav-rules.js +42 -0
  104. package/dist/engine/boot-validator/nav.js +29 -15
  105. package/dist/engine/boot-validator/ownership-rules.d.ts +27 -0
  106. package/dist/engine/boot-validator/ownership-rules.js +27 -0
  107. package/dist/engine/boot-validator/ownership.js +28 -12
  108. package/dist/engine/boot-validator/parent-ref.js +32 -20
  109. package/dist/engine/boot-validator/projection-list-screens.js +76 -35
  110. package/dist/engine/boot-validator/query-output-columns.js +9 -3
  111. package/dist/engine/boot-validator/query-refs.js +20 -10
  112. package/dist/engine/boot-validator/query-rules.d.ts +37 -0
  113. package/dist/engine/boot-validator/query-rules.js +37 -0
  114. package/dist/engine/boot-validator/read-gate.js +14 -10
  115. package/dist/engine/boot-validator/record-owned.js +5 -1
  116. package/dist/engine/boot-validator/related-list-table-rules.js +17 -7
  117. package/dist/engine/boot-validator/screens-actions-rules.d.ts +185 -0
  118. package/dist/engine/boot-validator/screens-actions-rules.js +185 -0
  119. package/dist/engine/boot-validator/screens-actions.js +169 -93
  120. package/dist/engine/boot-validator/screens-dashboard-chart-rules.d.ts +87 -0
  121. package/dist/engine/boot-validator/screens-dashboard-chart-rules.js +87 -0
  122. package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +227 -0
  123. package/dist/engine/boot-validator/screens-dashboard-rules.js +227 -0
  124. package/dist/engine/boot-validator/screens-dashboard.js +222 -85
  125. package/dist/engine/boot-validator/screens-forms-layout-rules.d.ts +122 -0
  126. package/dist/engine/boot-validator/screens-forms-layout-rules.js +122 -0
  127. package/dist/engine/boot-validator/screens-forms-rules.d.ts +152 -0
  128. package/dist/engine/boot-validator/screens-forms-rules.js +152 -0
  129. package/dist/engine/boot-validator/screens-forms.js +240 -112
  130. package/dist/engine/boot-validator/screens-kind-config-edit.js +72 -16
  131. package/dist/engine/boot-validator/screens-kind-entity-edit.js +15 -7
  132. package/dist/engine/boot-validator/screens-kind-entity-list.js +57 -32
  133. package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +92 -0
  134. package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +92 -0
  135. package/dist/engine/boot-validator/screens-kind-projection-detail.js +85 -47
  136. package/dist/engine/boot-validator/screens-kind-rules.d.ts +137 -0
  137. package/dist/engine/boot-validator/screens-kind-rules.js +137 -0
  138. package/dist/engine/boot-validator/screens-kind-secret-mint.js +18 -8
  139. package/dist/engine/boot-validator/screens-kind-shared.js +40 -22
  140. package/dist/engine/boot-validator/screens-lists-rules.d.ts +82 -0
  141. package/dist/engine/boot-validator/screens-lists-rules.js +82 -0
  142. package/dist/engine/boot-validator/screens-lists.js +90 -45
  143. package/dist/engine/boot-validator/screens-rules.d.ts +57 -0
  144. package/dist/engine/boot-validator/screens-rules.js +57 -0
  145. package/dist/engine/boot-validator/screens.js +17 -12
  146. package/dist/engine/boot-validator/transaction-phases.js +12 -4
  147. package/dist/engine/boot-validator/transfer-graph.js +17 -11
  148. package/dist/engine/boot-validator/url-prefill-fields.js +9 -5
  149. package/dist/engine/boot-validator/workspaces.js +11 -5
  150. package/dist/engine/boot-validator/zod-shape.js +6 -2
  151. package/dist/engine/entity-handlers.d.ts +1 -0
  152. package/dist/engine/entity-handlers.js +3 -0
  153. package/dist/engine/entity-list-runtime-options.js +23 -29
  154. package/dist/engine/extensions/tenant-data.d.ts +3 -0
  155. package/dist/engine/extensions/tenant-resource.d.ts +1 -0
  156. package/dist/engine/factories.d.ts +1 -1
  157. package/dist/engine/factories.js +4 -3
  158. package/dist/engine/feature-config-events-jobs.js +7 -0
  159. package/dist/engine/index.d.ts +4 -2
  160. package/dist/engine/index.js +2 -0
  161. package/dist/engine/project-app-schema-for-roles.js +29 -14
  162. package/dist/engine/registry-facade.js +7 -8
  163. package/dist/engine/registry-validate.js +5 -1
  164. package/dist/engine/soft-delete-cleanup.d.ts +1 -0
  165. package/dist/engine/soft-delete-cleanup.js +5 -0
  166. package/dist/engine/steps/describe-workflow-step-error.js +1 -0
  167. package/dist/es-ops/operations-schema.d.ts +1 -1
  168. package/dist/event-store/ensure-dead-letter-table.d.ts +2 -0
  169. package/dist/event-store/ensure-dead-letter-table.js +10 -0
  170. package/dist/event-store/rebuild-dead-letter.js +2 -8
  171. package/dist/event-store/upcaster-dead-letter.js +2 -8
  172. package/dist/files/copy-pending-file-refs-to-tenant.d.ts +28 -0
  173. package/dist/files/copy-pending-file-refs-to-tenant.js +87 -0
  174. package/dist/files/file-routes.d.ts +1 -1
  175. package/dist/files/file-routes.js +21 -6
  176. package/dist/files/index.d.ts +2 -0
  177. package/dist/files/index.js +1 -0
  178. package/dist/i18n/required-surface-keys.js +1 -0
  179. package/dist/jobs/job-runner-helpers.js +1 -0
  180. package/dist/jobs/job-runner-schedulers.d.ts +2 -2
  181. package/dist/jobs/job-runner-schedulers.js +8 -4
  182. package/dist/jobs/job-runner.js +14 -16
  183. package/dist/logging/utils.js +30 -60
  184. package/dist/observability/metrics-handle.js +10 -21
  185. package/dist/pipeline/cascade-handler.js +7 -6
  186. package/dist/pipeline/dispatch-query.js +18 -5
  187. package/dist/pipeline/dispatch-shared.d.ts +1 -0
  188. package/dist/pipeline/dispatch-shared.js +3 -1
  189. package/dist/pipeline/dispatch-write.js +10 -12
  190. package/dist/pipeline/dispatcher.js +12 -14
  191. package/dist/pipeline/event-dispatcher-admin.js +9 -8
  192. package/dist/pipeline/event-dispatcher-delivery.d.ts +19 -1
  193. package/dist/pipeline/event-dispatcher-delivery.js +121 -29
  194. package/dist/pipeline/event-dispatcher.d.ts +5 -1
  195. package/dist/pipeline/event-dispatcher.js +28 -21
  196. package/dist/pipeline/handler-context-phase-denials.js +2 -0
  197. package/dist/pipeline/multi-stream-apply-context.js +12 -20
  198. package/dist/pipeline/system-hooks.d.ts +4 -1
  199. package/dist/pipeline/system-hooks.js +79 -6
  200. package/dist/pipeline/system-identity-switch.js +10 -7
  201. package/dist/search/build-search-snippet.d.ts +9 -0
  202. package/dist/search/build-search-snippet.js +40 -0
  203. package/dist/search/index.d.ts +1 -0
  204. package/dist/search/index.js +1 -0
  205. package/dist/search/meilisearch-adapter.d.ts +32 -0
  206. package/dist/search/meilisearch-adapter.js +153 -56
  207. package/dist/search/meilisearch-chunking.d.ts +21 -0
  208. package/dist/search/meilisearch-chunking.js +96 -0
  209. package/dist/search/reindex-entity.d.ts +1 -0
  210. package/dist/search/reindex-entity.js +97 -52
  211. package/dist/ui-types/index.d.ts +1 -1
  212. package/dist/upgrade-cli.js +3 -14
  213. package/package.json +3 -3
  214. package/src/changes.json +85 -0
@@ -0,0 +1,122 @@
1
+ export declare const FORM_LAYOUT_RULES: {
2
+ readonly tabsTooFewSections: {
3
+ readonly id: "form/tabs-too-few-sections";
4
+ readonly summary: "A tabs layout has at least two sections.";
5
+ readonly fix: "Add a section or use another mode.";
6
+ };
7
+ readonly tabTitleMissing: {
8
+ readonly id: "form/tab-title-missing";
9
+ readonly summary: "Every tab section has a non-empty title.";
10
+ readonly fix: "Give each tab section a title.";
11
+ };
12
+ readonly tabIdMissing: {
13
+ readonly id: "form/tab-id-missing";
14
+ readonly summary: "Every tab section has a non-empty id.";
15
+ readonly fix: "Give each tab section a stable id.";
16
+ };
17
+ readonly tabIdNotKebab: {
18
+ readonly id: "form/tab-id-not-kebab";
19
+ readonly summary: "Tab section ids are kebab-case.";
20
+ readonly fix: "Rename the section id to kebab-case.";
21
+ };
22
+ readonly tabIdDuplicate: {
23
+ readonly id: "form/tab-id-duplicate";
24
+ readonly summary: "Tab section ids are unique.";
25
+ readonly fix: "Give each tab section a unique id.";
26
+ };
27
+ readonly tabsUnsupportedScreenType: {
28
+ readonly id: "form/tabs-unsupported-screen-type";
29
+ readonly summary: "Tabs layout is used only on projectionDetail and entityEdit screens.";
30
+ readonly fix: 'Use mode: "wizard" or "single".';
31
+ };
32
+ readonly draftWithoutWizard: {
33
+ readonly id: "form/draft-without-wizard";
34
+ readonly summary: "layout.draft is set only on a wizard layout.";
35
+ readonly fix: 'Remove draft: true or set mode: "wizard".';
36
+ };
37
+ readonly draftFeatureMissing: {
38
+ readonly id: "form/draft-feature-missing";
39
+ readonly summary: "A draft layout needs the form-draft feature mounted.";
40
+ readonly fix: "Add createFormDraftFeature() from @cosmicdrift/kumiko-bundled-features to the app's features.";
41
+ };
42
+ readonly wizardTooFewSections: {
43
+ readonly id: "form/wizard-too-few-sections";
44
+ readonly summary: "A wizard layout has at least two sections.";
45
+ readonly fix: "Add a section or use another mode.";
46
+ };
47
+ readonly wizardStepTitleMissing: {
48
+ readonly id: "form/wizard-step-title-missing";
49
+ readonly summary: "Every wizard section has a non-empty title.";
50
+ readonly fix: "Give each wizard section a title.";
51
+ };
52
+ readonly sectionFieldsAndGroups: {
53
+ readonly id: "form/section-fields-and-groups";
54
+ readonly summary: "A section declares fields or groups, not both.";
55
+ readonly fix: "Remove `fields: []` when using groups.";
56
+ };
57
+ readonly sectionEmpty: {
58
+ readonly id: "form/section-empty";
59
+ readonly summary: "A section declares at least one field or group.";
60
+ readonly fix: "Drop the section or add fields or groups.";
61
+ };
62
+ readonly sectionsEmpty: {
63
+ readonly id: "form/sections-empty";
64
+ readonly summary: "An inline form layout declares at least one section.";
65
+ readonly fix: "Declare at least one section.";
66
+ };
67
+ readonly extensionSectionNoComponent: {
68
+ readonly id: "form/extension-section-no-component";
69
+ readonly summary: "An extension section declares a react or native component.";
70
+ readonly fix: "Declare a react/native component marker.";
71
+ };
72
+ readonly relatedListSectionUnsupported: {
73
+ readonly id: "form/related-list-section-unsupported";
74
+ readonly summary: "Inline form layouts have no relatedList sections.";
75
+ readonly fix: "Move the section to a projectionDetail screen or remove it.";
76
+ };
77
+ readonly writeFormSectionUnsupported: {
78
+ readonly id: "form/write-form-section-unsupported";
79
+ readonly summary: "Inline form layouts have no writeForm sections.";
80
+ readonly fix: "Move the section to a projectionDetail screen or remove it.";
81
+ };
82
+ readonly layoutUnknownField: {
83
+ readonly id: "form/layout-unknown-field";
84
+ readonly summary: "Layout fields name fields of the form.";
85
+ readonly fix: "Name an existing field of the form.";
86
+ };
87
+ readonly successFactsWithRedirect: {
88
+ readonly id: "form/success-facts-with-redirect";
89
+ readonly summary: "An actionForm sets either redirect or successFacts.";
90
+ readonly fix: "Use one of them.";
91
+ };
92
+ readonly successLinksWithRedirect: {
93
+ readonly id: "form/success-links-with-redirect";
94
+ readonly summary: "An actionForm sets either redirect or successLinks.";
95
+ readonly fix: "Use one of them.";
96
+ };
97
+ readonly loadSingletonWithIdParam: {
98
+ readonly id: "form/load-singleton-with-id-param";
99
+ readonly summary: "A singleton actionForm load has no idParam.";
100
+ readonly fix: "Remove idParam.";
101
+ };
102
+ readonly confirmLayoutMode: {
103
+ readonly id: "form/confirm-layout-mode";
104
+ readonly summary: "A secretMint confirm layout is a single-step form.";
105
+ readonly fix: 'Remove mode or set it to "single".';
106
+ };
107
+ readonly confirmLayoutDraft: {
108
+ readonly id: "form/confirm-layout-draft";
109
+ readonly summary: "A secretMint confirm layout does not persist drafts.";
110
+ readonly fix: "Remove draft: true.";
111
+ };
112
+ readonly confirmCarryEntryEmpty: {
113
+ readonly id: "form/confirm-carry-entry-empty";
114
+ readonly summary: "secretMint confirm.carry entries are non-empty strings.";
115
+ readonly fix: "Use non-empty strings in carry.";
116
+ };
117
+ readonly confirmCarryCollidesField: {
118
+ readonly id: "form/confirm-carry-collides-field";
119
+ readonly summary: "A confirm.carry entry does not share a name with a confirm.fields entry.";
120
+ readonly fix: "Rename the carry entry or the field.";
121
+ };
122
+ };
@@ -0,0 +1,122 @@
1
+ export const FORM_LAYOUT_RULES = {
2
+ tabsTooFewSections: {
3
+ id: "form/tabs-too-few-sections",
4
+ summary: "A tabs layout has at least two sections.",
5
+ fix: "Add a section or use another mode.",
6
+ },
7
+ tabTitleMissing: {
8
+ id: "form/tab-title-missing",
9
+ summary: "Every tab section has a non-empty title.",
10
+ fix: "Give each tab section a title.",
11
+ },
12
+ tabIdMissing: {
13
+ id: "form/tab-id-missing",
14
+ summary: "Every tab section has a non-empty id.",
15
+ fix: "Give each tab section a stable id.",
16
+ },
17
+ tabIdNotKebab: {
18
+ id: "form/tab-id-not-kebab",
19
+ summary: "Tab section ids are kebab-case.",
20
+ fix: "Rename the section id to kebab-case.",
21
+ },
22
+ tabIdDuplicate: {
23
+ id: "form/tab-id-duplicate",
24
+ summary: "Tab section ids are unique.",
25
+ fix: "Give each tab section a unique id.",
26
+ },
27
+ tabsUnsupportedScreenType: {
28
+ id: "form/tabs-unsupported-screen-type",
29
+ summary: "Tabs layout is used only on projectionDetail and entityEdit screens.",
30
+ fix: 'Use mode: "wizard" or "single".',
31
+ },
32
+ draftWithoutWizard: {
33
+ id: "form/draft-without-wizard",
34
+ summary: "layout.draft is set only on a wizard layout.",
35
+ fix: 'Remove draft: true or set mode: "wizard".',
36
+ },
37
+ draftFeatureMissing: {
38
+ id: "form/draft-feature-missing",
39
+ summary: "A draft layout needs the form-draft feature mounted.",
40
+ fix: "Add createFormDraftFeature() from @cosmicdrift/kumiko-bundled-features to the app's features.",
41
+ },
42
+ wizardTooFewSections: {
43
+ id: "form/wizard-too-few-sections",
44
+ summary: "A wizard layout has at least two sections.",
45
+ fix: "Add a section or use another mode.",
46
+ },
47
+ wizardStepTitleMissing: {
48
+ id: "form/wizard-step-title-missing",
49
+ summary: "Every wizard section has a non-empty title.",
50
+ fix: "Give each wizard section a title.",
51
+ },
52
+ sectionFieldsAndGroups: {
53
+ id: "form/section-fields-and-groups",
54
+ summary: "A section declares fields or groups, not both.",
55
+ fix: "Remove `fields: []` when using groups.",
56
+ },
57
+ sectionEmpty: {
58
+ id: "form/section-empty",
59
+ summary: "A section declares at least one field or group.",
60
+ fix: "Drop the section or add fields or groups.",
61
+ },
62
+ sectionsEmpty: {
63
+ id: "form/sections-empty",
64
+ summary: "An inline form layout declares at least one section.",
65
+ fix: "Declare at least one section.",
66
+ },
67
+ extensionSectionNoComponent: {
68
+ id: "form/extension-section-no-component",
69
+ summary: "An extension section declares a react or native component.",
70
+ fix: "Declare a react/native component marker.",
71
+ },
72
+ relatedListSectionUnsupported: {
73
+ id: "form/related-list-section-unsupported",
74
+ summary: "Inline form layouts have no relatedList sections.",
75
+ fix: "Move the section to a projectionDetail screen or remove it.",
76
+ },
77
+ writeFormSectionUnsupported: {
78
+ id: "form/write-form-section-unsupported",
79
+ summary: "Inline form layouts have no writeForm sections.",
80
+ fix: "Move the section to a projectionDetail screen or remove it.",
81
+ },
82
+ layoutUnknownField: {
83
+ id: "form/layout-unknown-field",
84
+ summary: "Layout fields name fields of the form.",
85
+ fix: "Name an existing field of the form.",
86
+ },
87
+ successFactsWithRedirect: {
88
+ id: "form/success-facts-with-redirect",
89
+ summary: "An actionForm sets either redirect or successFacts.",
90
+ fix: "Use one of them.",
91
+ },
92
+ successLinksWithRedirect: {
93
+ id: "form/success-links-with-redirect",
94
+ summary: "An actionForm sets either redirect or successLinks.",
95
+ fix: "Use one of them.",
96
+ },
97
+ loadSingletonWithIdParam: {
98
+ id: "form/load-singleton-with-id-param",
99
+ summary: "A singleton actionForm load has no idParam.",
100
+ fix: "Remove idParam.",
101
+ },
102
+ confirmLayoutMode: {
103
+ id: "form/confirm-layout-mode",
104
+ summary: "A secretMint confirm layout is a single-step form.",
105
+ fix: 'Remove mode or set it to "single".',
106
+ },
107
+ confirmLayoutDraft: {
108
+ id: "form/confirm-layout-draft",
109
+ summary: "A secretMint confirm layout does not persist drafts.",
110
+ fix: "Remove draft: true.",
111
+ },
112
+ confirmCarryEntryEmpty: {
113
+ id: "form/confirm-carry-entry-empty",
114
+ summary: "secretMint confirm.carry entries are non-empty strings.",
115
+ fix: "Use non-empty strings in carry.",
116
+ },
117
+ confirmCarryCollidesField: {
118
+ id: "form/confirm-carry-collides-field",
119
+ summary: "A confirm.carry entry does not share a name with a confirm.fields entry.",
120
+ fix: "Rename the carry entry or the field.",
121
+ },
122
+ };
@@ -0,0 +1,152 @@
1
+ export declare const FORM_FIELD_RULES: {
2
+ readonly embeddedListUnknownSubField: {
3
+ readonly id: "form/embedded-list-unknown-sub-field";
4
+ readonly summary: "embeddedList cell options name sub-fields of the embedded schema.";
5
+ readonly fix: "Name an existing sub-field.";
6
+ };
7
+ readonly embeddedListCardHiddenEditable: {
8
+ readonly id: "form/embedded-list-card-hidden-editable";
9
+ readonly summary: "embeddedList.cardHiddenCells lists only read-only cells.";
10
+ readonly fix: "Add the cell to readOnlyCells or remove it from cardHiddenCells.";
11
+ };
12
+ readonly embeddedListOnNonListField: {
13
+ readonly id: "form/embedded-list-on-non-list-field";
14
+ readonly summary: "embeddedList is set only on an embedded list field.";
15
+ readonly fix: "Remove embeddedList or point it at an embedded list field.";
16
+ };
17
+ readonly prefillTodayNeedsDate: {
18
+ readonly id: "form/prefill-today-needs-date";
19
+ readonly summary: 'The "today" prefill is set only on a date field.';
20
+ readonly fix: "Use a date field or a different prefill.";
21
+ };
22
+ readonly prefillCurrentUserFieldType: {
23
+ readonly id: "form/prefill-current-user-field-type";
24
+ readonly summary: "A currentUser prefill matches the field type.";
25
+ readonly fix: "Use a text field (or text/reference for id) or a different prefill property.";
26
+ };
27
+ readonly affixUnknownField: {
28
+ readonly id: "form/affix-unknown-field";
29
+ readonly summary: "A { field } prefix or suffix names another field of the same form.";
30
+ readonly fix: "Name a field of the same form.";
31
+ };
32
+ readonly fillActionUnknownField: {
33
+ readonly id: "form/fill-action-unknown-field";
34
+ readonly summary: "fillAction.params read fields of the same form.";
35
+ readonly fix: "Name fields of the same form in pick or map.";
36
+ };
37
+ readonly fillActionFieldType: {
38
+ readonly id: "form/fill-action-field-type";
39
+ readonly summary: "fillAction targets a text, number, decimal or bigInt field.";
40
+ readonly fix: "Remove fillAction or use a fitting field type.";
41
+ };
42
+ readonly fillActionSensitiveField: {
43
+ readonly id: "form/fill-action-sensitive-field";
44
+ readonly summary: "fillAction does not target a sensitive, writeOnly or password field.";
45
+ readonly fix: "Remove fillAction.";
46
+ };
47
+ readonly requiredFieldWithoutWidget: {
48
+ readonly id: "form/required-field-without-widget";
49
+ readonly summary: "A required entityEdit field has a widget to fill it.";
50
+ readonly fix: "Set required: false, move the field to a custom-component section, or drop the required constraint.";
51
+ };
52
+ readonly handlerEmpty: {
53
+ readonly id: "form/handler-empty";
54
+ readonly summary: "An inline form's handler is a non-empty string.";
55
+ readonly fix: "Set handler to a non-empty handler name.";
56
+ };
57
+ readonly fieldsEmpty: {
58
+ readonly id: "form/fields-empty";
59
+ readonly summary: "An inline form declares at least one field.";
60
+ readonly fix: "Declare at least one field.";
61
+ };
62
+ readonly fieldTypeMissing: {
63
+ readonly id: "form/field-type-missing";
64
+ readonly summary: "Every inline form field declares a type.";
65
+ readonly fix: 'Declare a type such as "text", "number" or "select".';
66
+ };
67
+ readonly optionsQueryPayloadSelfReference: {
68
+ readonly id: "form/options-query-payload-self-reference";
69
+ readonly summary: "optionsQueryPayload does not reference its own field.";
70
+ readonly fix: "Reference a different field of the form.";
71
+ };
72
+ readonly optionsQueryPayloadUnknownField: {
73
+ readonly id: "form/options-query-payload-unknown-field";
74
+ readonly summary: "optionsQueryPayload references fields of the same form.";
75
+ readonly fix: "Reference another field of the same form.";
76
+ };
77
+ readonly configSecretAlsoConfigKey: {
78
+ readonly id: "form/config-secret-also-config-key";
79
+ readonly summary: "A configEdit field is mapped in configKeys or secretKeys, not both.";
80
+ readonly fix: "Keep one of the mappings.";
81
+ };
82
+ readonly configSecretScope: {
83
+ readonly id: "form/config-secret-scope";
84
+ readonly summary: "Secret-mapped configEdit fields are on a tenant- or system-scope screen.";
85
+ readonly fix: 'Use scope "tenant" or "system", or drop the secret mapping.';
86
+ };
87
+ readonly configSecretFieldType: {
88
+ readonly id: "form/config-secret-field-type";
89
+ readonly summary: "A secret-mapped configEdit field is a writeOnly text field.";
90
+ readonly fix: "Make the field a writeOnly text field.";
91
+ };
92
+ readonly configSecretUndeclared: {
93
+ readonly id: "form/config-secret-undeclared";
94
+ readonly summary: "A secret-mapped configEdit field names a secret declared via r.secret().";
95
+ readonly fix: "Declare the secret with r.secret() or fix the secret name.";
96
+ };
97
+ readonly writeOnlyField: {
98
+ readonly id: "form/write-only-field";
99
+ readonly summary: "Inline form fields do not declare writeOnly.";
100
+ readonly fix: 'Remove writeOnly; use format: "password" for a masked input.';
101
+ };
102
+ readonly selectConditionalOptions: {
103
+ readonly id: "form/select-conditional-options";
104
+ readonly summary: "Inline form select fields do not declare conditionalOptions.";
105
+ readonly fix: "Remove conditionalOptions from the field.";
106
+ };
107
+ readonly selectOptionsQueryEmpty: {
108
+ readonly id: "form/select-options-query-empty";
109
+ readonly summary: "A select field's optionsQuery is non-empty when set.";
110
+ readonly fix: "Set it to a query name or remove it.";
111
+ };
112
+ readonly selectOptionsAndQuery: {
113
+ readonly id: "form/select-options-and-query";
114
+ readonly summary: "A select field declares static options or optionsQuery, not both.";
115
+ readonly fix: "Pick one of options and optionsQuery.";
116
+ };
117
+ readonly selectQueryAndAvailability: {
118
+ readonly id: "form/select-query-and-availability";
119
+ readonly summary: "optionsAvailabilityQuery is not combined with optionsQuery.";
120
+ readonly fix: "Remove optionsAvailabilityQuery or use static options.";
121
+ };
122
+ readonly optionsAvailabilityQueryEmpty: {
123
+ readonly id: "form/options-availability-query-empty";
124
+ readonly summary: "optionsAvailabilityQuery is non-empty when set.";
125
+ readonly fix: "Set it to a query name or remove it.";
126
+ };
127
+ readonly optionsQueryPayloadWithoutQuery: {
128
+ readonly id: "form/options-query-payload-without-query";
129
+ readonly summary: "optionsQueryPayload is set only together with optionsQuery.";
130
+ readonly fix: "Set optionsQuery or remove optionsQueryPayload.";
131
+ };
132
+ readonly moneyCurrencyMissing: {
133
+ readonly id: "form/money-currency-missing";
134
+ readonly summary: "An inline form money field declares its currency source.";
135
+ readonly fix: 'Declare currency: { kind: "literal", code } or { kind: "tenant" }.';
136
+ };
137
+ readonly moneyCurrencyNotObject: {
138
+ readonly id: "form/money-currency-not-object";
139
+ readonly summary: "A money field's currency is an object.";
140
+ readonly fix: 'Declare currency: { kind: "literal", code } or { kind: "tenant" }.';
141
+ };
142
+ readonly moneyCurrencyLiteralCode: {
143
+ readonly id: "form/money-currency-literal-code";
144
+ readonly summary: "A literal money currency has a non-empty string code.";
145
+ readonly fix: 'Pass the ISO code, for example { kind: "literal", code: "EUR" }.';
146
+ };
147
+ readonly moneyCurrencyUnknownKind: {
148
+ readonly id: "form/money-currency-unknown-kind";
149
+ readonly summary: 'A money field\'s currency kind is "literal" or "tenant".';
150
+ readonly fix: 'Declare currency: { kind: "literal", code } or { kind: "tenant" }.';
151
+ };
152
+ };
@@ -0,0 +1,152 @@
1
+ export const FORM_FIELD_RULES = {
2
+ embeddedListUnknownSubField: {
3
+ id: "form/embedded-list-unknown-sub-field",
4
+ summary: "embeddedList cell options name sub-fields of the embedded schema.",
5
+ fix: "Name an existing sub-field.",
6
+ },
7
+ embeddedListCardHiddenEditable: {
8
+ id: "form/embedded-list-card-hidden-editable",
9
+ summary: "embeddedList.cardHiddenCells lists only read-only cells.",
10
+ fix: "Add the cell to readOnlyCells or remove it from cardHiddenCells.",
11
+ },
12
+ embeddedListOnNonListField: {
13
+ id: "form/embedded-list-on-non-list-field",
14
+ summary: "embeddedList is set only on an embedded list field.",
15
+ fix: "Remove embeddedList or point it at an embedded list field.",
16
+ },
17
+ prefillTodayNeedsDate: {
18
+ id: "form/prefill-today-needs-date",
19
+ summary: 'The "today" prefill is set only on a date field.',
20
+ fix: "Use a date field or a different prefill.",
21
+ },
22
+ prefillCurrentUserFieldType: {
23
+ id: "form/prefill-current-user-field-type",
24
+ summary: "A currentUser prefill matches the field type.",
25
+ fix: "Use a text field (or text/reference for id) or a different prefill property.",
26
+ },
27
+ affixUnknownField: {
28
+ id: "form/affix-unknown-field",
29
+ summary: "A { field } prefix or suffix names another field of the same form.",
30
+ fix: "Name a field of the same form.",
31
+ },
32
+ fillActionUnknownField: {
33
+ id: "form/fill-action-unknown-field",
34
+ summary: "fillAction.params read fields of the same form.",
35
+ fix: "Name fields of the same form in pick or map.",
36
+ },
37
+ fillActionFieldType: {
38
+ id: "form/fill-action-field-type",
39
+ summary: "fillAction targets a text, number, decimal or bigInt field.",
40
+ fix: "Remove fillAction or use a fitting field type.",
41
+ },
42
+ fillActionSensitiveField: {
43
+ id: "form/fill-action-sensitive-field",
44
+ summary: "fillAction does not target a sensitive, writeOnly or password field.",
45
+ fix: "Remove fillAction.",
46
+ },
47
+ requiredFieldWithoutWidget: {
48
+ id: "form/required-field-without-widget",
49
+ summary: "A required entityEdit field has a widget to fill it.",
50
+ fix: "Set required: false, move the field to a custom-component section, or drop the required constraint.",
51
+ },
52
+ handlerEmpty: {
53
+ id: "form/handler-empty",
54
+ summary: "An inline form's handler is a non-empty string.",
55
+ fix: "Set handler to a non-empty handler name.",
56
+ },
57
+ fieldsEmpty: {
58
+ id: "form/fields-empty",
59
+ summary: "An inline form declares at least one field.",
60
+ fix: "Declare at least one field.",
61
+ },
62
+ fieldTypeMissing: {
63
+ id: "form/field-type-missing",
64
+ summary: "Every inline form field declares a type.",
65
+ fix: 'Declare a type such as "text", "number" or "select".',
66
+ },
67
+ optionsQueryPayloadSelfReference: {
68
+ id: "form/options-query-payload-self-reference",
69
+ summary: "optionsQueryPayload does not reference its own field.",
70
+ fix: "Reference a different field of the form.",
71
+ },
72
+ optionsQueryPayloadUnknownField: {
73
+ id: "form/options-query-payload-unknown-field",
74
+ summary: "optionsQueryPayload references fields of the same form.",
75
+ fix: "Reference another field of the same form.",
76
+ },
77
+ configSecretAlsoConfigKey: {
78
+ id: "form/config-secret-also-config-key",
79
+ summary: "A configEdit field is mapped in configKeys or secretKeys, not both.",
80
+ fix: "Keep one of the mappings.",
81
+ },
82
+ configSecretScope: {
83
+ id: "form/config-secret-scope",
84
+ summary: "Secret-mapped configEdit fields are on a tenant- or system-scope screen.",
85
+ fix: 'Use scope "tenant" or "system", or drop the secret mapping.',
86
+ },
87
+ configSecretFieldType: {
88
+ id: "form/config-secret-field-type",
89
+ summary: "A secret-mapped configEdit field is a writeOnly text field.",
90
+ fix: "Make the field a writeOnly text field.",
91
+ },
92
+ configSecretUndeclared: {
93
+ id: "form/config-secret-undeclared",
94
+ summary: "A secret-mapped configEdit field names a secret declared via r.secret().",
95
+ fix: "Declare the secret with r.secret() or fix the secret name.",
96
+ },
97
+ writeOnlyField: {
98
+ id: "form/write-only-field",
99
+ summary: "Inline form fields do not declare writeOnly.",
100
+ fix: 'Remove writeOnly; use format: "password" for a masked input.',
101
+ },
102
+ selectConditionalOptions: {
103
+ id: "form/select-conditional-options",
104
+ summary: "Inline form select fields do not declare conditionalOptions.",
105
+ fix: "Remove conditionalOptions from the field.",
106
+ },
107
+ selectOptionsQueryEmpty: {
108
+ id: "form/select-options-query-empty",
109
+ summary: "A select field's optionsQuery is non-empty when set.",
110
+ fix: "Set it to a query name or remove it.",
111
+ },
112
+ selectOptionsAndQuery: {
113
+ id: "form/select-options-and-query",
114
+ summary: "A select field declares static options or optionsQuery, not both.",
115
+ fix: "Pick one of options and optionsQuery.",
116
+ },
117
+ selectQueryAndAvailability: {
118
+ id: "form/select-query-and-availability",
119
+ summary: "optionsAvailabilityQuery is not combined with optionsQuery.",
120
+ fix: "Remove optionsAvailabilityQuery or use static options.",
121
+ },
122
+ optionsAvailabilityQueryEmpty: {
123
+ id: "form/options-availability-query-empty",
124
+ summary: "optionsAvailabilityQuery is non-empty when set.",
125
+ fix: "Set it to a query name or remove it.",
126
+ },
127
+ optionsQueryPayloadWithoutQuery: {
128
+ id: "form/options-query-payload-without-query",
129
+ summary: "optionsQueryPayload is set only together with optionsQuery.",
130
+ fix: "Set optionsQuery or remove optionsQueryPayload.",
131
+ },
132
+ moneyCurrencyMissing: {
133
+ id: "form/money-currency-missing",
134
+ summary: "An inline form money field declares its currency source.",
135
+ fix: 'Declare currency: { kind: "literal", code } or { kind: "tenant" }.',
136
+ },
137
+ moneyCurrencyNotObject: {
138
+ id: "form/money-currency-not-object",
139
+ summary: "A money field's currency is an object.",
140
+ fix: 'Declare currency: { kind: "literal", code } or { kind: "tenant" }.',
141
+ },
142
+ moneyCurrencyLiteralCode: {
143
+ id: "form/money-currency-literal-code",
144
+ summary: "A literal money currency has a non-empty string code.",
145
+ fix: 'Pass the ISO code, for example { kind: "literal", code: "EUR" }.',
146
+ },
147
+ moneyCurrencyUnknownKind: {
148
+ id: "form/money-currency-unknown-kind",
149
+ summary: 'A money field\'s currency kind is "literal" or "tenant".',
150
+ fix: 'Declare currency: { kind: "literal", code } or { kind: "tenant" }.',
151
+ },
152
+ };