@rebasepro/types 0.9.1-canary.f0ac103 → 0.9.1-canary.f2f61da
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/dist/types/properties.d.ts +13 -0
- package/package.json +1 -1
- package/src/types/properties.ts +14 -0
|
@@ -175,6 +175,19 @@ export interface BaseProperty<CustomProps = unknown> {
|
|
|
175
175
|
* Rules for validating this property
|
|
176
176
|
*/
|
|
177
177
|
validation?: PropertyValidationSchema;
|
|
178
|
+
/**
|
|
179
|
+
* Never include this column in an API response.
|
|
180
|
+
*
|
|
181
|
+
* For secrets the server must store and read but no client should ever
|
|
182
|
+
* receive — password hashes, verification tokens. The value is still
|
|
183
|
+
* written and queryable server-side; it is stripped from every row the API
|
|
184
|
+
* serves, for every caller, including admins and service keys.
|
|
185
|
+
*
|
|
186
|
+
* This is a server-side guarantee, unlike `ui.hideFromCollection`, which
|
|
187
|
+
* only stops the admin panel from *rendering* a field and leaves it in the
|
|
188
|
+
* JSON payload.
|
|
189
|
+
*/
|
|
190
|
+
excludeFromApi?: boolean;
|
|
178
191
|
/**
|
|
179
192
|
* Use this to define dynamic properties that change based on certain conditions
|
|
180
193
|
* or on the entity's values. For example, you can make a field read-only if
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.1-canary.
|
|
4
|
+
"version": "0.9.1-canary.f2f61da",
|
|
5
5
|
"description": "Rebase type definitions — shared interfaces and controller types",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/rebaseco"
|
package/src/types/properties.ts
CHANGED
|
@@ -231,6 +231,20 @@ export interface BaseProperty<CustomProps = unknown> {
|
|
|
231
231
|
*/
|
|
232
232
|
validation?: PropertyValidationSchema;
|
|
233
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Never include this column in an API response.
|
|
236
|
+
*
|
|
237
|
+
* For secrets the server must store and read but no client should ever
|
|
238
|
+
* receive — password hashes, verification tokens. The value is still
|
|
239
|
+
* written and queryable server-side; it is stripped from every row the API
|
|
240
|
+
* serves, for every caller, including admins and service keys.
|
|
241
|
+
*
|
|
242
|
+
* This is a server-side guarantee, unlike `ui.hideFromCollection`, which
|
|
243
|
+
* only stops the admin panel from *rendering* a field and leaves it in the
|
|
244
|
+
* JSON payload.
|
|
245
|
+
*/
|
|
246
|
+
excludeFromApi?: boolean;
|
|
247
|
+
|
|
234
248
|
// NOTE: `defaultValue` is intentionally NOT on BaseProperty.
|
|
235
249
|
// Each concrete property type (StringProperty, NumberProperty, etc.)
|
|
236
250
|
// defines its own typed `defaultValue` for compile-time safety.
|