You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Override object for the entity table created by a BlueprintMembershipType. Shape mirrors BlueprintTable / secure_table_provision vocabulary. When supplied, policies[] replaces the default entity-table policies entirely. */
817
+
exportinterfaceBlueprintEntityTableProvision{
818
+
/** Whether to enable RLS on the entity table. Forwarded to secure_table_provision. Defaults to true. */
819
+
use_rls?: boolean;
820
+
/** Node objects applied to the entity table for field creation (e.g., DataTimestamps, DataPeoplestamps). Forwarded to secure_table_provision as-is. */
821
+
nodes?: BlueprintNode[];
822
+
/** Custom fields (columns) to add to the entity table. Forwarded to secure_table_provision as-is. */
823
+
fields?: BlueprintField[];
824
+
/** Privilege grants for the entity table as [verb, columns] tuples (e.g. [["select","*"],["insert","*"]]). Forwarded to secure_table_provision as-is. */
825
+
grant_privileges?: unknown[];
826
+
/** Database roles to grant privileges to. Forwarded to secure_table_provision as-is. Defaults to ["authenticated"]. */
827
+
grant_roles?: string[];
828
+
/** RLS policies for the entity table. When present, these policies fully replace the five default entity-table policies (is_visible becomes a no-op). */
829
+
policies?: BlueprintPolicy[];
830
+
}
816
831
/** A membership type entry for Phase 0 of construct_blueprint(). Provisions a full entity type with its own entity table, membership modules, and security policies via entity_type_provision. */
817
832
exportinterfaceBlueprintMembershipType{
818
833
/** Entity type name (e.g., "data_room", "channel", "department"). Must be unique per database. */
/** Custom table name for the entity table. Defaults to name-derived convention. */
827
842
table_name?: string;
828
-
/** Whether this entity type is visible in the API. Defaults to true. */
843
+
/** Whether parent-entity members can see child entities via the default parent_member SELECT policy. Gates one of the five default policies. No-op when table_provision is supplied. Defaults to true. */
829
844
is_visible?: boolean;
830
845
/** Whether to provision a limits module for this entity type. Defaults to false. */
831
846
has_limits?: boolean;
832
847
/** Whether to provision a profiles module for this entity type. Defaults to false. */
833
848
has_profiles?: boolean;
834
849
/** Whether to provision a levels module for this entity type. Defaults to false. */
835
850
has_levels?: boolean;
836
-
/** Whether to skip creating default RLS policies on the entity table. Defaults to false. */
851
+
/** Escape hatch: when true AND table_provision is NULL, zero policies are provisioned on the entity table. Defaults to false. */
837
852
skip_entity_policies?: boolean;
853
+
/** Override for the entity table. Shape mirrors BlueprintTable / secure_table_provision vocabulary. When supplied, its policies[] replaces the five default entity-table policies; is_visible becomes a no-op. When NULL (default), the five default policies are applied (gated by is_visible). */
'RLS policies for the entity table. When present, these policies fully replace the five default entity-table policies (is_visible becomes a no-op).'
637
+
),
638
+
]),
639
+
'Override object for the entity table created by a BlueprintMembershipType. Shape mirrors BlueprintTable / secure_table_provision vocabulary. When supplied, policies[] replaces the default entity-table policies entirely.'
@@ -624,7 +665,7 @@ function buildBlueprintMembershipType(): t.ExportNamedDeclaration {
624
665
),
625
666
addJSDoc(
626
667
optionalProp('is_visible',t.tsBooleanKeyword()),
627
-
'Whether this entity type is visible in the API. Defaults to true.'
668
+
'Whether parent-entity members can see child entities via the default parent_member SELECT policy. Gates one of the five default policies. No-op when table_provision is supplied. Defaults to true.'
628
669
),
629
670
addJSDoc(
630
671
optionalProp('has_limits',t.tsBooleanKeyword()),
@@ -640,7 +681,14 @@ function buildBlueprintMembershipType(): t.ExportNamedDeclaration {
'Override for the entity table. Shape mirrors BlueprintTable / secure_table_provision vocabulary. When supplied, its policies[] replaces the five default entity-table policies; is_visible becomes a no-op. When NULL (default), the five default policies are applied (gated by is_visible).'
644
692
),
645
693
]),
646
694
'A membership type entry for Phase 0 of construct_blueprint(). Provisions a full entity type with its own entity table, membership modules, and security policies via entity_type_provision.'
@@ -839,6 +887,7 @@ function buildProgram(meta?: MetaTableInfo[]): string {
0 commit comments