@opencxh/domain 1.222.0 → 1.224.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.
@@ -161,6 +161,30 @@ export interface Relation {
161
161
  createdBy: string;
162
162
  createdAt?: number;
163
163
  }
164
+ /**
165
+ * One resource a single person keeps in reach, stored by apps/context.
166
+ *
167
+ * **Private by construction.** `userId` comes from the session, never from the body, so a pin is
168
+ * not an org-wide fact about the resource — which is exactly why it is not a {@link Relation}:
169
+ * relations are merged into `/resource/related` and would surface everyone's pins in a customer
170
+ * file. Nothing reads another user's pins.
171
+ *
172
+ * `label` and `icon` are **snapshots**, used cold: a pinned conversation from three months ago is
173
+ * not in any list the screen loaded, so without them the row has no name. Whoever renders it
174
+ * lets the live value win when the resource is at hand.
175
+ */
176
+ export interface Pin {
177
+ id: string;
178
+ organizationId: string;
179
+ userId: string;
180
+ /** `<kind>:<ref>` — the same key vocabulary as {@link ResourceSummary} and {@link Relation}. */
181
+ scopeKey: string;
182
+ /** Title snapshot. See the note above. */
183
+ label: string;
184
+ /** Icon hint the owning app understands (comms stores the channel scheme). */
185
+ icon?: string;
186
+ createdAt?: number;
187
+ }
164
188
  /**
165
189
  * What the hub asks one app. `scopeKey` is already authorized — the answering app must not
166
190
  * re-gate it, but it must filter its own rows for the stamped acting identity.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.222.0",
3
+ "version": "1.224.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",