@zenstackhq/plugin-policy 3.5.5 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,27 +1,34 @@
1
- import * as kysely from 'kysely';
2
- import * as _zenstackhq_orm from '@zenstackhq/orm';
3
- import { RuntimePlugin, OnKyselyQueryArgs } from '@zenstackhq/orm';
4
- import { SchemaDef } from '@zenstackhq/orm/schema';
1
+ import * as _$_zenstackhq_orm0 from "@zenstackhq/orm";
2
+ import { OnKyselyQueryArgs, RuntimePlugin } from "@zenstackhq/orm";
3
+ import * as _$kysely from "kysely";
4
+ import { SchemaDef } from "@zenstackhq/orm/schema";
5
5
 
6
+ //#region src/options.d.ts
6
7
  type PolicyPluginOptions = {
7
- /**
8
- * Dangerously bypasses access-policy enforcement for raw SQL queries.
9
- * Raw queries remain in the current transaction, but the policy plugin will
10
- * not inspect or reject them.
11
- */
12
- dangerouslyAllowRawSql?: boolean;
8
+ /**
9
+ * Dangerously bypasses access-policy enforcement for raw SQL queries.
10
+ * Raw queries remain in the current transaction, but the policy plugin will
11
+ * not inspect or reject them.
12
+ */
13
+ dangerouslyAllowRawSql?: boolean;
13
14
  };
14
-
15
+ //#endregion
16
+ //#region src/plugin.d.ts
15
17
  declare class PolicyPlugin implements RuntimePlugin<SchemaDef, {}, {}, {}> {
16
- private readonly options;
17
- constructor(options?: PolicyPluginOptions);
18
- get id(): "policy";
19
- get name(): string;
20
- get description(): string;
21
- get functions(): {
22
- check: _zenstackhq_orm.ZModelFunction<any>;
23
- };
24
- onKyselyQuery({ query, client, proceed }: OnKyselyQueryArgs<SchemaDef>): Promise<kysely.QueryResult<any>>;
18
+ private readonly options;
19
+ constructor(options?: PolicyPluginOptions);
20
+ get id(): "policy";
21
+ get name(): string;
22
+ get description(): string;
23
+ get functions(): {
24
+ check: _$_zenstackhq_orm0.ZModelFunction<any>;
25
+ };
26
+ onKyselyQuery({
27
+ query,
28
+ client,
29
+ proceed
30
+ }: OnKyselyQueryArgs<SchemaDef>): Promise<_$kysely.QueryResult<any>>;
25
31
  }
26
-
32
+ //#endregion
27
33
  export { PolicyPlugin, type PolicyPluginOptions };
34
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,34 @@
1
+ import * as _$_zenstackhq_orm0 from "@zenstackhq/orm";
2
+ import { OnKyselyQueryArgs, RuntimePlugin } from "@zenstackhq/orm";
3
+ import * as _$kysely from "kysely";
4
+ import { SchemaDef } from "@zenstackhq/orm/schema";
5
+
6
+ //#region src/options.d.ts
7
+ type PolicyPluginOptions = {
8
+ /**
9
+ * Dangerously bypasses access-policy enforcement for raw SQL queries.
10
+ * Raw queries remain in the current transaction, but the policy plugin will
11
+ * not inspect or reject them.
12
+ */
13
+ dangerouslyAllowRawSql?: boolean;
14
+ };
15
+ //#endregion
16
+ //#region src/plugin.d.ts
17
+ declare class PolicyPlugin implements RuntimePlugin<SchemaDef, {}, {}, {}> {
18
+ private readonly options;
19
+ constructor(options?: PolicyPluginOptions);
20
+ get id(): "policy";
21
+ get name(): string;
22
+ get description(): string;
23
+ get functions(): {
24
+ check: _$_zenstackhq_orm0.ZModelFunction<any>;
25
+ };
26
+ onKyselyQuery({
27
+ query,
28
+ client,
29
+ proceed
30
+ }: OnKyselyQueryArgs<SchemaDef>): Promise<_$kysely.QueryResult<any>>;
31
+ }
32
+ //#endregion
33
+ export { PolicyPlugin, type PolicyPluginOptions };
34
+ //# sourceMappingURL=index.d.mts.map