@company-semantics/contracts 1.24.1 → 1.25.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": "1.24.1",
3
+ "version": "1.25.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 = 'f49b8ee41599' as const;
3
- export const SPEC_HASH_FULL = 'f49b8ee415991dc71ab889a9ea577a95b5aac4c72ffe51b8b448fdcb130ecb6a' as const;
2
+ export const SPEC_HASH = '3b3621a12672' as const;
3
+ export const SPEC_HASH_FULL = '3b3621a12672d03e48dad9007c700d26cadac5e1835ca7b6469ffd59366faa8e' as const;
@@ -1730,6 +1730,23 @@ export interface paths {
1730
1730
  patch?: never;
1731
1731
  trace?: never;
1732
1732
  };
1733
+ "/api/users/org-chart": {
1734
+ parameters: {
1735
+ query?: never;
1736
+ header?: never;
1737
+ path?: never;
1738
+ cookie?: never;
1739
+ };
1740
+ /** Get the people-org-chart payload (users + reports-to edges) for the caller org */
1741
+ get: operations["getPeopleOrgChart"];
1742
+ put?: never;
1743
+ post?: never;
1744
+ delete?: never;
1745
+ options?: never;
1746
+ head?: never;
1747
+ patch?: never;
1748
+ trace?: never;
1749
+ };
1733
1750
  "/api/drive/files": {
1734
1751
  parameters: {
1735
1752
  query?: never;
@@ -2525,6 +2542,7 @@ export interface components {
2525
2542
  id: string;
2526
2543
  name: string;
2527
2544
  email: string;
2545
+ jobTitle: string | null;
2528
2546
  /** @enum {string} */
2529
2547
  role: "owner" | "admin" | "member" | "auditor";
2530
2548
  roleNames: string[];
@@ -2713,6 +2731,7 @@ export interface components {
2713
2731
  id: string;
2714
2732
  name: string;
2715
2733
  email: string;
2734
+ jobTitle: string | null;
2716
2735
  /** @enum {string} */
2717
2736
  role: "owner" | "admin" | "member" | "auditor";
2718
2737
  roleNames: string[];
@@ -3455,6 +3474,24 @@ export interface components {
3455
3474
  updatedAt: string;
3456
3475
  };
3457
3476
  };
3477
+ PeopleOrgChartResponse: {
3478
+ nodes: {
3479
+ /** Format: uuid */
3480
+ id: string;
3481
+ fullName: string;
3482
+ jobTitle: string | null;
3483
+ slackAvatarUrl: string | null;
3484
+ primaryUnitId: string | null;
3485
+ }[];
3486
+ edges: {
3487
+ /** Format: uuid */
3488
+ reportUserId: string;
3489
+ /** Format: uuid */
3490
+ managerUserId: string;
3491
+ /** @enum {string} */
3492
+ relationshipType: "solid" | "dotted";
3493
+ }[];
3494
+ };
3458
3495
  DriveFileListResponse: {
3459
3496
  files: {
3460
3497
  id: string;
@@ -6405,6 +6442,26 @@ export interface operations {
6405
6442
  };
6406
6443
  };
6407
6444
  };
6445
+ getPeopleOrgChart: {
6446
+ parameters: {
6447
+ query?: never;
6448
+ header?: never;
6449
+ path?: never;
6450
+ cookie?: never;
6451
+ };
6452
+ requestBody?: never;
6453
+ responses: {
6454
+ /** @description People org chart payload */
6455
+ 200: {
6456
+ headers: {
6457
+ [name: string]: unknown;
6458
+ };
6459
+ content: {
6460
+ "application/json": components["schemas"]["PeopleOrgChartResponse"];
6461
+ };
6462
+ };
6463
+ };
6464
+ };
6408
6465
  listDriveFiles: {
6409
6466
  parameters: {
6410
6467
  query?: never;
@@ -73,6 +73,14 @@ export const CompanyMdDocResponseSchema = z.object({
73
73
  dependencies: z.array(CompanyMdDependencySchema),
74
74
  members: z.array(CompanyMdPersonSchema),
75
75
  extractionStatus: z.enum(['pending', 'extracting', 'complete', 'failed']),
76
+ /**
77
+ * Populated only when `extractionStatus === 'failed'`. Carries the
78
+ * diagnostic class/reason recorded by the worker on the latest
79
+ * extraction_runs row for this doc. `null` on the happy path and when
80
+ * no failed run is recorded.
81
+ */
82
+ errorClass: z.string().nullable().optional(),
83
+ errorReason: z.string().nullable().optional(),
76
84
  createdAt: z.string(),
77
85
  updatedAt: z.string(),
78
86
  });
@@ -20,10 +20,12 @@ export const openApiRoutes = {
20
20
  '/api/chats/{id}/messages/{messageId}': ['DELETE'],
21
21
  '/api/chats/{id}/pin': ['DELETE', 'POST'],
22
22
  '/api/company-md/context-bank': ['POST'],
23
+ '/api/company-md/docs/{parentSlug}/context-bank/upload': ['POST'],
23
24
  '/api/company-md/docs/{slug}': ['GET'],
24
25
  '/api/company-md/docs/{slug}/content': ['PUT'],
25
26
  '/api/company-md/docs/{slug}/context-bank': ['GET'],
26
27
  '/api/company-md/docs/{slug}/context-bank/associate': ['POST'],
28
+ '/api/company-md/docs/{slug}/context-bank/retry': ['POST'],
27
29
  '/api/company-md/docs/{slug}/context-bank/{contextDocSlug}': ['DELETE'],
28
30
  '/api/company-md/docs/{slug}/context-bank/{id}/order': ['PATCH'],
29
31
  '/api/company-md/docs/{slug}/sharing': ['GET'],
@@ -47,6 +49,8 @@ export const openApiRoutes = {
47
49
  '/api/internal-admin/impersonate/session': ['GET'],
48
50
  '/api/internal-admin/impersonate/start': ['POST'],
49
51
  '/api/me': ['GET'],
52
+ '/api/me/work-items': ['GET'],
53
+ '/api/me/work-items/counts': ['GET'],
50
54
  '/api/org-units': ['POST'],
51
55
  '/api/org-units/tree': ['GET'],
52
56
  '/api/org-units/{unitId}': ['GET', 'PATCH'],
@@ -88,6 +92,10 @@ export const openApiRoutes = {
88
92
  '/api/user/preferences/dismissed-banners/{bannerId}': ['POST'],
89
93
  '/api/user/profile': ['PATCH'],
90
94
  '/api/user/resync-slack-avatar': ['POST'],
95
+ '/api/users/org-chart': ['GET'],
96
+ '/api/work-items/{id}': ['GET'],
97
+ '/api/work-items/{id}/content': ['PUT'],
98
+ '/api/work-items/{id}/title': ['PUT'],
91
99
  '/api/workspace': ['GET'],
92
100
  '/api/workspace/access': ['GET'],
93
101
  '/api/workspace/audit': ['GET'],
@@ -110,6 +118,7 @@ export const openApiRoutes = {
110
118
  '/api/workspace/name': ['PATCH'],
111
119
  '/api/workspace/resolve-path': ['POST'],
112
120
  '/api/workspace/resync-slack-logo': ['POST'],
121
+ '/api/workspace/work-item-counts': ['GET'],
113
122
  '/auth/logout': ['POST'],
114
123
  '/auth/me': ['GET'],
115
124
  '/auth/sso/callback': ['GET', 'POST'],
package/src/index.ts CHANGED
@@ -166,6 +166,20 @@ export type {
166
166
  BannerDismissResponse,
167
167
  } from './identity/index'
168
168
 
169
+ // People Org Chart (GET /api/users/org-chart)
170
+ export {
171
+ ReportingRelationshipTypeSchema,
172
+ PeopleOrgChartNodeSchema,
173
+ PeopleOrgChartEdgeSchema,
174
+ PeopleOrgChartResponseSchema,
175
+ } from './identity/index'
176
+ export type {
177
+ ReportingRelationshipType,
178
+ PeopleOrgChartNode,
179
+ PeopleOrgChartEdge,
180
+ PeopleOrgChartResponse,
181
+ } from './identity/index'
182
+
169
183
  // Auth domain types
170
184
  export type { AuthStartMode, AuthStartResponse } from './auth/index'
171
185
  export { OTPErrorCode } from './auth/index'
package/src/org/types.ts CHANGED
@@ -118,6 +118,8 @@ export interface WorkspaceMember {
118
118
  id: string;
119
119
  name: string;
120
120
  email: string;
121
+ /** Free-text job title (`users.job_title`). Null when unset. */
122
+ jobTitle: string | null;
121
123
  /** Display role — derived collapse of RBAC into {owner,admin,member,auditor}. */
122
124
  role: WorkspaceRole;
123
125
  /** Raw RBAC role names (e.g. 'org_owner', 'org_admin', 'auditor'). Superset of `role`. */