@cerbos/orm-prisma 2.0.0-alpha.1 → 2.0.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/lib/index.d.ts CHANGED
@@ -19,10 +19,12 @@ export interface QueryPlanToPrismaArgs {
19
19
  queryPlan: PlanResourcesResponse;
20
20
  mapper?: Mapper;
21
21
  }
22
- export interface QueryPlanToPrismaResult {
23
- kind: PlanKind;
24
- filters?: Record<string, any>;
25
- }
22
+ export type QueryPlanToPrismaResult = {
23
+ kind: PlanKind.ALWAYS_ALLOWED | PlanKind.ALWAYS_DENIED;
24
+ } | {
25
+ kind: PlanKind.CONDITIONAL;
26
+ filters: Record<string, any>;
27
+ };
26
28
  /**
27
29
  * Converts a Cerbos query plan to a Prisma filter.
28
30
  * @param {QueryPlanToPrismaArgs} args - The arguments containing the query plan and mapper.