@authup/server-core 1.0.0-beta.46 → 1.0.0-beta.47
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/LICENSE +661 -201
- package/README.md +3 -1
- package/dist/adapters/database/data-source/index.d.ts +0 -1
- package/dist/adapters/database/data-source/index.d.ts.map +1 -1
- package/dist/adapters/database/data-source/index.mjs +1 -2
- package/dist/adapters/database/domains/client/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/client/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/client/subscriber.mjs +21 -39
- package/dist/adapters/database/domains/client/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/client-permission/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/client-permission/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/client-permission/subscriber.mjs +24 -49
- package/dist/adapters/database/domains/client-permission/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/client-role/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/client-role/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/client-role/subscriber.mjs +24 -49
- package/dist/adapters/database/domains/client-role/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/client-scope/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/client-scope/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/client-scope/subscriber.mjs +21 -36
- package/dist/adapters/database/domains/client-scope/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/identity-provider/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider/subscriber.mjs +21 -39
- package/dist/adapters/database/domains/identity-provider/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-account/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/identity-provider-account/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-account/subscriber.mjs +21 -36
- package/dist/adapters/database/domains/identity-provider-account/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.mjs +21 -36
- package/dist/adapters/database/domains/identity-provider-attribute/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/identity-provider-role-mapping/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/identity-provider-role-mapping/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/identity-provider-role-mapping/subscriber.mjs +21 -45
- package/dist/adapters/database/domains/identity-provider-role-mapping/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/permission/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/permission/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/permission/subscriber.mjs +28 -47
- package/dist/adapters/database/domains/permission/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/policy/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/policy/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/policy/subscriber.mjs +21 -36
- package/dist/adapters/database/domains/policy/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/policy-attribute/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/policy-attribute/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/policy-attribute/subscriber.mjs +24 -45
- package/dist/adapters/database/domains/policy-attribute/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/realm/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/realm/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/realm/subscriber.mjs +21 -36
- package/dist/adapters/database/domains/realm/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/robot/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/robot/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/robot/subscriber.mjs +21 -39
- package/dist/adapters/database/domains/robot/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/robot-permission/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/robot-permission/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/robot-permission/subscriber.mjs +24 -49
- package/dist/adapters/database/domains/robot-permission/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/robot-role/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/robot-role/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/robot-role/subscriber.mjs +24 -49
- package/dist/adapters/database/domains/robot-role/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/role/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/role/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/role/subscriber.mjs +21 -41
- package/dist/adapters/database/domains/role/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/role-attribute/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/role-attribute/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/role-attribute/subscriber.mjs +24 -45
- package/dist/adapters/database/domains/role-attribute/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/role-permission/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/role-permission/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/role-permission/subscriber.mjs +24 -49
- package/dist/adapters/database/domains/role-permission/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/scope/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/scope/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/scope/subscriber.mjs +17 -43
- package/dist/adapters/database/domains/scope/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/user/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/user/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/user/subscriber.mjs +21 -39
- package/dist/adapters/database/domains/user/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/user-attribute/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/user-attribute/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/user-attribute/subscriber.mjs +24 -43
- package/dist/adapters/database/domains/user-attribute/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/user-permission/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/user-permission/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/user-permission/subscriber.mjs +24 -49
- package/dist/adapters/database/domains/user-permission/subscriber.mjs.map +1 -1
- package/dist/adapters/database/domains/user-role/subscriber.d.ts +3 -6
- package/dist/adapters/database/domains/user-role/subscriber.d.ts.map +1 -1
- package/dist/adapters/database/domains/user-role/subscriber.mjs +24 -49
- package/dist/adapters/database/domains/user-role/subscriber.mjs.map +1 -1
- package/dist/adapters/database/index.d.ts +1 -0
- package/dist/adapters/database/index.d.ts.map +1 -1
- package/dist/adapters/database/index.mjs +3 -2
- package/dist/adapters/database/subscriber/index.d.ts +3 -0
- package/dist/adapters/database/subscriber/index.d.ts.map +1 -0
- package/dist/adapters/database/subscriber/index.mjs +5 -0
- package/dist/adapters/database/subscriber/module.d.ts +19 -0
- package/dist/adapters/database/subscriber/module.d.ts.map +1 -0
- package/dist/adapters/database/subscriber/module.mjs +70 -0
- package/dist/adapters/database/subscriber/module.mjs.map +1 -0
- package/dist/adapters/database/subscriber/types.d.ts +15 -0
- package/dist/adapters/database/subscriber/types.d.ts.map +1 -0
- package/dist/adapters/database/subscriber/types.mjs +4 -0
- package/dist/adapters/http/controllers/entities/identity-provider/module.mjs +1 -1
- package/dist/adapters/http/controllers/workflows/activate/module.d.ts +8 -1
- package/dist/adapters/http/controllers/workflows/activate/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/activate/module.mjs +20 -1
- package/dist/adapters/http/controllers/workflows/activate/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/authorize/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/authorize/module.mjs +16 -37
- package/dist/adapters/http/controllers/workflows/authorize/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/authorize/types.d.ts +2 -0
- package/dist/adapters/http/controllers/workflows/authorize/types.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-forgot/module.d.ts +8 -1
- package/dist/adapters/http/controllers/workflows/password-forgot/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-forgot/module.mjs +23 -2
- package/dist/adapters/http/controllers/workflows/password-forgot/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-reset/module.d.ts +8 -1
- package/dist/adapters/http/controllers/workflows/password-reset/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/password-reset/module.mjs +21 -1
- package/dist/adapters/http/controllers/workflows/password-reset/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/register/module.d.ts +8 -1
- package/dist/adapters/http/controllers/workflows/register/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/register/module.mjs +23 -2
- package/dist/adapters/http/controllers/workflows/register/module.mjs.map +1 -1
- package/dist/adapters/http/controllers/workflows/status/module.d.ts +11 -4
- package/dist/adapters/http/controllers/workflows/status/module.d.ts.map +1 -1
- package/dist/adapters/http/controllers/workflows/status/module.mjs +17 -5
- package/dist/adapters/http/controllers/workflows/status/module.mjs.map +1 -1
- package/dist/adapters/http/index.mjs +4 -1
- package/dist/adapters/http/middleware/built-in/cors.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/cors.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/error.d.ts +6 -1
- package/dist/adapters/http/middleware/built-in/error.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/error.mjs +2 -3
- package/dist/adapters/http/middleware/built-in/error.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/index.d.ts +1 -0
- package/dist/adapters/http/middleware/built-in/index.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/index.mjs +2 -1
- package/dist/adapters/http/middleware/built-in/logger.d.ts +2 -0
- package/dist/adapters/http/middleware/built-in/logger.d.ts.map +1 -1
- package/dist/adapters/http/middleware/built-in/logger.mjs +1 -2
- package/dist/adapters/http/middleware/built-in/logger.mjs.map +1 -1
- package/dist/adapters/http/middleware/built-in/ui-http-client.d.ts +15 -0
- package/dist/adapters/http/middleware/built-in/ui-http-client.d.ts.map +1 -0
- package/dist/adapters/http/middleware/built-in/ui-http-client.mjs +25 -0
- package/dist/adapters/http/middleware/built-in/ui-http-client.mjs.map +1 -0
- package/dist/adapters/http/middleware/index.mjs +2 -1
- package/dist/adapters/http/request/helpers/index.d.ts +2 -0
- package/dist/adapters/http/request/helpers/index.d.ts.map +1 -1
- package/dist/adapters/http/request/helpers/index.mjs +3 -1
- package/dist/adapters/http/request/helpers/locale.d.ts +14 -0
- package/dist/adapters/http/request/helpers/locale.d.ts.map +1 -0
- package/dist/adapters/http/request/helpers/locale.mjs +32 -0
- package/dist/adapters/http/request/helpers/locale.mjs.map +1 -0
- package/dist/adapters/http/request/helpers/locations.mjs +1 -1
- package/dist/adapters/http/request/helpers/redirect.d.ts +14 -0
- package/dist/adapters/http/request/helpers/redirect.d.ts.map +1 -0
- package/dist/adapters/http/request/helpers/redirect.mjs +36 -0
- package/dist/adapters/http/request/helpers/redirect.mjs.map +1 -0
- package/dist/adapters/http/request/index.mjs +3 -1
- package/dist/adapters/http/ui/base-path.d.ts +9 -0
- package/dist/adapters/http/ui/base-path.d.ts.map +1 -0
- package/dist/adapters/http/ui/base-path.mjs +18 -0
- package/dist/adapters/http/ui/base-path.mjs.map +1 -0
- package/dist/adapters/http/ui/index.d.ts +5 -0
- package/dist/adapters/http/ui/index.d.ts.map +1 -0
- package/dist/adapters/http/ui/index.mjs +7 -0
- package/dist/adapters/http/ui/render.d.ts +4 -0
- package/dist/adapters/http/ui/render.d.ts.map +1 -0
- package/dist/adapters/http/ui/render.mjs +60 -0
- package/dist/adapters/http/ui/render.mjs.map +1 -0
- package/dist/adapters/http/ui/serve.d.ts +16 -0
- package/dist/adapters/http/ui/serve.d.ts.map +1 -0
- package/dist/adapters/http/ui/serve.mjs +32 -0
- package/dist/adapters/http/ui/serve.mjs.map +1 -0
- package/dist/adapters/http/ui/types.d.ts +8 -0
- package/dist/adapters/http/ui/types.d.ts.map +1 -0
- package/dist/adapters/http/ui/types.mjs +4 -0
- package/dist/app/index.mjs +3 -2
- package/dist/app/modules/config/constants.d.ts +1 -0
- package/dist/app/modules/config/constants.d.ts.map +1 -1
- package/dist/app/modules/config/constants.mjs +1 -0
- package/dist/app/modules/config/constants.mjs.map +1 -1
- package/dist/app/modules/config/index.d.ts +1 -0
- package/dist/app/modules/config/index.d.ts.map +1 -1
- package/dist/app/modules/config/index.mjs +2 -1
- package/dist/app/modules/config/normalize.d.ts.map +1 -1
- package/dist/app/modules/config/normalize.mjs +9 -2
- package/dist/app/modules/config/normalize.mjs.map +1 -1
- package/dist/app/modules/config/origins.d.ts +10 -0
- package/dist/app/modules/config/origins.d.ts.map +1 -0
- package/dist/app/modules/config/origins.mjs +21 -0
- package/dist/app/modules/config/origins.mjs.map +1 -0
- package/dist/app/modules/config/parse.d.ts.map +1 -1
- package/dist/app/modules/config/parse.mjs +1 -0
- package/dist/app/modules/config/parse.mjs.map +1 -1
- package/dist/app/modules/config/read/env.d.ts.map +1 -1
- package/dist/app/modules/config/read/env.mjs +2 -0
- package/dist/app/modules/config/read/env.mjs.map +1 -1
- package/dist/app/modules/config/types.d.ts +14 -0
- package/dist/app/modules/config/types.d.ts.map +1 -1
- package/dist/app/modules/database/constants.d.ts +2 -0
- package/dist/app/modules/database/constants.d.ts.map +1 -1
- package/dist/app/modules/database/constants.mjs +4 -1
- package/dist/app/modules/database/constants.mjs.map +1 -1
- package/dist/app/modules/database/module.d.ts +5 -1
- package/dist/app/modules/database/module.d.ts.map +1 -1
- package/dist/app/modules/database/module.mjs +26 -15
- package/dist/app/modules/database/module.mjs.map +1 -1
- package/dist/app/modules/http/constants.d.ts +11 -0
- package/dist/app/modules/http/constants.d.ts.map +1 -1
- package/dist/app/modules/http/constants.mjs +12 -1
- package/dist/app/modules/http/constants.mjs.map +1 -1
- package/dist/app/modules/http/modules/controller.d.ts +5 -1
- package/dist/app/modules/http/modules/controller.d.ts.map +1 -1
- package/dist/app/modules/http/modules/controller.mjs +75 -10
- package/dist/app/modules/http/modules/controller.mjs.map +1 -1
- package/dist/app/modules/http/modules/middleware.d.ts +2 -1
- package/dist/app/modules/http/modules/middleware.d.ts.map +1 -1
- package/dist/app/modules/http/modules/middleware.mjs +19 -4
- package/dist/app/modules/http/modules/middleware.mjs.map +1 -1
- package/dist/app/modules/identity/module.mjs +4 -4
- package/dist/app/modules/identity/module.mjs.map +1 -1
- package/dist/app/modules/identity/repositories/provider/account/module.d.ts +3 -1
- package/dist/app/modules/identity/repositories/provider/account/module.d.ts.map +1 -1
- package/dist/app/modules/identity/repositories/provider/account/module.mjs +6 -3
- package/dist/app/modules/identity/repositories/provider/account/module.mjs.map +1 -1
- package/dist/app/modules/identity/repositories/provider/mapper/attribute.d.ts +3 -0
- package/dist/app/modules/identity/repositories/provider/mapper/attribute.d.ts.map +1 -1
- package/dist/app/modules/identity/repositories/provider/mapper/attribute.mjs +5 -2
- package/dist/app/modules/identity/repositories/provider/mapper/attribute.mjs.map +1 -1
- package/dist/app/modules/identity/repositories/provider/mapper/permission.d.ts +3 -0
- package/dist/app/modules/identity/repositories/provider/mapper/permission.d.ts.map +1 -1
- package/dist/app/modules/identity/repositories/provider/mapper/permission.mjs +5 -2
- package/dist/app/modules/identity/repositories/provider/mapper/permission.mjs.map +1 -1
- package/dist/app/modules/identity/repositories/provider/mapper/role.d.ts +3 -0
- package/dist/app/modules/identity/repositories/provider/mapper/role.d.ts.map +1 -1
- package/dist/app/modules/identity/repositories/provider/mapper/role.mjs +5 -2
- package/dist/app/modules/identity/repositories/provider/mapper/role.mjs.map +1 -1
- package/dist/app/modules/index.mjs +3 -2
- package/dist/app/modules/logger/module.d.ts.map +1 -1
- package/dist/app/modules/logger/module.mjs +1 -5
- package/dist/app/modules/logger/module.mjs.map +1 -1
- package/dist/app/modules/mail/constants.d.ts +2 -1
- package/dist/app/modules/mail/constants.d.ts.map +1 -1
- package/dist/app/modules/mail/constants.mjs +2 -1
- package/dist/app/modules/mail/constants.mjs.map +1 -1
- package/dist/app/modules/mail/index.mjs +2 -2
- package/dist/app/modules/mail/module.d.ts.map +1 -1
- package/dist/app/modules/mail/module.mjs +4 -1
- package/dist/app/modules/mail/module.mjs.map +1 -1
- package/dist/app/modules/oauth2/module.d.ts.map +1 -1
- package/dist/app/modules/oauth2/module.mjs +3 -1
- package/dist/app/modules/oauth2/module.mjs.map +1 -1
- package/dist/app/modules/oauth2/repositories/key/repository.d.ts +3 -0
- package/dist/app/modules/oauth2/repositories/key/repository.d.ts.map +1 -1
- package/dist/app/modules/oauth2/repositories/key/repository.mjs +5 -2
- package/dist/app/modules/oauth2/repositories/key/repository.mjs.map +1 -1
- package/dist/app/modules/provisioning/module.d.ts.map +1 -1
- package/dist/app/modules/provisioning/module.mjs +12 -0
- package/dist/app/modules/provisioning/module.mjs.map +1 -1
- package/dist/core/entities/client/index.d.ts +1 -0
- package/dist/core/entities/client/index.d.ts.map +1 -1
- package/dist/core/entities/client/index.mjs +2 -1
- package/dist/core/entities/client/service.d.ts.map +1 -1
- package/dist/core/entities/client/service.mjs +3 -2
- package/dist/core/entities/client/service.mjs.map +1 -1
- package/dist/core/entities/client/types.d.ts +11 -1
- package/dist/core/entities/client/types.d.ts.map +1 -1
- package/dist/core/entities/client/web-client.d.ts +34 -0
- package/dist/core/entities/client/web-client.d.ts.map +1 -0
- package/dist/core/entities/client/web-client.mjs +62 -0
- package/dist/core/entities/client/web-client.mjs.map +1 -0
- package/dist/core/entities/index.mjs +2 -1
- package/dist/core/entities/realm/service.d.ts +6 -1
- package/dist/core/entities/realm/service.d.ts.map +1 -1
- package/dist/core/entities/realm/service.mjs +9 -0
- package/dist/core/entities/realm/service.mjs.map +1 -1
- package/dist/core/identity/index.d.ts +1 -0
- package/dist/core/identity/index.d.ts.map +1 -1
- package/dist/core/identity/index.mjs +2 -1
- package/dist/core/identity/password-recovery/constants.d.ts +6 -0
- package/dist/core/identity/password-recovery/constants.d.ts.map +1 -0
- package/dist/core/identity/password-recovery/constants.mjs +12 -0
- package/dist/core/identity/password-recovery/constants.mjs.map +1 -0
- package/dist/core/identity/password-recovery/index.d.ts +1 -0
- package/dist/core/identity/password-recovery/index.d.ts.map +1 -1
- package/dist/core/identity/password-recovery/index.mjs +2 -1
- package/dist/core/identity/password-recovery/service.d.ts +4 -2
- package/dist/core/identity/password-recovery/service.d.ts.map +1 -1
- package/dist/core/identity/password-recovery/service.mjs +17 -6
- package/dist/core/identity/password-recovery/service.mjs.map +1 -1
- package/dist/core/identity/password-recovery/types.d.ts +5 -2
- package/dist/core/identity/password-recovery/types.d.ts.map +1 -1
- package/dist/core/identity/registration/service.d.ts +4 -2
- package/dist/core/identity/registration/service.d.ts.map +1 -1
- package/dist/core/identity/registration/service.mjs +15 -6
- package/dist/core/identity/registration/service.mjs.map +1 -1
- package/dist/core/identity/registration/types.d.ts +5 -2
- package/dist/core/identity/registration/types.d.ts.map +1 -1
- package/dist/core/identity/role/module.d.ts.map +1 -1
- package/dist/core/identity/role/module.mjs +1 -1
- package/dist/core/identity/role/module.mjs.map +1 -1
- package/dist/core/identity/types.d.ts +10 -0
- package/dist/core/identity/types.d.ts.map +1 -0
- package/dist/core/identity/types.mjs +4 -0
- package/dist/core/index.mjs +8 -1
- package/dist/core/mail/format/blocks.d.ts +12 -0
- package/dist/core/mail/format/blocks.d.ts.map +1 -0
- package/dist/core/mail/format/blocks.mjs +47 -0
- package/dist/core/mail/format/blocks.mjs.map +1 -0
- package/dist/core/mail/format/html.d.ts +9 -0
- package/dist/core/mail/format/html.d.ts.map +1 -0
- package/dist/core/mail/format/html.mjs +41 -0
- package/dist/core/mail/format/html.mjs.map +1 -0
- package/dist/core/mail/format/index.d.ts +5 -0
- package/dist/core/mail/format/index.d.ts.map +1 -0
- package/dist/core/mail/format/index.mjs +7 -0
- package/dist/core/mail/format/text.d.ts +3 -0
- package/dist/core/mail/format/text.d.ts.map +1 -0
- package/dist/core/mail/format/text.mjs +20 -0
- package/dist/core/mail/format/text.mjs.map +1 -0
- package/dist/core/mail/format/types.d.ts +30 -0
- package/dist/core/mail/format/types.d.ts.map +1 -0
- package/dist/core/mail/format/types.mjs +4 -0
- package/dist/core/mail/index.d.ts +3 -0
- package/dist/core/mail/index.d.ts.map +1 -1
- package/dist/core/mail/index.mjs +6 -1
- package/dist/core/mail/renderer.d.ts +10 -0
- package/dist/core/mail/renderer.d.ts.map +1 -0
- package/dist/core/mail/renderer.mjs +49 -0
- package/dist/core/mail/renderer.mjs.map +1 -0
- package/dist/core/mail/template/define.d.ts +7 -0
- package/dist/core/mail/template/define.d.ts.map +1 -0
- package/dist/core/mail/template/define.mjs +14 -0
- package/dist/core/mail/template/define.mjs.map +1 -0
- package/dist/core/mail/template/index.d.ts +4 -0
- package/dist/core/mail/template/index.d.ts.map +1 -0
- package/dist/core/mail/template/index.mjs +7 -0
- package/dist/core/mail/template/registry.d.ts +6 -0
- package/dist/core/mail/template/registry.d.ts.map +1 -0
- package/dist/core/mail/template/registry.mjs +15 -0
- package/dist/core/mail/template/registry.mjs.map +1 -0
- package/dist/core/mail/template/templates/password-reset.d.ts +3 -0
- package/dist/core/mail/template/templates/password-reset.d.ts.map +1 -0
- package/dist/core/mail/template/templates/password-reset.mjs +36 -0
- package/dist/core/mail/template/templates/password-reset.mjs.map +1 -0
- package/dist/core/mail/template/templates/registration-activation.d.ts +3 -0
- package/dist/core/mail/template/templates/registration-activation.d.ts.map +1 -0
- package/dist/core/mail/template/templates/registration-activation.mjs +34 -0
- package/dist/core/mail/template/templates/registration-activation.mjs.map +1 -0
- package/dist/core/mail/template/types.d.ts +39 -0
- package/dist/core/mail/template/types.d.ts.map +1 -0
- package/dist/core/mail/template/types.mjs +13 -0
- package/dist/core/mail/template/types.mjs.map +1 -0
- package/dist/core/mail/types.d.ts +21 -0
- package/dist/core/mail/types.d.ts.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/swagger.json +98 -3
- package/dist/ui/client/.vite/ssr-manifest.json +49086 -874
- package/dist/ui/client/assets/asap-latin-400-normal-Dc37g3Il.woff +0 -0
- package/dist/ui/client/assets/asap-latin-400-normal-DnZ1MOsG.woff2 +0 -0
- package/dist/ui/client/assets/asap-latin-700-normal-Dqcopq14.woff +0 -0
- package/dist/ui/client/assets/asap-latin-700-normal-l2Y8pi-F.woff2 +0 -0
- package/dist/ui/client/assets/asap-latin-ext-400-normal-C-fcRdtE.woff +0 -0
- package/dist/ui/client/assets/asap-latin-ext-400-normal-DwYtpHbV.woff2 +0 -0
- package/dist/ui/client/assets/asap-latin-ext-700-normal-D00OESsZ.woff +0 -0
- package/dist/ui/client/assets/asap-latin-ext-700-normal-y8bo5aW5.woff2 +0 -0
- package/dist/ui/client/assets/asap-vietnamese-400-normal-DGyJlJLT.woff2 +0 -0
- package/dist/ui/client/assets/asap-vietnamese-400-normal-lfLaoF2x.woff +0 -0
- package/dist/ui/client/assets/asap-vietnamese-700-normal-B-e19ug5.woff +0 -0
- package/dist/ui/client/assets/asap-vietnamese-700-normal-D-SxY94i.woff2 +0 -0
- package/dist/ui/client/assets/index-BeXJgvKE.css +2 -0
- package/dist/ui/client/assets/index-CgLTRwpP.js +95 -0
- package/dist/ui/client/assets/nunito-cyrillic-300-normal-BPQV259B.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-300-normal-g5qSsvc0.woff +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-400-normal-D1j0u8EH.woff +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-400-normal-xAOo5cBP.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-600-normal-BUjmtIuu.woff +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-600-normal-DJGQ2h05.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-700-normal-DP36NgGt.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-700-normal-DfHRUDv-.woff +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-300-normal-BDHtqmCR.woff +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-300-normal-ChMQLIrm.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-400-normal-CuPM9foi.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-400-normal-xaE7D4Sw.woff +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-600-normal-CWPPjBOD.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-600-normal-vnfu4DTE.woff +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-700-normal-BuR0mlCG.woff2 +0 -0
- package/dist/ui/client/assets/nunito-cyrillic-ext-700-normal-DfoqN4Gs.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-300-normal-C3ZIKvzv.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-300-normal-COoPE5VN.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-400-normal-DKg4f3fz.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-400-normal-r8SDr6Up.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-600-normal-Br8yIETf.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-600-normal-Cd0eNu1l.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-700-normal-Dort48En.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-700-normal-OcDqTBcA.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-300-normal-D1SyVuPt.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-300-normal-DfqbmdMl.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-400-normal-CjMJVfGn.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-400-normal-i-8OOpdj.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-600-normal-BKUpuB78.woff +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-600-normal-Dd9Zuxh1.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-700-normal-BWeMsAzO.woff2 +0 -0
- package/dist/ui/client/assets/nunito-latin-ext-700-normal-D4woHhbd.woff +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-300-normal-DATld5Vw.woff +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-300-normal-mLneKULB.woff2 +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-400-normal-BHkVbP3T.woff2 +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-400-normal-DtOtW02z.woff +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-600-normal-BY8O6Cug.woff2 +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-600-normal-DO1RqFw5.woff +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-700-normal-C9SQsXvj.woff +0 -0
- package/dist/ui/client/assets/nunito-vietnamese-700-normal-Ch8EUCfz.woff2 +0 -0
- package/dist/ui/client/index.html +2 -2
- package/dist/ui/server/server.js +2765 -540
- package/package.json +20 -17
- package/dist/adapters/database/data-source/singleton.d.ts +0 -5
- package/dist/adapters/database/data-source/singleton.d.ts.map +0 -1
- package/dist/adapters/database/data-source/singleton.mjs +0 -19
- package/dist/adapters/database/data-source/singleton.mjs.map +0 -1
- package/dist/adapters/database/event-publisher/index.d.ts +0 -2
- package/dist/adapters/database/event-publisher/index.d.ts.map +0 -1
- package/dist/adapters/database/event-publisher/index.mjs +0 -5
- package/dist/adapters/database/event-publisher/module.d.ts +0 -6
- package/dist/adapters/database/event-publisher/module.d.ts.map +0 -1
- package/dist/adapters/database/event-publisher/module.mjs +0 -25
- package/dist/adapters/database/event-publisher/module.mjs.map +0 -1
- package/dist/ui/client/assets/index-Cvz0JzBe.js +0 -95
- package/dist/ui/client/assets/index-DNeLkYQO.css +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
import "../../
|
|
4
|
+
import { EntitySubscriber, buildEntityDestinations } from "../../subscriber/module.mjs";
|
|
5
|
+
import "../../subscriber/index.mjs";
|
|
6
6
|
import { CachePrefix } from "../constants.mjs";
|
|
7
7
|
import { RolePermissionEntity } from "./entity.mjs";
|
|
8
8
|
import { EventSubscriber } from "typeorm";
|
|
9
|
-
import {
|
|
9
|
+
import { EntityType } from "@authup/core-kit";
|
|
10
10
|
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
11
11
|
//#region src/adapters/database/domains/role-permission/subscriber.ts
|
|
12
12
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -15,55 +15,30 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
15
15
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
16
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (data.role_realm_id) destinations.push({
|
|
21
|
-
channel: (id) => buildEntityChannelName(EntityType.ROLE_PERMISSION, id),
|
|
22
|
-
namespace: buildEntityNamespaceName(data.role_realm_id)
|
|
23
|
-
});
|
|
24
|
-
if (data.permission_realm_id) destinations.push({
|
|
25
|
-
channel: (id) => buildEntityChannelName(EntityType.ROLE_PERMISSION, id),
|
|
26
|
-
namespace: buildEntityNamespaceName(data.permission_realm_id)
|
|
27
|
-
});
|
|
28
|
-
await publishDomainEvent({
|
|
29
|
-
content: {
|
|
30
|
-
type: EntityType.ROLE_PERMISSION,
|
|
31
|
-
event,
|
|
32
|
-
data
|
|
33
|
-
},
|
|
34
|
-
destinations
|
|
35
|
-
});
|
|
18
|
+
function _ts_metadata(k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
36
20
|
}
|
|
37
|
-
var RolePermissionSubscriber = class {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
52
|
-
prefix: CachePrefix.ROLE_OWNED_PERMISSIONS,
|
|
53
|
-
key: event.entity.role_id
|
|
54
|
-
})]);
|
|
55
|
-
await publishEvent(EntityDefaultEventName.UPDATED, event.entity);
|
|
56
|
-
}
|
|
57
|
-
async afterRemove(event) {
|
|
58
|
-
if (!event.entity) return;
|
|
59
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
60
|
-
prefix: CachePrefix.ROLE_OWNED_PERMISSIONS,
|
|
61
|
-
key: event.entity.role_id
|
|
62
|
-
})]);
|
|
63
|
-
await publishEvent(EntityDefaultEventName.DELETED, event.entity);
|
|
21
|
+
var RolePermissionSubscriber = class extends EntitySubscriber {
|
|
22
|
+
constructor() {
|
|
23
|
+
super({
|
|
24
|
+
type: EntityType.ROLE_PERMISSION,
|
|
25
|
+
target: RolePermissionEntity,
|
|
26
|
+
destinations: buildEntityDestinations(EntityType.ROLE_PERMISSION, (data) => [data.role_realm_id, data.permission_realm_id]),
|
|
27
|
+
cache: {
|
|
28
|
+
onInsert: true,
|
|
29
|
+
keys: (data) => [buildRedisKeyPath({
|
|
30
|
+
prefix: CachePrefix.ROLE_OWNED_PERMISSIONS,
|
|
31
|
+
key: data.role_id
|
|
32
|
+
})]
|
|
33
|
+
}
|
|
34
|
+
});
|
|
64
35
|
}
|
|
65
36
|
};
|
|
66
|
-
RolePermissionSubscriber = _ts_decorate([
|
|
37
|
+
RolePermissionSubscriber = _ts_decorate([
|
|
38
|
+
EventSubscriber(),
|
|
39
|
+
_ts_metadata("design:type", Function),
|
|
40
|
+
_ts_metadata("design:paramtypes", [])
|
|
41
|
+
], RolePermissionSubscriber);
|
|
67
42
|
//#endregion
|
|
68
43
|
export { RolePermissionSubscriber };
|
|
69
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.mjs","names":["
|
|
1
|
+
{"version":3,"file":"subscriber.mjs","names":["EntityType","buildRedisKeyPath","EventSubscriber","EntitySubscriber","buildEntityDestinations","RolePermissionEntity","CachePrefix","RolePermissionSubscriber","type","ROLE_PERMISSION","target","destinations","data","role_realm_id","permission_realm_id","cache","onInsert","keys","prefix","ROLE_OWNED_PERMISSIONS","key","role_id"],"sources":["../../../../../src/adapters/database/domains/role-permission/subscriber.ts"],"sourcesContent":["/*\n * Copyright (c) 2022-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { RolePermission } from '@authup/core-kit';\nimport { EntityType } from '@authup/core-kit';\nimport { buildRedisKeyPath } from '@authup/server-kit';\nimport { EventSubscriber } from 'typeorm';\nimport { EntitySubscriber, buildEntityDestinations } from '../../subscriber/index.ts';\nimport { RolePermissionEntity } from './entity.ts';\nimport { CachePrefix } from '../constants.ts';\n\n@EventSubscriber()\nexport class RolePermissionSubscriber extends EntitySubscriber<RolePermission> {\n constructor() {\n super({\n type: EntityType.ROLE_PERMISSION,\n target: RolePermissionEntity,\n destinations: buildEntityDestinations(EntityType.ROLE_PERMISSION, (data) => [\n data.role_realm_id,\n data.permission_realm_id,\n ]),\n cache: {\n onInsert: true,\n keys: (data) => [\n buildRedisKeyPath({\n prefix: CachePrefix.ROLE_OWNED_PERMISSIONS,\n key: data.role_id,\n }),\n ],\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAKC,SAAA,aAAA,YAAA,QAAA,KAAA,MAAA;;;;;;;;;AAWD,IAAaO,2BAAb,cAA8CJ,iBAAAA;CAC1C,cAAc;EACV,MAAM;GACFK,MAAMR,WAAWS;GACjBC,QAAQL;GACRM,cAAcP,wBAAwBJ,WAAWS,kBAAkBG,SAAS,CACxEA,KAAKC,eACLD,KAAKE,mBAAAA,CACR;GACDC,OAAO;IACHC,UAAU;IACVC,OAAOL,SAAS,CACZX,kBAAkB;KACdiB,QAAQZ,YAAYa;KACpBC,KAAKR,KAAKS;IACd,CAAA,CAAA;GAER;EACJ,CAAA;CACJ;AACJ"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { Scope } from '@authup/core-kit';
|
|
2
|
-
import
|
|
3
|
-
export declare class ScopeSubscriber
|
|
4
|
-
|
|
5
|
-
afterInsert(event: InsertEvent<Scope>): Promise<any>;
|
|
6
|
-
afterUpdate(event: UpdateEvent<Scope>): Promise<any>;
|
|
7
|
-
afterRemove(event: RemoveEvent<Scope>): Promise<any>;
|
|
2
|
+
import { EntitySubscriber } from '../../subscriber/index.ts';
|
|
3
|
+
export declare class ScopeSubscriber extends EntitySubscriber<Scope> {
|
|
4
|
+
constructor();
|
|
8
5
|
}
|
|
9
6
|
//# sourceMappingURL=subscriber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/scope/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/scope/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,gBAAgB,EAA2B,MAAM,2BAA2B,CAAC;AAGtF,qBACa,eAAgB,SAAQ,gBAAgB,CAAC,KAAK,CAAC;;CAQ3D"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
import "../../
|
|
6
|
-
import { CachePrefix } from "../constants.mjs";
|
|
4
|
+
import { EntitySubscriber, buildEntityDestinations } from "../../subscriber/module.mjs";
|
|
5
|
+
import "../../subscriber/index.mjs";
|
|
7
6
|
import { ScopeEntity } from "./entity.mjs";
|
|
8
7
|
import { EventSubscriber } from "typeorm";
|
|
9
|
-
import {
|
|
10
|
-
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
8
|
+
import { EntityType } from "@authup/core-kit";
|
|
11
9
|
//#region src/adapters/database/domains/scope/subscriber.ts
|
|
12
10
|
function _ts_decorate(decorators, target, key, desc) {
|
|
13
11
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -15,47 +13,23 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
15
13
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
14
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
15
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (data.realm_id) destinations.push({
|
|
21
|
-
channel: (id) => buildEntityChannelName(EntityType.SCOPE, id),
|
|
22
|
-
namespace: buildEntityNamespaceName(data.realm_id)
|
|
23
|
-
});
|
|
24
|
-
await publishDomainEvent({
|
|
25
|
-
content: {
|
|
26
|
-
type: EntityType.SCOPE,
|
|
27
|
-
event,
|
|
28
|
-
data
|
|
29
|
-
},
|
|
30
|
-
destinations
|
|
31
|
-
});
|
|
16
|
+
function _ts_metadata(k, v) {
|
|
17
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
32
18
|
}
|
|
33
|
-
var ScopeSubscriber = class {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
async afterUpdate(event) {
|
|
42
|
-
if (!event.entity) return;
|
|
43
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
44
|
-
prefix: CachePrefix.USER,
|
|
45
|
-
key: event.entity.id
|
|
46
|
-
})]);
|
|
47
|
-
await publishEvent(EntityDefaultEventName.UPDATED, event.entity);
|
|
48
|
-
}
|
|
49
|
-
async afterRemove(event) {
|
|
50
|
-
if (!event.entity) return;
|
|
51
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
52
|
-
prefix: CachePrefix.USER,
|
|
53
|
-
key: event.entity.id
|
|
54
|
-
})]);
|
|
55
|
-
await publishEvent(EntityDefaultEventName.DELETED, event.entity);
|
|
19
|
+
var ScopeSubscriber = class extends EntitySubscriber {
|
|
20
|
+
constructor() {
|
|
21
|
+
super({
|
|
22
|
+
type: EntityType.SCOPE,
|
|
23
|
+
target: ScopeEntity,
|
|
24
|
+
destinations: buildEntityDestinations(EntityType.SCOPE, (data) => [data.realm_id])
|
|
25
|
+
});
|
|
56
26
|
}
|
|
57
27
|
};
|
|
58
|
-
ScopeSubscriber = _ts_decorate([
|
|
28
|
+
ScopeSubscriber = _ts_decorate([
|
|
29
|
+
EventSubscriber(),
|
|
30
|
+
_ts_metadata("design:type", Function),
|
|
31
|
+
_ts_metadata("design:paramtypes", [])
|
|
32
|
+
], ScopeSubscriber);
|
|
59
33
|
//#endregion
|
|
60
34
|
export { ScopeSubscriber };
|
|
61
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.mjs","names":["
|
|
1
|
+
{"version":3,"file":"subscriber.mjs","names":["EntityType","EventSubscriber","EntitySubscriber","buildEntityDestinations","ScopeEntity","ScopeSubscriber","type","SCOPE","target","destinations","data","realm_id"],"sources":["../../../../../src/adapters/database/domains/scope/subscriber.ts"],"sourcesContent":["/*\n * Copyright (c) 2022-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { Scope } from '@authup/core-kit';\nimport { EntityType } from '@authup/core-kit';\nimport { EventSubscriber } from 'typeorm';\nimport { EntitySubscriber, buildEntityDestinations } from '../../subscriber/index.ts';\nimport { ScopeEntity } from './entity.ts';\n\n@EventSubscriber()\nexport class ScopeSubscriber extends EntitySubscriber<Scope> {\n constructor() {\n super({\n type: EntityType.SCOPE,\n target: ScopeEntity,\n destinations: buildEntityDestinations(EntityType.SCOPE, (data) => [data.realm_id]),\n });\n }\n}\n"],"mappings":";;;;;;;;;AAKC,SAAA,aAAA,YAAA,QAAA,KAAA,MAAA;;;;;;;;;AASD,IAAaK,kBAAb,cAAqCH,iBAAAA;CACjC,cAAc;EACV,MAAM;GACFI,MAAMN,WAAWO;GACjBC,QAAQJ;GACRK,cAAcN,wBAAwBH,WAAWO,QAAQG,SAAS,CAACA,KAAKC,QAAAA,CAAS;EACrF,CAAA;CACJ;AACJ"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { User } from '@authup/core-kit';
|
|
2
|
-
import
|
|
3
|
-
export declare class UserSubscriber
|
|
4
|
-
|
|
5
|
-
afterInsert(event: InsertEvent<User>): Promise<any>;
|
|
6
|
-
afterUpdate(event: UpdateEvent<User>): Promise<any>;
|
|
7
|
-
afterRemove(event: RemoveEvent<User>): Promise<any>;
|
|
2
|
+
import { EntitySubscriber } from '../../subscriber/index.ts';
|
|
3
|
+
export declare class UserSubscriber extends EntitySubscriber<User> {
|
|
4
|
+
constructor();
|
|
8
5
|
}
|
|
9
6
|
//# sourceMappingURL=subscriber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/user/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/user/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,OAAO,EAAE,gBAAgB,EAA2B,MAAM,2BAA2B,CAAC;AAItF,qBACa,cAAe,SAAQ,gBAAgB,CAAC,IAAI,CAAC;;CAgBzD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
import "../../
|
|
4
|
+
import { EntitySubscriber, buildEntityDestinations } from "../../subscriber/module.mjs";
|
|
5
|
+
import "../../subscriber/index.mjs";
|
|
6
6
|
import { CachePrefix } from "../constants.mjs";
|
|
7
7
|
import { UserEntity } from "./entity.mjs";
|
|
8
8
|
import { EventSubscriber } from "typeorm";
|
|
9
|
-
import {
|
|
9
|
+
import { EntityType } from "@authup/core-kit";
|
|
10
10
|
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
11
11
|
//#region src/adapters/database/domains/user/subscriber.ts
|
|
12
12
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -15,45 +15,27 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
15
15
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
16
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
content: {
|
|
21
|
-
type: EntityType.USER,
|
|
22
|
-
event,
|
|
23
|
-
data
|
|
24
|
-
},
|
|
25
|
-
destinations: [{
|
|
26
|
-
channel: (id) => buildEntityChannelName(EntityType.USER, id),
|
|
27
|
-
namespace: buildEntityNamespaceName(data.realm_id)
|
|
28
|
-
}, { channel: (id) => buildEntityChannelName(EntityType.USER, id) }]
|
|
29
|
-
});
|
|
18
|
+
function _ts_metadata(k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
30
20
|
}
|
|
31
|
-
var UserSubscriber = class {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
prefix: CachePrefix.USER,
|
|
43
|
-
key: event.entity.id
|
|
44
|
-
})]);
|
|
45
|
-
await publishEvent(EntityDefaultEventName.UPDATED, event.entity);
|
|
46
|
-
}
|
|
47
|
-
async afterRemove(event) {
|
|
48
|
-
if (!event.entity) return;
|
|
49
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
50
|
-
prefix: CachePrefix.USER,
|
|
51
|
-
key: event.entity.id
|
|
52
|
-
})]);
|
|
53
|
-
await publishEvent(EntityDefaultEventName.DELETED, event.entity);
|
|
21
|
+
var UserSubscriber = class extends EntitySubscriber {
|
|
22
|
+
constructor() {
|
|
23
|
+
super({
|
|
24
|
+
type: EntityType.USER,
|
|
25
|
+
target: UserEntity,
|
|
26
|
+
destinations: buildEntityDestinations(EntityType.USER, (data) => [data.realm_id]),
|
|
27
|
+
cache: { keys: (data) => [buildRedisKeyPath({
|
|
28
|
+
prefix: CachePrefix.USER,
|
|
29
|
+
key: data.id
|
|
30
|
+
})] }
|
|
31
|
+
});
|
|
54
32
|
}
|
|
55
33
|
};
|
|
56
|
-
UserSubscriber = _ts_decorate([
|
|
34
|
+
UserSubscriber = _ts_decorate([
|
|
35
|
+
EventSubscriber(),
|
|
36
|
+
_ts_metadata("design:type", Function),
|
|
37
|
+
_ts_metadata("design:paramtypes", [])
|
|
38
|
+
], UserSubscriber);
|
|
57
39
|
//#endregion
|
|
58
40
|
export { UserSubscriber };
|
|
59
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.mjs","names":["
|
|
1
|
+
{"version":3,"file":"subscriber.mjs","names":["EntityType","buildRedisKeyPath","EventSubscriber","EntitySubscriber","buildEntityDestinations","UserEntity","CachePrefix","UserSubscriber","type","USER","target","destinations","data","realm_id","cache","keys","prefix","key","id"],"sources":["../../../../../src/adapters/database/domains/user/subscriber.ts"],"sourcesContent":["/*\n * Copyright (c) 2022-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { User } from '@authup/core-kit';\nimport { EntityType } from '@authup/core-kit';\nimport { buildRedisKeyPath } from '@authup/server-kit';\nimport { EventSubscriber } from 'typeorm';\nimport { EntitySubscriber, buildEntityDestinations } from '../../subscriber/index.ts';\nimport { UserEntity } from './entity.ts';\nimport { CachePrefix } from '../constants.ts';\n\n@EventSubscriber()\nexport class UserSubscriber extends EntitySubscriber<User> {\n constructor() {\n super({\n type: EntityType.USER,\n target: UserEntity,\n destinations: buildEntityDestinations(EntityType.USER, (data) => [data.realm_id]),\n cache: {\n keys: (data) => [\n buildRedisKeyPath({\n prefix: CachePrefix.USER,\n key: data.id,\n }),\n ],\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAKC,SAAA,aAAA,YAAA,QAAA,KAAA,MAAA;;;;;;;;;AAWD,IAAaO,iBAAb,cAAoCJ,iBAAAA;CAChC,cAAc;EACV,MAAM;GACFK,MAAMR,WAAWS;GACjBC,QAAQL;GACRM,cAAcP,wBAAwBJ,WAAWS,OAAOG,SAAS,CAACA,KAAKC,QAAAA,CAAS;GAChFC,OAAO,EACHC,OAAOH,SAAS,CACZX,kBAAkB;IACde,QAAQV,YAAYG;IACpBQ,KAAKL,KAAKM;GACd,CAAA,CAAA,EAER;EACJ,CAAA;CACJ;AACJ"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { UserAttribute } from '@authup/core-kit';
|
|
2
|
-
import
|
|
3
|
-
export declare class UserAttributeSubscriber
|
|
4
|
-
|
|
5
|
-
afterInsert(event: InsertEvent<UserAttribute>): Promise<any>;
|
|
6
|
-
afterUpdate(event: UpdateEvent<UserAttribute>): Promise<any>;
|
|
7
|
-
afterRemove(event: RemoveEvent<UserAttribute>): Promise<any>;
|
|
2
|
+
import { EntitySubscriber } from '../../subscriber/index.ts';
|
|
3
|
+
export declare class UserAttributeSubscriber extends EntitySubscriber<UserAttribute> {
|
|
4
|
+
constructor();
|
|
8
5
|
}
|
|
9
6
|
//# sourceMappingURL=subscriber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/user-attribute/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/user-attribute/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAA2B,MAAM,2BAA2B,CAAC;AAItF,qBACa,uBAAwB,SAAQ,gBAAgB,CAAC,aAAa,CAAC;;CAiB3E"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
import "../../
|
|
4
|
+
import { EntitySubscriber, buildEntityDestinations } from "../../subscriber/module.mjs";
|
|
5
|
+
import "../../subscriber/index.mjs";
|
|
6
6
|
import { CachePrefix } from "../constants.mjs";
|
|
7
7
|
import { UserAttributeEntity } from "./entity.mjs";
|
|
8
8
|
import { EventSubscriber } from "typeorm";
|
|
9
|
-
import {
|
|
9
|
+
import { EntityType } from "@authup/core-kit";
|
|
10
10
|
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
11
11
|
//#region src/adapters/database/domains/user-attribute/subscriber.ts
|
|
12
12
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -15,49 +15,30 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
15
15
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
16
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
content: {
|
|
21
|
-
type: EntityType.USER_ATTRIBUTE,
|
|
22
|
-
event,
|
|
23
|
-
data
|
|
24
|
-
},
|
|
25
|
-
destinations: [{
|
|
26
|
-
channel: (id) => buildEntityChannelName(EntityType.USER_ATTRIBUTE, id),
|
|
27
|
-
namespace: buildEntityNamespaceName(data.realm_id)
|
|
28
|
-
}, { channel: (id) => buildEntityChannelName(EntityType.USER_ATTRIBUTE, id) }]
|
|
29
|
-
});
|
|
18
|
+
function _ts_metadata(k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
30
20
|
}
|
|
31
|
-
var UserAttributeSubscriber = class {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
46
|
-
prefix: CachePrefix.USER_OWNED_ATTRIBUTES,
|
|
47
|
-
key: event.entity.user_id
|
|
48
|
-
})]);
|
|
49
|
-
await publishEvent(EntityDefaultEventName.UPDATED, event.entity);
|
|
50
|
-
}
|
|
51
|
-
async afterRemove(event) {
|
|
52
|
-
if (!event.entity) return;
|
|
53
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
54
|
-
prefix: CachePrefix.USER_OWNED_ATTRIBUTES,
|
|
55
|
-
key: event.entity.user_id
|
|
56
|
-
})]);
|
|
57
|
-
await publishEvent(EntityDefaultEventName.DELETED, event.entity);
|
|
21
|
+
var UserAttributeSubscriber = class extends EntitySubscriber {
|
|
22
|
+
constructor() {
|
|
23
|
+
super({
|
|
24
|
+
type: EntityType.USER_ATTRIBUTE,
|
|
25
|
+
target: UserAttributeEntity,
|
|
26
|
+
destinations: buildEntityDestinations(EntityType.USER_ATTRIBUTE, (data) => [data.realm_id]),
|
|
27
|
+
cache: {
|
|
28
|
+
onInsert: true,
|
|
29
|
+
keys: (data) => [buildRedisKeyPath({
|
|
30
|
+
prefix: CachePrefix.USER_OWNED_ATTRIBUTES,
|
|
31
|
+
key: data.user_id
|
|
32
|
+
})]
|
|
33
|
+
}
|
|
34
|
+
});
|
|
58
35
|
}
|
|
59
36
|
};
|
|
60
|
-
UserAttributeSubscriber = _ts_decorate([
|
|
37
|
+
UserAttributeSubscriber = _ts_decorate([
|
|
38
|
+
EventSubscriber(),
|
|
39
|
+
_ts_metadata("design:type", Function),
|
|
40
|
+
_ts_metadata("design:paramtypes", [])
|
|
41
|
+
], UserAttributeSubscriber);
|
|
61
42
|
//#endregion
|
|
62
43
|
export { UserAttributeSubscriber };
|
|
63
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.mjs","names":["
|
|
1
|
+
{"version":3,"file":"subscriber.mjs","names":["EntityType","buildRedisKeyPath","EventSubscriber","EntitySubscriber","buildEntityDestinations","UserAttributeEntity","CachePrefix","UserAttributeSubscriber","type","USER_ATTRIBUTE","target","destinations","data","realm_id","cache","onInsert","keys","prefix","USER_OWNED_ATTRIBUTES","key","user_id"],"sources":["../../../../../src/adapters/database/domains/user-attribute/subscriber.ts"],"sourcesContent":["/*\n * Copyright (c) 2022-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { UserAttribute } from '@authup/core-kit';\nimport { EntityType } from '@authup/core-kit';\nimport { buildRedisKeyPath } from '@authup/server-kit';\nimport { EventSubscriber } from 'typeorm';\nimport { EntitySubscriber, buildEntityDestinations } from '../../subscriber/index.ts';\nimport { UserAttributeEntity } from './entity.ts';\nimport { CachePrefix } from '../constants.ts';\n\n@EventSubscriber()\nexport class UserAttributeSubscriber extends EntitySubscriber<UserAttribute> {\n constructor() {\n super({\n type: EntityType.USER_ATTRIBUTE,\n target: UserAttributeEntity,\n destinations: buildEntityDestinations(EntityType.USER_ATTRIBUTE, (data) => [data.realm_id]),\n cache: {\n onInsert: true,\n keys: (data) => [\n buildRedisKeyPath({\n prefix: CachePrefix.USER_OWNED_ATTRIBUTES,\n key: data.user_id,\n }),\n ],\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAKC,SAAA,aAAA,YAAA,QAAA,KAAA,MAAA;;;;;;;;;AAWD,IAAaO,0BAAb,cAA6CJ,iBAAAA;CACzC,cAAc;EACV,MAAM;GACFK,MAAMR,WAAWS;GACjBC,QAAQL;GACRM,cAAcP,wBAAwBJ,WAAWS,iBAAiBG,SAAS,CAACA,KAAKC,QAAAA,CAAS;GAC1FC,OAAO;IACHC,UAAU;IACVC,OAAOJ,SAAS,CACZX,kBAAkB;KACdgB,QAAQX,YAAYY;KACpBC,KAAKP,KAAKQ;IACd,CAAA,CAAA;GAER;EACJ,CAAA;CACJ;AACJ"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { UserPermission } from '@authup/core-kit';
|
|
2
|
-
import
|
|
3
|
-
export declare class UserPermissionSubscriber
|
|
4
|
-
|
|
5
|
-
afterInsert(event: InsertEvent<UserPermission>): Promise<any>;
|
|
6
|
-
afterUpdate(event: UpdateEvent<UserPermission>): Promise<any>;
|
|
7
|
-
afterRemove(event: RemoveEvent<UserPermission>): Promise<any>;
|
|
2
|
+
import { EntitySubscriber } from '../../subscriber/index.ts';
|
|
3
|
+
export declare class UserPermissionSubscriber extends EntitySubscriber<UserPermission> {
|
|
4
|
+
constructor();
|
|
8
5
|
}
|
|
9
6
|
//# sourceMappingURL=subscriber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/user-permission/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/database/domains/user-permission/subscriber.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,gBAAgB,EAA2B,MAAM,2BAA2B,CAAC;AAItF,qBACa,wBAAyB,SAAQ,gBAAgB,CAAC,cAAc,CAAC;;CAoB7E"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
import "../../
|
|
4
|
+
import { EntitySubscriber, buildEntityDestinations } from "../../subscriber/module.mjs";
|
|
5
|
+
import "../../subscriber/index.mjs";
|
|
6
6
|
import { CachePrefix } from "../constants.mjs";
|
|
7
7
|
import { UserPermissionEntity } from "./entity.mjs";
|
|
8
8
|
import { EventSubscriber } from "typeorm";
|
|
9
|
-
import {
|
|
9
|
+
import { EntityType } from "@authup/core-kit";
|
|
10
10
|
import { buildRedisKeyPath } from "@authup/server-kit";
|
|
11
11
|
//#region src/adapters/database/domains/user-permission/subscriber.ts
|
|
12
12
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -15,55 +15,30 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
15
15
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
16
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (data.user_realm_id) destinations.push({
|
|
21
|
-
channel: (id) => buildEntityChannelName(EntityType.USER_PERMISSION, id),
|
|
22
|
-
namespace: buildEntityNamespaceName(data.user_realm_id)
|
|
23
|
-
});
|
|
24
|
-
if (data.permission_realm_id) destinations.push({
|
|
25
|
-
channel: (id) => buildEntityChannelName(EntityType.USER_PERMISSION, id),
|
|
26
|
-
namespace: buildEntityNamespaceName(data.permission_realm_id)
|
|
27
|
-
});
|
|
28
|
-
await publishDomainEvent({
|
|
29
|
-
content: {
|
|
30
|
-
type: EntityType.USER_PERMISSION,
|
|
31
|
-
event,
|
|
32
|
-
data
|
|
33
|
-
},
|
|
34
|
-
destinations
|
|
35
|
-
});
|
|
18
|
+
function _ts_metadata(k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
36
20
|
}
|
|
37
|
-
var UserPermissionSubscriber = class {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
52
|
-
prefix: CachePrefix.USER_OWNED_PERMISSIONS,
|
|
53
|
-
key: event.entity.user_id
|
|
54
|
-
})]);
|
|
55
|
-
await publishEvent(EntityDefaultEventName.UPDATED, event.entity);
|
|
56
|
-
}
|
|
57
|
-
async afterRemove(event) {
|
|
58
|
-
if (!event.entity) return;
|
|
59
|
-
if (event.connection.queryResultCache) await event.connection.queryResultCache.remove([buildRedisKeyPath({
|
|
60
|
-
prefix: CachePrefix.USER_OWNED_PERMISSIONS,
|
|
61
|
-
key: event.entity.user_id
|
|
62
|
-
})]);
|
|
63
|
-
await publishEvent(EntityDefaultEventName.DELETED, event.entity);
|
|
21
|
+
var UserPermissionSubscriber = class extends EntitySubscriber {
|
|
22
|
+
constructor() {
|
|
23
|
+
super({
|
|
24
|
+
type: EntityType.USER_PERMISSION,
|
|
25
|
+
target: UserPermissionEntity,
|
|
26
|
+
destinations: buildEntityDestinations(EntityType.USER_PERMISSION, (data) => [data.user_realm_id, data.permission_realm_id]),
|
|
27
|
+
cache: {
|
|
28
|
+
onInsert: true,
|
|
29
|
+
keys: (data) => [buildRedisKeyPath({
|
|
30
|
+
prefix: CachePrefix.USER_OWNED_PERMISSIONS,
|
|
31
|
+
key: data.user_id
|
|
32
|
+
})]
|
|
33
|
+
}
|
|
34
|
+
});
|
|
64
35
|
}
|
|
65
36
|
};
|
|
66
|
-
UserPermissionSubscriber = _ts_decorate([
|
|
37
|
+
UserPermissionSubscriber = _ts_decorate([
|
|
38
|
+
EventSubscriber(),
|
|
39
|
+
_ts_metadata("design:type", Function),
|
|
40
|
+
_ts_metadata("design:paramtypes", [])
|
|
41
|
+
], UserPermissionSubscriber);
|
|
67
42
|
//#endregion
|
|
68
43
|
export { UserPermissionSubscriber };
|
|
69
44
|
|