@marianmeres/collection-types 2.4.0 → 2.5.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.
@@ -62,6 +62,37 @@ export interface CollectionDTOIn {
62
62
  tags?: Record<string, Record<string, TagDefinition>>;
63
63
  /** Ownership mode for models in this collection */
64
64
  owner_id_mode?: OwnerIdMode;
65
+ /**
66
+ * Lightweight-mode kill switch — when `false`, this collection cannot
67
+ * participate in relations. Defaults to `true`. **Immutable after creation.**
68
+ */
69
+ __is_relations_enabled?: boolean;
70
+ /**
71
+ * Lightweight-mode kill switch — when `false`, hierarchy machinery
72
+ * (`parent_id`, `__hierarchy_path`, `depth`, cycle detection) is skipped.
73
+ * `parent_id` in write payloads is rejected. Defaults to `true`.
74
+ * **Immutable after creation.**
75
+ */
76
+ __is_hierarchy_enabled?: boolean;
77
+ /**
78
+ * Lightweight-mode kill switch — when `false`, the fulltext indexing path
79
+ * (`__searchable`, `__searchable2`, generated tsvectors) is skipped. The
80
+ * `data` GIN index remains active, so `data @>` / `data ?` queries still
81
+ * work. Defaults to `true`. **Immutable after creation.**
82
+ */
83
+ __is_fulltext_enabled?: boolean;
84
+ /**
85
+ * When `true`, every model created in this collection gets an auto-generated,
86
+ * unique-per-collection, readonly short `code` (uppercase Crockford base32).
87
+ * Defaults to `false`. **Immutable after creation** — retrofit an existing
88
+ * collection via the collection package's `ServiceMaintenance.enableCode`.
89
+ */
90
+ __is_code_enabled?: boolean;
91
+ /**
92
+ * Length of generated `code`s (uppercase Crockford base32). Defaults to 6
93
+ * when unset; longer values lower collision probability at scale.
94
+ */
95
+ __code_length?: number | null;
65
96
  }
66
97
  /**
67
98
  * Output DTO for collection responses.
@@ -88,6 +119,16 @@ export interface CollectionDTOOut extends CollectionDTOIn {
88
119
  _updated_at: ISODateString;
89
120
  /** Ownership mode for models in this collection (default null = not owner-scoped) */
90
121
  owner_id_mode: OwnerIdMode;
122
+ /** Lightweight-mode kill switch — relations subsystem. Immutable. */
123
+ __is_relations_enabled: boolean;
124
+ /** Lightweight-mode kill switch — hierarchy subsystem. Immutable. */
125
+ __is_hierarchy_enabled: boolean;
126
+ /** Lightweight-mode kill switch — fulltext subsystem. Immutable. */
127
+ __is_fulltext_enabled: boolean;
128
+ /** Human-friendly `code` feature flag. Immutable after creation. */
129
+ __is_code_enabled: boolean;
130
+ /** Generated `code` length (null = default of 6). */
131
+ __code_length: number | null;
91
132
  }
92
133
  /**
93
134
  * Full database row representation of a collection.
package/dist/model.d.ts CHANGED
@@ -66,6 +66,13 @@ export interface ModelDTOOut extends ModelDTOIn {
66
66
  _updated_at: ISODateString;
67
67
  /** Owner identifier (account model_id), null if not owner-scoped */
68
68
  owner_id: string | null;
69
+ /**
70
+ * Auto-generated human-friendly short code (uppercase Crockford base32),
71
+ * unique per collection and readonly. `null` unless the collection has the
72
+ * code feature enabled (`__is_code_enabled`). Not a client-settable input —
73
+ * it is generated at insert time, hence on the output DTO only.
74
+ */
75
+ code?: string | null;
69
76
  }
70
77
  /**
71
78
  * Full database row representation of a model.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/collection-types",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",