@company-semantics/contracts 9.2.0 → 10.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "9.2.0",
3
+ "version": "10.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -644,7 +644,6 @@ export {
644
644
  resolveScope,
645
645
  toQueryKey,
646
646
  fromQueryKey,
647
- resourceRelationships,
648
647
  matchesResourceKey,
649
648
  } from "./resource-keys";
650
649
 
@@ -251,34 +251,6 @@ export function fromQueryKey(queryKey: readonly string[]): ResourceKey {
251
251
  throw new Error(`Unknown resource type in query key: '${type}'`);
252
252
  }
253
253
 
254
- /**
255
- * Bidirectional resource relationships.
256
- * TanStack does NOT support prefix matching across different key shapes.
257
- * When invalidating a collection, we must also invalidate related identity entries (and vice versa).
258
- */
259
- export const resourceRelationships: Record<string, string[]> = {
260
- members: ["member"],
261
- member: ["members"],
262
- departments: ["department"],
263
- department: ["departments"],
264
- chats: ["chat"],
265
- chat: ["chats"],
266
- teams: ["team"],
267
- team: ["teams"],
268
- companyMdDocs: ["companyMdDoc"],
269
- companyMdDoc: ["companyMdDocs"],
270
- // OrgUnit: reparent/create/archive invalidates the tree view of the whole org;
271
- // membership mutations invalidate the unit + its memberships list.
272
- orgTree: ["orgUnit", "orgUnitChildren", "orgUnitAncestors"],
273
- orgUnit: ["orgTree"],
274
- orgUnitChildren: ["orgTree"],
275
- orgUnitAncestors: ["orgTree"],
276
- // Subtree manage is driven by memberships (ADR-BE-151); mutating memberships
277
- // invalidates both the direct roster and the effective-managers read.
278
- orgUnitMemberships: ["orgUnit", "orgUnitPermissions"],
279
- orgUnitPermissions: ["orgUnitMemberships"],
280
- };
281
-
282
254
  /**
283
255
  * Strict predicate for matching resource keys.
284
256
  * Compares type + scope fields exactly. No partial matching. No loose comparisons.