@@ -55,10 +55,8 @@ public function index(): DataResponse {
5555 * @param string $fieldKey Immutable unique key of the field
5656 * @param string $label Human-readable label shown in the UI
5757 * @param string $type Value type accepted by the field
58- * @param bool $adminOnly Whether only admins can edit values for this field
59- * @param bool $userEditable Whether the owner can edit the field value
60- * @param bool $userVisible Whether the owner can see the field in personal settings
61- * @param string $initialVisibility Initial visibility applied to new values
58+ * @param string $editPolicy Whether values are managed by admins only or by users too
59+ * @param string $exposurePolicy Whether the field is hidden or which default visibility new values receive
6260 * @param int $sortOrder Display order used in admin and profile forms
6361 * @param bool $active Whether the definition is currently active
6462 * @param list<string> $options Allowed values for select fields (ignored for other types)
@@ -72,10 +70,8 @@ public function create(
7270 string $ fieldKey ,
7371 string $ label ,
7472 string $ type ,
75- bool $ adminOnly = false ,
76- bool $ userEditable = false ,
77- bool $ userVisible = true ,
78- string $ initialVisibility = 'private ' ,
73+ string $ editPolicy = 'users ' ,
74+ string $ exposurePolicy = 'private ' ,
7975 int $ sortOrder = 0 ,
8076 bool $ active = true ,
8177 array $ options = [],
@@ -85,10 +81,8 @@ public function create(
8581 'field_key ' => $ fieldKey ,
8682 'label ' => $ label ,
8783 'type ' => $ type ,
88- 'admin_only ' => $ adminOnly ,
89- 'user_editable ' => $ userEditable ,
90- 'user_visible ' => $ userVisible ,
91- 'initial_visibility ' => $ initialVisibility ,
84+ 'edit_policy ' => $ editPolicy ,
85+ 'exposure_policy ' => $ exposurePolicy ,
9286 'sort_order ' => $ sortOrder ,
9387 'active ' => $ active ,
9488 ];
@@ -111,10 +105,8 @@ public function create(
111105 * @param int $id Identifier of the field definition
112106 * @param string $label Human-readable label shown in the UI
113107 * @param string $type Value type accepted by the field
114- * @param bool $adminOnly Whether only admins can edit values for this field
115- * @param bool $userEditable Whether the owner can edit the field value
116- * @param bool $userVisible Whether the owner can see the field in personal settings
117- * @param string $initialVisibility Initial visibility applied to new values
108+ * @param string $editPolicy Whether values are managed by admins only or by users too
109+ * @param string $exposurePolicy Whether the field is hidden or which default visibility new values receive
118110 * @param int $sortOrder Display order used in admin and profile forms
119111 * @param bool $active Whether the definition is currently active
120112 * @param list<string> $options Allowed values for select fields (ignored for other types)
@@ -129,10 +121,8 @@ public function update(
129121 int $ id ,
130122 string $ label ,
131123 string $ type ,
132- bool $ adminOnly = false ,
133- bool $ userEditable = false ,
134- bool $ userVisible = true ,
135- string $ initialVisibility = 'private ' ,
124+ string $ editPolicy = 'users ' ,
125+ string $ exposurePolicy = 'private ' ,
136126 int $ sortOrder = 0 ,
137127 bool $ active = true ,
138128 array $ options = [],
@@ -146,10 +136,8 @@ public function update(
146136 $ payload = [
147137 'label ' => $ label ,
148138 'type ' => $ type ,
149- 'admin_only ' => $ adminOnly ,
150- 'user_editable ' => $ userEditable ,
151- 'user_visible ' => $ userVisible ,
152- 'initial_visibility ' => $ initialVisibility ,
139+ 'edit_policy ' => $ editPolicy ,
140+ 'exposure_policy ' => $ exposurePolicy ,
153141 'sort_order ' => $ sortOrder ,
154142 'active ' => $ active ,
155143 ];
0 commit comments