Updated API Reports

Signed-off-by: Harry Hogg <hhogg@spotify.com>
This commit is contained in:
Harry Hogg
2022-10-11 12:32:26 +01:00
parent 3f25d863b0
commit 04db0e8afb
2 changed files with 9 additions and 21 deletions
+3 -15
View File
@@ -179,23 +179,11 @@ export type PermissionRule<
name: string;
description: string;
resourceType: TResourceType;
paramsSchema?: PermissionRuleSchema<TParams>;
apply(
resource: TResource,
params: NoInfer<z.input<PermissionRuleSchema<TParams>>>,
): boolean;
toQuery(
params: NoInfer<z.input<PermissionRuleSchema<TParams>>>,
): PermissionCriteria<TQuery>;
paramsSchema?: z.ZodSchema<TParams>;
apply(resource: TResource, params: NoInfer<TParams>): boolean;
toQuery(params: NoInfer<TParams>): PermissionCriteria<TQuery>;
};
// @public
export type PermissionRuleSchema<TParams> = z.ZodObject<{
[P in keyof TParams]-?: TParams[P] extends undefined
? z.ZodOptionalType<z.ZodType<TParams[P]>>
: z.ZodType<TParams[P]>;
}>;
// @public
export type PolicyQuery = {
permission: Permission;