authula 0.3.1 → 0.3.3
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/README.md +25 -14
- package/dist/plugins/index.cjs +158 -0
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.d.cts +210 -1
- package/dist/plugins/index.d.ts +210 -1
- package/dist/plugins/index.js +150 -1
- package/dist/plugins/index.js.map +1 -1
- package/package.json +6 -5
package/dist/plugins/index.d.cts
CHANGED
|
@@ -250,6 +250,215 @@ declare class AdminPlugin implements Plugin {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
|
+
//#region src/plugins/access-control/types.d.ts
|
|
254
|
+
declare const roleSchema: z.ZodObject<{
|
|
255
|
+
id: z.ZodString;
|
|
256
|
+
name: z.ZodString;
|
|
257
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
|
+
weight: z.ZodNumber;
|
|
259
|
+
isSystem: z.ZodBoolean;
|
|
260
|
+
createdAt: z.ZodISODateTime;
|
|
261
|
+
updatedAt: z.ZodISODateTime;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
type Role = z.infer<typeof roleSchema>;
|
|
264
|
+
declare const permissionSchema: z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
key: z.ZodString;
|
|
267
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
|
+
isSystem: z.ZodBoolean;
|
|
269
|
+
createdAt: z.ZodISODateTime;
|
|
270
|
+
updatedAt: z.ZodISODateTime;
|
|
271
|
+
}, z.core.$strip>;
|
|
272
|
+
type Permission = z.infer<typeof permissionSchema>;
|
|
273
|
+
declare const permissionGrantSourceSchema: z.ZodObject<{
|
|
274
|
+
roleId: z.ZodString;
|
|
275
|
+
roleName: z.ZodString;
|
|
276
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
type PermissionGrantSource = z.infer<typeof permissionGrantSourceSchema>;
|
|
280
|
+
declare const userPermissionInfoSchema: z.ZodObject<{
|
|
281
|
+
permissionId: z.ZodString;
|
|
282
|
+
permissionKey: z.ZodString;
|
|
283
|
+
permissionDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
285
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
286
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
|
+
roleId: z.ZodString;
|
|
288
|
+
roleName: z.ZodString;
|
|
289
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
290
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
291
|
+
}, z.core.$strip>>>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
type UserPermissionInfo = z.infer<typeof userPermissionInfoSchema>;
|
|
294
|
+
declare const userRoleInfoSchema: z.ZodObject<{
|
|
295
|
+
roleId: z.ZodString;
|
|
296
|
+
roleName: z.ZodString;
|
|
297
|
+
roleDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
+
assignedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
|
+
assignedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
300
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
type UserRoleInfo = z.infer<typeof userRoleInfoSchema>;
|
|
303
|
+
declare const roleDetailsSchema: z.ZodObject<{
|
|
304
|
+
role: z.ZodObject<{
|
|
305
|
+
id: z.ZodString;
|
|
306
|
+
name: z.ZodString;
|
|
307
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
308
|
+
weight: z.ZodNumber;
|
|
309
|
+
isSystem: z.ZodBoolean;
|
|
310
|
+
createdAt: z.ZodISODateTime;
|
|
311
|
+
updatedAt: z.ZodISODateTime;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
314
|
+
permissionId: z.ZodString;
|
|
315
|
+
permissionKey: z.ZodString;
|
|
316
|
+
permissionDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
318
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
319
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
|
+
roleId: z.ZodString;
|
|
321
|
+
roleName: z.ZodString;
|
|
322
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
323
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
324
|
+
}, z.core.$strip>>>;
|
|
325
|
+
}, z.core.$strip>>;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
type RoleDetails = z.infer<typeof roleDetailsSchema>;
|
|
328
|
+
declare const getUserPermissionsResponseSchema: z.ZodObject<{
|
|
329
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
330
|
+
permissionId: z.ZodString;
|
|
331
|
+
permissionKey: z.ZodString;
|
|
332
|
+
permissionDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
335
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
336
|
+
roleId: z.ZodString;
|
|
337
|
+
roleName: z.ZodString;
|
|
338
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
340
|
+
}, z.core.$strip>>>;
|
|
341
|
+
}, z.core.$strip>>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
type GetUserPermissionsResponse = z.infer<typeof getUserPermissionsResponseSchema>;
|
|
344
|
+
declare const checkUserPermissionsResponseSchema: z.ZodObject<{
|
|
345
|
+
hasPermissions: z.ZodBoolean;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
type CheckUserPermissionsResponse = z.infer<typeof checkUserPermissionsResponseSchema>;
|
|
348
|
+
type CreateRoleRequest = {
|
|
349
|
+
name: string;
|
|
350
|
+
description?: string | null;
|
|
351
|
+
weight?: number;
|
|
352
|
+
isSystem: boolean;
|
|
353
|
+
};
|
|
354
|
+
type CreateRoleResponse = {
|
|
355
|
+
role: Role;
|
|
356
|
+
};
|
|
357
|
+
type UpdateRoleRequest = {
|
|
358
|
+
name?: string | null;
|
|
359
|
+
description?: string | null;
|
|
360
|
+
weight?: number;
|
|
361
|
+
};
|
|
362
|
+
type UpdateRoleResponse = {
|
|
363
|
+
role: Role;
|
|
364
|
+
};
|
|
365
|
+
type DeleteRoleResponse = {
|
|
366
|
+
message: string;
|
|
367
|
+
};
|
|
368
|
+
type CreatePermissionRequest = {
|
|
369
|
+
key: string;
|
|
370
|
+
description?: string | null;
|
|
371
|
+
isSystem: boolean;
|
|
372
|
+
};
|
|
373
|
+
type CreatePermissionResponse = {
|
|
374
|
+
permission: Permission;
|
|
375
|
+
};
|
|
376
|
+
type UpdatePermissionRequest = {
|
|
377
|
+
description?: string | null;
|
|
378
|
+
};
|
|
379
|
+
type UpdatePermissionResponse = {
|
|
380
|
+
permission: Permission;
|
|
381
|
+
};
|
|
382
|
+
type DeletePermissionResponse = {
|
|
383
|
+
message: string;
|
|
384
|
+
};
|
|
385
|
+
type AddRolePermissionRequest = {
|
|
386
|
+
permissionId: string;
|
|
387
|
+
};
|
|
388
|
+
type AddRolePermissionResponse = {
|
|
389
|
+
message: string;
|
|
390
|
+
};
|
|
391
|
+
type ReplaceRolePermissionsRequest = {
|
|
392
|
+
permissionIds: string[];
|
|
393
|
+
};
|
|
394
|
+
type ReplaceRolePermissionResponse = {
|
|
395
|
+
message: string;
|
|
396
|
+
};
|
|
397
|
+
type RemoveRolePermissionResponse = {
|
|
398
|
+
message: string;
|
|
399
|
+
};
|
|
400
|
+
type AssignUserRoleRequest = {
|
|
401
|
+
roleId: string;
|
|
402
|
+
expiresAt?: string | null;
|
|
403
|
+
};
|
|
404
|
+
type ReplaceUserRolesRequest = {
|
|
405
|
+
roleIds: string[];
|
|
406
|
+
};
|
|
407
|
+
type ReplaceUserRolesResponse = {
|
|
408
|
+
message: string;
|
|
409
|
+
};
|
|
410
|
+
type AssignUserRoleResponse = {
|
|
411
|
+
message: string;
|
|
412
|
+
};
|
|
413
|
+
type RemoveUserRoleResponse = {
|
|
414
|
+
message: string;
|
|
415
|
+
};
|
|
416
|
+
type CheckUserPermissionsRequest = {
|
|
417
|
+
permissionKeys: string[];
|
|
418
|
+
};
|
|
419
|
+
type UserWithPermissions = {
|
|
420
|
+
user: User;
|
|
421
|
+
permissions: UserPermissionInfo[];
|
|
422
|
+
};
|
|
423
|
+
type UserAuthorizationProfile = {
|
|
424
|
+
user: User;
|
|
425
|
+
roles: UserRoleInfo[];
|
|
426
|
+
permissions: UserPermissionInfo[];
|
|
427
|
+
};
|
|
428
|
+
type UserWithRoles = {
|
|
429
|
+
user: User;
|
|
430
|
+
roles: UserRoleInfo[];
|
|
431
|
+
};
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region src/plugins/access-control/plugin.d.ts
|
|
434
|
+
declare class AccessControlPlugin implements Plugin {
|
|
435
|
+
readonly id = "accessControl";
|
|
436
|
+
constructor();
|
|
437
|
+
init(client: AuthulaClient): {
|
|
438
|
+
createRole: (data: CreateRoleRequest) => Promise<CreateRoleResponse>;
|
|
439
|
+
getAllRoles: () => Promise<Role[]>;
|
|
440
|
+
getRoleByName: (roleName: string) => Promise<Role>;
|
|
441
|
+
getRoleById: (roleId: string) => Promise<RoleDetails>;
|
|
442
|
+
updateRole: (roleId: string, data: UpdateRoleRequest) => Promise<UpdateRoleResponse>;
|
|
443
|
+
deleteRole: (roleId: string) => Promise<DeleteRoleResponse>;
|
|
444
|
+
createPermission: (data: CreatePermissionRequest) => Promise<CreatePermissionResponse>;
|
|
445
|
+
getAllPermissions: () => Promise<Permission[]>;
|
|
446
|
+
getPermissionById: (permissionId: string) => Promise<Permission>;
|
|
447
|
+
updatePermission: (permissionId: string, data: UpdatePermissionRequest) => Promise<UpdatePermissionResponse>;
|
|
448
|
+
deletePermission: (permissionId: string) => Promise<DeletePermissionResponse>;
|
|
449
|
+
addRolePermission: (roleId: string, data: AddRolePermissionRequest) => Promise<AddRolePermissionResponse>;
|
|
450
|
+
getRolePermissions: (roleId: string) => Promise<UserPermissionInfo[]>;
|
|
451
|
+
replaceRolePermissions: (roleId: string, data: ReplaceRolePermissionsRequest) => Promise<ReplaceRolePermissionResponse>;
|
|
452
|
+
removeRolePermission: (roleId: string, permissionId: string) => Promise<RemoveRolePermissionResponse>;
|
|
453
|
+
getUserRoles: (userId: string) => Promise<UserRoleInfo[]>;
|
|
454
|
+
assignUserRole: (userId: string, data: AssignUserRoleRequest) => Promise<AssignUserRoleResponse>;
|
|
455
|
+
replaceUserRoles: (userId: string, data: ReplaceUserRolesRequest) => Promise<ReplaceUserRolesResponse>;
|
|
456
|
+
removeUserRole: (userId: string, roleId: string) => Promise<RemoveUserRoleResponse>;
|
|
457
|
+
getUserPermissions: (userId: string) => Promise<GetUserPermissionsResponse>;
|
|
458
|
+
checkUserPermissions: (userId: string, data: CheckUserPermissionsRequest) => Promise<CheckUserPermissionsResponse>;
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
253
462
|
//#region src/plugins/bearer/types.d.ts
|
|
254
463
|
type BearerPluginOptions = {
|
|
255
464
|
headerName?: string;
|
|
@@ -457,5 +666,5 @@ declare class TOTPPlugin implements Plugin {
|
|
|
457
666
|
};
|
|
458
667
|
}
|
|
459
668
|
//#endregion
|
|
460
|
-
export { AdminPlugin, AdminSessionState, AdminUserSession, AdminUserState, BanUserRequest, BanUserResponse, BearerPlugin, BearerPluginOptions, CSRFPlugin, CSRFPluginOptions, ChangePasswordRequest, CreateAccountRequest, CreateAccountResponse, CreateSessionStateRequest, CreateSessionStateResponse, CreateUserRequest, CreateUserResponse, CreateUserStateRequest, CreateUserStateResponse, DeleteAccountResponse, DeleteSessionStateResponse, DeleteUserResponse, DeleteUserStateResponse, DisableResponse, EmailPasswordPlugin, EnableResponse, GenerateBackupCodesResponse, GetAccountByIdResponse, GetAllImpersonationsResponse, GetAllUsersResponse, GetBannedUserStatesResponse, GetImpersonationByIdResponse, GetRevokedSessionStatesResponse, GetSessionStateResponse, GetTOTPURIResponse, GetUserAccountsResponse, GetUserAdminSessionsResponse, GetUserByIdResponse, GetUserStateResponse, Impersonation, JWKSKey, JWTAlgorithm, JWTPlugin, JWTTokensResponse, MagicLinkExchangeRequest, MagicLinkPlugin, MagicLinkSignInRequest, MagicLinkSignInResponse, MagicLinkVerifyRequest, MagicLinkVerifyResponse, OAuth2Plugin, OAuth2ProviderType, RequestEmailChangeRequest, RequestPasswordResetRequest, RevokeSessionRequest, RevokeSessionResponse, SendEmailVerificationRequest, SignInRequest, SignInWithOAuth2Request, SignInWithOAuth2Response, SignUpRequest, StartImpersonationRequest, StartImpersonationResponse, StopImpersonationResponse, TOTPPlugin, TokenRefreshRequest, TokenRefreshResponse, UnbanUserResponse, UpdateAccountRequest, UpdateAccountResponse, UpdateSessionStateRequest, UpdateSessionStateResponse, UpdateUserRequest, UpdateUserResponse, UpdateUserStateRequest, UpdateUserStateResponse, VerifyBackupCodeRequest, VerifyBackupCodeResponse, VerifyEmailRequest, VerifyTOTPRequest, VerifyTOTPResponse, adminSessionStateSchema, adminUserSessionSchema, adminUserStateSchema, impersonationSchema };
|
|
669
|
+
export { AccessControlPlugin, AddRolePermissionRequest, AddRolePermissionResponse, AdminPlugin, AdminSessionState, AdminUserSession, AdminUserState, AssignUserRoleRequest, AssignUserRoleResponse, BanUserRequest, BanUserResponse, BearerPlugin, BearerPluginOptions, CSRFPlugin, CSRFPluginOptions, ChangePasswordRequest, CheckUserPermissionsRequest, CheckUserPermissionsResponse, CreateAccountRequest, CreateAccountResponse, CreatePermissionRequest, CreatePermissionResponse, CreateRoleRequest, CreateRoleResponse, CreateSessionStateRequest, CreateSessionStateResponse, CreateUserRequest, CreateUserResponse, CreateUserStateRequest, CreateUserStateResponse, DeleteAccountResponse, DeletePermissionResponse, DeleteRoleResponse, DeleteSessionStateResponse, DeleteUserResponse, DeleteUserStateResponse, DisableResponse, EmailPasswordPlugin, EnableResponse, GenerateBackupCodesResponse, GetAccountByIdResponse, GetAllImpersonationsResponse, GetAllUsersResponse, GetBannedUserStatesResponse, GetImpersonationByIdResponse, GetRevokedSessionStatesResponse, GetSessionStateResponse, GetTOTPURIResponse, GetUserAccountsResponse, GetUserAdminSessionsResponse, GetUserByIdResponse, GetUserPermissionsResponse, GetUserStateResponse, Impersonation, JWKSKey, JWTAlgorithm, JWTPlugin, JWTTokensResponse, MagicLinkExchangeRequest, MagicLinkPlugin, MagicLinkSignInRequest, MagicLinkSignInResponse, MagicLinkVerifyRequest, MagicLinkVerifyResponse, OAuth2Plugin, OAuth2ProviderType, Permission, PermissionGrantSource, RemoveRolePermissionResponse, RemoveUserRoleResponse, ReplaceRolePermissionResponse, ReplaceRolePermissionsRequest, ReplaceUserRolesRequest, ReplaceUserRolesResponse, RequestEmailChangeRequest, RequestPasswordResetRequest, RevokeSessionRequest, RevokeSessionResponse, Role, RoleDetails, SendEmailVerificationRequest, SignInRequest, SignInWithOAuth2Request, SignInWithOAuth2Response, SignUpRequest, StartImpersonationRequest, StartImpersonationResponse, StopImpersonationResponse, TOTPPlugin, TokenRefreshRequest, TokenRefreshResponse, UnbanUserResponse, UpdateAccountRequest, UpdateAccountResponse, UpdatePermissionRequest, UpdatePermissionResponse, UpdateRoleRequest, UpdateRoleResponse, UpdateSessionStateRequest, UpdateSessionStateResponse, UpdateUserRequest, UpdateUserResponse, UpdateUserStateRequest, UpdateUserStateResponse, UserAuthorizationProfile, UserPermissionInfo, UserRoleInfo, UserWithPermissions, UserWithRoles, VerifyBackupCodeRequest, VerifyBackupCodeResponse, VerifyEmailRequest, VerifyTOTPRequest, VerifyTOTPResponse, adminSessionStateSchema, adminUserSessionSchema, adminUserStateSchema, checkUserPermissionsResponseSchema, getUserPermissionsResponseSchema, impersonationSchema, permissionGrantSourceSchema, permissionSchema, roleDetailsSchema, roleSchema, userPermissionInfoSchema, userRoleInfoSchema };
|
|
461
670
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -250,6 +250,215 @@ declare class AdminPlugin implements Plugin {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
|
+
//#region src/plugins/access-control/types.d.ts
|
|
254
|
+
declare const roleSchema: z.ZodObject<{
|
|
255
|
+
id: z.ZodString;
|
|
256
|
+
name: z.ZodString;
|
|
257
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
|
+
weight: z.ZodNumber;
|
|
259
|
+
isSystem: z.ZodBoolean;
|
|
260
|
+
createdAt: z.ZodISODateTime;
|
|
261
|
+
updatedAt: z.ZodISODateTime;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
type Role = z.infer<typeof roleSchema>;
|
|
264
|
+
declare const permissionSchema: z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
key: z.ZodString;
|
|
267
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
|
+
isSystem: z.ZodBoolean;
|
|
269
|
+
createdAt: z.ZodISODateTime;
|
|
270
|
+
updatedAt: z.ZodISODateTime;
|
|
271
|
+
}, z.core.$strip>;
|
|
272
|
+
type Permission = z.infer<typeof permissionSchema>;
|
|
273
|
+
declare const permissionGrantSourceSchema: z.ZodObject<{
|
|
274
|
+
roleId: z.ZodString;
|
|
275
|
+
roleName: z.ZodString;
|
|
276
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
type PermissionGrantSource = z.infer<typeof permissionGrantSourceSchema>;
|
|
280
|
+
declare const userPermissionInfoSchema: z.ZodObject<{
|
|
281
|
+
permissionId: z.ZodString;
|
|
282
|
+
permissionKey: z.ZodString;
|
|
283
|
+
permissionDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
285
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
286
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
|
+
roleId: z.ZodString;
|
|
288
|
+
roleName: z.ZodString;
|
|
289
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
290
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
291
|
+
}, z.core.$strip>>>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
type UserPermissionInfo = z.infer<typeof userPermissionInfoSchema>;
|
|
294
|
+
declare const userRoleInfoSchema: z.ZodObject<{
|
|
295
|
+
roleId: z.ZodString;
|
|
296
|
+
roleName: z.ZodString;
|
|
297
|
+
roleDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
+
assignedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
|
+
assignedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
300
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
type UserRoleInfo = z.infer<typeof userRoleInfoSchema>;
|
|
303
|
+
declare const roleDetailsSchema: z.ZodObject<{
|
|
304
|
+
role: z.ZodObject<{
|
|
305
|
+
id: z.ZodString;
|
|
306
|
+
name: z.ZodString;
|
|
307
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
308
|
+
weight: z.ZodNumber;
|
|
309
|
+
isSystem: z.ZodBoolean;
|
|
310
|
+
createdAt: z.ZodISODateTime;
|
|
311
|
+
updatedAt: z.ZodISODateTime;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
314
|
+
permissionId: z.ZodString;
|
|
315
|
+
permissionKey: z.ZodString;
|
|
316
|
+
permissionDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
318
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
319
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
|
+
roleId: z.ZodString;
|
|
321
|
+
roleName: z.ZodString;
|
|
322
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
323
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
324
|
+
}, z.core.$strip>>>;
|
|
325
|
+
}, z.core.$strip>>;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
type RoleDetails = z.infer<typeof roleDetailsSchema>;
|
|
328
|
+
declare const getUserPermissionsResponseSchema: z.ZodObject<{
|
|
329
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
330
|
+
permissionId: z.ZodString;
|
|
331
|
+
permissionKey: z.ZodString;
|
|
332
|
+
permissionDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
335
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
336
|
+
roleId: z.ZodString;
|
|
337
|
+
roleName: z.ZodString;
|
|
338
|
+
grantedByUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
|
+
grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
340
|
+
}, z.core.$strip>>>;
|
|
341
|
+
}, z.core.$strip>>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
type GetUserPermissionsResponse = z.infer<typeof getUserPermissionsResponseSchema>;
|
|
344
|
+
declare const checkUserPermissionsResponseSchema: z.ZodObject<{
|
|
345
|
+
hasPermissions: z.ZodBoolean;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
type CheckUserPermissionsResponse = z.infer<typeof checkUserPermissionsResponseSchema>;
|
|
348
|
+
type CreateRoleRequest = {
|
|
349
|
+
name: string;
|
|
350
|
+
description?: string | null;
|
|
351
|
+
weight?: number;
|
|
352
|
+
isSystem: boolean;
|
|
353
|
+
};
|
|
354
|
+
type CreateRoleResponse = {
|
|
355
|
+
role: Role;
|
|
356
|
+
};
|
|
357
|
+
type UpdateRoleRequest = {
|
|
358
|
+
name?: string | null;
|
|
359
|
+
description?: string | null;
|
|
360
|
+
weight?: number;
|
|
361
|
+
};
|
|
362
|
+
type UpdateRoleResponse = {
|
|
363
|
+
role: Role;
|
|
364
|
+
};
|
|
365
|
+
type DeleteRoleResponse = {
|
|
366
|
+
message: string;
|
|
367
|
+
};
|
|
368
|
+
type CreatePermissionRequest = {
|
|
369
|
+
key: string;
|
|
370
|
+
description?: string | null;
|
|
371
|
+
isSystem: boolean;
|
|
372
|
+
};
|
|
373
|
+
type CreatePermissionResponse = {
|
|
374
|
+
permission: Permission;
|
|
375
|
+
};
|
|
376
|
+
type UpdatePermissionRequest = {
|
|
377
|
+
description?: string | null;
|
|
378
|
+
};
|
|
379
|
+
type UpdatePermissionResponse = {
|
|
380
|
+
permission: Permission;
|
|
381
|
+
};
|
|
382
|
+
type DeletePermissionResponse = {
|
|
383
|
+
message: string;
|
|
384
|
+
};
|
|
385
|
+
type AddRolePermissionRequest = {
|
|
386
|
+
permissionId: string;
|
|
387
|
+
};
|
|
388
|
+
type AddRolePermissionResponse = {
|
|
389
|
+
message: string;
|
|
390
|
+
};
|
|
391
|
+
type ReplaceRolePermissionsRequest = {
|
|
392
|
+
permissionIds: string[];
|
|
393
|
+
};
|
|
394
|
+
type ReplaceRolePermissionResponse = {
|
|
395
|
+
message: string;
|
|
396
|
+
};
|
|
397
|
+
type RemoveRolePermissionResponse = {
|
|
398
|
+
message: string;
|
|
399
|
+
};
|
|
400
|
+
type AssignUserRoleRequest = {
|
|
401
|
+
roleId: string;
|
|
402
|
+
expiresAt?: string | null;
|
|
403
|
+
};
|
|
404
|
+
type ReplaceUserRolesRequest = {
|
|
405
|
+
roleIds: string[];
|
|
406
|
+
};
|
|
407
|
+
type ReplaceUserRolesResponse = {
|
|
408
|
+
message: string;
|
|
409
|
+
};
|
|
410
|
+
type AssignUserRoleResponse = {
|
|
411
|
+
message: string;
|
|
412
|
+
};
|
|
413
|
+
type RemoveUserRoleResponse = {
|
|
414
|
+
message: string;
|
|
415
|
+
};
|
|
416
|
+
type CheckUserPermissionsRequest = {
|
|
417
|
+
permissionKeys: string[];
|
|
418
|
+
};
|
|
419
|
+
type UserWithPermissions = {
|
|
420
|
+
user: User;
|
|
421
|
+
permissions: UserPermissionInfo[];
|
|
422
|
+
};
|
|
423
|
+
type UserAuthorizationProfile = {
|
|
424
|
+
user: User;
|
|
425
|
+
roles: UserRoleInfo[];
|
|
426
|
+
permissions: UserPermissionInfo[];
|
|
427
|
+
};
|
|
428
|
+
type UserWithRoles = {
|
|
429
|
+
user: User;
|
|
430
|
+
roles: UserRoleInfo[];
|
|
431
|
+
};
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region src/plugins/access-control/plugin.d.ts
|
|
434
|
+
declare class AccessControlPlugin implements Plugin {
|
|
435
|
+
readonly id = "accessControl";
|
|
436
|
+
constructor();
|
|
437
|
+
init(client: AuthulaClient): {
|
|
438
|
+
createRole: (data: CreateRoleRequest) => Promise<CreateRoleResponse>;
|
|
439
|
+
getAllRoles: () => Promise<Role[]>;
|
|
440
|
+
getRoleByName: (roleName: string) => Promise<Role>;
|
|
441
|
+
getRoleById: (roleId: string) => Promise<RoleDetails>;
|
|
442
|
+
updateRole: (roleId: string, data: UpdateRoleRequest) => Promise<UpdateRoleResponse>;
|
|
443
|
+
deleteRole: (roleId: string) => Promise<DeleteRoleResponse>;
|
|
444
|
+
createPermission: (data: CreatePermissionRequest) => Promise<CreatePermissionResponse>;
|
|
445
|
+
getAllPermissions: () => Promise<Permission[]>;
|
|
446
|
+
getPermissionById: (permissionId: string) => Promise<Permission>;
|
|
447
|
+
updatePermission: (permissionId: string, data: UpdatePermissionRequest) => Promise<UpdatePermissionResponse>;
|
|
448
|
+
deletePermission: (permissionId: string) => Promise<DeletePermissionResponse>;
|
|
449
|
+
addRolePermission: (roleId: string, data: AddRolePermissionRequest) => Promise<AddRolePermissionResponse>;
|
|
450
|
+
getRolePermissions: (roleId: string) => Promise<UserPermissionInfo[]>;
|
|
451
|
+
replaceRolePermissions: (roleId: string, data: ReplaceRolePermissionsRequest) => Promise<ReplaceRolePermissionResponse>;
|
|
452
|
+
removeRolePermission: (roleId: string, permissionId: string) => Promise<RemoveRolePermissionResponse>;
|
|
453
|
+
getUserRoles: (userId: string) => Promise<UserRoleInfo[]>;
|
|
454
|
+
assignUserRole: (userId: string, data: AssignUserRoleRequest) => Promise<AssignUserRoleResponse>;
|
|
455
|
+
replaceUserRoles: (userId: string, data: ReplaceUserRolesRequest) => Promise<ReplaceUserRolesResponse>;
|
|
456
|
+
removeUserRole: (userId: string, roleId: string) => Promise<RemoveUserRoleResponse>;
|
|
457
|
+
getUserPermissions: (userId: string) => Promise<GetUserPermissionsResponse>;
|
|
458
|
+
checkUserPermissions: (userId: string, data: CheckUserPermissionsRequest) => Promise<CheckUserPermissionsResponse>;
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
253
462
|
//#region src/plugins/bearer/types.d.ts
|
|
254
463
|
type BearerPluginOptions = {
|
|
255
464
|
headerName?: string;
|
|
@@ -457,5 +666,5 @@ declare class TOTPPlugin implements Plugin {
|
|
|
457
666
|
};
|
|
458
667
|
}
|
|
459
668
|
//#endregion
|
|
460
|
-
export { AdminPlugin, AdminSessionState, AdminUserSession, AdminUserState, BanUserRequest, BanUserResponse, BearerPlugin, BearerPluginOptions, CSRFPlugin, CSRFPluginOptions, ChangePasswordRequest, CreateAccountRequest, CreateAccountResponse, CreateSessionStateRequest, CreateSessionStateResponse, CreateUserRequest, CreateUserResponse, CreateUserStateRequest, CreateUserStateResponse, DeleteAccountResponse, DeleteSessionStateResponse, DeleteUserResponse, DeleteUserStateResponse, DisableResponse, EmailPasswordPlugin, EnableResponse, GenerateBackupCodesResponse, GetAccountByIdResponse, GetAllImpersonationsResponse, GetAllUsersResponse, GetBannedUserStatesResponse, GetImpersonationByIdResponse, GetRevokedSessionStatesResponse, GetSessionStateResponse, GetTOTPURIResponse, GetUserAccountsResponse, GetUserAdminSessionsResponse, GetUserByIdResponse, GetUserStateResponse, Impersonation, JWKSKey, JWTAlgorithm, JWTPlugin, JWTTokensResponse, MagicLinkExchangeRequest, MagicLinkPlugin, MagicLinkSignInRequest, MagicLinkSignInResponse, MagicLinkVerifyRequest, MagicLinkVerifyResponse, OAuth2Plugin, OAuth2ProviderType, RequestEmailChangeRequest, RequestPasswordResetRequest, RevokeSessionRequest, RevokeSessionResponse, SendEmailVerificationRequest, SignInRequest, SignInWithOAuth2Request, SignInWithOAuth2Response, SignUpRequest, StartImpersonationRequest, StartImpersonationResponse, StopImpersonationResponse, TOTPPlugin, TokenRefreshRequest, TokenRefreshResponse, UnbanUserResponse, UpdateAccountRequest, UpdateAccountResponse, UpdateSessionStateRequest, UpdateSessionStateResponse, UpdateUserRequest, UpdateUserResponse, UpdateUserStateRequest, UpdateUserStateResponse, VerifyBackupCodeRequest, VerifyBackupCodeResponse, VerifyEmailRequest, VerifyTOTPRequest, VerifyTOTPResponse, adminSessionStateSchema, adminUserSessionSchema, adminUserStateSchema, impersonationSchema };
|
|
669
|
+
export { AccessControlPlugin, AddRolePermissionRequest, AddRolePermissionResponse, AdminPlugin, AdminSessionState, AdminUserSession, AdminUserState, AssignUserRoleRequest, AssignUserRoleResponse, BanUserRequest, BanUserResponse, BearerPlugin, BearerPluginOptions, CSRFPlugin, CSRFPluginOptions, ChangePasswordRequest, CheckUserPermissionsRequest, CheckUserPermissionsResponse, CreateAccountRequest, CreateAccountResponse, CreatePermissionRequest, CreatePermissionResponse, CreateRoleRequest, CreateRoleResponse, CreateSessionStateRequest, CreateSessionStateResponse, CreateUserRequest, CreateUserResponse, CreateUserStateRequest, CreateUserStateResponse, DeleteAccountResponse, DeletePermissionResponse, DeleteRoleResponse, DeleteSessionStateResponse, DeleteUserResponse, DeleteUserStateResponse, DisableResponse, EmailPasswordPlugin, EnableResponse, GenerateBackupCodesResponse, GetAccountByIdResponse, GetAllImpersonationsResponse, GetAllUsersResponse, GetBannedUserStatesResponse, GetImpersonationByIdResponse, GetRevokedSessionStatesResponse, GetSessionStateResponse, GetTOTPURIResponse, GetUserAccountsResponse, GetUserAdminSessionsResponse, GetUserByIdResponse, GetUserPermissionsResponse, GetUserStateResponse, Impersonation, JWKSKey, JWTAlgorithm, JWTPlugin, JWTTokensResponse, MagicLinkExchangeRequest, MagicLinkPlugin, MagicLinkSignInRequest, MagicLinkSignInResponse, MagicLinkVerifyRequest, MagicLinkVerifyResponse, OAuth2Plugin, OAuth2ProviderType, Permission, PermissionGrantSource, RemoveRolePermissionResponse, RemoveUserRoleResponse, ReplaceRolePermissionResponse, ReplaceRolePermissionsRequest, ReplaceUserRolesRequest, ReplaceUserRolesResponse, RequestEmailChangeRequest, RequestPasswordResetRequest, RevokeSessionRequest, RevokeSessionResponse, Role, RoleDetails, SendEmailVerificationRequest, SignInRequest, SignInWithOAuth2Request, SignInWithOAuth2Response, SignUpRequest, StartImpersonationRequest, StartImpersonationResponse, StopImpersonationResponse, TOTPPlugin, TokenRefreshRequest, TokenRefreshResponse, UnbanUserResponse, UpdateAccountRequest, UpdateAccountResponse, UpdatePermissionRequest, UpdatePermissionResponse, UpdateRoleRequest, UpdateRoleResponse, UpdateSessionStateRequest, UpdateSessionStateResponse, UpdateUserRequest, UpdateUserResponse, UpdateUserStateRequest, UpdateUserStateResponse, UserAuthorizationProfile, UserPermissionInfo, UserRoleInfo, UserWithPermissions, UserWithRoles, VerifyBackupCodeRequest, VerifyBackupCodeResponse, VerifyEmailRequest, VerifyTOTPRequest, VerifyTOTPResponse, adminSessionStateSchema, adminUserSessionSchema, adminUserStateSchema, checkUserPermissionsResponseSchema, getUserPermissionsResponseSchema, impersonationSchema, permissionGrantSourceSchema, permissionSchema, roleDetailsSchema, roleSchema, userPermissionInfoSchema, userRoleInfoSchema };
|
|
461
670
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/plugins/index.js
CHANGED
|
@@ -173,6 +173,155 @@ const impersonationSchema = z.object({
|
|
|
173
173
|
updatedAt: z.iso.datetime()
|
|
174
174
|
});
|
|
175
175
|
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/plugins/access-control/plugin.ts
|
|
178
|
+
var AccessControlPlugin = class {
|
|
179
|
+
id = "accessControl";
|
|
180
|
+
constructor() {}
|
|
181
|
+
init(client) {
|
|
182
|
+
return {
|
|
183
|
+
createRole: async (data) => {
|
|
184
|
+
return wrappedFetch(client, `/access-control/roles`, {
|
|
185
|
+
method: "POST",
|
|
186
|
+
body: data
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
getAllRoles: async () => {
|
|
190
|
+
return wrappedFetch(client, `/access-control/roles`, { method: "GET" });
|
|
191
|
+
},
|
|
192
|
+
getRoleByName: async (roleName) => {
|
|
193
|
+
return wrappedFetch(client, `/access-control/roles/by-name/${roleName}`, { method: "GET" });
|
|
194
|
+
},
|
|
195
|
+
getRoleById: async (roleId) => {
|
|
196
|
+
return wrappedFetch(client, `/access-control/roles/${roleId}`, { method: "GET" });
|
|
197
|
+
},
|
|
198
|
+
updateRole: async (roleId, data) => {
|
|
199
|
+
return wrappedFetch(client, `/access-control/roles/${roleId}`, {
|
|
200
|
+
method: "PATCH",
|
|
201
|
+
body: data
|
|
202
|
+
});
|
|
203
|
+
},
|
|
204
|
+
deleteRole: async (roleId) => {
|
|
205
|
+
return wrappedFetch(client, `/access-control/roles/${roleId}`, { method: "DELETE" });
|
|
206
|
+
},
|
|
207
|
+
createPermission: async (data) => {
|
|
208
|
+
return wrappedFetch(client, `/access-control/permissions`, {
|
|
209
|
+
method: "POST",
|
|
210
|
+
body: data
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
getAllPermissions: async () => {
|
|
214
|
+
return wrappedFetch(client, `/access-control/permissions`, { method: "GET" });
|
|
215
|
+
},
|
|
216
|
+
getPermissionById: async (permissionId) => {
|
|
217
|
+
return wrappedFetch(client, `/access-control/permissions/${permissionId}`, { method: "GET" });
|
|
218
|
+
},
|
|
219
|
+
updatePermission: async (permissionId, data) => {
|
|
220
|
+
return wrappedFetch(client, `/access-control/permissions/${permissionId}`, {
|
|
221
|
+
method: "PATCH",
|
|
222
|
+
body: data
|
|
223
|
+
});
|
|
224
|
+
},
|
|
225
|
+
deletePermission: async (permissionId) => {
|
|
226
|
+
return wrappedFetch(client, `/access-control/permissions/${permissionId}`, { method: "DELETE" });
|
|
227
|
+
},
|
|
228
|
+
addRolePermission: async (roleId, data) => {
|
|
229
|
+
return wrappedFetch(client, `/access-control/roles/${roleId}/permissions`, {
|
|
230
|
+
method: "POST",
|
|
231
|
+
body: data
|
|
232
|
+
});
|
|
233
|
+
},
|
|
234
|
+
getRolePermissions: async (roleId) => {
|
|
235
|
+
return wrappedFetch(client, `/access-control/roles/${roleId}/permissions`, { method: "GET" });
|
|
236
|
+
},
|
|
237
|
+
replaceRolePermissions: async (roleId, data) => {
|
|
238
|
+
return wrappedFetch(client, `/access-control/roles/${roleId}/permissions`, {
|
|
239
|
+
method: "PUT",
|
|
240
|
+
body: data
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
removeRolePermission: async (roleId, permissionId) => {
|
|
244
|
+
return wrappedFetch(client, `/access-control/roles/${roleId}/permissions/${permissionId}`, { method: "DELETE" });
|
|
245
|
+
},
|
|
246
|
+
getUserRoles: async (userId) => {
|
|
247
|
+
return wrappedFetch(client, `/access-control/users/${userId}/roles`, { method: "GET" });
|
|
248
|
+
},
|
|
249
|
+
assignUserRole: async (userId, data) => {
|
|
250
|
+
return wrappedFetch(client, `/access-control/users/${userId}/roles`, {
|
|
251
|
+
method: "POST",
|
|
252
|
+
body: data
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
replaceUserRoles: async (userId, data) => {
|
|
256
|
+
return wrappedFetch(client, `/access-control/users/${userId}/roles`, {
|
|
257
|
+
method: "PUT",
|
|
258
|
+
body: data
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
removeUserRole: async (userId, roleId) => {
|
|
262
|
+
return wrappedFetch(client, `/access-control/users/${userId}/roles/${roleId}`, { method: "DELETE" });
|
|
263
|
+
},
|
|
264
|
+
getUserPermissions: async (userId) => {
|
|
265
|
+
return wrappedFetch(client, `/access-control/users/${userId}/permissions`, { method: "GET" });
|
|
266
|
+
},
|
|
267
|
+
checkUserPermissions: async (userId, data) => {
|
|
268
|
+
return wrappedFetch(client, `/access-control/users/${userId}/permissions/check`, {
|
|
269
|
+
method: "POST",
|
|
270
|
+
body: data
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/plugins/access-control/types.ts
|
|
279
|
+
const roleSchema = z.object({
|
|
280
|
+
id: z.string().nonempty(),
|
|
281
|
+
name: z.string().nonempty(),
|
|
282
|
+
description: z.string().nullish(),
|
|
283
|
+
weight: z.number(),
|
|
284
|
+
isSystem: z.boolean(),
|
|
285
|
+
createdAt: z.iso.datetime(),
|
|
286
|
+
updatedAt: z.iso.datetime()
|
|
287
|
+
});
|
|
288
|
+
const permissionSchema = z.object({
|
|
289
|
+
id: z.string().nonempty(),
|
|
290
|
+
key: z.string().nonempty(),
|
|
291
|
+
description: z.string().nullish(),
|
|
292
|
+
isSystem: z.boolean(),
|
|
293
|
+
createdAt: z.iso.datetime(),
|
|
294
|
+
updatedAt: z.iso.datetime()
|
|
295
|
+
});
|
|
296
|
+
const permissionGrantSourceSchema = z.object({
|
|
297
|
+
roleId: z.string().nonempty(),
|
|
298
|
+
roleName: z.string().nonempty(),
|
|
299
|
+
grantedByUserId: z.string().nullish(),
|
|
300
|
+
grantedAt: z.iso.datetime().nullish()
|
|
301
|
+
});
|
|
302
|
+
const userPermissionInfoSchema = z.object({
|
|
303
|
+
permissionId: z.string().nonempty(),
|
|
304
|
+
permissionKey: z.string().nonempty(),
|
|
305
|
+
permissionDescription: z.string().nullish(),
|
|
306
|
+
grantedByUserId: z.string().nullish(),
|
|
307
|
+
grantedAt: z.iso.datetime().nullish(),
|
|
308
|
+
sources: z.array(permissionGrantSourceSchema).optional()
|
|
309
|
+
});
|
|
310
|
+
const userRoleInfoSchema = z.object({
|
|
311
|
+
roleId: z.string().nonempty(),
|
|
312
|
+
roleName: z.string().nonempty(),
|
|
313
|
+
roleDescription: z.string().nullish(),
|
|
314
|
+
assignedByUserId: z.string().nullish(),
|
|
315
|
+
assignedAt: z.iso.datetime().nullish(),
|
|
316
|
+
expiresAt: z.iso.datetime().nullish()
|
|
317
|
+
});
|
|
318
|
+
const roleDetailsSchema = z.object({
|
|
319
|
+
role: roleSchema,
|
|
320
|
+
permissions: z.array(userPermissionInfoSchema)
|
|
321
|
+
});
|
|
322
|
+
const getUserPermissionsResponseSchema = z.object({ permissions: z.array(userPermissionInfoSchema) });
|
|
323
|
+
const checkUserPermissionsResponseSchema = z.object({ hasPermissions: z.boolean() });
|
|
324
|
+
|
|
176
325
|
//#endregion
|
|
177
326
|
//#region src/plugins/bearer/plugin.ts
|
|
178
327
|
var BearerPlugin = class {
|
|
@@ -407,5 +556,5 @@ var TOTPPlugin = class {
|
|
|
407
556
|
};
|
|
408
557
|
|
|
409
558
|
//#endregion
|
|
410
|
-
export { AdminPlugin, BearerPlugin, CSRFPlugin, EmailPasswordPlugin, JWTPlugin, MagicLinkPlugin, OAuth2Plugin, TOTPPlugin, adminSessionStateSchema, adminUserSessionSchema, adminUserStateSchema, impersonationSchema };
|
|
559
|
+
export { AccessControlPlugin, AdminPlugin, BearerPlugin, CSRFPlugin, EmailPasswordPlugin, JWTPlugin, MagicLinkPlugin, OAuth2Plugin, TOTPPlugin, adminSessionStateSchema, adminUserSessionSchema, adminUserStateSchema, checkUserPermissionsResponseSchema, getUserPermissionsResponseSchema, impersonationSchema, permissionGrantSourceSchema, permissionSchema, roleDetailsSchema, roleSchema, userPermissionInfoSchema, userRoleInfoSchema };
|
|
411
560
|
//# sourceMappingURL=index.js.map
|