@company-semantics/contracts 20.1.0 → 21.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": "20.1.0",
3
+ "version": "21.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = '79972d6725ff' as const;
3
- export const SPEC_HASH_FULL = '79972d6725ff3dfd29ee68945c8006039eddc196eadaeb0bcd77abeeebf2b066' as const;
2
+ export const SPEC_HASH = '04f6a4a8fe16' as const;
3
+ export const SPEC_HASH_FULL = '04f6a4a8fe169119fda699f1854d409df278ac5dd7ab16f1d5affff6cd133e47' as const;
@@ -736,6 +736,23 @@ export interface paths {
736
736
  patch: operations["setMemberManager"];
737
737
  trace?: never;
738
738
  };
739
+ "/api/reporting/bulk-reparent": {
740
+ parameters: {
741
+ query?: never;
742
+ header?: never;
743
+ path?: never;
744
+ cookie?: never;
745
+ };
746
+ get?: never;
747
+ put?: never;
748
+ /** Atomically re-point many members' solid manager to one new manager */
749
+ post: operations["bulkReparentReporting"];
750
+ delete?: never;
751
+ options?: never;
752
+ head?: never;
753
+ patch?: never;
754
+ trace?: never;
755
+ };
739
756
  "/api/chat/interactive-tasks/submit": {
740
757
  parameters: {
741
758
  query?: never;
@@ -3667,6 +3684,19 @@ export interface components {
3667
3684
  /** Format: uuid */
3668
3685
  managerUserId: string;
3669
3686
  };
3687
+ BulkReparentReportingResponse: {
3688
+ /** @constant */
3689
+ success: true;
3690
+ movedCount: number;
3691
+ /** Format: uuid */
3692
+ toManagerId: string;
3693
+ };
3694
+ BulkReparentReportingRequest: {
3695
+ memberIds: string[];
3696
+ /** Format: uuid */
3697
+ toManagerId: string;
3698
+ idempotencyKey: string;
3699
+ };
3670
3700
  SubmitInteractiveTaskResponse: {
3671
3701
  executionId: string;
3672
3702
  /** @enum {string} */
@@ -4147,6 +4177,7 @@ export interface components {
4147
4177
  name: string;
4148
4178
  } | null;
4149
4179
  canEdit: boolean;
4180
+ inheritsFromId: string | null;
4150
4181
  inheritsFrom: string | null;
4151
4182
  sources: {
4152
4183
  label: string;
@@ -4155,6 +4186,7 @@ export interface components {
4155
4186
  referencedAt: string;
4156
4187
  }[];
4157
4188
  dependencies: {
4189
+ targetId: string;
4158
4190
  targetSlug: string;
4159
4191
  description: string;
4160
4192
  }[];
@@ -6573,6 +6605,30 @@ export interface operations {
6573
6605
  };
6574
6606
  };
6575
6607
  };
6608
+ bulkReparentReporting: {
6609
+ parameters: {
6610
+ query?: never;
6611
+ header?: never;
6612
+ path?: never;
6613
+ cookie?: never;
6614
+ };
6615
+ requestBody: {
6616
+ content: {
6617
+ "application/json": components["schemas"]["BulkReparentReportingRequest"];
6618
+ };
6619
+ };
6620
+ responses: {
6621
+ /** @description Cluster reorg applied atomically */
6622
+ 200: {
6623
+ headers: {
6624
+ [name: string]: unknown;
6625
+ };
6626
+ content: {
6627
+ "application/json": components["schemas"]["BulkReparentReportingResponse"];
6628
+ };
6629
+ };
6630
+ };
6631
+ };
6576
6632
  submitInteractiveTask: {
6577
6633
  parameters: {
6578
6634
  query?: never;
@@ -28,6 +28,9 @@ const CompanyMdSourceSchema = z.object({
28
28
  });
29
29
 
30
30
  const CompanyMdDependencySchema = z.object({
31
+ // Stable id of the target doc — the resolution key (ADR-BE-315). `targetSlug`
32
+ // is presentation only; slugs are only parent-scoped unique post-ADR-BE-315.
33
+ targetId: z.string(),
31
34
  targetSlug: z.string(),
32
35
  description: z.string(),
33
36
  });
@@ -85,6 +88,9 @@ export const CompanyMdDocResponseSchema = z.object({
85
88
  owningUnitId: z.string().nullable(),
86
89
  owner: CompanyMdPersonSchema.nullable(),
87
90
  canEdit: z.boolean(),
91
+ // Stable id of the inherited-from doc — the resolution key (mirrors the
92
+ // resolved parentId). `inheritsFrom` is presentation only (ADR-BE-315).
93
+ inheritsFromId: z.string().nullable(),
88
94
  inheritsFrom: z.string().nullable(),
89
95
  sources: z.array(CompanyMdSourceSchema),
90
96
  dependencies: z.array(CompanyMdDependencySchema),
@@ -22,20 +22,20 @@ export const openApiRoutes = {
22
22
  '/api/chats/{id}/messages/{messageId}': ['DELETE'],
23
23
  '/api/chats/{id}/pin': ['DELETE', 'POST'],
24
24
  '/api/company-md/context-bank': ['POST'],
25
- '/api/company-md/docs/{parentSlug}/context-bank/upload': ['POST'],
26
- '/api/company-md/docs/{slug}': ['GET'],
27
- '/api/company-md/docs/{slug}/content': ['PUT'],
28
- '/api/company-md/docs/{slug}/context-bank': ['GET'],
29
- '/api/company-md/docs/{slug}/context-bank/associate': ['POST'],
30
- '/api/company-md/docs/{slug}/context-bank/retry': ['POST'],
31
- '/api/company-md/docs/{slug}/context-bank/{contextDocSlug}': ['DELETE'],
32
- '/api/company-md/docs/{slug}/context-bank/{id}/order': ['PATCH'],
33
- '/api/company-md/docs/{slug}/sharing': ['GET'],
34
- '/api/company-md/docs/{slug}/sharing/acl': ['POST'],
35
- '/api/company-md/docs/{slug}/sharing/acl/{aclId}': ['DELETE', 'PUT'],
36
- '/api/company-md/docs/{slug}/sharing/policy': ['PUT'],
37
- '/api/company-md/docs/{slug}/title': ['PUT'],
38
- '/api/company-md/docs/{slug}/transfer-owner': ['POST'],
25
+ '/api/company-md/docs/{id}': ['GET'],
26
+ '/api/company-md/docs/{id}/content': ['PUT'],
27
+ '/api/company-md/docs/{id}/context-bank': ['GET'],
28
+ '/api/company-md/docs/{id}/context-bank/associate': ['POST'],
29
+ '/api/company-md/docs/{id}/context-bank/retry': ['POST'],
30
+ '/api/company-md/docs/{id}/context-bank/upload': ['POST'],
31
+ '/api/company-md/docs/{id}/context-bank/{contextDocId}': ['DELETE'],
32
+ '/api/company-md/docs/{id}/context-bank/{contextDocId}/order': ['PATCH'],
33
+ '/api/company-md/docs/{id}/sharing': ['GET'],
34
+ '/api/company-md/docs/{id}/sharing/acl': ['POST'],
35
+ '/api/company-md/docs/{id}/sharing/acl/{aclId}': ['DELETE', 'PUT'],
36
+ '/api/company-md/docs/{id}/sharing/policy': ['PUT'],
37
+ '/api/company-md/docs/{id}/title': ['PUT'],
38
+ '/api/company-md/docs/{id}/transfer-owner': ['POST'],
39
39
  '/api/company-md/extract': ['POST'],
40
40
  '/api/company-md/ownership/reassign': ['POST'],
41
41
  '/api/company-md/ownership/reassign/suggestion': ['GET'],
@@ -115,6 +115,7 @@ export const openApiRoutes = {
115
115
  '/api/orgs/{orgId}/budget-config': ['GET', 'PUT'],
116
116
  '/api/orgs/{orgId}/level-config': ['GET', 'PUT'],
117
117
  '/api/rbac/roles': ['GET'],
118
+ '/api/reporting/bulk-reparent': ['POST'],
118
119
  '/api/scope/check': ['GET'],
119
120
  '/api/scope/check-batch': ['POST'],
120
121
  '/api/shared/{token}': ['GET'],
@@ -66,12 +66,6 @@ export type UserIdentity = {
66
66
  */
67
67
  nameSource: NameSource;
68
68
 
69
- /**
70
- * Free-text job title displayed in the people org chart and team views.
71
- * Optional; not authoritative for role/RBAC.
72
- */
73
- jobTitle?: string | null;
74
-
75
69
  /** When the identity was created */
76
70
  createdAt: ISODateString;
77
71
 
@@ -80,6 +80,13 @@ export interface CompanyMdSource {
80
80
  }
81
81
 
82
82
  export interface CompanyMdDependency {
83
+ /**
84
+ * Stable id of the target doc — the identity used to resolve the reference.
85
+ * Post-ADR-BE-315 slugs are only parent-scoped unique, so `targetSlug` cannot
86
+ * identify a doc unambiguously; resolve by `targetId`, display `targetSlug`.
87
+ */
88
+ readonly targetId: string;
89
+ /** Human-readable slug of the target doc — presentation/label only. */
83
90
  readonly targetSlug: string;
84
91
  readonly description: string;
85
92
  }
@@ -137,6 +144,13 @@ export interface CompanyMdDocCollaborators {
137
144
  }
138
145
 
139
146
  export interface CompanyMdDocRelations {
147
+ /**
148
+ * Stable id of the doc this one inherits from — the identity used to resolve
149
+ * the reference (mirrors the resolved `parentId`). Resolve by `inheritsFromId`,
150
+ * display `inheritsFrom`. See ADR-BE-315: slugs are only parent-scoped unique.
151
+ */
152
+ readonly inheritsFromId: string | null;
153
+ /** Human-readable slug of the inherited-from doc — presentation/label only. */
140
154
  readonly inheritsFrom: string | null;
141
155
  readonly sources: readonly CompanyMdSource[];
142
156
  readonly dependencies: readonly CompanyMdDependency[];
@@ -66,7 +66,7 @@ const WorkspaceMemberSchema = z.object({
66
66
  * display-only enrichment (see ADR-CONTRACTS-055).
67
67
  */
68
68
  avatarUrl: z.string().nullable().optional(),
69
- /** Free-text job title (`users.job_title`). Null when unset. */
69
+ /** The occupant's Position seat title (org-scoped). Null when the seat is untitled. */
70
70
  jobTitle: z.string().nullable(),
71
71
  /**
72
72
  * Display role — the member's highest org-chart standing, or `null` for a