@company-semantics/contracts 38.0.0 → 39.0.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": "
|
|
3
|
+
"version": "39.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"guard:test": "vitest run scripts/ci/__tests__",
|
|
103
103
|
"release": "npx tsx scripts/release.ts",
|
|
104
104
|
"prepublishOnly": "echo 'ERROR: Publishing is CI-only via tag push. Use pnpm release instead.' && exit 1",
|
|
105
|
-
"test": "vitest run",
|
|
106
|
-
"test:run": "vitest run",
|
|
105
|
+
"test": "bash scripts/vitest-run.sh run",
|
|
106
|
+
"test:run": "bash scripts/vitest-run.sh run",
|
|
107
107
|
"color": "tsx scripts/color.ts",
|
|
108
108
|
"generate:spec-hash": "tsx scripts/generate-spec-hash.ts",
|
|
109
109
|
"generate:spec-hash:check": "tsx scripts/generate-spec-hash.ts --check",
|
|
@@ -132,10 +132,10 @@
|
|
|
132
132
|
"amphtml-validator": "^1.0.38",
|
|
133
133
|
"culori": "^4.0.2",
|
|
134
134
|
"husky": "^9.1.7",
|
|
135
|
-
"lint-staged": "^17.0
|
|
136
|
-
"markdownlint-cli2": "^0.23.
|
|
135
|
+
"lint-staged": "^17.1.0",
|
|
136
|
+
"markdownlint-cli2": "^0.23.1",
|
|
137
137
|
"openapi-typescript": "^7.13.0",
|
|
138
|
-
"prettier": "^3.9.
|
|
138
|
+
"prettier": "^3.9.6",
|
|
139
139
|
"tsx": "^4.23.1",
|
|
140
140
|
"typescript": "^5.8.3",
|
|
141
141
|
"vitest": "^4.1.10",
|
|
@@ -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 = '35fcb4a5f2ca' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = '35fcb4a5f2ca6f167a3b18024de026f143681623fea3442c2587b2ab64c9d34a' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -5624,6 +5624,8 @@ export interface components {
|
|
|
5624
5624
|
tier: "private" | "unit" | "org";
|
|
5625
5625
|
/** @enum {string} */
|
|
5626
5626
|
role?: "editor" | "commenter" | "viewer";
|
|
5627
|
+
/** @enum {string} */
|
|
5628
|
+
discoverability?: "org" | "owners";
|
|
5627
5629
|
};
|
|
5628
5630
|
OwnerTransferRequest: {
|
|
5629
5631
|
/** Format: uuid */
|
|
@@ -8675,13 +8677,6 @@ export interface operations {
|
|
|
8675
8677
|
};
|
|
8676
8678
|
content?: never;
|
|
8677
8679
|
};
|
|
8678
|
-
/** @description Requires org.view_company_md scope */
|
|
8679
|
-
403: {
|
|
8680
|
-
headers: {
|
|
8681
|
-
[name: string]: unknown;
|
|
8682
|
-
};
|
|
8683
|
-
content?: never;
|
|
8684
|
-
};
|
|
8685
8680
|
};
|
|
8686
8681
|
};
|
|
8687
8682
|
getCompanyMdDocSharing: {
|
|
@@ -8,6 +8,17 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Authority: ADR-CTRL-085 (Rights Table), ADR-CTRL-086 (most-permissive
|
|
10
10
|
* aggregation), ADR-BE-181 (AUTH-006 compose model).
|
|
11
|
+
*
|
|
12
|
+
* DECODER RING — the label/identifier map, stated once.
|
|
13
|
+
*
|
|
14
|
+
* UI "General access" = wire `visibility` / EntityVisibility
|
|
15
|
+
* (access scope: WHO may read)
|
|
16
|
+
* UI "Discoverability" = wire `discoverability` / EntityDiscoverability
|
|
17
|
+
* (WHO knows it exists)
|
|
18
|
+
*
|
|
19
|
+
* They are SIBLINGS, not modifiers. A doc can be readable by two named people
|
|
20
|
+
* and still be globally hidden: access changes without discoverability
|
|
21
|
+
* changing (ADR-CONTRACTS-093).
|
|
11
22
|
*/
|
|
12
23
|
import { z } from "zod";
|
|
13
24
|
import { AccessLevelSchema } from "./access-levels";
|
|
@@ -41,6 +52,9 @@ export type GrantableAccessLevel = z.infer<typeof GrantableAccessLevelSchema>;
|
|
|
41
52
|
export const EntityVisibilitySchema = z.enum(["private", "unit", "org"]);
|
|
42
53
|
export type EntityVisibility = z.infer<typeof EntityVisibilitySchema>;
|
|
43
54
|
|
|
55
|
+
export const EntityDiscoverabilitySchema = z.enum(["org", "owners"]);
|
|
56
|
+
export type EntityDiscoverability = z.infer<typeof EntityDiscoverabilitySchema>;
|
|
57
|
+
|
|
44
58
|
export const AclGrantRequestSchema = z.object({
|
|
45
59
|
access_level: GrantableAccessLevelSchema,
|
|
46
60
|
/**
|
|
@@ -83,7 +97,10 @@ export const AclListResponseSchema = z.object({
|
|
|
83
97
|
owner_user_ids: z
|
|
84
98
|
.array(z.string().uuid())
|
|
85
99
|
.refine(uniqueValues, { message: "duplicate id in owner_user_ids" }),
|
|
86
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* General-access scope: WHO may read. NOT discoverability — see
|
|
102
|
+
* `discoverability`.
|
|
103
|
+
*/
|
|
87
104
|
visibility: EntityVisibilitySchema,
|
|
88
105
|
/**
|
|
89
106
|
* The ROLE the general-access scope grants its audience: WHAT they may do (the
|
|
@@ -92,7 +109,20 @@ export const AclListResponseSchema = z.object({
|
|
|
92
109
|
* ignored when `visibility` is `private` (no general grant).
|
|
93
110
|
*/
|
|
94
111
|
general_access_role: GrantableAccessLevelSchema.default("viewer"),
|
|
95
|
-
|
|
112
|
+
/**
|
|
113
|
+
* Who knows this entity EXISTS — a SIBLING of `visibility`, not a modifier
|
|
114
|
+
* on it (ADR-CONTRACTS-093).
|
|
115
|
+
*
|
|
116
|
+
* ABSENT => this entity type has no discoverability axis (work_item,
|
|
117
|
+
* meeting_recording). Deliberately not defaulted: `org|owners` has no honest
|
|
118
|
+
* cross-entity value, unlike `general_access_role`'s `viewer`.
|
|
119
|
+
*
|
|
120
|
+
* The policy's domain is NON-READERS only. When `visibility` is `org` every
|
|
121
|
+
* member is a reader, so the stored value affects no one — it is not erased,
|
|
122
|
+
* it simply has no subjects (ADR-CTRL-194 invariant 4). A UI therefore
|
|
123
|
+
* disables the control rather than rewriting the value.
|
|
124
|
+
*/
|
|
125
|
+
discoverability: EntityDiscoverabilitySchema.optional(),
|
|
96
126
|
grants: z.array(AclGrantResponseSchema),
|
|
97
127
|
});
|
|
98
128
|
export type AclListResponse = z.infer<typeof AclListResponseSchema>;
|
|
@@ -106,6 +136,14 @@ export const VisibilityPatchRequestSchema = z.object({
|
|
|
106
136
|
* set); ignored when `tier` is `private`.
|
|
107
137
|
*/
|
|
108
138
|
role: GrantableAccessLevelSchema.optional(),
|
|
139
|
+
/**
|
|
140
|
+
* New discoverability. OMITTED => preserve the stored value.
|
|
141
|
+
*
|
|
142
|
+
* NOTE the asymmetry with the response field: there `undefined` means "not
|
|
143
|
+
* applicable to this entity type"; here it means "leave unchanged"
|
|
144
|
+
* (ADR-CONTRACTS-093).
|
|
145
|
+
*/
|
|
146
|
+
discoverability: EntityDiscoverabilitySchema.optional(),
|
|
109
147
|
});
|
|
110
148
|
export type VisibilityPatchRequest = z.infer<
|
|
111
149
|
typeof VisibilityPatchRequestSchema
|