@dforge-core/metadata 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/actions.d.ts +31 -0
  2. package/dist/actions.d.ts.map +1 -0
  3. package/dist/actions.js +7 -0
  4. package/dist/actions.js.map +1 -0
  5. package/dist/aggregation.d.ts +13 -0
  6. package/dist/aggregation.d.ts.map +1 -0
  7. package/dist/aggregation.js +17 -0
  8. package/dist/aggregation.js.map +1 -0
  9. package/dist/base-datatypes.d.ts +5 -0
  10. package/dist/base-datatypes.d.ts.map +1 -0
  11. package/dist/base-datatypes.js +49 -0
  12. package/dist/base-datatypes.js.map +1 -0
  13. package/dist/column-types.d.ts +5 -0
  14. package/dist/column-types.d.ts.map +1 -0
  15. package/dist/column-types.js +18 -0
  16. package/dist/column-types.js.map +1 -0
  17. package/dist/data-views.d.ts +95 -0
  18. package/dist/data-views.d.ts.map +1 -0
  19. package/dist/data-views.js +17 -0
  20. package/dist/data-views.js.map +1 -0
  21. package/dist/derive.d.ts +19 -0
  22. package/dist/derive.d.ts.map +1 -0
  23. package/dist/derive.js +51 -0
  24. package/dist/derive.js.map +1 -0
  25. package/dist/entity.d.ts +110 -0
  26. package/dist/entity.d.ts.map +1 -0
  27. package/dist/entity.js +7 -0
  28. package/dist/entity.js.map +1 -0
  29. package/dist/field-types.d.ts +260 -0
  30. package/dist/field-types.d.ts.map +1 -0
  31. package/dist/field-types.js +55 -0
  32. package/dist/field-types.js.map +1 -0
  33. package/dist/filter.d.ts +26 -0
  34. package/dist/filter.d.ts.map +1 -0
  35. package/dist/filter.js +7 -0
  36. package/dist/filter.js.map +1 -0
  37. package/dist/folders.d.ts +32 -0
  38. package/dist/folders.d.ts.map +1 -0
  39. package/dist/folders.js +6 -0
  40. package/dist/folders.js.map +1 -0
  41. package/dist/index.d.ts +27 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +31 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/jobs.d.ts +32 -0
  46. package/dist/jobs.d.ts.map +1 -0
  47. package/dist/jobs.js +3 -0
  48. package/dist/jobs.js.map +1 -0
  49. package/dist/manifest.d.ts +53 -0
  50. package/dist/manifest.d.ts.map +1 -0
  51. package/dist/manifest.js +4 -0
  52. package/dist/manifest.js.map +1 -0
  53. package/dist/menus.d.ts +32 -0
  54. package/dist/menus.d.ts.map +1 -0
  55. package/dist/menus.js +3 -0
  56. package/dist/menus.js.map +1 -0
  57. package/dist/print-templates.d.ts +36 -0
  58. package/dist/print-templates.d.ts.map +1 -0
  59. package/dist/print-templates.js +4 -0
  60. package/dist/print-templates.js.map +1 -0
  61. package/dist/reports.d.ts +84 -0
  62. package/dist/reports.d.ts.map +1 -0
  63. package/dist/reports.js +24 -0
  64. package/dist/reports.js.map +1 -0
  65. package/dist/roles.d.ts +10 -0
  66. package/dist/roles.d.ts.map +1 -0
  67. package/dist/roles.js +3 -0
  68. package/dist/roles.js.map +1 -0
  69. package/dist/seed-data.d.ts +8 -0
  70. package/dist/seed-data.d.ts.map +1 -0
  71. package/dist/seed-data.js +4 -0
  72. package/dist/seed-data.js.map +1 -0
  73. package/dist/settings.d.ts +26 -0
  74. package/dist/settings.d.ts.map +1 -0
  75. package/dist/settings.js +3 -0
  76. package/dist/settings.js.map +1 -0
  77. package/dist/traits.d.ts +14 -0
  78. package/dist/traits.d.ts.map +1 -0
  79. package/dist/traits.js +121 -0
  80. package/dist/traits.js.map +1 -0
  81. package/dist/triggers.d.ts +24 -0
  82. package/dist/triggers.d.ts.map +1 -0
  83. package/dist/triggers.js +3 -0
  84. package/dist/triggers.js.map +1 -0
  85. package/dist/types.d.ts +121 -0
  86. package/dist/types.d.ts.map +1 -0
  87. package/dist/types.js +7 -0
  88. package/dist/types.js.map +1 -0
  89. package/dist/webhooks.d.ts +31 -0
  90. package/dist/webhooks.d.ts.map +1 -0
  91. package/dist/webhooks.js +3 -0
  92. package/dist/webhooks.js.map +1 -0
  93. package/package.json +54 -0
  94. package/src/actions.ts +38 -0
  95. package/src/aggregation.ts +21 -0
  96. package/src/base-datatypes.ts +53 -0
  97. package/src/column-types.ts +22 -0
  98. package/src/data-views.ts +139 -0
  99. package/src/derive.ts +63 -0
  100. package/src/entity.ts +124 -0
  101. package/src/field-types.ts +68 -0
  102. package/src/filter.ts +34 -0
  103. package/src/folders.ts +39 -0
  104. package/src/index.ts +109 -0
  105. package/src/jobs.ts +34 -0
  106. package/src/manifest.ts +54 -0
  107. package/src/menus.ts +36 -0
  108. package/src/print-templates.ts +41 -0
  109. package/src/reports.ts +111 -0
  110. package/src/roles.ts +12 -0
  111. package/src/seed-data.ts +10 -0
  112. package/src/settings.ts +29 -0
  113. package/src/traits.ts +127 -0
  114. package/src/triggers.ts +27 -0
  115. package/src/types.ts +177 -0
  116. package/src/webhooks.ts +35 -0
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Execution mode. 'single' (default) and 'each' run the DSL per selected record;
3
+ * 'batch' runs once with all records exposed as `__records`.
4
+ */
5
+ export type ActionExecutionMode = "single" | "each" | "batch";
6
+ /** A single action declaration (value in the `ui/actions.json` map). */
7
+ export interface ActionDef {
8
+ /** Human-readable description. */
9
+ description: string;
10
+ /** Button label. */
11
+ label: string;
12
+ /** Bootstrap icon class (e.g. 'bi-telephone-check'). */
13
+ icon: string;
14
+ /** Entity code this action targets. */
15
+ entityCode: string;
16
+ /** Per-record vs. batch execution. */
17
+ executionMode: ActionExecutionMode;
18
+ /** DSL script name (file under `logic/actions/<script>.dsl`). */
19
+ script: string;
20
+ /** Run inside a transaction (failures roll back). */
21
+ isTransacted?: boolean;
22
+ /** Display order. */
23
+ orderNum?: number;
24
+ /** Run in the background (newer `async`; some modules use `isAsync`). */
25
+ async?: boolean;
26
+ /** Alternate spelling of `async` used by some modules. Prefer `async`. */
27
+ isAsync?: boolean;
28
+ }
29
+ /** A `ui/actions.json` file: action code → definition. */
30
+ export type ActionsFile = Record<string, ActionDef>;
31
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAE9D,wEAAwE;AACxE,MAAM,WAAW,SAAS;IACzB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,aAAa,EAAE,mBAAmB,CAAC;IACnC,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ // Actions — authoring shape of `ui/actions.json`.
2
+ //
3
+ // There is no published JSON schema for actions; this mirrors the shape used
4
+ // across the core modules. Parameter declarations and logic live in the action
5
+ // DSL file (`logic/actions/<script>.dsl`), not here.
6
+ export {};
7
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,qDAAqD"}
@@ -0,0 +1,13 @@
1
+ export declare const AggType: {
2
+ readonly Sum: "sum";
3
+ readonly Count: "count";
4
+ readonly Avg: "avg";
5
+ readonly Min: "min";
6
+ readonly Max: "max";
7
+ readonly Group: "group";
8
+ };
9
+ /** One of the aggregation codes ("sum" | "count" | …). */
10
+ export type AggType = (typeof AggType)[keyof typeof AggType];
11
+ /** All aggregation types as an array (useful for iteration). */
12
+ export declare const AGG_TYPE_LIST: readonly AggType[];
13
+ //# sourceMappingURL=aggregation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregation.d.ts","sourceRoot":"","sources":["../src/aggregation.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO;;;;;;;CAOV,CAAC;AAEX,0DAA0D;AAC1D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAE7D,gEAAgE;AAChE,eAAO,MAAM,aAAa,EAAE,SAAS,OAAO,EAA2B,CAAC"}
@@ -0,0 +1,17 @@
1
+ // Aggregation types — the kinds of aggregation a column/report value can use.
2
+ //
3
+ // Declared as a `const` object + derived union (not a TS `enum`) so the package
4
+ // stays enum-free like the rest of its registries, while callers keep the
5
+ // ergonomic `AggType.Sum` member access. `AggType.Sum === "sum"` at runtime, so
6
+ // the value is interchangeable with the plain string everywhere.
7
+ export const AggType = {
8
+ Sum: "sum",
9
+ Count: "count",
10
+ Avg: "avg",
11
+ Min: "min",
12
+ Max: "max",
13
+ Group: "group",
14
+ };
15
+ /** All aggregation types as an array (useful for iteration). */
16
+ export const AGG_TYPE_LIST = Object.values(AggType);
17
+ //# sourceMappingURL=aggregation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregation.js","sourceRoot":"","sources":["../src/aggregation.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,EAAE;AACF,gFAAgF;AAChF,0EAA0E;AAC1E,gFAAgF;AAChF,iEAAiE;AAEjE,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;CACL,CAAC;AAKX,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAuB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { BaseDatatypeCd } from "./types";
2
+ export declare const baseDatatypes: readonly BaseDatatypeCd[];
3
+ /** Default PostgreSQL type for a base datatype, or `null` if non-physical. */
4
+ export declare function baseToDbDatatype(base: string): string | null;
5
+ //# sourceMappingURL=base-datatypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-datatypes.d.ts","sourceRoot":"","sources":["../src/base-datatypes.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,aAAa,EAAE,SAAS,cAAc,EAiBzC,CAAC;AAuBX,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE5D"}
@@ -0,0 +1,49 @@
1
+ // Base datatype registry — mirror of
2
+ // server/database/system-modules/metadata/seed-data/base_datatypes.json
3
+ //
4
+ // Plus the canonical mapping from an abstract base datatype to the default
5
+ // PostgreSQL column type the platform generates. The visual editor uses this so
6
+ // the author never has to type a raw SQL type.
7
+ export const baseDatatypes = [
8
+ "binary",
9
+ "bool",
10
+ "culture",
11
+ "cuid",
12
+ "date",
13
+ "guid",
14
+ "json",
15
+ "link",
16
+ "number",
17
+ "project",
18
+ "ref",
19
+ "set",
20
+ "string",
21
+ "time",
22
+ "timestamp",
23
+ "xml",
24
+ ];
25
+ // Default PostgreSQL type per base datatype. `null` entries are non-physical
26
+ // (relationship/virtual) base types that never produce a column on their own.
27
+ const BASE_TO_DB = {
28
+ binary: "bytea",
29
+ bool: "bool",
30
+ culture: "varchar",
31
+ cuid: "cuid",
32
+ date: "date",
33
+ guid: "uuid",
34
+ json: "jsonb",
35
+ link: null,
36
+ number: "numeric",
37
+ project: "varchar",
38
+ ref: null,
39
+ set: null,
40
+ string: "varchar",
41
+ time: "time",
42
+ timestamp: "timestamptz",
43
+ xml: "xml",
44
+ };
45
+ /** Default PostgreSQL type for a base datatype, or `null` if non-physical. */
46
+ export function baseToDbDatatype(base) {
47
+ return BASE_TO_DB[base] ?? null;
48
+ }
49
+ //# sourceMappingURL=base-datatypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-datatypes.js","sourceRoot":"","sources":["../src/base-datatypes.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,0EAA0E;AAC1E,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,+CAA+C;AAI/C,MAAM,CAAC,MAAM,aAAa,GAA8B;IACvD,QAAQ;IACR,MAAM;IACN,SAAS;IACT,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,KAAK;IACL,KAAK;IACL,QAAQ;IACR,MAAM;IACN,WAAW;IACX,KAAK;CACI,CAAC;AAEX,6EAA6E;AAC7E,8EAA8E;AAC9E,MAAM,UAAU,GAA0C;IACzD,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,aAAa;IACxB,GAAG,EAAE,KAAK;CACV,CAAC;AAEF,8EAA8E;AAC9E,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC5C,OAAQ,UAA4C,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AACpE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { ColumnTypeDef } from "./types";
2
+ export declare const columnTypes: readonly ColumnTypeDef[];
3
+ /** Look up a column type by letter. */
4
+ export declare function getColumnType(cd: string): ColumnTypeDef | undefined;
5
+ //# sourceMappingURL=column-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-types.d.ts","sourceRoot":"","sources":["../src/column-types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,SAAS,aAAa,EAQtC,CAAC;AAIX,uCAAuC;AACvC,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEnE"}
@@ -0,0 +1,18 @@
1
+ // Column-type registry — the seven column kinds a field can have. Letters match
2
+ // the `column.column_type` values and entity.schema.json. The `name` /
3
+ // `description` here drive the friendly "what kind of field is this?" picker.
4
+ export const columnTypes = [
5
+ { cd: "D", name: "Value", description: "A plain data column stored on this entity." },
6
+ { cd: "R", name: "Reference", description: "An N:1 lookup to another entity (foreign key)." },
7
+ { cd: "S", name: "Child list", description: "A 1:N collection of child records from another entity." },
8
+ { cd: "F", name: "Formula", description: "A virtual value calculated from a formula expression." },
9
+ { cd: "G", name: "Generated", description: "A physical column auto-maintained by the database (aggregate or expression)." },
10
+ { cd: "A", name: "Accumulation register", description: "Posts this document into a balance entity (single direction)." },
11
+ { cd: "L", name: "Ledger register", description: "Posts document lines into movements + balances (double entry)." },
12
+ ];
13
+ const byCd = new Map(columnTypes.map((ct) => [ct.cd, ct]));
14
+ /** Look up a column type by letter. */
15
+ export function getColumnType(cd) {
16
+ return byCd.get(cd);
17
+ }
18
+ //# sourceMappingURL=column-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-types.js","sourceRoot":"","sources":["../src/column-types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,uEAAuE;AACvE,8EAA8E;AAI9E,MAAM,CAAC,MAAM,WAAW,GAA6B;IACpD,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4CAA4C,EAAE;IACrF,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,gDAAgD,EAAE;IAC7F,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,wDAAwD,EAAE;IACtG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,uDAAuD,EAAE;IAClG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,8EAA8E,EAAE;IAC3H,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,+DAA+D,EAAE;IACxH,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,gEAAgE,EAAE;CAC1G,CAAC;AAEX,MAAM,IAAI,GAAG,IAAI,GAAG,CAAwB,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAElF,uCAAuC;AACvC,MAAM,UAAU,aAAa,CAAC,EAAU;IACvC,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,95 @@
1
+ import type { Filter } from "./filter";
2
+ import type { NamedKind } from "./types";
3
+ export type { NamedKind };
4
+ /** `viewType` values for `ui/data_views.json`. Source: data_views.schema.json. */
5
+ export type ViewType = "grid" | "list" | "kanban" | "calendar" | "gallery" | "tree-grid" | "diagram" | "master-detail" | "library";
6
+ /** Friendly picker list of the view kinds. */
7
+ export declare const dataViewKinds: readonly NamedKind[];
8
+ /** A column in a data source: shorthand string code or a configured object. */
9
+ export type ViewColumn = string | {
10
+ /** Column code. */
11
+ column_cd: string;
12
+ /** Column width in pixels. */
13
+ width?: number;
14
+ /** Whether the column is visible (default true). */
15
+ visible?: boolean;
16
+ /** Pin column to an edge. */
17
+ pinned?: "left" | "right";
18
+ };
19
+ /** One data source within a view. */
20
+ export interface DataSource {
21
+ /** Entity code to query. */
22
+ entityCode: string;
23
+ /** Nesting level (0 = root, 1+ = detail). */
24
+ level?: number;
25
+ /** Human-readable label (used in master-detail tabs). */
26
+ label?: string;
27
+ /** Column configuration. */
28
+ columns?: ViewColumn[];
29
+ /** Set field on the parent entity linking to this detail level. */
30
+ parentSetField?: string;
31
+ /** Per-source filter; overrides the view-level filter for this source. */
32
+ filter?: Filter;
33
+ /** Per-source sort order (array of `{ c, d }` entries). */
34
+ order?: unknown;
35
+ }
36
+ export interface KanbanViewConfig {
37
+ /** Dropdown/flags/reference column to group cards by. */
38
+ groupByField: string;
39
+ }
40
+ export interface CalendarViewConfig {
41
+ /** Date/timestamp column used to place events. */
42
+ dateField: string;
43
+ /** Column shown as event title (defaults to the entity toString). */
44
+ titleField?: string;
45
+ /** Column whose value drives the event pill color. */
46
+ colorField?: string;
47
+ }
48
+ export interface TreeGridViewConfig {
49
+ /** Self-referencing FK column (parent record). */
50
+ parentField: string;
51
+ /** Node label field (defaults to entity toString). */
52
+ labelField?: string;
53
+ /** Field containing a Bootstrap icon class per node. */
54
+ iconField?: string;
55
+ }
56
+ export interface ListLevelConfig {
57
+ /** Entity code for this child level. */
58
+ entityCode: string;
59
+ /** FK column in the child entity linking back to the parent. */
60
+ foreignKey: string;
61
+ /** Columns to display inline for each child row. */
62
+ columns?: string[];
63
+ }
64
+ export interface ListViewConfig {
65
+ titleField?: string;
66
+ subtitleField?: string;
67
+ /** Hierarchical child levels for expandable list rows. */
68
+ levels?: ListLevelConfig[];
69
+ }
70
+ export interface DiagramViewConfig {
71
+ /** Column to group diagram nodes by. */
72
+ groupByField?: string;
73
+ /** Group values hidden by default. */
74
+ defaultHiddenGroups?: string[];
75
+ }
76
+ /** A single data view (value in the `ui/data_views.json` map). */
77
+ export interface DataViewDef {
78
+ viewType: ViewType;
79
+ /** Human-readable view name. */
80
+ label?: string;
81
+ /** Bootstrap icon class (e.g. 'bi-bounding-box'). */
82
+ icon?: string;
83
+ description?: string;
84
+ /** Data sources (at least one; master-detail needs two). */
85
+ dataSources: DataSource[];
86
+ /** Default filter applied to all sources unless one declares its own. */
87
+ filter?: Filter;
88
+ /** Default sort order. */
89
+ order?: unknown;
90
+ /** View-type-specific configuration. */
91
+ viewConfig?: KanbanViewConfig | CalendarViewConfig | TreeGridViewConfig | ListViewConfig | DiagramViewConfig | Record<string, unknown>;
92
+ }
93
+ /** A `ui/data_views.json` file: data view code → definition. */
94
+ export type DataViewsFile = Record<string, DataViewDef>;
95
+ //# sourceMappingURL=data-views.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-views.d.ts","sourceRoot":"","sources":["../src/data-views.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,kFAAkF;AAClF,MAAM,MAAM,QAAQ,GACjB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,UAAU,GACV,SAAS,GACT,WAAW,GACX,SAAS,GACT,eAAe,GACf,SAAS,CAAC;AAEb,8CAA8C;AAC9C,eAAO,MAAM,aAAa,EAAE,SAAS,SAAS,EAUpC,CAAC;AAEX,+EAA+E;AAC/E,MAAM,MAAM,UAAU,GACnB,MAAM,GACN;IACA,mBAAmB;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6BAA6B;IAC7B,MAAM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AW,iBAAiB;IACjC,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,kEAAkE;AAClE,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,UAAU,CAAC,EACR,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,iBAAiB,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3B;AAED,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ // Data-view registries + the authoring shape of a `ui/data_views.json` file.
2
+ //
3
+ // `dataViewKinds` is the friendly picker list; `DataViewDef` and friends mirror
4
+ // the structural `data_views.schema.json` so editors/MCP/CLI can build views.
5
+ /** Friendly picker list of the view kinds. */
6
+ export const dataViewKinds = [
7
+ { cd: "grid", name: "Grid" },
8
+ { cd: "list", name: "List" },
9
+ { cd: "kanban", name: "Kanban" },
10
+ { cd: "calendar", name: "Calendar" },
11
+ { cd: "gallery", name: "Gallery" },
12
+ { cd: "tree-grid", name: "Tree Grid" },
13
+ { cd: "diagram", name: "Diagram" },
14
+ { cd: "master-detail", name: "Master / Detail" },
15
+ { cd: "library", name: "Library" },
16
+ ];
17
+ //# sourceMappingURL=data-views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-views.js","sourceRoot":"","sources":["../src/data-views.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAmB9E,8CAA8C;AAC9C,MAAM,CAAC,MAAM,aAAa,GAAyB;IAClD,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;IAChC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE;IACpC,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAClC,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE;IACtC,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAClC,EAAE,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,EAAE;IAChD,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;CACzB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /** Total digits used when building a `numeric(total, scale)` type. */
2
+ export declare const NUMERIC_TOTAL = 18;
3
+ export interface DeriveOptions {
4
+ /** Author-specified max length; overrides the field type's default. */
5
+ maxLen?: number | null;
6
+ /** Author-specified numeric scale; overrides the field type's default. */
7
+ precision?: number | null;
8
+ }
9
+ /**
10
+ * Derive the PostgreSQL `dbDatatype` for a field type. Returns `null` for
11
+ * field types backed by relationships/sets (lookup, grid) that have no physical
12
+ * column of their own. Unknown field types fall back to `varchar`.
13
+ */
14
+ export declare function deriveDbDatatype(fieldTypeCd: string, options?: DeriveOptions): string | null;
15
+ /** Default `params` to seed a new field of this type with (or `undefined`). */
16
+ export declare function defaultParams(fieldTypeCd: string): Record<string, unknown> | undefined;
17
+ /** The base datatype code a field type maps to (for `baseDatatypeCd` on F columns). */
18
+ export declare function deriveBaseDatatype(fieldTypeCd: string): string | undefined;
19
+ //# sourceMappingURL=derive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../src/derive.ts"],"names":[],"mappings":"AASA,sEAAsE;AACtE,eAAO,MAAM,aAAa,KAAK,CAAC;AAKhC,MAAM,WAAW,aAAa;IAC7B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,GAAG,IAAI,CAuBhG;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAItF;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1E"}
package/dist/derive.js ADDED
@@ -0,0 +1,51 @@
1
+ // Derivation helpers — turn a friendly field-type choice into the physical
2
+ // metadata the platform needs, so the author never types a raw SQL type.
3
+ //
4
+ // Defaults follow how core modules actually author fields (e.g. currency →
5
+ // numeric(18,2), color → varchar(20)); callers may always override the result.
6
+ import { baseToDbDatatype } from "./base-datatypes";
7
+ import { getFieldType } from "./field-types";
8
+ /** Total digits used when building a `numeric(total, scale)` type. */
9
+ export const NUMERIC_TOTAL = 18;
10
+ /** Field types whose natural storage is unbounded `text` rather than `varchar`. */
11
+ const TEXT_BACKED = new Set(["textarea", "richtext", "code"]);
12
+ /**
13
+ * Derive the PostgreSQL `dbDatatype` for a field type. Returns `null` for
14
+ * field types backed by relationships/sets (lookup, grid) that have no physical
15
+ * column of their own. Unknown field types fall back to `varchar`.
16
+ */
17
+ export function deriveDbDatatype(fieldTypeCd, options = {}) {
18
+ const ft = getFieldType(fieldTypeCd);
19
+ if (!ft)
20
+ return "varchar";
21
+ // Relationship-backed types (lookup → R, grid → S) never own a physical
22
+ // column — the FK lives on a separate hidden column.
23
+ if (ft.columnType === "R" || ft.columnType === "S")
24
+ return null;
25
+ const base = baseToDbDatatype(ft.baseDatatypeCd);
26
+ if (base === null)
27
+ return null; // other non-physical base (link/ref/set)
28
+ if (ft.baseDatatypeCd === "number") {
29
+ const precision = options.precision ?? ft.precision;
30
+ return precision != null ? `numeric(${NUMERIC_TOTAL},${precision})` : "numeric";
31
+ }
32
+ if (ft.baseDatatypeCd === "string") {
33
+ if (TEXT_BACKED.has(ft.cd))
34
+ return "text";
35
+ const maxLen = options.maxLen ?? ft.maxLen;
36
+ return maxLen != null ? `varchar(${maxLen})` : "varchar";
37
+ }
38
+ return base;
39
+ }
40
+ /** Default `params` to seed a new field of this type with (or `undefined`). */
41
+ export function defaultParams(fieldTypeCd) {
42
+ const ft = getFieldType(fieldTypeCd);
43
+ if (!ft?.defParams)
44
+ return undefined;
45
+ return { ...ft.defParams };
46
+ }
47
+ /** The base datatype code a field type maps to (for `baseDatatypeCd` on F columns). */
48
+ export function deriveBaseDatatype(fieldTypeCd) {
49
+ return getFieldType(fieldTypeCd)?.baseDatatypeCd;
50
+ }
51
+ //# sourceMappingURL=derive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derive.js","sourceRoot":"","sources":["../src/derive.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yEAAyE;AACzE,EAAE;AACF,2EAA2E;AAC3E,+EAA+E;AAE/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,sEAAsE;AACtE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAEhC,mFAAmF;AACnF,MAAM,WAAW,GAAG,IAA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,IAAI,CAAC,EAAE,EAAE,SAAS;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;AAC5B,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IACrD,OAAO,YAAY,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC;AAClD,CAAC"}
@@ -0,0 +1,110 @@
1
+ import type { FieldDef } from "./types";
2
+ /** Trait codes valid in an entity's `traits` array (entity.schema.json enum). */
3
+ export type TraitCd = "identity" | "audit" | "audit-full" | "soft-delete" | "sorting" | "postable" | "accumulation" | "ledger" | "period" | "file-library";
4
+ /** Foreign-key reference (legacy `references` block — prefer `link` on a field). */
5
+ export interface EntityReference {
6
+ from: {
7
+ field: string;
8
+ };
9
+ to: {
10
+ entity: string;
11
+ field: string;
12
+ };
13
+ }
14
+ /** Automatic document numbering config (entity `numberSequence`). */
15
+ export interface NumberSequenceDef {
16
+ /** Column code that receives the auto-generated number. */
17
+ column: string;
18
+ /** Module setting code to resolve the prefix from (folder-scoped). */
19
+ prefixSettingCd?: string;
20
+ /** Fallback prefix when no setting is configured. */
21
+ defaultPrefix: string;
22
+ /** Format pattern. Placeholders: {prefix}, {yyyy}, {yy}, {mm}, {dd}, {seq:N}. */
23
+ pattern?: string;
24
+ /** Counter reset period (default: year). */
25
+ resetPeriod?: "year" | "month" | "day" | "never";
26
+ }
27
+ /** Period-entity config (`period` block; requires the `period` trait). */
28
+ export interface PeriodConfig {
29
+ /** Format for the period key. Placeholders: {yyyy}, {yy}, {MM}, {dd}, {q}. */
30
+ keyFormat: string;
31
+ }
32
+ /** Dynamic sign determination based on a field value. */
33
+ export interface SignConfig {
34
+ /** Field code that determines direction. */
35
+ field: string;
36
+ /** Values that mean increase. */
37
+ positive: string[];
38
+ /** Values that mean decrease. */
39
+ negative: string[];
40
+ }
41
+ /** Accumulation-registry config (`accumulation` block; requires the trait). */
42
+ export interface AccumulationConfig {
43
+ /** Balance entity code (e.g. 'stock'). */
44
+ balanceEntity: string;
45
+ /** Balance lookup dimensions: field-name array or balance→document field map. */
46
+ dimensions: string[] | Record<string, string>;
47
+ /** Document field → balance field resource mappings. */
48
+ resources: Record<string, {
49
+ balanceField: string;
50
+ }>;
51
+ /** Fixed posting direction for all postings. */
52
+ direction?: "increase" | "decrease";
53
+ /** Dynamic sign (alternative to `direction`). */
54
+ sign?: SignConfig;
55
+ autoCreateBalance?: boolean;
56
+ allowNegative?: boolean;
57
+ /** Document fields locked once posted. */
58
+ lockedFields?: string[];
59
+ }
60
+ /** One registry target within an L-column's `registries` array. */
61
+ export interface LedgerRegistryEntry {
62
+ /** Movement entity code (e.g. 'posting_record'). */
63
+ movementEntity: string;
64
+ /** Line field → movement field mapping. */
65
+ movementMapping: Record<string, string>;
66
+ /** Balance entity code (e.g. 'balance_register'). */
67
+ balanceEntity: string;
68
+ balanceMapping: {
69
+ /** Balance row dimension columns. */
70
+ dimensions: string[];
71
+ /** Balance column for debit turnover. */
72
+ debitResource: string;
73
+ /** Balance column for credit turnover. */
74
+ creditResource: string;
75
+ };
76
+ }
77
+ /** A single entity definition (`entities/<code>.json`). */
78
+ export interface EntityDef {
79
+ /** Qualified entity code to extend (e.g. 'fin.invoice') — turns this into an extension. */
80
+ extends?: string;
81
+ description?: string;
82
+ /** Database schema name override (defaults to module schema). */
83
+ schema?: string;
84
+ /** Database table/view name (defaults to entity code). */
85
+ dbObject?: string;
86
+ /** When true, maps to a SQL view (read-only, no DDL). */
87
+ isView?: boolean;
88
+ /** SELECT statement for view-backed entities (`isView=true`). */
89
+ viewSql?: string;
90
+ /** Display pattern using column placeholders, e.g. "{first_name} {last_name}". */
91
+ toString?: string;
92
+ /** Traits expanded at install time. */
93
+ traits?: TraitCd[];
94
+ /** Column definitions keyed by column code. */
95
+ fields: Record<string, FieldDef>;
96
+ /** Database constraints (unique, check, …); free-form per the schema. */
97
+ constraints?: Record<string, unknown>;
98
+ /** FK references (legacy format; prefer `link` on a field). */
99
+ references?: Record<string, EntityReference>;
100
+ /** Database index definitions; free-form per the schema. */
101
+ indexes?: Record<string, unknown>;
102
+ numberSequence?: NumberSequenceDef;
103
+ period?: PeriodConfig;
104
+ accumulation?: AccumulationConfig;
105
+ /** Entity-level platform behavior flags. */
106
+ params?: {
107
+ restricted?: boolean;
108
+ } & Record<string, unknown>;
109
+ }
110
+ //# sourceMappingURL=entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,iFAAiF;AACjF,MAAM,MAAM,OAAO,GAChB,UAAU,GACV,OAAO,GACP,YAAY,GACZ,aAAa,GACb,SAAS,GACT,UAAU,GACV,cAAc,GACd,QAAQ,GACR,QAAQ,GACR,cAAc,CAAC;AAElB,oFAAoF;AACpF,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IACjC,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;CACjD;AAED,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC5B,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,yDAAyD;AACzD,MAAM,WAAW,UAAU;IAC1B,4CAA4C;IAC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ChB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACjC,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC7C,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,4CAA4C;IAC5C,MAAM,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5D"}
package/dist/entity.js ADDED
@@ -0,0 +1,7 @@
1
+ // Entity definition — authoring shape of an `entities/*.json` file.
2
+ //
3
+ // Mirror of entity.schema.json. Describes a table/view mapping: its fields
4
+ // (see FieldDef in types.ts), traits, references, number sequence and the
5
+ // register configs for accumulation/ledger entities.
6
+ export {};
7
+ //# sourceMappingURL=entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,qDAAqD"}