@valentine-efagene/qshelter-common 2.0.88 → 2.0.90
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/generated/client/browser.d.ts +10 -2
- package/dist/generated/client/client.d.ts +10 -2
- package/dist/generated/client/commonInputTypes.d.ts +30 -0
- package/dist/generated/client/enums.d.ts +5 -0
- package/dist/generated/client/enums.js +4 -0
- package/dist/generated/client/internal/class.d.ts +11 -0
- package/dist/generated/client/internal/class.js +2 -2
- package/dist/generated/client/internal/prismaNamespace.d.ts +113 -16
- package/dist/generated/client/internal/prismaNamespace.js +38 -14
- package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +41 -15
- package/dist/generated/client/internal/prismaNamespaceBrowser.js +38 -14
- package/dist/generated/client/models/Permission.d.ts +333 -68
- package/dist/generated/client/models/Role.d.ts +403 -3
- package/dist/generated/client/models/Tenant.d.ts +761 -4
- package/dist/generated/client/models/TenantMembership.d.ts +1395 -0
- package/dist/generated/client/models/TenantMembership.js +1 -0
- package/dist/generated/client/models/User.d.ts +375 -0
- package/dist/generated/client/models/UserRole.d.ts +2 -1
- package/dist/generated/client/models/index.d.ts +1 -0
- package/dist/generated/client/models/index.js +1 -0
- package/dist/generated/client/models.d.ts +1 -0
- package/dist/src/events/policies/policy-event.d.ts +50 -5
- package/dist/src/events/policies/policy-event.js +4 -0
- package/dist/src/events/policies/policy-publisher.d.ts +13 -1
- package/dist/src/events/policies/policy-publisher.js +24 -0
- package/dist/src/prisma/tenant.js +13 -5
- package/package.json +1 -1
- package/prisma/migrations/20260111091027_rbac_redesign_federated_users/migration.sql +79 -0
- package/prisma/schema.prisma +84 -20
|
@@ -14,7 +14,8 @@ export type User = Prisma.UserModel;
|
|
|
14
14
|
export type Role = Prisma.RoleModel;
|
|
15
15
|
/**
|
|
16
16
|
* Model Permission
|
|
17
|
-
*
|
|
17
|
+
* Permission defines a path pattern + HTTP methods + effect
|
|
18
|
+
* Supports path-based authorization matching the authorizer's policy structure
|
|
18
19
|
*/
|
|
19
20
|
export type Permission = Prisma.PermissionModel;
|
|
20
21
|
/**
|
|
@@ -24,9 +25,16 @@ export type Permission = Prisma.PermissionModel;
|
|
|
24
25
|
export type RolePermission = Prisma.RolePermissionModel;
|
|
25
26
|
/**
|
|
26
27
|
* Model UserRole
|
|
27
|
-
*
|
|
28
|
+
* Legacy: Direct user-role assignment (global, not tenant-scoped)
|
|
29
|
+
* @deprecated Use TenantMembership for tenant-scoped role assignments
|
|
28
30
|
*/
|
|
29
31
|
export type UserRole = Prisma.UserRoleModel;
|
|
32
|
+
/**
|
|
33
|
+
* Model TenantMembership
|
|
34
|
+
* Tenant Membership: Links users to tenants with specific roles
|
|
35
|
+
* Enables federated users across multiple tenants with different roles per tenant
|
|
36
|
+
*/
|
|
37
|
+
export type TenantMembership = Prisma.TenantMembershipModel;
|
|
30
38
|
/**
|
|
31
39
|
* Model Tenant
|
|
32
40
|
*
|
|
@@ -31,7 +31,8 @@ export type User = Prisma.UserModel;
|
|
|
31
31
|
export type Role = Prisma.RoleModel;
|
|
32
32
|
/**
|
|
33
33
|
* Model Permission
|
|
34
|
-
*
|
|
34
|
+
* Permission defines a path pattern + HTTP methods + effect
|
|
35
|
+
* Supports path-based authorization matching the authorizer's policy structure
|
|
35
36
|
*/
|
|
36
37
|
export type Permission = Prisma.PermissionModel;
|
|
37
38
|
/**
|
|
@@ -41,9 +42,16 @@ export type Permission = Prisma.PermissionModel;
|
|
|
41
42
|
export type RolePermission = Prisma.RolePermissionModel;
|
|
42
43
|
/**
|
|
43
44
|
* Model UserRole
|
|
44
|
-
*
|
|
45
|
+
* Legacy: Direct user-role assignment (global, not tenant-scoped)
|
|
46
|
+
* @deprecated Use TenantMembership for tenant-scoped role assignments
|
|
45
47
|
*/
|
|
46
48
|
export type UserRole = Prisma.UserRoleModel;
|
|
49
|
+
/**
|
|
50
|
+
* Model TenantMembership
|
|
51
|
+
* Tenant Membership: Links users to tenants with specific roles
|
|
52
|
+
* Enables federated users across multiple tenants with different roles per tenant
|
|
53
|
+
*/
|
|
54
|
+
export type TenantMembership = Prisma.TenantMembershipModel;
|
|
47
55
|
/**
|
|
48
56
|
* Model Tenant
|
|
49
57
|
*
|
|
@@ -141,6 +141,12 @@ export type JsonFilterBase<$PrismaModel = never> = {
|
|
|
141
141
|
gte?: runtime.InputJsonValue;
|
|
142
142
|
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter;
|
|
143
143
|
};
|
|
144
|
+
export type EnumPermissionEffectFilter<$PrismaModel = never> = {
|
|
145
|
+
equals?: $Enums.PermissionEffect | Prisma.EnumPermissionEffectFieldRefInput<$PrismaModel>;
|
|
146
|
+
in?: $Enums.PermissionEffect[];
|
|
147
|
+
notIn?: $Enums.PermissionEffect[];
|
|
148
|
+
not?: Prisma.NestedEnumPermissionEffectFilter<$PrismaModel> | $Enums.PermissionEffect;
|
|
149
|
+
};
|
|
144
150
|
export type JsonWithAggregatesFilter<$PrismaModel = never> = Prisma.PatchUndefined<Prisma.Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>, Required<JsonWithAggregatesFilterBase<$PrismaModel>>> | Prisma.OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>;
|
|
145
151
|
export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
|
146
152
|
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter;
|
|
@@ -161,6 +167,15 @@ export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
|
|
161
167
|
_min?: Prisma.NestedJsonFilter<$PrismaModel>;
|
|
162
168
|
_max?: Prisma.NestedJsonFilter<$PrismaModel>;
|
|
163
169
|
};
|
|
170
|
+
export type EnumPermissionEffectWithAggregatesFilter<$PrismaModel = never> = {
|
|
171
|
+
equals?: $Enums.PermissionEffect | Prisma.EnumPermissionEffectFieldRefInput<$PrismaModel>;
|
|
172
|
+
in?: $Enums.PermissionEffect[];
|
|
173
|
+
notIn?: $Enums.PermissionEffect[];
|
|
174
|
+
not?: Prisma.NestedEnumPermissionEffectWithAggregatesFilter<$PrismaModel> | $Enums.PermissionEffect;
|
|
175
|
+
_count?: Prisma.NestedIntFilter<$PrismaModel>;
|
|
176
|
+
_min?: Prisma.NestedEnumPermissionEffectFilter<$PrismaModel>;
|
|
177
|
+
_max?: Prisma.NestedEnumPermissionEffectFilter<$PrismaModel>;
|
|
178
|
+
};
|
|
164
179
|
export type FloatFilter<$PrismaModel = never> = {
|
|
165
180
|
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel>;
|
|
166
181
|
in?: number[];
|
|
@@ -958,6 +973,12 @@ export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
|
958
973
|
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>;
|
|
959
974
|
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>;
|
|
960
975
|
};
|
|
976
|
+
export type NestedEnumPermissionEffectFilter<$PrismaModel = never> = {
|
|
977
|
+
equals?: $Enums.PermissionEffect | Prisma.EnumPermissionEffectFieldRefInput<$PrismaModel>;
|
|
978
|
+
in?: $Enums.PermissionEffect[];
|
|
979
|
+
notIn?: $Enums.PermissionEffect[];
|
|
980
|
+
not?: Prisma.NestedEnumPermissionEffectFilter<$PrismaModel> | $Enums.PermissionEffect;
|
|
981
|
+
};
|
|
961
982
|
export type NestedJsonFilter<$PrismaModel = never> = Prisma.PatchUndefined<Prisma.Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>, Required<NestedJsonFilterBase<$PrismaModel>>> | Prisma.OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>;
|
|
962
983
|
export type NestedJsonFilterBase<$PrismaModel = never> = {
|
|
963
984
|
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter;
|
|
@@ -975,6 +996,15 @@ export type NestedJsonFilterBase<$PrismaModel = never> = {
|
|
|
975
996
|
gte?: runtime.InputJsonValue;
|
|
976
997
|
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter;
|
|
977
998
|
};
|
|
999
|
+
export type NestedEnumPermissionEffectWithAggregatesFilter<$PrismaModel = never> = {
|
|
1000
|
+
equals?: $Enums.PermissionEffect | Prisma.EnumPermissionEffectFieldRefInput<$PrismaModel>;
|
|
1001
|
+
in?: $Enums.PermissionEffect[];
|
|
1002
|
+
notIn?: $Enums.PermissionEffect[];
|
|
1003
|
+
not?: Prisma.NestedEnumPermissionEffectWithAggregatesFilter<$PrismaModel> | $Enums.PermissionEffect;
|
|
1004
|
+
_count?: Prisma.NestedIntFilter<$PrismaModel>;
|
|
1005
|
+
_min?: Prisma.NestedEnumPermissionEffectFilter<$PrismaModel>;
|
|
1006
|
+
_max?: Prisma.NestedEnumPermissionEffectFilter<$PrismaModel>;
|
|
1007
|
+
};
|
|
978
1008
|
export type NestedFloatFilter<$PrismaModel = never> = {
|
|
979
1009
|
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel>;
|
|
980
1010
|
in?: number[];
|
|
@@ -250,6 +250,11 @@ export declare const ExecutionStatus: {
|
|
|
250
250
|
readonly SKIPPED: "SKIPPED";
|
|
251
251
|
};
|
|
252
252
|
export type ExecutionStatus = (typeof ExecutionStatus)[keyof typeof ExecutionStatus];
|
|
253
|
+
export declare const PermissionEffect: {
|
|
254
|
+
readonly ALLOW: "ALLOW";
|
|
255
|
+
readonly DENY: "DENY";
|
|
256
|
+
};
|
|
257
|
+
export type PermissionEffect = (typeof PermissionEffect)[keyof typeof PermissionEffect];
|
|
253
258
|
export declare const FieldType: {
|
|
254
259
|
readonly TEXT: "TEXT";
|
|
255
260
|
readonly TEXTAREA: "TEXTAREA";
|
|
@@ -166,6 +166,17 @@ export interface PrismaClient<in LogOpts extends Prisma.LogLevel = never, in out
|
|
|
166
166
|
get userRole(): Prisma.UserRoleDelegate<ExtArgs, {
|
|
167
167
|
omit: OmitOpts;
|
|
168
168
|
}>;
|
|
169
|
+
/**
|
|
170
|
+
* `prisma.tenantMembership`: Exposes CRUD operations for the **TenantMembership** model.
|
|
171
|
+
* Example usage:
|
|
172
|
+
* ```ts
|
|
173
|
+
* // Fetch zero or more TenantMemberships
|
|
174
|
+
* const tenantMemberships = await prisma.tenantMembership.findMany()
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
get tenantMembership(): Prisma.TenantMembershipDelegate<ExtArgs, {
|
|
178
|
+
omit: OmitOpts;
|
|
179
|
+
}>;
|
|
169
180
|
/**
|
|
170
181
|
* `prisma.tenant`: Exposes CRUD operations for the **Tenant** model.
|
|
171
182
|
* Example usage:
|