@company-semantics/contracts 0.115.0 → 0.116.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 +5 -1
- package/src/api/generated-spec-hash.ts +2 -2
- package/src/api/generated.ts +327 -30
- package/src/api/index.ts +5 -1
- package/src/api/primitives.ts +23 -0
- package/src/generated/openapi-routes.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@company-semantics/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.116.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
"types": "./src/chat/index.ts",
|
|
49
49
|
"default": "./src/chat/index.ts"
|
|
50
50
|
},
|
|
51
|
+
"./api": {
|
|
52
|
+
"types": "./src/api/index.ts",
|
|
53
|
+
"default": "./src/api/index.ts"
|
|
54
|
+
},
|
|
51
55
|
"./schemas/guard-result.schema.json": "./schemas/guard-result.schema.json"
|
|
52
56
|
},
|
|
53
57
|
"types": "./src/index.ts",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
|
|
2
|
-
export const SPEC_HASH = '
|
|
3
|
-
export const SPEC_HASH_FULL = '
|
|
2
|
+
export const SPEC_HASH = 'd4f412a26098' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = 'd4f412a26098e42f4578da215bc71e3960ed6850e2482e8de7c1a38f785c2cf6' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -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
|
-
|
|
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"];
|
|
@@ -2175,18 +2244,26 @@ export interface components {
|
|
|
2175
2244
|
MeResponse: {
|
|
2176
2245
|
/** Format: uuid */
|
|
2177
2246
|
userId: string;
|
|
2178
|
-
|
|
2179
|
-
|
|
2247
|
+
/** Format: email */
|
|
2248
|
+
email: string;
|
|
2180
2249
|
fullName: string;
|
|
2181
2250
|
preferredName?: string | null;
|
|
2182
|
-
/** @description Computed at read time (preferredName ??
|
|
2251
|
+
/** @description Computed at read time (preferredName ?? fullName) */
|
|
2183
2252
|
displayName: string;
|
|
2253
|
+
/** @enum {string} */
|
|
2254
|
+
nameSource: "self" | "sso";
|
|
2255
|
+
nameEditable: boolean;
|
|
2256
|
+
primaryDepartmentId: string | null;
|
|
2257
|
+
slackUserId: string | null;
|
|
2258
|
+
avatar: components["schemas"]["ResolvedAvatar"];
|
|
2184
2259
|
/** Format: uuid */
|
|
2185
2260
|
orgId: string;
|
|
2186
|
-
orgName
|
|
2261
|
+
orgName: string | null;
|
|
2187
2262
|
orgSlug: string;
|
|
2188
2263
|
/** @enum {string} */
|
|
2189
2264
|
plan: "free" | "pro" | "enterprise";
|
|
2265
|
+
hasMultipleOrgs: boolean;
|
|
2266
|
+
isInternalAdmin: boolean;
|
|
2190
2267
|
};
|
|
2191
2268
|
/** @description At least one field must be provided */
|
|
2192
2269
|
ProfileUpdateRequest: {
|
|
@@ -2393,12 +2470,7 @@ export interface components {
|
|
|
2393
2470
|
/** @description The chat title (generated or existing) */
|
|
2394
2471
|
title: string;
|
|
2395
2472
|
/** @description Whether title was newly generated (false if guards blocked) */
|
|
2396
|
-
|
|
2397
|
-
/**
|
|
2398
|
-
* @description Reason why generation was skipped (present when generated=false)
|
|
2399
|
-
* @enum {string}
|
|
2400
|
-
*/
|
|
2401
|
-
skipReason?: "manual_title" | "already_generated";
|
|
2473
|
+
isAutoGenerated: boolean;
|
|
2402
2474
|
};
|
|
2403
2475
|
/** @enum {string} */
|
|
2404
2476
|
ChatVisibility: "public" | "private";
|
|
@@ -2841,6 +2913,7 @@ export interface components {
|
|
|
2841
2913
|
id: string;
|
|
2842
2914
|
name: string;
|
|
2843
2915
|
type: components["schemas"]["OrgType"];
|
|
2916
|
+
logoUrl: string | null;
|
|
2844
2917
|
owner: {
|
|
2845
2918
|
/** Format: uuid */
|
|
2846
2919
|
id: string;
|
|
@@ -2900,6 +2973,12 @@ export interface components {
|
|
|
2900
2973
|
requireSSO?: boolean;
|
|
2901
2974
|
/** @description List of allowed auth providers */
|
|
2902
2975
|
allowedProviders?: string[];
|
|
2976
|
+
/** @description OIDC discovery URL for SSO configuration */
|
|
2977
|
+
oidcDiscoveryUrl?: string | null;
|
|
2978
|
+
/** @description OIDC client ID credential */
|
|
2979
|
+
oidcClientId?: string | null;
|
|
2980
|
+
/** @description OIDC client secret credential */
|
|
2981
|
+
oidcClientSecret?: string | null;
|
|
2903
2982
|
};
|
|
2904
2983
|
OrgAuthPolicy: {
|
|
2905
2984
|
requireSSO: boolean;
|
|
@@ -3154,6 +3233,55 @@ export interface components {
|
|
|
3154
3233
|
/** @enum {string} */
|
|
3155
3234
|
role: "owner" | "manager" | "member";
|
|
3156
3235
|
};
|
|
3236
|
+
ExtractionEnqueuedResponse: {
|
|
3237
|
+
/**
|
|
3238
|
+
* @description Job has been enqueued for async processing
|
|
3239
|
+
* @constant
|
|
3240
|
+
*/
|
|
3241
|
+
extractionStatus: "pending";
|
|
3242
|
+
/** @description Idempotency key for deduplication and status polling */
|
|
3243
|
+
idempotencyKey: string;
|
|
3244
|
+
};
|
|
3245
|
+
GoalTreeResponse: {
|
|
3246
|
+
items: components["schemas"]["GoalTreeNode"][];
|
|
3247
|
+
/** @description Cursor for next page, null if no more results */
|
|
3248
|
+
nextCursor?: string | null;
|
|
3249
|
+
hasMore: boolean;
|
|
3250
|
+
};
|
|
3251
|
+
DepartmentMember: {
|
|
3252
|
+
/** Format: uuid */
|
|
3253
|
+
userId: string;
|
|
3254
|
+
name: string;
|
|
3255
|
+
/** Format: email */
|
|
3256
|
+
email: string;
|
|
3257
|
+
/** @enum {string} */
|
|
3258
|
+
role: "member" | "manager" | "owner";
|
|
3259
|
+
/** Format: date-time */
|
|
3260
|
+
joinedAt: string;
|
|
3261
|
+
};
|
|
3262
|
+
DepartmentMembersResponse: {
|
|
3263
|
+
items: components["schemas"]["DepartmentMember"][];
|
|
3264
|
+
/** @description Cursor for next page, null if no more results */
|
|
3265
|
+
nextCursor?: string | null;
|
|
3266
|
+
hasMore: boolean;
|
|
3267
|
+
};
|
|
3268
|
+
ContextBankItem: {
|
|
3269
|
+
/** Format: uuid */
|
|
3270
|
+
id: string;
|
|
3271
|
+
slug: string;
|
|
3272
|
+
title: string;
|
|
3273
|
+
/** @enum {string} */
|
|
3274
|
+
visibility: "public" | "private";
|
|
3275
|
+
/** Format: date-time */
|
|
3276
|
+
updatedAt: string;
|
|
3277
|
+
};
|
|
3278
|
+
InviteValidationResult: {
|
|
3279
|
+
valid: boolean;
|
|
3280
|
+
/** @description Invite status (e.g. pending, accepted, expired, revoked) */
|
|
3281
|
+
status: string;
|
|
3282
|
+
/** @description Organization name (present when invite is valid) */
|
|
3283
|
+
orgName?: string;
|
|
3284
|
+
};
|
|
3157
3285
|
};
|
|
3158
3286
|
responses: never;
|
|
3159
3287
|
parameters: never;
|
|
@@ -5422,6 +5550,38 @@ export interface operations {
|
|
|
5422
5550
|
};
|
|
5423
5551
|
};
|
|
5424
5552
|
};
|
|
5553
|
+
validateInviteToken: {
|
|
5554
|
+
parameters: {
|
|
5555
|
+
query: {
|
|
5556
|
+
/** @description Invite acceptance token */
|
|
5557
|
+
token: string;
|
|
5558
|
+
};
|
|
5559
|
+
header?: never;
|
|
5560
|
+
path?: never;
|
|
5561
|
+
cookie?: never;
|
|
5562
|
+
};
|
|
5563
|
+
requestBody?: never;
|
|
5564
|
+
responses: {
|
|
5565
|
+
/** @description Token validation result */
|
|
5566
|
+
200: {
|
|
5567
|
+
headers: {
|
|
5568
|
+
[name: string]: unknown;
|
|
5569
|
+
};
|
|
5570
|
+
content: {
|
|
5571
|
+
"application/json": components["schemas"]["InviteValidationResult"];
|
|
5572
|
+
};
|
|
5573
|
+
};
|
|
5574
|
+
/** @description Missing token parameter */
|
|
5575
|
+
400: {
|
|
5576
|
+
headers: {
|
|
5577
|
+
[name: string]: unknown;
|
|
5578
|
+
};
|
|
5579
|
+
content: {
|
|
5580
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
5581
|
+
};
|
|
5582
|
+
};
|
|
5583
|
+
};
|
|
5584
|
+
};
|
|
5425
5585
|
listPendingInvites: {
|
|
5426
5586
|
parameters: {
|
|
5427
5587
|
query?: never;
|
|
@@ -6423,6 +6583,50 @@ export interface operations {
|
|
|
6423
6583
|
};
|
|
6424
6584
|
};
|
|
6425
6585
|
};
|
|
6586
|
+
getChatByInteraction: {
|
|
6587
|
+
parameters: {
|
|
6588
|
+
query?: never;
|
|
6589
|
+
header?: never;
|
|
6590
|
+
path: {
|
|
6591
|
+
/** @description Client-generated interaction ID */
|
|
6592
|
+
interactionId: string;
|
|
6593
|
+
};
|
|
6594
|
+
cookie?: never;
|
|
6595
|
+
};
|
|
6596
|
+
requestBody?: never;
|
|
6597
|
+
responses: {
|
|
6598
|
+
/** @description Chat ID found */
|
|
6599
|
+
200: {
|
|
6600
|
+
headers: {
|
|
6601
|
+
[name: string]: unknown;
|
|
6602
|
+
};
|
|
6603
|
+
content: {
|
|
6604
|
+
"application/json": {
|
|
6605
|
+
/** Format: uuid */
|
|
6606
|
+
chatId: string;
|
|
6607
|
+
};
|
|
6608
|
+
};
|
|
6609
|
+
};
|
|
6610
|
+
/** @description Not authenticated */
|
|
6611
|
+
401: {
|
|
6612
|
+
headers: {
|
|
6613
|
+
[name: string]: unknown;
|
|
6614
|
+
};
|
|
6615
|
+
content: {
|
|
6616
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
6617
|
+
};
|
|
6618
|
+
};
|
|
6619
|
+
/** @description Chat not found for this interaction ID */
|
|
6620
|
+
404: {
|
|
6621
|
+
headers: {
|
|
6622
|
+
[name: string]: unknown;
|
|
6623
|
+
};
|
|
6624
|
+
content: {
|
|
6625
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
6626
|
+
};
|
|
6627
|
+
};
|
|
6628
|
+
};
|
|
6629
|
+
};
|
|
6426
6630
|
getChat: {
|
|
6427
6631
|
parameters: {
|
|
6428
6632
|
query?: never;
|
|
@@ -6875,6 +7079,8 @@ export interface operations {
|
|
|
6875
7079
|
content: {
|
|
6876
7080
|
"application/json": {
|
|
6877
7081
|
share: components["schemas"]["ChatShareInfo"];
|
|
7082
|
+
/** @description Full URL for accessing the shared chat */
|
|
7083
|
+
shareUrl: string;
|
|
6878
7084
|
};
|
|
6879
7085
|
};
|
|
6880
7086
|
};
|
|
@@ -7040,20 +7246,25 @@ export interface operations {
|
|
|
7040
7246
|
};
|
|
7041
7247
|
getCompanyMdTree: {
|
|
7042
7248
|
parameters: {
|
|
7043
|
-
query?:
|
|
7249
|
+
query?: {
|
|
7250
|
+
/** @description Cursor for pagination */
|
|
7251
|
+
cursor?: string;
|
|
7252
|
+
/** @description Max results per page (default 100, max 200) */
|
|
7253
|
+
limit?: number;
|
|
7254
|
+
};
|
|
7044
7255
|
header?: never;
|
|
7045
7256
|
path?: never;
|
|
7046
7257
|
cookie?: never;
|
|
7047
7258
|
};
|
|
7048
7259
|
requestBody?: never;
|
|
7049
7260
|
responses: {
|
|
7050
|
-
/** @description
|
|
7261
|
+
/** @description Paginated goal tree nodes */
|
|
7051
7262
|
200: {
|
|
7052
7263
|
headers: {
|
|
7053
7264
|
[name: string]: unknown;
|
|
7054
7265
|
};
|
|
7055
7266
|
content: {
|
|
7056
|
-
"application/json": components["schemas"]["
|
|
7267
|
+
"application/json": components["schemas"]["GoalTreeResponse"];
|
|
7057
7268
|
};
|
|
7058
7269
|
};
|
|
7059
7270
|
/** @description No org.view_goals capability */
|
|
@@ -7181,11 +7392,16 @@ export interface operations {
|
|
|
7181
7392
|
};
|
|
7182
7393
|
responses: {
|
|
7183
7394
|
/** @description Title updated successfully */
|
|
7184
|
-
|
|
7395
|
+
200: {
|
|
7185
7396
|
headers: {
|
|
7186
7397
|
[name: string]: unknown;
|
|
7187
7398
|
};
|
|
7188
|
-
content
|
|
7399
|
+
content: {
|
|
7400
|
+
"application/json": {
|
|
7401
|
+
/** @description The new slug (may change if title changed) */
|
|
7402
|
+
slug: string;
|
|
7403
|
+
};
|
|
7404
|
+
};
|
|
7189
7405
|
};
|
|
7190
7406
|
/** @description Missing or empty title field */
|
|
7191
7407
|
400: {
|
|
@@ -7216,6 +7432,47 @@ export interface operations {
|
|
|
7216
7432
|
};
|
|
7217
7433
|
};
|
|
7218
7434
|
};
|
|
7435
|
+
getCompanyMdDocContextBank: {
|
|
7436
|
+
parameters: {
|
|
7437
|
+
query?: never;
|
|
7438
|
+
header?: never;
|
|
7439
|
+
path: {
|
|
7440
|
+
/** @description Goal doc slug */
|
|
7441
|
+
slug: string;
|
|
7442
|
+
};
|
|
7443
|
+
cookie?: never;
|
|
7444
|
+
};
|
|
7445
|
+
requestBody?: never;
|
|
7446
|
+
responses: {
|
|
7447
|
+
/** @description Context bank items */
|
|
7448
|
+
200: {
|
|
7449
|
+
headers: {
|
|
7450
|
+
[name: string]: unknown;
|
|
7451
|
+
};
|
|
7452
|
+
content: {
|
|
7453
|
+
"application/json": components["schemas"]["ContextBankItem"][];
|
|
7454
|
+
};
|
|
7455
|
+
};
|
|
7456
|
+
/** @description No org.view_company_md capability */
|
|
7457
|
+
403: {
|
|
7458
|
+
headers: {
|
|
7459
|
+
[name: string]: unknown;
|
|
7460
|
+
};
|
|
7461
|
+
content: {
|
|
7462
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7463
|
+
};
|
|
7464
|
+
};
|
|
7465
|
+
/** @description Doc not found */
|
|
7466
|
+
404: {
|
|
7467
|
+
headers: {
|
|
7468
|
+
[name: string]: unknown;
|
|
7469
|
+
};
|
|
7470
|
+
content: {
|
|
7471
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7472
|
+
};
|
|
7473
|
+
};
|
|
7474
|
+
};
|
|
7475
|
+
};
|
|
7219
7476
|
getCompanyMdDocSharing: {
|
|
7220
7477
|
parameters: {
|
|
7221
7478
|
query?: never;
|
|
@@ -7499,13 +7756,13 @@ export interface operations {
|
|
|
7499
7756
|
};
|
|
7500
7757
|
};
|
|
7501
7758
|
responses: {
|
|
7502
|
-
/** @description Extraction
|
|
7503
|
-
|
|
7759
|
+
/** @description Extraction job enqueued (async). Poll for results or use SSE. */
|
|
7760
|
+
202: {
|
|
7504
7761
|
headers: {
|
|
7505
7762
|
[name: string]: unknown;
|
|
7506
7763
|
};
|
|
7507
7764
|
content: {
|
|
7508
|
-
"application/json": components["schemas"]["
|
|
7765
|
+
"application/json": components["schemas"]["ExtractionEnqueuedResponse"];
|
|
7509
7766
|
};
|
|
7510
7767
|
};
|
|
7511
7768
|
/** @description No file/text provided, unsupported MIME type, empty text, or text too large */
|
|
@@ -7526,15 +7783,6 @@ export interface operations {
|
|
|
7526
7783
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7527
7784
|
};
|
|
7528
7785
|
};
|
|
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
7786
|
};
|
|
7539
7787
|
};
|
|
7540
7788
|
listTeams: {
|
|
@@ -7743,7 +7991,10 @@ export interface operations {
|
|
|
7743
7991
|
};
|
|
7744
7992
|
content: {
|
|
7745
7993
|
"application/json": {
|
|
7746
|
-
|
|
7994
|
+
/** @constant */
|
|
7995
|
+
success: true;
|
|
7996
|
+
/** @constant */
|
|
7997
|
+
ok: true;
|
|
7747
7998
|
};
|
|
7748
7999
|
};
|
|
7749
8000
|
};
|
|
@@ -8116,6 +8367,52 @@ export interface operations {
|
|
|
8116
8367
|
};
|
|
8117
8368
|
};
|
|
8118
8369
|
};
|
|
8370
|
+
listDepartmentMembers: {
|
|
8371
|
+
parameters: {
|
|
8372
|
+
query?: {
|
|
8373
|
+
/** @description Cursor for pagination */
|
|
8374
|
+
cursor?: string;
|
|
8375
|
+
/** @description Max results per page (default 100, max 200) */
|
|
8376
|
+
limit?: number;
|
|
8377
|
+
};
|
|
8378
|
+
header?: never;
|
|
8379
|
+
path: {
|
|
8380
|
+
/** @description Department ID (UUID) */
|
|
8381
|
+
id: string;
|
|
8382
|
+
};
|
|
8383
|
+
cookie?: never;
|
|
8384
|
+
};
|
|
8385
|
+
requestBody?: never;
|
|
8386
|
+
responses: {
|
|
8387
|
+
/** @description Paginated list of department members */
|
|
8388
|
+
200: {
|
|
8389
|
+
headers: {
|
|
8390
|
+
[name: string]: unknown;
|
|
8391
|
+
};
|
|
8392
|
+
content: {
|
|
8393
|
+
"application/json": components["schemas"]["DepartmentMembersResponse"];
|
|
8394
|
+
};
|
|
8395
|
+
};
|
|
8396
|
+
/** @description No org.view_departments capability */
|
|
8397
|
+
403: {
|
|
8398
|
+
headers: {
|
|
8399
|
+
[name: string]: unknown;
|
|
8400
|
+
};
|
|
8401
|
+
content: {
|
|
8402
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
8403
|
+
};
|
|
8404
|
+
};
|
|
8405
|
+
/** @description Department not found */
|
|
8406
|
+
404: {
|
|
8407
|
+
headers: {
|
|
8408
|
+
[name: string]: unknown;
|
|
8409
|
+
};
|
|
8410
|
+
content: {
|
|
8411
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
8412
|
+
};
|
|
8413
|
+
};
|
|
8414
|
+
};
|
|
8415
|
+
};
|
|
8119
8416
|
addDepartmentMember: {
|
|
8120
8417
|
parameters: {
|
|
8121
8418
|
query?: never;
|
package/src/api/index.ts
CHANGED
|
@@ -9,4 +9,8 @@
|
|
|
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
|
|
12
|
+
export { SPEC_HASH, SPEC_HASH_FULL } from './generated-spec-hash'
|
|
13
|
+
|
|
14
|
+
// Reusable API primitive schemas (CursorPage, ErrorResponse)
|
|
15
|
+
export { CursorPageSchema, ErrorResponseSchema } from './primitives'
|
|
16
|
+
export type { CursorPage, ErrorResponse } from './primitives'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/** Generic factory for cursor-paginated responses. */
|
|
4
|
+
export function CursorPageSchema<T extends z.ZodTypeAny>(itemSchema: T) {
|
|
5
|
+
return z.object({
|
|
6
|
+
items: z.array(itemSchema),
|
|
7
|
+
nextCursor: z.string().nullable(),
|
|
8
|
+
hasMore: z.boolean(),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Standard error envelope — matches backend StandardErrorResponse. */
|
|
13
|
+
export const ErrorResponseSchema = z.object({
|
|
14
|
+
error: z.object({
|
|
15
|
+
code: z.string(),
|
|
16
|
+
message: z.string(),
|
|
17
|
+
retryable: z.boolean(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Inferred types
|
|
22
|
+
export type CursorPage<T> = { items: T[]; nextCursor: string | null; hasMore: boolean };
|
|
23
|
+
export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
|
|
@@ -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'],
|