@company-semantics/contracts 38.0.0 → 38.1.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 = '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,6 +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"),
|
|
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(),
|
|
95
126
|
editors_can_share: z.boolean(),
|
|
96
127
|
grants: z.array(AclGrantResponseSchema),
|
|
97
128
|
});
|
|
@@ -106,6 +137,14 @@ export const VisibilityPatchRequestSchema = z.object({
|
|
|
106
137
|
* set); ignored when `tier` is `private`.
|
|
107
138
|
*/
|
|
108
139
|
role: GrantableAccessLevelSchema.optional(),
|
|
140
|
+
/**
|
|
141
|
+
* New discoverability. OMITTED => preserve the stored value.
|
|
142
|
+
*
|
|
143
|
+
* NOTE the asymmetry with the response field: there `undefined` means "not
|
|
144
|
+
* applicable to this entity type"; here it means "leave unchanged"
|
|
145
|
+
* (ADR-CONTRACTS-093).
|
|
146
|
+
*/
|
|
147
|
+
discoverability: EntityDiscoverabilitySchema.optional(),
|
|
109
148
|
});
|
|
110
149
|
export type VisibilityPatchRequest = z.infer<
|
|
111
150
|
typeof VisibilityPatchRequestSchema
|