TenantAtlas/apps/platform/.pnpm-store/v10/files/a6/a0ca0b3322fdacef3fd5a80f0f3abd5fc573c95e382198f22173d361a17ae44829b2537be01fa0bef4dc2cf77d656c3a7b4a3e9df388c5c188507e32fcc0be
Ahmed Darrazi 9f74f7a658
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
feat: compress governance operator outcomes
2026-04-19 14:15:11 +02:00

25 lines
1.0 KiB
Plaintext

import { entityKind } from "../entity.js";
import type { SQL } from "../sql/sql.js";
import type { PgRole } from "./roles.js";
import type { PgTable } from "./table.js";
export type PgPolicyToOption = 'public' | 'current_role' | 'current_user' | 'session_user' | (string & {}) | PgPolicyToOption[] | PgRole;
export interface PgPolicyConfig {
as?: 'permissive' | 'restrictive';
for?: 'all' | 'select' | 'insert' | 'update' | 'delete';
to?: PgPolicyToOption;
using?: SQL;
withCheck?: SQL;
}
export declare class PgPolicy implements PgPolicyConfig {
readonly name: string;
static readonly [entityKind]: string;
readonly as: PgPolicyConfig['as'];
readonly for: PgPolicyConfig['for'];
readonly to: PgPolicyConfig['to'];
readonly using: PgPolicyConfig['using'];
readonly withCheck: PgPolicyConfig['withCheck'];
constructor(name: string, config?: PgPolicyConfig);
link(table: PgTable): this;
}
export declare function pgPolicy(name: string, config?: PgPolicyConfig): PgPolicy;