@rebasepro/types 0.4.0 → 0.5.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/README.md +83 -232
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/backend.d.ts +36 -1
- package/dist/types/collections.d.ts +21 -1
- package/dist/types/properties.d.ts +0 -8
- package/package.json +1 -1
- package/src/types/backend.ts +39 -1
- package/src/types/collections.ts +22 -1
- package/src/types/properties.ts +0 -9
package/src/types/collections.ts
CHANGED
|
@@ -399,7 +399,25 @@ export interface BaseEntityCollection<M extends Record<string, unknown> = Record
|
|
|
399
399
|
*/
|
|
400
400
|
Actions?: ComponentRef<CollectionActionsProps>[];
|
|
401
401
|
|
|
402
|
+
/**
|
|
403
|
+
* The database table name for this collection.
|
|
404
|
+
* Automatically set for PostgreSQL collections.
|
|
405
|
+
* For non-SQL backends, this may be undefined.
|
|
406
|
+
*/
|
|
407
|
+
table?: string;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Relations defined for this collection.
|
|
411
|
+
* Populated at normalization time from inline relation properties
|
|
412
|
+
* or explicit relation definitions.
|
|
413
|
+
*/
|
|
414
|
+
relations?: Relation[];
|
|
402
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Security rules for this collection (Row Level Security).
|
|
418
|
+
* When defined, the backend enforces access control policies.
|
|
419
|
+
*/
|
|
420
|
+
securityRules?: SecurityRule[];
|
|
403
421
|
}
|
|
404
422
|
|
|
405
423
|
// ── Driver-specific collection types ──────────────────────────────────
|
|
@@ -517,7 +535,10 @@ export type EntityCollection<M extends Record<string, unknown> = Record<string,
|
|
|
517
535
|
// Use these after a `getDataSourceCapabilities()` guard to safely access
|
|
518
536
|
// driver-specific fields without coupling to a concrete driver type.
|
|
519
537
|
|
|
520
|
-
/**
|
|
538
|
+
/**
|
|
539
|
+
* An EntityCollection that supports SQL-style relations (e.g. Postgres).
|
|
540
|
+
* @deprecated Use `EntityCollection` directly — `table`, `relations`, and `securityRules` are now on `BaseEntityCollection`.
|
|
541
|
+
*/
|
|
521
542
|
export type CollectionWithRelations<M extends Record<string, unknown> = Record<string, unknown>> =
|
|
522
543
|
EntityCollection<M> & { table?: string; relations?: Relation[]; securityRules?: SecurityRule[] };
|
|
523
544
|
|
package/src/types/properties.ts
CHANGED
|
@@ -745,15 +745,6 @@ export interface MapProperty extends BaseProperty {
|
|
|
745
745
|
* Properties that are displayed when rendered as a preview
|
|
746
746
|
*/
|
|
747
747
|
previewProperties?: string[];
|
|
748
|
-
/**
|
|
749
|
-
* Allow the user to add only some keys in this map.
|
|
750
|
-
* By default, all properties of the map have the corresponding field in
|
|
751
|
-
* the form view. Setting this flag to true allows to pick only some.
|
|
752
|
-
* Useful for map that can have a lot of sub-properties that may not be
|
|
753
|
-
* needed
|
|
754
|
-
*/
|
|
755
|
-
pickOnlySomeKeys?: boolean;
|
|
756
|
-
|
|
757
748
|
/**
|
|
758
749
|
* Render this map as a key-value table that allows to use
|
|
759
750
|
* arbitrary keys. You don't need to define the properties in this case.
|