@company-semantics/contracts 1.24.0 → 1.24.2

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.0",
3
+ "version": "1.24.2",
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 = '39a6b1630dd2' as const;
3
+ export const SPEC_HASH_FULL = '39a6b1630dd2912df45199a117d6046f6fc84c911294497ad3e0b6b3a0066a8b' 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;
@@ -3455,6 +3472,24 @@ export interface components {
3455
3472
  updatedAt: string;
3456
3473
  };
3457
3474
  };
3475
+ PeopleOrgChartResponse: {
3476
+ nodes: {
3477
+ /** Format: uuid */
3478
+ id: string;
3479
+ fullName: string;
3480
+ jobTitle: string | null;
3481
+ slackAvatarUrl: string | null;
3482
+ primaryUnitId: string | null;
3483
+ }[];
3484
+ edges: {
3485
+ /** Format: uuid */
3486
+ reportUserId: string;
3487
+ /** Format: uuid */
3488
+ managerUserId: string;
3489
+ /** @enum {string} */
3490
+ relationshipType: "solid" | "dotted";
3491
+ }[];
3492
+ };
3458
3493
  DriveFileListResponse: {
3459
3494
  files: {
3460
3495
  id: string;
@@ -6405,6 +6440,26 @@ export interface operations {
6405
6440
  };
6406
6441
  };
6407
6442
  };
6443
+ getPeopleOrgChart: {
6444
+ parameters: {
6445
+ query?: never;
6446
+ header?: never;
6447
+ path?: never;
6448
+ cookie?: never;
6449
+ };
6450
+ requestBody?: never;
6451
+ responses: {
6452
+ /** @description People org chart payload */
6453
+ 200: {
6454
+ headers: {
6455
+ [name: string]: unknown;
6456
+ };
6457
+ content: {
6458
+ "application/json": components["schemas"]["PeopleOrgChartResponse"];
6459
+ };
6460
+ };
6461
+ };
6462
+ };
6408
6463
  listDriveFiles: {
6409
6464
  parameters: {
6410
6465
  query?: never;
@@ -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'
@@ -36,6 +36,8 @@ export type ResourceKey =
36
36
  | { type: 'orgUnitAncestors'; orgId: string; unitId: string }
37
37
  | { type: 'orgUnitMemberships'; orgId: string; unitId: string }
38
38
  | { type: 'orgUnitPermissions'; orgId: string; unitId: string }
39
+ // People reporting (ADR-BE-166) — drives the settings Org chart drill-down
40
+ | { type: 'peopleOrgChart'; orgId: string }
39
41
  // User-scoped
40
42
  | { type: 'dismissedBanners'; userId: string }
41
43
  | { type: 'userOrgs'; userId: string }
@@ -62,7 +64,7 @@ const ORG_SCOPED_TYPES = [
62
64
  'members', 'departments', 'chats', 'teams', 'integrations', 'invites',
63
65
  'auditEvents', 'timeline', 'workspace', 'workspaceDomains', 'authSettings',
64
66
  'billing', 'aiUsage', 'deletionEligibility', 'transferOwnership', 'companyMdDocs',
65
- 'orgTree', 'orgLevelConfig',
67
+ 'orgTree', 'orgLevelConfig', 'peopleOrgChart',
66
68
  ] as const;
67
69
 
68
70
  const USER_SCOPED_TYPES = ['dismissedBanners', 'userOrgs', 'sessions', 'viewer'] as const;
@@ -125,6 +127,7 @@ export function toQueryKey(key: ResourceKey): readonly string[] {
125
127
  case 'companyMdDocs':
126
128
  case 'orgTree':
127
129
  case 'orgLevelConfig':
130
+ case 'peopleOrgChart':
128
131
  return [key.type, key.orgId] as const;
129
132
 
130
133
  default: {