diff --git a/packages/access/src/structs.ts b/packages/access/src/structs.ts index f2c175b..444f206 100644 --- a/packages/access/src/structs.ts +++ b/packages/access/src/structs.ts @@ -80,7 +80,8 @@ export const SchemaStruct = nonempty(array(RoleStruct)); export type Action = Infer; export type Attributes = Infer; export type ConditionMethod = (typeof siftMethods)[number]; -export type Condition = Record; +export type ConditionMethodRecord = { [key in ConditionMethod]?: any }; +export type Condition = Record; export type Conditions = Infer; export type Resource = Infer; export type Role = Infer; diff --git a/packages/access/src/types.ts b/packages/access/src/types.ts index 6ce00c0..eb0931c 100644 --- a/packages/access/src/types.ts +++ b/packages/access/src/types.ts @@ -12,7 +12,7 @@ type FixedLengthArray = Pick | Record[]; +export type Conditions = FixedLengthArray<['*']> | Condition[]; export interface Dict { [key: string]: any;