@marianmeres/collection-types 2.8.0 → 2.10.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.md CHANGED
@@ -185,8 +185,7 @@ interface ModelDTOOut extends ModelDTOIn {
185
185
  // Database (+ internal fields)
186
186
  interface ModelDbRow extends ModelDTOOut {
187
187
  __is_rest_disabled: boolean;
188
- __searchable: Record<string, unknown>;
189
- __searchable2: string;
188
+ __searchable: string;
190
189
  __hierarchy_path: LtreePath | null;
191
190
  }
192
191
 
@@ -56,9 +56,14 @@ export interface CollectionDTOIn {
56
56
  is_deletable?: boolean;
57
57
  /** Whether collection is read-only */
58
58
  is_readonly?: boolean;
59
- /** Folder definitions */
60
- folders?: Record<string, FolderDefinition>;
61
- /** Tag definitions per model type */
59
+ /**
60
+ * Folder definitions per model type. Outer key is the model type (or the
61
+ * special `"__common__"` bucket applied to every type); inner key is the
62
+ * folder (ltree) label. Mirrors {@link tags}; this is the shape the server
63
+ * reads in `ServiceModel.findAllFolders` (`coll.folders["__common__" | type]`).
64
+ */
65
+ folders?: Record<string, Record<string, FolderDefinition>>;
66
+ /** Tag definitions per model type (outer key = model type / `"__common__"`). */
62
67
  tags?: Record<string, Record<string, TagDefinition>>;
63
68
  /** Ownership mode for models in this collection */
64
69
  owner_id_mode?: OwnerIdMode;
@@ -76,7 +81,7 @@ export interface CollectionDTOIn {
76
81
  __is_hierarchy_enabled?: boolean;
77
82
  /**
78
83
  * Lightweight-mode kill switch — when `false`, the fulltext indexing path
79
- * (`__searchable`, `__searchable2`, generated tsvectors) is skipped. The
84
+ * (`__searchable`, generated tsvectors) is skipped. The
80
85
  * `data` GIN index remains active, so `data @>` / `data ?` queries still
81
86
  * work. Defaults to `true`. **Immutable after creation.**
82
87
  */
package/dist/model.d.ts CHANGED
@@ -81,10 +81,8 @@ export interface ModelDTOOut extends ModelDTOIn {
81
81
  export interface ModelDbRow extends ModelDTOOut {
82
82
  /** @internal Disables REST API access */
83
83
  __is_rest_disabled: boolean;
84
- /** @internal Structured search index data */
85
- __searchable: Record<string, unknown>;
86
- /** @internal Full-text search string */
87
- __searchable2: string;
84
+ /** @internal Full-text search token source (whitespace-joined word list) */
85
+ __searchable: string;
88
86
  /** @internal Cached hierarchy path for ancestor queries */
89
87
  __hierarchy_path: LtreePath | null;
90
88
  }
@@ -36,6 +36,14 @@ export type ObjectSchema<T> = {
36
36
  * last touched" in the list.
37
37
  */
38
38
  _data_table_dates?: ("_created_at" | "_updated_at")[];
39
+ /**
40
+ * Admin list-view hint: blacklist of always-on system columns to suppress in
41
+ * the DataTable (e.g. `["model_id"]` to hide the opaque UUID when the built-in
42
+ * human-friendly `code` column already identifies the row). Applied after the
43
+ * column list is assembled. Cosmetic only — row navigation reads `model_id`
44
+ * from the row, not the visible column.
45
+ */
46
+ _data_table_hidden_columns?: string[];
39
47
  };
40
48
  /** Extended schema (loose typing for __extends patterns) */
41
49
  export type ExtendedSchema = {
package/dist/schema.d.ts CHANGED
@@ -50,6 +50,11 @@ export interface SelectConfig {
50
50
  intent?: string;
51
51
  }>;
52
52
  multiple?: boolean;
53
+ /** `multiselect` only: when true the picker accepts free-text values not in
54
+ * `options` (the listed options become suggestions, not a closed set). Use
55
+ * for fields like account `roles` where the value set is intentionally open
56
+ * server-side. Default false (a true closed enum). */
57
+ allowUnknown?: boolean;
53
58
  }
54
59
  /** Configuration for keyvalues fields */
55
60
  export interface KeyValuesConfig {
@@ -34,7 +34,7 @@ Relation: RelationDTOIn → RelationDTOOut → RelationDbRow (= Relation)
34
34
  | ----------------- | ------------------------------------------------------------------- |
35
35
  | `ModelDTOIn` | Input DTO (type, parent_id, path, folder, tags, data, meta, flags) |
36
36
  | `ModelDTOOut` | + model_id, collection_id, depth, _label, _created_at, _updated_at |
37
- | `ModelDbRow` | + __is_rest_disabled, __searchable, __searchable2, __hierarchy_path |
37
+ | `ModelDbRow` | + __is_rest_disabled, __searchable, __hierarchy_path |
38
38
  | `ModelUpsertData` | + **relations** for relation upserts |
39
39
  | `Model<TData>` | Generic type with typed data field |
40
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/collection-types",
3
- "version": "2.8.0",
3
+ "version": "2.10.0",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",