TenantAtlas/apps/platform/.pnpm-store/v10/files/ff/bfdd6d8186c14ed410db5a59fc6c642b28c6c0dba450a57d05595b9a2a75d6e39475c84c9c1b1b22e1b1731c945653b2be17316e04ec28c66c60ff8c8745e6
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 { GelRole } from "./roles.js";
import type { GelTable } from "./table.js";
export type GelPolicyToOption = 'public' | 'current_role' | 'current_user' | 'session_user' | (string & {}) | GelPolicyToOption[] | GelRole;
export interface GelPolicyConfig {
as?: 'permissive' | 'restrictive';
for?: 'all' | 'select' | 'insert' | 'update' | 'delete';
to?: GelPolicyToOption;
using?: SQL;
withCheck?: SQL;
}
export declare class GelPolicy implements GelPolicyConfig {
readonly name: string;
static readonly [entityKind]: string;
readonly as: GelPolicyConfig['as'];
readonly for: GelPolicyConfig['for'];
readonly to: GelPolicyConfig['to'];
readonly using: GelPolicyConfig['using'];
readonly withCheck: GelPolicyConfig['withCheck'];
constructor(name: string, config?: GelPolicyConfig);
link(table: GelTable): this;
}
export declare function gelPolicy(name: string, config?: GelPolicyConfig): GelPolicy;