@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.cjs +1374 -1948
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -21
- package/dist/index.d.mts +34 -0
- package/dist/index.mjs +1421 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +12 -11
- package/dist/index.d.ts +0 -27
- package/dist/index.js +0 -1971
- package/dist/index.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { SchemaDef } from
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
package/dist/index.d.mts
ADDED
|
@@ -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
|