Reference > API > Tenancy
Tenancy
Tenancy context and tenant management
- What use cases are available in
webiny/api/tenancy? - Which event handlers can you implement?
- How to import and use each exported item?
Overview
This page documents everything exported from webiny/api/tenancy. Import any of the items below directly from this path in your Webiny extensions.
Use Cases
Event Handlers
Services
Use Cases
CreateTenantRepository
Use Case Abstraction — imported from webiny/api/tenancy
Interface CreateTenantRepository.Interface:
Repository
Types:
CreateTenantUseCase
Use Case Abstraction — imported from webiny/api/tenancy
Interface CreateTenantUseCase.Interface:
Use Case
Types:
DeleteTenantRepository
Use Case Abstraction — imported from webiny/api/tenancy
Interface DeleteTenantRepository.Interface:
Types:
DeleteTenantUseCase
Use Case Abstraction — imported from webiny/api/tenancy
Interface DeleteTenantUseCase.Interface:
Types:
GetTenantByIdUseCase
Use Case Abstraction — imported from webiny/api/tenancy
Interface GetTenantByIdUseCase.Interface:
Types:
InstallTenantUseCase
Use Case Abstraction — imported from webiny/api/tenancy
Interface InstallTenantUseCase.Interface:
Use Case Abstraction
Types:
UpdateTenantRepository
Use Case Abstraction — imported from webiny/api/tenancy
Interface UpdateTenantRepository.Interface:
Types:
UpdateTenantUseCase
Use Case Abstraction — imported from webiny/api/tenancy
Interface UpdateTenantUseCase.Interface:
Types:
Event Handlers
TenantAfterCreateEventHandler
Event Handler Abstraction — imported from webiny/api/tenancy
Interface TenantAfterCreateEventHandler.Interface:
Types:
TenantAfterDeleteEventHandler
Event Handler Abstraction — imported from webiny/api/tenancy
Interface TenantAfterDeleteEventHandler.Interface:
Types:
TenantAfterUpdateEventHandler
Event Handler Abstraction — imported from webiny/api/tenancy
Interface TenantAfterUpdateEventHandler.Interface:
Types:
TenantBeforeCreateEventHandler
Event Handler Abstraction — imported from webiny/api/tenancy
Interface TenantBeforeCreateEventHandler.Interface:
Types:
TenantBeforeDeleteEventHandler
Event Handler Abstraction — imported from webiny/api/tenancy
Interface TenantBeforeDeleteEventHandler.Interface:
Types:
TenantBeforeUpdateEventHandler
Event Handler Abstraction — imported from webiny/api/tenancy
Interface TenantBeforeUpdateEventHandler.Interface:
Types:
TenantInstalledEventHandler
Event Handler Abstraction — imported from webiny/api/tenancy
Interface TenantInstalledEventHandler.Interface:
Types:
Services
AppInstaller
Abstraction — imported from webiny/api/tenancy
Interface AppInstaller.Interface:
App Installer Abstraction
| Method | Description |
|---|---|
readonly alwaysRun?: boolean() | — |
readonly appName: string() | — |
readonly dependsOn: string[]() | — |
install() | Perform the installation |
| If this succeeds, uninstall() MUST be able to revert it | |
uninstall() | Revert the installation |
| Called if any subsequent installer fails |
Types:
TenantContext
Abstraction — imported from webiny/api/tenancy
Interface TenantContext.Interface:
Types: