// Copyright © 2022-2026 Partium, Inc. DBA Partium import { Observable } from "rxjs"; import { Organization, PartiumConfig } from ".."; import { BaseService } from "./base.service"; /** * Base class for all services that need to successfully initialize during login of the user. * * The init-function of Services outside the core-module can not directly be initialized, * because this would lead to circular dependencies. * To still allow Services to have a mandatory init-phase during login, they can be * registered to be initialized during login-phase. */ export declare abstract class BaseLoginInitService extends BaseService { protected config: PartiumConfig; protected userEmail: string; protected currentOrganization$: Observable; /** * Initialization function of the service. * When registered, this function will be called during login process, which can only * finish successfully if this init function resolves without error. * * Throw an error to cancel login process. * * Method should be overridden by child-class * * @param config the PartiumConfig is passed to allow initializations using the config * @param userEmail the current users eMail address * @param currentOrganization$ Observable that always emits when the current organization changes * @returns Observable that resolves when the initialization of the service is successful */ init(config: PartiumConfig, userEmail: string, currentOrganization$: Observable): Observable; }