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
/* Database roles to grant privileges to. Forwarded to secure_table_provision as-is. Default: [authenticated] */
614
-
grant_roles?: string[];
615
-
/* Privilege grants for the junction table as [verb, columns] tuples (e.g. [['select','*'],['insert','*']]). Forwarded to secure_table_provision as-is. Default: select/insert/delete for all columns */
616
-
grant_privileges?: string[][];
617
-
/* RLS policy type for the junction table. Forwarded to secure_table_provision as-is. NULL means no policy. */
618
-
policy_type?: string;
619
-
/* Privileges the policy applies to. Forwarded to secure_table_provision as-is. NULL means derived from grant_privileges verbs. */
620
-
policy_privileges?: string[];
621
-
/* Database role the policy targets. Forwarded to secure_table_provision as-is. NULL means falls back to first grant_role. */
622
-
policy_role?: string;
623
-
/* Whether the policy is PERMISSIVE (true) or RESTRICTIVE (false). Forwarded to secure_table_provision as-is. */
624
-
policy_permissive?: boolean;
625
-
/* Policy configuration forwarded to secure_table_provision as-is. Structure varies by policy_type. */
626
-
policy_data?: {
627
-
[key: string]: unknown;
628
-
};
613
+
/* Unified grant objects for the junction table. Each entry is { roles: string[], privileges: string[][] }. Forwarded to secure_table_provision as-is. Default: [] */
614
+
grants?: {
615
+
roles: string[];
616
+
privileges: string[][];
617
+
}[];
618
+
/* RLS policy objects for the junction table. Each entry has $type (Authz* generator), optional data, privileges, policy_role, permissive, policy_name. Forwarded to secure_table_provision as-is. Default: [] */
619
+
policies?: {
620
+
$type: string;
621
+
data?: {
622
+
[key: string]: unknown;
623
+
};
624
+
privileges?: string[];
625
+
policy_role?: string;
626
+
permissive?: boolean;
627
+
policy_name?: string;
628
+
}[];
629
629
}
630
630
/** Declares a spatial predicate between two existing geometry/geography columns. Inserts a metaschema_public.spatial_relation row; the sync_spatial_relation_tags trigger then projects a @spatialRelation smart tag onto the owner column so graphile-postgis' PostgisSpatialRelationsPlugin can expose it as a cross-table filter in GraphQL. Metadata-only: both source_field and target_field must already exist on their tables. Idempotent on (source_table_id, name). One direction per tag — author two RelationSpatial entries if symmetry is desired. */
/** Custom fields (columns) to add to the entity table. Forwarded to secure_table_provision as-is. */
840
840
fields?: BlueprintField[];
841
-
/** Privilege grants for the entity table as [verb, columns] tuples (e.g. [["select","*"],["insert","*"]]). Forwarded to secure_table_provision as-is. */
842
-
grant_privileges?: unknown[];
843
-
/** Database roles to grant privileges to. Forwarded to secure_table_provision as-is. Defaults to ["authenticated"]. */
844
-
grant_roles?: string[];
841
+
/** Unified grant objects for the entity table. Each entry is { roles: string[], privileges: unknown[] } where privileges are [verb, columns] tuples. Forwarded to secure_table_provision as-is. Defaults to []. */
842
+
grants?: {
843
+
roles: string[];
844
+
privileges: unknown[];
845
+
}[];
845
846
/** RLS policies for the entity table. When present, these policies fully replace the five default entity-table policies (is_visible becomes a no-op). */
/** Database roles to grant privileges to. Defaults to ["authenticated"]. */
1079
-
grant_roles?: string[];
1080
-
/** Privilege grants as [verb, column] tuples or objects. Defaults to empty (no grants — callers must explicitly specify). */
1081
-
grants?: unknown[];
1079
+
/** Unified grant objects. Each entry is { roles: string[], privileges: unknown[] } where privileges are [verb, columns] tuples (e.g. [["select","*"]]). Enables per-role targeting. Defaults to []. */
1080
+
grants?: {
1081
+
roles: string[];
1082
+
privileges: unknown[];
1083
+
}[];
1082
1084
/** Whether to enable RLS on this table. Defaults to true. */
1083
1085
use_rls?: boolean;
1084
1086
/** Table-level indexes (table_name inherited from parent). */
'Unified grant objects for the entity table. Each entry is { roles: string[], privileges: unknown[] } where privileges are [verb, columns] tuples. Forwarded to secure_table_provision as-is. Defaults to [].'
651
655
),
652
656
addJSDoc(
653
657
optionalProp(
@@ -749,12 +753,16 @@ function buildBlueprintTable(): t.ExportNamedDeclaration {
'Unified grant objects. Each entry is { roles: string[], privileges: unknown[] } where privileges are [verb, columns] tuples (e.g. [["select","*"]]). Enables per-role targeting. Defaults to [].'
"description": "Array of node objects for field creation on junction table. Each object has a $type key (e.g. DataId, DataEntityMembership) and optional data keys. Forwarded to secure_table_provision as-is. Empty array means no additional fields."
"description": "Database roles to grant privileges to. Forwarded to secure_table_provision as-is. Default: [authenticated]"
61
+
"description": "Unified grant objects for the junction table. Each entry is { roles: string[], privileges: string[][] }. Forwarded to secure_table_provision as-is. Default: []"
"description": "Privilege grants for the junction table as [verb, columns] tuples (e.g. [['select','*'],['insert','*']]). Forwarded to secure_table_provision as-is. Default: select/insert/delete for all columns"
67
-
},
68
-
"policy_type": {
69
-
"type": "string",
70
-
"description": "RLS policy type for the junction table. Forwarded to secure_table_provision as-is. NULL means no policy."
71
-
},
72
-
"policy_privileges": {
73
-
"type": "array",
74
-
"items": {
75
-
"type": "string"
76
-
},
77
-
"description": "Privileges the policy applies to. Forwarded to secure_table_provision as-is. NULL means derived from grant_privileges verbs."
78
-
},
79
-
"policy_role": {
80
-
"type": "string",
81
-
"description": "Database role the policy targets. Forwarded to secure_table_provision as-is. NULL means falls back to first grant_role."
82
-
},
83
-
"policy_permissive": {
84
-
"type": "boolean",
85
-
"description": "Whether the policy is PERMISSIVE (true) or RESTRICTIVE (false). Forwarded to secure_table_provision as-is.",
86
-
"default": true
87
-
},
88
-
"policy_data": {
89
-
"type": "object",
90
-
"description": "Policy configuration forwarded to secure_table_provision as-is. Structure varies by policy_type."
77
+
"description": "RLS policy objects for the junction table. Each entry has $type (Authz* generator), optional data, privileges, policy_role, permissive, policy_name. Forwarded to secure_table_provision as-is. Default: []"
0 commit comments