UNPKG

bknd

Version:

Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.

65 lines (64 loc) 2.79 kB
import { Permission } from "../../auth/authorize/Permission"; import { s } from "bknd/utils"; export declare const entityRead: Permission<"data.entity.read", { filterable: true; }, s.ObjectSchema<{ readonly entity: s.StringSchema<s.IStringOptions> & s.IStringOptions; readonly id: { default?: any; enum?: (readonly any[] | any[]) | undefined; const?: any; anyOf: [s.Schema<s.ISchemaOptions, number, number> & s.ISchemaOptions, s.StringSchema<s.Schema<s.ISchemaOptions, unknown, unknown>> & s.Schema<s.ISchemaOptions, unknown, unknown>]; } & s.Schema<s.ISchemaOptions, string | number | undefined, any>; }, s.IObjectOptions> & s.IObjectOptions, { [x: string]: unknown; id?: string | number | undefined; entity: string; }>; /** * Filter filters content given */ export declare const entityCreate: Permission<"data.entity.create", { filterable: true; }, s.ObjectSchema<{ readonly entity: s.StringSchema<s.IStringOptions> & s.IStringOptions; }, s.IObjectOptions> & s.IObjectOptions, { [x: string]: unknown; entity: string; }>; /** * Filter filters where clause */ export declare const entityUpdate: Permission<"data.entity.update", { filterable: true; }, s.ObjectSchema<{ readonly entity: s.StringSchema<s.IStringOptions> & s.IStringOptions; readonly id: { default?: any; enum?: (readonly any[] | any[]) | undefined; const?: any; anyOf: [s.Schema<s.ISchemaOptions, number, number> & s.ISchemaOptions, s.StringSchema<s.Schema<s.ISchemaOptions, unknown, unknown>> & s.Schema<s.ISchemaOptions, unknown, unknown>]; } & s.Schema<s.ISchemaOptions, string | number | undefined, any>; }, s.IObjectOptions> & s.IObjectOptions, { [x: string]: unknown; id?: string | number | undefined; entity: string; }>; export declare const entityDelete: Permission<"data.entity.delete", { filterable: true; }, s.ObjectSchema<{ readonly entity: s.StringSchema<s.IStringOptions> & s.IStringOptions; readonly id: { default?: any; enum?: (readonly any[] | any[]) | undefined; const?: any; anyOf: [s.Schema<s.ISchemaOptions, number, number> & s.ISchemaOptions, s.StringSchema<s.Schema<s.ISchemaOptions, unknown, unknown>> & s.Schema<s.ISchemaOptions, unknown, unknown>]; } & s.Schema<s.ISchemaOptions, string | number | undefined, any>; }, s.IObjectOptions> & s.IObjectOptions, { [x: string]: unknown; id?: string | number | undefined; entity: string; }>; export declare const databaseSync: Permission<"data.database.sync", {}, undefined, undefined>; export declare const rawQuery: Permission<"data.raw.query", {}, undefined, undefined>; export declare const rawMutate: Permission<"data.raw.mutate", {}, undefined, undefined>;