import { Onboarding, WebSiteUserRole, Client } from "@salaxy/core"; import { ISingleItemRepository } from "../repositories/ISingleItemRepository"; /** Service that hanldes the interaction to server in the onboarding process. */ export declare class OnboardingService implements ISingleItemRepository { private client; private _current; /** Creates a new instance of OnboardingService with dependency injection. */ constructor(client: Client); /** Current onboarding object. */ readonly current: Onboarding; /** * Gets a new blank object with default values, suitable for UI binding. * This is a synchronous method - does not go to the server and it is not 100% reliable in that way. * However, it shoud provide a basic object, good enough for most views. */ getBlank(accountType?: WebSiteUserRole): Onboarding; /** * Creates a new item and sets it as current for editing and saving. * The item is not yet sent to server and thus it is not in the list, nor does it have an identifier. */ newCurrent(accountType?: WebSiteUserRole): void; /** * Saves changes to the current item. * @param callback - Optional callback that is called after save and susequent reloadList completes. */ saveCurrent(callback?: (data: Onboarding) => any): void; /** * Adds or updates a given item. * Operation is determined based on id: null/''/'new' adds, other string values update. * @param item - Item that is updated. * @param callback - Optional callback that is called after save and susequent reloadList completes. */ save(item: Onboarding, callback?: (data: Onboarding) => any): void; /** * Deletes the given item from repository if possible * @param id - Identifier of the item to delete * @param callback - Optional callback that is called after save and susequent reloadList completes. */ delete?(id: string, callback?: (data: Onboarding) => any): void; /** Loads the onboarding from the server and sets it as current. */ loadSingle(id: string, callback?: (data: Onboarding) => any): void; /** Send Sms Verification */ sendSmsVerificationPin(callback?: (data: Onboarding) => any): void; }