@company-semantics/contracts 27.10.0 → 27.12.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,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 = '43cd15935d12' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = '43cd15935d1232049463ee9ed6c4e833b6e012906cfc46644157aaaa310b895b' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -1542,6 +1542,40 @@ export interface paths {
|
|
|
1542
1542
|
patch?: never;
|
|
1543
1543
|
trace?: never;
|
|
1544
1544
|
};
|
|
1545
|
+
"/api/company-md/context-bank/{contextDocId}/attachments": {
|
|
1546
|
+
parameters: {
|
|
1547
|
+
query?: never;
|
|
1548
|
+
header?: never;
|
|
1549
|
+
path?: never;
|
|
1550
|
+
cookie?: never;
|
|
1551
|
+
};
|
|
1552
|
+
/** List parent docs a context doc is attached to, with per-parent detach capability */
|
|
1553
|
+
get: operations["getCompanyMdContextDocAttachments"];
|
|
1554
|
+
put?: never;
|
|
1555
|
+
post?: never;
|
|
1556
|
+
delete?: never;
|
|
1557
|
+
options?: never;
|
|
1558
|
+
head?: never;
|
|
1559
|
+
patch?: never;
|
|
1560
|
+
trace?: never;
|
|
1561
|
+
};
|
|
1562
|
+
"/api/company-md/context-bank/{contextDocId}/detach": {
|
|
1563
|
+
parameters: {
|
|
1564
|
+
query?: never;
|
|
1565
|
+
header?: never;
|
|
1566
|
+
path?: never;
|
|
1567
|
+
cookie?: never;
|
|
1568
|
+
};
|
|
1569
|
+
get?: never;
|
|
1570
|
+
put?: never;
|
|
1571
|
+
/** Detach a context doc from parent docs; deletes the doc when orphaned */
|
|
1572
|
+
post: operations["detachCompanyMdContextDoc"];
|
|
1573
|
+
delete?: never;
|
|
1574
|
+
options?: never;
|
|
1575
|
+
head?: never;
|
|
1576
|
+
patch?: never;
|
|
1577
|
+
trace?: never;
|
|
1578
|
+
};
|
|
1545
1579
|
"/api/company-md/docs/{id}/context-bank/{contextDocId}/order": {
|
|
1546
1580
|
parameters: {
|
|
1547
1581
|
query?: never;
|
|
@@ -4511,6 +4545,7 @@ export interface components {
|
|
|
4511
4545
|
name: string;
|
|
4512
4546
|
} | null;
|
|
4513
4547
|
canEdit: boolean;
|
|
4548
|
+
canUploadContext?: boolean;
|
|
4514
4549
|
inheritsFromId: string | null;
|
|
4515
4550
|
inheritsFrom: string | null;
|
|
4516
4551
|
sources: {
|
|
@@ -4558,6 +4593,9 @@ export interface components {
|
|
|
4558
4593
|
AssociateContextDocRequest: {
|
|
4559
4594
|
contextDocId: string;
|
|
4560
4595
|
};
|
|
4596
|
+
DetachContextDocRequest: {
|
|
4597
|
+
parentDocIds: string[];
|
|
4598
|
+
};
|
|
4561
4599
|
TransferCompanyMdDocOwnerRequest: {
|
|
4562
4600
|
/** Format: uuid */
|
|
4563
4601
|
newOwnerUserId: string;
|
|
@@ -8194,6 +8232,50 @@ export interface operations {
|
|
|
8194
8232
|
};
|
|
8195
8233
|
};
|
|
8196
8234
|
};
|
|
8235
|
+
getCompanyMdContextDocAttachments: {
|
|
8236
|
+
parameters: {
|
|
8237
|
+
query?: never;
|
|
8238
|
+
header?: never;
|
|
8239
|
+
path: {
|
|
8240
|
+
contextDocId: string;
|
|
8241
|
+
};
|
|
8242
|
+
cookie?: never;
|
|
8243
|
+
};
|
|
8244
|
+
requestBody?: never;
|
|
8245
|
+
responses: {
|
|
8246
|
+
/** @description Attachments with canDetach flags */
|
|
8247
|
+
200: {
|
|
8248
|
+
headers: {
|
|
8249
|
+
[name: string]: unknown;
|
|
8250
|
+
};
|
|
8251
|
+
content?: never;
|
|
8252
|
+
};
|
|
8253
|
+
};
|
|
8254
|
+
};
|
|
8255
|
+
detachCompanyMdContextDoc: {
|
|
8256
|
+
parameters: {
|
|
8257
|
+
query?: never;
|
|
8258
|
+
header?: never;
|
|
8259
|
+
path: {
|
|
8260
|
+
contextDocId: string;
|
|
8261
|
+
};
|
|
8262
|
+
cookie?: never;
|
|
8263
|
+
};
|
|
8264
|
+
requestBody: {
|
|
8265
|
+
content: {
|
|
8266
|
+
"application/json": components["schemas"]["DetachContextDocRequest"];
|
|
8267
|
+
};
|
|
8268
|
+
};
|
|
8269
|
+
responses: {
|
|
8270
|
+
/** @description Associations removed; deleted=true when the doc was orphaned */
|
|
8271
|
+
200: {
|
|
8272
|
+
headers: {
|
|
8273
|
+
[name: string]: unknown;
|
|
8274
|
+
};
|
|
8275
|
+
content?: never;
|
|
8276
|
+
};
|
|
8277
|
+
};
|
|
8278
|
+
};
|
|
8197
8279
|
reorderCompanyMdContextBankItem: {
|
|
8198
8280
|
parameters: {
|
|
8199
8281
|
query?: never;
|
package/src/content/schemas.ts
CHANGED
|
@@ -126,6 +126,15 @@ export const CompanyMdDocResponseSchema = z.object({
|
|
|
126
126
|
owningUnitId: z.string().nullable(),
|
|
127
127
|
owner: CompanyMdPersonSchema.nullable(),
|
|
128
128
|
canEdit: z.boolean(),
|
|
129
|
+
/**
|
|
130
|
+
* UI capability signal (ADR-BE-382): whether the requesting actor holds
|
|
131
|
+
* `CompanyMd.CanUploadContext` on this doc — the SAME binding every
|
|
132
|
+
* context-bank mutation (upload/attach/remove/reorder/detach) enforces.
|
|
133
|
+
* The app hides bank-mutation affordances when false. Signal only;
|
|
134
|
+
* admittance and enforcement are unchanged. Optional for back-compat with
|
|
135
|
+
* doc shapes returned outside the single-doc read.
|
|
136
|
+
*/
|
|
137
|
+
canUploadContext: z.boolean().optional(),
|
|
129
138
|
// Stable id of the inherited-from doc — the resolution key (mirrors the
|
|
130
139
|
// resolved parentId). `inheritsFrom` is presentation only (ADR-BE-315).
|
|
131
140
|
inheritsFromId: z.string().nullable(),
|
|
@@ -25,6 +25,8 @@ export const openApiRoutes = {
|
|
|
25
25
|
'/api/company-md/access-requests/{id}/deny': ['POST'],
|
|
26
26
|
'/api/company-md/context-bank': ['POST'],
|
|
27
27
|
'/api/company-md/context-bank/search': ['GET'],
|
|
28
|
+
'/api/company-md/context-bank/{contextDocId}/attachments': ['GET'],
|
|
29
|
+
'/api/company-md/context-bank/{contextDocId}/detach': ['POST'],
|
|
28
30
|
'/api/company-md/docs/:id/context-bank/suggestions': ['GET'],
|
|
29
31
|
'/api/company-md/docs/{id}': ['GET'],
|
|
30
32
|
'/api/company-md/docs/{id}/access-requests': ['GET', 'POST'],
|