import { Client } from "@salaxy/core"; import { Token } from "../api/Token"; import { SessionService } from "../account/SessionService"; import { CalculationRepository } from "./CalculationRepository"; import { MyProfileRepository } from "./MyProfileRepository"; import { ProductRepository } from "./ProductRepository"; import { TaxCardRepository } from "./TaxCardRepository"; import { WorkerRepository } from "./WorkerRepository"; import { ContractRepository } from "./ContractRepository"; /** * Context for Salaxy session: Either anonymous or based on authenticated Salaxy account. * Typically, you define this to be provided as a singleton in AppModule, * but in special cases you may even have several instances. * * @example * @NgModule({ * // declarations and imports here * bootstrap: [AppComponent], * providers: [SalaxyContext] * }) * export class AppModule { } */ export declare class SalaxyContext { calculations: CalculationRepository; workers: WorkerRepository; contracts: ContractRepository; taxCards: TaxCardRepository; products: ProductRepository; myProfile: MyProfileRepository; /** * Session service that authenticates to the server and then has the infomration about the current account. */ session: SessionService; /** Creates a new SalaxyContext */ constructor(client: Client, calculations: CalculationRepository, workers: WorkerRepository, contracts: ContractRepository, taxCards: TaxCardRepository, products: ProductRepository, myProfile: MyProfileRepository, token: Token); /** * Sets the the current token and refreshes the session from the server. * @param token - The Salaxy token that is used for authentication */ setToken(token: string): void; }