@company-semantics/contracts 0.115.0 → 0.115.1

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": "0.115.0",
3
+ "version": "0.115.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1111,6 +1111,28 @@ export interface paths {
1111
1111
  patch?: never;
1112
1112
  trace?: never;
1113
1113
  };
1114
+ "/api/workspace/invites/validate": {
1115
+ parameters: {
1116
+ query?: never;
1117
+ header?: never;
1118
+ path?: never;
1119
+ cookie?: never;
1120
+ };
1121
+ /**
1122
+ * Validate an invite token
1123
+ * @description Validate an invite token without accepting it.
1124
+ * Used by the frontend to preflight-check tokens on page load.
1125
+ * No authentication required.
1126
+ */
1127
+ get: operations["validateInviteToken"];
1128
+ put?: never;
1129
+ post?: never;
1130
+ delete?: never;
1131
+ options?: never;
1132
+ head?: never;
1133
+ patch?: never;
1134
+ trace?: never;
1135
+ };
1114
1136
  "/api/workspace/invites": {
1115
1137
  parameters: {
1116
1138
  query?: never;
@@ -1526,6 +1548,27 @@ export interface paths {
1526
1548
  patch?: never;
1527
1549
  trace?: never;
1528
1550
  };
1551
+ "/api/chats/by-interaction/{interactionId}": {
1552
+ parameters: {
1553
+ query?: never;
1554
+ header?: never;
1555
+ path?: never;
1556
+ cookie?: never;
1557
+ };
1558
+ /**
1559
+ * Look up chat ID by client interaction ID
1560
+ * @description Returns the chat ID associated with a client-generated interaction ID.
1561
+ * Used to resolve optimistically-created chats.
1562
+ */
1563
+ get: operations["getChatByInteraction"];
1564
+ put?: never;
1565
+ post?: never;
1566
+ delete?: never;
1567
+ options?: never;
1568
+ head?: never;
1569
+ patch?: never;
1570
+ trace?: never;
1571
+ };
1529
1572
  "/api/chats/{id}": {
1530
1573
  parameters: {
1531
1574
  query?: never;
@@ -1752,7 +1795,7 @@ export interface paths {
1752
1795
  };
1753
1796
  /**
1754
1797
  * Get the goal tree for the current org
1755
- * @description Returns the goal tree for the current org.
1798
+ * @description Returns the goal tree for the current org with cursor pagination.
1756
1799
  * Auto-materializes docs on first access.
1757
1800
  * Requires org.view_goals capability.
1758
1801
  */
@@ -1829,6 +1872,27 @@ export interface paths {
1829
1872
  patch?: never;
1830
1873
  trace?: never;
1831
1874
  };
1875
+ "/api/company-md/docs/{slug}/context-bank": {
1876
+ parameters: {
1877
+ query?: never;
1878
+ header?: never;
1879
+ path?: never;
1880
+ cookie?: never;
1881
+ };
1882
+ /**
1883
+ * Get context bank items for a goal doc
1884
+ * @description Returns context bank items associated with the given parent doc.
1885
+ * Requires org.view_company_md capability.
1886
+ */
1887
+ get: operations["getCompanyMdDocContextBank"];
1888
+ put?: never;
1889
+ post?: never;
1890
+ delete?: never;
1891
+ options?: never;
1892
+ head?: never;
1893
+ patch?: never;
1894
+ trace?: never;
1895
+ };
1832
1896
  "/api/company-md/docs/{slug}/sharing": {
1833
1897
  parameters: {
1834
1898
  query?: never;
@@ -2095,7 +2159,12 @@ export interface paths {
2095
2159
  path?: never;
2096
2160
  cookie?: never;
2097
2161
  };
2098
- get?: never;
2162
+ /**
2163
+ * List members of a department
2164
+ * @description Returns paginated list of department members.
2165
+ * Requires org.view_departments capability.
2166
+ */
2167
+ get: operations["listDepartmentMembers"];
2099
2168
  put?: never;
2100
2169
  /** Add a member to a department */
2101
2170
  post: operations["addDepartmentMember"];
@@ -2393,12 +2462,7 @@ export interface components {
2393
2462
  /** @description The chat title (generated or existing) */
2394
2463
  title: string;
2395
2464
  /** @description Whether title was newly generated (false if guards blocked) */
2396
- generated: boolean;
2397
- /**
2398
- * @description Reason why generation was skipped (present when generated=false)
2399
- * @enum {string}
2400
- */
2401
- skipReason?: "manual_title" | "already_generated";
2465
+ isAutoGenerated: boolean;
2402
2466
  };
2403
2467
  /** @enum {string} */
2404
2468
  ChatVisibility: "public" | "private";
@@ -2900,6 +2964,12 @@ export interface components {
2900
2964
  requireSSO?: boolean;
2901
2965
  /** @description List of allowed auth providers */
2902
2966
  allowedProviders?: string[];
2967
+ /** @description OIDC discovery URL for SSO configuration */
2968
+ oidcDiscoveryUrl?: string | null;
2969
+ /** @description OIDC client ID credential */
2970
+ oidcClientId?: string | null;
2971
+ /** @description OIDC client secret credential */
2972
+ oidcClientSecret?: string | null;
2903
2973
  };
2904
2974
  OrgAuthPolicy: {
2905
2975
  requireSSO: boolean;
@@ -3154,6 +3224,55 @@ export interface components {
3154
3224
  /** @enum {string} */
3155
3225
  role: "owner" | "manager" | "member";
3156
3226
  };
3227
+ ExtractionEnqueuedResponse: {
3228
+ /**
3229
+ * @description Job has been enqueued for async processing
3230
+ * @constant
3231
+ */
3232
+ extractionStatus: "pending";
3233
+ /** @description Idempotency key for deduplication and status polling */
3234
+ idempotencyKey: string;
3235
+ };
3236
+ GoalTreeResponse: {
3237
+ items: components["schemas"]["GoalTreeNode"][];
3238
+ /** @description Cursor for next page, null if no more results */
3239
+ nextCursor?: string | null;
3240
+ hasMore: boolean;
3241
+ };
3242
+ DepartmentMember: {
3243
+ /** Format: uuid */
3244
+ userId: string;
3245
+ name: string;
3246
+ /** Format: email */
3247
+ email: string;
3248
+ /** @enum {string} */
3249
+ role: "member" | "manager" | "owner";
3250
+ /** Format: date-time */
3251
+ joinedAt: string;
3252
+ };
3253
+ DepartmentMembersResponse: {
3254
+ items: components["schemas"]["DepartmentMember"][];
3255
+ /** @description Cursor for next page, null if no more results */
3256
+ nextCursor?: string | null;
3257
+ hasMore: boolean;
3258
+ };
3259
+ ContextBankItem: {
3260
+ /** Format: uuid */
3261
+ id: string;
3262
+ slug: string;
3263
+ title: string;
3264
+ /** @enum {string} */
3265
+ visibility: "public" | "private";
3266
+ /** Format: date-time */
3267
+ updatedAt: string;
3268
+ };
3269
+ InviteValidationResult: {
3270
+ valid: boolean;
3271
+ /** @description Invite status (e.g. pending, accepted, expired, revoked) */
3272
+ status: string;
3273
+ /** @description Organization name (present when invite is valid) */
3274
+ orgName?: string;
3275
+ };
3157
3276
  };
3158
3277
  responses: never;
3159
3278
  parameters: never;
@@ -5422,6 +5541,38 @@ export interface operations {
5422
5541
  };
5423
5542
  };
5424
5543
  };
5544
+ validateInviteToken: {
5545
+ parameters: {
5546
+ query: {
5547
+ /** @description Invite acceptance token */
5548
+ token: string;
5549
+ };
5550
+ header?: never;
5551
+ path?: never;
5552
+ cookie?: never;
5553
+ };
5554
+ requestBody?: never;
5555
+ responses: {
5556
+ /** @description Token validation result */
5557
+ 200: {
5558
+ headers: {
5559
+ [name: string]: unknown;
5560
+ };
5561
+ content: {
5562
+ "application/json": components["schemas"]["InviteValidationResult"];
5563
+ };
5564
+ };
5565
+ /** @description Missing token parameter */
5566
+ 400: {
5567
+ headers: {
5568
+ [name: string]: unknown;
5569
+ };
5570
+ content: {
5571
+ "application/json": components["schemas"]["ErrorResponse"];
5572
+ };
5573
+ };
5574
+ };
5575
+ };
5425
5576
  listPendingInvites: {
5426
5577
  parameters: {
5427
5578
  query?: never;
@@ -6423,6 +6574,50 @@ export interface operations {
6423
6574
  };
6424
6575
  };
6425
6576
  };
6577
+ getChatByInteraction: {
6578
+ parameters: {
6579
+ query?: never;
6580
+ header?: never;
6581
+ path: {
6582
+ /** @description Client-generated interaction ID */
6583
+ interactionId: string;
6584
+ };
6585
+ cookie?: never;
6586
+ };
6587
+ requestBody?: never;
6588
+ responses: {
6589
+ /** @description Chat ID found */
6590
+ 200: {
6591
+ headers: {
6592
+ [name: string]: unknown;
6593
+ };
6594
+ content: {
6595
+ "application/json": {
6596
+ /** Format: uuid */
6597
+ chatId: string;
6598
+ };
6599
+ };
6600
+ };
6601
+ /** @description Not authenticated */
6602
+ 401: {
6603
+ headers: {
6604
+ [name: string]: unknown;
6605
+ };
6606
+ content: {
6607
+ "application/json": components["schemas"]["ErrorResponse"];
6608
+ };
6609
+ };
6610
+ /** @description Chat not found for this interaction ID */
6611
+ 404: {
6612
+ headers: {
6613
+ [name: string]: unknown;
6614
+ };
6615
+ content: {
6616
+ "application/json": components["schemas"]["ErrorResponse"];
6617
+ };
6618
+ };
6619
+ };
6620
+ };
6426
6621
  getChat: {
6427
6622
  parameters: {
6428
6623
  query?: never;
@@ -6875,6 +7070,8 @@ export interface operations {
6875
7070
  content: {
6876
7071
  "application/json": {
6877
7072
  share: components["schemas"]["ChatShareInfo"];
7073
+ /** @description Full URL for accessing the shared chat */
7074
+ shareUrl: string;
6878
7075
  };
6879
7076
  };
6880
7077
  };
@@ -7040,20 +7237,25 @@ export interface operations {
7040
7237
  };
7041
7238
  getCompanyMdTree: {
7042
7239
  parameters: {
7043
- query?: never;
7240
+ query?: {
7241
+ /** @description Cursor for pagination */
7242
+ cursor?: string;
7243
+ /** @description Max results per page (default 100, max 200) */
7244
+ limit?: number;
7245
+ };
7044
7246
  header?: never;
7045
7247
  path?: never;
7046
7248
  cookie?: never;
7047
7249
  };
7048
7250
  requestBody?: never;
7049
7251
  responses: {
7050
- /** @description Goal tree nodes */
7252
+ /** @description Paginated goal tree nodes */
7051
7253
  200: {
7052
7254
  headers: {
7053
7255
  [name: string]: unknown;
7054
7256
  };
7055
7257
  content: {
7056
- "application/json": components["schemas"]["GoalTreeNode"][];
7258
+ "application/json": components["schemas"]["GoalTreeResponse"];
7057
7259
  };
7058
7260
  };
7059
7261
  /** @description No org.view_goals capability */
@@ -7181,11 +7383,16 @@ export interface operations {
7181
7383
  };
7182
7384
  responses: {
7183
7385
  /** @description Title updated successfully */
7184
- 204: {
7386
+ 200: {
7185
7387
  headers: {
7186
7388
  [name: string]: unknown;
7187
7389
  };
7188
- content?: never;
7390
+ content: {
7391
+ "application/json": {
7392
+ /** @description The new slug (may change if title changed) */
7393
+ slug: string;
7394
+ };
7395
+ };
7189
7396
  };
7190
7397
  /** @description Missing or empty title field */
7191
7398
  400: {
@@ -7216,6 +7423,47 @@ export interface operations {
7216
7423
  };
7217
7424
  };
7218
7425
  };
7426
+ getCompanyMdDocContextBank: {
7427
+ parameters: {
7428
+ query?: never;
7429
+ header?: never;
7430
+ path: {
7431
+ /** @description Goal doc slug */
7432
+ slug: string;
7433
+ };
7434
+ cookie?: never;
7435
+ };
7436
+ requestBody?: never;
7437
+ responses: {
7438
+ /** @description Context bank items */
7439
+ 200: {
7440
+ headers: {
7441
+ [name: string]: unknown;
7442
+ };
7443
+ content: {
7444
+ "application/json": components["schemas"]["ContextBankItem"][];
7445
+ };
7446
+ };
7447
+ /** @description No org.view_company_md capability */
7448
+ 403: {
7449
+ headers: {
7450
+ [name: string]: unknown;
7451
+ };
7452
+ content: {
7453
+ "application/json": components["schemas"]["ErrorResponse"];
7454
+ };
7455
+ };
7456
+ /** @description Doc not found */
7457
+ 404: {
7458
+ headers: {
7459
+ [name: string]: unknown;
7460
+ };
7461
+ content: {
7462
+ "application/json": components["schemas"]["ErrorResponse"];
7463
+ };
7464
+ };
7465
+ };
7466
+ };
7219
7467
  getCompanyMdDocSharing: {
7220
7468
  parameters: {
7221
7469
  query?: never;
@@ -7499,13 +7747,13 @@ export interface operations {
7499
7747
  };
7500
7748
  };
7501
7749
  responses: {
7502
- /** @description Extraction result with markdown and structured signals */
7503
- 200: {
7750
+ /** @description Extraction job enqueued (async). Poll for results or use SSE. */
7751
+ 202: {
7504
7752
  headers: {
7505
7753
  [name: string]: unknown;
7506
7754
  };
7507
7755
  content: {
7508
- "application/json": components["schemas"]["ExtractGoalsResponse"];
7756
+ "application/json": components["schemas"]["ExtractionEnqueuedResponse"];
7509
7757
  };
7510
7758
  };
7511
7759
  /** @description No file/text provided, unsupported MIME type, empty text, or text too large */
@@ -7526,15 +7774,6 @@ export interface operations {
7526
7774
  "application/json": components["schemas"]["ErrorResponse"];
7527
7775
  };
7528
7776
  };
7529
- /** @description Extraction service busy (concurrency limit reached) */
7530
- 503: {
7531
- headers: {
7532
- [name: string]: unknown;
7533
- };
7534
- content: {
7535
- "application/json": components["schemas"]["ErrorResponse"];
7536
- };
7537
- };
7538
7777
  };
7539
7778
  };
7540
7779
  listTeams: {
@@ -7743,7 +7982,10 @@ export interface operations {
7743
7982
  };
7744
7983
  content: {
7745
7984
  "application/json": {
7746
- ok?: boolean;
7985
+ /** @constant */
7986
+ success: true;
7987
+ /** @constant */
7988
+ ok: true;
7747
7989
  };
7748
7990
  };
7749
7991
  };
@@ -8116,6 +8358,52 @@ export interface operations {
8116
8358
  };
8117
8359
  };
8118
8360
  };
8361
+ listDepartmentMembers: {
8362
+ parameters: {
8363
+ query?: {
8364
+ /** @description Cursor for pagination */
8365
+ cursor?: string;
8366
+ /** @description Max results per page (default 100, max 200) */
8367
+ limit?: number;
8368
+ };
8369
+ header?: never;
8370
+ path: {
8371
+ /** @description Department ID (UUID) */
8372
+ id: string;
8373
+ };
8374
+ cookie?: never;
8375
+ };
8376
+ requestBody?: never;
8377
+ responses: {
8378
+ /** @description Paginated list of department members */
8379
+ 200: {
8380
+ headers: {
8381
+ [name: string]: unknown;
8382
+ };
8383
+ content: {
8384
+ "application/json": components["schemas"]["DepartmentMembersResponse"];
8385
+ };
8386
+ };
8387
+ /** @description No org.view_departments capability */
8388
+ 403: {
8389
+ headers: {
8390
+ [name: string]: unknown;
8391
+ };
8392
+ content: {
8393
+ "application/json": components["schemas"]["ErrorResponse"];
8394
+ };
8395
+ };
8396
+ /** @description Department not found */
8397
+ 404: {
8398
+ headers: {
8399
+ [name: string]: unknown;
8400
+ };
8401
+ content: {
8402
+ "application/json": components["schemas"]["ErrorResponse"];
8403
+ };
8404
+ };
8405
+ };
8406
+ };
8119
8407
  addDepartmentMember: {
8120
8408
  parameters: {
8121
8409
  query?: never;
package/src/api/index.ts CHANGED
@@ -9,4 +9,4 @@
9
9
  export type { paths, components, operations } from './generated'
10
10
 
11
11
  // Spec hash (from openapi/backend.yaml SHA-256)
12
- export { SPEC_HASH, SPEC_HASH_FULL } from './generated-spec-hash.js'
12
+ export { SPEC_HASH, SPEC_HASH_FULL } from './generated-spec-hash'
@@ -9,14 +9,17 @@ export const openApiRoutes = {
9
9
  '/api/account/sessions/{sessionId}': ['DELETE'],
10
10
  '/api/capabilities/tools': ['GET'],
11
11
  '/api/chats': ['GET', 'POST'],
12
+ '/api/chats/by-interaction/{interactionId}': ['GET'],
12
13
  '/api/chats/events': ['GET'],
13
14
  '/api/chats/{chatId}/shares': ['GET', 'POST'],
14
15
  '/api/chats/{id}': ['DELETE', 'GET', 'PATCH'],
15
16
  '/api/chats/{id}/generate-title': ['POST'],
16
17
  '/api/chats/{id}/messages': ['POST'],
18
+ '/api/chats/{id}/messages/{messageId}': ['DELETE'],
17
19
  '/api/chats/{id}/pin': ['DELETE', 'POST'],
18
20
  '/api/company-md/docs/{slug}': ['GET'],
19
21
  '/api/company-md/docs/{slug}/content': ['PUT'],
22
+ '/api/company-md/docs/{slug}/context-bank': ['GET'],
20
23
  '/api/company-md/docs/{slug}/sharing': ['GET'],
21
24
  '/api/company-md/docs/{slug}/sharing/acl': ['POST'],
22
25
  '/api/company-md/docs/{slug}/sharing/acl/{aclId}': ['DELETE', 'PUT'],
@@ -26,7 +29,7 @@ export const openApiRoutes = {
26
29
  '/api/company-md/tree': ['GET'],
27
30
  '/api/departments': ['GET', 'POST'],
28
31
  '/api/departments/{id}': ['DELETE', 'GET', 'PATCH'],
29
- '/api/departments/{id}/members': ['POST'],
32
+ '/api/departments/{id}/members': ['GET', 'POST'],
30
33
  '/api/departments/{id}/members/{userId}': ['DELETE'],
31
34
  '/api/drive/files': ['GET'],
32
35
  '/api/drive/files/recent': ['GET'],
@@ -82,6 +85,7 @@ export const openApiRoutes = {
82
85
  '/api/workspace/domains/{id}/verify': ['POST'],
83
86
  '/api/workspace/invites': ['GET', 'POST'],
84
87
  '/api/workspace/invites/accept': ['POST'],
88
+ '/api/workspace/invites/validate': ['GET'],
85
89
  '/api/workspace/invites/{id}': ['DELETE'],
86
90
  '/api/workspace/members': ['GET'],
87
91
  '/api/workspace/members/{id}': ['DELETE'],