/** AbcSection enumeration */ export declare enum AbcSection { Undefined = "undefined", DoNotShow = "doNotShow", Employment = "employment", Insurance = "insurance", Salary = "salary", Examples = "examples", PalkkausGeneral = "palkkausGeneral", PalkkausInstructions = "palkkausInstructions", Blog = "blog", Press = "press", PersonEmployer = "personEmployer", HouseholdEmployer = "householdEmployer", Worker = "worker", Employee = "employee", Entrepreneur = "entrepreneur", Association = "association", BusinessOwner = "businessOwner", ProductLongDescription = "productLongDescription", DocumentTemplates = "documentTemplates", InstructionsAndExamples = "instructionsAndExamples" } /** AbsenceCauseCode enumeration */ export declare enum AbsenceCauseCode { Undefined = "undefined", UnpaidLeave = "unpaidLeave", PersonalReason = "personalReason", Illness = "illness", PartTimeSickLeave = "partTimeSickLeave", ParentalLeave = "parentalLeave", SpecialMaternityLeave = "specialMaternityLeave", Rehabilitation = "rehabilitation", ChildIllness = "childIllness", PartTimeChildCareLeave = "partTimeChildCareLeave", Training = "training", JobAlternationLeave = "jobAlternationLeave", StudyLeave = "studyLeave", IndustrialAction = "industrialAction", InterruptionInWorkProvision = "interruptionInWorkProvision", LeaveOfAbsence = "leaveOfAbsence", MilitaryRefresherTraining = "militaryRefresherTraining", MilitaryService = "militaryService", LayOff = "layOff", ChildCareLeave = "childCareLeave", MidWeekHoliday = "midWeekHoliday", AccruedHoliday = "accruedHoliday", OccupationalAccident = "occupationalAccident", AnnualLeave = "annualLeave", PartTimeAbsenceDueToRehabilitation = "partTimeAbsenceDueToRehabilitation", Other = "other" } /** Period of absence */ export declare interface AbsencePeriod { /** Identifies a single leave. */ id?: string | null; /** Period for the absance. */ period?: DateRange | null; /** Cause / type of the absence */ causeCode?: AbsenceCauseCode | null; /** If true, the absence is paid by the employer. */ isPaid?: boolean | null; /** If true, annual leaves are accrued from the absence. If false, these days are deducted from the accrual. By default, you may leave this null and it always follows the IsPaid. */ isHolidayAccrual?: boolean | null; /** Amount of salary that is paid for the absense. Currently not in use: Would be used in Incomes Register integration. */ amount?: number | null; /** Additional information as recorded by the Employer. */ notes?: string | null; /** Identifier in the source system is a key defined by a source system / partner system. This is a pass-through string that is passed to the result calculations. */ sourceId?: string | null; /** Number of Bonus days to be paid. */ bonusDaysCount?: number | null; } /** This type of row is currently used only in imports. May later be used also in the calculation. Kind supports format "paid-[code]" and "unpaid-[code]" where code is the Incomes Registry code (also our enumeration numeric value). */ export declare interface AbsencePeriodUsecase { /** If true, the absence is paid by the employer. If null, uses the default value from the absence cause. */ isPaid?: boolean | null; /** If true, annual leaves are accrued from the absence. If false, these days are deducted from the accrual. By default, you may leave this null and it always follows the IsPaid. */ isHolidayAccrual?: boolean | null; /** Primary subtyping of the usecase. */ kind?: AbsenceCauseCode | null; } /** Client-side logic for Absence period as UserDefined row (in calculation). */ export declare class AbsencePeriodUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. */ updateUsecase(row: UsecaseRow): void; /** Gets validation message for AbsencePeriodUsecaseLogic */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; /** * Updates the IsHolidayAccrual * @param row Current row that is being edited. */ updateIsHolidayAccrual(row: UsecaseRow): void; /** * Returns true if the select component should be shown for absence isPaid. * @param row Current row that is being edited. */ canSelectIsPaid(row: UsecaseRow): boolean; /** * Updates the IsPaid according to absence type. * @param row Current row that is being edited. */ updateIsPaid(row: UsecaseRow): void; /** * Updates the workdays count * @param row Current row that is being edited. */ updatePeriodDays(row: UsecaseRow): void; /** * Sets the days array in period to enable days selection UI. * @param row Current row that is being edited. */ setDaysSelection(row: UsecaseRow): void; } /** * Provides CRUD access for Absences of a Worker */ export declare class Absences extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(workerId?: string): WorkerAbsences; /** * Gets all the Worker absences objects of specified year. * @returns A Promise with result data: The full absences objects. */ getLatest(): Promise; /** * Gets the Absences for a specific employment relation. * @param employmentId Identifier for the Employment relation. * @returns A Promise with Absences. */ getForEmployment(employmentId: string): Promise; /** * Gets the Absences for the given employment relations. * @param employmentIds Identifiers for the Employment relations. * @returns A Promise with result data array. */ getForEmployments(employmentIds: string[]): Promise; } /** Accountant details. */ export declare interface AccountantInfo { /** Avatar for the account */ avatar?: Avatar | null; /** Official id of the person or company. */ officialId?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; } /** AccountantType enumeration */ export declare enum AccountantType { Unknown = "unknown", UnlinkedPrimaryPartner = "unlinkedPrimaryPartner", UnlinkedAccountingOnly = "unlinkedAccountingOnly", PendingPrimaryPartner = "pendingPrimaryPartner", PrimaryPartner = "primaryPartner", None = "none" } /** Account - either Person or Company - is a juridical entity Paying or receiving salaries, making contracts etc. It may be related to zero, one or multiple UserAccounts/Credentials. */ export declare interface AccountBase { /** Entity type of the account. Type PersonCreatedByEmployer means that the Worker has not yet signed into the system and there may be multiple instances of the same logical person (Official ID) - one for each employer. */ entityType?: LegalEntityType | null; /** If true the object Account is and Employer account - it has the EmployerInfo object */ isEmployer?: boolean | null; /** If true the object Account is and Worker account - it has the WorkerInfo object */ isWorker?: boolean | null; /** If true, the account has been verified. Typically this means a digitally signed contract. This means that the account also has an Identity object. However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */ isVerified?: boolean | null; /** Avatar is the visual representation of the Account. */ avatar?: Avatar | null; /** Contact information for the Account. */ contact?: Contact | null; /** Language of the person/company. */ language?: Language | null; /** Service model for the account. */ serviceModelId?: string | null; /** Workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** AccountingChannel enumeration */ export declare enum AccountingChannel { Undefined = "undefined", Procountor = "procountor", VismaNetvisor = "vismaNetvisor", VismaFivaldi = "vismaFivaldi" } /** Accounting data for reports. */ export declare interface AccountingData { /** All ledgers. */ ledgerAccounts?: LedgerAccount[] | null; /** Basic information and visualization for the accounting target. Avatar provides the visualization and the name for the target. E-mail may be used in sending of the material and telephone in contacting the accounting target. IBAN number has no use. */ target?: AccountInIndex | null; /** The default export format for tabular (csv, excel) data. */ format?: string | null; /** Finnish Business Identifier (Y-tunnus) for the company. */ officialId?: string | null; /** Employer avatar */ employer?: Avatar | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange | null; /** Summary containing relevant numbers for the report. For example, number of calculations, gross and net amounts, payment amounts and Palkkaus fee. */ summary?: AccountingDataSummary | null; } /** Summary of the accounting data. Contains main figures: totals and workers and employer total figures. */ export declare interface AccountingDataSummary { /** The total number of calculations included in the report. */ calculationCount?: number | null; /** The total number of distinct workers included in the report. */ workerCount?: number | null; /** Total gross salary of the calculations included in the report. */ readonly totalGrossSalary?: number | null; /** Total payment of the calculations included in the report. */ readonly totalPayment?: number | null; /** Calculation totals that are common to both Worker and Employer. */ totals?: TotalCalculationDTO | null; /** The calculation from the Employer point-of-view */ employerCalc?: EmployerCalculationDTO | null; /** The calculation from the Worker point-of-view */ workerCalc?: WorkerCalculationDTO | null; /** Calculation totals of accrued total holiday pay and related sidecosts. */ holidayCalc?: HolidayCalculationDTO | null; /** Validation messages for the accounting data. */ validation?: ApiValidation | null; } /** The holiday pay debt data report based on given holiday years. */ export declare interface AccountingHolidayPayDebtReportData { /** Finnish Business Identifier (Y-tunnus) for the company. */ officialId?: string | null; /** Employer avatar */ employer?: Avatar | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange | null; /** Calculated totals of accrued total holiday pay and related sidecosts. */ holidayCalc?: HolidayCalculationDTO | null; /** Individual holiday years and their debt data included in the report. */ holidayYears?: AccountingHolidayPayDebtReportDataYear[] | null; } /** Individual holiday year with the debt data. */ export declare interface AccountingHolidayPayDebtReportDataYear { /** Holiday year for which the debt is calculated. */ holidayYear?: HolidayYear | null; /** Calculation totals of accrued total holiday pay and related sidecosts. */ holidayCalc?: HolidayCalculationDTO | null; } /** AccountingPeriodClosingOption enumeration */ export declare enum AccountingPeriodClosingOption { Default = "default", Accounting = "accounting", PeriodicInvoices = "periodicInvoices", AccountingAndPeriodicInvoices = "accountingAndPeriodicInvoices", IrReports = "irReports", AccountingAndIrReports = "accountingAndIrReports", PeriodicInvoicesAndIrReports = "periodicInvoicesAndIrReports", AccountingAndPeriodicInvoicesAndIrReports = "accountingAndPeriodicInvoicesAndIrReports" } /** First version of the product that integrates the Palkkaus.fi-salary payments to employers accounting. */ export declare interface AccountingProduct { readonly status?: string | null; accountantName?: string | null; accountantEmail?: string | null; accountantPhone?: string | null; /** Enabled property set automatically by AccountantName, AccountantEmail and AccountantPhone. */ enabled?: boolean | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** Settings for Accounting report delivery. */ export declare interface AccountingReportDelivery { /** If true, the delivery is active. */ isEnabled?: boolean | null; /** Address for delivery. Currently only email supported. */ address?: string | null; } /** Accounting report table row. */ export declare interface AccountingReportRow { /** Row type. Default is the Booking. */ rowType?: AccountingReportRowType | null; /** Amount for the row: May be positive or negative(depending on the depet/credit and account type). */ amount?: number | null; /** Percentage of the value added tax that is included in the amount. */ vatPercent?: number | null; /** Proposed account number for the row. */ accountNumber?: string | null; /** Proposed account text for the row. */ accountText?: string | null; /** Returns product code. */ productCode?: string | null; /** Returns product name. (Code or ResultCode in this order). */ productName?: string | null; /** Text for the booking entry / header. */ text?: string | null; /** Space separated set of class names for CSS styling purposes. */ styles?: string | null; /** Count of units. Default is 1. */ count?: number | null; /** Price for the unit. */ price?: number | null; /** Unit identifier; */ unit?: string | null; /** Additional information for the row. */ additionalInformation?: string | null; } /** AccountingReportRowType enumeration */ export declare enum AccountingReportRowType { Debit = "debit", Credit = "credit", Total = "total", GroupHeader = "groupHeader", GroupTotal = "groupTotal", ChildRow = "childRow" } /** Contains accounting rows for one or many calculations. */ export declare interface AccountingReportTable { /** All rows in the report table. */ rows?: AccountingReportRow[] | null; /** Accounting report table type. */ tableType?: AccountingReportTableType | null; /** Finnish Business Identifier (Y-tunnus) for the company. */ businessId?: string | null; /** Employer avatar */ employer?: Avatar | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange | null; /** Summary containing relevant numbers for the report. For example, number of calculations, gross and net amounts, payment amounts and Palkkaus fee. */ summary?: AccountingReportTableSummary | null; } /** Summary of the accounting report. Contains main figures: totals and workers and employer total figures. */ export declare interface AccountingReportTableSummary { /** The total number of calculations included in the report. */ count?: number | null; /** Calculation totals that are common to both Worker and Employer. */ totals?: TotalCalculationDTO | null; /** The calculation from the Employer point-of-view */ employerCalc?: EmployerCalculationDTO | null; /** The calculation from the Worker point-of-view */ workerCalc?: WorkerCalculationDTO | null; } /** AccountingReportTableType enumeration */ export declare enum AccountingReportTableType { Classic = "classic", Simple = "simple", Mapped = "mapped" } /** Container for accounting based report data. */ export declare interface AccountingRowReportData { /** Report row created from accounting base rows. */ rows?: AccountingRowReportDataRow[] | null; /** Finnish Business Identifier (Y-tunnus) for the company. */ officialId?: string | null; /** Employer avatar */ employer?: Avatar | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange | null; /** Summary containing relevant numbers for the report. For example, number of calculations, gross and net amounts, payment amounts and Palkkaus fee. */ summary?: AccountingDataSummary | null; } /** Report row created from accounting base row data. */ export declare interface AccountingRowReportDataRow { /** Entry group: income type or total type */ entryCodeGroup?: string | null; /** A single code in the code group: single income type code or total row. */ entryCode?: string | null; /** Entry date. */ entryDate?: string | null; /** Entry description. */ message?: string | null; /** Posted amount. Includes VAT. */ amount?: number | null; /** VAT percent. */ vatPercent?: number | null; /** VAT amount of specific VAT rate. */ vatAmount?: number | null; /** Applied VAT rate. This is always mandatory. */ vatRate?: VatRate | null; /** Dimension data. */ dimension?: { [key: string]: any; } | null; /** Additional flags for directing the logic for creating accounting entry based on given entries. */ flags?: string[] | null; } /** Ruleset containing required tabular logic (rules) and accounts for creating accounting entries. */ export declare interface AccountingRuleSet { /** Template to which this ruleset is based on. */ templateId?: string | null; /** Accounts which are used in the tabular logic for creating accounting entries. */ accounts?: AccountingRuleSetAccount[] | null; /** Optional target Chart of Accounts: All the accounts in the target system, not just the ones in use. */ targetCoA?: AccountingRuleSetAccount[] | null; /** Tabular logic for creating accounting entries. */ rows?: AccountingRuleSetRow[] | null; } /** Single account with number, grouping and default text. */ export declare interface AccountingRuleSetAccount { /** Id for the account. */ id?: string | null; /** Boolean indicating if the account is non-removable template. */ isReadOnly?: boolean | null; /** Account number. */ account?: string | null; /** Text for the account. */ text?: string | null; } /** Contains a single row of the tabular logic for creating accounting entries. */ export declare interface AccountingRuleSetRow { /** Id for the row. */ id?: string | null; /** Entry group: income type or total type. */ entryCodeGroup?: string | null; /** A single code in the code group: single income type code or total row type. */ entryCode?: string | null; /** Boolean indicating if the row is non-removable template. */ isReadOnly?: boolean | null; /** Boolean indicating if the row is in use. */ enabled?: boolean | null; /** Boolean indicating whether the system should make an accounting entry based on this row. */ isIncluded?: boolean | null; /** Id of the debit account. */ debitId?: string | null; /** Grouping text for the account. If the account has a grouping defined, it will be listed as a separate row group. */ debitGrouping?: string | null; /** Id of the credit account. */ creditId?: string | null; /** Grouping text for the account. If the account has a grouping defined, it will be listed as a separate row group. */ creditGrouping?: string | null; /** Additional flags for directing the logic for creating accounting entry based on given entries. */ flags?: string[] | null; } /** Settings related to Accounting */ export declare interface AccountingSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Default accounting target. */ defaultTargetId?: string | null; /** Accounting target systems and the rulesets assigned to them. */ targets?: AccountingTargetSettings[] | null; /** Default period selection method: PaidAt date (paid by employer), Salary date (paid to worker) or Work date (work done). The default is PaidAt date. */ defaultPeriodDateKind?: PeriodDateKind | null; /** Options for accounting report delivery for the company. These are not affected by the service model. */ reportDelivery?: AccountingReportDelivery | null; /** Options for accounting report delivery for the Accountant. These are not affected by the service model. */ accountantReportDelivery?: AccountingReportDelivery | null; } /** Defines an accounting target (system), CoA and ruleset that maps the calculation to the CoA (Chart of Accounts). */ export declare interface AccountingTarget { /** Information and configuration related to the system where the accounting data is to be sent. */ info?: AccountingTargetInfo | null; /** The rule set that defines the Chart of Accounts and the mapping of salary payment to it. */ ruleSet?: AccountingRuleSet | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Accounting Target specific business data for index. */ export declare interface AccountingTargetData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Channel is the technical transport mechanism to accounting software */ channel?: AccountingChannel | null; /** The default export method for exports: whether automatic or manual. */ method?: ExportMethod | null; /** Available methods in manual exports (comma separated string). */ availableMethods?: string | null; /** The default export format for tabular (csv, excel) data. */ format?: string | null; /** Template to which this is based on. */ templateId?: string | null; } /** Specifies the general information of the behavior of Accounting target: Especially the channel and the related properties. */ export declare interface AccountingTargetInfo { /** Basic information and visualization for the accounting target. Avatar provides the visualization and the name for the target. E-mail may be used in sending of the material and telephone in contacting the accounting target. IBAN number has no use. */ target?: AccountInIndex | null; /** Channel is the technical transport mechanism to accounting software */ channel?: AccountingChannel | null; /** The default export method for exports: whether automatic or manual. */ method?: ExportMethod | null; /** If specified, defines the available methods in manual exports. */ availableMethods?: ExportMethod[] | null; /** The default export format for tabular (csv, excel) data. */ format?: string | null; /** Accounting channel specific data (default settings) for the accounting target setup. */ data?: { [key: string]: any; } | null; } /** Represents a single item in a list of Accounting targets. */ export declare interface AccountingTargetListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: AccountingTargetStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: AccountingTargetData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides business logic to AccountingReportTools */ export declare class AccountingTargetLogic { /** * Get supported TargetOptions * @returns All supported export TargetOptions */ static getSupportedTargets(): TargetOptions; private static getPalkkausExportData; /** Data exports for targets */ private static getPalkkausDefaultExportData; private static getPalkkausExtendedExportData; /** * https://procountor.finago.com/hc/fi/articles/360000254997-Tallennusty%C3%B6kalu-uusi-#LIIT%C3%84VIENTEJ%C3%84-TOIMINTO */ private static getProcountorExportData; /** * Merit aktiva format */ private static getMeritAktivaExportData; /** * https://asteri.fi/aineistojen-tuonti-asteri-kirjanpitoon/ */ private static getAsteriExportData; /** * Maestro * +----------+--------------+-----------------------------------------+ * | Otsikko | Muoto | Selite | * +----------+--------------+-----------------------------------------+ * | TOSITE | VVVV/L/NNNNN | Tositenumero | * | PAIVAYS | PP.KK.VVVV | Kirjauspäivä | * | ERN | NUM | Erityisraporttinro | * | KAAVA | NUM | Tulos/Tasekaavanumero | * | TNRO | NUM | Tilinumero | * | RNRO | | Raporttinumero | * | TILINIMI | AN | Tilin Nimi | * | TUPA | NUM | Tulospaikkanumero | * | ATP | | Aputulospaikkanumero | * | SELITE | AN | Vientiselite | * | VARA1 | | Varalla/1 | * | VARA2 | | Varalla/2 | * | VARA3 | | Varalla/3 | * | VARA4 | | Varalla/4 | * | SUMMA | | Summa (2-desimaalisena erotin on piste) | * +----------+--------------+-----------------------------------------+ */ private static getMaestroExportData; /** * https://support.netvisor.fi/hc/fi/articles/235300547-Kirjanpitotietojen-tuonti */ private static getVismaNetvisorExportData; /** * Fennoa export data format. * Tuetut sarakkeet: * * - PVM - Tositepäivä. Ensimmäiseltä riviltä otetaan Fennoan tositteelle päivämäärä. * - TILI - Kirjanpidon tili * - SELITE - Vientirivin selite * - SUMMA (Debet +, Kredit -) * - ALV-KOODI * - tyhjä tarkoittaa tilikartasta tilin takaa haetaan oletus alv-koodi * - viiva ”-” tarkoittaa ei alv-koodia * - 1 = 24 * - 2 = 14 * - 3 = 10 * - numero on vientiriville halutun alv-koodin id numero, jotka löytyvät ohjekannastamme ALV-kooditaulukosta (3.9.5 ALV-koodit / Arvonlisäverokoodit Fennoassa). * - LK1 - Laskentakohde 1 * - LK2 - Laskentakohde 2 * - LK… jne */ private static getFennoaExportData; /** * Domus export data format. * Tuetut sarakkeet: * - Y-TUNNUS - Yrityksen y-tunnus * - PVM - Tositepäivä. Ensimmäiseltä riviltä otetaan Domus tositteelle päivämäärä. * - TILI - Kirjanpidon tili * - SELITE - Vientirivin selite * - SUMMA (Debet +, Kredit -) */ private static getDomusExportData; /** * Oscar Software * Aineisto on oltava Excel taulukosta muodossa "Tabuloinnilla erotettu teksti (*.txt)" tallennettu tiedosto. Excel taulukon on noudatettava seuraavia sääntöjä: * Yhdessä taulukossa on aina yhden tositteen viennit. Vientien lukumäärä ei ole rajoitettu. Viennit ovat jokainen omalla rivillään ja vientejä edeltää sarakeotsikot sisältävä rivi. * Ennen tätä riviä tiedostossa saa olla mitä tahansa tietoa, jota ohjelma ei mitenkään käsittele. Sarakeotsikoilla voidaan kertoa tiedoston sisältävän seuraavia tietoja: * +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ * | Sarakeotsikko | Kuvaus | * +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ * | Tositelaji |Oltava perustettuna kirjanpitoon, annetaan ensimmäisellä vientirivillä. Jos tietoa ei ole, ohjelma käyttää oletustositelajia. Tositenumero määräytyy tositelajin perusteella kuten tositteita käsin syötettäessä.| | * | Pvm tai Pv | Tositteen päiväys, annetaan ensimmäisellä vientirivillä. Päivämäärä anneteen muodossa ppkkvv. Pakollinen tieto. | * | Selite tai Vientiselite | Viennin selite. Tositekohtainen selite voidaan antaa rivillä, jolla ei anneta lainkaan tilinumeroa. | * | Tili | Tilinumero, pakollinen tieto (lukuun ottamatta tositeselitettä). | * | Kp, Kust.paikka tai Kustannuspaikka | Kustannuspaikka | * | Tunniste tai Projekti | Tunniste/projekti | * | Alv-menetelmä tai Alv-men | Alv-menetelmä (käytössä vain tietyillä Tisma-käyttäjillä). | * | Debet, Debetvienti tai Debetsumma | Debet viennin summa | * | Kredit, Kreditvienti tai Kreditsumma | Kredit viennin summa. Yhdellä rivillä ei voi olla sekä debet että kredit -vientiä. Jompi kumpi kuitenkin pitää olla. | * +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ * Sarakeotsikoiden kirjoitusasu isojen ja pienten kirjainten suhteen on vapaa. Jos yllä on esitetty useampi kuin yksi kirjoitusasu, mikä tahansa näistä kelpaa. * Vähintään sarakkeet "Pvm", "Tili", "Debet" ja "Kredit"on aineistosta löydyttävä. Sarakkeiden keskinäinen järjestys on vapaa. * Jos tiedosto sisältää muitakin kuin kuvatut sarakkeet, ohjelma ei käsittele näitä mitenkään. Ohjelman käsittelemät tiedot täytyy sijaita 12 ensimmäisen sarakkeen joukossa. * Selitteiden merkistö pitää olla ISO-Latin merkistöä */ private static getOscarSoftwareExportData; /** * Lemonsoft * https://doc.lemonsoft.eu/lemonnethelp/default.htm#!Documents/excelcsv.htm * +----------+--------------+---------------------------------------------------+ * | Otsikko | Muoto | Selite | * +----------+--------------+---------------------------------------------------+ * | Tosite | 0 | Vakio = 0 | * | Tlaji | NUM | Tositelaji | * | Tnro | NUM | Tositenumero | * | Pvm | VVVV-KK-PP | Päivämäärä muodossa VVVV-KK-PP (esim. 2009-10-20) | * | Selite | AN(60) | Vientiselite | * | Kpaikka | AN(40) | Kustannuspaikka | * | LTA | AN(40) | Liiketoiminta-alue | * | Tunniste | AN(30) | Tunniste | * | Projekti | NUM | Projektinumero | * | Tili | AN(10) | Kirjanpitotili | * | Debet | NUM | Debet | * | Kredit | NUM | Kredit | * | Vero | NUM | Veron määrä | * +----------+--------------+---------------------------------------------------+ */ private static getLemonsoftExportData; /** * | Nimi | Tositepäivä | Tositelaji | Tositenumero | Tili | Alv-Koodi | Summa | Kustannuspaikka | Laskentakohde1 | Laskentakohde2 | Laskentakohde3 | Laskentakohde4 | Laskentakohde5 | Laskentakohde6 | Laskentakohde7 | Laskentakohde8 | Laskentakohde9 | Laskentakohde10 | Laskentakohde11 | Laskentakohde12 | Laskunumero | Vientiselite | * |------------------|-------------------------|------------|--------------|---------|-----------|--------------------|-----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|----------------|-----------------|-----------------|-----------------|-------------|--------------| * | Tyyppi | Date | varchar | biginit | varchar | varchar | desimal | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | varchar | * | | Päivämäärä | Teksti | Kokonaisluku | | | Luku, 2 desimaalia | | | | | | | | | | | | | | | | * | Pituus | | 10 | 20 | 6 | 10 | 13,2 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 100 | * | Muoto | pp.kk.vvvv tai p.k.vvvv | | | | | | | | | | | | | | | | | | | | | * | Pakollisuus | V | V | V | P | V | P | V | V | V | V | V | V | V | V | V | V | V | V | V | V | V | * | Järjestys | 1.00 | 2.00 | 3.00 | 4.00 | 5.00 | 6.00 | 7.00 | 8.00 | 9.00 | 10.00 | 11.00 | 12.00 | 13.00 | 14.00 | 15.00 | 16.00 | 17.00 | 18.00 | 19.00 | 20.00 | 21.00 | * | Sarake Excelissä | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | */ private static getHeerosExportData; private static getVismaFivaldiExportData; /** * Tampuuri * https://eteinen.tampuuri.fi/s/artikkelit?article=Tuonti-Excelista * +--------------------------+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ * | Sarakeotsikko | Pakollinen | Kuvaus | * +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ * | Tositenro | Ei | Mikäli tositenumeroa ei anna, järjestelmä generoi sen tositelajin laskurin mukaan. | * | Pvm | Kyllä | Tositepäivä. | * | Tositeselite | Kyllä | Tositeotsikon selite | * | Tili | Kyllä | Kirjanpidon tili | * | Alvluokka | Ei | Arvolisäverokoodi, esim 024 | * | Alvvähennysoikeus pros | Ei | Mikäli tositerivillä olevasta arvolisäverosta voidaan vain osa vähentää, tässä annetaan vähennysoikeusprosentti | * | Vientiselite | Ei | Tositerivin selite. | * | Debet | (Kyllä) | Viennille annettava debet-summa | * | Kredit | (Kyllä) | Viennille annettava kredit-summa (positiivisena, kuten tositteen syötössä). Joko debet- tai -kredit kentässä on oltava arvo. | * | Tositelaji | Ei | Käytetty tositelaji, esimerkiksi Muistiotosite. Mikäli tietoa ei anna, tositelajina käytetään sitä tositelajia, jonka tyypiksi on merkitty Tositeliittymä. | * +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ */ private static getTampuuriExportData; private static getDigiaExportData; private static formatAsDigiaText; private static padRight; private static padLeft; private static getEntryDate; } /** * Provides CRUD access for Accounting Targets */ export declare class AccountingTargets extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): AccountingTarget; } /** Specifies thee properties that are set for this accounting target in relation to the accounting channel. */ export declare interface AccountingTargetSettings { /** Id of the target definition. */ id?: string | null; /** Channel is the technical transport mechanism to accounting software */ channel?: AccountingChannel | null; /** The default export method for exports: whether automatic or manual. */ method?: ExportMethod | null; /** If specified, defines the available methods in manual exports. */ availableMethods?: ExportMethod[] | null; /** The default export format for tabular (csv, excel) data. */ format?: string | null; /** Web hook url for notifications. If any calculation changes in some past month, this url is called by the system to notify the company about the change. The month of change ("month") is added as query parameter to the url automatically by the system. */ webHookUrl?: string | null; /** Name and visualization for selection lists. */ avatar?: Avatar | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** AccountingTargetStatus enumeration */ export declare enum AccountingTargetStatus { Undefined = "undefined", OwnedTarget = "ownedTarget", ProductTarget = "productTarget", SharedTarget = "sharedTarget" } /** Object that represents a Salaxy account. */ export declare interface AccountInIndex { /** Avatar for the account */ avatar?: Avatar | null; /** Official id of the person or company. */ officialId?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; } /** * Generated products data from the server. * To update, go to: https://test-api.salaxy.com/v02/api/accounts/products/anon * @ignore * TODO: Add language versioning to the server side and generation. * TODO: Can we package this entire namespace in a way that it is hidden to be internal only? */ export declare const accountProductDefaults: any; /** Provides an overview and the possibility to edit products that are enabled to this account */ export declare interface AccountProducts { /** The basic services for Salary payment. */ baseService?: BaseSalaryProduct | null; /** Reports and payments to tax authorities. */ tax?: TaxProduct | null; /** Reports and payments to TVR (the unemployment insurance fund of Finland) */ unemployment?: UnemploymentProduct | null; /** Reports ant payments to Pension companies. */ pension?: PensionProduct | null; /** Reports and payments for mandatory employment insurances. */ insurance?: InsuranceProduct | null; /** Bookkeeping reports for salarypayments */ accounting?: AccountingProduct | null; /** Employer health care from the company Heltti */ healthCareHeltti?: HealthCareHelttiProduct | null; /** Pension payments for an entrepreneur */ pensionEntrepreneur?: PensionEntrepreneurProduct | null; /** Defines the pricing partner, service model and pricing model. */ pricing?: PricingProduct | null; } /** * Methods for updating account information */ export declare class Accounts { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Gets the current company account if the current account is a company. * NOTE: Typically the account data is fetched in Session check => You do not need to fetch it separately. * * @returns A Promise with result data (Company account or null). */ getCompany(): Promise; /** * Gets the current Person account: * Either the current account or the Primary contact person account if the current account is a company. * NOTE: Typically the current account data is fetched in Session check => You do not need to fetch it separately. * => Only use this to fetch the Primary contact person account if the current account is a company. * * @returns A Promise with result data (Personal account). */ getPerson(): Promise; /** * Saves the avatar and contact for the current Person account: * Either the current account or the Primary contact person account if the current account is a company. * * @returns A Promise with result data (Personal account). */ savePerson(personAccount: PersonAccount): Promise; /** * Returns the url where to post the avatar file */ getAvatarUploadUrl(): string; /** * Switches the current web site usage role. * * @param role - household or worker. You cannot change to company at the moment using this method. * * @returns A Promise with result data (new role). */ switchRole(role: "worker" | "household"): Promise<"worker" | "household">; /** * Adds/updates the workflow event for the item. * * @param item - Item for which to set the workflow event. * @param wfEvent - Event to add or update. * @returns Workflow data for the item. */ saveWorkflowEvent(item: PersonAccount | CompanyAccount, wfEvent: WorkflowEvent): Promise; /** * Deletes the workflow item or items from the item. * @param item - Item for which to delete workflow events. * @param wfIdOrType - Event id or type. * @returns A Promise with result data "Object deleted". */ deleteWorkflowEvent(item: PersonAccount | CompanyAccount, wfIdOrType: string): Promise; /** * Gets a single workflow event for the item. * @param item - Item for which to get the single event. * @param wfId - Event id. * @returns A Promise with event data. */ getWorkflowEvent(item: PersonAccount | CompanyAccount, wfId: string): Promise; } /** * Provides read / update functionality for main account settings (employer/company) */ export declare class AccountSettings extends SingleItemApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); } /** Read-only account settings in Session: These are the settings that should be immediately available in the regular UI without separate loading. */ export declare interface AccountSettingsInSession { /** Pension contracts for optional selection of cotnract in Worker / Calc UI's */ pensionContracts?: PensionContract[] | null; /** Insurance contracts for optional selection of cotnract in Worker / Calc UI's */ insuranceContracts?: InsuranceContract[] | null; /** If true, the reporting layout is customized and should be loadded from the server in preview and reporting. */ hasCustomReport?: boolean | null; /** The default accounting target for accounting reports. */ accountingTarget?: AccountingTargetSettings | null; /** Partner and service model */ partner?: PrimaryPartnerSettings | null; /** The payment channels that are enabled for the current user. */ paymentChannels?: PaymentChannel[] | null; /** Current default payment channel */ defaultPaymentChannel?: PaymentChannel | null; /** Available usecases for the current user. */ usecases?: UsecaseInSettings[] | null; /** Basic information about the avialable integrations: Server URL and supported behaviors in the future. */ integration?: IntegrationInSession | null; /** Partner messages enabled. */ partnerMessages?: boolean | null; /** Cost accounting model. */ costAccounting?: CostAccountingInSession | null; /** Forms settings for session. */ forms?: FormsInSession | null; } /** Validation errors for the onboarding process */ export declare interface AccountValidation { /** If true the official ID is technically valid. Official ID is either Finnish Personal ID (HETU, Henkilötunnus) or Business ID (Y-tunnus). */ isOfficialIdValid?: boolean | null; /** If false, none of the accounts in ExistingAccounts cannot be accessed by the current user. */ isAuthorized?: boolean | null; /** TODO: NOt implemented yet - should be implemented If true, the onboarding object has sufficient data to start the Digital Signature process (Visma Sign). Depending on the use case this may or may not be required for committing the data as account data. */ canStartSign?: boolean | null; /** If true, the validation process has been completed. The IsValid may be true or false. */ isCompleted?: boolean | null; /** Existing account based on official id (Personal ID / Business ID). */ existingAccount?: Avatar | null; /** If true, the data is valid - no errors. */ readonly isValid?: boolean | null; /** If true, has required fields missing data. */ readonly hasAllRequiredFields?: boolean | null; /** Validation errors on invalid field values. Note that required fields missing error messages are not here. Only the invalid values. */ readonly errors?: ApiValidationError[] | null; } /** * Helper class for executing usecase actions. */ export declare class ActionExecutor { /** The action that is being executed. */ action: UsecaseAction; /** Result from the last execution of the current action. */ result: any; /** Status of the result */ status: BootstrapStyle; constructor(action: UsecaseAction); /** Returns true if the execution is asynchronous. Only asynchronous calls may make http requests to external resources. */ get isAsync(): boolean; /** * Executes the current action. * !! IMPORTANT !! As of now, the method only supports client-side browser execution. Server-side / Node execution is not yet supported. * @param item The current item that the script processes. * @param session The current user session. * @param ajax Ajax object for HTTP calls. */ execute(item: any, session: UserSession, ajax: Ajax): Promise; /** * Executes the current action as synchronous client-side (browser) code. * !! IMPORTANT !! As of now, the method only supports client-side browser execution. Server-side / Node execution is not yet supported. * @param item The current item that the script processes. * @param session The current user session. */ executeSync(item: any, session: UserSession): boolean; /** * Executes the current action as asynchronous client-side (browser) code. * !! IMPORTANT !! As of now, the method only supports client-side browser execution. Server-side / Node execution is not yet supported. * @param item The current item that the script processes. * @param session The current user session. * @param ajax Ajax object for HTTP calls. */ executeAsync(item: any, session: UserSession, ajax: Ajax): Promise; } /** AgeGroupCode enumeration */ export declare enum AgeGroupCode { A = "a", B = "b", C = "c", U = "u" } /** AgeRange enumeration */ export declare enum AgeRange { Unknown = "unknown", Age_15 = "age_15", Age16 = "age16", Age17 = "age17", Age18_52 = "age18_52", Age53_62 = "age53_62", Age63_64 = "age63_64", Age65_67 = "age65_67", Age68AndOVer = "age68AndOVer" } /** * Abstracts the interface for Http / Ajax functionality that is required by Salaxy core classes. * This interface is implemented in this project for jQuery and Node. * Additional implementations exists for Angular.js (salaxy-lib-ng1) and Angular.io / ngx (salaxy-lib-ng). * You may also create your own implementation for the framework or http component that you want to support. */ export declare interface Ajax { /** * The server address - root of the server. This is settable field. * Will probably be changed to a configuration object in the final version. */ serverAddress: string; /** * By default credentials are not used in http-calls. * Enable credentials with this flag (force disabled when the token is set). */ useCredentials: boolean; /** * Sets Salaxy Bearer token for this http context. * * @param token - Salaxy JWT token or null to clear the token. */ setCurrentToken(token: string | null): any; /** Gets the current Salaxy Bearer token */ getCurrentToken(): string; /** Gets the Server address that is used as bases to the HTML queries. E.g. 'https://test-api.salaxy.com' */ getServerAddress(): string; /** Gets the API address with version information. E.g. 'https://test-api.salaxy.com/v03/api' */ getApiAddress(): string; /** * Gets a JSON-message from server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ getJSON(method: string): Promise; /** * Gets a HTML-message from server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result html. Standard Promise rejection to be used for error handling. */ getHTML(method: string): Promise; /** * POSTS data to server and receives back a JSON-message. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * @param data - The data that is posted to the server. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ postJSON(method: string, data: any): Promise; /** * POSTS data to server and receives back HTML. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * @param data - The data that is posted to the server. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ postHTML(method: string, data: any): Promise; /** * Sends a DELETE-message to server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ remove(method: string): Promise; } /** * The fetch access to the server methods: GET, POST and DELETE * with different return types and authentication / error events. */ export declare class AjaxFetch implements Ajax { /** * By default (true) the token is set to salaxy-token -cookie. * Disable cookies with this flag. */ useCookie: boolean; /** * By default credentials are not used in http-calls. * Enable credentials with this flag (force disabled when the token is set). */ useCredentials: boolean; /** * The server address - root of the server. This is settable field. * Will probably be changed to a configuration object in the final version. */ serverAddress: string; private token; /** * Creates a new instance of AjaxFetch */ constructor(); /** * Gets the API address with version information. E.g. 'https://test-api.salaxy.com/v03/api'. * Default version, as of writing 2.0 */ getApiAddress(): string; /** Gets the Server address that is used as bases to the HTML queries. E.g. 'https://test-api.salaxy.com' */ getServerAddress(): string; /** * Gets the current token. * Will check the salaxy-token cookie if the token is persisted there */ getCurrentToken(): string; /** Gets the status of the current token. */ getTokenStatus(): "noToken" | "ok" | "expired" | "invalid"; /** * Sets the current token. Persists it to cookie until the browser window * * @param token - the authentication token to persist. */ setCurrentToken(token: string | null): void; /** * POSTS data to server and receives back a JSON-message. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new'. * @param data - The data that is posted to the server. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ postJSON(method: string, data: any): Promise; /** * Gets a JSON-message from server using the API * * @param method The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new'. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ getJSON(method: string): Promise; /** * POSTS data to server and receives back a BLOB. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new'. * @param data - The data that is posted to the server. * * @returns A Promise with result blob. Standard Promise rejection to be used for error handling. */ postBLOB(method: string, data: any): Promise; /** * Gets a BLOB from server using the API * * @param method The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new'. * * @returns A Promise with result blob. Standard Promise rejection to be used for error handling. */ getBLOB(method: string): Promise; /** * POSTS data to server and receives back HTML. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new'. * @param data - The data that is posted to the server. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ postHTML(method: string, data: any): Promise; /** * Gets a HTML-message from server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new'. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ getHTML(method: string): Promise; /** * Sends a DELETE-message to server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new'. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ remove(method: string): Promise; /** If missing, append the API server address to the given url method string */ private getUrl; private setAuthorization; private handleErrors; } /** * Provides wrapper methods for communicating with the Palkkaus.fi API. * The raw Ajax-access to the server methods: GET, POST and DELETE * with different return types and authentication / error events. * This is the JQuery based ajax implementation. */ export declare class AjaxJQuery implements Ajax { /** * By default (true) the token is set to salaxy-token -cookie. * Disable cookies with this flag. */ useCookie: boolean; /** * By default credentials are not used in http-calls. * Enable credentials with this flag. */ useCredentials: boolean; /** * The server address - root of the server. This is settable field. * Will probably be changed to a configuration object in the final version. */ serverAddress: string; private token; /** * Creates a new instance of AjaxJQuery */ constructor(); /** Gets the API address with version information. E.g. 'https://test-api.salaxy.com/v03/api' */ getApiAddress(): string; /** Gets the Server address that is used as bases to the HTML queries. E.g. 'https://test-api.salaxy.com' */ getServerAddress(): string; /** * Gets a JSON-message from server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ getJSON(method: string): Promise; /** * Gets a HTML-message from server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result html. Standard Promise rejection to be used for error handling. */ getHTML(method: string): Promise; /** * POSTS data to server and receives back a JSON-message. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * @param data - The data that is posted to the server. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ postJSON(method: string, data: any): Promise; /** * POSTS data to server and receives back HTML. * * @param method - The API method is the url starting from api version, e.g. '/v03/api'. E.g. '/calculator/new' * @param data - The data that is posted to the server. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ postHTML(method: string, data: any): Promise; /** * Sends a DELETE-message to server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ remove(method: string): Promise; /** * Gets the current token. * Will check the salaxy-token cookie if the token is persisted there */ getCurrentToken(): string; /** * Sets the current token. The token is set to cookie called "salaxy-token" or * if the HTML page is running from local computer, it is set to local storage. * * @param token - the authentication token to store. */ setCurrentToken(token: string | null): void; /** * Implements the OAuth2 "Resource Owner Password Credentials Grant" flow (RFC6749 4.3). * This method is not typically used in production web sites - use Implicit Grant instead for client side JavScript (SPAs). * However, it is very useful in development, testing, trusted helpers and server-side scenarios. */ resourceOwnerLogin(username: string, password: string): void; private getJQuery; /** If missing, append the API server address to the given url method string */ private getUrl; } /** * Provides wrapper methods for communicating with the Palkkaus.fi API. * The raw Ajax-access to the server methods: GET, POST and DELETE * with different return types and authentication / error events. * This is the XMLHttpRequest based Ajax implementation. */ export declare class AjaxXHR implements Ajax { /** * By default (true) the token is set to salaxy-token -cookie. * Disable cookies with this flag. */ useCookie: boolean; /** * By default credentials are not used in http-calls. * Enable credentials with this flag (force disabled when the token is set). */ useCredentials: boolean; /** * The server address - root of the server. This is settable field. * Will probably be changed to a configuration object in the final version. */ serverAddress: string; private token; /** * Creates a new instance of AjaxXHR */ constructor(); /** Gets the API address with version information. E.g. 'https://test-api.salaxy.com/v03/api' */ getApiAddress(): string; /** Gets the Server address that is used as bases to the HTML queries. E.g. 'https://test-api.salaxy.com' */ getServerAddress(): string; /** * Gets a JSON-message from server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result data. Standard Promise rejection to be used for error handling. */ getJSON(method: string): Promise; /** * Gets a HTML-message from server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result html. Standard Promise rejection to be used for error handling. */ getHTML(method: string): Promise; /** * POSTS data to server and receives back a JSON-message. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * @param data - The data that is posted to the server. * * @returns A Promise with result. Standard Promise rejection to be used for error handling. */ postJSON(method: string, data: any): Promise; /** * POSTS data to server and receives back HTML. * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * @param data - The data that is posted to the server. * * @returns A Promise with result. Standard Promise rejection to be used for error handling. */ postHTML(method: string, data: any): Promise; /** * Sends a DELETE-message to server using the API * * @param method - The API method is the url path after the api version segments (e.g. '/v03/api') * and starts with a forward slash, e.g. '/calculator/new', or a full URL address. * * @returns A Promise with result. Standard Promise rejection to be used for error handling. */ remove(method: string): Promise; /** * Gets the current token. * Will check the salaxy-token cookie if the token is persisted there */ getCurrentToken(): string; /** * Sets the current token. The token is set to cookie called "salaxy-token" or * if the HTML page is running from local computer, it is set to local storage. * * @param token - the authentication token to store. */ setCurrentToken(token: string | null): void; /** If missing, append the API server address to the given url method string */ private getUrl; private createCORSRequest; } /** AllowanceCode enumeration */ export declare enum AllowanceCode { MealAllowance = "mealAllowance", PartialDailyAllowance = "partialDailyAllowance", FullDailyAllowance = "fullDailyAllowance", InternationalDailyAllowance = "internationalDailyAllowance", TaxExemptReimbursementsAbroad = "taxExemptReimbursementsAbroad" } /** A planned annual Leave - not sure whether it will kept or is it just planned */ export declare interface AnnualLeave { /** Identifies a single leave. */ id?: string | null; /** The planned holiday period. */ period?: DateRange | null; /** Additional information as recorded by the Employer. */ notes?: string | null; } /** Payment related to annual leave: holiday salary, bonus and compensation */ export declare interface AnnualLeavePayment { /** Type of the payment entry */ kind?: AnnualLeavePaymentKind | null; /** The reference date: Typically the Paid at date. The items are typically sorted based on this. */ date?: string | null; /** Days of holidays that are paid or compensated */ holidayDays?: number | null; /** Salary that is paid for holidays */ holidaySalary?: number | null; /** Compensation that is paid for holidays not kept. */ holidayCompensation?: number | null; /** Bonus for either Holiday Salary or Compensation. */ holidayBonus?: number | null; /** If the payment is defined by a calculation, stores the calculation ID. */ calcId?: string | null; /** If true, the payment can be ignored. */ isDisabled?: boolean | null; /** Identifies a single leave. */ id?: string | null; /** The planned holiday period. */ period?: DateRange | null; /** Additional information as recorded by the Employer. */ notes?: string | null; } /** AnnualLeavePaymentKind enumeration */ export declare enum AnnualLeavePaymentKind { Undefined = "undefined", Planned = "planned", ManualSalary = "manualSalary", ManualCompensation = "manualCompensation", ManualBonus = "manualBonus", PaidCalc = "paidCalc", DraftCalc = "draftCalc" } /** Data about the annual leaves planned and used during the holiday year. */ export declare interface AnnualLeaves { /** Planned annual leaves. */ planned?: AnnualLeave[] | null; /** Paid or otherwise handled annual leaves. PRELIMINARY: This property is under revision - it may be moved or renamed without being a breaking change. */ paid?: AnnualLeavePayment[] | null; } /** Defines the automation aspect of API objects: Recurrence / Scheduling and Actions (Alarms in ICalendar). */ export declare interface ApiAutomation { /** Returns true, if the item is recurring */ readonly isRecurring?: boolean | null; /** Identifier of a template (potentially a recurring item) that this object is occurence of. */ occurenceOf?: string | null; /** Gets or sets the recurrence rules to set the recurrence. */ recurrenceRules?: string[] | null; /** For a recurring event, gets or sets the rules for the recurring actions */ actionRules?: CalendarAction[] | null; } /** Result of the check. Both status and possible item are returned. */ export declare interface ApiCheckResultOfInvoiceSettings { /** Status of the check */ status?: ApiCheckStatus | null; /** Result object of the check. Defaults to null. */ item?: InvoiceSettings | null; } /** Result of the check. Both status and possible item are returned. */ export declare interface ApiCheckResultOfWorkerAccountOf { /** Status of the check */ status?: ApiCheckStatus | null; /** Result object of the check. Defaults to null. */ item?: WorkerAccount[] | null; } /** ApiCheckStatus enumeration */ export declare enum ApiCheckStatus { Ignored = "ignored", Success = "success", Warning = "warning", Error = "error" } /** Abstract base class for implementing CRUD objects in the Salaxy API. */ export declare interface ApiCrudObject { /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Result of the import. Both status and possible item are returned. */ export declare interface ApiImportResultOfInvoiceOf { /** Status of the import */ status?: ApiImportStatus | null; /** Result object of the import. Defaults to id of the imported object. */ item?: Invoice[] | null; } /** Result of the import. Both status and possible item are returned. */ export declare interface ApiImportResultOfObject { /** Status of the import */ status?: ApiImportStatus | null; /** Result object of the import. Defaults to id of the imported object. */ item?: any | null; } /** Result of the import. Both status and possible item are returned. */ export declare interface ApiImportResultOfPartnerCompanyAccountInfo { /** Status of the import */ status?: ApiImportStatus | null; /** Result object of the import. Defaults to id of the imported object. */ item?: PartnerCompanyAccountInfo | null; } /** Result of the import. Both status and possible item are returned. */ export declare interface ApiImportResultOfString { /** Status of the import */ status?: ApiImportStatus | null; /** Result object of the import. Defaults to id of the imported object. */ item?: string | null; } /** ApiImportStatus enumeration */ export declare enum ApiImportStatus { Ignored = "ignored", Success = "success", Warning = "warning", Error = "error" } /** ApiItemType enumeration */ export declare enum ApiItemType { Undefined = "undefined", Calculation = "calculation", CalculationPaid = "calculationPaid", Dataset = "dataset", PayrollDetails = "payrollDetails", Invoice = "invoice", EarningsPaymentReport = "earningsPaymentReport", PayerSummaryReport = "payerSummaryReport", Employment = "employment", MessageThread = "messageThread", CalendarEvent = "calendarEvent", ListItems = "listItems" } /** The line item class for search and listing results. Use this class for building user interfaces. */ export declare interface ApiListItem { /** The payload type of the item. */ type?: ApiListItemType | null; /** List item type of the item if the item supports a custom OData interface. */ listType?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: { [key: string]: any; } | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** ApiListItemType enumeration */ export declare enum ApiListItemType { Unknown = "unknown", AccountBase = "accountBase", CompanyAccount = "companyAccount", PersonAccount = "personAccount", WorkerAccount = "workerAccount", Certificate = "certificate", SessionUserCredential = "sessionUserCredential", Onboarding = "onboarding", Profile = "profile", Calculation = "calculation", CalculationPaid = "calculationPaid", ESalaryPayment = "eSalaryPayment", Payment = "payment", EarningsPayment = "earningsPayment", Employment = "employment", WorkerAbsences = "workerAbsences", HolidayYear = "holidayYear", Taxcard = "taxcard", PayrollDetails = "payrollDetails", Invoice = "invoice", Report = "report", BlobFile = "blobFile", PayerSummary = "payerSummary", CalendarEvent = "calendarEvent", Usecase = "usecase", Dataset = "dataset", Article = "article", MessageThread = "messageThread", EmailMessage = "emailMessage", AccountProducts = "accountProducts", VarmaPensionOrder = "varmaPensionOrder", IfInsuranceOrder = "ifInsuranceOrder", Historical = "historical" } /** ApiValidation object that is specialized for list items. Provides if and index properties for connecting a validation to a specific item in the list */ export declare interface ApiListItemValidation { /** Identifier of the item this validation is for. Identifiers are not always available (if the item has not been saved), so index is a more generic approach. */ id?: string | null; /** Zero based index of the item this validation is for. */ index?: number | null; /** If true, the data is valid - no errors. */ readonly isValid?: boolean | null; /** If true, has required fields missing data. */ readonly hasAllRequiredFields?: boolean | null; /** Validation errors on invalid field values. Note that required fields missing error messages are not here. Only the invalid values. */ readonly errors?: ApiValidationError[] | null; } /** Helpers for working with the API */ export declare class ApiLogic { /** Gets the type string for an API item type enumeration. */ static getType(apiListItem: ApiItemType): string; } /** ApiTestErrorType enumeration */ export declare enum ApiTestErrorType { Default = "default", UserFriendly = "userFriendly" } /** Common base class / interface for data validation. */ export declare interface ApiValidation { /** If true, the data is valid - no errors. */ readonly isValid?: boolean | null; /** If true, has required fields missing data. */ readonly hasAllRequiredFields?: boolean | null; /** Validation errors on invalid field values. Note that required fields missing error messages are not here. Only the invalid values. */ readonly errors?: ApiValidationError[] | null; } /** Validation errors used in API output. */ export declare interface ApiValidationError { /** Full path to Name of the property / field (Member name in JSON). This may be null/empty for type General. */ key?: string | null; /** High level type: Specifies the relation to object and its Member. */ type: ApiValidationErrorType; /** Validation error message in the requested language. */ msg: string; /** Validation error long description in the requested language. */ description?: string | null; /** Some error providers may have a unique technical code for error or validator */ code?: string | null; } /** ApiValidationErrorType enumeration */ export declare enum ApiValidationErrorType { General = "general", Required = "required", Invalid = "invalid", Warning = "warning" } /** * Supports the UserSession object by providing additional information about the status * of fetching the session, data, expiration etc. */ export declare interface AppStatus { /** If true, the session check from server is in progress */ sessionCheckInProgress: boolean; /** * Indicates that we are running in test environment with test data. * This information is typically available already before the session is available and may be used in login / register. * Null indicates that the information is not available. This should typically be considered false for security. */ isTestData: boolean | null; /** * PLACEHOLDER: Indicates that the session has expired (as opposed to not checked yet). * This property has not yet been implemented. */ sessionExpired?: boolean; /** * Application specific roles that are set on the client (browser code) * as opposed to normal server-side defined roles. */ clientRoles: string[]; } /** * Helpers for handling arrays. */ export declare class Arrays { /** * Takes in an array or string or null and always returns an array. * If the incoming value is a string, splits it by commas. This is especaially useful for HTML attributes. * Note that null (or other falsy objects) are returned as an empty array. * * @param arrayCandidate - A string array or string that is split by comma. */ static assureArray(arrayCandidate: string | string[]): string[]; /** * Calculates a sum of array items. * Null items will be added as zero. * @param array Array to sum * @param selector Selector for a number to sum. */ static sum(array: T[], selector: (item: T) => number): number; /** * Sequence generator function gets an array between two numbers (inclusive). * (commonly referred to as "range", e.g. Clojure, PHP etc) * @param start Start number of the sequence * @param stop End number of the sequence * @param step Step between the numbers, default is 1. * @example * Arrays.getRange(2019, 2023); * // [2019, 2020, 2021, 2022, 2023] */ static getRange(start: number, stop: number, step?: number): number[]; /** * Does a group-by of an array of objects with given key. * @param source The source array. * @param selector Selector for the key in the array. * @returns An object that is the array grouped by the keys. */ static groupBy(source: T[], selector: (x: T) => string): ({ [key: string]: T[]; }); } /** Request model for Assertion demo */ export declare interface AssertionDemoCertificateRequest { /** Certificate bytes as Base64String */ certificateBytes?: string | null; /** Certificate password for signing. */ password?: string | null; /** Account to impersonate as: Will be set as sub in the token. */ subject?: string | null; /** Potential proxy (partner) account that is in between the current user and the subject. Will be set as salaxy_proxy_act in the token. */ proxyActor?: string | null; /** E-mail for the user / credential that is using the system. Will be set as salaxy_user.email. */ userEmail?: string | null; } /** Response model for Assertion demo */ export declare interface AssertionDemoCertificateResponse { /** Token as string */ token?: string | null; /** Token decoded for deisplay purposes. */ tokenDecoded?: any | null; /** If there is an error creating hte certificate, it is displayed here. */ error?: string | null; } /** Request to assure that a company account exists: Either an account is returned or an account stub (non-verified) will be created. */ export declare interface AssureCompanyAccountRequest { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 */ officialId: string; /** The account identifier at the partner site. If present, this ID is used to restrict the authorization to one account at partner site only. */ partnerAccountId?: string | null; /** Contact e-mail */ email?: string | null; /** Telephone number for the contact person */ telephone?: string | null; /** First name of the contact person */ contactFirstName?: string | null; /** Last name of the contact person */ contactLastName?: string | null; /** The primary partner account for the new company to create. If the company already exists and has given authorization to the primary partner, and does not have any primary partner, the primary partner will be set. Please note, that the calling account must have the authorization to the primary partner account, or be the primary partner itself. */ proxyPartner?: string | null; /** Language preference. */ language?: Language | null; } /** Attachment. */ export declare interface Attachment { /** Name of the attachment. E.g. monthly-details-2018-01.pdf */ fileName?: string | null; /** Content for data. */ contentId?: string | null; } /** Component attribute */ export declare interface AttributeDoc extends DeclarationReflection { /** HTML attribute name e.g. my-prop for myProp. */ attr?: string; /** Angular JS binding type */ binding?: "<" | "@" | "=" | "&"; /** Typedoc reflection type of the memeber. */ type?: any; /** Controller that implements the property */ controller?: string; } /** AuthenticationMethod enumeration */ export declare enum AuthenticationMethod { Undefined = "undefined", EmailPwdLocal = "emailPwdLocal", Facebook = "facebook", Google = "google", Microsoft = "microsoft", LinkedIn = "linkedIn", Auth0Database = "auth0Database", X509 = "x509", Salaxy = "salaxy", Test = "test", WebAuthn = "webAuthn", MicrosoftOAuth = "microsoftOAuth", GoogleOAuth = "googleOAuth", InternalLocalhost = "internalLocalhost" } /** A person or other party that authorized the current person. */ export declare interface Authority { /** Name of the authority. */ name?: string | null; /** Telephone number of the person. This is currently optional. Idea is to send SMS invitations in some scenarios. */ telephone?: string | null; /** E-mail of the person. This is currently not used, but is expected to be used in the future. So fill it in as it was required unless you have very compelling reasons. */ email?: string | null; /** Finnish Person ID is the key to signature. This is currently always required. */ personalId?: string | null; /** The Palkkaus.fi Account ID. This is optional and should not be set if the ID is the same as the target account / Person. */ accountId?: string | null; /** Date for the authorization. */ authorizedAt?: string | null; } /** Contract / authorization document that is the bases for Salaxy acting in behalf of this account */ export declare interface AuthorizationContract { /** Time when the contract was signed */ signedAt?: string | null; /** If true, there is a valid authorization - the account has been validated. */ isSigned?: boolean | null; /** Type of the authorization */ authorizationType?: AuthorizationType | null; /** A person or other party that authorized the current person. */ authorizedBy?: Authority | null; } /** * Parameters for different authorization PDF files */ export declare interface AuthorizationPdfParams { /** * Unique ID. Curently, this is the onboarding ID. * NOTE: This is historically nullable (for backward compatibility). Will eventually be required. */ id?: string; /** Type of authorizatiopn PDF file */ type: AuthorizationPdfType; /** Language of the user / PDF */ language: Language; /** Full name of the person or company of authorization */ name: string; /** * Finnish Personal ID or Company ID. * This ID is not validated as it may be dummy in preview scenarios. * May be empty in preview scenarios. */ officialId?: string | null; /** The person who signs the contract. */ signer: AuthorizationPdfSigner; /** Type of the account to be created. */ accountType?: WebSiteAccountType; /** Partner that should be added as primary authorization when the object is created. */ authorizePartner?: string | null; /** Authorization signing time*/ signedAt: string; /** Company data for the KYC document. */ companyData?: any; } /** The person who signs the contract. */ export declare interface AuthorizationPdfSigner { /** * Name of the person */ name: string; /** * Telephone number of the person. This is currently optional. */ telephone?: string | null; /** * E-mail of the person. This is currently optional. */ email?: string | null; /** * Finnish Person ID is the key to signature. This is currently always required except in preview scenarios. */ personalId?: string | null; /** Technical text that describes the authentication process. Added to the signature TEXT, currently not available in companies. */ authText?: string | null; /** The reason for digital signature. Added to the signature, currently not available in companies. */ reason?: string | null; } /** * Type of authorizatiopn PDF file */ export declare enum AuthorizationPdfType { /** * Generic PDF template for Employer / Worker */ Person = "person", /** * Company authorization (employer). */ Company = "company" } /** AuthorizationStatus enumeration */ export declare enum AuthorizationStatus { Undefined = "undefined", OK = "oK", AccessDenied = "accessDenied", ExpiredOauthToken = "expiredOauthToken", InvalidOAuthToken = "invalidOAuthToken", NoOauthToken = "noOauthToken" } /** AuthorizationType enumeration */ export declare enum AuthorizationType { None = "none", EmployerAuthorization = "employerAuthorization", WorkerContract = "workerContract", CompanyContract = "companyContract", Manual = "manual", Temporary = "temporary" } /** * Provides CRUD access for authenticated user to access a his/her own authorized accounts */ export declare class AuthorizedAccounts extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Returns an empty avatar without any values. */ getBlank(): AuthorizedAvatar; /** * Lists all accounts on behalf of which this account has been authorized to act. * * @returns A Promise with result data (list of account objects). */ getAuthorizingAccounts(): Promise<(PersonAccount | CompanyAccount)[]>; } /** Avatar for authorized account. */ export declare interface AuthorizedAvatar { /** Optional ID for partner authorization. Used to restrict the authorization based on Partner data (typically user account, role etc.). Current implementation compares this to partnerAccountId and allows acces only if the two match. */ partnerKey?: string | null; /** The time when the authorization was done */ authorizedAt?: string | null; /** Scope for the account authorization. The value of the scope is expressed as a list of space-delimited, case-sensitive strings. */ scope?: string | null; /** Entity type: person/company */ entityType?: LegalEntityType | null; /** First name or company name */ firstName?: string | null; /** Last name, for companies, this should be null */ lastName?: string | null; /** Display name. For a person this is 'FirstName LastName' (auto-created). */ displayName?: string | null; /** Sortable name for ordered lists etc. For a person this is 'LastName, FirstName' (auto-created). Depending on the data storage, this may be all-lowercase for easier sorting and search. */ sortableName?: string | null; /** Type of the Avatar picture. */ pictureType?: AvatarPictureType | null; /** Color - currently only used by type Icon */ color?: string | null; /** Initials - currently only used by type Icon */ initials?: string | null; /** URL of the picture if specified as picture (null in a case of type Icon) */ url?: string | null; /** Short description of the user. This may be overriden by a context specific value by the business logic. */ description?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Defines an avatar for an account, profile etc. - mainly the image that should be shown, names and short description */ export declare interface Avatar { /** Entity type: person/company */ entityType?: LegalEntityType | null; /** First name or company name */ firstName?: string | null; /** Last name, for companies, this should be null */ lastName?: string | null; /** Display name. For a person this is 'FirstName LastName' (auto-created). */ displayName?: string | null; /** Sortable name for ordered lists etc. For a person this is 'LastName, FirstName' (auto-created). Depending on the data storage, this may be all-lowercase for easier sorting and search. */ sortableName?: string | null; /** Type of the Avatar picture. */ pictureType?: AvatarPictureType | null; /** Color - currently only used by type Icon */ color?: string | null; /** Initials - currently only used by type Icon */ initials?: string | null; /** URL of the picture if specified as picture (null in a case of type Icon) */ url?: string | null; /** Short description of the user. This may be overriden by a context specific value by the business logic. */ description?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** AvatarPictureType enumeration */ export declare enum AvatarPictureType { Icon = "icon", Uploaded = "uploaded", Gravatar = "gravatar" } /** BankPaymentType enumeration */ export declare enum BankPaymentType { Unknown = "unknown", Error = "error", PaytrailBatch = "paytrailBatch", NetvisorPayment = "netvisorPayment", SalaryGrossPayment = "salaryGrossPayment", RefundPayment = "refundPayment", PartialRefundPayment = "partialRefundPayment", DoubleRefundPayment = "doubleRefundPayment", TransferToEcfaPayment = "transferToEcfaPayment", InsuranceGrossPayment = "insuranceGrossPayment", NetSalary = "netSalary", SalaryAdvance = "salaryAdvance", NetSalaryRepayment = "netSalaryRepayment", NetSalaryCorrection = "netSalaryCorrection", TaxAccount = "taxAccount", Tvr = "tvr", TvrRfnd = "tvrRfnd", PalkkausFees = "palkkausFees", BankFees = "bankFees", PaytrailFees = "paytrailFees", InsuranceLahiTapiola = "insuranceLahiTapiola", Tyel = "tyel", TyelEteraContract = "tyelEteraContract", TyelEteraTemp = "tyelEteraTemp", TyelEteraUnknown = "tyelEteraUnknown", TyelEloContract = "tyelEloContract", TyelEloTemp = "tyelEloTemp", TyelEloInitialImport = "tyelEloInitialImport", TyelVarmaContract = "tyelVarmaContract", TyelVarmaTemp = "tyelVarmaTemp", TyelIlmarinenContract = "tyelIlmarinenContract", TyelIlmarinenTemp = "tyelIlmarinenTemp", Union = "union", UnionRaksa = "unionRaksa", Foreclosure = "foreclosure", SaldoYearBegin = "saldoYearBegin", SaldoYearEnd = "saldoYearEnd" } /** * Helpers for generating barcode values. * Using format Code 128 (Uniform Symbology Specification) * with Modulo 103 algorithm for generating checksum. * * @see http://www.finanssiala.fi/maksujenvalitys/dokumentit/Bank_bar_code_guide.pdf * @see http://www.finanssiala.fi/maksujenvalitys/dokumentit/Pankkiviivakoodi-opas.pdf */ export declare class Barcodes { /** * Creates a value for barcode labels. Does not calculate the checksum by default. * Most libraries, which generate barcode labels, add the checksum and start and stop sequences automatically, * and those are not needed to be calculated externally. * * @param iban - IBAN bank account number. Must be a Finnish IBAN. Can have whitespace. * @param ref - Reference number as a string. Either fully numeric (max len 20), or starting with RF (max len 2+23). * Can have whitespace. * @param dueDate - Date as ISO date (yyyy-MM-dd). False fills values with zeros. * @param euroAmount - Euro amount. If string, e.g. 3030,33€, is converted to cents amount 303033. * Alternative can be passed cents amount as number. * @param includeChecksum - Calculates and appends the checksum to the end of the barcode value. * * @returns The barcode value (without start and end characters). The checksum is only calculated and appended to the value if the includeChecksum-parameter is true. */ static getValue(iban: string, ref: string, dueDate: string | false, euroAmount: number | string, includeChecksum?: boolean): string; /** * Takes in 54 characters string value and calculates modulo 103 value. * * @param val - 54 characters long string of numbers * * @returns A Number within range of 0-99. Reminder of dividing the sum total of weighted value pairs with 103. */ static modulo103(val: string): number; /** * Creates a barcode SVG string based on the provided parameters. * @param getDocumentAndSvgNode - The document and SVG node to render the barcode on. * @param iban - The IBAN number. * @param ref - The reference number. * @param dueDate - The due date. * @param euroAmount - The euro amount. * @param barcodeOptions - The options for the barcode (width, height, displayValue, fontSize). * @param barcodeOptions.width - Width of the barcode. * @param barcodeOptions.height - Height of the barcode * @param barcodeOptions.displayValue - Whether to display the value of the barcode. * @param barcodeOptions.fontSize - Fontsize of the barcode. * @returns The SVG string of the created barcode. */ static createBarcode(getDocumentAndSvgNode: () => any, iban: string, ref: string, dueDate: string, euroAmount: number, barcodeOptions: { width: number; height: number; displayValue: boolean; fontSize: number; }): string; } /** * Wrapper around js-base64 library provides basic methods for Base64 encoding / decoding. * Use this wrapper instead of methods directly to assure compatibility with both browser and Node. * TODO: Consider switching to native methods: separate for broser and Node. */ export declare class Base64 { /** * Encodes a string with Base64 encoding. * @param text The text that should be encoded. * @returns The base64 encoded string. */ static encode(text: string): string; /** * Encodes a string with Base64 URL encoding. * @param text The text that should be encoded. * @returns The base64 URL encoded string. */ static encodeUrl(text: string): string; /** * Decodes a Base64 encoded string. Wrapper around js-base64 library. * @param text The Base64 encoded string to be decoded * @returns The decoded string. */ static decode(text: string): string; /** * Creates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is treated as a byte of binary data). * Corresponds to browser btoa() method. * @param text The binary array that should be encoded. * @returns The base64 encoded string. */ static btoa(text: string): string; /** * Decodes a Base64 encoded string as binary bytes. The same as browser atob. * @param text The Base64 encoded string to be decoded * @returns The decoded bytes array. */ static atob(text: string): string; /** * Creates a Base64-encoded ASCII string from a Uint8Array (e.g. `new Uint8Array()` of `ArrayBuffer`). * @param array The ASCII int array that should be encoded. * @returns The base64 encoded string. */ static fromUint8Array(array: Uint8Array): string; /** * Decodes a Base64 encoded string as an ASCII array. * @param text The Base64 encoded string to be decoded * @returns The result as an ASCII array. */ static toUint8Array(text: string): Uint8Array; } /** First version of the product that integrates the Palkkaus.fi-salary payments to employers accounting. */ export declare interface BaseSalaryProduct { /** If true, worker salary and expense payments are paid directly by the employer. */ isWorkerSelfHandling?: boolean | null; /** Receiver's address for the e-invoice. */ eInvoiceReceiver?: string | null; /** Receiver's operator for the e-invoice. */ eInvoiceIntermediator?: string | null; /** SEPA maksatustunnus */ sepaBankPartyId?: string | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** The status text that should give the user. Restrict the length to 56 characters. */ readonly status?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If true, the product is enabled for the current user */ enabled?: boolean | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** * Client-side logic for Usecase. */ export declare abstract class BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param _row Row to update. * @param _date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. * @param _calcData The calculation related data that is required by the more complex calculations: * This data is available only after first round-trip to the server (results object exists) and not all user interfaces may provide this. */ updateUsecase(_row: UserDefinedRow, _date: DatelyObject, _calcData: RowUsecaseCalcData): void; /** * Gets validation message for the usecase. * @param row Row to validate * @returns A message that is either an error or OK (default). Warnings, info etc. may later be supported. */ getValidation(row: UserDefinedRow): UsecaseValidationMessage; /** Internal validation method that deriving classes should implement. */ protected abstract getUcValidation?(row: UserDefinedRow): UsecaseValidationMessage; /** * Returns true if the row type supports negative values. * Typically, this means that the sum of all rows must still be zero or positive. * @param rowType Row type to check */ private canHaveNegativeRow; } /** Name and ids of the owner and the number/percent of shares. */ export declare interface BeneficialOwner { /** Owned number of shares. */ numberOfShares?: number | null; /** Owned percent of shares. */ percentOfShares?: number | null; /** Address. */ address?: string | null; /** Avatar for the account */ avatar?: Avatar | null; /** Official id of the person or company. */ officialId?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; } /** Contains lists of beneficial owners and other beneficiaries of the company. */ export declare interface BeneficialOwners { /** Additional info about the owned company, e.g. the total number of shares. */ ownedCompanyDetails?: OwnedCompanyInfo | null; /** List of beneficial owners of the company. */ owners?: BeneficialOwner[] | null; /** List of other beneficiaries than beneficial owners of the company */ beneficiaries?: Beneficiary[] | null; /** The workflow data for manual editing and approval purposes. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides CRUD access for beneficiary owners */ export declare class BeneficialOwnersApi extends SingleItemApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); } /** Other beneficiary of the company than beneficial owner. */ export declare interface Beneficiary { /** Nationality of the beneficiary. */ nationality?: string | null; /** Avatar for the account */ avatar?: Avatar | null; /** Official id of the person or company. */ officialId?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; } /** BenefitCode enumeration */ export declare enum BenefitCode { AccommodationBenefit = "accommodationBenefit", TelephoneBenefit = "telephoneBenefit", MealBenefit = "mealBenefit", OtherBenefits = "otherBenefits" } /** * Helper for resolving the Bank Identifier Codes. */ export declare class BicHelper { /** * Returns the Bank Identifier Code (BIC) for the given IBAN. * @param iban IBAN as string * @returns Bank Identifier Code (BIC) for the given IBAN */ static getBicForIban(iban: string): string; private static resolveBic; /** * https://www.finanssiala.fi/maksujenvalitys/dokumentit/Suomalaiset_rahalaitostunnukset_ja_BIC-koodit.pdf */ private static fiBics; } /** BicycleBenefitKind enumeration */ export declare enum BicycleBenefitKind { Undefined = "undefined", NoDeduction = "noDeduction", SingleDeduction = "singleDeduction", PeriodicalDeduction = "periodicalDeduction" } /** Handles the Calculation of CalculationRowType.BicycleBenefitUsecase to IrRows */ export declare interface BicycleBenefitUsecase { /** Deduction from salary */ deduction?: number | null; /** Taxable amount of the benefit. */ taxable?: number | null; /** Number of periods if Kind is PeriodicalDeduction. Otherwise this value is null. */ periodDivider?: number | null; /** Primary subtyping of the usecase. */ kind?: BicycleBenefitKind | null; } /** Client-side logic for BicycleBenefitUsecase */ export declare class BicycleBenefitUsecaseLogic extends BaseUsecaseLogic { private _calculatedTaxable; private _calculatedTaxfree; private _row; private _date; /** Returns calculated taxable value. */ get calculatedTaxable(): number; /** Returns calculated taxfree value */ get calculatedTaxfree(): number; /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. */ updateUsecase(row: UserDefinedRow, date: DatelyObject): void; /** * Gets validation message for the usecase. * @param row Row to validate * @returns A message that is either an error or OK (default). Warnings, info etc. may later be supported. */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** The BlobFile stores metadata about miscellaneous BLOB-files that are stored to the system. For example Receipts and Authorizations. */ export declare interface BlobFile { id?: string | null; /** The logical container - first level folder for the file. */ container?: BlobRepository | null; /** Strongly typed logical type of the file. For user files, this is a sub folder. */ type?: BlobFileType | null; /** File type (mime type etc.) based on the ending of the file name. Null for folders. */ readonly fileType?: FileType | null; /** A user friendly name that can be used in listings. In the upload scenarios this is usually the original file name when uploaded. It is not necessarily unique. No path information */ userFriendlyName?: string | null; /** Technical file name in storage. In practical terms, this is the relative path excluding the container part "/[container]/". I.e. this property is without the starting slash "/". It must be unique and is used for Uri. For user files this is constructed "[Username]/[Type]/[UniqueFileName].[xxx]" */ filePath?: string | null; /** Full unique URI in the storage */ blobUri?: string | null; /** If created, contains uri to a PNG image for preview purposes. */ previewUri?: string | null; updatedAt?: string | null; /** The length of the file in bytes. */ length?: number | null; /** If true, this is a collection (folder in file system) */ isCollection?: boolean | null; metadata?: BlobFileMetadata | null; /** The workflow data for manual editing and approval purposes. */ workflowData?: WorkflowData | null; } /** Metadata related to blob files as a strongly typed object. */ export declare interface BlobFileMetadata { /** Whether the document is digitally signed (or manually checked as being signed). At the time of writing, this is used only for AuthorizationPdf documents. */ isSigned?: boolean | null; /** Logical date for the file. E.g. first of the month for a monthly report. */ logicalDate?: string | null; /** Subtype is internal typing within a BlobFileType. This may or may not be a sub-folder. There is no enumeration on File level - there may be one under services specific to one BlobFileType. */ subType?: string | null; /** Avatar object related to the report. For example for the salary payments this is the other party (employer or worker) */ avatar?: Avatar | null; /** Identifier of the original calculation etc. business object. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. */ payment?: number | null; /** Arbitrary metadata. */ data?: { [key: string]: any; } | null; } /** BlobFileType enumeration */ export declare enum BlobFileType { Unknown = "unknown", AuthorizationPdf = "authorizationPdf", Avatar = "avatar", TaxCard = "taxCard", ExpensesReceipt = "expensesReceipt", Raksaloki = "raksaloki", Template = "template", EInvoice = "eInvoice", Temporary = "temporary", Settings = "settings", Messages = "messages", Record = "record", MonthlyReport = "monthlyReport", YearlyReport = "yearlyReport", CalcReport = "calcReport" } /** BlobRepository enumeration */ export declare enum BlobRepository { UserFiles = "userFiles", VersionHistory = "versionHistory", SystemFiles = "systemFiles", Payload = "payload", Reports = "reports", CdnImages = "cdnImages", Iam = "iam", GitContent = "gitContent", FileSystemContent = "fileSystemContent" } /** BoardKind enumeration */ export declare enum BoardKind { Undefined = "undefined" } /** Handles the Calculation of CalculationRowType.Board to IrRows */ export declare interface BoardUsecase { /** Primary subtyping of the usecase. */ kind?: BoardKind | null; } /** * BoardUsecase currrently has no client-side logic: * It just forces the IR code to 308 */ export declare class BoardUsecaseLogic extends BaseUsecaseLogic { /** Gets validation message for BoardUsecaseLogic */ getUcValidation(): UsecaseValidationMessage; } /** BootstrapStyle enumeration */ export declare enum BootstrapStyle { Default = "default", Primary = "primary", Success = "success", Info = "info", Warning = "warning", Danger = "danger" } /** * Utility for accessing brand specific style definitions. */ export declare class Brand { /** * Returns the brand color defined as a global variable. * * @param color - Named brand color to get. * @param format - Color format: hex like '#289548', rgb like 'rgb(40, 149, 72)' or rgba like 'rgba(40, 149, 72, 1.0'. Default value is hex. */ static getBrandColor(color: "primary" | "success" | "info" | "warning" | "danger", format?: "hex" | "rgb" | "rgba"): string; /** * Returns the css global style variable. * E.g. --salaxy-brand-primary * @param variableName - Variable name. */ static getStylePropertyValue(variableName: string): string; /** * Returns the hex color value as rgb css function. * For example: value '#289548' as 'rgba(40, 149, 72)' * * @param hexValue - Hex value. */ static hex2rgb(hexValue: string): string; /** * Returns the hex color value as rgba css function. * For example: value '#289548ff' as 'rgba(40, 149, 72, 1)' * * @param hexValue - Hex value. */ static hex2rgba(hexValue: string): string; /** * Returns the rgb value as hex string. * For example: 40, 149, 72 as #289548. * * @param r - red parameter. * @param g - green parameter. * @param b - blue parameter. */ static rgb2hex(r: number, g: number, b: number): string; /** * Returns the rgba value as hex string. * For example: 40, 149, 72, 1 as #289548ff. * * @param r - red parameter. * @param g - green parameter. * @param b - blue parameter. * @param a - alpha parameter. */ static rgba2hex(r: number, g: number, b: number, a: number): string; private static hex2rgbaValues; } /** Brand specific business data for index. */ export declare interface BrandData { /** Url to logo. */ logo?: string | null; /** Css path. */ skin?: string | null; } /** Represents a single item in a list of brands. */ export declare interface BrandListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: BrandData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Cfa allocations. */ export declare interface CalcCfa { /** The date and time of allocation. This is always UTC. */ updatedAt?: string | null; /** The worker net salary which is booked to the customer funds account. */ net?: number | null; /** The tax amount which is booked to the customer funds account. */ tax?: number | null; /** The pension amount which is booked to the customer funds account. */ pension?: number | null; /** The Palkkaus service which is booked to the customer funds account. */ service?: number | null; /** The Palkkaus fee which is booked to the customer funds account. */ fee?: number | null; /** The total payment booked to the customer funds account. */ readonly total?: number | null; } /** Employer of a calculation */ export declare interface CalcEmployer { /** Display image information and type of employer. NOTE: Recalculate-method retains the values for display purposes if AccountId or IsSelf is not set. This is mainly for demo and testing in anonymous mode. However, in storage methods, the value is reset based on values of AccountId or IsSelf even if they are not set: Anything stored in Avatar will be ignored. */ avatar?: Avatar | null; /** The Palkkaus.fi Account identifier for the Employer. */ accountId?: string | null; /** True if Profile is the current Authorization. If set to true, will set current Authorization as this contract party. This overrides any value in AccountId, so be sure to switch this back to false if this is switchable. Setting to False does not have any immediate effect. */ isSelf?: boolean | null; /** Current address of the employer. Please note that this is a read only field. */ contact?: Contact | null; /** Official id of the person or company. Please note that this is a read only field. */ officialId?: string | null; } /** CalcGroup enumeration */ export declare enum CalcGroup { Undefined = "undefined", BaseSalary = "baseSalary", SalaryAdditions = "salaryAdditions", Benefits = "benefits", Expenses = "expenses", Deductions = "deductions", OtherNoPayment = "otherNoPayment", Totals = "totals", Disabled = "disabled" } /** Informational object that stores data about the salary calculation / payment that is not directly related to calculating the salary. */ export declare interface CalcInfo { /** Start date of the work */ workStartDate?: string | null; /** End date of the work */ workEndDate?: string | null; /** Description of the work for reporting purposes. Max 32 chars. */ workDescription?: string | null; /** Message from worker to employer - when worker sends the salary calculation to the employer. */ workerMessage?: string | null; /** Message which will be displayed in the payslip. */ salarySlipMessage?: string | null; /** Payment reference number in payment service */ paymentId?: string | null; /** Original Payment reference number */ originalPaymentId?: string | null; /** Channel that is used for payment. */ paymentChannel?: PaymentChannel | null; /** Application id for invoicing etc. purposes. */ applicationId?: string | null; /** The MessageThread Id, if this calculation is referred in a message thread. */ messageThreadId?: string | null; /** Assumed earnings payment report date for the report. */ reportDate?: string | null; /** Notes related to the payment and other backoffice operations: For example the justification why the sum is in calculation vs. Paytrail payment. */ backofficeNotes?: string | null; /** Occupation classification, used at least for Accident insurance purposes, but may be used for other reporting. For Finnish Salaries use the Statistics Finland "Classification of Occupations 2010" (TK10): https://www.stat.fi/meta/luokitukset/ammatti/017-2018-05-15/index_en.html */ occupationCode?: string | null; /** Secondary occupation classification. Some earnings payment reports may require two occupation codes. */ occupationCode2?: string | null; /** Calculated pension insurance payment date. */ pensionPaymentDate?: string | null; /** Pension insurance reference number. */ pensionPaymentRef?: string | null; /** Pension insurance payment specifier. */ pensionPaymentSpecifier?: string | null; /** The Payroll Id, if this calculation is part of a Payroll list. */ payrollId?: string | null; /** Cost center for reporting purposes. */ costCenter?: string | null; /** Identifier of the worker in a source system. Used in imports etc. This is automatically set from the source id of the employment. */ workerSourceId?: string | null; /** Identifier of the calculation in a source system. Used in imports etc. */ sourceId?: string | null; } /** * Report types that are available for calculations as stand-alone (typically pop-up dialog) */ export declare type calcReportType = "salarySlip" | "employerReport" | "paymentReport" | "paymentSummaryReport" | "accountingReport" | "totalsReport" | "rowsReport" | "irRows"; /** * Configuration for user interface of a Calculation row type: Either built-in or custom. * TODO: Should be moved to server side */ export declare interface CalcRowConfig { /** Name / unique identifier of the row type. */ name: string; /** The built-in row type */ rowType: CalculationRowType; /** The type string, e.g. "/builtIn/salary" or "/custom/boardMember" */ type: string; /** Order number in the lists */ order: number; /** Label for the row type */ label?: string; /** Description for the row type */ descr?: string; /** More info HTML */ moreInfo?: string; /** Categorization of the row types. */ category: CalculationRowCategory; /** * Favorite row types and their sort order. * This is currently fixed, but may later be based on user profile (e.g. most used types). */ favorite?: number | null; /** Color is based on the category */ color: string; /** * Icon short text is 1-5 characters suitable for icon. * Has 5 characters only if very narrow, e.g. "1" and comma - typically 2-3 chars. */ iconText?: string; /** If the row has a kind selection (the main subtype), definition of the subtypes. */ kind?: CalcRowKindsConfig; /** Group is the first "folder" in the name. Currently either "builtIn" or "custom", but later may have other groupings (e.g. employment groups or just free text). */ group: "builtIn" | "custom"; /** Price input */ price: { /** Label for the input */ label?: string; /** Default value */ default?: number; /** Type of the input control to use */ input?: "number" | "hidden" | "readOnly"; }; /** Amount input */ amount: { /** Label for the input */ label?: string; /** Default value */ default?: number; /** Type of the input control to use */ input?: "number" | "hidden" | "readOnly"; /** Default unit */ unit?: CalculationRowUnit; /** Allowed units. If not set, only default unit allowed. */ units?: CalculationRowUnit[]; }; /** The total input or read-only field. */ total: { /** Type of the input control to use */ input?: "number" | "hidden" | "readOnly"; }; /** This is only info field for ui */ incomeTypes?: number[]; } /** * Defines a single row kind (sub type) within a row type. */ export declare interface CalcRowKindConfig { /** Text value of the enumeration (lowerCamelCase) */ name: string; /** Sorting order number of the value within the enum. */ order: number; /** Label of the enumeration if the translations have been applied. */ label?: string; /** Description of the kind. */ descr?: string; /** Price for the kind. */ price?: string; } /** Describes the set of kinds (sub types) used by a row type. */ export declare interface CalcRowKindsConfig { /** * Name of the base enumeration (as defined in the usecase / built-in type). * This is not unique in custom row types. */ name?: string; /** Values of the enumeration. */ values?: CalcRowKindConfig[]; } /** * Provides business logic for Calculation rows: * How to create user interfaces, reports etc. based on them and their categories. */ export declare class CalcRowsLogic { /** * Gets a single UI configuration for Calculation row (built-in row types only). * Searches through all row types without role filtering. * @param type Type for which the configuration is fetched. */ static getRowConfig(type: CalculationRowType): CalcRowConfig; /** * Gets an indicator string (1-2 characters) for a unit. * @param unit Unit that should be described. * @returns Given unit indicator or null if none is matched (convert to empty string if necessary). */ static getUnitIndicator(unit: CalculationRowUnit | Unit | string, language?: Language): string; /** Gets the row configuration for row type "unknown". */ static getUnknownConfig(): CalcRowConfig; /** Row configuration for unknown row type. */ private static unknownRowConfig; private role; private settings; /** * Creates a new CalcRowsLogic helper wichh adapts to role logic (company/household). * @param settings The company account settings that may contain company specific roles or just a role marker for "household". */ constructor(settings?: CompanyAccountSettings | "household" | "company"); /** * Gets the custom row configs from company settings if provided in the constructor. */ getCustomRowConfigs(): CalcRowConfig[]; /** * Gets the row types by category. * The instance methods filter types based on role. * @param category Category to fetch */ getRowTypesByCategory(category: CalculationRowCategory): CalculationRowType[]; /** * Gets the row configurations by category(ies). * The instance methods filter types based on role. * @param categories List of categories to filter by. */ getRowConfigsByCategory(categories: CalculationRowCategory[]): CalcRowConfig[]; /** * Gets the row configurations based on a list of row types. * The instance methods filter types based on role. * @param types List of types to filter by. */ getRowConfigsByType(types: CalculationRowType[]): CalcRowConfig[]; /** * Gets a single UI configuration for Calculation row. * This method filters for user role. Use static method to return any row configuration (also faster). * The instance methods filter types based on role. * @param type Type for which the configuration is fetched. */ getRowConfig(type: CalculationRowType): CalcRowConfig; /** * Gets all the UI configuration objects for calculation rows. * Caches the data based on role and language. */ getRowConfigs(): CalcRowConfig[]; /** Gets all the row configs cached for each language if language changes. */ static getBuiltInRowConfigs(): CalcRowConfig[]; /** Raw classification of row types to primary categories. */ static rowsByCategory: { /** Base salary types: the ones that you define directly */ salary: CalculationRowType[]; /** Additions to base salary - typically a percentage of base salary */ salaryAdditions: CalculationRowType[]; /** Benefits: Not paid as money but taxable income */ benefits: CalculationRowType[]; /** Expenses and other non-taxed compensations */ expenses: CalculationRowType[]; /** Holidays */ holidays: CalculationRowType[]; /** Deductions */ deductions: CalculationRowType[]; /** Types that are used only as temporary / input types in Calculations - not in the results. */ salaryCalc: CalculationRowType[]; /** Other row types */ other: CalculationRowType[]; }; private static rowsCache; /** Converts a raw excel generated row configuration to language-versioned JSON object. */ private static getRowConfigInternal; } /** * Calculation rows configuration: categories, UI elements etc. * The texts are stored in translations. */ export declare const calcRowsMetadata: Partial[]; /** Tax card information stored as part of the Calculation object */ export declare interface CalcTax { /** Identifier for a stored tax card if one is applied to this calculation. System updates the TaxCardId automatically in Recalculate / Save if it finds a better candidate and also updates the Snapshot. */ taxcardId?: string | null; /** Snapshot of the tax card for salary slip etc. purposes. Updated in Recalculate / Save based on TaxCardId */ snapshot?: TaxcardSnapshot | null; /** Possibility to set a fixed widthholding tax amount for this calculation regardless of the percentage etc. in the tax card. */ fixedTaxAmount?: number | null; /** The API returns true if there is a valid taxcard for the PaidAt date for this calculation or if FixedTaxAmount is set for th calculation. */ isValid?: boolean | null; /** Calculated widthholding tax. Note that this is an estimation until the calculation is actually paid. Also, if the salary is not paid as cash (e.g. fringe benefits), there may not be enough money to make the full deduction. */ estimatedTax?: number | null; /** A flag that during last recalculation, there was a new shared taxcard that was waiting approval. */ hasNewSharedCard?: boolean | null; /** Tax percent that is used in visualization. This is mainly used in Unit testing and anonymous calcultors. Not used in real paid calculations. This is percent. I.e. for 50% set 50, not 0.5. If PaymentData or AccountId lead to a valid tax card type and percent, or if there is FixedTaxAmount, this value is not used. */ taxPercentForVisualization?: number | null; } /** Calculation is the most important model in the Palkkaus.fi API. We suggest you open the separately provided documentation and especially the class diagram to understand the whole model in detail. */ export declare interface Calculation { /** The employer object for this calculation. Typically, you do not need to set this before the actual payment process. */ employer?: CalcEmployer | null; /** The Worker (employee) that has performed the work. */ worker?: CalcWorker | null; /** Information about the workflow and state of the calculation. */ workflow?: CalcWorkflow | null; /** The main salary element. Alternatively the salary can be set in the Rows object - this will be the only way to set multiple salary rows (not yet supported). */ salary?: Salary | null; /** Set of rows that make up the salary calculation: Expenses, Benefits, deductions etc. Note that side costs are not rows. */ rows?: UserDefinedRow[] | null; /** DEPRECIATED: Usecase will be replacing this functionality in a next major release. The Framework Agreement (TES) parameters that affect the framework based side costs etc. of this calculation */ framework?: TesParameters | null; /** A usecase for creating and editing salary calculations. In practice, a usecase is either a user interface or a microservice that provides a salary calculation and it may be implemented outside Salaxy. Provides the possibility to store useacase specific data as part of calculation. NOTE: This functionality will replace Framework property in a next major release. */ usecase?: UsecaseData | null; /** The results of the calculation. In the API, this is a read-only object. */ result?: CalculationResult | null; /** Information about the work that is not directly related to calculating salary and expenses. */ info?: CalcInfo | null; /** Sharing of the calculation. This object cannot be modified directly, use specialized methods in Calculations service. */ sharing?: CalculationSharing | null; /** Contains calculation specific data for accounting (both cost and financial accounting). */ accounting?: CalculationAccounting | null; /** Worktime data that is stored as part of Salary calculation: work days, absences, holidays and holiday accrual. In the future may also contain relevant part of timesheet data (work hours). */ worktime?: CalcWorktime | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Contains calculation specific data for accounting (both cost and financial accounting). */ export declare interface CalculationAccounting { /** Values for cost accounting dimensions */ dimensions?: CostAccountingDimension[] | null; } /** Defines a set of calculations based on identifiers potentially unsaved Calculation objects as well as Payrolls. */ export declare interface CalculationCollection { /** Collection of calculation ID's to be fetched from storage */ ids?: string[] | null; /** Collection of payroll ID's to be fetched from storage */ payrollIds?: string[] | null; /** Collection of inline calculations that may be saved or not */ calcs?: Calculation[] | null; /** Collection of inline Payroll objects that may be saved or not */ payrolls?: PayrollDetails[] | null; } /** Calculation correction with state. */ export declare interface CalculationCorrection { /** Editable API calculation. */ calculation?: CorrectionCalculation | null; /** State of the calculation. */ state?: string | null; /** Snapshot details for save. */ snapshot?: SnapshotInput | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Calculation specific business data for index. */ export declare interface CalculationData { /** A flag indicating if the requested date for the SalaryDate has been set. If the date has been set, the value of the flag is 'SALA'. */ requestedSalaryDate?: string | null; /** The sum that is at the end paid to the Worker: Salary payment + expenses */ workerPayment?: number | null; /** The total pension payment for this calculation. */ pensionPayment?: number | null; /** The taxes that were deducted from the worker salary a paid as part of taxation. */ taxPayment?: number | null; /** The social security payment- paid as part of taxation. */ socialSecurityPayment?: number | null; /** Status of the calculation from the end-user point-of-view. */ status?: CalculationStatus | null; /** Payroll id. */ payrollId?: string | null; /** Employment id. */ employmentId?: string | null; /** Use case uri. */ usecaseUri?: string | null; /** The MessageThread Id, if this calculation is referred in a message thread. */ messageThreadId?: string | null; /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Work start date. */ workStartDate?: string | null; /** Work end date. */ workEndDate?: string | null; /** Payment channel. */ paymentChannel?: PaymentChannel | null; /** Taxable salary is the salary from the taxation point of view - includes some benefits. */ totalTaxable?: number | null; /** Base salary. */ salary?: number | null; /** Salary additions */ allowances?: number | null; /** Benefits. */ benefits?: number | null; /** Deductions */ deductions?: number | null; /** Expenses */ expenses?: number | null; } /** CalculationFlag enumeration */ export declare enum CalculationFlag { Exclude = "exclude", PensionInsurance = "pensionInsurance", AccidentInsurance = "accidentInsurance", UnemploymentInsurance = "unemploymentInsurance", HealthInsurance = "healthInsurance", InsurancesDeduction = "insurancesDeduction", NoTax = "noTax", Tax = "tax", TaxDeduction = "taxDeduction", CfNoPayment = "cfNoPayment", CfPayment = "cfPayment", CfDeduction = "cfDeduction", CfDeductionAtSalaxy = "cfDeductionAtSalaxy" } /** API calculation import object. The API uses this object for mass operations for adding calculations to a new or existing payroll object. If the calculation object does not contain a valid payroll-ID, a new payroll will be created. Returns payroll ID. */ export declare interface CalculationImport { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 This field is optional and defaults to the company number of the current account. */ officialId?: string | null; /** Additional parameters for import. Defaults to string. */ parameters?: { [key: string]: any; } | null; /** Item for import. */ item?: Calculation | null; /** Validation for the import */ validation?: ApiValidation | null; /** Result object of the import. */ result?: ApiImportResultOfString | null; } /** * Type for a single calculation import row. */ export declare interface CalculationImportRow extends DataRow { /** Official ID of the payer company. */ companyOfficialId?: string; /** The personal ID for the worker. */ personalId?: string; /** Employment ID for the worker. */ employmentId?: string; /** * Occupation classification, used at least for Accident insurance purposes, but may be used for other reporting. * For Finnish Salaries use the Statistics Finland * "Classification of Occupations 2010" (TK10): https://www.stat.fi/meta/luokitukset/ammatti/017-2018-05-15/index_en.html */ occupationCode?: string | null; /** Start date of the work */ periodStart?: string | null; /** End date of the work */ periodEnd?: string | null; /** Description of the work for reporting purposes. Max 32 chars. */ workDescription?: string | null; /** Message which will be displayed in the payslip. */ salarySlipMessage?: string | null; /** The requested date for the SalaryDate from the employer. */ salaryDate?: string | null; /** Payment channel */ paymentChannel?: PaymentChannel | null; /** Payroll title. */ payrollTitle?: string | null; /** Payroll source id. */ payrollSourceId?: string | null; /** Calculation source id */ sourceId?: string | null; /** Tax if calculated */ fixedTaxAmount?: number | null; /** * Identifier in the source system is a key defined by a source system / partner system. * This is a pass-through string that is passed to the result calculations. */ rowSourceId?: string | null; /** Logical type of the row */ rowType?: CalculationRowType | null; /** For row types which require kind. */ kind?: string | null; /** For row types which require vat percent. */ vatPercent?: number | null; /** Description text of the row that is shown in reports. If null, will be set according to type. */ message?: string | null; /** Count for the row - default is one */ count?: number | null; /** Price for the row */ price?: number | null; } /** Represents a single item in a list of calculations in the user interface. It contains all essential information of the calculation and is basis for searching, filtering and sorting. */ export declare interface CalculationListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: CalculationStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: CalculationData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** CalculationRefresh enumeration */ export declare enum CalculationRefresh { Default = "default", Worker = "worker", Employer = "employer", Employment = "employment", Taxcard = "taxcard", Insurances = "insurances" } /** Container for calculation report data. */ export declare interface CalculationReportData { /** Calculations as report rows. */ rows?: { [key: string]: any; }[] | null; /** Ir Income type code labels */ irLabels?: { [key: string]: string; } | null; /** Calculation row type labels */ typeLabels?: { [key: string]: string; } | null; /** Total labels */ totalLabels?: { [key: string]: string; } | null; } export declare interface CalculationResult { /** Calculation totals that are common to both Worker and Employer. */ totals?: TotalCalculationDTO | null; /** Rows that are compatible with Incomes Register (tulorekisteri) process. These are available only for calculations paid after 7.2.2019 (TODO: estimation as of writing). */ irRows?: IrRow[] | null; /** The calculation from the Employer point-of-view */ employerCalc?: EmployerCalculationDTO | null; /** The calculation from the Worker point-of-view */ workerCalc?: WorkerCalculationDTO | null; /** The result rows. Note that this collection also contains the main Salary entry as one of the rows. */ rows?: ResultRow[] | null; /** Responsibilities of Employer and parameters that affect those responsibilities. */ responsibilities?: IEmployerResponsibilities | null; /** The validation result for the current calculation. Please note that this is not serialized into the data storage. */ validation?: ApiValidation | null; } /** Extension methods for CalculationResult */ export declare class CalculationResultLogic { /** * Adds Calculation Results together and returns a new CalculationResult * @param calculationResults CalculationResults to add. * @returns A new CalculationResult. */ static add(calculationResults: CalculationResult[]): CalculationResult; /** * Calculates the difference between two results and returns a new CalculationResult * @param original - The original result. * @param modified - The modified result. * @returns The difference between the result sets. */ static diff(original: CalculationResult, modified: CalculationResult): CalculationResult; private static addResults; private static addTotals; private static addWorkerCalc; private static addEmployerCalc; private static safeNum; private static safeArr; private static safeObj; } /** CalculationResultRowType enumeration */ export declare enum CalculationResultRowType { Undefined = "undefined", TotalBenefits = "totalBenefits", TotalExpenses = "totalExpenses", TotalSocialSecurityEmployer = "totalSocialSecurityEmployer", TotalSocialSecurityEmployerDebt = "totalSocialSecurityEmployerDebt", TotalSocialSecurityEmployerPayment = "totalSocialSecurityEmployerPayment", TotalPension = "totalPension", TotalPensionPayment = "totalPensionPayment", TotalPensionEmployer = "totalPensionEmployer", TotalPensionEmployerDebt = "totalPensionEmployerDebt", TotalPensionWorker = "totalPensionWorker", TotalUnemployment = "totalUnemployment", TotalUnemploymentPayment = "totalUnemploymentPayment", TotalUnemploymentEmployer = "totalUnemploymentEmployer", TotalUnemploymentEmployerDebt = "totalUnemploymentEmployerDebt", TotalUnemploymentWorker = "totalUnemploymentWorker", TotalPalkkaus = "totalPalkkaus", TotalSalary = "totalSalary", TotalTax = "totalTax", TotalTaxPayment = "totalTaxPayment", TotalPayment = "totalPayment", TotalWorkerPayment = "totalWorkerPayment", TotalService = "totalService" } /** Statistics data calculated from the calculation result. */ export declare interface CalculationResultStatistics { /** The total number of calculations included in the report. */ calculationCount?: number | null; /** The total number of distinct workers included in the report. */ workerCount?: number | null; /** WorkerCalc.Pension / Totals.TotalSocialSecurityBase */ pensionWorkerPercent?: number | null; /** WorkerCalc.UnemploymentInsurance / Totals.TotalSocialSecurityBase */ unemploymentWorkerPercent?: number | null; /** WorkerCalc.Tax / Totals.TotalTaxable */ taxPercent?: number | null; /** WorkerCalc.UnionPayment / Totals.TotalTaxable */ unionPaymentPercent?: number | null; } /** Categorization / grouping for CalculationRowType */ export declare class CalculationRowCategories { /** Base salary types: the ones that you define directly */ static baseSalary: CalculationRowType[]; /** Additions to base salary - typically a percentage of base salary */ static salaryAdditions: CalculationRowType[]; /** All salary types: baseSalary and salaryAdditions together */ static salary: CalculationRowType[]; /** Benefits: Not paid as money but taxable income */ static benefits: CalculationRowType[]; /** Expenses and other non-taxed compensations */ static expenses: CalculationRowType[]; /** Deductions */ static deductions: CalculationRowType[]; /** Holidays */ static holidays: CalculationRowType[]; /** * Items in the section called "expenses". Besides expenses, contains also benefits. */ static expensesSection: CalculationRowType[]; } /** * Primary categorization of Calculation row types. */ export declare enum CalculationRowCategory { /** Base salary: hourly, monthly or compensation. */ Salary = "salary", /** Additions to base salary: overtime, evenings, saturdays etc. */ SalaryAdditions = "salaryAdditions", /** Advanced salary calcualtions: Net total or gross payment total. */ SalaryCalc = "salaryCalc", /** Holidays */ Holidays = "holidays", /** Benefits: car, accomodotaion etc. */ Benefits = "benefits", /** Expenses, typically tax-free. */ Expenses = "expenses", /** Deductions at different levels. */ Deductions = "deductions", /** Other salary items. */ Other = "other" } /** CalculationRowSource enumeration */ export declare enum CalculationRowSource { Undefined = "undefined", Disabled = "disabled", ManualRow = "manualRow", WorktimeImport = "worktimeImport", PriceEmployment = "priceEmployment", PriceCompany = "priceCompany", CustomRowtype = "customRowtype" } /** CalculationRowType enumeration */ export declare enum CalculationRowType { Unknown = "unknown", Salary = "salary", HourlySalary = "hourlySalary", MonthlySalary = "monthlySalary", TotalWorkerPayment = "totalWorkerPayment", TotalEmployerPayment = "totalEmployerPayment", Compensation = "compensation", Overtime = "overtime", TesWorktimeShortening = "tesWorktimeShortening", EveningAddition = "eveningAddition", NightimeAddition = "nightimeAddition", SaturdayAddition = "saturdayAddition", SundayWork = "sundayWork", OtherAdditions = "otherAdditions", PaidSickLeaveSalary = "paidSickLeaveSalary", PaidSickLeaveHourlySalary = "paidSickLeaveHourlySalary", PaidSickLeaveMonthlySalary = "paidSickLeaveMonthlySalary", TrainingSalary = "trainingSalary", TrainingHourlySalary = "trainingHourlySalary", TrainingMonthlySalary = "trainingMonthlySalary", AccomodationBenefit = "accomodationBenefit", MealBenefit = "mealBenefit", PhoneBenefit = "phoneBenefit", CarBenefit = "carBenefit", BicycleBenefit = "bicycleBenefit", OtherBenefit = "otherBenefit", HolidayCompensation = "holidayCompensation", HolidayBonus = "holidayBonus", HolidaySalary = "holidaySalary", DailyAllowance = "dailyAllowance", DailyAllowanceHalf = "dailyAllowanceHalf", MealCompensation = "mealCompensation", MilageOwnCar = "milageOwnCar", ToolCompensation = "toolCompensation", Expenses = "expenses", MilageDaily = "milageDaily", MilageOther = "milageOther", UnionPayment = "unionPayment", Foreclosure = "foreclosure", Advance = "advance", ForeclosureByPalkkaus = "foreclosureByPalkkaus", PrepaidExpenses = "prepaidExpenses", OtherDeductions = "otherDeductions", DeductibleOfExerciseAndCultureBenefit = "deductibleOfExerciseAndCultureBenefit", ChildCareSubsidy = "childCareSubsidy", ChainsawReduction = "chainsawReduction", NonProfitOrg = "nonProfitOrg", SubsidisedCommute = "subsidisedCommute", IrIncomeType = "irIncomeType", Board = "board", Remuneration = "remuneration", OtherCompensation = "otherCompensation", WorkingTimeCompensation = "workingTimeCompensation", EmploymentTermination = "employmentTermination", HourlySalaryWithWorkingTimeCompensation = "hourlySalaryWithWorkingTimeCompensation", PaidSickLeave = "paidSickLeave", Training = "training", TaxAtSource = "taxAtSource", TaxWithholding = "taxWithholding", AbsencePeriod = "absencePeriod", ServiceCharge = "serviceCharge", Service = "service", Totals = "totals" } /** CalculationRowUnit enumeration */ export declare enum CalculationRowUnit { Undefined = "undefined", Count = "count", Percent = "percent", Days = "days", Kilometers = "kilometers", Hours = "hours" } /** * Provides CRUD access for authenticated user to access a his/her own calculations */ export declare class Calculations extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. (2) */ protected baseUrl: string; private calculator; constructor(ajax: Ajax); /** * Saves an item to the storage. * If id is null, this is add/insert. If id exists, this is update. * @param itemToSave - The item that is updated/inserted. * @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.). */ save(itemToSave: Calculation): Promise; /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): Calculation; /** * Takes in a calculation - typically with modified parameters - and recalculates it. * @param calc The salary calculation that should be recalculated * @returns A Promise with the recalculated Calculation. */ recalculate(calc: Calculation): Promise; /** * Recalculates a calculation taking into account holiday year and absences from the worktime property. * This is an anonymous method that can be used for unit testing: Does not read / write from database. * @param calc The salary calculation that should be recalculated. * Worktime property should contian the bases for the recalculation. * * @returns A Promise with the recalculated Calculation. */ recalculateWorktime(calc: Calculation): Promise; /** * Gets the worktime data for Period recalculation based on given calculation * but fetching absences and holidays from the database. * * @param calc The salary calculation that should be recalculated. * It may potentially have changes to compared to the one in database or the calc may not have even been saved. * The calculation MUST have emloymentId and period set for calculation to work properly. * @returns A Promise with Worktime data. */ getWorktimeData(calc: Calculation): Promise; /** * Gets the Calculation objects for the given ids. * @param ids Identifiers for the Calculation objects. * @returns A Promise with result data array. */ getMulti(ids: string[]): Promise; /** * Gets the Calculations for a specific employment relation. * @param employmentId Identifier for the Employment relation. * @returns A Promise with Calculations. */ getForEmployment(employmentId: string): Promise; /** * Gets the Calculations for the given employment relations. * @param employmentIds Identifiers for the Employment relations. * @returns A Promise with Calculations. */ getForEmployments(employmentIds: string[]): Promise; /** * Updates a calculation from employment relation by deleting all the rows and re-setting the employment. * @param calc Calculation to update. * @param save If true, saves the calculation. If false, only recalculates. Returns the result in any case. * @param updateRows If true, updates also the default salary rows from employment data to calculation. * False updates only other employment data IBAN, phone, E-mail, pension insurance code message etc. * @returns The updated and saved or recalculated calculation */ updateFromEmployment(calc: Calculation, save: boolean, updateRows: boolean): Promise; /** * Updates (saves) the employment related information from Calculation to Employment relation. * Currently only updates rows, OccupationCode and WorkDescription. * @param calc Calculation to update. */ updateToEmployment(calc: Calculation): Promise; /** * Shares the calculation. * @param id Id for the calculation to share. * @param type Type of the sharing action or link. * @param employerId Id of the employer to share the calculation with. * @param to Email address of the employer. * @param cc Cc address for the email. * @param message Message to the employer. * @returns Sharing object of the calculation. */ share(id: string, type?: SharingUriType, employerId?: string, to?: string, cc?: string, message?: string): Promise; /** * Notifies the employer from the shared calculation. * @param id Id of the shared calculation. * @param to Email address of the employer. * @param cc Cc address for the email. * @param message Message to the employer. * @returns True, if the send action was successful. */ notifySharing(id: string, to?: string, cc?: string, message?: string): Promise; /** * Cancels the invoice or payment processing for the given calculation. * Please note that this is possible only if the channel supports the cancel action. * @param id Calculation for which the cancellation is requested. * @returns Calculation which have been cancelled. */ cancel(id: string): Promise; /** * Saves the IR -related data of the calculation. * This operation can be done even if the calculation otherwise is in read only state. * @param calculation Calculation object to save. */ saveIr(calculation: Calculation): Promise; /** * Converts the given calculation to an earnings payment report. * @param calculation - Calculation object. * @returns A Promise with earnings payment report data. */ convertToEpr(calculation: Calculation): Promise; /** * Returns the earnings payment report for the given calculation. * @param id Id of the calculation for the earnings payment report. * @returns Earnings payment report for the calculation. */ getEpr(id: string): Promise; } /** * Data row for calculations data. This is typically used for imports and exports. */ export declare interface CalculationsDataRow extends DataRow { /** Id for the calculation */ id?: string | null; /** Read only calculation status */ status?: CalculationStatus | null; /** The personal ID for the worker. */ personalId?: string; /** First name */ firstName?: string | null; /** Last name */ lastName?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; /** * Occupation classification, used at least for Accident insurance purposes, but may be used for other reporting. * For Finnish Salaries use the Statistics Finland * "Classification of Occupations 2010" (TK10): https://www.stat.fi/meta/luokitukset/ammatti/017-2018-05-15/index_en.html */ occupationCode?: string | null; /** Start date of the work */ periodStart?: string | null; /** End date of the work */ periodEnd?: string | null; /** Description of the work for reporting purposes. Max 32 chars. */ workDescription?: string | null; /** Message which will be displayed in the payslip. */ salarySlipMessage?: string | null; /** Project number for reporting purposes. */ projectNumber?: string | null; /** Cost center for reporting purposes. */ costCenter?: string | null; /** The requested date for the SalaryDate from the employer. */ salaryDate?: string | null; /** Tax if calculated */ fixedTaxAmount?: number | null; /** Logical type of the row */ rowType?: CalculationRowType | null; /** Description text of the row that is shown in reports. If null, will be set according to type. */ message?: string | null; /** Count for the row - default is one */ count?: number | null; /** Price for the row */ price?: number | null; } /** Settings that affect the calculation result of the salaries. */ export declare interface CalculationSettings { /** Collection of pension contracts. In most cases, employer has only one, but in edge cases there may be several. */ pensionContracts?: PensionContract[] | null; /** Collection of mandatory accident insurance contracts. In most cases, employer has only one, but in edge cases there may be several. */ insuranceContracts?: InsuranceContract[] | null; /** Settings related to unemployment insurance. */ unemploymentInsurance?: UnemploymentInsuranceSettings | null; /** Settings related to reporting the salaries to authorities through Incomes Register. */ incomesRegister?: IncomesRegisterSettings | null; /** Contains default calculation rows for the company. Typically used for setting for example monthly salary or hourly salary price for all workers. */ salaryDefaults?: UserDefinedRow[] | null; } /** Defines the properties related to sharing and sending of the calculation. */ export declare interface CalculationSharing { /** Type of sharing for this calculation. */ type?: SharingUriType | null; /** Sharing uri. */ uri?: string | null; /** Email address to which the calculation was shared last time. */ lastSharedTo?: string | null; /** Email address which the calculation was shared as cc last time. */ lastSharedCc?: string | null; /** Last shared message to the employer */ lastSharedMessage?: string | null; } /** CalculationStatus enumeration */ export declare enum CalculationStatus { Draft = "draft", PaymentStarted = "paymentStarted", PaymentSucceeded = "paymentSucceeded", PaymentCanceled = "paymentCanceled", PaymentError = "paymentError", PaymentWorkerCopy = "paymentWorkerCopy", WorkerRequested = "workerRequested", WorkerRequestAccepted = "workerRequestAccepted", WorkerRequestDeclined = "workerRequestDeclined", PaymentRefunded = "paymentRefunded", WaitingApproval = "waitingApproval", PayrollDraft = "payrollDraft", ProDraft = "proDraft", SharedWaiting = "sharedWaiting", SharedApproved = "sharedApproved", SharedRejected = "sharedRejected", History = "history", Template = "template" } /** CalculationStatusCategory enumeration */ export declare enum CalculationStatusCategory { All = "all", Readonly = "readonly", Editable = "editable", Sent = "sent", Shared = "shared", Received = "received", Error = "error" } /** * Calculator is the main module for creating and modifying salary calculations. * The module can be used completely anonymously without any authentication. */ export declare class Calculator { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * OBSOLETE: use CalculatorLogic.getBlank() instead. * @deprecated Factory method to create a new calculation on server-side. * Typically, you do not need to call server-side factory methods in JavaScript. * Instead, you can use client-side factory methods under logic. This saves you one round-trip to server. * @ignore */ createNew(): Promise; /** * Creates a new calucation with simple salary * * @param kind The type of the salary. * @param amount The amount of typically hours (could be months etc.). Defaults to 1 if left as null. * @param price The price of one unit of amount. * @param message Message text for end user - used in salary calculation * @param calc The calculation object that should be updated. This is optional - often null, but can be set if you are updating an existing calculation. * * @returns A Promise with the recalculated Calculation. */ calculateSalary(kind: SalaryKind, amount: number, price: number, message: string, calc?: any): Promise; /** * Sets a household deduction to a calculation * * @param calc The calculation object to which household deduction is added * @param setHouseHoldDeductionTo Boolean to which household * * @returns A Promise with the recalculated Calculation. */ setTaxDeduction(calc: Calculation, setHouseHoldDeductionTo: boolean): Promise; /** * Takes in a calculation - typically with modified parameters - and recalculates it. * * @param calc The salary calculation that should be recalculated * * @returns A Promise with the recalculated Calculation. */ recalculate(calc: Calculation): Promise; /** * Recalculates a calculation taking into account holiday year and absences from the worktime property. * This is an anonymous method that can be used for unit testing: Does not read / write from database. * @param calc The salary calculation that should be recalculated. * Worktime property should contian the bases for the recalculation. * * @returns A Promise with the recalculated Calculation. */ recalculateWorktime(calc: Calculation): Promise; /** * Gets the worktime data for Period recalculation from raw calc, holidays andabsences data. * This is an anonymous method that can be used for unit testing: Does not read / write from database. * * @param calc The salary calculation that should be recalculated. * @param holidayYear Holiday year with holidays that should be added as salary rows. If not provided, holidays are not calculated. * @param absences Absences that should be deducted from monthly salary. If not provided, absences are not calculated. * * @returns A Promise with Worktime data. */ getWorktimeData(calc: Calculation, holidayYear?: HolidayYear, absences?: WorkerAbsences): Promise; /** * Sets a unionPayment to a calculation * * @param calc The calculation object to which union payment is added * @param paymentType Type of union payment, options are 'notSelected', 'raksaNormal', 'raksaUnemploymentOnly' and 'other' * @param unionPaymentPercent How many percents the union payment is from the salary * * @returns A Promise with the recalculated Calculation. */ setUnionPayment(calc: Calculation, paymentType: UnionPaymentType, unionPaymentPercent: number): Promise; /** * Adds a calculation row: An expenses, benefits or other such row and returns the recalculated calculation with full data. * * @param calc The salary calculation that should be modified. * @param rowType Type of the calculation row that should be added. * @param message Message text for end user - used in salary calculation * @param price Price for the row (e.g. €/h, €/km, €/month. Default is 0. * @param count Count of the items - default is 1. * * @returns A Promise with the recalculated Calculation. */ addRow(calc: Calculation, rowType: CalculationRowType, message: string, price: number, count: number): Promise; /** * Deletes a calculation row: Expenses, benefits etc. item and returns the recalculated calculation with full data. * * @param calc The salary calculation that should be modified. * @param rowIndex Zero based row index of the row that should be deleted. * * @returns A Promise with the recalculated Calculation. */ deleteRow(calc: Calculation, rowIndex: number): Promise; /** * Gets salary calculation parameters that are changing yearly. * The method is designed for the end-of-year and as such it only supports 2 years: * the current / previous year (from Jan to Nov) OR current / next year (in approx. December). * * @param forYear Date for which the numbers are fetched. * * @returns The yearly changing numbers if year supported. Error if year not supported. */ getYearlyChangingNumbers(forYear: Date | string): YearlyChangingNumbers; /** * Experimental: Returns a new Finvoice object for the given calculations. * @param calculations Calculations for the Finvoice. * @param tableType Accounting table type for the generated Finvoice. * @ignore */ getFinvoice(calculations: Calculation[], tableType?: AccountingReportTableType): Promise; } /** * Provides business logic related to building a salary calculator. */ export declare class CalculatorLogic { /** * Gets a UI cache object that is used for storing UI properties * to the calculation until a roundtrip to server (technically calc.$ui). * When a round-trip to server occurs (typically recalculate or save), * then the property is set to null => empty object. */ static getUiCache(calc: Calculation): any; /** * Gets the first row of the calculation assuring that it exists * AND that it is a known Salary row or Unknown. * This should be the main row of the calculation that replaces the Salary object. * @param calc Calculation from which the row is fetched. * @param defaultType Default type for the new item if new item needs to be added. */ static getSalaryRow(calc: Calculation, defaultType?: CalculationRowType): UserDefinedRow; /** * Gets the first row of the calculation assuring that it exists. * This should be the main row of the calculation that replaces the Salary object. * @param calc Calculation from which the row is fetched. */ static getFirstRow(calc: Calculation): UserDefinedRow; /** * Gets a new blank object with default values, suitable for UI binding. * This is a synchronous method - does not go to the server. */ static getBlank(): Calculation; /** * Returns true if calculation totals should be shown: * If there are any such rows that the calculation result makes sense. */ static shouldShowTotals(calc: Calculation): boolean; /** * Moves the salary defined in Salary object to rows collection. * This is needed in old calculations for backward compatibility until moving to v03. * NOTE: In v03 this will be done server-side: The Salary will be removed completely. * @param calc Calculation to modify */ static moveSalaryToRows(calc: Calculation): void; /** * Gets the Avatar of other party in a calculation: * Employer or Worker */ static getOtherParty(calc: Calculation, currentAvatar: Avatar): Avatar; /** * Gets a total sum for a row category from calculation results. * @param calc - Calculation object * @param category - Row category (collection of row types) */ static getTotalForCategory(calc: Calculation, category: "baseSalary" | "salaryAdditions" | "salary" | "benefits" | "expenses" | "deductions" | "holidays" | "expensesSection"): number; /** * Gets a total sum for a row category from calculation results. * @param calc - Calculation object * @param types - Array of row types that are included in the result */ static getTotalForRowsByType(calc: Calculation, ...types: CalculationRowType[]): number; /** * Filter the result rows of a calculation based on the type * @param calc - Calculation object * @param types - Array of row types that are included in the result */ static getResultRowsByType(calc: Calculation, ...types: CalculationRowType[]): ResultRow[]; /** * Filter the result rows of a calculation based on a row category * @param calc - Calculation object * @param category - Row category (collection of row types) */ static getResultRowsByCategory(calc: Calculation, category: "baseSalary" | "salaryAdditions" | "salary" | "benefits" | "expenses" | "deductions" | "holidays" | "expensesSection"): ResultRow[]; /** * Returns true if there is no net salary payment to worker at all. * @param calc - Calculation object */ static isZeroPayment(calc: Calculation): boolean; } /** Worker object for the current calculation */ export declare interface CalcWorker { /** Palkkaus.fi Account Id for the worker. Alternatively you can set the Payment data with the required infromation */ accountId?: string | null; /** Employment Id for the worker. */ employmentId?: string | null; /** Data that is needed for salary payment. This object may be null if AccountId has been set. Also, if AccountId has been set, these properties will be ignored: The Worker will decide on payment properties herself. */ paymentData?: CalcWorkerPaymentData | null; /** Display image and properties of the Worker. Based on either the AccountId or PaymentData */ avatar?: Avatar | null; /** True if Profile is the currently Account If set to true, will set current Account as this contract party. This overrides any value in AccountId, so be sure to switch this back to false if this is switchable. Setting to False does not have any immediate effect. */ isSelf?: boolean | null; /** Date of birth for the Worker - this affects the side costs. Please also set the DateOfBirthAccuracy, if you set this property. If PaymentData or AccountId lead to a valid Social security number, it will override any age set here. */ dateOfBirth?: string | null; /** Accuracy of the date of birth If PaymentData or AccountId lead to a valid Social security number, it will override any age set here. */ dateOfBirthAccuracy?: DateOfBirthAccuracy | null; /** New Widthholding tax logic that is based on separately stored tax cards. */ tax?: CalcTax | null; /** Current address of the worker. Please note that this is a read only field. */ contact?: Contact | null; } /** The required information for paying the Salary to Worker. */ export declare interface CalcWorkerPaymentData { /** First name of the person. */ firstName?: string | null; /** Last name / Surname of the person. */ lastName?: string | null; /** Gets the Social security number the way the user set it in input. HOWEVER: The getter will change the string to upper invariant/trim and if the last character is "*", it will be replaced by calculated checksum. */ socialSecurityNumber?: string | null; /** Social security number if valid or null */ readonly socialSecurityNumberValid?: string | null; /** IBAN number for the Bank account */ ibanNumber?: string | null; /** Contact e-mail address. */ email?: string | null; /** Telephone number */ telephone?: string | null; } /** Defines the properties of salary calculation workflow - typically the workflow from draft to Payment. */ export declare interface CalcWorkflow { /** Status of the calculation from Draft to PaymentSucceeded */ status?: CalculationStatus | null; /** Time when this calculation was paid (if it was paid) to Palkkaus service. */ paidAt?: string | null; /** Time when the salary was paid by Palkkaus service. */ salaryPaidAt?: string | null; /** The estimated date when the salary is withdrawable by the worker. */ salaryDate?: string | null; /** The requested date for the SalaryDate from the employer. */ requestedSalaryDate?: string | null; /** Defines the re-setting of the salary date in the calculation re-calculation. */ salaryDateKind?: SalaryDateKind | null; } /** Worktime data that is stored as part of Salary calculation: work days, absences, holidays and holiday accrual. In the future may also contain relevant part of timesheet data (work hours). */ export declare interface CalcWorktime { /** Employment period that is updated from employment at each recalculation (as opposed to holiday specification). */ employmentPeriod?: DateRange | null; /** Wage basis from the current employment relation. This is for absences and does not presume that holiday years exist for the worker. */ wageBasis?: WageBasis | null; /** Describes the working days in the period. Currently, uses the DaysCount, but later the full days array will be taken to use. This includes the absence days (divider in AbsencesDaySalary). */ workDays?: DateRange | null; /** Periods of 'absences'. */ absencesPeriods?: AbsencePeriod[] | null; /** Price for a single absence day. Typically based on MonthlySalary, but may be modified. */ absencesDailySalary?: number | null; /** Specification for the holiday calculation */ holidaySpec?: HolidaySpecificationForYear | null; /** Price for a single holiday day */ leavesDailySalary?: number | null; /** Price for a single bonus day */ bonusDailySalary?: number | null; /** Total remaining amount of holiday pay accrual. */ holidayPayAccrualRemaining?: number | null; /** Total remaining amount of holiday bonus accrual. */ holidayBonusAccrualRemaining?: number | null; /** Accruals for each calendar month in this calculation. */ accruals?: MonthlyHolidayAccrual[] | null; /** Specification for the accrual calculation */ accrualSpec?: HolidayAccrualCalcSpecification | null; } /** Salaxy calendar action is an extension to iCalendar Alarms: It supports the standard alarms: Display, Email and Audio, but also salaxy action scripts. */ export declare interface CalendarAction { /** Unique identifier in the Salaxy context. */ id?: string | null; /** Action type */ type?: CalendarActionType | null; /** Summary text for the action. Subject for E-mail */ summary?: string | null; /** Description text for the action. Body text for Email, Notification message for Display. */ description?: string | null; /** Attendees are E-mail receivers for Email Alert and potentially Display notifications in the future. Script actions may also later use them when credentials, accounts or similar are needed fro execution. */ attendees?: CalendarAttendee[] | null; /** Attachment files for the action. Attachments for E-mail. */ attachments?: CalendarAttachment[] | null; /** The duration trigger. Either this or TriggerDateTime must specified. */ triggerDuration?: string | null; /** The fixed date-time trigger. Only used if, Duration is not available. NOTE that Salaxy implements this feature a bit differently than rfc-5545: The spec says that for a repeating event, the alarm should trigger only once (+repeat), but current Salaxy implementation would trigger the alarm the amount of items. */ triggerDateTime?: string | null; /** If specified, the action repeats number of times (in addition to the initial trigger) specified in this parameter with RepeatDuration values. If Repeat is more than 0, also RepeatDuration must be specified. */ repeat?: number | null; /** Time between the repeats aftern the initial repeat. */ repeatDuration?: string | null; } /** Occurence of an Action (Alarm in iCalendar) within a Calendar occurence. */ export declare interface CalendarActionOccurence { /** Identifier of the event that produces this action occurence */ eventId?: string | null; /** Identifier of the action that produces this occurence */ actionId?: string | null; /** Action type */ type?: CalendarActionType | null; /** The date/date-time this action is executed. */ start?: string | null; /** Indicates that the time of the recurrence (start) is irrelevant: Just display the date. */ isAllDay?: boolean | null; /** Summary text for occurence. Max 255 characters. */ summary?: string | null; } /** CalendarActionType enumeration */ export declare enum CalendarActionType { Undefined = "undefined", Display = "display", Email = "email", Audio = "audio", CreateItem = "createItem", Script = "script", PaymentDate = "paymentDate" } /** Attachment for calendar event or Action/Alarm. */ export declare interface CalendarAttachment { /** URI of the attachment. This is the default way of specifying attachments. TODO: Check if the Uri data type works in API. If not, switch to string. */ uri?: string | null; /** Attachment as inline data. Encoded with ValueEncoding. */ data?: string | null; /** The file format type / mime type (e.g. "text/plain"). */ formatType?: string | null; /** Encoding for the inline data. TODO: Consider making read-only. */ valueEncoding?: string | null; } /** Describes the calendar attendees in an avatar-visualization compatible way. */ export declare interface CalendarAttendee { /** Account or Credentials uri IF the attendee is a Palkkaus.fi account. Otherwise null. */ uri?: string | null; /** The display name of the attendee (CN) */ displayName?: string | null; /** The E-mail address of the person */ email?: string | null; /** Entity type: person/company. In calendar attendees, defaults to Person. */ entityType?: LegalEntityType | null; /** Type of the Avatar picture. */ pictureType?: AvatarPictureType | null; /** Color - currently only used by type Icon */ color?: string | null; /** Initials - used by PictureType Icon */ initials?: string | null; /** URL of the picture if specified as picture (null in a case of type Icon) */ url?: string | null; } /** Single day in the calendar */ export declare interface CalendarDay { /** Date of month 1-31 */ day: number; /** ISO date for the day */ date: string; /** Weekday 1-7 (mon-sun) */ weekday: number; /** Two-letter language versioned weekday text (ma,ti,ke,to,pe,la,su / mo,tu,we,th,fr,sa,su) */ weekdayText: string; /** Special days: Today overrides holiday, if day is both holiday and today. */ dayType: "holiday" | "today" | "normal"; /** Events for the day: Events that start on the day or periods with end date (and no icon) that intersect the day. */ events: CalendarUiEvent[][]; /** Periods (repsesented as colored div) that intersect the given day. */ periods: CalendarUiEvent[][]; /** Single days (represented as icon) that occur on the given day */ singleDays: CalendarUiEvent[][]; } /** Represents a calendar event in iCalendar compatible way. */ export declare interface CalendarEvent { /** Type of object that stores the event recurrence. Type of CalendarEvent is stored separately into the database and all properties can be edited. For other types, you need edit the original object (Calculation, Payload etc.) */ payloadType?: ApiItemType | null; /** The part of the data that provides the compliance to iCalendar VEVENT data model defined in RFC 5545, not including the properties that are standard in Salaxy (e.g. id/uid, createdAt etc.). */ event?: CalendarVEvent | null; /** Occurence information based on the event. */ occurenceInfo?: CalendarEventOccurenceInfo | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Calendar event specific business data for index. */ export declare interface CalendarEventData { /** The start date/time of the event. */ start?: string | null; /** The end date/time of the event. */ end?: string | null; /** The duration of the event. */ duration?: string | null; /** Recurrence rules as a CRLF separted string. */ rRules?: string | null; /** Returns true if the event is a recurring event: RRules or Recurrence dates.. */ isRecurring?: boolean | null; /** Returns true if the event is an all-day event. */ isAllDay?: boolean | null; /** Priority is specified as an integer in the range 0 to 9. A value of 0 specifies an undefined priority. A value of 1 is the highest priority, 1-4=HIGH, 5=MEDIUM/Normal and 6-9=LOW. Negative values may be used by admin functions (not through API) to set priority overrides. */ priority?: number | null; /** Status as string */ status?: string | null; } /** Represents a single item in a list of calendar events in the search index. */ export declare interface CalendarEventListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: CalendarEventStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: CalendarEventData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Information about the occurences of the calendar event when the event was last stored into the storage. */ export declare interface CalendarEventOccurenceInfo { /** If true, the event is a recurring */ isRecurring?: boolean | null; /** First occurence of the event */ occurencesStart?: string | null; /** Last occurence of the event. Please note that only max 1 year from today is calculated. */ occurencesEnd?: string | null; /** Next occurences (max 100) */ next?: CalendarOccurence[] | null; /** Dictionary of executed actions. */ executedActions?: { [key: string]: string; } | null; } /** * Provides CRUD access for Calendar events and other calendar methods. * Note that in this API class, ID may contain also the type of the item. * I.e. id="09ddcb40-1c06-48cd-be07-ab16a6bdfccf/payrollDetails". * If the type is not defined, the default type is ApiItemType.CalendarEvent. */ export declare class CalendarEvents extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; /** URL for top-level (non calendar event) methods. */ private calendarBaseUrl; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): CalendarEvent; /** * Recalculates the occurence info based on the event. * This is an anonymous method that does not commit anything to database. * @param event Calendar event to recalculate. * @param start Start of the period for which the events are fetched and occurences are calculated. * If null, period is set 1 year before today. Max history/future 3 years. Max period 24 months. * @param end End of the period for which the occurences are calculated. * @returns A Promise with result data: The calendar event with occurenceInfo recalculated. */ recalculate(event: CalendarEvent, start?: DatelyObject, end?: DatelyObject): Promise; /** * Gets the occurences for calendar events stored in the Salaxy calendar database. * @param categories Categories of occurences to fetch. * @param start Start of the period for which the events are fetched and occurences are calculated. * If null, period is set 1 year before today. Max history/future 3 years. Max period 24 months. * @param end End of the period for which the occurences are calculated. * @returns The occurences based on the given filters. */ getOccurences(categories?: string[], start?: DatelyObject, end?: DatelyObject): Promise>; /** * Gets a Recurring event based on a business object that may be CalendarEvent of some other type that has potential recurrence. * @param id Unique identifier for the object. * The id may contain the payload type of the item, e.g. "09ddcb40-1c06-48cd-be07-ab16a6bdfccf/payrollDetails". * @param type Payload type as API object. This is only used, if the ID is simple ID without the * type (e.g. "09ddcb40-1c06-48cd-be07-ab16a6bdfccf"). * If neither id nor type defines the Payload type, ApiItemType.CalendarEvent is the default. * @param mode Defines what kind of object is created if the existing object supports recurrence, but currently is not recurring. * Possibility to add the default recurrence rules, actions etc. * @returns The recurring event, potentially creating the default recurrence. */ getRecurringEvent(id: string, type?: ApiItemType, mode?: RecurringEventCreateMode): Promise; } /** CalendarEventStatus enumeration */ export declare enum CalendarEventStatus { Undefined = "undefined", Cancelled = "cancelled", Confirmed = "confirmed", Tentative = "tentative", NeedsAction = "needsAction", Completed = "completed", InProcess = "inProcess" } /** Month in a calendar. */ export declare interface CalendarMonth { /** Month as 1-12 */ month: number; /** Year for the month */ year: number; /** Short text (3-6 letters) of the month (tammi,helmi,maalis,...) */ title: string; /** Weekday of the first day 1-7 (mon-sun) */ firstDayDayOfWeek: any; /** Number of days in the month */ daysInMonth: any; /** Days in the month */ days: CalendarDay[]; } /** Occurence of a calendar event */ export declare interface CalendarOccurence { /** Identifier of the event that produces this occurence */ eventId?: string | null; /** Summary text for occurence. Max 255 characters. */ summary?: string | null; /** Categorization of the event */ categories?: string[] | null; /** Indicates that the time of the recurrence is irrelevant: Just display the date. NOTE that in Occurences, when IsAllDay=true, the End is the date when occurence ends (typically same as Start), not the next day as in VEVENT. */ isAllDay?: boolean | null; /** If true, the occurence is based on a recurrence rule. */ isRecurring?: boolean | null; /** The start date/time of the event as ISO 8601 Date ("yyyy-MM-dd") or DateTime ("s"/"yyyy-MM-ddThh:mm:ss") without timezone. Value should be Date when IsAllDay is true and DateTime, when it is false. */ start?: string | null; /** The end date/time of the event as ISO 8601 Date ("yyyy-MM-dd") or DateTime ("s"/"yyyy-MM-ddThh:mm:ss") without timezone. Value should be Date when IsAllDay is true and DateTime, when it is false. */ end?: string | null; /** The duration of the event. */ duration?: string | null; /** Collection of action occurences for this event occurence. */ actions?: CalendarActionOccurence[] | null; } /** Represents a single series shown in the calendar. */ export declare interface CalendarSeries { /** String key for the series. */ key: string; /** Title that is shown for the series. */ title?: string; /** Longer text together below the text */ description?: string; /** Potential avatar visualization for the series. */ avatar?: Avatar; /** Events: The data for the series */ events: CalendarUiEvent[]; /** Case specific data for dialog editing etc. */ data?: any; } /** * An event in the calendar with User Interface data (icon, color etc.). * Compatible with CalendarVEvent for base data (start, end, summary, description). * If the end day is NOT specified OR if icon IS specified, an icon is displayed. * If the end day IS specified AND icon is NOT specified, the event is shown as period, * potentially spanning over several days (may also be just one day). */ export declare interface CalendarUiEvent { /** Start date for an event. Required for any event. */ start: string; /** * End date for period. NOTE: For single-day event markers (icon), set this null. * For single-day periods (period color, no icon), set this the same as start day. */ end?: string; /** Summary title for the event. */ summary?: string; /** Description for the period. */ description?: string; /** * For single-day events (end day null), you can specify a Font-awesome version 4.7 icon (https://fontawesome.com/v4.7.0/icons/). * Default is "fa-circle". */ icon?: string; /** * Specify a CSS class to the icon or period background. * For single day icons, good choices are: text-muted, text-primary, text-success, text-info, text-warning, text-danger. * For periods, good choices are: salaxy-cal-event-primary, [...]-success, [...]-info, [...]-warning, [...]-danger etc. */ cssClass?: string; /** Case specific data for dialog editing etc. */ data?: any; } /** Stores the calendar even data that is compatible with RFC 5545 VEVENT component. */ export declare interface CalendarVEvent { /** Unique identifier: This is the ID of the parent. */ uid?: string | null; /** Timestamp for the item: This may be important for processing of items to some calendar items, hence stored separately from other dates. */ timeStamp?: string | null; /** The start date/time of the event. NOTE, unlike in iCalendar, in our model Start is always required and then either End or Duration is used to determine the duration. */ start?: string | null; /** The end date/time of the event. Note that if Duration is set, it will override this property whenever saved or recalculated. */ end?: string | null; /** The duration of the event. Note that if set to something else than null / zero, this property will always override the End date/datetime. */ duration?: string | null; /** Returns true if the event is an all-day event: Start and End are dates ("yyyy-MM-dd"), not date-times ("yyyy-MM-ddThh:mm:ss"). */ isAllDay?: boolean | null; /** The event status as defined in https://tools.ietf.org/html/rfc5545#section-3.8.1.11 or in Salaxy process. Other statuses default to undefined. */ status?: CalendarEventStatus | null; /** Short, one-line summary: Text that is typically shown in calendar views. */ summary?: string | null; /** Categorization of the event */ categories?: string[] | null; /** The attendees for the event. */ attendees?: CalendarAttendee[] | null; /** The Alarms (notifications) and other Actions (scripts) related to the event. */ actions?: CalendarAction[] | null; /** Priority is specified as an integer in the range 0 to 9. A value of 0 specifies an undefined priority. A value of 1 is the highest priority, 1-4=HIGH, 5=MEDIUM/Normal and 6-9=LOW. Negative values may be used by admin functions (not through API) to set priority overrides. */ priority?: number | null; /** The full description text. */ description?: string | null; /** Attachments for calendar events. */ attachments?: CalendarAttachment[] | null; /** The recurrence rules as specified in iCalendar: https://tools.ietf.org/html/rfc5545#section-3.3.10 and https://tools.ietf.org/html/rfc5545#section-3.8.5.3 E.g. "FREQ=DAILY;INTERVAL=10;COUNT=5" */ recurrenceRules?: string[] | null; /** Constant recurrence dates specified by RDATE in iCalendar */ recurrenceDates?: string[] | null; /** Exception dates specified by EXDATE in iCalendar */ exceptionDates?: string[] | null; /** When imported from external system, this contains the original Uid. Null for items created by Salaxy. */ originalUid?: string | null; } /** Car benefit Mandatory data group, if the income type is "Car benefit". This data group may not be used with other income types. */ export declare interface CarBenefit { /** Car benefit type */ carBenefitCode?: CarBenefitCode | null; /** Car age group */ ageGroupCode?: AgeGroupCode | null; /** Odometer reading The value must be greater than or equal to 0 */ kilometers?: number | null; /** Car emissions value The car emissions value must be greater than or equal to 0, and smaller than or equal to 100. The car emissions value can only be reported if the payment date or other reporting date is in 2022–2025. */ emissionsValue?: number | null; } /** CarBenefitCode enumeration */ export declare enum CarBenefitCode { LimitedCarBenefit = "limitedCarBenefit", FullCarBenefit = "fullCarBenefit" } /** CarBenefitKind enumeration */ export declare enum CarBenefitKind { Undefined = "undefined", LimitedCarBenefit = "limitedCarBenefit", FullCarBenefit = "fullCarBenefit" } /** Handles the Calculation of CalculationRowType.CarBenefitUsecase to IrRows */ export declare interface CarBenefitUsecase { /** Age group as in A,B,C or I for international. */ ageGroup?: AgeGroupCode | null; /** If true, the calculation is kilometers based. */ isKilometersBased?: boolean | null; /** Number of kilometers is filled in only if that type of benefit calculation is used. */ kilometers?: number | null; /** Car emissions value The car emissions value must be greater than or equal to 0, and smaller than or equal to 100. The car emissions value can only be reported if the payment date or other reporting date is in 2022–2025. */ emissionsValue?: number | null; /** Deduction from salary */ deduction?: number | null; /** Primary subtyping of the usecase. */ kind?: CarBenefitKind | null; } /** * Usecase logic for car benefit rows. */ export declare class CarBenefitUsecaseLogic extends BaseUsecaseLogic { /** Gets validation message for BoardUsecaseLogic */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** Provides generic HTML (Bootstrap 3 in this version) for rendering Grid cells. */ export declare class CellRenderingLogic { /** * Gets an agGrid cell renderer based on the property schema. * @param schemaProp The schema of the property that is being rendered * @returns A cell renderer for AGGrid. Currently always a function: May later be a component. * Null, if the column should be rendered using default functionality. */ static getCellRenderer(schemaProp: OpenAPIV3.NonArraySchemaObject): (item: any) => string; /** * Renders an avatar as a picture / icon * @param avatar The avatar objec that should be rendered. * @param fontSize Optional font size. Default is 2em, which typically good in agGrid. * @returns HTML for the avatar. */ static getAvatar(avatar: Avatar, fontSize?: string): string; } /** User certificate. */ export declare interface Certificate { /** Certificate thumbprint. */ thumbprint?: string | null; /** Certificate bytes Used in returning the certificate to the user as PFX or ZIP. Not persisted. */ bytes?: string | null; /** End user description for the certificate. */ title?: string | null; /** Password for issuing a new certificate. Not persisted. Also used for passing the CSR in request if it is passed as Base64 encoded text. Not persisted. */ password?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides CRUD access for authenticated user to access a his/her own Certificates */ export declare class Certificates extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Returns an empty certificate without any values. */ getBlank(): Certificate; /** * Issues a new certificate for the account and provides the certificate in PEM format. * For this method, also the Certificate Signing Request (CSR) may be passed in the certificate Text field. * @param certificate A certificate object containing title for the new certificate. * You may also pass the Certificate Signing Request (CSR) in the Password field. In this case the private key is not returned by the method. * @returns PEM files in zip: crt (public key / certificate), key (private key) and (both in one pem file). */ issuePemCertificate(certificate: Certificate): Promise; } /** * Documentation of a Class or an Interface. * This also includes controllers and components. */ export declare interface ClassDoc extends RootDeclarationReflection { /** Public properties, fields and functions. */ members: ClassMemberDoc[]; /** * Collection of reference types that this class extends (extendedTypes). * Note that string may also contain type parameters as in CrudControllerBase. */ extends: TypeDocType[]; /** * Collection of interfaces that this class implements (implementedTypes). * Note that string may also contain type parameters as in CrudControllerBase. */ implements: TypeDocType[]; /** Types that extend this type (extendedBy) */ extendedBy: TypeDocType[]; /** Types that iplement this interface (implementedBy) */ implementedBy: TypeDocType[]; /** * Salaxy specific logic may add usages here. * Currently, components will add themselves to controllers. */ usages?: string[]; } /** * Documentation for a class member: Currently Controller member, * but may be later extended to other classes / containers. */ export declare interface ClassMemberDoc extends DeclarationReflection { /** Typedoc reflection type of the member. */ type?: any; /** Display grouping for the member: E.g. accessors are considered properties here. */ grouping: "Property" | "Method" | "Other"; /** * For grouping type "Method", lists parameters * TODO: Consider making a separate type for properties. */ parameters?: ClassMemberDoc[]; } /** * Client to Salaxy API. * Abstracts the raw REST api to async methods that are easier to call from TypeScript / JavaScript. * Differnet platforms (NG1, NG, jQuery etc.) create derived Clients typically at least by injecting their own Ajax implementation, * potentially also by overriding other methods. */ export declare abstract class Client { private _ajax; private _accountsApi; private _calculationsApi; private _calculatorApi; private _reportsApi; private _filesApi; private _sessionApi; private _oAuth2Api; private _testApi; private _taxcardsApi; private _onboardingsApi; constructor(ajaxImpl: Ajax); /** The platform (NG1, NG, jQuery etc.) dependent class that performs the actual Ajax calls */ get ajax(): Ajax; /** Gets the Accounts API: Access to current account, its products and workers */ get accountsApi(): Accounts; /** Gets the Calculations API: CRUD operations on calculations */ get calculationsApi(): Calculations; /** Gets the Calculator API: Anonymous salary calculation methods */ get calculatorApi(): Calculator; /** Gets the Reports API: Viewing and generating reports in different formats */ get reportsApi(): Reports; /** Gets the Files API: Files stored by the user, thumbnails of pictures etc. */ get filesApi(): Files; /** Gets the Session API: Access to current session, user and roles */ get sessionApi(): Session; /** Gets the OAuth2 API: Authentication methods */ get oAuth2Api(): OAuth2; /** Gets the Test API: Testing different functionalities of the API and system in general. */ get testApi(): Test; /** Gets the Tax cards API */ get taxcardsApi(): Taxcards; /** Gets the Onboarding API for creating a new user */ get onboardingsApi(): Onboardings; } /** A company account - note that this can also be an association etc. - something that has a Company ID. */ export declare interface CompanyAccount { /** Information about the verification of the account. NOTE that this object may not be present in many method calls - this is because it contains confidential information. */ identity?: Identity | null; /** High level company type */ companyType?: CompanyType | null; /** Entity type of the account. Type PersonCreatedByEmployer means that the Worker has not yet signed into the system and there may be multiple instances of the same logical person (Official ID) - one for each employer. */ entityType?: LegalEntityType | null; /** If true the object Account is and Employer account - it has the EmployerInfo object */ isEmployer?: boolean | null; /** If true the object Account is and Worker account - it has the WorkerInfo object */ isWorker?: boolean | null; /** If true, the account has been verified. Typically this means a digitally signed contract. This means that the account also has an Identity object. However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */ isVerified?: boolean | null; /** Avatar is the visual representation of the Account. */ avatar?: Avatar | null; /** Contact information for the Account. */ contact?: Contact | null; /** Language of the person/company. */ language?: Language | null; /** Service model for the account. */ serviceModelId?: string | null; /** Workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Provides the settings for a Company Employer account (all settings details for employer). */ export declare interface CompanyAccountSettings { /** Salary calculation related settings. */ calc?: CalculationSettings | null; /** Reporting and layout related settings. */ reporting?: ReportingSettings | null; /** Primary partner, service model and pricing. */ partner?: PrimaryPartnerSettings | null; /** Defines how accounting is done and to which target it is exported / sent. */ accounting?: AccountingSettings | null; /** Cost accounting settings, e.g. cost centers and projects. */ costAccounting?: CostAccountingSettings | null; /** Holiday settings for accruals and holiday pay calculations. */ holiday?: HolidaySettings | null; /** Settings related to making of the payments. */ payments?: PaymentSettings | null; /** Custom usecases. */ usecase?: UsecaseSettings | null; /** Settings related to messaging. */ messaging?: MessagingSettings | null; /** Settings related to the calculation data delivery by forms. */ forms?: FormsSettings | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; } /** API company import object. The API uses this object for mass operations for creating or assuring the customer companies in the system. */ export declare interface CompanyImport { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 This field is optional and defaults to the company number of the current account. */ officialId?: string | null; /** Additional parameters for import. Defaults to string. */ parameters?: { [key: string]: any; } | null; /** Item for import. */ item?: AssureCompanyAccountRequest | null; /** Validation for the import */ validation?: ApiValidation | null; /** Result object of the import. */ result?: ApiImportResultOfPartnerCompanyAccountInfo | null; } /** * Type for a single company import row. */ export declare interface CompanyImportRow extends AssureCompanyAccountRequest, DataRow { /** Receiver's address for the e-invoice. */ eInvoiceReceiver?: string | null; /** Receiver's operator for the e-invoice. */ eInvoiceIntermediator?: string | null; } /** Represents the input for creating a company account. */ export declare interface CompanyInput { /** If true, creates a company account based on company data. */ doCreate?: boolean | null; /** Official name of the company */ name: string; /** URL to a Logo picture (preferably PNG). This logo should be a square - icon type of logo for avatar. */ logo?: string | null; /** The Business ID (Y-tunnus / Business Identity Code) is a code given to businesses and organizations by the PRH or the Tax Administration. It consists of seven digits, a dash and a control mark, for example 1234567-8. Alternative accepted formats incule international VAT number "FI12345678" or number without the dash: "12345678". */ businessId: string; /** This is an official name of the actor. It originates from the YTJ or Bank authentication. */ officialName?: string | null; /** If an object with the given BusinessID exists, it is resolved here: The unique ID is set here by the onboarding service. This field cannot be set. */ resolvedId?: string | null; /** Identifier at the partner site - typically an organization ID. */ partnerAccountId?: string | null; /** Company ownership for KYC */ ownership?: Ownership | null; /** If true, will fetch the data from the Finnish Business Infromation System (YTJ/BIS). Fetching is done firstly based on Business ID, if that is not valid then based on name. */ doYtjUpdate?: boolean | null; /** The details of company data as provided by the Finnish Business Infromation System (YTJ/BIS) */ ytjDetails?: YtjCompany | null; /** A search to Finnish Business Infromation System (YTJ/BIS). This search is triggered if you set the RawInput field. */ ytjSearch?: YtjSearchResult | null; /** The legal type of the company, as categorized by Palkkaus / used in generating IBAN numbers. */ companyType: CompanyType; /** Contact information for the company */ contact?: Contact | null; /** List of roles which this account is member of. */ roles?: Role[] | null; /** Language of the company. */ language?: Language | null; } /** CompanyType enumeration */ export declare enum CompanyType { Unknown = "unknown", FiOy = "fiOy", FiTm = "fiTm", FiRy = "fiRy", FiYy = "fiYy" } /** Component documentation */ export declare interface ComponentDoc extends RootDeclarationReflection { /** The component tag / element in HTML */ elem?: string; /** Name of the controller that implements the functionality of the component */ controller?: string; /** The default template (view) used in the rendering of the component. */ defaultTemplate?: string; /** HTML attributes available to specify options to the component. */ attributes: AttributeDoc[]; /** Required components in the outside scope */ require?: any; /** Transclude slots */ transclude?: any; } /** * Environment specific configuration for Salaxy API's and JavaScript in general. * Raw object as stored in the env file. */ export declare interface Config { /** The base address of the Salaxy http API server, e.g. https://secure.salaxy.com */ apiServer?: string | null; /** The base address of the Palkkaus web site, e.g. https://www.palkkaus.fi */ wwwServer?: string | null; /** A flag indicating if the current configuration is for test environment only. If true, the site is for testing only. */ isTestData?: boolean | null; /** A flag indicating if the site sets a Salaxy cookie which persists over web sessions. If true, the cookie will be created. */ useCookie?: boolean | null; /** A flag indicating if the API site uses credentials. If true, the credentials will be used. */ useCredentials?: boolean | null; /** InstrumentationKey for Application Insight */ instrumentationKey?: string | null; /** Partner id for site. This is required for example for onboarding with partner specific style. */ partnerSite?: string | null; /** Pro server site address. e.g. https://pro.palkkaus.fi */ proServer?: string | null; /** Report server url */ reportServer?: string | null; /** Application id for invoicing. */ applicationId?: string | null; /** The base address of the integrations server, e.g. https://integrations.salaxy.com */ integrationsServer?: string | null; } /** Extends the Config with logic */ export declare class ConfigLogic implements Config { /** The base address of the Salaxy http API server, e.g. https://secure.salaxy.com */ apiServer?: string | null; /** The base address of the Palkkaus web site, e.g. https://www.palkkaus.fi */ wwwServer?: string | null; /** A flag indicating if the current configuration is for test environment only. If true, the site is for testing only. */ isTestData?: boolean | null; /** A flag indicating if the site sets a Salaxy cookie which persists over web sessions. If true, the cookie will be created. */ useCookie?: boolean | null; /** A flag indicating if the API site uses credentials. If true, the credentials will be used. */ useCredentials?: boolean | null; /** InstrumentationKey for Application Insight */ instrumentationKey?: string | null; /** Partner id for site. This is required for example for onboarding with partner specific style. */ partnerSite?: string | null; /** Pro server site address. e.g. https://pro.palkkaus.fi */ proServer?: string | null; /** Report server url */ reportServer?: string | null; /** Application id for invoicing. */ applicationId?: string | null; /** The base address of the integrations server, e.g. https://integrations.salaxy.com */ integrationsServer?: string | null; /** * Creates a new ConfigLogic based on a Config in env file. * @param config Raw config in env file. */ constructor(config: Config); /** Gets the type of the environment. */ getEnv(): "local" | "test" | "demo" | "prod" | "rc"; /** Gets the server address for the Omapalkka service based on environment. */ getOmapalkkaServer(): string; /** Gets the API server address for the Omapalkka service based on environment. */ getOmapalkkaApiServer(): string; } /** * Class for reading Environment specific configuration for Salaxy API's and JavaScript in general */ export declare class Configs { private static get defaultConfig(); private static getGlobalConfig; private static setGlobalConfig; private static getGlobal; /** * Returns current configuration. * If global (salaxy.config) configuration is null, default config (demo) is returned */ static get current(): ConfigLogic; /** * Set current configuration. */ static set current(config: Config); /** Get global, globalThis object */ static get global(): any; } /** Common contact information object for Person, Company, Location etc. */ export declare interface Contact { /** Contact e-mail address. Always lower invariant, trimmed and empty string set to null. */ email?: string | null; /** Telephone number */ telephone?: string | null; /** Street address */ street?: string | null; /** Postal code */ postalCode?: string | null; /** City or community (postitoimipaikka) */ city?: string | null; /** This is the ISO code for country. Currently, it should always be "fi". */ countryCode?: string | null; } /** Advanced contact information with strongly typed country and type information. */ export declare interface ContactAdvanced { /** Type of contact when specification allows several contacts. */ type?: ContactType | null; /** Contact e-mail address. Always lower invariant, trimmed and empty string set to null. */ email?: string | null; /** Telephone number */ telephone?: string | null; /** Street address */ street?: string | null; /** Postal code */ postalCode?: string | null; /** City or community (postitoimipaikka) */ city?: string | null; /** Country as defined as */ country?: Country | null; /** Name of the country as free text if Country is Other. */ countryOtherName?: string | null; } /** ContactType enumeration */ export declare enum ContactType { Default = "default", WorkerAccount = "workerAccount", EmployerOverride = "employerOverride", Foreign = "foreign" } /** A signing party in a contract. */ export declare interface ContractParty { /** Identifier for the party: Currently always an account, but may be an external ID later. */ id?: string | null; /** Avatar for the Party. Note that this is not automatically fetched by all methods: Especially when IsSelf is true. */ avatar?: Avatar | null; /** Contact information - note that for most signatures, only E-mail and phone number are required. */ contact?: Contact | null; /** True if Profile is the current Authorization. If set to true, will set current Authorization as this contract party. If set to false AND was previously true, will set the Profile properties null (unless explicitly set to something else) */ isSelf?: boolean | null; /** Official ID if needed in signature */ officialId?: string | null; /** Role of the person - justification for authorization */ role?: string | null; /** True if the person has signed the contract. */ isSigned?: boolean | null; /** Reserved for cases where there are several signees and each has a separate signature document. */ signatureUrl?: string | null; /** Bank account IBAN number */ iban?: string | null; /** Party type (Person or Prospect) */ contractPartyType?: ContractPartyType | null; /** If true, contact is an employer */ isEmployer?: boolean | null; } /** * Provides business logic related to displaying / editing Contact objects */ export declare class ContractPartyLogic { /** * Gets a new blank Contact with default values, suitable for UI binding. */ static getBlank(): ContractParty; /** Converts a WorkerAccount object to a ContractParty object. */ static getFromWorker(worker: WorkerAccount): ContractParty; /** Gets sample contacts for demonstration user interfaces. */ static getSampleContacts(): ContractParty[]; } /** ContractPartyType enumeration */ export declare enum ContractPartyType { Person = "person", CustomContact = "customContact" } /** * Very simple cookie implementation - at the moment for token storage only. * Expand if needed for other use cases (see todo section in the docs). * * @todo Expand this class as necessary e.g. something like this: https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie/Simple_document.cookie_framework * or this https://github.com/Booyanach/cookie-wrapper ... which unfortunately cannot be used at the moment, because they are GPL license. */ export declare class Cookies { /** * Gets a cookie value by a key * @param key - CName / key to look for. */ get(key: string): string; /** * Sets a cookie value for the specified CName * @param cname - CName for the cookie value. Name is uri encoded as a fallback, but generally, you should make sure this is a valid cname. * @param value - Value to set for the cookie. Value is uri encoded. * @param expirationDays - Days until the cookie expires. * Set this to null or 0 to not set the expiration date at all. * This defaults the behavior where cookie is deleted when browser is closed. */ setCookie(cname: string, value: string, expirationDays?: number): void; } /** Extensions to Corrections */ export declare interface CorrectionCalculation { /** Pricing model */ pricingModel?: PricingModel | null; /** Fixed fee */ fixedFee?: number | null; /** Customer payments info. */ cfa?: CalcCfa | null; /** The employer object for this calculation. Typically, you do not need to set this before the actual payment process. */ employer?: CalcEmployer | null; /** The Worker (employee) that has performed the work. */ worker?: CalcWorker | null; /** Information about the workflow and state of the calculation. */ workflow?: CalcWorkflow | null; /** The main salary element. Alternatively the salary can be set in the Rows object - this will be the only way to set multiple salary rows (not yet supported). */ salary?: Salary | null; /** Set of rows that make up the salary calculation: Expenses, Benefits, deductions etc. Note that side costs are not rows. */ rows?: UserDefinedRow[] | null; /** DEPRECIATED: Usecase will be replacing this functionality in a next major release. The Framework Agreement (TES) parameters that affect the framework based side costs etc. of this calculation */ framework?: TesParameters | null; /** A usecase for creating and editing salary calculations. In practice, a usecase is either a user interface or a microservice that provides a salary calculation and it may be implemented outside Salaxy. Provides the possibility to store useacase specific data as part of calculation. NOTE: This functionality will replace Framework property in a next major release. */ usecase?: UsecaseData | null; /** The results of the calculation. In the API, this is a read-only object. */ result?: CalculationResult | null; /** Information about the work that is not directly related to calculating salary and expenses. */ info?: CalcInfo | null; /** Sharing of the calculation. This object cannot be modified directly, use specialized methods in Calculations service. */ sharing?: CalculationSharing | null; /** Contains calculation specific data for accounting (both cost and financial accounting). */ accounting?: CalculationAccounting | null; /** Worktime data that is stored as part of Salary calculation: work days, absences, holidays and holiday accrual. In the future may also contain relevant part of timesheet data (work hours). */ worktime?: CalcWorktime | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Id of the cost accounting dimension with optional percentage for shared costs. */ export declare interface CostAccountingDimension { /** Dimension Id. */ id?: string | null; /** Cost accounting dimension value id. */ value?: string | null; /** Sharing percent for the dimension. */ percent?: number | null; } /** Cost accounting dimension definition. */ export declare interface CostAccountingDimensionDefinition { /** Id for the dimension. */ id?: string | null; /** Default label for the dimension entry. */ label?: string | null; /** Hierarchial object containing selection options for dimension values. */ options?: CostAccountingDimensionOption[] | null; /** If true, multiple values can be set to the dimension and the costs are shared between dimension values. */ allowCostSharing?: boolean | null; /** Defines the visible scopes of the dimension. For example, Scope.Row shows the dimension on row level only. */ scope?: CostAccountingDimensionScope | null; } /** Selectable cost accounting dimension value. */ export declare interface CostAccountingDimensionOption { /** Value for the option. */ value?: string | null; /** Description of the value. */ text?: string | null; /** For option hiearchies, path to this option not including the value itself. */ path?: string | null; /** Defines the visible scopes of the dimension values. For example, Scope.Row shows the dimension value on row level only. The default is, that the scope is not defined and that the value is visible everywhere. */ scope?: CostAccountingDimensionScope | null; } /** CostAccountingDimensionScope enumeration */ export declare enum CostAccountingDimensionScope { None = "none", Calculation = "calculation", Row = "row", Hidden = "hidden" } /** Cost accounting models for session. */ export declare interface CostAccountingInSession { /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** Settings related to Cost Accounting */ export declare interface CostAccountingSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** Country enumeration */ export declare enum Country { Fi = "fi", Ae = "ae", At = "at", Ba = "ba", Bg = "bg", By = "by", Cn = "cn", De = "de", Eg = "eg", Fr = "fr", Gg = "gg", Hr = "hr", Ie = "ie", In = "in", Je = "je", Kr = "kr", Lk = "lk", Lv = "lv", Me = "me", Mx = "mx", No = "no", Pk = "pk", Rs = "rs", Sg = "sg", Th = "th", Tr = "tr", Us = "us", Vg = "vg", Zm = "zm", Am = "am", Au = "au", Bb = "bb", Bm = "bm", Ca = "ca", Cy = "cy", Dk = "dk", Es = "es", Gb = "gb", Gr = "gr", Hu = "hu", Il = "il", Is = "is", Jp = "jp", Ky = "ky", Lt = "lt", Ma = "ma", Mk = "mk", My = "my", Nz = "nz", Pl = "pl", Ru = "ru", Si = "si", Tj = "tj", Tz = "tz", Uy = "uy", Vn = "vn", Ar = "ar", Az = "az", Be = "be", Br = "br", Ch = "ch", Cz = "cz", Ee = "ee", Ge = "ge", Hk = "hk", Id = "id", Im = "im", It = "it", Kg = "kg", Kz = "kz", Lu = "lu", Md = "md", Mt = "mt", Nl = "nl", Ph = "ph", Ro = "ro", Se = "se", Sk = "sk", Tm = "tm", Ua = "ua", Uz = "uz", Za = "za", Other = "other" } /** * Provides CRUD access for authenticated user to access all credentials which can access this account. */ export declare class Credentials extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Returns an empty credential without any values. */ getBlank(): SessionUserCredential; /** * Returns the url where to post the avatar file */ getAvatarUploadUrl(credentialId: string): string; } /** * Base class for CRUD services. * Type TItem is the type of the object that is stored in the service (CrudObject). * Type TListItem is the type of the object that is returned in lists (based on Api). */ export declare abstract class CrudApiBase { protected ajax: Ajax; /** * Deriving classes should define the baseURl for the method. E.g. "/calculations" * Ajax implementations will add the beginning (e.g. "https://test-api.salaxy.com/api/v03") */ protected abstract baseUrl: string; /** Constructor creates a new CRUD api with given Ajax-implementation */ constructor(ajax: Ajax); /** * Client-side (synchronous) method for getting a new blank CRUD item as bases for UI binding. * The basic idea is that all the child object properties should be non-null to avoid null reference exceptions. * In special cases, when null is significant it may be used: e.g. Calculation.result is null untill the recalculation has been done. * Strings, dates and booleans may be null (false if bool), but typically just undefined. */ abstract getBlank(): TItem; /** * Makes an OData query to the service's main OData method. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ getOData(query: ODataQueryOptions | string): Promise>; /** * Makes an OData query to the the given service URL. * @param baseUrl The service URL that is used, e.g. "/v03/api/taxcards/current". * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. * @deprecated You should use the OData.getOData() static util method instead. */ getODataBase(baseUrl: string, query: ODataQueryOptions | string): Promise>; /** * Gets all the items of a given type. * @returns A Promise with result data array. */ getAll(): Promise; /** * Gets a single item based on identier * @param id - Unique identifier for the object * @returns A Promise with result data. */ getSingle(id: string): Promise; /** * Deletes an single item from the sotrage * @param id - Unique identifier for the object * @returns A Promise with result data "Object deleted". */ delete(id: string): Promise; /** * Saves an item to the storage. * If id is null, this is add/insert. If id exists, this is update. * @param itemToSave - The item that is updated/inserted. * @param options - Additional options for the save operation. Can be any object with fields that are used as query parameters. * @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.). */ save(itemToSave: TItem, options?: any): Promise; /** Gets the OData URL for v03 compatible services */ getODataUrl(): string; /** Returns the base url for this api. */ getBaseUrl(): string; /** * Adds/updates the workflow event for the item. * * @param item - Item for which to set the workflow event. * @param wfEvent - Event to add or update. * @returns Workflow data for the item. */ saveWorkflowEvent(item: TItem, wfEvent: WorkflowEvent): Promise; /** * Deletes the workflow item or items from the item. * @param item - Item for which to delete workflow events. * @param wfIdOrType - Event id or type. * @returns A Promise with result data "Object deleted". */ deleteWorkflowEvent(item: TItem, wfIdOrType: string): Promise; /** * Gets a single workflow event for the item. * @param item - Item for which to get the single event. * @param wfId - Event id. * @returns A Promise with event data. */ getWorkflowEvent(item: TItem, wfId: string): Promise; /** * Lists versions for the object. * @param id - Unique identifier for the object * @returns A Promise with result data. */ getVersions(id: string): Promise; /** * Get the given version for the object. * @param id - Unique identifier for the object * @param versionId - Version identifier * @returns A Promise with result data. */ getVersion(id: string, versionId: string): Promise; protected getUrlWithOptions(url: string, options: any): string; } /** * Defines the supported cultures in the user interfaces and logic. * Cultures define how e.g. numbers and dates are presented. * Currently only imports / exports support Cultures: Finnish culture is used typically in English and Swedish user interfaces. */ export declare enum Culture { /** Finnish culture. Number 12,34 / Date: 1.2.2020 / CSV separator is semi-colon (";"). */ Fi = "fi", /** International (en-US) culture. Number 12.34 / Date: 2020-02-01 / CSV separator is comma (","). */ En = "en" } /** Calculation with additional cumulative data. */ export declare interface CumulativeCalculation { /** Cumulative data for the calculation. */ cumulative?: { [key: string]: CumulativeData; } | null; /** The employer object for this calculation. Typically, you do not need to set this before the actual payment process. */ employer?: CalcEmployer | null; /** The Worker (employee) that has performed the work. */ worker?: CalcWorker | null; /** Information about the workflow and state of the calculation. */ workflow?: CalcWorkflow | null; /** The main salary element. Alternatively the salary can be set in the Rows object - this will be the only way to set multiple salary rows (not yet supported). */ salary?: Salary | null; /** Set of rows that make up the salary calculation: Expenses, Benefits, deductions etc. Note that side costs are not rows. */ rows?: UserDefinedRow[] | null; /** DEPRECIATED: Usecase will be replacing this functionality in a next major release. The Framework Agreement (TES) parameters that affect the framework based side costs etc. of this calculation */ framework?: TesParameters | null; /** A usecase for creating and editing salary calculations. In practice, a usecase is either a user interface or a microservice that provides a salary calculation and it may be implemented outside Salaxy. Provides the possibility to store useacase specific data as part of calculation. NOTE: This functionality will replace Framework property in a next major release. */ usecase?: UsecaseData | null; /** The results of the calculation. In the API, this is a read-only object. */ result?: CalculationResult | null; /** Information about the work that is not directly related to calculating salary and expenses. */ info?: CalcInfo | null; /** Sharing of the calculation. This object cannot be modified directly, use specialized methods in Calculations service. */ sharing?: CalculationSharing | null; /** Contains calculation specific data for accounting (both cost and financial accounting). */ accounting?: CalculationAccounting | null; /** Worktime data that is stored as part of Salary calculation: work days, absences, holidays and holiday accrual. In the future may also contain relevant part of timesheet data (work hours). */ worktime?: CalcWorktime | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Cumulative data for a single calculation */ export declare interface CumulativeData { /** First and last Salary dates (days when Worker receives the salary) and number of payment days. */ salaryDates?: DateRange | null; /** Working days based on the salary calculations. */ workingDays?: DateRange | null; /** Dictionary of labels of the current data */ labels?: { [key: string]: string; } | null; /** The cumulative data of the calculations. */ data?: { [key: string]: number; } | null; /** The cumulative units of the calculations. */ units?: { [key: string]: string; } | null; } /** Settings related to payment methods that use the customer funds account (gross payment). */ export declare interface CustomerFundsSettings { /** If true, worker salary and expense payments are paid directly by the employer. */ isWorkerSelfHandling?: boolean | null; /** If true, the user handles the reporting and payments himself/herself. */ isPensionSelfHandling?: boolean | null; /** If true, tax and social security payments are paid directly by the employer. */ isTaxAndSocialSecuritySelfHandling?: boolean | null; } /** Customer invoice is an invoice from Palkkaus / Salaxy to Customer / Partner: Invoice for the usage of service. */ export declare interface CustomerInvoice { /** Header-level information about the invoice. */ info?: CustomerInvoiceInfo | null; /** The data that is the bases for invoicing e.g. calculations, monthly active users etc. */ bases?: CustomerInvoicingBases[] | null; /** If not null, contains a final invoice in Laskupiste format. */ invoice?: LaskupisteInvoice | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Header level data for the customer invoices. */ export declare interface CustomerInvoiceInfo { /** Status of this invoice entry. */ status?: CustomerInvoiceStatus | null; /** Count of companies (end-customers) in this invoice. */ companyCount?: number | null; } /** Represents a single item in a list of Customer invoices. Customer invoices are service invoices from Palkkaus / Salaxy to customers and partners. */ export declare interface CustomerInvoiceListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: CustomerInvoiceStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: CustomerInvoiceListItemData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Customer Invoice specific business data for index. */ export declare interface CustomerInvoiceListItemData { /** Number of end-companies in the invoice. */ companyCount?: number | null; } /** * Provides CRUD access for Customer invoices */ export declare class CustomerInvoices extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): CustomerInvoice; /** * Saves an item to the storage. * NOTE: Access to this method is very restricted by design as invoces are created by Palkkaus and cannot be modified by the Customer. * Typically, you will not be able to save customer invoices in the production environment. * @param itemToSave - The item that is updated/inserted. * @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.). */ save(itemToSave: CustomerInvoice): Promise; } /** CustomerInvoiceStatus enumeration */ export declare enum CustomerInvoiceStatus { Undefined = "undefined", Forecast = "forecast", Preview = "preview", WaitingPalkkaus = "waitingPalkkaus", Unread = "unread", Read = "read", PaymentStarted = "paymentStarted", Warning = "warning", Paid = "paid", Canceled = "canceled", Error = "error" } /** Represents the data that is the bases for invoicing e.g. calculations, monthly active users etc. */ export declare interface CustomerInvoicingBases { id?: string | null; date?: string | null; product?: string | null; companyId?: string | null; partnerId?: string | null; amount?: number | null; meta?: { [key: string]: any; } | null; } /** CustomerWebApp enumeration */ export declare enum CustomerWebApp { Palkkaus = "palkkaus", CustomSso = "customSso", CustomPalkkaus = "customPalkkaus", NoCustomerUi = "noCustomerUi" } /** DailyAllowanceKind enumeration */ export declare enum DailyAllowanceKind { Undefined = "undefined", FullDailyAllowance = "fullDailyAllowance", PartialDailyAllowance = "partialDailyAllowance", InternationalDailyAllowance = "internationalDailyAllowance", MealAllowance = "mealAllowance" } /** Handles the Calculation of CalculationRowType.DailyAllowance to IrRows */ export declare interface DailyAllowanceUsecase { country?: string | null; /** If true, the daily allowance is paid in half: The Worker has received 2 free meals (1 if PartialDailyAllowance). This information is currently not reported to Incomes Register, it is only as information for calculation. */ isHalf?: boolean | null; /** Primary subtyping of the usecase. */ kind?: DailyAllowanceKind | null; } /** Client-side logic for Daily allowance */ export declare class DailyAllowanceUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. */ updateUsecase(row: UserDefinedRow, date: DatelyObject): void; /** Gets validation message for Daily allowance */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** * Defines a data mapper that maps data from a Data Source to Data Target. */ export declare class DataMapper { /** Unique ID or uri for the mapper */ uri: string; /** Description for the mapper: Shown in the selection list. */ title: string; /** Defines the data source */ source: DataMapperMember; /** Defines the target for the mapping */ target: DataMapperMember; /** The actual map: The selectors that map from source to target. */ map: DataMapperSelector[]; /** * If true, this is a list item mapper: Exportable.list() is used directly instead of * calling Exportable.getSingle() when exporting and export is done directly without wizard and preview. * RowType is also ApiListItem or derived from it. */ isSourceAList: boolean; /** * Constructor creates a new empty DataMapper. * You typically need to call at least setSchema() (source or target) and ten create the map using one of the methods. * @param uri Unique URI for the mapper * @param title Translated end-user title for the mapper */ constructor(uri: string, title: string); /** Resolves all the schemas in the selectors. */ resolve(): void; /** * Does the mapping from source to target. * @param sourceValue Optional source value that is mapped. If not specified, existing source.value is used. * @returns The results of the mapping. */ doMap(sourceValue?: TSource[]): TTarget[]; /** * Gets a simple key-to-key mapper for a schema object: no field conversion, just defining the columns and types. * @param schema The schema that defineses the columns for the mapping. * @param type The row type name (technical). */ setStringToSchemaMapping(schema: OpenAPIV3.NonArraySchemaObject, type: string): void; /** * Sets a schema in one of the members using the schema cache. * Creates the member if none exists and also sets the isTable based on the schema. * @param schemaCache The schema cache from which the schema is fetched. * @param schemaDoc The URL for the Schema document that contains the schema * @param schemaName Name of the schema * @param member If set to "target", sets the target schema. Sets the source schema by default. */ setSchemaFromCache(schemaCache: JsonSchemaCache, schemaDoc: string, schemaName: string, member?: "source" | "target"): Promise; /** * Sets the schema for the given member. * Creates the member if none exists and also sets the isTable based on the schema. * @param schema Schema to set into a member * @param schemaName Name of the schema * @param member Member to set. */ setSchema(schema: OpenAPIV3.NonArraySchemaObject, schemaName: string, member?: "source" | "target"): void; /** * Generates one schema based on another using the paths as mappers. * @param name Name for the new schema * @param member The member that is being generated based on the other member. */ generateSchema(name: string, member?: "source" | "target"): void; /** * Sets selectors with paths to both target and source using a key-value pair object. * @param paths Paths as object where each key is a source path and value is * either a target path or selector (key is selector source if not set in the selector). */ setPaths(paths: { [key: string]: string | DataMapperSelector; }): void; /** * Reverses the source / target. * Can be used for creating two mappers from the same definition: One for import, one for export. * @param uri Uri for the new reversed object. * @param title Treanslated end-user title for the new object. * @param isSourceAList If true, the reversed mapper is a list item mapper: Exportable.list() is used directly instead of * calling Exportable.getSingle() when exporting and export is done directly without wizard and preview. * RowType is also ApiListItem or derived from it. */ reverse(uri: string, title: string, isSourceAList?: boolean): DataMapper; /** * Creates the Map based on source schema and property paths within that schema. * Also the target schema is created based these two. * Before calling this method, the source schema must be set or the method fails. * @param paths Array of paths that are used in creating the mapper * @param targetSchemaName Name for the new target schema. */ setPathsFromSourceSchema(paths: string[], targetSchemaName?: string): void; private reverseChildren; } /** * Information about data mapper that is availble to user / system for * selecting the appropriate mapper(s) for given purpose. */ export declare interface DataMapperInfo { /** Unique ID or uri for the mapper */ uri: string; /** Description for the mapper: Shown in the selection list. */ title: string; /** * Name of the source schema of the mapper. * Used in evaluating whether the mapper can be used to export from the current data format: * either list item or actual API CRUD payload object. */ sourceSchema: string; /** * Name of the target schema of the mapper. * Used in evaluating whether the mapper can be used to import to the current data format. */ targetSchema: string; } /** Defines either source or target in DataMapper */ export declare class DataMapperMember { /** Name of the member, typically the typeName in schema. */ name: string; /** Schema for the member IF explicitly set. */ schema: OpenAPIV3.NonArraySchemaObject; /** The value of the member. */ value: T[]; /** If true, the member is two dimensional table, not a hierarchical object. */ isTable: boolean; /** * Gets the schema either based on the defined schema or based on set data value if explicit schema is defined. * @param typeResolve If "guess" will attempt to guess the data type/format based on the value. * Otherwise, uses string type for all items. */ getSchema(typeResolve?: "string" | "guess"): OpenAPIV3.NonArraySchemaObject; /** * Gets the keys of first-level items in the data based on getSchema (cached). */ get keys(): string[]; /** * Gets all the properties (the entire tree) from the schema. * Values are InputEnumOptions (typically used in UI) where value and text are * the property path, e.g. "owner.avatar.sortableName" and title shows the title or description from the schema. */ get allKeys(): InputEnumOption; private assureKeys; private $cache; } /** * Selector for mapping from source to target. * @param Type of the source object (root level). * @param Type of the target object (root level). */ export declare class DataMapperSelector { /** * Default constructor creates a new DataMapperSelector. * @param source The source field / path * @param target The target field / path * @param func Optional function that maps from source to target. */ constructor(source?: string, target?: string, func?: (source: TSource, target: TTarget, selector: DataMapperSelector) => any); /** The path for selecting the source */ source: string; /** The path for selecting the target */ target: string; /** The JSON schema property, if found, after the selectors have been resolved */ sourceProp: JsonSchemaProperty; /** The JSON schema property, if found, after the selectors have been resolved */ targetProp: JsonSchemaProperty; /** Hierarchy in the source object that is flattened to the target. */ flatten: DataMapperSelector[]; /** * Custom function for data mapping. * @param source The source object (root level). * @param target The target object (root level): Possibility to set other fields than just the target field. * @param selector This selector object: can be used e.g. for fetching source and target paths for generic functions. * @returns The value that will be set to the target field of the target object. */ func?: (source: TSource, target: TTarget, selector: DataMapperSelector) => any; /** * Resolves the selector, i.e. sets the sourceProp and targetProp for types. * @param sourceRootSchema Root source schema of the DataMapper or Item schema for flatten selector. * @param targetRootSchema Root target schema of the DataMapper */ resolve(sourceRootSchema: OpenAPIV3.NonArraySchemaObject, targetRootSchema: OpenAPIV3.NonArraySchemaObject): void; /** Does the mapping from source to target */ doMap(source: TSource, target: TTarget): void; } /** * Provides in-built logc for data mappers. */ export declare class DataMappersLogic { /** * Gets the MapperInfo from a full DataMapper. * @param mapper The full mapper. * @returns The info part of the mapper. */ static getInfo(mapper: DataMapper): DataMapperInfo; /** Gets the mappers for specific sources / targets. */ static getMappers(sourceFilter?: string[], targetFilter?: string[]): DataMapperInfo[]; /** Gets the listing of all in-built data mappers in @salaxy/core library. */ static getBuiltInMappers(): DataMapperInfo[]; /** * Gets an export DataMapper, potentially loading the schema / mapping from the storage. * @param id Identifier or URI for the mapper. * URI starts with "@salaxy/core/", e.g. "@salaxy/core/Calculation_Default". * Id is just the last part of the path, e.g. "Calculation_Default". * @returns The mapper that maps the source to target. Null if none is found. */ static getBuiltInMapper(id: string, schemaCache: JsonSchemaCache): Promise>; /** TODO: try to figure out why this is required? */ static getMapperUri(uri: string): string; } /** Interface for data row for exports and imports */ export declare interface DataRow { /** Row specific validation. */ validation?: ApiValidation; /** Result object */ object?: ApiCrudObject; /** The actual data as key value pairs. */ [key: string]: any; } /** Dataset models some arbitrary data that is store in storage. This is any data that is not "strongly modeled", for example: Imports from / exports to external systems, reports, data analyses and control data for batch processes. */ export declare interface Dataset { /** Editable metadata info about a dataset. */ info?: DatasetInfo | null; /** The payload of the dataset: The objects or tables that are stored. */ data?: DatasetDataObject[] | null; /** Usecase is data related to the source and processing of the Employment data outside the Salaxy backend service / system. Typically, Usecase data would be processed by an external system that has originally created the Employment Relation (Worker / Employee in many systems). E.g. expenses system, hourly reporting system. */ usecase?: UsecaseData | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export declare interface DatasetDataObject { /** Technical name (unique key) for the data object */ name?: string | null; /** User friendly label. */ label?: string | null; /** Schema document that contains the schema. */ schemaDoc?: string | null; /** Identifier / path to the schema that defines the data structure for the content. */ schema?: string | null; /** If true, the schema should be interpreted as an array (display in table by default). */ isArray?: boolean | null; /** Data payload / content of the object. */ content?: any[] | null; /** Potential validation data for content. Note that in many scenarios, validation may not be done / may not be serialized to storage so this property may be null. */ validation?: ApiValidation | null; /** Defines one or multiple views for the dataset object. Typically this is fields to include / exclude from the views and definitions on how the views should be formatted / edited. First view is considered the default view and some UI's will only support that one view. */ views?: DatasetView[] | null; } /** Editable metadata info about a dataset. */ export declare interface DatasetInfo { /** Status of the dataset. */ status?: DatasetStatus | null; /** End-user friendly label that describes the dataset in listings etc. */ label?: string | null; /** The logical type / purpose of the dataset. */ type?: DatasetType | null; } /** Represents a single item in a list of datasets. */ export declare interface DatasetListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: DatasetStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: DatasetListItemData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Dataset specific business data for index. */ export declare interface DatasetListItemData { /** Key for the usecase based on which it is resolved. Later, this may resolve to a user interface, microservice or a to manifest registering one. For now, just use a unique string starting with a domain you own. */ usecaseUri?: string | null; } /** * Provides CRUD access to datasets. */ export declare class Datasets extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): Dataset; } /** DatasetStatus enumeration */ export declare enum DatasetStatus { Draft = "draft", Instance = "instance", Template = "template" } /** DatasetType enumeration */ export declare enum DatasetType { Undefined = "undefined", ReportAdHoc = "reportAdHoc", Import = "import", Export = "export", Batch = "batch" } /** Defines a view, typically an array view, for a dataset. */ export declare interface DatasetView { /** Properties / columns that should be shown in the view. These may be either simple column names or property paths (e.g. "personalInfo.avatar.sortableName") for hierarchical objects. */ include?: string[] | null; /** Properties / columns that should be shown excluded from the view. Exclusion is used only if Include is not set and it is applied to the "default view": Default view depends on the renderer, but it is typically just the first level of a hierarchical view, so exclude values are typically just simple column / property names, not property paths. */ exclude?: string[] | null; } /** * Object that can be understood as date: * * - String is an ISO string "yyyy-mm-dd" without any time / timezone information. This is the default Date representation in Salaxy library and should typically be used. * - Date is a JavaScript date object * - Number is (as in Date constructor) a Unix time stamp - number of milliseconds since January 1, 1970, 00:00:00 UTC (the Unix epoch) * - Array of numbers is (as in Date constructor) [year, monthIndex, day]. * - Special string "today" will set the value as today. Same thing for "yesterday" or "tomorrow", and these strings may be extended. * * NOTE that for historical reasons, the object can also be a DayJs object (was MomentJS before Q4/2023) and that works as-of-writing. * However, that support may be dropped in upcoming versions without that being a breaking change. * * If the object cannot be understood as date it will typically be converted to null. Sometimes this may also be an error. */ export declare type DatelyObject = string | Date | number | number[] | "today" | "yesterday" | "tomorrow"; /** DateOfBirthAccuracy enumeration */ export declare enum DateOfBirthAccuracy { Assumption = "assumption", AgeBased = "ageBased", AgeGroupBased = "ageGroupBased", MonthCorrect = "monthCorrect", Exact = "exact", Verified = "verified" } /** Describes the range of dates from start to end and the number of days in between. */ export declare interface DateRange { /** Start date of the period */ start?: string | null; /** End date of the period. */ end?: string | null; /** Number of days in the range. Depending of the context, this may be mathematical (end - start) or explicitly specified (typically working days). Typically an integer, and calculations and UI's may choose to round it. */ daysCount?: number | null; /** The collection of days contained in the DateRange if specified by the user. Alternative to DaysCount. If set, should also set DaysCount for backward compatibility. */ days?: string[] | null; } /** * Date parsing, formatting and other operations within the Salaxy framework. * We use ISO 8601 as our Date format even inside JavaScript objects. * This is because of the following reasons: * * 1. Generally, we do not want to use JavaScript Date because it presents so many problems. * 2. We store dates in JSON as ISO 8601 date strings - this is universally the best practice * 3. ISO 8601 provides a way to present a date without time and most importantly timezone information * 4. ISO 8601 date also works best for most UI components (because of similar reasons as above). * * This library is only for Dates. Time / DateTime functionality is in DateTimes util library. * * Implementation uses Day.js */ export declare class Dates { /** * Gets an object and returns it as the date format that is stored in the data structure with ISO 8601 format. * * @param datelyObject - Object that should be converted to Salaxy date: A string, JS Date object, Day.js etc. * * @returns The date in simplest possible ISO 8601 compliant format "YYYY-MM-DD", undefined if empty, not valid date etc. */ static asDate(datelyObject: DatelyObject | any): string | undefined; /** * Gets a date based on year, month and day (1-based). * NOTE: Unlike Date() constructor or dayjs() constructor, all numbers are 1-based: * (2017, 2, 2) results to "2017-02-02" and not "2017-01-01T22:00:00.000Z" like in those constructors. * * @param year Year component of the date or "today" for today's year. * @param month Month component of the date (1-12) or "today" for today's month. * @param day Day of month component of the date (1-31) or "today" for today's day of month. */ static getDate(year: number | "today", month: number | "today", day: number | "today"): string | undefined; /** * Constructs a DatelyObject (DayJs) from any DayJs compatible object * @param timestamp any DayJs compatible object to construct a DatelyObject. * @returns DatelyObject */ static getDatelyObject(timestamp: any): DatelyObject | undefined; /** * Converts the date to a JavaScript Date. Please note, that also time part is returned. * @param datelyObject - Object that should be converted: A string, JS Date object, DayJs etc. * * @returns JavaScript date corresponding to input or null. */ static asJSDate(datelyObject: DatelyObject): Date | undefined; /** * Checks whether a string is in ISO format. * * @param dateProspect Value that is evaluated. * @param required If set to true, the value is required. If required is null the false will be returned. * @param format Date or datetime format. Default is ISO_8601 (ISO datetime). TODO other supported formats. * * @returns True if the given date is in the correct format. */ static isValidDateTime(dateProspect: string, required?: boolean, format?: any): boolean; /** * Parses a date. In ISO format by default. * * @param dateProspect Value that is parsed. * @param format Date or datetime format. Default is ISO_8601 (ISO datetime). * Note that result is just a date (not datetime). * * @returns True if the given date is in the correct format. */ static parseDate(dateProspect: string, format?: any): string | undefined; /** Get the date of today as ISO 8601 string format (YYYY-MM-DD) */ static getToday(): string; /** * Returns Day.Js -object. * * @param datelyObject Object that should be converted to Day.js -object: A string, JS Date object, Day.js, Number[3] etc. * @param allowInvalid If true and datelyObject is faulty string, returns invalid Day.js -object object. By default returns undefined, if parameter cannot be parsed. * * @returns A Day.js -object or undefined. */ static getDayJs(datelyObject: DatelyObject, allowInvalid?: boolean): any | undefined; /** * Returns the duration object. If parameter is empty or null, defaults to Today (not Now). * * @param startDatelyObject Duration start that is parsed using getDayJs(). * Null before conversion defaults to today. Invalid objects result to invalid duration. * @param endDatelyObject Duration start that is parsed using getDayJs(). * Null before conversion defaults to today. Invalid objects result to invalid duration. * * @returns A Duration object, which may also be invalid */ static getDuration(startDatelyObject: DatelyObject, endDatelyObject: DatelyObject): any; /** * Gets a date range based on start and end dates. * Days count is calculated using getWorkdays() (Add parameter if you need other day count methods). * * @param start DateRange start, DatelyObject that should be converted to Salaxy date: A string, JS Date object, Day.js etc. * @param end DateRange end, DatelyObject that should be converted to Salaxy date: A string, JS Date object, Day.js etc. * * @returns DateRange based on start and end dates. */ static getDateRange(start: DatelyObject, end: DatelyObject): DateRange; /** * Returns earliest workday counted from startDate parameter. If startDate is workday, it is returned. * @param startDate start date, where to start searching a work day * @returns Workday in simple ISO format YYYY-MM-DD */ static getWorkday(startDate: DatelyObject): string; /** * Gets the workdays between two dates including both days. * Returns empty array if there is no start or if end is before start. * Returns 1 day if there is no end: we assume that the user selected just one day. * * @param startDate A dately value as the start date (a string, JS Date object, DayJs etc.). * @param endDate Corresponding end date. * @param holidayGroup The holiday group for defining which days not to count as working day. The default group is Holiday. * * @returns The work days between the two dates (inclusive). */ static getWorkdays(startDate: DatelyObject, endDate: DatelyObject, holidayGroup?: HolidayGroup): string[]; /** * Gets the vacation days (6 day week Mon-Sat) between two dates including both days. * Returns empty array if there is no start or if end is before start. * Returns 1 day if there is no end: we assume that the user selected just one day. * * @param startDate A dately value as the start date (a string, JS Date object, DayJs etc.). * @param endDate Corresponding end date. * @param holidayGroup The holiday group for defining which days not to count as working day. The default group is Holiday. * * @returns The work days between the two dates (inclusive). */ static getVacationDays(startDate: DatelyObject, endDate: DatelyObject, holidayGroup?: HolidayGroup): string[]; /** * Gets a formatted range of two dates. * * @param startDate A dately value as the start date (a string, JS Date object, DayJs etc.). * @param endDate Corresponding end date. * * @returns A date range string with possible formats: * "12. - 25.11.2019", "12.11. - 02.12.2019", "12.11.2019 - 12.01.2020", "12.01.2020 -" or "- 12.01.2020". */ static getFormattedRange(startDate: DatelyObject, endDate: DatelyObject): string; /** * Output a formatted date with default date format (may later be localized). * @param date A dately value (a string, JS Date object, DayJs etc.) that is formatted. * @returns A Simple date string e.g. "12.11.2019", if the value is empty or null returns "-". */ static getFormattedDate(date: DatelyObject): string; /** * Formats a dately object using DayJs formatting: * Default is "DD.MM.YYYY" * For all format string options, see https://day.js.org/docs/en/display/format */ static format(date: DatelyObject, format?: string, nullValue?: string): string; /** * Gets the day of month as 1-based number: 1-31. * * @param datelyObject - Object that represents date: A string, JS Date object, DayJs etc. * Special string "today" can be used for fetching today's date. * * @returns Day of month between 1-31 or undefined if the object is not a dately object. */ static getDay(datelyObject: DatelyObject): number | undefined; /** * Sets the day of month as 1-based number: 1-31. * * @param datelyObject - Object that represents date: A string, JS Date object, DayJs etc. * Special string "today" can be used for fetching today's date. * @param dayOfMonth - day of the month to be set (1-31 depending on month, will bubble to next if beyond endof month) * @returns Day of month between 1-31 or undefined if the object is not a dately object. */ static setDay(datelyObject: DatelyObject, dayOfMonth: number): string | undefined; /** * Gets the day of week as ISO 1-based number: 1-7. * * @param datelyObject - Object that represents date: A string, JS Date object, DayJs etc. * Special string "today" can be used for fetching today's date. * * @returns Day of week */ static getWeekday(datelyObject: DatelyObject): number | undefined; /** * Gets isoWeek-number for provided date * @param date Base date for week number * @returns week number */ static getWeekNumber(date: DatelyObject): number | undefined; /** * Gets number of day in month in given datelyObject. * @param date Base date for getting the month * @returns numbber of days in the month of the given base date. */ static getDaysInMonth(date: DatelyObject): number | undefined; /** * Gets the month as 1-based number: 1-12. * * @param datelyObject - Object that represents month: A string, JS Date object, DayJs etc. * Special string "today" can be used for fetching today's date. * * @returns Month between 1-12 or undefined if the object is not a dately object. */ static getMonth(datelyObject: DatelyObject): number | undefined; /** * Gets the year of a date or today. * * @param datelyObject - Object that represents month: A string, JS Date object, DayJs etc. * Special string "today" can be used for fetching today's date. * * @returns Year, e.g. 2019 or null if the object is not a dately object. */ static getYear(datelyObject: DatelyObject): number | undefined; /** * Returns true if the given dately object is a holiday. * Please note that the weekend days are not by default holidays * * @param datelyObject - Object that should be converted to date: A string, JS Date object, DayJs etc. * @param holidayGroup - The holiday group for defining which days to count as holiday day. The default group is Holiday. * * @returns True, if the given dately object is a holiday. */ static isHoliday(datelyObject: DatelyObject, holidayGroup?: HolidayGroup): boolean; /** * Returns true if the given dately object is a working day (5 day week). * The day must not be Saturday or Sunday or not any day in the given holiday categoria. * * @param datelyObject - Object that should be converted to date: A string, JS Date object, DayJs etc. * @param holidayGroup - The holiday group for defining which days to count as holiday day. The default group is Holiday. * * @returns True, if the given dately object is a working day. */ static isWorkday(datelyObject: DatelyObject, holidayGroup?: HolidayGroup): boolean; /** * Returns true if the given dately object is a vacation day (6 day week). * The day must not be Sunday or not any day in the given holiday categoria. * * @param datelyObject - Object that should be converted to date: A string, JS Date object, DayJs etc. * @param holidayGroup - The holiday group for defining which days to count as holiday day. The default group is Holiday. * * @returns True, if the given dately object is a working day. */ static isVacationday(datelyObject: DatelyObject, holidayGroup?: HolidayGroup): boolean; /** * Adds given amount of working days to given day. * * @param datelyObject - Object that should be converted to date: A string, JS Date object, DatyJs etc. * @param days - Working days to add (positive or negative number). * If zero or not set, returns datelyObject or next workday if datelyObject is not a workday. * @param holidayGroup - The holiday group for defining which days to count as holiday day. The default group is Holiday. * * @returns New working day with amount of given working days ahead. */ static addWorkdays(datelyObject: DatelyObject, days: number, holidayGroup?: HolidayGroup): string; /** * Adds (or substracts) days, months or years to a dately object. * @param datelyObject Base date for the addition. * @param amount Number of days/months/years to add * @param unit Unit for the addition: day,month,year */ static add(datelyObject: DatelyObject, amount: number, unit: "day" | "week" | "month" | "quarter" | "year"): string | undefined; /** * Changes a date to start/end of week/month/quarter/year * @param datelyObject Base date that is converted. * @param type Type of change: start-week, start-month, start-quarter, start-year, end-week, end-month, end-quarter, end-year */ static startEnd(datelyObject: DatelyObject, type: "start-week" | "start-month" | "start-quarter" | "start-year" | "end-week" | "end-month" | "end-quarter" | "end-year"): string | undefined; /** * Parses the given date range string to a DateRange. Parsing is implemented for optimized date * range inputs. Optimized date range means that dates can be given in a shorter/truncated form, * for improved user efficiency, by omitting some components from the date strings: * * - For the end date the day is the only mandatory component, if month and/or year are omitted * they default to current month and year respectively * - For the start date all components are optional, any omitted components default to the * respective components from the end date. * * For example the result of parsing a user inputted optimized date range string "1 - 20" would be * { start: 2021-04-01, end: 2021-04-20, }. * * @param dateRange The optimized date range string to be parsed. The dates in the date range * should be in finnish format (dd.mm.yyyy or without leading zeros d.m.yyyy). Start and end dates * should be separated by a hyphen (-). Examples of valid date range strings could be e.g. * "1.4 - 1.5.2021" or "1" which would be parsed as { start: 2021-04-01, end: 2021-05-01 } and * { start: 2021-04-01, end: 2021-05-01 } respectively (at the time of writing this documentation). * @returns The parsed DateRange. */ static parseOptimizedDateRange(dateRange: string): DateRange | undefined; /** * Parses a start date from an optimized date range string. Uses the end date as the default if * start date or some of its components are not given. * @param dateRange - String to be parsed as start of DateRange * @returns string */ private static parseStartDateFrom; /** * Parses an end date from an optimized date range string. Uses the current date as the default if * month and/or year are not given. * @param dateRange - String to be parsed as end of DateRange * @returns string */ private static parseEndDateFrom; /** * Parses an optimized date string. The date string should be in finnish format (dd.mm.yyyy with * or without leading zeros). Month and/or year component can be omitted from the date string * (optimized date string...) in which case they are taken from the default date. If default date * is not given the current date is used * @param date - String to be parsed as DateRange * @param defaultDate default date, fallbacks to today * @returns string */ private static parseOptimizedDate; private static parseDay; /** * Parses an optimized month string. If the month is not given it is taken from the default date. */ private static parseMonth; /** * Parses an optimized year string. Defaults to the 3rd millenium, if the given year doesn't * contain the millenia e.g. "21" --> "2021". If the year is not given at all, it is taken from * the default date. */ private static parseYear; /** * Parses DateRange from a string * @param dateRange string to be parsed as date range * @returns DateRange */ private static parseDateRange; /** * Validates that the given date range string only contains allowed character (numbers, periods, * dashes, spaces). */ private static validateDaterangeInput; /** * Validates a date range by checking that the start date is not after the end date. * This method does not validate start and end dates strictly, so 30.2.2023 will be translated internally dy Day.js to * 2.3.2023. * @param dateRange - date range to be validated */ private static validateDaterangeOrder; /** * Gets holidays for the given year. * * @param forYear - Dately object (JavaScript date, ISO string formatted date, or DayJs-object) for which the holidays are fetched. * * @returns The holidays for the given year. */ static getYearlyHolidays(forYear: DatelyObject): Holidays; /** * Checks if date1 is after date2 * @param date1 comparable date1 * @param date2 comparable date1 * @param granularity granularity for isAfter, default is date * @returns true if date1 is after date2 */ static isAfter(date1: DatelyObject, date2: DatelyObject, granularity?: string): boolean; /** * Checks if date1 is before date2 * @param date1 comparable date1 * @param date2 comparable date1 * @param granularity granularity for isBefore, default is date * @returns true if date1 is before date2 */ static isBefore(date1: DatelyObject, date2: DatelyObject, granularity?: string): boolean; /** * Checks if date1 is same or after date2 * @param date1 comparable date1 * @param date2 comparable date1 * @param granularity granularity for isAfter, default is date * @returns true if date1 is is same or after date2 */ static isSameOrAfter(date1: DatelyObject, date2: DatelyObject, granularity?: string): boolean; /** * Checks if date1 is same or before date2 * @param date1 comparable date1 * @param date2 comparable date1 * @param granularity granularity for isAfter, default is date * @returns true if date1 is same or before date2 */ static isSameOrBefore(date1: DatelyObject, date2: DatelyObject, granularity?: string): boolean; } /** * Date/Time parsing, formatting and other operations within the Salaxy framework. * We use ISO 8601 as our Date/Time format even inside JavaScript objects. * This is because of the following reasons: * * 1. Generally, we do not want to use JavaScript Date because it presents so many problems. * 2. We store dates in JSON as ISO 8601 date strings - this is universally the best practice * 3. ISO 8601 provides a way to present a date without time and most importantly timezone information * 4. ISO 8601 date also works best for most UI components (because of similar reasons as above). * * IMPORTANT: Use Date/Time only where TIME and/or timezone is relevant. * Otherwise use Date (Dates library) that does not have time or timezone. * * Implementation uses Day.js */ export declare class DateTimes { /** * Adds (or substracts) hours, minutes or seconds to a dately object. * @param datelyObject Base timestamp for the addition. * @param amount Number of units to add * @param unit Unit for the addition: hour,minute,second * @returns DatelyObject */ static add(datelyObject: DatelyObject, amount: number, unit: "hour" | "minute" | "second"): DatelyObject | undefined; /** * Gets date in HH:mm formatted string * @param date Object that should be formatted * @returns HH:mm formatted string */ static asTime(date: Date): string | undefined; /** * Gets hours and minutes from date and convert them to minutes integer * @param date Date used to get hours and minutes * @returns Minutes as integer */ static asMinutes(date: Date): number | undefined; /** * Convert time to ISO datetime string. * @param time Timestamp, HH:mm * @returns Iso datetime */ static fromTime(time: string): Date; /** * Converts minutes to JSDate object. Adds minutes to start of current day. * @param minutes Used minutes to create JSDate * @returns JSDate */ static fromMinutes(minutes: number): Date; /** * Formats a datetime ISO string (or other dately object) * as time with texts "Today", "Yesterday", "D.M. HH:mm" for this year * and "D.M.YYYY" for other years (if necessary, add option for adding time to previous years). * * @param time Dately object to format */ static format(time: DatelyObject): string; /** * Formats a date/time range to an end-user friendly duration text. Note that durations are not context bound. * So translation of longer durations depend on context (years, months) * @param start Start of the range as ISO string. * @param end End of the range as ISO string. * @param nullValue Value if start or end is missing or cannot be parsed. */ static formatRangeToDuration(start: string, end: string, nullValue?: string): string; /** * Formats a date/time range to an end-user friendly duration text. * @param duration Duration as ISO duration string (e.g. P3Y6M4DT12H30M5S) * @param nullValue Value if duration is missing or cannot be parsed. */ static formatDuration(duration: string, nullValue?: string): string; private static formatDurationFromDayJs; /** * Gets the hour as 0-based number: 0-23. * * @param datelyObject - Object that represents datetime: A string, JS Date object, DayJs etc. * * @returns hour as 0-23 or undefined if the object is not a dately object. */ static getHour(datelyObject: DatelyObject): number | undefined; /** * Gets the minute as 0-based number: 0-59. * * @param datelyObject - Object that represents datetime: A string, JS Date object, DayJs etc. * * @returns hour as 0-59 or undefined if the object is not a dately object. */ static getMinute(datelyObject: DatelyObject): number | undefined; /** * Gets the second as 0-based number: 0-59. * * @param datelyObject - Object that represents datetime: A string, JS Date object, DayJs etc. * * @returns second as 0-59 or undefined if the object is not a dately object. */ static getSecond(datelyObject: DatelyObject): number | undefined; /** * WARNING: Don't use this method. This may be refactored away. * Wraps DayJs UTC offset (minutes). * See: https://day.js.org/docs/en/manipulate/utc-offset * @param timestamp any DayJs compatible DatelyObject * @returns number UTC offset in minutes */ static getUTCOffset(timestamp: DatelyObject): number | undefined; } /** * Relevant information from typedoc reflection. */ export declare interface DeclarationReflection { /** Class name: Name of the component, controller etc. */ name?: string; /** Raw typedoc level type of reflection. */ rawKind?: ReflectionKind; /** The short text: First paragraph of the documentation or if not available (e.g. parameters), then the text. */ shortText?: string; /** Full description: shortText + longer text field. */ descr?: string; /** Short example(s) (inline in documentation) */ example?: string; /** Return value description if rawKind is Method */ returns?: string; } /** * Default usecase logic for row types that have no custom logic / validation. */ export declare class DefaultUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. */ updateUsecase(): void; /** Always returns null */ getUcValidation(): UsecaseValidationMessage; } /** * Defines the current structure for the dictionary for each language. * Lanugages are fi, en and sv. */ export declare interface DictionaryLang { /** SALAXY is the dictionary root object for each language. */ SALAXY?: { /** Enumerations */ ENUM?: any; ENUM_IR?: any; /** Model coming from the server-side through API */ MODEL?: any; MODEL_IR?: any; /** The common user interface terms */ UI_TERMS?: any; /** The validation error messages and other validation messages. */ VALIDATION?: any; /** NG1 UI texts and orher NG1 related texts. */ NG1?: any; NG1_Other?: any; NG1_Pages?: any; NG1_PagesPersonal?: any; NG1_Services?: any; NG1_Sitemap?: any; /** Reports related texts. */ REPORTS?: any; }; } /** Document in the document flow. */ export declare interface DocumentFlowItem { /** Existing business object in the document flow. */ item?: IApiListItem | null; /** Child items, for example invoices for the calculation. */ children?: DocumentFlowItem[] | null; } /** EarningsPaymentReportStatus enumeration */ export declare enum EarningsPaymentReportStatus { New = "new", Scheduled = "scheduled", Succeeded = "succeeded", Canceled = "canceled", Error = "error", Invalid = "invalid" } /** Result item of the EInvoice address query. */ export declare interface EInvoiceAddress { /** Name for the company. */ receiverName?: string | null; /** Official id of the company. */ receiverOfficialId?: string | null; /** Receiver EInvoice address of company. */ receiver?: string | null; /** Intermediator id for this receiver address. */ intermediator?: string | null; /** Intermediator name for this receiver address. */ intermediatorName?: string | null; } /** Import object for E-invoice delivery. */ export declare interface EInvoicingRequest { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 This field is optional and defaults to the company number of the current account. */ officialId?: string | null; /** Additional parameters for import. Defaults to string. */ parameters?: { [key: string]: any; } | null; /** Item for import. */ item?: string | null; /** Validation for the import */ validation?: ApiValidation | null; /** Result object of the import. */ result?: ApiImportResultOfObject | null; } /** Models the business logic of Employer side of the calculation. For documentation, see the IEmployerCalculation interface. */ export declare interface EmployerCalculationDTO { /** All side cost: The mandatory side costs + Palkkaus and partner fees */ allSideCosts?: number | null; /** The final cost after household decuction from the tax authorities: Add to the payment the deductions (paid by employer) and deduct House hold deduction (later potentially other such subsidies) */ finalCost?: number | null; /** Household deduction that the tax man will reimburse in taxation. This is an estimation: There is minimum and maximum limits etc. */ householdDeduction?: number | null; /** The mandatory side costs are Pension (TyEL), Social secuirty and Unemployment insurance. */ mandatorySideCosts?: number | null; /** The Palkkaus.fi fee including potential partner fees. */ palkkaus?: number | null; /** Extra service charge in addition to Palkkaus fee. */ service?: number | null; /** The part of the Pension that Employer pays */ pension?: number | null; /** The social security payment- paid as part of taxation (ennakonpidätys). */ socialSecurity?: number | null; /** Total payment that is Paid to Palkkaus.fi */ totalPayment?: number | null; /** Total payment using pre Insiders register calculation logic. DEPRICATED: This is provided for special scenarios and may be removed without warning */ totalPaymentLegacy?: number | null; /** Total salary cost is the paid salary, deductions and side costs, but not expenses. */ totalSalaryCost?: number | null; /** The part of the unemployment insurance that the employer pays */ unemployment?: number | null; /** Total deductions that are made from the payment that is paid to Palkkaus and then to Worker */ totalDeductions?: number | null; /** Union payment if it is deducted from the final figure */ deductionUnionPayment?: number | null; /** Pension payments, when paid directly by the Employer - not by Palkkaus.fi */ deductionPensionSelfPayment?: number | null; /** Unemployment insurance (TVR) payments, when paid directly by the Employer - not by Palkkaus.fi */ deductionUnemploymentSelfPayment?: number | null; /** Salary advance - this part has already been paid. */ deductionSalaryAdvance?: number | null; /** Foreclosure that has already been paid by the employer. */ deductionForeclosure?: number | null; /** Tax and social security payments, when paid directly by the Employer - not by Palkkaus.fi */ deductionTaxAndSocialSecuritySelfPayment?: number | null; /** Worker salary and expense payments, when paid directly by the Employer - not by Palkkaus.fi */ deductionWorkerSelfPayment?: number | null; /** Foreclosure that Palkkaus.fi pays in behalf of employer. */ foreclosureByPalkkaus?: number | null; /** Other deductions that are deducted from the net salary. */ deductionOtherDeductions?: number | null; } /** Employer groups that are set on Example calculations. These will be replaced by properties from Worker / Employer */ export declare interface EmployerGroups { /** If true, the Employer is a private person. Otherwise Company or Unknown. */ isPrivatePerson?: boolean | null; } /** Employing relation info for the worker. */ export declare interface EmployingRelation { /** Employer avatar */ employer?: AccountInIndex | null; /** Contact information for the report. Typically the employer, but may be something else. By desing, the contact information is not filled in for Private Person employers. */ contact?: Contact | null; /** Relevant and public employer settings. */ settings?: EmployingRelationSettings | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Cost accounting settings in the employing relation. */ export declare interface EmployingRelationCostAccounting { /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** Settings for the employing relation. */ export declare interface EmployingRelationSettings { /** Cost accounting settings for employing relation. */ costAccounting?: EmployingRelationCostAccounting | null; } /** Employment relation: The relation between Employer and Worker as well as the personal info of the worker. */ export declare interface Employment { /** General information about the Employment relation. */ info?: EmploymentRelationInfo | null; /** Describes the work that is being performed in this Employment Relation. */ work?: WorkDescription | null; /** Contains values that are needed when creating an employment, but where changing is restricted in the future: E.g. names and personalId are required when creating a new employment, but once a calculation is created (or at least paid), editing of theses is no longer possible. See the editing rules for individual properties. */ identity?: EmploymentIdentity | null; /** Properties of the employment for international situations: Working abroad or foreign worker. */ international?: EmploymentRelationInternational | null; /** Contacts stored in the employment. */ contacts?: ContactAdvanced[] | null; /** Usecase is data related to the source and processing of the Employment data outside the Salaxy backend service / system. Typically, Usecase data would be processed by an external system that has originally created the Employment Relation (Worker / Employee in many systems). E.g. expenses system, hourly reporting system. */ usecase?: UsecaseData | null; /** Defines how the holidays are specified to this Worker. */ holidays?: HolidaySpecification | null; /** Contains read-only personal information for the worker typically managed by the Worker account: Names, personal ID and contact. Currently, this data is edited in Person or WorkerAccount containers, not in the employment relation. */ personalInfo?: AccountInIndex | null; /** If true, the Worker has registered and maintains his / her own personal info. If false, the Worker account is created and still maintained by the Employer. */ isRegistered?: boolean | null; /** Workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Employment specific business data for index. */ export declare interface EmploymentData { /** Type for the pension insurance. */ pensionCalculation?: PensionCalculation | null; /** Taxcard type from the employment point of view. */ taxcard?: EmploymentRelationTaxcard | null; /** Type of the employment relation */ type?: EmploymentRelationType | null; /** Start date of the Employment Relation. */ startDate?: string | null; /** End date of the Employment Relation. */ endDate?: string | null; /** Duration of the employment. If true, the employment relation is for a fixed term. Otherwise (which is the default) the employment relation continues until further notice. */ isFixedTerm?: boolean | null; /** Indicates that the employment relation has been terminated. This is the value stored in the database as opposed to */ isTerminated?: boolean | null; /** The search logic returns the active state of the employment here in relation to queried date (or today). Note that you cannot query based on this dynamic parameter: All values in the search index are null. */ isActive?: boolean | null; } /** Contains values that are needed when creating an employment, but where changing is restricted in the future: E.g. names and personalId are required when creating a new employment, but once a calculation is created (or at least paid), editing of theses is no longer possible. See the editing rules for individual properties. */ export declare interface EmploymentIdentity { /** First name of the Worker. Value is required when creating a new employment, it cannot be modified after initial create: Instead you should just delete the Worker (only allowed if no paid salaries etc.) and create a new one. */ firstName?: string | null; /** Last name of the worker. Editing rules are the same as with FirstName. */ lastName?: string | null; /** Personal ID (hetu) of the worker (currently required). Editing rules are the same as with FirstName. */ personalId?: string | null; /** Avatar picture. If set, this is used in avatar instead of Initials (automatic FirstName/LastName) and color. May be changed until the Worker registers to the service. After this, the Worker can upload their own image or choose to remove the image. */ avatarImg?: string | null; /** Avatar color for visual icon together with initials. Use web compatible rgb values, e.g. "#FF00FF" or "rgb(255, 0, 255)". Editing rules are the same as with AvatarImg. */ color?: string | null; /** Language of the user in user interfaces and print-outs (most significantly the salary slip). Editing rules are the same as with AvatarImg. */ language?: Language | null; } /** Represents a single item in a list of employment relations in the user interface. */ export declare interface EmploymentListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: EmploymentRelationStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: EmploymentData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Logic related to Employment Relations. */ export declare class EmploymentLogic { /** Gets a new blank item as bases for UI binding. */ static getBlank(): Employment; /** * Gets a description text for an Employment. * @param account The account info * @param type Type of employment relation * @param pensionCalculation Type of pension calculation. */ static getDescription(account: AccountInIndex, type: EmploymentRelationType, pensionCalculation: PensionCalculation): string; /** * Gets a descriptive text on whether the employment is active or not. * @param employment Employment relation to get the text for. * @returns A text that describes whether the employment is active or not with the dates (start and end). */ static getActiveText(employment: Employment | EmploymentListItem): string; /** * Type guard for EmploymentListItem (as opposed to Employment) . * @param employment An item that mey be Employment or EmploymentListItem (or undefined / null). * @returns True if the item is an EmploymentListItem (based on data property). */ static isListItem(employment: Employment | EmploymentListItem | undefined): employment is EmploymentListItem; /** * Gets an AccountInIndex object based on WorkerAccount. * This can be used in employmetn logic methods (e.g. getDescription()) if the source is WorkerAccount and not Employment. */ static getAccountInIndex(account: WorkerAccount): AccountInIndex | undefined; /** * Returns options object for PensionCalculation selection by employment relation type. * @param employmentRelationType Employment relation type of the worker. */ static getPensionCalculationOptions(employmentRelationType: EmploymentRelationType, contracts: PensionContract[]): Array; /** * Sets the income earner types accordingly based on employment type. * Called when the type of employment changes * @param model Employment relation to update. */ static resetModelFromType(model: Employment): void; /** * Sets the income earner types accordingly based on pension calculation. * Called when the pension calculation changes. * @param model Employment relation to update. */ static resetModelFromPensionCalculation(model: Employment): void; /** * Sets the salary default rows (rows that are used when creating new claculations) * based on the employment type. * @param type Employment type * @param work Work description that contains the salary defaults (will be reset). */ static setSalaryDefaultRows(type: EmploymentRelationType, work: WorkDescription): void; /** * Gets the social security pensions model (available options) for the current selections. * @param settings Account settings in the session * @param type Type of employment relation selected * @param socialSecurity Whether the person is in Finnish or foregion social security - or mixed * @param pensionCalculation Type of Pension calculation: employee/TyEL or others (YEL, farmer etc.) * @param pensionCompany Pension company (if several) that is selected. * @param insuranceCompany Insurance company (if several) that is selected. * @param socSecExceptions The selected social security exceptions (not subject to) */ static getSocialSecurityModel(settings: AccountSettingsInSession, type: EmploymentRelationType, socialSecurity: "default" | "foreign" | "mixed", pensionCalculation: PensionCalculation, pensionCompany: PensionCompany, insuranceCompany: InsuranceCompany, socSecExceptions: InternationalSocialSecurityException[]): EmploymentSocialSecurityModel; /** * Gets the companies that are valid for today (insurance or pension companies). * @param contracts Collection of contracts * @returns Those companies (id's) that have contracts that are valid today. */ static getValidCompanies(contracts: (PensionContract | InsuranceContract)[]): string[]; /** * Gets the contract numbers (for a sepcific insurance company) that are valid for today. * @param company Insurance company for which the numers are fetched. * @param contracts Collection of contracts * @returns Those contract numbers that are valid for today (for the given company). */ static getValidContractNumbers(company: string, contracts: (PensionContract | InsuranceContract)[]): string[]; /** * Gets the contracts that are valid for today. * @param contracts Collection of contracts * @returns Those contracts that are valid for today. */ static getValidContracts(contracts: (PensionContract | InsuranceContract)[]): (PensionContract | InsuranceContract)[]; /** * Gets a contact of specific type. * @param model Employment relation to get the contact from. * @param type Type of contact to get. Use null to fetch any contact type (creates Default if requested). * @param createIfNotExists If true creates the contact of given type if one does not exist. * @returns Contact of given type or undefined if one is not found AND createIfNotExists is false. */ static getContact(model: Employment, type: ContactType | null, createIfNotExists?: boolean): ContactAdvanced | null; /** * Populates given user with test data. * Sets values only if the firstName and lastName have been given. * @param employment - Employment relation to populate with test data. * @param useRealPersonaIdRange - If true, uses the real personal id range instead of artificial ID range ("keinohetu": last 3 numbers start with 9). */ static populateWithTestData(employment: Employment, useRealPersonaIdRange?: boolean): void; /** * Returns true if the personal ID is other identifier than Finnish Personal Identification Number (keinohetu). * @param ssn Personal ID to check. */ static isPersonalIdOther(ssn: string): boolean; /** * Returns valid employment reg codes for the selected pensions company. * @param pensionCompany - Keva pension company. * @returns Options for the employment reg codes. */ static getEmploymentRegCodeOptions(pensionCompany: PensionCompany): Array; private static cleanupEmailPart; } /** General information about the Employment relation. */ export declare interface EmploymentRelationInfo { /** The Account ID of the Worker if Worker */ workerAccountId?: string | null; /** Identifier in a source system. Used in imports etc. */ sourceId?: string | null; /** User friendly employment relation type that is used to set other more technical types and Incomes Registry properties. */ type?: EmploymentRelationType | null; /** The bank account number for salary payment. */ ibanNumber?: string | null; /** Type of additional income earner data by National Incomer Register classification . If several types apply, all of them should be selected. */ irIncomeEarnerTypes?: IncomeEarnerType[] | null; /** Type for the pension insurance. */ pensionCalculation?: PensionCalculation | null; /** Rules (e.g. effect of monthly lower limit) for pension calculation. */ pensionRule?: PensionRule | null; /** The id of the pension company. */ pensionCompany?: PensionCompany | null; /** The pension contract number. */ pensionContractNumber?: string | null; /** The id of the insurance company. */ insuranceCompany?: InsuranceCompany | null; /** The accident insurance contract number. */ insuranceContractNumber?: string | null; /** Taxcard type from the employment point of view. */ taxcard?: EmploymentRelationTaxcard | null; /** Status of this employment relationship */ status?: EmploymentRelationStatus | null; /** Worker's preferred salary payment method: bank account, external etc. */ salaryPaymentMethod?: EmploymentRelationSalaryPaymentMethod | null; /** Start date of the Employment Relation. */ startDate?: string | null; /** End date of the Employment Relation. */ endDate?: string | null; /** Duration of the employment. If true, the employment relation is for a fixed term. Otherwise (which is the default) the employment relation continues until further notice. */ isFixedTerm?: boolean | null; /** Indicates that the employment relation has been terminated. Saving with this status also makes the employment relation Archived. */ isTerminated?: boolean | null; /** Employment registration code for Incomes Registry. */ employmentRegCode?: string | null; } /** Properties of the employment for international situations: Working abroad or foreign worker. */ export declare interface EmploymentRelationInternational { /** Country of residence for non-recident of Finland (rajatusti verovelvollinen) */ country?: Country | null; /** Identifier for non-recident of Finland in the country of residence. Type of the identifier is specified in IdType. */ foreignId?: string | null; /** Type of ForeignId. */ idType?: InternationalIdentifier | null; /** The non-resident taxcard (or percent without taxcard) that is used if the taxcard in Employment.Info.Taxcard is set to TaxAtSource. */ taxAtSource?: TaxAtSource | null; /** Types of social security for international situations. */ socialSecurity?: InternationalSocialSecurityType | null; /** Exceptions to standard social security cases. */ socialSecurityExceptions?: InternationalSocialSecurityException[] | null; } /** EmploymentRelationSalaryPaymentMethod enumeration */ export declare enum EmploymentRelationSalaryPaymentMethod { BankAccount = "bankAccount", External = "external" } /** EmploymentRelationStatus enumeration */ export declare enum EmploymentRelationStatus { Unknown = "unknown", Primary = "primary", SecondaryCurrent = "secondaryCurrent", Archived = "archived" } /** EmploymentRelationTaxcard enumeration */ export declare enum EmploymentRelationTaxcard { Undefined = "undefined", Auto = "auto", Manual = "manual", NoTaxCard = "noTaxCard", TaxAtSource = "taxAtSource" } /** EmploymentRelationType enumeration */ export declare enum EmploymentRelationType { Undefined = "undefined", Salary = "salary", HourlySalary = "hourlySalary", MonthlySalary = "monthlySalary", Compensation = "compensation", BoardMember = "boardMember", Entrepreneur = "entrepreneur", Farmer = "farmer", EmployedByStateEmploymentFund = "employedByStateEmploymentFund", Athlete = "athlete", PerformingArtist = "performingArtist", ForeignWorker = "foreignWorker", WorkingAbroad = "workingAbroad" } /** * Provides CRUD access to employment relations. */ export declare class Employments extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): Employment; /** * Makes an OData query to the employment relation list with helper to filter active relations. * @param activeDate The date for which the employment relations are fetched. * Use "all" for all relations (active or passive), "today" for relations that are active today or a date string for specific date. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ getODataActive(activeDate: "all" | "today" | DatelyObject, query: ODataQueryOptions | string): Promise>; /** * Gets the active employment relations. * @param date The date for which the employment relations are fetched. * @returns A collection of full employment relation objects. */ getActiveFullObject(date: string): Promise; /** * Returns a list of all employing relations of existing employers for the current account. */ getODataForEmployingRelations(options: ODataQueryOptions): Promise>; /** * Returns the public employment profile for the worker. * The profile contains for example project structure for the worker. * @param owner Employment owner. * @param id Employment id. */ getEmployingRelation(owner: string, id: string): Promise; } /** * Mainly for user interfaces defines of model of potential choises available for the user: * pension, insurance and social security selections. */ export declare interface EmploymentSocialSecurityModel { /** * Selectable Pension types based on employment type. * This is null if Worker is not subject to pension at all. */ pensionCalculationOptions: InputEnumOption[] | null; /** If true, the UI should show the employee pension (TyEL) related elements: Subject to pension AND Worker PensionCalculation is "employee" (TyEL). */ showPension: boolean; /** Available pension contracts for the current company (and session). Null if the selection should not be shown. */ pensionContractNumbers: InputEnumOption[]; /** If true the pension company selection should be shown. */ showPensionCompanySelection: boolean; /** Available pension companies based on the current session. */ pensionCompanies: InputEnumOption[]; /** Available insurance companies as enum options */ insuranceCompanies: InputEnumOption[]; /** Available insurance contract numbers for the current company (and session). Null if the selection should not be shown. */ insuranceContractNumbers: InputEnumOption[] | null; /** If true, the UI should show the Accident insurance related elements (subject to accident insurance) */ showInsurance: boolean; /** If true the insurance company selection should be shown. */ showInsuranceCompanySelection: boolean; /** If true, the employment type is foreign work or working abroad => Show the international options. */ isInternational: boolean; /** * If false, user is not at all in Finnish social security: Show none of the pension, insurance, unemployment etc. selections. * Typically true: Finnish social security or mixed. */ showSocialSecurity: boolean; /** Emmployment registration codes for Keva contracts */ employmentRegCodes: InputEnumOption[]; } /** EmploymentTerminationKind enumeration */ export declare enum EmploymentTerminationKind { Undefined = "undefined", NoticePeriodCompensation = "noticePeriodCompensation", MonetaryWorkingTimeBankCompensation = "monetaryWorkingTimeBankCompensation", TerminationAndLayOffDamages = "terminationAndLayOffDamages", VoluntaryTerminationCompensation = "voluntaryTerminationCompensation", PensionPaidByEmployer = "pensionPaidByEmployer" } /** Handles the Calculation of CalculationRowType.EmploymentTermination to IrRows */ export declare interface EmploymentTerminationUsecase { /** Primary subtyping of the usecase. */ kind?: EmploymentTerminationKind | null; } /** Client-side logic for EmploymentTerminationUsecase */ export declare class EmploymentTerminationUsecaseLogic extends BaseUsecaseLogic { /** Gets validation message for IrIncomeTypeUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private getCodeData; private isIrIncomeTypeLabel; } /** * Provides information about an enumeration. Currently, only string enumerations are supported. */ export declare interface EnumDoc extends RootDeclarationReflection { /** Member names */ names: string[]; /** Member values */ values: string[]; } /** * Provides metadata and other helpers for enumerations. */ export declare class EnumerationsLogic { /** * Gets a label text for an enumeration value. * @param enumType Name of the Type of the enumeration with or without the namespace. The default namespace for the type is SALAXY.ENUM. * @param memberName Name of the member for which the label is fetched. * Also supports the value of the member if there is only difference in casing (which is the normal convention). * @param defaultValue The default value if the translation is not found. * Supports special keys "#name" and "name" to return the member name either with or without hash in the beginning. * Default is "#name", which returns "#[MemberName]" if the translation is not found. * @param language Optional language, for forcing the result as given language. * @returns Language specific text form translations or the memberName text if no translation is found. */ static getEnumLabel(enumType: string, memberName: string, defaultValue?: null | string | "#name" | "name", language?: Language): string; /** * Gets a description text for an enumeration value in current language. * @param enumType - Name of the Type of the enumeration with or without the namespace. The default namespace for the type is SALAXY.ENUM. * @param memberName Name of the member for which the description is fetched. * Also supports the value of the member if there is only difference in casing (which is the normal convention). * @param defaultValue The default value if the translation is not found. Default is null. * Supports special keys "#name" and "name" to return the member name either with or without hash in the beginning. * @param language Optional language, for forcing the result as given language. * @returns Language specific text form translations or null if none is found. */ static getEnumDescr(enumType: string, memberName: string, defaultValue?: null | string | "#name" | "name", language?: Language): string; /** * Gets a very short user interface text for an enumeration. * Currently only suppotrted for Unit, but we expect more of these. * If the texts will be language-versioned, that logic will be here as well. * @param enumType - Name of the Type of the enumeration. * @param enumValue - Value for which the text is fetched. */ static getEnumShortText(enumType: string, enumValue: string): string; /** * Gets the metadata (texts etc.) for an enumeration value. * @param enumType - Name of the Type of the enumeration with or without the namespace. The default namespace for the type is SALAXY.ENUM. * @param enumValue - Value for which the label is fetched. * @param language Optional language, for forcing the result as given language. */ static getEnumValueMetadata(enumType: string, enumValue: string, language?: Language): EnumValueMetadata; /** * Gets the metadata (texts etc.) for an enumeration and its values. * @param enumType - Name of the Type of the enumeration with or without the namespace. The default namespace for the type is SALAXY.ENUM. * @param language Optional language, for forcing the result as given language. */ static getEnumMetadata(enumType: string, language?: Language): EnumMetadata; /** * Gets the currently known enumerations. * @param ns - Namespace for the enumeration. By default this is SALAXY.ENUM */ static getEnums(ns?: string): string[]; private static getGeneratedEnumData; private static getFullEnumType; /** * You can override values of generatedEnumData without generating the entire set of enums from server. * TODO: These enums (if any) should be moved to C# code server-side and removed from here. */ private static enumDataOverride; private static lowerCamelCase; private static upperCamelCase; } /** Describes an enumeration for user interface purposes. */ export declare interface EnumMetadata { /** Type name of the enumeration (UpperCamelCase) */ name: string; /** Description of the enumeration if the translations have been applied. */ descr?: string; /** Values of the enumeration. */ values: EnumValueMetadata[]; } /** Describes a single item (value) within an enum type */ export declare interface EnumValueMetadata { /** Text value of the enumeration (lowerCamelCase) */ name: string; /** Sorting order number of the value within the enum. */ order: number; /** Label of the enumeration if the translations have been applied. */ label?: string; /** * Description of the enumeration if the translations have been applied. * NOTE: Not all enumerations have description in the globalization files: * They are added only if necessary to the UI. */ descr?: string; } /** Handles the Calculation of CalculationRowType.ExpensesUsecase to IrRows and accounting */ export declare interface ExpensesUsecase { /** VAT rate that is generally used for the calculation. */ vatRate: ExpensesVatRate; /** A URL to an attachment file. */ fileUrl?: string; /** Date for the expense as an ISO date. */ date: string; /** Total of vat entries for information purposes. */ total: VatEntry; } /** * Client-side usecases logic for Expenses as well as PrepaidExpenses. */ export declare class ExpensesUsecaseLogic extends BaseUsecaseLogic { private _hasGrossVatEntries; private _row; private _date; /** When user is editing rows (varRate = "multiple"), this is the filed that is being edited => source for calculation. */ multipleRatesEditField: "tax" | "gross" | "net"; /** Returns true if the row has gross vatEntries */ get hasGrossVatEntries(): boolean; /** * Updates the usecase values based on user input without going to the server. */ updateUsecase(row: UsecaseRow, date: DatelyObject): void; private getEmptyVatEntries; private getRow; /** Taxrates and their number percentages as a key-value pair. Values are decimal: 0-1 as 0-100 percent. */ taxRates: { tax0: number; tax10: number; tax14: number; tax24: number; tax255: number; none: number; other: any; }; /** Gets validation message for BoardUsecaseLogic */ getUcValidation(row: UsecaseRow): UsecaseValidationMessage; } /** Defines the possible tax rates for expenses etc. */ export declare enum ExpensesVatRate { /** No VAT specified. */ Undefined = "undefined", /** No rate applied (not even 0%). */ None = "none", /** 25.5% – general VAT rate */ Tax255 = "tax255", /** 24% – general VAT rate */ Tax24 = "tax24", /** 14% – groceries, restaurant services and catering services */ Tax14 = "tax14", /** 10% VAT rate – Books, culture, passenger transport and accommodation */ Tax10 = "tax10", /** 0% – Zero VAT rate */ Tax0 = "tax0", /** Other VAT rate, manually specified. */ Other = "other", /** Multiple VAT rates: Used in expense report when the expense is split to several rows. */ Multiple = "multiple" } /** * Interface for objects which implement export functionality. */ export declare interface Exportable { /** * Returns available mappers for export. */ getExportMappers(): DataMapperInfo[]; /** * Gets an export DataMapper, potentially loading the schema / mapping from the storage. * @param id Identifier for the mapper. If omitted, the Exportable object should not support more than one mapper. * @returns The mapper that maps the source to target. */ getExportMapper(id?: string): Promise>; /** * Method for listing items for export as API List. * @param maxCount - maximum number of items to return. * maxCount can have the following values: * - ```0``` Return all items from the data source. * - ```-1``` Return only the currently listed items. * - ```n``` Where n is any positive number, returns the given number of items. * @param notify - function for notifying progress. * @returns List items. */ list(maxCount?: number, notify?: progressNotification): Promise; /** * Reads the actual object from the API for the given list item. * @param item - The list item for which the actual object should be read. * @returns Object from the API. */ getSingle: (item: ApiListItem) => Promise; /** * Array of available exporters to use. */ exporters: FileExporter[]; } /** Methods for importing data into Salaxy system. */ export declare class ExportLogic { /** * Gets the export data and does the mapping potentially asynchronously and emitting notifications to the user interface. * NOTE: This method is for EXPORT functionality. If there are more methods like this, create a separate ExportHelpers. * @param exportApi The API that implements the Exportable interface: Fetching of the data. * @param mapper The preloaded mapper that is selected and resoplved. * @param maxCount Maximum count of items. null/0 for all items. * @param notify Optional progress notification function * @returns Result DataRows as mapped. */ static getExportData(exportApi: Exportable, mapper: DataMapper, maxCount?: number, notify?: progressNotification): Promise; } /** ExportMethod enumeration */ export declare enum ExportMethod { Undefined = "undefined", FileExcel = "fileExcel", FileCsv = "fileCsv", FilePdf = "filePdf", FileText = "fileText", CopyExcel = "copyExcel", CopyCsv = "copyCsv", CopyText = "copyText", PaymentChannel = "paymentChannel", Api = "api" } /** * Data that is sent to external dialog and received back from it. * Used in cross-site communication. */ export declare class ExternalDialogData { /** * Result of from the external dialog is typically OK, Cancel. * Edit dialogs often also have "delete", but you may add custom actions. */ action: "ok" | "cancel" | "delete" | string; /** * Data that is being edited in the dialog. */ item: TItem; /** * If true, the item has been edited by the user and should typically be saved. * NOTE that this is calculated by the Salaxy calling logic: The external dialog does not need to set this. */ hasChanges?: boolean; } /** View model data for Simple Federation Flow sample page in /MyAccount/Federation */ export declare interface FederationSampleViewModel { /** The federation data based on the current user */ federationData?: OpenIdUserInfoSupportedClaims | null; /** Federation data as JSON: Only used by depricated Asp.Net MVC version of the demo view. */ federationDataJson?: string | null; customFederationDataJson?: string | null; /** Federation data as JWT */ token?: string | null; /** Certificate password for signing */ certificatePwd?: string | null; /** Uploaded certificate file */ certificateFile?: HttpPostedFileBase | null; /** Certificate bytes as Base64String */ certificateBytes?: string | null; /** Account to impersonate. */ accountId?: string | null; } /** * Represents a rule for resolving a BIC code. */ export declare interface FiBics { /** Minimum of a number range for a bank / bic code. */ min: number; /** Maximum of a number range for a bank / bic code. */ max: number; /** BIC code for the range */ label: string; } /** Report specific business data for index. */ export declare interface FileData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Number of workers in the report. */ workerCount?: number | null; /** Number of calculations in the report. */ calculationCount?: number | null; /** Official id for the report. */ officialId?: string | null; /** A user friendly name that can be used in listings. In the upload scenarios this is usually the original file name when uploaded. It is not necessarily unique. No path information */ userFriendlyName?: string | null; /** Technical file name in storage. In practical terms, this is the relative path excluding the container part "/[container]/". I.e. this property is without the starting slash "/". It must be unique and is used for Uri. For user files this is constructed "[Username]/[Type]/[UniqueFileName].[xxx]" */ filePath?: string | null; } /** File format for a table. */ export declare enum FileDelimiter { /** Tab separated table. */ Comma = ",", /** Comma separated table. */ Semicolon = ";", /** Comma separated table. */ Tab = "\t", /** Comma separated table. */ Unknown = "" } /** Defines an exporter that can export data to different file formats (e.g. csv). */ export declare interface FileExporter { /** Id for the export method */ id: ExportMethod | string; /** Label for the method */ label: string; /** If true, supports locales for the data formatting.*/ hasLocales: boolean; /** * Does the actual exporting to a file string. * @param rows An array of rows to export. * @param locale Optional locale selected by the user if supported by the exporter. * @returns The file contents as string. */ export(rows: { [key: string]: any; }, locale?: Culture): void; } /** Represents a single item in a list of reports in the user interface. It contains all essential information of the report and is basis for searching, filtering and sorting. */ export declare interface FileListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: FileData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Utility class for processing files. Eg. exporting and importing file data. */ export declare class FileLogic { /** * Return file extension from filename * @param fileName import file name as string * @returns TableFormat or null */ static getExtensionFromFileName(fileName: string): string | null; /** * Return delimiter from provided data * @param data import data as string * @returns returns FileDelimiter */ static getFileDelimiter(data: string): FileDelimiter; /** * Returns locale * @param csv input csv data * @returns returns locale as string */ static getCsvLocale(csv: FileDelimiter): any; /** * return table format * @param fileDelimiter delimeter used to figure table format * @returns table format */ static getTableFormatByDelimeter(fileDelimiter: FileDelimiter): TableFormat; } export declare interface FileParameter { data: any; fileName: string; } /** Defines a parser that parses a file (e.g. csv) to stadard tabular format. */ export declare class FileParser { constructor(id: string, label: string, format: TableFormat, hasLocales?: boolean); /** Id for the parser method */ id: string; /** Label for the method */ label: string; /** If true, supports locales for the data formatting.*/ hasLocales: boolean; /** Table format for the parser */ format?: TableFormat; /** * Does the actual parsing. In custom FileParsers, override this method * @param data Incoming data as a string * @param locale Optional locale selected by the user if supported by the parser. */ parse(data: string, locale?: Culture): ImportResult; /** * Guesses the parser and locale that may be correct for the given data. * @param parsers Available parsers * @param data Data to be imported. * @returns Guessed parser and locale based on data or null if the parser cannot be guessed. */ static guessParser(parsers: FileParser[], data: string): { parser: FileParser; locale: Culture; }; /** Gets the standard methods that are typically supported. */ static getDefaultParsers(): FileParser[]; } /** * Provides access to user files (of the authenticated user). * PLEASE NOTE: Currently the API is read-only. * The methods for delete save etc. will return a "Not supported." exceptions. */ export declare class Files extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Gets a list of files - filtered by a type * * @param type Logical file type. * * @returns A Promise with result data (list of files). */ filesOfType(type: BlobFileType): Promise; /** * Returns the content url for the file id. * The returned does not contain access token. * @param id - Identifier of the file. */ getContentUrl(id: string): string; /** * Returns the preview image url for the file id. * The returned url does not contain access token. * @param id - Identifier of the file. */ getPreviewUrl(id: string): string; /** * Downloads the content as bytes. * @param id - The identifier of the file. */ download(id: string): Promise; /** * Client-side (synchronous) method for getting a new blank CRUD item as bases for UI binding. * The basic idea is that all the child object properties should be non-null to avoid null reference exceptions. * In special cases, when null is significant it may be used: e.g. Calculation.result is null untill the recalculation has been done. * Strings, dates and booleans may be null (false if bool), but typically just undefined. */ getBlank(): BlobFile; /** * Gets all the items of a given type. * @throws Not supported */ getAll(): Promise; /** * Deletes an single item from the sotrage * @param id - Unique identifier for the object * @throws Not supported */ delete(id: string): Promise; /** * Saves an item to the storage. * If id is null, this is add/insert. If id exists, this is update. * @param itemToSave - The item that is updated/inserted. * @throws Not supported */ save(itemToSave: BlobFile): Promise; } export declare interface FileType { extension?: string | null; mimeType?: string | null; isImage?: boolean | null; readonly isText?: boolean | null; } /** ForeclosureKind enumeration */ export declare enum ForeclosureKind { Undefined = "undefined", Fixed = "fixed", Periodic = "periodic", NonPeriodic = "nonPeriodic" } /** Handles the Calculation of CalculationRowType.Foreclosure to IrRows */ export declare interface ForeclosureUsecase { /** Reference for the payment. */ referenceNumber?: string | null; /** Length of the salary payment period. */ periodLength?: number | null; /** Count of dependants of the debtor. Typically spouse and children. */ dependantsCount?: number | null; /** Amount of the protected portion for each day. */ protectedPortionBase?: number | null; /** Amount of the protected portion for each dependant for each day. */ protectedPortionDependant?: number | null; /** Income from other sources. */ incomeFromOtherSources?: number | null; /** Additional amount to be left to debtor. */ additionalAmountLeftToDebtor?: number | null; /** Primary subtyping of the usecase. */ kind?: ForeclosureKind | null; } /** Client-side logic for ForeclosureUsecase */ export declare class ForeclosureUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. * @param calcData The calculation related data that is required byt the more complex calculations: * This data is available only after first round-trip to the server (results object exists). */ updateUsecase(row: UserDefinedRow, date: DatelyObject, calcData: RowUsecaseCalcData): void; /** Gets validation message for UnionPaymentUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private calculatePeriodLength; private isOnceAMonthPeriod; private isTwiceAMonthPeriod; private isEvery2WeeksPeriod; private getDays; } /** * Provides framework independent helpers for creating HTML forms * based on JSON schema and other metadata. */ export declare class FormHelpers { /** * Gets a valid input type, format and other input properties from schema. * @param schema The property schema based on which the input is created. * @param propertyName Name of property or null if the input is not created from a property, but from model directly. * @param dataBindingPath Path for the data model. * Default is "form": The current form. Could be a a longer path e.g. "form.result.employerCalc" */ static getInputMetadata(schema: OpenAPIV3.SchemaObject, propertyName: string, dataBindingPath?: string): InputMetadata; /** * Gets the necessary metadata for generating the inputs for the specified model of type "object". * If the schema is not of type "object", returns null. * @param schema Schema for which the user interface is generated. * @param dataBindingPath Path for the data model. * Default is "form": The current form. Could be a a longer path e.g. "form.result.employerCalc" */ static getInputsForObject(schema: OpenAPIV3.SchemaObject, dataBindingPath?: string): InputMetadata[]; /** * Gets input for the schema itself. * @param schema Schema for which the input component is generated. * @param propertyName Property name in relation to schema. This may be used in language versioning / texts. * @param dataBindingPath Path for the data binding within the form. */ static getInputForSelf(schema: OpenAPIV3.SchemaObject, propertyName: string, dataBindingPath: string): InputMetadata; /** * Gets the necessary metadata for generating the inputs for the array items. * If the schema is not of type "array", returns null. * @param schema Schema for which the user interface is generated. * @param dataBindingPath Path for the data binding within the form. */ static getInputsForArray(schema: OpenAPIV3.SchemaObject, dataBindingPath: string): InputMetadata[]; } /** Settings for session related to the calculation data delivery by forms. */ export declare interface FormsInSession { } /** Settings related to the calculation data delivery by forms. */ export declare interface FormsSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; } /** FrameworkAgreement enumeration */ export declare enum FrameworkAgreement { NotDefined = "notDefined", Construction = "construction", Mll = "mll", ChildCare = "childCare", Cleaning = "cleaning", SantaClaus = "santaClaus", Entrepreneur = "entrepreneur", Other = "other" } /** Gender enumeration */ export declare enum Gender { Unknown = "unknown", Male = "male", Female = "female" } /** * This data is generated from * **************************************************** * DEVELOPERS NOTE: COPY from https://test-api.salaxy.com/docs/EnumJson/v03 / http://localhost:82/docs/EnumJson/v03 * DO NOT EDIT DIRECTLY * @ignore */ export declare const generatedEnumData: { name: string; description: any; values: { order: number; name: string; }[]; }[]; /** * This data is generated from * **************************************************** * DEVELOPERS NOTE: COPY from https://test-api.salaxy.com/docs/EnumJson/ir / http://localhost:82/docs/EnumJson/ir * DO NOT EDIT DIRECTLY * @ignore */ export declare const generatedIrEnumData: { name: string; description: any; values: { order: number; name: string; }[]; }[]; /** * Yearly changing numbers. Contains side cost percentages. * */ export declare const getYearlyChangingNumbersYears: (refDate: DatelyObject) => YearlyChangingNumbers[]; /** Employer health care from the company Heltti */ export declare interface HealthCareHelttiProduct { /** Defines the product package */ package?: HelttiProductPackage | null; /** Industry of work */ industry?: HelttiIndustry | null; readonly status?: string | null; /** Enabled property set automatically by HelttiProductPackage. */ enabled?: boolean | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** * API for Zendesk */ export declare class HelpCenter { private ajax; static $inject: string[]; constructor(ajax: Ajax); /** * Gets list of articles * @returns List of articles */ getArticles(): Promise; /** * Gets single article by id * @param id article id * @returns article as json */ getArticle(id: string): Promise; /** * Gets single article by id * @param id article id * @returns article as text */ getArticleHTML(id: string): Promise; /** * Gets list of articles * @returns List of articles */ getCategoryArticles(id: string): Promise; } /** HelttiIndustry enumeration */ export declare enum HelttiIndustry { NotDefined = "notDefined", I = "i", J = "j", K = "k", M = "m", O = "o", N = "n", P = "p", Q = "q", R = "r", S = "s", Other = "other" } /** HelttiProductPackage enumeration */ export declare enum HelttiProductPackage { NotDefined = "notDefined", Small = "small", Medium = "medium", Large = "large" } /** Holiday enumeration */ export declare enum Holiday { NewYearsDay = "newYearsDay", Epiphany = "epiphany", GoodFriday = "goodFriday", EasterSunday = "easterSunday", EasterSaturday = "easterSaturday", EasterMonday = "easterMonday", MayDay = "mayDay", AscensionDay = "ascensionDay", Pentecost = "pentecost", MidsummerEve = "midsummerEve", MidsummerDay = "midsummerDay", AllSaintsDay = "allSaintsDay", IndependenceDay = "independenceDay", ChristmasEve = "christmasEve", ChristmasDay = "christmasDay", StStephensDay = "stStephensDay" } /** Yearly log for Holiday accrual. */ export declare interface HolidayAccrual { /** Holiday accrual entries during the period. */ months?: HolidayAccrualEntry[] | null; /** The period for holiday accrual. This is also the period of the holiday year that the Worker is Employed, i.e. it may be shorter than HolidayYear Period if the employment relation begins or ends within the holiday year. */ period?: DateRange | null; /** Default accrual for months where the Accrual occurs. When Holiday year is recalculated, this is determined either from Employment Period or AccrualFixed if set. */ defaultAccrual?: number | null; /** Start saldo from the previous year. */ startSaldo?: number | null; /** Total for the current year. This does not include Start saldo. */ readonly total?: number | null; /** End saldo from the previous year. This is Total + Start Saldo. */ readonly endSaldo?: number | null; } /** Info covering most important accrual year parameters. */ export declare interface HolidayAccrualCalcSpecification { /** Year as integer */ year?: number | null; /** Defines how the holidays are handled for the worker. */ code?: HolidayCode | null; /** Wage basis for a Holiday Year. */ wageBasis?: WageBasis | null; /** Default accrual for months where the Accrual occurs. */ defaultAccrual?: number | null; } /** Entry in the Yearly Holiday Accrual list. */ export declare interface HolidayAccrualEntry { /** Index of the month from 0-11 for easier iteration. This is also the real identifier of the month when editing the entries through API. Months 4-12 are index 0-8 and month 1-3 are index 9-11 */ index?: number | null; /** First day of month for the holiday month */ month?: string | null; /** Days added to holiday Accrual: Typically days per month. */ daysAccrued?: number | null; /** Source of the holiday accrual. */ source?: HolidayAccrualSource | null; /** Identier of the calculation if Kind */ calcId?: string | null; /** Additional information as recorded by the Employer. */ notes?: string | null; } /** Settings for the holiday accrual calculations. */ export declare interface HolidayAccrualSettings { /** Defines how the holidays are handled for the worker. */ code?: HolidayCode | null; /** RowTypes, WageTypes or IncomeTypes which accumulate working time. Default is null, which means that a default set of types is used. */ workingTimeTypes?: string[] | null; } /** HolidayAccrualSource enumeration */ export declare enum HolidayAccrualSource { Initial = "initial", Manual = "manual", CalcDraft = "calcDraft", CalcPaid = "calcPaid" } /** HolidayBonusPaymentMethod enumeration */ export declare enum HolidayBonusPaymentMethod { None = "none", PayForHolidaySalary = "payForHolidaySalary", PaySummerBonus = "paySummerBonus", PaySelectedDays = "paySelectedDays", Pay24Days = "pay24Days", PayAllBonus = "payAllBonus" } /** Calculation totals of accrued total holiday pay and related sidecosts. */ export declare interface HolidayCalculationDTO { /** Total sum of accrued holiday pays. */ totalAccruedHolidayPay?: number | null; /** Total sum of accrued holiday pays. */ totalAccruedHolidayBonus?: number | null; /** Total sum of social security payments for accrued holiday pays. */ totalAccruedHolidaySocialSecurity?: number | null; /** Total sum of pension payments for accrued holiday pays. */ totalAccruedHolidayPension?: number | null; /** Total sum of unemployment insurance payments for accrued holiday pays. */ totalAccruedHolidayUnemployment?: number | null; /** Total accident insurance. */ totalAccruedHolidayAccidentInsurance?: number | null; /** Total accident insurance. */ totalAccruedHolidayGroupLifeInsurance?: number | null; } /** HolidayCode enumeration */ export declare enum HolidayCode { Undefined = "undefined", Permanent14Days = "permanent14Days", Permanent35Hours = "permanent35Hours", TemporaryTimeOff = "temporaryTimeOff", HolidayCompensation = "holidayCompensation", HolidayCompensationIncluded = "holidayCompensationIncluded", NoHolidays = "noHolidays" } export declare interface HolidayDate { date?: string | null; holiday?: Holiday | null; readonly holidayGroups?: HolidayGroup[] | null; localName?: string | null; name?: string | null; } /** HolidayGroup enumeration */ export declare enum HolidayGroup { Official = "official", NonBanking = "nonBanking", Holiday = "holiday" } /** Calculated holiday pay for the year. */ export declare interface HolidayPay { /** Calculated price for a single holiday day based on the regular monthly salary. Please note that this is applicable for accounting purposes (holiday pay debt) only. */ readonly normalMonthlyPayDailySalary?: number | null; /** The picked monthly salary from the holiday year's calculations. Please note that the calculator logic does not use this value but the NormalMonthlyPayManual or enterd monthly salary in the calculation. */ readonly normalMonthlyPay?: number | null; /** For NormalMonthlyPay the manually entered regular monthly salary. */ normalMonthlyPayManual?: number | null; /** For AverageDailyPay the calculated price for a single holiday day. */ averageDailyPayDailySalary?: number | null; /** For AverageDailyPay the calculated average daily pay. */ averageDailyPay?: number | null; /** For AverageDailyPay the manually entered average daily pay. */ averageDailyPayManual?: number | null; /** For AverageDailyPay the total pay received or due for time worked during the holiday credit year. */ averageDailyPayBase?: number | null; /** For AverageDailyPay the number of days the employee was at work. This number does not include the one eighth of the hours worked in excess of the statutory regular daily working hours which is added to the number of days at work used in the calculation. */ averageDailyPayDays?: number | null; /** Multiplier used in the calculation of the average daily pay. */ averageDailyPayMultiplier?: number | null; /** For AverageHourlyPay the calculated price for a single holiday day. */ averageHourlyPayDailySalary?: number | null; /** For AverageHourlyPay the calculated average hourly pay. */ averageHourlyPay?: number | null; /** For AverageHourlyPay the manually entered average hourly pay. */ averageHourlyPayManual?: number | null; /** For AverageHourlyPay the total pay received or due for time worked during the holiday credit year. */ averageHourlyPayBase?: number | null; /** For AverageHourlyPay the number of hours the employee was at work. */ averageHourlyPayHours?: number | null; /** Multiplier used in the calculation of the average hourly pay. */ averageHourlyPayMultiplier?: number | null; /** For PercentageBasedPay the calculated price for a single holiday day. */ percentageBasedPayDailySalary?: number | null; /** For PercentageBasedPay the calculated total holiday pay. */ percentageBasedPay?: number | null; /** For PercentageBasedPay the manually entered total holiday pay. */ percentageBasedPayManual?: number | null; /** For PercentageBasedPay the total pay received or due for time worked during the holiday credit year. */ percentageBasedPayBase?: number | null; /** For PercentageBasedPay the percent for the calculation. */ percentageBasedPayPercent?: number | null; /** For OtherPay the manually entered pay, the price for a single holiday day. */ otherPay?: number | null; /** For HolidayCompensation the calculated price for a single holiday day. */ compensationPayDailySalary?: number | null; /** For HolidayCompensation the calculated total holiday compensation pay. */ compensationPay?: number | null; /** For HolidayCompensation the manually entered total holiday compensation pay. */ compensationPayManual?: number | null; /** For HolidayCompensation the total pay received or due for time worked during the holiday credit year. */ compensationPayBase?: number | null; /** Accrual used in the calculation of the holiday daily pay. */ accrual?: number | null; } /** HolidayPayCalculation enumeration */ export declare enum HolidayPayCalculation { Undefined = "undefined", NormalMonthlyPay = "normalMonthlyPay", AverageDailyPay = "averageDailyPay", PercentageBasedPay = "percentageBasedPay", AverageHourlyPay = "averageHourlyPay", HolidayCompensation = "holidayCompensation", OtherPay = "otherPay" } /** Report for containing all the result data and rules for the holiday pay calculation. */ export declare interface HolidayPayCalculationReportData { /** Holiday year for which the holiday pay is calculated. */ holidayYear?: HolidayYear | null; /** Current settings for the accrual calculations. */ holidayAccrualSettings?: HolidayAccrualSettings | null; /** Applied settings for the holiday pay calculation. */ holidayPaySettings?: HolidayPaySettings | null; /** Detailed calculation data with rows on which the holiday pay calculation is based. */ calculations?: HolidayPayCalculationReportDataCalc[] | null; } /** Detailed calculation data with rows on which the holiday pay calculation is based. */ export declare interface HolidayPayCalculationReportDataCalc { /** Calculation id. */ calculationId?: string | null; /** Calculation title. */ calculationTitle?: string | null; /** Calculation salary date. */ salaryDate?: string | null; /** Calculation work start date. */ workStartDate?: string | null; /** Calculation work end date. */ workEndDate?: string | null; /** Working days in the calculation. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageDailyPay} */ workingDays?: number | null; /** Absences days in the calculation. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageDailyPay}. */ absenceDays?: number | null; /** Total salary in the calculation which is calculated into holiday pay. */ total?: number | null; /** Total hours in the calculation which is calculated into holiday pay. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageHourlyPay} */ hours?: number | null; /** Total over time hours in the calculation which is calculated into holiday pay. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageDailyPay}."/> */ overtimeHours?: number | null; /** Detailed row data on which the holiday pay calculation is based. */ rows?: HolidayPayCalculationReportDataCalcRow[] | null; } /** Detailed row data on which the holiday pay calculation is based. */ export declare interface HolidayPayCalculationReportDataCalcRow { /** The row of the calculation. */ irRow?: IrRow | null; /** Matching RowType, Type or IncomeType which accumulates salary. */ salaryType?: string | null; /** Matching RowType, Type or IncomeType which accumulates working time. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageHourlyPay} */ workingTimeType?: string | null; /** Matching RowType, Type or IncomeType which accumulates overtime. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageDailyPay} */ overtimeType?: string | null; /** Total salary which is calculated into holiday pay. */ total?: number | null; /** Total hours which is calculated into holiday pay. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageHourlyPay} */ hours?: number | null; /** Total over time hours which is calculated into holiday pay. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageDailyPay}."/> */ overtimeHours?: number | null; } /** Settings for the holiday pay calculations. */ export declare interface HolidayPaySettings { /** Defines how the holiday pay is calculated. */ holidayPayCalculation?: HolidayPayCalculation | null; /** Possible multipliers for the holiday pay calculation. Default is null, which means that a default set of multipliers is used. */ multipliers?: { [key: string]: number; } | null; /** RowTypes, WageTypes or IncomeTypes that are used in the holiday pay calculation and which accumulate working time. Default is null, which means that a default set of types is used. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageHourlyPay} */ workingTimeTypes?: string[] | null; /** RowTypes, WageTypes or IncomeTypes that are used in the holiday pay calculation and which accumulate overtime. Default is null, which means that a default set of types is used. This is applicable only for {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.AverageDailyPay} */ overtimeTypes?: string[] | null; /** RowTypes, WageTypes or IncomeTypes that are used in the holiday pay calculation and which accumulate salary. Default is null, which means that a default set of types is used. */ salaryTypes?: string[] | null; } export declare interface Holidays { newYearsDay?: HolidayDate | null; epiphany?: HolidayDate | null; goodFriday?: HolidayDate | null; easterSunday?: HolidayDate | null; easterSaturday?: HolidayDate | null; easterMonday?: HolidayDate | null; mayDay?: HolidayDate | null; ascensionDay?: HolidayDate | null; pentecost?: HolidayDate | null; midsummerEve?: HolidayDate | null; midsummerDay?: HolidayDate | null; allSaintsDay?: HolidayDate | null; independenceDay?: HolidayDate | null; christmasEve?: HolidayDate | null; christmasDay?: HolidayDate | null; stStephensDay?: HolidayDate | null; } export declare interface holidays { newYearsDay?: HolidayDate | null; epiphany?: HolidayDate | null; goodFriday?: HolidayDate | null; easterSunday?: HolidayDate | null; easterSaturday?: HolidayDate | null; easterMonday?: HolidayDate | null; mayDay?: HolidayDate | null; ascensionDay?: HolidayDate | null; pentecost?: HolidayDate | null; midsummerEve?: HolidayDate | null; midsummerDay?: HolidayDate | null; allSaintsDay?: HolidayDate | null; independenceDay?: HolidayDate | null; christmasEve?: HolidayDate | null; christmasDay?: HolidayDate | null; stStephensDay?: HolidayDate | null; } /** Settings related to holiday pay and accrual calculations. */ export declare interface HolidaySettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Settings for holiday pay calculations. The default is null and the default settings are used. */ holidayPaySettings?: HolidayPaySettings[] | null; /** Settings for the accrual calculations. The default is null and the default settings are used. */ holidayAccrualSettings?: HolidayAccrualSettings[] | null; } /** Logic for Holiday years and other holiday functionality. */ export declare class HolidaysLogic { /** * Gets the multiplier that is used in Average Daily Salary calculation (keskipäiväpalkka). * @param holidays Number of holidays for the year. */ static getDailySalaryMultiplier(holidays: number): number; /** * Gets a new blank holiday year. * @param year Holiday accrual year (e.g. 2019) or 0 for current year and -1 for previous year (from -10 to 10). * Current year is always from 1.4. until 31.3. e.g. year 2019 is 1.4.2019 until 31.3.2020. * The main part of the holidays from holiday accrual year 2019 are kept on summer 2020. */ static getBlank(year?: number): HolidayYear; /** Gets the salary payable type or default type if both are possible. */ static getSalaryPayableType(absenseCauseCode: AbsenceCauseCode): "defaultPaid" | "defaultUnpaid" | "paid" | "unpaid"; /** Gets the needed logic for Absences Period Edit dialog */ static getAbsencesEditDialogLogic(): { /** * Returns true if the select component should be shown for absence isPaid. */ canSelectIsPaid: (current: AbsencePeriod) => boolean; /** Updates the IsPaid according to absence type. */ updateIsPaid: (current: AbsencePeriod) => void; /** Updates the IsHolidayAccrual */ updateIsHolidayAccrual: (current: AbsencePeriod) => void; /** Updates the workdays count */ updatePeriodDays: (current: AbsencePeriod) => void; /** Sets the days array in period to enable days selection UI. */ setDaysSelection: (period: AbsencePeriod) => void; }; /** Gets different total days calculation of planned leaves. */ static getPlannedLeavesCount(holidayYear: HolidayYear, type?: "all" | "summer" | "winter" | "holidaysSaldoEnd" | "holidaysSaldoStart"): number; /** Gets a calculated total or saldo row for paid holiday pays */ static getPaidHolidaysCalculation(holidayYear: HolidayYear, type?: "startSaldo" | "total" | "endSaldo"): AnnualLeavePayment; /** Gets a calculated total or saldo row for paid bonus */ static getPaidBonusCalculation(holidayYear: HolidayYear, type?: "startSaldo" | "total" | "endSaldo"): AnnualLeavePayment; /** Gets a display avatar for a paid calculation */ static getPaidCalculationAvatar(type: "row" | "startSaldo" | "total" | "endSaldo", row: AnnualLeavePayment): Avatar; /** Gets a display avatar for a paid calculation */ static getPaidBonusAvatar(type: "row" | "startSaldo" | "total" | "endSaldo", row: AnnualLeavePayment): Avatar; /** * Gets the visualisation data for the a holiday year. * @param holidayYear The holiday year to visualize */ static getYearVisualisation(holidayYear: HolidayYear): any; /** * Method for checking if holidays are active */ static isWorkerHolidaysActive(holidays: HolidaySpecification): boolean; /** Returns holiday pay daily salary */ static getHolidayPayDailySalary(holidayYear: HolidayYear): number; } /** Specifies how the holidays are handled for this Worker. */ export declare interface HolidaySpecification { /** Defines how the holidays are handled for the worker. */ code?: HolidayCode | null; /** Defines how the holiday pay is calculated. */ holidayPayCalculation?: HolidayPayCalculation | null; /** Defines the number of holidays that the worker is entitled per month worked. If the value is set to 0 (default), the number is 2 for first year and 2,5 thereafter as defined in the law. To actually se the daysPerMonth to zero, use code value other than Permanent14Days or Permanent35Hours. */ accrualFixed?: number | null; /** For {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.HolidayCompensation} the compensation percent. Holiday compensation as percent of salary (11.5% is 0.115) */ compensation?: number | null; /** For {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.PercentageBasedPay} the percent. Holiday pay as percent of salary (11.5% is 0.115) */ holidayPayPercent?: number | null; /** Method for paying holiday bonus in this salary calculation. */ bonusMethod?: HolidayBonusPaymentMethod | null; /** Holiday bonus for the worker (lomaraha, lomaltapaluuraha). Typically 0.5 for 50%. */ bonus?: number | null; } /** Extends the Holiday specification with the properties of employment relation that are required for a specific year. */ export declare interface HolidaySpecificationForYear { /** Wage basis for a Holiday Year. When this is changed, you need to make a rerun to the previous calculations in the holiday year. NOTE: This is not in HolidaySpecification because, the same value is stored in Employment relation. */ wageBasis?: WageBasis | null; /** Employment period for the purposes of holiday calculation (annual leave accrual). When this is changed, you need to make a rerun to the previous calculations in the holiday year. */ employmentPeriod?: DateRange | null; /** Defines how the holidays are handled for the worker. */ code?: HolidayCode | null; /** Defines how the holiday pay is calculated. */ holidayPayCalculation?: HolidayPayCalculation | null; /** Defines the number of holidays that the worker is entitled per month worked. If the value is set to 0 (default), the number is 2 for first year and 2,5 thereafter as defined in the law. To actually se the daysPerMonth to zero, use code value other than Permanent14Days or Permanent35Hours. */ accrualFixed?: number | null; /** For {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.HolidayCompensation} the compensation percent. Holiday compensation as percent of salary (11.5% is 0.115) */ compensation?: number | null; /** For {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.PercentageBasedPay} the percent. Holiday pay as percent of salary (11.5% is 0.115) */ holidayPayPercent?: number | null; /** Method for paying holiday bonus in this salary calculation. */ bonusMethod?: HolidayBonusPaymentMethod | null; /** Holiday bonus for the worker (lomaraha, lomaltapaluuraha). Typically 0.5 for 50%. */ bonus?: number | null; } /** Client-side logic for Absence period as UserDefined row (in calculation). */ export declare class HolidaysUsecaseLogic extends BaseUsecaseLogic { protected getUcValidation(_row: UserDefinedRow): UsecaseValidationMessage; /** * Updates the workdays count * @param row Current row that is being edited. */ updatePeriodDays(row: any): void; /** * Sets the days array in period to enable days selection UI. * @param row Current row that is being edited. */ setDaysSelection(row: any): void; } /** Holiday year is in Finland from April to end of march. This is the time from which the holidays for the following summer and year are determined. */ export declare interface HolidayYear { /** Year as integer. This value is required when inserting and cannot be edited later. Period will be set accordingly, or adjusted in case it is set below. */ year: number; /** Salaxy ID of the worker. This value is required when inserting and cannot be edited later. WorkerSnapshot is automatically updated upon save. */ workerId?: string | null; /** The employment relation for the worker whose holidays are managed. */ employmentId: string; /** The holiday period for the year: Should always be 2.5.[Year]-30.4.[Year+1] */ period?: DateRange | null; /** Specifies how the holidays are handled. If the Spec.Code is Undefined in Save, the contents is fetched from the current employment relation. */ spec?: HolidaySpecificationForYear | null; /** Calculated Holiday pay for the year. */ holidayPay?: HolidayPay | null; /** Accrual of holidays (lomakirjanpito). */ accrual?: HolidayAccrual | null; /** Payments related to Annual Leaves (holidays). */ leaves?: AnnualLeaves | null; /** Basic information for the Worker. Automatically updated upon save based on WorkerId. Mainly for the listings etc. */ workerSnapshot?: Avatar | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Holiday year specific business data for index. */ export declare interface HolidayYearData { /** Holiday year. */ year?: number | null; /** Employment id. */ employmentId?: string | null; } /** Represents a single item in a list of holiday years in the user interface. */ export declare interface HolidayYearListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: HolidayYearData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides CRUD access for Holiday Years as a raw list and * more typically as holiday years relate to an employment relation. */ export declare class HolidayYears extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): HolidayYear; /** * Gets all the Holiday Year objects of specified year. * @param year The holiday year to filter * @returns A Promise with result data: The full holiday year objects. */ getForYear(year: number): Promise; /** * Gets all the Holiday Year objects. * @returns A Promise with result data: The full holiday year objects. */ getForAllYears(): Promise; /** * Gets a default holiday specification based on employment relation information. * This is presented to the user before calling initForEmployment(). * @param employmentId The employment relation ID from which the defaults are fetched. * @returns Holiday specification that can be used for inititalization. */ getDefaultSpecForEmployment(employmentId: string): Promise; /** * Initializes the missing holiday years for an employment relation. * @param employmentId Identifier of the Employment relation that stores the holiday specification. * @param holidaySpec The holiday specification tht should be used for inititalization. The spec is also stored to the Employment relation. * @returns Holiday years for this employment relation - as initialized. */ initForEmployment(employmentId: string, holidaySpec: HolidaySpecification): Promise; /** * Gets the Holiday Years for a specific employment relation. * @param employmentId Identifier for the Employment relation. * @returns A Promise with Holiday Years. */ getForEmployment(employmentId: string): Promise; /** * Gets the Holiday Years for the given employment relations. * @param employmentIds Identifiers for the Employment relations. * @returns A Promise with Holiday Years. */ getForEmployments(employmentIds: string[]): Promise; /** * Returns the holiday pay calculation report data for a single employment. * @param year The holiday year for calculation. * @param employmentId Employment id. * @returns A Promise with result data containing holiday pay calculation data. */ getHolidayPayCalculationReportData(year: number, employmentId: string): Promise; } /** Handles both the hourly salary and working time compensation to IrRows */ export declare interface HourlySalaryWithWorkingTimeCompensationUsecase { /** Collection of compensation rows. */ compensationRows?: WorkingTimeCompensationRow[] | null; /** Pricing for the compensation row. */ pricing?: WorkingTimeCompensationPricing | null; /** Primary subtyping of the usecase. */ kind?: WorkingTimeCompensationKind | null; } /** Client-side logic for HourlySalaryWithWorkingTimeCompensationUsecaseLogic */ export declare class HourlySalaryWithWorkingTimeCompensationUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. */ updateUsecase(row: UserDefinedRow): void; /** Gets validation message */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private getCodeData; private harmonize; } /** Calculation usecase for households. */ export declare interface HouseholdUsecase { /** Unique identifier for the item in this user interface tree */ id: string; /** * Key for the usecase based on which it is resolved. * Later, this will resolve to a microservice. */ uri?: string; /** Label in the list / tree selection */ label?: string; /** Description of the use case (mainly for the lists) */ descr?: string; /** Path to the main icon (typically an SVG ), if null the default may be set by the group */ icon?: string; /** Path to a sub icon (typically a PNG), if null the default may be set by the group */ badge?: string; /** If true, the selection is deductible in household taxation */ isHouseholdDeductible?: boolean; /** If true, the selection is under childcare subsidy. */ isChildcareSubsidy?: boolean; /** Indicates that the default for the contract length is less than a year. */ isContractLessThanYear?: boolean; /** * If tax IsHouseholdDeductible is set to true, please also select the category (categories). * Note that "OwnPropety" is a default, it does not need to be set: Only set RelativesProperty if necessary. */ taxDeductionCategories?: TaxDeductionWorkCategories | null; /** Occupation code for insurance purposes. */ occupation?: string; } /** Group of usecases (user interfaces for defining a framework) */ export declare interface HouseholdUsecaseGroup { /** Identifier for the group */ id: string; /** * Key for the usecase based on which it is resolved. * Later, this will resolve to a microservice. */ uri?: string; /** Label in the list / tree selection */ label?: string; /** Description of the use case group (mainly for the lists) */ descr?: string; /** Path to the main icon (typically an SVG ) */ icon: string; /** Path to a sub icon (typically a PNG) */ badge?: string; /** Collection of use cases - in the future, may also support sub groups. */ children?: HouseholdUsecase[]; } /** * Provides business logic for Calculation usecases: * Salary framework contracts ("työehtosopimus") and other salary recommendations * that are used as bases for salary calculation. */ export declare class HouseholdUsecasesLogic { /** * Known use cases in the first implementation. * These implementations replace the olf Calc.Framework.Type -based solution that is not very extensible. * The naming is still based on the old system for easier compatibility. */ static readonly knownUseCases: { /** Usecase has not been defined. Note that value is null, not "https://secure.salaxy.com/v02/api/usecases/notDefined" */ notDefined: any; /** Generic child care usecase */ childCare: string; /** Cleaning */ cleaning: string; /** Construction (Raksa) */ construction: string; /** Child care according to MLL recommendations. */ mll: string; /** * Santa Claus for Christmas campaigns: By default, this is not visible in the household UI: * It needs to be separately enabled for chirstmas campaigns. */ santaClaus: string; /** Generic household salary payment usecase user interface. */ other: string; }; /** * Finds a parent group of a given usecase node * @param usecaseId - The usecase whose parent is fetched. * If you pass a group here, the function will return null which will typically mean the tree root in the user interface. * * @example * ``` * // Creates a simple calculation * const usecase = UsecasesLogic.findUsecaseById("childCare/mll"); * UsecasesLogic.setUsecase(this.context.calculations.current, usecase); * this.context.calculations.recalculateCurrent((calc) => { * calc.worker.paymentData.telephone = "+358401234567"; * }); * ``` */ static findUsecaseById(usecaseId: string): HouseholdUsecase; /** * Gets a tree of usecases (user interfaces for defining a framework) for a given role. */ static getUsecaseTree(): HouseholdUsecaseGroup[]; /** * Abstract the getting of the use case for the calculation. * We are expecting changes to the usecase implementation. * @param calc Calculation into which the usecase data is stored. */ static getUsecaseData(calc: Calculation): HouseholdUsecase; /** * Sets calculation properties based on selected usecase. * @param calc Calculation to set * @param usecase Usecase to apply. * @example * ``` * // Creates a simple calculation * const usecase = UsecasesLogic.findUsecaseById("childCare/mll"); * UsecasesLogic.setUsecase(this.calc, usecase); * this.calcApi.recalculate(this.calc).then((data) => { * angular.copy(data, this.calc); * }); * ``` */ static setUsecase(calc: Calculation, usecase: HouseholdUsecase): HouseholdUsecase; /** * Applies the usecase to a calculation, especially to the old Framework object. * Should be called before sending the calculation to the server (recalculate/save). * @param calc Calculation where usecase is set to calc.data.usecase. */ static applyUseCase(calc: Calculation): void; /** * Applies the constructions salary calculation usecase. * @param calc Calculation to which the usecase is applied. */ static applyUsecaseConstruction(calc: Calculation): void; /** Applies the childCare salary calculation usecase */ static applyUsecaseChildCare(calc: Calculation): void; /** Applies the cleaning salary calculation usecase */ static applyUsecaseCleaning(calc: Calculation): void; /** Applies the MLL salary calculation usecase */ static applyUsecaseMll(calc: Calculation): void; private static applyUsecaseSantaClaus; private static applyCommonUsecaseProperties; private static translate; /** Adds a usecase row if price is not zero */ private static addUsecaseRow; /** Does the kilometers milage euros conversion */ private static raksaKmChart; } /** Household yearly data. */ export declare interface HouseholdYear { /** Year for the salaries */ year?: number | null; /** Status of the household deduction process. */ processingStatus?: HouseholdYearProcessingStatus | null; /** Status of user feedback. */ status?: HouseholdYearStatus | null; /** Free text from the account holder to Salaxy backoffice. */ userFeedbackText?: string | null; /** Time when the feedback was given. */ userFeedbackTime?: string | null; /** Amount of accident insurance paid during this year as reported by the user This is relevant for households for Household deduction: This amount can be deducted from the yearly salaries and needs to be reported to tax authorities. */ insuranceAmount?: number | null; /** Name of the spouse with who the household deduction is split */ spouseName?: string | null; /** Finnish Personal ID of the spouse with who the household deduction is split */ spousePersonalId?: string | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Household year specific business data for index. */ export declare interface HouseholdYearData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; } /** Represents household yearly deduction data. */ export declare interface HouseholdYearListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: HouseholdYearStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: HouseholdYearData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** HouseholdYearProcessingStatus enumeration */ export declare enum HouseholdYearProcessingStatus { Open = "open", Closed = "closed", Printed = "printed" } /** * Provides CRUD access for Service Models */ export declare class HouseholdYears extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): HouseholdYear; /** * Returns all the paid calculations for the given year. * @param year - Year for the calculations. * @returns Array of calculations. */ getCalculationsForYear(year?: number | null): Promise; /** * Updates the household data in the calculation * @param calculation - Calculation to update. * @returns Updated calculation. */ updateCalculation(calculation: Calculation): Promise; /** * Makes a request for updating the processing status of the household deduction. * @param id Identifier for the year. * @param processingStatus The requested new processing status of the houisehold deduction. */ requestProcessingStatusUpdate(id: string, processingStatus: HouseholdYearProcessingStatus): Promise; /** * Downloads pdf reports for the yearly household deduction. */ downloadPdfs(id: string): Promise>; } /** HouseholdYearStatus enumeration */ export declare enum HouseholdYearStatus { Undefined = "undefined", Ok = "ok", OkWithModifications = "okWithModifications", WillHandleMyself = "willHandleMyself" } /** Experimental helper class for importing data from HRSuunti sytem to Palkkaus.fi */ export declare class HrSuuntiImportLogic { /** * Adds a collection of salary bases rows to a given payroll. * @param payrollId Identifier for the payroll where the calculations should be updated. * @param salaryBases The rows that should be added. * @param employments List of employments that are available in the current account. * @param ajax Instance of Ajax that is use in connecting to the server. * @returns A payroll object that is refreshed from the server. */ static addToPayroll(payrollId: string, salaryBases: SalaryBasesRow[], employments: Employment[], ajax: Ajax): Promise; /** * Does the full import for the given arrays * @param input Original input from the HRSuunti software * @param salaryBases The salary bases that are the target of this import before creating the Payroll objects * @param employments The employment relations that have been created for the import. */ static doImport(input: HrSuuntiInput[], salaryBases: SalaryBasesRow[], employments: Employment[]): void; /** * Logic to resolve the employment relation. * @param row A salary bases row where we attempt to fing an employment relation. * @param employments All employment relations that are available for this account. */ static resolveEmployment(row: SalaryBasesRow, employments: Employment[]): void; /** * Resolves the row types and prices based on * raw data that has already been mapped to SalaryBasesRow and employments have been resolved. * @param rows Incoming data where employments have already been resolved. * @param mapper The mapper that is used in mapping source row types to Salaxy row types. */ static resolveTypesAndPrices(rows: SalaryBasesRow[], mapper: RowTypeMatch[]): void; /** Temp method for getting the editable row type mapper. */ static getRowTypeMapperEditable(): RowTypeMatch[]; /** Gets and prepares a row type mapper for mapping */ static getRowTypeMapper(mapper: RowTypeMatch[]): RowTypeMatch[]; /** * Modifies existing SalaryBasesRow that has preliminary data from the source * @param row Row to modify as part of mapping process */ static resolveTypesAndPricesForRow(row: SalaryBasesRow, rowTypeMap: RowTypeMatch[]): void; /** * Does the basic mapping from HrSuuntiInput to SalaryBases object. * @param inputRow Input row from HR Suunti * @returns The input mapped as SalaryBasesRow */ static mapToSalaryBases(inputRow: HrSuuntiInput): SalaryBasesRow; private static rowTypeRaw; } /** Data model for the import from HR Suunti */ export declare interface HrSuuntiInput { /** Logical date for the material */ PVM: string; /** Worker ID in HR Suunti system. */ TYNRO: number; /** Salary row type in Suunti system */ PLNRO: number; /** Some unknown data that is not supported by this import. */ TVR: string; /** Amount or from */ "KPL/MISTÄ": number; /** Time or until */ "AIKA/MIHIN": number; /** Price in euro */ "MK/EUR": number; /** Cost center (dimension 1) */ "OSASTO": number; } export declare interface HttpPostedFileBase { readonly contentLength?: number | null; readonly contentType?: string | null; readonly fileName?: string | null; readonly inputStream?: Stream | null; } /** Interface for the line item for search and listing results. */ export declare interface IApiListItem { /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Pricing partner information. */ partner?: string | null; } /** * Helpers for handling Iban bank account numbers */ export declare class Iban { /** * Format an Iban number in 4 digits segments and trim out other than alphanum characters. * @param value - String value to format * @returns string value */ static formatIban(value: string): string; /** * Returns true if the value is a valid IBAN number. * Checks for the country specific length as well as checksum. * @param value IBAN number number candidate. */ static isIban(value: string): boolean; /** Gets a dummy iban using random numbers. */ static getDummyIban(): string; /** * Checks if the given value is an international IBAN. * @param value - The value to check. * @returns `true` if the value is an international IBAN, `false` otherwise. */ static isInternationalIban(value: string): boolean; private static mod97; } /** Identity is the official identity of an actor. This part is not freely editable as changing it requires signature or some other means. Identity is also often fetched from external sources such as govenment registries. */ export declare interface Identity { /** This is an official identifier of the actor: Finnish HETU (Soc. sec. number) for a Person or Y-tunnus (Company ID for a company or association) */ officialId?: string | null; /** This is an official name of the actor. It originates from the YTJ or Bank authentication. */ officialName?: string | null; /** First name OR company name */ firstName?: string | null; /** Last name Available only to real persons (as opposed to companies). */ lastName?: string | null; /** The latest authorization contract that is the bases for this Identity */ contract?: AuthorizationContract | null; /** Tha bank account number of the Worker - in Iban format. */ ibanNumber?: string | null; /** Indicates whether the principal user of the customer is a politically exposed person or not. */ isPep?: boolean | null; /** Mainly for company accounts, but in special cases for Persons, this is the main Contact party and usually the signer for the account. */ primaryContact?: ContractParty | null; /** List of roles which this account is member of. */ roles?: Role[] | null; /** Latest contact, bank account or name update. */ identityUpdatedAt?: string | null; /** Latest KYC update, if done. */ kycUpdatedAt?: string | null; } /** Parameters that affect the calculation. EmployerResponsibilities is historical name - currentlty to object holds also other properties that are not well described as responsibilities. These based on the EmployerGroups selection or properties of the Employer and Worker snapshots as well as this Calculation */ export declare interface IEmployerResponsibilities { /** Employer groups that are set on Example calculations. These will be replaced by properties from Worker / Employer when these persons are set. */ employerGroups?: EmployerGroups | null; /** Pension is not paid if the salary to this Worker is less than a certain amount in a month (about 60€) or worker is less than 17 or more than 64 years old. */ readonly noPensionPayment?: boolean | null; /** If worker is less than 16 or more than 67, social secuiry payment is not paid */ readonly noSocialSecurity?: boolean | null; /** If Worker is less than 17 or more than 64, TVR is not paid. Also if the Employer has no accident insurance. */ readonly noTvr?: boolean | null; /** The name of the Pension company because this affects the Pension percentage used in the calculation (only in contract situation). It also needs to be shown in the reports. */ readonly pensionCompany?: PensionCompany | null; /** Pension discount percent. */ readonly pensionDiscountPercent?: number | null; /** Customer specific pension percent. */ readonly pensionPercent?: number | null; /** Company for the current insurance */ readonly insuranceCompany?: InsuranceCompany | null; /** Percent for calculating the estimate for the accident insurance amount to pay. */ readonly insurancePercent?: number | null; /** Percent for calculating the estimate for the group life insurance amount to pay. */ readonly groupLifeInsurancePercent?: number | null; /** Accident insurance contract number. */ readonly insuranceContractNumber?: string | null; /** If the Worker is from 53 to 62 years old, more of the Pension payment is deducted from the Worker side of the salary (less for the Employer). NOTE: People from 63 to 67 years pay the same amount as 17-52 years old. */ readonly pensionOldAgePayment?: boolean | null; /** The employer should have a Pension contract (not a temporary employer). It does not necessarily mean that the user has a contract yet. NOTE: At the moment, this is not used for calculation - only in the Side costs visualizer tool. */ readonly pensionRegularEmployer?: boolean | null; /** If true, the employer has a Pension contract and makes the payments in a monthly schedule which means that Pension interest is calculated for the 20th of the next month. Currently, this is only enabled to Etera - other companies will follow. */ readonly isPensionMonthlyContract?: boolean | null; /** If true, the employer pays the Unemployment insurance directly to TVR. As of writing, this is true for all companies and with calculations starting 1.8.2018, false for households or calculations before the date. */ readonly unemploymentSelfPayment?: boolean | null; /** The assumed salary payment date from the worker perspective. The system calculates the nearest possible salary date if no any salary date has been given by the employer. If given, the system confirms the given date. This date affects the yearly percents used in the salary calculation. */ readonly calculationPaymentDate?: string | null; /** The age range that is used in the business logic that determines the employer responsibilities. This property replaces the EmployerGroups.AgeRange that was previous get/set. This is based on WorkerDateOfBirth and CalculationPaymentDate. */ readonly pensionAgeRange?: AgeRange | null; /** Date of birth for the Worker - this affects the side costs. Please also set the DateOfBirthAccuracy, if you set this property. If SocialSecurityNumber is set, it will override any value set here. */ readonly workerDateOfBirth?: string | null; /** Accuracy of the date of birth If SocialSecurityNumber is set, it will override any value set here. */ readonly workerDateOfBirthAccuracy?: DateOfBirthAccuracy | null; /** Pension calculation type. */ pensionCalculation?: PensionCalculation | null; /** Rules (e.g. effect of monthly lower limit) for pension calculation. */ pensionRule?: PensionRule | null; /** Type of the employment relation */ employmentType?: EmploymentRelationType | null; /** Taxcard type from the employment point of view. */ employmentTaxcard?: EmploymentRelationTaxcard | null; /** Worker's preferred salary payment method: bank account, external etc. */ salaryPaymentMethod?: EmploymentRelationSalaryPaymentMethod | null; /** Type of additional income earner data by National Incomer Register classification . If several types apply, all of them should be selected. */ irIncomeEarnerTypes?: IncomeEarnerType[] | null; /** Sub organization code for the Incomes Registry. */ readonly subOrgCode?: string | null; /** Employment registration code for Incomes Registry. */ employmentRegCode?: string | null; /** Tax and social security payments are paid directly by the Employer - not by Palkkaus.fi */ readonly taxAndSocialSecuritySelfPayment?: boolean | null; /** Worker salary and expense payments are paid directly by the Employer - not by Palkkaus.fi */ readonly workerSelfPayment?: boolean | null; /** Pension payments are paid directly by the Employer - not by Palkkaus.fi */ readonly pensionSelfPayment?: boolean | null; /** Pension insurance contract number. */ readonly pensionContractNumber?: string | null; /** Status for indicating whether the total amount of paid salaries exceeds the thresold for higher unemployment insurance percent. */ readonly unemploymentPayrollLimitStatus?: UnemploymentPayrollLimitStatus | null; /** Options for the delivery of the payslip to the worker. */ readonly salarySlipDeliveryMethods?: WorkerSalarySlipDeliveryMethod[] | null; } export declare interface IJsonSchema { id?: string; $schema?: string; title?: string; description?: string; multipleOf?: number; maximum?: number; exclusiveMaximum?: boolean; minimum?: number; exclusiveMinimum?: boolean; maxLength?: number; minLength?: number; pattern?: string; additionalItems?: boolean | IJsonSchema; items?: IJsonSchema | IJsonSchema[]; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string[]; additionalProperties?: boolean | IJsonSchema; definitions?: { [name: string]: IJsonSchema; }; properties?: { [name: string]: IJsonSchema; }; patternProperties?: { [name: string]: IJsonSchema; }; dependencies?: { [name: string]: IJsonSchema | string[]; }; enum?: any[]; type?: string | string[]; allOf?: IJsonSchema[]; anyOf?: IJsonSchema[]; oneOf?: IJsonSchema[]; not?: IJsonSchema; } /** * Interface for objects which implement import functionality. * @param Type of the target object (type to import to). */ export declare interface Importable { /** * Returns available mappers for import. */ getImportMappers(): InputEnumOption[]; /** * Gets an import mapper, potentially loading the schema / mapping from the storage. * @param id Identifier for the mapper. If omitted, the Importable object should not support more than one mapper. * @returns The mapper that maps the source to target. */ getImportMapper(id?: string): Promise>; /** * If provided, commits the mapped object to import target. * @param item Object to import as mapped. * @returns The imported object as imported / saved. */ importItem?(item: TObject): Promise; /** * If provided, commits all the mapped objects to import target or does any other finalizing tasks. * @param items All objects to import as mapped entities. */ finalize?(items: TObject[]): Promise; /** * Validates the item. * @param itemToValidate - The item that is to be validated. * @param index Item index in the all array * @param all The entire item array that will be validated (for duplicate checks etc.). * @returns A Promise with result data containing item and validation pair. */ validate(itemToValidate: TObject, index: number, all: TObject[]): Promise<{ item: TObject; validation: ApiValidation; }>; /** Array of available parsers to use with this importer. */ parsers: FileParser[]; } /** * Logic for the batch import of data from sequence files. * @param TTarget is the target item data type of the import. */ export declare class ImportBatch { private api; /** Raw file data for importing. E.g. csv or tab formatted file. */ rawData: string; /** Parsed tabular data but not mapped */ unmappedData: ImportResult; /** The data mapper used by the batch. */ mapper: DataMapper; /** * A pre-mapper for the parsing logic: * Used by the user interface to map the parsed text file data to assumed / originally defined source. */ parserMapper: DataMapper; /** * Creates a new batch for data import. * @param mapper Mapper object for table to objects transformations. * Preselected from the Importable API. * @param api Api object for validting and posting data to API. */ constructor(mapper: DataMapper, api: Importable); /** Result data of the current operation (map, validate, import). */ get data(): TTarget[]; /** * Sets the mapper for the batch. * @param mapper The new data mapper. */ setMapper(mapper: DataMapper): void; /** Resets the parser mapper according unmappedData (source) and mapper source (target) */ resetParserMapper(): void; /** * Read data into batch from the import file content (to unmappedData). * @param rawData File content, e.g. csv or tab separated data. * @param parser Parser for parsing data to tabular format. * @param localeId If 'fi', the number and date formats are parsed using Finnish formats. * @returns the status of the read. */ read(rawData: string, parser: FileParser, localeId?: Culture): ApiValidation; /** * Maps the source format to the target format using the mapper. */ map(): void; /** Returns true if the import data is valid */ get isDataValid(): boolean; /** Returns true if the import data contains validation errors */ get hasDataValidationErrors(): boolean; /** Clears validation from the rows */ clearValidation(): void; private getMeta; /** * Validates the batch data. * @param notify Function for notifying progress to caller. * @returns A validation object with potential errors. */ validate(notify?: progressNotification): Promise; /** * Imports the batch data. * @param notify Function for notifying progress to caller. */ import(notify?: progressNotification): Promise; private updateValidation; } /** Result for importing data (CSV, Excel copy-paste etc.) */ export declare interface ImportResult { /** Number of ignored lines (empty line or rem/annotated) in the import. */ ignoredLines: number; /** Headers for the import: These are also the properties for the JSON */ headers: Array; /** Result data is an array of objects with properties specified as headers */ data: TRow[]; /** Errors as validation errors. */ errors: ApiValidationError[]; } /** * Methods for mass data uploads. */ export declare class Imports { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for imports. */ private baseUrl; constructor(ajax: Ajax); /** * Imports companies. * * @param companies The company import data. * @returns A Promise with result data ( PartnerCompanyAccountInfo ). */ importCompanies(companies: CompanyImport[]): Promise; /** * Imports workers. * * @param workers The worker import data. * @returns A Promise with result data containing worker IDs. */ importWorkers(workers: WorkerImport[]): Promise; /** * Imports calculations to a new/existing payroll. * * @param calculations The calculation import data. * @returns A Promise with result data containing payroll IDs. */ importCalculations(calculations: CalculationImport[]): Promise; /** * Creates invoices for payrolls. * * @param payrolls IDs of the payrolls to create invoices for. * @param channel The payment channel. * @returns A Promise with result data containing created invoice objects. */ createInvoices(payrolls: InvoicingRequest[], channel: PaymentChannel): Promise; /** * Sends invoices as e-invoices. * * @param invoices IDs of the invoices to be sent as e-invoices. * @returns A Promise with result data containing e-invoicing result messages. */ sendEInvoices(invoices: EInvoicingRequest[]): Promise; /** * Checks the existence of the given workers. * The given ID can be worker's Salaxy ID, employment ID, social security number of external ID. * * @param workers The worker IDs to check. * @returns A Promise with result data containing worker objects. */ checkWorkers(workers: WorkerCheck[]): Promise; /** * Checks the existence of the invoice settings for a company, * The given ID can be company's Salaxy ID or official ID. * * @param companies The company IDs to check. * @param type The type of the check: sepa or eInvoice settings. * @returns A Promise with result data containing settings objects. */ checkInvoiceSettings(companies: InvoiceSettingsCheck[], type: "sepa" | "eInvoice"): Promise; /** * Query e-invoice addresses for a company. * @param officialId Official ID of the company. * @returns List of e-invoice addresses. */ queryEInvoiceAddress(officialId: string): Promise; } /** IncomeEarnerType enumeration */ export declare enum IncomeEarnerType { EmployedByStateEmploymentFund = "employedByStateEmploymentFund", JointOwnerWithPayer = "jointOwnerWithPayer", PartialOwner = "partialOwner", KeyEmployee = "keyEmployee", LeasedEmployeeLivingAbroad = "leasedEmployeeLivingAbroad", PersonWorkingInFrontierDistrict = "personWorkingInFrontierDistrict", PersonWorkingAbroad = "personWorkingAbroad", Athlete = "athlete", PerformingArtist = "performingArtist", RestrictedPeriodInFinland = "restrictedPeriodInFinland", NetOfTaxContract = "netOfTaxContract", Organization = "organization", PersonWorkingOnAlandFerry = "personWorkingOnAlandFerry", EntrepreneurOrFarmerNoPensionRequired = "entrepreneurOrFarmerNoPensionRequired", DimplomaticMission = "dimplomaticMission", Eppo = "eppo", LightEntrepreneur = "lightEntrepreneur" } /** IncomeLogDiff enumeration */ export declare enum IncomeLogDiff { Default = "default", New = "new", Changed = "changed", Removed = "removed" } export declare interface IncomesRegisterSettings { /** The reference number for the tax authorities */ taxReferenceNumber?: string | null; /** Defines how the reporting is done for Incomes registry (Tulorekisteri). */ irReporting?: TaxReportHandling | null; } /** * Income types code-generated from the server. * * @generator https://test-ir.salaxy.com/v01/api/codes/incometype * Fetch this data from https://test-ir.salaxy.com/v01/api/codes/incometype * There is no automatic fetching because the data updated quite seldomly */ export declare const incomeTypeCodes: ({ code: number; nameEn: string; nameFi: string; nameSv: string; isNegativeSupported: boolean; pensionInsurance: boolean; accidentInsurance: boolean; unemploymentInsurance: boolean; healthInsurance: boolean; insuranceInformationAllowed: boolean; taxDefault: number; transactionCode: string; notSupportedError: any; descriptionEn: string; descriptionFi: string; descriptionSv: string; taxAndSideCostsDescrEn: string; taxAndSideCostsDescrFi: string; taxAndSideCostsDescrSv: string; isSupported: boolean; paymentDefault: number; usecases: string[]; calcGrouping: string; } | { code: number; nameEn: string; nameFi: string; nameSv: string; isNegativeSupported: boolean; pensionInsurance: boolean; accidentInsurance: boolean; unemploymentInsurance: boolean; healthInsurance: boolean; insuranceInformationAllowed: boolean; taxDefault: number; transactionCode: string; notSupportedError: string; descriptionEn: string; descriptionFi: string; descriptionSv: string; taxAndSideCostsDescrEn: string; taxAndSideCostsDescrFi: string; taxAndSideCostsDescrSv: string; isSupported: boolean; paymentDefault: number; usecases: any[]; calcGrouping: string; })[]; /** Describes the properties and behavior of the Income types in Incomes register. */ export declare interface IncomeTypeMetadata { /** Code in incomes register. Language versioned. */ code: number; /** Language versioned label for the income type. */ label: string; /** * Description of the row. * Note that this is long text with line feeds / Markdown * Text is currently always in Finnish. */ description: string; /** * Description of how the row is taken into widthholding tax * and how insurance payments (pension, unemployment, accident and health care) are made. * Note that this is long text with line feeds / Markdown * Text is currently always in Finnish. */ taxAndSidecostsDescr: string; /** If true, teh row may have a negative value. */ isNegativeSupported: boolean; /** If true Pension payments are made for this income type by default. */ pensionInsurance: boolean; /** If true Accident insurance payments are made for this income type by default. */ accidentInsurance: boolean; /** If true Unemployment insurance payments are made for this income type by default. */ unemploymentInsurance: boolean; /** If true Health insurance payments are made for this income type by default. */ healthInsurance: boolean; /** If true the default values for insurances may be overriden for a single row. */ insuranceInformationAllowed: boolean; /** Describes the behavior of this row in calculating widthholding tax. */ taxDefault: number; /** If false, the row type is not supported in this version */ isSupported: boolean; /** When isSupported is false, there is a describtive text that tells why the type is not supported. Text is always in Finnish. */ notSupportedError: any; /** Default behavior for payment through Salaxy Customer Funds account */ paymentDefault: number; /** Grouping that is used in reporting etc. */ calcGrouping: string; /** Transaction code enumeration */ transactionCode?: TransactionCode; } /** * Provides business logic for Income types in Incomes Registry (Tulorekisteri). */ export declare class IncomeTypesLogic { /** * Searches the income type texts (supportedTypes) using the current language version. * Returns all types if the search string is less than 2 chars. * @param searchString Search text - will be used as case-insensitive. Will be trimmed. Minimum length 2. */ static search(searchString: string): IncomeTypeMetadata[]; /** * Gets all codes in Incomes register reporting. * This also includes the Salaxy internal codes eg. 1: "Ignored" / "Not reported" * For normal language-versioned behavior use cached allTypes field. * @param language Language for the label. */ static getAll(language?: Language): IncomeTypeMetadata[]; /** * Gets the original codes in Incomes register. * This does not include virtual codes, eg. 1: "Ignored" / "Not reported" * For normal language-versioned behavior use cached originalTypes field. * @param language Language for the label. Typically use null for automatic language versioning. */ private static getOriginal; } /** Defines an option in enumeration or within select element more generally */ export declare interface InputEnumOption { /** * Enum value (option value attribute). */ value: string; /** Label for the value (text of option element). */ text: string; /** Description for the value (title attribute of option element). */ title?: string; /** Optional UI data that is related to the option (e.g. avatar and other visualization). */ ui?: any; } /** * Contains metadata about the default input that is determined * based on reflection model. */ export declare interface InputMetadata { /** * Property name if input is referenced as property, otherwise null. * Used in model path and sorting. */ name: string; /** The JSON schema data type */ type: JsonInputType; /** * The JSON schema data format: Subtype of type (e.g. string => multiline, number => float). * For type="object" and type="string"/enum=[] this is the Salaxy type/schema name of the object. */ format: string; /** If true, the input is enumeration object. */ isEnum: boolean; /** In data binding scenarios, the path from the current object. */ path: string; /** Error message if the resolving fails: May be some other content in the future. */ content?: string; } /** InsuranceCompany enumeration */ export declare enum InsuranceCompany { None = "none", LähiTapiola = "l\u00E4hiTapiola", Pohjola = "pohjola", If = "if", Fennia = "fennia", AVakuutus = "aVakuutus", Aktia = "aktia", Pohjantähti = "pohjant\u00E4hti", Tryg = "tryg", Ålands = "\u00E5lands", Turva = "turva", Redarnas = "redarnas", Folksam = "folksam", Alandia = "alandia", Other = "other", Pending = "pending" } /** Represents an insurance contract for employer or information that the employer knowingly does not have an insurance contract. The latter is legal when only a very small amount of salaries is paid. */ export declare interface InsuranceContract { /** If set to true, the insurance is set to a partner insurance. */ isPartnerInsurance?: boolean | null; /** Company for the current insurance */ company?: InsuranceCompany | null; /** The accident insurance contract number that should be validated accordingly. */ contractNumber?: string | null; /** Percent for calculating the estimate for the accident insurance amount to pay. */ insurancePercent?: number | null; /** Percent for calculating the estimate for the group life insurance amount to pay. */ groupLifeInsurancePercent?: number | null; /** Unique identifier (guid) for the contract. The value is automaticallyh added on the server side: Any input is ignored/invalid. Set as null for new contracts. */ id?: string | null; /** Status of the contract */ status?: SettingsStatus | null; /** If specified, defines the start date for the contract. If in the future, the the contract is inactive. Null (default) means the contract is valid indefinetely from the past. */ startDate?: string | null; /** If specified, defines the end date for the contract. Date is inclusive meaning that if EndDate is 31.12., contract is valid until end-of-year: Valid on 31.12. and invalid 1.1. If in the past, the the contract is inactive. Null (default) means the contract is valid indefinetely to future. */ endDate?: string | null; } /** Employer insurance. Currently, this is the mandatory employer insurance only. */ export declare interface InsuranceProduct { readonly status?: string | null; /** If set to true, the insurance is set to a partner insurance. */ isPartnerInsurance?: boolean | null; /** If true, the user indicates that he/she has already made an insurance contract. Should also fill in the InsuranceCompany and InsuranceContractNumber */ isInsuranceContractDone?: boolean | null; /** Company for the current insurance */ insuranceCompany?: InsuranceCompany | null; /** Contract number for the current insurance. */ insuranceContractNumber?: string | null; /** Enabled property set automatically by IsPartnerInsurance. */ enabled?: boolean | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** Settings related to Integrations that should be immediately available with session without separate load. */ export declare interface IntegrationInSession { /** URL to custom staging / integration server. Used in running custom usecases and other custom integrations (currently imports). */ serverUrl?: string | null; } /** InternationalIdentifier enumeration */ export declare enum InternationalIdentifier { Undefined = "undefined", TaxIdentificationNumber = "taxIdentificationNumber", ForeignPersonalIdentificationNumber = "foreignPersonalIdentificationNumber", Other = "other" } /** InternationalSocialSecurityException enumeration */ export declare enum InternationalSocialSecurityException { NotSubjectToEarningsRelatedPensionInsurance = "notSubjectToEarningsRelatedPensionInsurance", NotSubjectToAccidentAndOccupationalDiseaseInsurance = "notSubjectToAccidentAndOccupationalDiseaseInsurance", NotSubjectToUnemploymentInsurance = "notSubjectToUnemploymentInsurance", NotSubjectToHealthInsurance = "notSubjectToHealthInsurance", VoluntaryEarningsRelatedPensionInsurance = "voluntaryEarningsRelatedPensionInsurance", NoObligationToHealthInsuranceDailyAllowanceContribution = "noObligationToHealthInsuranceDailyAllowanceContribution" } /** InternationalSocialSecurityType enumeration */ export declare enum InternationalSocialSecurityType { Default = "default", Foreign = "foreign", Mixed = "mixed" } /** Invoice for the pending payment in the business system. For example, a salary gross payment created for the salary calculation and delivered as an e-invoice to the employer. For example, a salary net payment, created for the employer which is self paying the net payment to the worker. */ export declare interface Invoice { /** Group indicator. Invoices with the same group id can be paid in the same batch. */ group?: string | null; /** Invoice header details. */ header?: InvoiceHeader | null; /** Invoice recipient details. */ recipient?: InvoiceRecipient | null; /** Invoice payer details. */ payer?: InvoicePayer | null; /** List of invoice rows. */ rows?: InvoiceRow[] | null; /** Invoice data in XML or json format. */ content?: string | null; /** Invoice in pdf format. */ pdf?: string | null; /** The workflow data for manual editing and approval purposes. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Invoice specific business data for index. */ export declare interface InvoiceData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Channel that is used for paying the invoice. */ channel?: PaymentChannel | null; /** Invoice Date. */ date?: string | null; /** Due date for the invoice. */ dueDate?: string | null; /** Start of period for the Invoice: Work period, month / quarter of sidecosts etc. */ periodStart?: string | null; /** End of period for the Invoice: Work period, month / quarter of sidecosts etc. */ periodEnd?: string | null; /** Already paid amount of the invoice. This is applicable only for some periodic invoices, like tax invoices, which may be paid in parts. */ totalPaid?: number | null; /** The count of paid business objects (typically calculations) which the invoices is based on. This is applicable only for some periodic invoices, like tax invoices, which may be paid in parts. */ paidBusinessObjectsCount?: number | null; /** The time when the object status was last updated. */ statusAt?: string | null; } /** InvoiceDateKind enumeration */ export declare enum InvoiceDateKind { InvoiceDate = "invoiceDate", DueDate = "dueDate", LogicalDate = "logicalDate" } /** Header for the invoice */ export declare interface InvoiceHeader { /** Payment reference (e.g. RF0710010831). Please note that in salary payment scenarios, this is not necessarily unique. */ referenceNumber?: string | null; /** Invoice Date. */ date?: string | null; /** Due date for the invoice. */ dueDate?: string | null; /** The date for the actual period for which this invoice is done. For salaries, this is salary date, for monthly / quarterly payments, this is the first day of period. */ logicalDate?: string | null; /** Total amount for the invoice excluding VAT. */ totalExVat?: number | null; /** Total payable amount for the invoice including VAT. */ total?: number | null; /** Already paid amount of the invoice. This is applicable only for some periodic invoices, like tax invoices, which may be paid in parts. */ totalPaid?: number | null; /** The free text that is displayed / sent with the invoice. May have multiple lines. */ message?: string | null; /** Channel that is used for paying the invoice. */ channel?: PaymentChannel | null; /** Invoice type. */ type?: InvoiceType | null; /** The external ID is used for matching the executed payment from the 3rd party system to the pending payment in the Palkkaus system. */ externalId?: string | null; /** The current notified status of the invoice in external system. */ status?: InvoiceStatus | null; /** The time when the object status was last updated. */ statusAt?: string | null; /** List of business object ids (typically calculations) on which the payment is based on. */ businessObjects?: string[] | null; /** The count of paid business objects (typically calculations) which the invoices is based on. This is applicable only for some periodic invoices, like tax invoices, which may be paid in parts. */ paidBusinessObjectsCount?: number | null; /** Period for the Invoice: Work period, month / quarter of sidecosts etc. */ period?: DateRange | null; /** The payment type of the invoice. If the payment channel does not support the requested payment type (e.g. Salary), it should set here the payment type that it used (e.g. Default). Payment channel should also expect new types to be introduced, without that being a breaking change. Currently, we expect Default always be supported. */ paymentType?: InvoicePaymentType | null; } /** Represents a single item in a list of invoices in the user interface. It contains all essential information of the report and is basis for searching, filtering and sorting. */ export declare interface InvoiceListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: InvoiceStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: InvoiceData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Party in an Varma Invoice: Either Payer or Recipient. */ export declare interface InvoiceParty { /** Finnish Company ID (Y-tunnus). */ companyId?: string | null; /** Organisation name */ companyName?: string | null; /** Contact information */ contact?: Contact | null; /** Contact person Full name */ contactPersonName?: string | null; } /** Payment payer party of the invoice. */ export declare interface InvoicePayer { /** Avatar is the visual representation of the party. */ avatar?: Avatar | null; /** Contact information for the party. */ contact?: Contact | null; /** Official identifier of the party: Finnish HETU (Soc. sec. number) for a Person or Y-tunnus (Company ID for a company or association). */ officialId?: string | null; /** Optional ID for identifying the party in the third party system. This is the same partner key that is given as part of Single Sign-On process. */ partnerKey?: string | null; } /** InvoicePaymentType enumeration */ export declare enum InvoicePaymentType { Default = "default", Salary = "salary", SalaryInPast = "salaryInPast" } /** Provides a preview of how an invoice should be created. In the future versions, it is expected to return DIFF information on how potential previously created invoices would behave (e.g. if som invoices would be canceled or changed). */ export declare interface InvoicePreview { /** The invoice that exists / would be created. */ invoice?: InvoiceListItem | null; /** If true, this invoice has already been created. */ exists?: boolean | null; } /** Payment receiver party of the invoice. */ export declare interface InvoiceRecipient { /** The full name of the payment receiver for payment purposes. */ fullName?: string | null; /** The International Bank Account Number of the receiver. */ iban?: string | null; /** This is an official identifier of the party: Finnish Personal Id (HETU) for a Person or Company Id (Y-tunnus) for a company or association. WARNING: This is currently needed for Finvoice only (https://www.finanssiala.fi/finvoice/Sivut/default.aspx). As such we consider removing it from persons. Please inform if you use this property! */ officialId?: string | null; /** Identifier in a source system. Used in imports etc. */ sourceId?: string | null; /** Optional contact info. Not available for all recipients. */ contact?: Contact | null; /** The ultimate beneficiary of the money: This may be a Palkkaus.fi Worker Account (Avatar id is not null) or some other entity: Tax authorities, pension company etc. (Avatar id is null). Typically beneficiary is the same as Iban, OfficialId, FullName and Contact in this object, but this is not true in edge cases (e.g. customer funds account). */ beneficiary?: AccountInIndex | null; } /** Row for the invoice */ export declare interface InvoiceRow { /** Article Identifier is given by seller, EAN etc. In the case of Salaxy salaries, this is CalculationRowType. */ articleId?: string | null; /** Name of the product or service. In the case of Salaxy salaries, this is language versioned text of CalculationRowType. */ articleName?: string | null; /** Message (RowFreeText in Finvoice) is the message is mainly designed for accounting systems. */ message?: string | null; /** Count (DeliveredQuantity in Finvoice) is the quantity of product or service. */ count?: number | null; /** Price including VAT (UnitPriceVatIncludedAmount, Yksikköhinta verollinen) */ price?: number | null; /** Price of one product or service without Vat (UnitPriceAmount, Yksikköhinta veroton). Yksikköhinta voidaan ilmoittaa myös verollisena UnitPriceVatIncludedAmount- elementissä laskutuskäytännön ja verottajan ALV-ohjeistuksen mukaan. */ priceExVat?: number | null; /** Vat percent related to the product or service (RowVatRatePercent, Alv%) Please note that eg. 24% is valued as 0.24 */ vatPercent?: number | null; /** Row total excluding VAT (RowVatExcludedAmount, Yhteensä veroton) */ totalExVat?: number | null; /** Row total with VAT (RowAmount, Yhteensä verollinen) */ total?: number | null; /** Suggested account number (RowNormalProposedAccountIdentifier). */ accountingAccountNumber?: string | null; /** Textual code for accounting mapping (RowProposedAccountText, Raportointikoodi). In Finvoice: "Accounting information agreed between seller and buyer." */ accountingCode?: string | null; /** Business object id (typically calculation) on which the row is based on. */ businessObject?: string | null; } /** * Provides read access for authenticated user to access his/her own invoices. */ export declare class Invoices extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Client-side (synchronous) method for getting a new blank item as bases for UI binding. * NOTE: At the moment, this method is pretty useless as you cannot save invoice items: * You need to create them using createInvoice() method based on a calculation. */ getBlank(): Invoice; /** * Creates invoices to pay a salary calculation. * @param calc Calculation for which the invoices are created. * @param channel Payment channel to use. * @returns Invoices which have been created in the Invoices queue. */ createInvoices(calc: Calculation, channel: string): Promise; /** * Creates invoices to pay a salary calculation(s). * @param channel Payment channel to use. * @param calcIds One or several identifiers of the Calculation for which the invoices are created. * @returns Invoices which have been created in the Invoices queue. */ createInvoicesById(channel: string, ...calcIds: string[]): Promise; /** * Creates invoices to pay a set of salary calculation. * @param channel Payment channel to use. * @param payrollId Identifier for the Payroll for which the invoices are created. * @returns Invoices which have been created in the Invoices queue. */ createInvoicesForPayroll(channel: string, payrollId: string): Promise; /** * Previews invoices to pay a salary calculation(s) and fetches the ones that have already been created. * Used for payment dialog preview: Does not yet save the invoices and does not do any other storage saves. * @param channel Payment channel to use. * @param calcs The calculations for which the invoices are created as preview (not saved to storage). * Specified as ID's or unsaved Calculations or Payroll detail items. * @returns Invoices (list item + metadata) which have been created for preview (not saved) or that were previously created. */ previewInvoices(channel: string, calcs: CalculationCollection): Promise; /** * Makes a request for updating the status of the invoice. * @param id Identifier for the invoice. * @param status The requested new status of the invoice. */ requestStatusUpdate(id: string, status: InvoiceStatus): Promise; /** * Returns content (PDF) url for an invoice. * @param id The id of the invoice. * @param inline If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). */ getContentUrl(id: string, inline?: boolean): string; /** * Downloads a sepa file for created invoices based on invoice IDs. * @param ids Ids of the invoices for the sepa payment. * @param payerIbanNumber Payer iban number. * @param bankPartyId Payer bank party id. Depends on the bank. * @returns A Promise with result data array. */ getSepaByIds(ids: string[], payerIbanNumber?: string, bankPartyId?: string): Promise; } /** Settings related to invoices that are sent to customers. */ export declare interface InvoiceSettings { /** Receiver's address for the e-invoice. */ eInvoiceReceiver?: string | null; /** Receiver's operator for the e-invoice. */ eInvoiceIntermediator?: string | null; /** SEPA maksatustunnus */ sepaBankPartyId?: string | null; /** Employer's bank account number */ ibanNumber?: string | null; } /** Check object for invoice settings. */ export declare interface InvoiceSettingsCheck { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 This field is optional and defaults to the company number of the current account. */ officialId?: string | null; /** Item id to check. This can be external ID, official ID or Salaxy ID. */ id?: string | null; /** Validation for the import */ validation?: ApiValidation | null; /** Result object of the import. */ result?: ApiCheckResultOfInvoiceSettings | null; } /** Common logic for invoices */ export declare class InvoicesLogic { /** * Custom type guard that determines whether the payment object is a payroll (based on whether it calcs collection). * @param paymentObject Payment object that is either PayrollDetails or Calculation OR does not have calcs / employer properites that is used to determine the type. */ static isPayroll(paymentObject: Calculation | PayrollDetails | any): paymentObject is PayrollDetails; /** * Custom type guard that determines whether the payment object is a calculation (based on whether it employer property). * @param paymentObject Payment object that is either PayrollDetails or Calculation OR does not have calcs / employer properites that is used to determine the type. */ static isCalculation(paymentObject: Calculation | PayrollDetails | any): paymentObject is Calculation; /** * Gets and avatar image for a payment channel * Enum name is id, label as displayName, descr as description and sort order as 6-char string in sortableName. * Picture is either color-initials combination or pic as usual. * @param channel The channel to fetch avatar for. */ static getChannelAvatar(channel: PaymentChannel): Avatar; /** * Gets all the supported payment channels defined in PaymentChannel as avatars. * Enum name is id, label as displayName, descr as description and sort order as 6-char string in sortableName. * Picture is either color-initials combination or pic as usual. */ static getAllChannels(): Avatar[]; /** * Returns true if the channel is for customer funds account (cfa). * @param channel Any payment channel. * @returns True for customer funds account channels. */ static isCfa(channel: PaymentChannel): boolean; /** * Returns true if the channel is for customer funds account (ecfa). */ static isEcfa(channel: PaymentChannel): boolean; private static avatars; private static avatarPics; } /** InvoiceStatus enumeration */ export declare enum InvoiceStatus { Undefined = "undefined", Forecast = "forecast", Preview = "preview", WaitingPalkkaus = "waitingPalkkaus", Unread = "unread", Read = "read", WaitingConfirmation = "waitingConfirmation", PaymentStarted = "paymentStarted", Warning = "warning", Paid = "paid", Canceled = "canceled", Error = "error" } /** Contents for the invoice status notification message. */ export declare interface InvoiceStatusNotification { /** Unique ID for the invoice in Salaxy system. If omitted, the resolving to an invoice will be made using external id. */ id?: string | null; /** External id can be set in the notification for the invoice for later messaging. If the notification message contains an External Id AND regular Id, the External Id is updated in the Salaxy database. If the notification contains External Id, but NO regular Id, an invoice is fetched based on External Id. In the latter case, a non-existent Id or multiple invoices with the same External Id will throw an exception and the entire update process is canceled. */ externalId?: string | null; /** New status for the invoice. Required main payload of the call. */ status?: InvoiceStatus | null; /** Required Date for the transaction (booking date). */ date?: string | null; /** Required realized amount of the transaction. */ amount?: number | null; /** Optional full name of the payment receiver. Should be sent only if the user or process has the possibility of changing the name. */ receiverFullName?: string | null; /** Optional bank account IBAN of the receiver. Should be sent only if the user or process has the possibility of changing the IBAN. */ receiverIban?: string | null; /** Optional payment reference number. Should be sent only if the user or process has the possibility of changing or removing the reference number. Changing the reference number will typically lead to an error in the back office process that needs to be manually handled. */ referenceNumber?: string | null; /** The payment type of the invoice. If the payment channel does not support the requested payment type (e.g. Salary), it should set here the payment type that it used (e.g. Default). Payment channel should also expect new types to be introduced, without that being a breaking change. Currently, we expect Default always be supported. */ paymentType?: InvoicePaymentType | null; } /** InvoiceType enumeration */ export declare enum InvoiceType { Undefined = "undefined", Net = "net", Tax = "tax", TaxWithholding = "taxWithholding", TaxSocialSecurity = "taxSocialSecurity", TaxAtSource = "taxAtSource", Unemployment = "unemployment", Pension = "pension", Union = "union", Foreclosure = "foreclosure", Payroll = "payroll", Service = "service", Fee = "fee", Gross = "gross", Verification = "verification" } /** Import object for invoice creation. */ export declare interface InvoicingRequest { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 This field is optional and defaults to the company number of the current account. */ officialId?: string | null; /** Additional parameters for import. Defaults to string. */ parameters?: { [key: string]: any; } | null; /** Item for import. */ item?: string | null; /** Validation for the import */ validation?: ApiValidation | null; /** Result object of the import. */ result?: ApiImportResultOfInvoiceOf | null; } /** Reporting details to Incomes registry (Tulorekisteri). */ export declare interface IrDetails { /** The number code in Incomes Register. */ code?: number | null; /** Boolean flags that can be set on transaction. */ flags?: IrFlags[] | null; /** Defines the exceptions to Insurance / Sidecost defaults that are set by the row type. */ insuranceExceptions?: IrInsuranceExceptions[] | null; /** Daily allowance code. */ dailyAllowance?: AllowanceCode[] | null; /** Set this to true if meak benefit is of tax value - false if it si not. The value should be null if the row is not mealBenefit. */ mealBenefitIsTaxValue?: boolean | null; /** Provides the additional data needed for car benefit. */ carBenefit?: CarBenefit | null; /** If true, report zero amount to IR. */ noTransactionAmount?: boolean | null; } /** * Provides CRUD access for authenticated user to access a his/her own Earnings Payments objects */ export declare class IrEarningsPayments extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): irepr.EarningsPayment; /** Get odata base url */ getODataUrl(): any; /** Validate */ validate(earningsPayment: irepr.EarningsPayment): Promise; /** Send schedule item to Incomes register queue */ sendSchedule(aso: irepr.IrApiScheduleObject): Promise; /** Get Service Bus queue item */ getIrQueueItem(id: string): Promise; /** Remove Service Bus queue item */ removeIrQueueItem(id: string): Promise; } export declare namespace irepr { /** Object that stores National Incomes Register Earnings Payment Reports. */ export interface EarningsPayment { /** Delivery data from IR Wage Report. */ deliveryData?: DeliveryData | null; /** Salaxy data that can't be stored in Earnings Payment Report */ info?: EarningsPaymentReportExtensions | null; /** Validation for the Earnings Payment Report */ validation?: ApiValidation | null; /** Status of the Earnings Payment Report. */ status?: EarningsPaymentReportStatus | null; /** IR Report log. Successfully sent or canceled report ids and time stamps. */ reportLog?: ReportLogEntry[] | null; /** Last errors from IR. */ irErrors?: ApiValidation | null; /** Last successful status in Incomes Register */ irStatus?: ReportLogEventType | null; /** Current schedule for the report. */ scheduledFor?: string | null; /** Timestamp of the last action in IR. */ lastDeliveredAt?: string | null; /** If true, the report has been modified after the last send operation. */ isModified?: boolean | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Record data */ export interface DeliveryData { /** Time of record creation */ timestamp?: string | null; /** Data source */ source?: string | null; /** Record type */ deliveryDataType?: DeliveryDataType | null; /** Record owner's (payer's) record reference The record owner's record reference must uniquely identify all records of a specific record owner (DeliveryDataOwner) containing earnings payment reports (DeliveryDataType=100). */ deliveryId?: string | null; /** Rule for processing invalid data (reports) If the record contains invalid reports, this entry determines whether to reject only the invalid reports in the record or the entire record */ faultyControl: FaultyControl; /** Production environment If the value is "true", the data must have been delivered to the Incomes Register's production environment. If the value is "false", the data must have been delivered to the Incomes Register's test environment. */ productionEnvironment?: boolean | null; /** Record owner Processing rules related to data items Record owner, Record creator and Record submitter: The payer has a customer ID and the payer reports the data: At least one identifier has been specified in the data group Payer identifiers. The data item Record owner must be one of the payer identifiers. If a business ID has been specified in the data group Payer identifiers, it must be specified as the Record owner. The Record owner (= payer) must be specified as the Record creator. The Record owner (= payer) must be specified as the Record submitter. The payer has a customer ID and the service provider submits the data on behalf of the payer: At least one identifier has been specified in the data group Payer identifiers. The data item Record owner must be one of the payer identifiers. If a business ID has been specified in the data group Payer identifiers, it must be specified as the Record owner. The identifier of the service provider must be specified as the Record creator. If the service provider has a business ID, it must be specified. It must be specified in the Incomes Register that the service provider has the right to submit records on behalf of others. The Record creator (= service provider) must be specified as the Record submitter. The payer has no customer ID and the service provider submits the data on behalf of the payer: The value of the data item "The payer does not have a customer ID" is "true". The identifier of the service provider must be specified as the Record owner. If the service provider has a business ID, it must be specified. It must be specified in the Incomes Register that the service provider has the right to submit records on behalf of others. The Record owner (= service provider) must be specified as the Record creator. */ deliveryDataOwner?: Id | null; /** Record creator The processing rules for Identifier type, Identifier, Country code and Country name are the same as in the Record owner (DeliveryDataOwner) data group. */ deliveryDataCreator?: Id | null; /** Record submitter The processing rules for Identifier type, Identifier, Country code and Country name are the same as in the Record owner (DeliveryDataOwner) data group. */ deliveryDataSender?: Id | null; /** Pay period */ paymentPeriod?: PaymentPeriod | null; /** Contact persons for the record */ contactPersons?: ContactPerson[] | null; /** Payer details */ payer?: Payer | null; /** Reports data */ reports?: Report[] | null; } /** Salaxy data that can't be stored in earnings payment report */ export interface EarningsPaymentReportExtensions { /** Worker */ worker?: Avatar | null; /** Calculation used to generate this WageReport */ calculationId?: string | null; /** Employer's Id */ employerId?: string | null; /** Worker's Id */ workerId?: string | null; /** Partner of the customer. */ partnerId?: string | null; /** Service model of the customer. */ serviceModelId?: string | null; /** Payment Channel of the calculation. */ paymentChannel?: EarningsPaymentReportExtensionsPaymentChannel | null; /** Application from which the calculation originated. */ applicationId?: string | null; /** Assumed earnings payment report date for the report. */ reportDate?: string | null; } /** Common base class / interface for data validation. */ export interface ApiValidation { /** If true, the data is valid - no errors. */ readonly isValid?: boolean | null; /** If true, has required fields missing data. */ readonly hasAllRequiredFields?: boolean | null; /** Validation errors on invalid field values. Note that required fields missing error messages are not here. Only the invalid values. */ readonly errors?: ApiValidationError[] | null; } /** Log data from the successfull sending or cancellation. */ export interface ReportLogEntry { /** Response date from the Incomes Register. */ irTimestamp?: string | null; /** Event type: Sending or cancellation. */ eventType?: ReportLogEventType | null; /** Our own report id. */ reportId?: string | null; /** Generated id from the Incomes Register. */ irReportId?: string | null; /** Delivery id. */ irDeliveryId?: string | null; /** Response id. */ irResponseId?: string | null; /** Version. */ irVersion?: number | null; /** User who sent the report. */ user?: string | null; /** Credential of the user. */ credential?: string | null; /** Storage version id. */ versionId?: string | null; /** Message for the event. */ message?: string | null; } /** Defines the data that IWorkflowItem must provide. */ export interface WorkflowData { /** Workflow events for the item. */ events?: WorkflowEvent[] | null; } /** Employer Identifier */ export interface Id { /** Identifier type */ type?: IdType | null; /** Identifier If the "Identifier type" is "Business ID", the identifier must exist (according to information from the Business Information System (YTJ)). If the "Identifier type" is "Finnish Personal Identification Number", the identifier must exist (according to information from the Population Information System (VTJ)). */ code?: string | null; /** Country code Mandatory data if "Identifier type" is other than "Business ID" or "Finnish Personal Identification Number". */ countryCode?: string | null; /** Country name Mandatory data if "Country code" is "99". */ countryName?: string | null; } /** Pay Period If the "Action type" is "Replacement report", the data should match that of the report’s previous version. */ export interface PaymentPeriod { /** Date of payment or other report The date must not be earlier than 1 January 2019. */ paymentDate?: string | null; /** Start date The date must not be earlier than 1 January 1800. */ startDate?: string | null; /** End date The date must not be earlier than the "Start date". */ endDate?: string | null; } export interface ContactPerson { /** Name */ name?: string | null; /** Telephone number */ telephone?: string | null; /** E-mail address If the ‘Reimbursement application data’ data group is specified for a paid absence and 1 or 2 as the ‘Payment data type’ even in a single report in a record, you must report at least one ‘Contact person for the record’ for whom the ‘E-mail address’ and ‘Field of responsibility’ data items have been specified. */ email?: string | null; /** Field of responsibility If the ‘Reimbursement application data’ data group is specified for a paid absence and 1 or 2 as the ‘Payment data type’ even in a single report in a record, you must report at least one ‘‘Contact person for the record’ for whom the ‘E-mail address’ and ‘Field of responsibility’ data items have been specified, with ‘Field of responsibility’ having the value 1 (Content issues). */ responsibilityCode?: ResponsibilityCode | null; } /** Payer details */ export interface Payer { /** Payer identifiers */ payerIds?: Id[] | null; /** Basic payer details */ payerBasic?: PayerBasic | null; /** Payer's address */ address?: Address | null; /** Payer's suborganisations */ subOrgs?: SubOrg[] | null; /** Other payer details */ payerOther?: PayerOther | null; /** Substitute payer */ substitutePayer?: SubstitutePayer | null; } /** Report data */ export interface Report { /** Service data */ reportData?: ReportData | null; /** Income earner details */ incomeEarner?: IncomeEarner | null; /** Income types */ transactions?: Transaction[] | null; /** Details on foreign leased workforce */ foreignLeasedWork?: ForeignLeasedWork | null; /** Stay periods in Finland */ stayPeriodsInFinland?: StayPeriodsInFinland | null; /** Work periods in Finland */ workPeriodsInFinland?: WorkPeriodInFinland[] | null; /** Countries of work */ workCountries?: WorkCountry[] | null; /** Absences */ absence?: Absence | null; } /** Defines an avatar for an account, profile etc. - mainly the image that should be shown, names and short description */ export interface Avatar { /** Entity type: person/company */ entityType?: AvatarEntityType | null; /** First name or company name */ firstName?: string | null; /** Last name, for companies, this should be null */ lastName?: string | null; /** Display name. For a person this is 'FirstName LastName' (auto-created). */ displayName?: string | null; /** Sortable name for ordered lists etc. For a person this is 'LastName, FirstName' (auto-created). Depending on the data storage, this may be all-lowercase for easier sorting and search. */ sortableName?: string | null; /** Type of the Avatar picture. */ pictureType?: AvatarPictureType | null; /** Color - currently only used by type Icon */ color?: string | null; /** Initials - currently only used by type Icon */ initials?: string | null; /** URL of the picture if specified as picture (null in a case of type Icon) */ url?: string | null; /** Short description of the user. This may be overriden by a context specific value by the business logic. */ description?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Validation errors used in API output. */ export interface ApiValidationError { /** Full path to Name of the property / field (Member name in JSON). This may be null/empty for type General. */ key?: string | null; /** High level type: Specifies the relation to object and its Member. */ type: ApiValidationErrorType; /** Validation error message in the requested language. */ msg: string; /** Validation error long description in the requested language. */ description?: string | null; /** Some error providers may have a unique technical code for error or validator */ code?: string | null; } /** Event in the workflow */ export interface WorkflowEvent { /** Event-provider specific identifier for the event. For deletable events, this should identify , but do NOT trust this to be 100% unique. */ id?: string | null; /** Type of the event. This typically maps to parent-object specific enumeration. */ type?: string | null; /** Message for backoffice purposes from the User or system that created the event. */ message?: string | null; /** User Interface styling of the event: Indicates the severity for the end-user. */ ui?: WorkflowEventUi | null; /** Features for this event. */ features?: Features[] | null; /** UTC time for when the event occured. */ time?: string | null; /** User or system that created the event. */ user?: string | null; /** Credential of the user which is responsible of the event. */ assignedTo?: string | null; /** Record attached to this event. */ record?: string | null; } /** Basic payer details */ export interface PayerBasic { /** The payer does not have a customer ID Mandatory data, if no identifiers have been specified in the "Payer identifiers" data group. */ missingId?: boolean | null; /** Company name Mandatory data in the following cases: • No identifier where the "Identifier type" is "Business ID" or "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Last name" and "First name" have not been specified. • The value of "The payer does not have a customer ID" is "true", and "Last name" and "First name" have not been specified. */ companyName?: string | null; /** Last name Mandatory data in the following cases: • No identifier where the "Identifier type" is "Business ID" or "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Company name" has not been specified. • The value of "The payer does not have a customer ID" is "true", and "Company name" has not been specified. • The value of "Payer type" is "Temporary employer", and "Company name" has not been specified. */ lastName?: string | null; /** First name Mandatory data in the following cases: • No identifier where the "Identifier type" is "Business ID" or "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Company name" has not been specified. • The value of "The payer does not have a customer ID" is "true", and "Company name" has not been specified. • The value of "Payer type" is "Temporary employer", and "Company name" has not been specified. */ firstName?: string | null; /** Date of birth Mandatory data in the following cases: • No identifier where the "Identifier type" is "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Last name" and "First name" have been specified. • The value of "The payer does not have a customer ID" is "true", and "Last name" and "First name" have been specified. The date must not be later than the current date. The date must not be earlier than 1 January 1800 */ birthDate?: string | null; /** Contact language */ language?: Language | null; } /** Address */ export interface Address { /** c/o */ co?: string | null; /** Street address If this data group is included, either "Street address" or "P.O. Box" must be specified.Both must not be entered. */ street?: string | null; /** P.O. Box If this data group is included, either "Street address" or "P.O. Box" must be specified.Both must not be entered. */ poBox?: string | null; /** Postal code */ postalCode?: string | null; /** City */ postOffice?: string | null; /** Country code A two-character code in accordance with the ISO 3166 country codes. If the country is unknown, the value "99" is entered. */ countryCode?: string | null; /** Country name Mandatory data if "Country code" is "99" */ countryName?: string | null; } /** Payer's suborganisations */ export interface SubOrg { /** Suborganisation’s identifier type */ type?: PayerSubOrgType | null; /** Suborganisation identifier */ code?: string | null; } /** Other payer details */ export interface PayerOther { /** Payer types */ payerTypes?: PayerType[] | null; } /** Substitute payer If substitute payer data is specified, at least the "Acts as a substitute payer" and "Employer identifier" data must be specified. If the "Action type" is "Replacement report", the data should match that of the report’s previous version. */ export interface SubstitutePayer { /** Acts as a substitute payer */ acts?: boolean | null; /** Employer identifier */ employerId?: Id | null; /** Employer name Mandatory data if "Identifier type" is other than "Business ID" or "Finnish Personal Identification Number". */ employerName?: string | null; /** Paid as wage security */ wageSec?: boolean | null; } /** Service data */ export interface ReportData { /** Action type */ actionCode?: ActionCode | null; /** Incomes Register report reference */ irReportId?: string | null; /** Report reference */ reportId?: string | null; /** Report version number */ reportVersion?: number | null; } /** Income earner details */ export interface IncomeEarner { /** Income earner identifiers Mandatory data group, if "The income earner does not have a customer ID" has not been specified. The data group must not be included, if "The income earner does not have a customer ID" has been specified. If the "Action type" is "Replacement report", the data should match that of the report’s previous version. */ incomeEarnerIds?: Id[] | null; /** Basic income earner details Mandatory data group in the following cases: • No identifiers where "Identifier type" is "Business ID" or "Finnish Personal Identification Number" have been specified in the "Income earner identifiers" data group. */ incomeEarnerBasic?: IncomeEarnerBasic | null; /** Income earner's addresses Mandatory data group in the following cases: • No identifiers where "Identifier type" is "Business ID" or "Finnish Personal Identification Number" have been specified in the "Income earner identifiers" data group. • The value of "The income earner does not have a customer ID" is "true". • The value of "Non-resident taxpayer" is "true". In this case, at least the address in home country ("Address type" is "Address in home country") must be specified for the income earner */ addresses?: TypedAddress[] | null; /** Income earner's suborganisations */ subOrgs?: SubOrg[] | null; /** Employment relationship data */ employment?: Employment | null; /** Occupation The "Occupational class or title" data group must always be specified for an income earner, with the "Occupational class or title identifier" in accordance with "Statistics Finland's classification of occupations" included, except in the following situations: a) The report contains no income types that require specification of th "Occupational class or title" data group.This takes account of whether the income type is, by default, income subject to accident and occupational disease insurance (see the document, "Wages – Codes – Income types") and whether the income type in the report is exceptionally subject to accident and occupational disease insurance.In the report, the exceptions to the income type's default values are specified using the "Type of insurance information" and "Grounds for insurance contribution" entries. If "Type of insurance information" is "Subject to accident and occupational disease insurance contribution" and the corresponding "Grounds for insurance contribution" value is "true"/"false", the income type in the report is/is not income subject to accident and occupational disease insurance. b) The value of "Acts as a substitute payer" is "true". c) The report includes a "Type of exception to insurance" that is one of the following: • No obligation to provide insurance (earnings-related pension, health, unemployment or accident and occupational disease insurance) • No obligation to provide insurance(accident and occupational disease insurance) • Not subject to Finnish social security(earnings-related pension, health, unemployment or accident and occupational disease insurance • Not subject to Finnish social security(accident and occupational disease insurance) The "Occupational class or title" data group must always be specified for an income earner, with the "Occupational class or title identifier" in accordance with "Trafi's titles" included, if the "Pension provider code" is 34.* The "Occupational class or title" data group must always be specified for an income earner, with the "Occupational class or title identifier" in accordance with "Keva's titles" included, if the "Pension provider code" is 20, 30, 25, 24 or 29.* The "Occupational class or title" data group must always be specified for an income earner, with the "Occupational class or title identifier" in accordance with "Bank of Finland's titles" included, if the "Pension provider code" is 27.* * Exception: The "Occupational class or title" data group does not need to be specified, if "Type of exception to insurance" with one of the following values has been specified for the income earner: • No obligation to provide insurance(earnings-related pension, health, unemployment or accident and occupational disease insurance) • No obligation to provide insurance(earnings-related pension insurance) • Not subject to Finnish social security(earnings-related pension, health, unemployment or accident and occupational disease insurance) • Not subject to Finnish social security(earnings-related pension insurance) */ professions?: Profession[] | null; /** Employment registration The "Grounds for registration" data group must be specified, with the "Registration grounds identifier" in accordance with "Keva's grounds for registration" included, if the "Pension provider code" is 20, 30, 25, 24 or 29. The "Grounds for registration" data group must be specified, with the "Registration grounds identifier" in accordance with "Bank of Finland's grounds for registration" included, if the "Pension provider code" is 27 */ employmentRegs?: EmploymentReg[] | null; /** Income earner's place of business If this data group is included, either "Place of business code" or address details must be specified.If the address details are specified, they must include at least "Street address", "Postal code" and "City". */ placeOfBusiness?: PlaceOfBusiness | null; /** Earnings-related pension insurance */ pensionInsurance?: PensionInsurance | null; /** Occupational accident insurance */ accidentInsurance?: AccidentInsurance | null; /** Insurance exceptions If the Type of exception to insurance = 11 (Voluntary earnings-related pension) has been specified for the income earner, the values 1, 3, 6 or 7 should not be specified for the Type of exception to insurance in the same report. If the "Action type" is "Replacement report", the data should match that of the report’s previous version. */ insuranceExceptions?: ExceptionCode[] | null; /** International situations */ internationalData?: InternationalData | null; incomeEarnerOther?: IncomeEarnerOther | null; } /** Income type details */ export interface Transaction { /** General income type details */ transactionBasic?: TransactionBasic | null; /** Insurance information */ insuranceData?: TransactionInclusion[] | null; /** Earnings periods */ earningPeriods?: EarningPeriod[] | null; /** Unit of the wages */ unitWages?: UnitWage[] | null; /** Car benefit */ carBenefit?: CarBenefit | null; /** Meal benefit */ mealBenefit?: MealBenefit | null; /** Other fringe benefit */ otherBenefit?: BenefitCode[] | null; /** Seafarer's income */ sailorIncome?: SailorIncome | null; /** Additional details on recovery */ recoveryData?: RecoveryData | null; /** Daily allowance */ dailyAllowance?: AllowanceCode[] | null; /** Kilometre allowance */ kmAllowance?: KmAllowance | null; /** Six-month rule */ sixMonthRule?: SixMonthRule | null; } /** Details on foreign leased workforce */ export interface ForeignLeasedWork { /** Representative */ representative?: Representative | null; /** Estimated pay amount Mandatory data if a form for work abroad where "Form type" is "Employee leasing notice" has been included in the report. The value must be greater than or equal to 0. */ estAmount?: number | null; /** Finnish employers */ finServiceRecipient?: FinServiceRecipient | null; } /** Stay periods in Finland */ export interface StayPeriodsInFinland { /** Report contains no stay periods in Finland */ noStayPeriods?: boolean | null; /** Stay periods */ period?: StayPeriod[] | null; } /** Work period in Finland */ export interface WorkPeriodInFinland { /** Start date The date must not be earlier than 1 January 1800. */ startDate?: string | null; /** End date The date must not be earlier than the "Start date". */ endDate?: string | null; /** Number of workdays in Finland The value must be a non-negative integer. */ workDays?: number | null; } /** Work country */ export interface WorkCountry { /** Code of country of work A two-character code inaccordance with the ISO3166 country codes.If the country isunknown, the value "99"is entered. */ workCountryCode?: string | null; /** Name of country of work Mandatory data if "Country code" is "99". */ workCountryName?: string | null; /** Districts of work */ workMunicipalities?: string[] | null; /** Address in country of work */ workCountryAddress?: WorkCountryAddress | null; /** Principal Mandatory data group, if a form for work abroad where "Form type" is "NT1" has been included in the report. */ serviceRecipient?: ServiceRecipient | null; /** Stay periods in country of work There may be several stay periods in the country of work. Mandatory data group, if a form for work abroad where "Form type" is "NT1" or "NT2" has been included in the report */ stayPeriodsAbroad?: StayPeriod[] | null; /** Work periods abroad Mandatory data group, if a form for work abroad where "Form type" is "NT2" has been included in the report. */ workPeriodsAbroad?: Period[] | null; /** Country of work has taxing right Mandatory data if a form for work abroad where "Form type" is "NT1" or "NT2" has been included in the report. */ taxingRight?: boolean | null; /** Pay burdens the result of the employer’s permanent establishment in the country of work Mandatory data if a form for work abroad where "Form type" is "NT1" or "NT2" has been included in the report. */ burdensResultOfPE?: boolean | null; /** Pay per month This data group may only be used if a form for work abroad, where "Form type" is "NT2", has been included in the report. */ wagePerMonth?: number | null; /** Other remunerations and benefits This data group may only be used if a form for work abroad, where "Form type" is "NT2", has been included in the report. */ remunerations?: RemunerationCode[] | null; } /** Absences If the details on the time period for reporting absences are specified in the data group, both the Start date of the time period for reporting absences and the End date of the time period for reporting absences data items must be specified. */ export interface Absence { /** Start date of the time period for reporting absences The date must not be earlier than 1 January 1800. */ absenceRepStartDate?: string | null; /** End date of the time period for reporting absences The "End date" may not be earlier than the "Start date". */ absenceRepEndDate?: string | null; /** Unpaid absence There may be several absence periods. */ unpaidAbsence?: UnpaidAbsence | null; /** Paid absence There may be several absence periods. */ paidAbsence?: PaidAbsence | null; } /** Basic income earner details */ export interface IncomeEarnerBasic { /** The income earner does not have a customer ID */ missingId?: boolean | null; /** Company name */ companyName?: string | null; /** Last name */ lastName?: string | null; /** First name */ firstName?: string | null; /** Date of birth */ birthDate?: string | null; /** Gender */ gender?: Gender | null; } /** Income earner's address */ export interface TypedAddress { /** Address type */ addressType?: AddressType | null; /** c/o */ co?: string | null; /** Street address If this data group is included, either "Street address" or "P.O. Box" must be specified.Both must not be entered. */ street?: string | null; /** P.O. Box If this data group is included, either "Street address" or "P.O. Box" must be specified.Both must not be entered. */ poBox?: string | null; /** Postal code */ postalCode?: string | null; /** City */ postOffice?: string | null; /** Country code A two-character code in accordance with the ISO 3166 country codes. If the country is unknown, the value "99" is entered. Mandatory data in the following cases: • No identifier where "Identifier type" is "Business ID" or "Finnish Personal Identification Number" has been specified in the "Income earner identifiers" data group. • The value of "The income earner does not have a customer ID" is "true". • The value of "Non-resident taxpayer" is "true". */ countryCode?: string | null; /** Country name Mandatory data if "Country code" is "99". */ countryName?: string | null; } /** Employment relationship data */ export interface Employment { /** Employed */ employed?: boolean | null; /** Employment type Mandatory data if a paid absence and the ‘Reimbursement application data’ data group for it are specified in the report, with 2 as the ‘Payment data type (Kela, family leave compensation). */ employmentCode?: EmploymentCode | null; /** Duration of employment */ termCode?: TermCode | null; /** Part-time % The value must be a non-negative decimal number with a maximum value of 100.00. */ partTime?: number | null; /** Regular agreed working hours per week The value must be a non-negative decimal number with a maximum value of 168.00. */ hoursPerWeek?: number | null; /** Forms of payment This data group is mandatory if a paid absence and the ‘Reimbursement application data’ data group for it are specified in the report, with 1 or 2 as the ‘Payment data type’. */ paymentTypes?: PaymentType[] | null; /** Employment period Mandatory data group, if "Pension provider code" is 20, 24, 25, 29 or 30. This data group is mandatory if a paid absence and the ‘Reimbursement application data’ data group for it are specified in the report, with 1 or 2 as the ‘Payment data type’. */ employmentPeriods?: Period[] | null; /** Termination of employment Mandatory data group, if "Time of employment" with an "End date" has been specified in the report, and the "Pension provider code" is 20, 30, 25, 24, 29 or 29. */ employmentEndings?: EmploymentEnding[] | null; } /** Occupational class or title */ export interface Profession { /** Type of occupational title or classification */ type?: ProfessionType | null; /** Occupational class or title identifier */ code?: string | null; /** Title (free text) */ title?: string | null; } /** Grounds for registration An income earner can have several grounds for registration but only one value in accordance with the “Type of registration grounds” data item. */ export interface EmploymentReg { /** Type of registration grounds */ type?: EmploymentRegType | null; /** Registration grounds identifier If "Type of registration grounds" is "Keva's grounds for registration", the codeset must include the combination("Registration grounds identifier", "Pension provider code"), and must be valid on the date that is the value of "Payment date or other report date". If "Type of registration grounds" is "Keva's grounds for registration", and the codeset requires the use of a specific "Occupational title or classification identifier" in connection with the specified "Registration grounds identifier" value, the codeset must include the combination("Registration grounds identifier", "Pension provider code") and must be valid on the date that is the value of "Payment date or other report date". If "Type of registration grounds" has some other value, it must be included in the specified codeset.If the codeset includes a validity period, the value must be valid on the date that is the value of "Payment date or other report date" in the specified codeset */ code?: string | null; } /** Place of business */ export interface PlaceOfBusiness { /** Place of business code */ code?: string | null; /** Street address */ street?: string | null; /** Postal code */ postalCode?: string | null; /** City */ postOffice?: string | null; /** Country code */ countryCode?: string | null; /** Country name */ countryName?: string | null; } /** Earnings-related pension insurance This data group is mandatory, except in the following situations: a) The report contains no income types that require specifying a value for "Earnings-related pension insurance information". This takes account of whether the income type is, by default, income subject to earningsrelated pension insurance(see the document, "Wages – Codes – Income types") and also whether the income type in the report is exceptionally subject to earnings-related pension insurance.In the report, the exceptions to the income type's default values are specified using the "Type of insurance information" and "Grounds for insurance contribution" entries. If "Type of insurance information" is "Subject to earnings-related pension insurance contribution" and the corresponding "Grounds for insurance contribution" value is "true"/"false", the income type in the report is/is not income subject to earnings-related pension insurance. b) "Acts as a substitute payer" is "true". c) "Type of exception to insurance" is one of the following: • No obligation to provide insurance(earnings-related pension, health, unemployment or accident and occupational disease insurance) • No obligation to provide insurance(earnings-related pension insurance) • Not subject to Finnish social security (earnings-related pension, health, unemployment or accident and occupational disease insurance) • Not subject to Finnish social security(earnings-related pension insurance) Exception: Although the data group is not mandatory under items a to c, it must always be included if "Type of exception to insurance" is "Voluntary insurance in Finland(earnings-related pension insurance)". Employee's earnings-related pension insurance If "Employee's earnings-related pension insurance" is specified as the value of "Earnings-related pension insurance information", values must also be specified for "Pension provider code" and "Pension policy number". Pension insurance for farmers(MYEL) If "Pension insurance for farmers (MYEL)" is specified as the value of "Earningsrelated pension insurance information", values must not be specified for "Pension provider code" or "Pension policy number". Pension insurance for the self-employed(YEL) If "Pension insurance for the self-employed (YEL)" is specified as the value of "Earnings-related pension insurance information", values must not be specified for "Pension provider code" or "Pension policy number". If the "Action type" is "Replacement report", the data should match that of the report’s previous version. */ export interface PensionInsurance { /** Earnings-related pension insurance information */ pensionActCode?: PensionActCode | null; /** Pension provider code */ pensionProvIdCode?: PensionProvIdCode | null; /** Pension policy number */ pensionPolicyNo?: string | null; } /** Occupational accident insurance If the "Action type" is "Replacement report", the data should match that of the report’s previous version. */ export interface AccidentInsurance { /** Occupational accident insurance company identifier */ accInsProvId?: Id | null; /** Occupational accident insurance policy number */ accInsPolicyNo?: string | null; } /** International situations */ export interface InternationalData { /** Social security certificate */ postedCertCode?: InternationalDataPostedCertCode | null; /** Non-resident taxpayer If income type 412 or 362 is specified in the report, the value of the ‘Nonresident taxpayer’ data item must be ‘true’. */ nonResident?: boolean | null; /** Country code of country of residence Mandatory data, if "Non-resident taxpayer" is "true". */ nonResidentCountryCode?: string | null; /** Name of country of residence Mandatory data if "Country code" is "99". */ nonResidentCountryName?: string | null; /** Income subject to withholding */ subToWithhold?: boolean | null; /** Tax-treaty country code Mandatory data if the Type of additional income earner data (IncomeEarnerType) = "Income earner did not stay longer than 183 days in Finland during the Tax-Treaty-defined sojourn period". This data can only be specified if the Type of additional income earner data is the above-mentioned value. The value must be valid on the date specified in the data item "Payment date or other report date". */ taxTreatyCountryCode?: string | null; /** Forms for work abroad */ workForm?: WorkForm[] | null; } export interface IncomeEarnerOther { /** Applicable collective agreement The value must be valid on the date specified in the data item "Payment date or other report date". */ cbaCode?: number | null; /** Additional income earner details */ incomeEarnerTypes?: IncomeEarnerType[] | null; /** Payment data */ payments?: Payment[] | null; } /** General details on the income type */ export interface TransactionBasic { /** Income type code If the ‘Income type code’ is 412 or 362, the value of the ‘Non-resident taxpayer’ data item must be ‘true’. If the ‘Income type code’ is 334 (Meal benefit) and the value of the ‘Reimbursement for a meal benefit corresponds to taxable value(TaxValue)’ is ‘true’, and none of the income types 301, 302, 317, 330 or 343 have been specified in the report, the income type 407 must not be specified. Income type 407 must not be specified if none of the following income types have been specified in the report: 301, 302, 317, 330 or 334. Income type 419 must not be specified if none of the following income types have been specified in the report: 101−106, 201−207, 209-227, 230−239, 308, 315, 316, 320, 326, 336, 339, 351, 353−355, 359. */ transactionCode?: number | null; /** Amount If ‘Income type code’ is 102, 103, 104, 105 or 106, the value must not be greaterthan the amount reported for income type 101. The Wages – Codes – Income types document lists the income types for which anegative Amount can be specified.A negative Amount must not be specified forother income types. If the value of the ‘Reimbursement for a meal benefit corresponds to taxablevalue (TaxValue)’ data item specified for income type 334 is ‘true’, the amountis not mandatory. If ‘Income type code’ is 401 (Compensation collected for car benefit), theamount must not be greater than the amount reported using income type 304(Car benefit). If ‘Income type code’ is 407 (Reimbursement collected for other fringe benefits),the value must not be greater than the amount reported using one of thefollowing income types or the total amount reported using some of thefollowing income types: 301 (Housing benefit), 302 (Interest benefit for ahousing loan), 317 (Other fringe benefit), 330 (Telephone benefit) and 334(Meal benefit). If ‘Income type code’ is 415 (Reimbursement for employer-subsidisedcommuter ticket), the amount must not be higher than the amount reportedusing income type 341 (Employer-subsidised commuter ticket, tax-exemptshare) or income type 342 (Employer-subsidised commuter ticket, taxableshare), or the total amount reported using these income types. If ‘Income type code’ is 419 (Deduction before withholding), the value must notbe greater than the amount reported using one of the following income typesor the total amount reported using some of the following income types:101−106, 201−207, 209-227, 230−239, 308, 315, 316, 320, 326, 336, 339, 351,353−355, 359. */ amount?: number | null; /** Payment other than money */ noMoney?: boolean | null; /** One-off remuneration */ oneOff?: boolean | null; /** Unjust enrichment The Wages – Codes – Income types document lists the income types for which the ‘Unjust enrichment’ data item must not be specified. */ unjustEnrichment?: boolean | null; /** Recovery The Wages – Codes – Income types document lists the income types for which the ‘Recovery’ data item must not be specified. */ recovery?: boolean | null; } /** Insurance information */ export interface TransactionInclusion { /** Insurance information type */ insuranceCode?: InsuranceCode | null; /** Grounds for insurance contribution */ included?: boolean | null; } /** Earnings period */ export interface EarningPeriod { /** Start date The date must not be earlier than 1 January 1800 */ startDate?: string | null; /** End date The date must not be earlier than the "Start date". */ endDate?: string | null; } /** Unit wage */ export interface UnitWage { /** Unit price The value must be non-negative. */ unitPrice?: number | null; /** Number of units The value must be non-negative. */ unitAmount?: number | null; /** Unit */ unitCode?: WageUnitCode | null; } /** Car benefit Mandatory data group, if the income type is "Car benefit". This data group may not be used with other income types. */ export interface CarBenefit { /** Car benefit type */ carBenefitCode?: CarBenefitCode | null; /** Car age group */ ageGroupCode?: AgeGroupCode | null; /** Odometer reading The value must be greater than or equal to 0 */ kilometers?: number | null; /** Car emissions value The car emissions value must be greater than or equal to 0, and smaller than or equal to 100. The car emissions value can only be reported if the payment date or other reporting date is in 2022–2025. */ emissionsValue?: number | null; } /** Meal benefit */ export interface MealBenefit { /** Reimbursement for a meal benefit corresponds to taxable value */ taxValue?: boolean | null; } /** Seafarer's income */ export interface SailorIncome { /** Payment is seafarer's income */ sailorIncomeProp?: boolean | null; /** Time of cross trade Allowed valus: 1 - 12 */ crossTradeTime?: number | null; /** Withdrawal period */ withdrawalPeriod?: WithdrawalPeriod | null; } /** Additional details on recovery */ export interface RecoveryData { /** Recovery date The date must not be earlier than 1 January 1800. */ recoveryDate?: string | null; /** Withholding from the recovered amount */ withhold?: number | null; /** Tax at source from the recovered amount */ taxAtSource?: number | null; /** Original payment periods */ origPaymentPeriods?: OrigPaymentPeriod[] | null; } /** Kilometre allowance */ export interface KmAllowance { /** Number of kilometres */ kilometers?: number | null; } /** Six-month rule */ export interface SixMonthRule { /** Six-month rule is applicable */ applicable?: boolean | null; /** Country code A two-character code in accordance with the ISO 3166 country codes. If the country is unknown, the value "99" is entered. Mandatory data, if "Six-month rule is applicable" is "true". */ countryCode?: string | null; /** Country name Mandatory data if "Country code" is "99". */ countryName?: string | null; } /** Representative */ export interface Representative { /** Representative identifiers */ representativeIds?: Id[] | null; /** Representative's name */ name?: string | null; /** Representative's address */ address?: Address | null; /** Representative acts as submitter */ representativeReports?: boolean | null; } /** Finnish employer Mandatory data group if a form for work abroad where "Form type" is "Employee leasing notice" has been included in the report. */ export interface FinServiceRecipient { /** Employer identifiers */ finServiceRecipientIds?: Id[] | null; } /** Stay period */ export interface StayPeriod { /** Start date The date must not be earlier than 1 January 1800. */ startDate?: string | null; /** End date The date must not be earlier than the "Start date". */ endDate?: string | null; } /** Address in country of work */ export interface WorkCountryAddress { /** c/o */ co?: string | null; /** Street address Either "Street address" or "P.O. Box" must be specified in this data group. Both must not be entered. */ street?: string | null; /** P.O. Box Either "Street address" or "P.O. Box" must be specified in this data group. Both must not be entered. */ poBox?: string | null; /** Postal code */ postalCode?: string | null; /** City */ postOffice?: string | null; /** Country code A two-character code in accordance with the ISO 3166 country codes. If the country is unknown, the value "99" is entered. */ countryCode?: string | null; /** Country name Mandatory data if "Country code" is "99" */ countryName?: string | null; } /** Principal */ export interface ServiceRecipient { /** Principal identifiers */ serviceRecipientIds?: Id[] | null; /** Principal's name */ name?: string | null; /** Principal's address */ serviceRecipientAddress?: ServiceRecipientAddress | null; } /** Time of employment */ export interface Period { /** Start date The date must not be more than 45 days later than the current date. The date must not be earlier than 1 January 1800. If a paid absence and the ‘Reimbursement application data’ data group for it are specified in the report, with 1 or 2 as the ‘Payment data type’, the ‘Start date’ of the period of employment must be no earlier than the ‘Start date’ of the period of paid absence in question. */ startDate?: string | null; /** End date The date must not be earlier than the "Start date". */ endDate?: string | null; } /** Unpaid absence */ export interface UnpaidAbsence { /** Absence periods */ unpaidAbsencePeriods?: UnpaidAbsencePeriod[] | null; } /** Paid absence */ export interface PaidAbsence { /** Absence periods */ paidAbsencePeriods?: PaidAbsencePeriod[] | null; } /** Reason for the termination of employment An income earner can have several reasons for the termination of employment but only one value in accordance with the “Reason codes for termination of employment” data item. */ export interface EmploymentEnding { /** Reason codes for termination of employment If the value is "Keva codes", the "Pension provider code" must be 20, 30, 25, 24 or 29. If the value is "Bank of Finland codes", the "Pension provider code" must be 27. */ type?: EmploymentEndingType | null; /** Reason code for termination of employment If "Keva codes" are used for the reason codes, the codeset must include the combination("Reason code for the termination of employment", "Pension provider code") and it must be valid on the date that is the value of "Payment date or other report date". If some other reason codeset is used, it must include this data.If the codeset includes a validity period, the value must be valid on the date that is the value of "Payment date or other report date" in the specified codeset. */ code?: string | null; } /** Payment data */ export interface Payment { /** Payment data type */ paymentType?: RefPaymentType | null; /** Payment's reference number Mandatory data, if "Payment data type" is "Earnings-related pension provider". */ paymentRef?: string | null; /** Payment specifier */ paymentSpecifier?: string | null; } /** Withdrawal period */ export interface WithdrawalPeriod { /** Start date The date must not be earlier than 1 January 1800. */ startDate?: string | null; /** End date The date must not be earlier than the "Start date". */ endDate?: string | null; } /** Original payment period */ export interface OrigPaymentPeriod { /** Payment date The date must not be earlier than 1 January 1800. The date must not be later than that of ‘Payment date or other report date’ on the report. */ paymentDate?: string | null; /** Start date The date must not be earlier than 1 January 1800. */ startDate?: string | null; /** End date The "End date" may not be earlier than the "Start date". */ endDate?: string | null; } export interface ServiceRecipientAddress { /** c/o */ co?: string | null; /** Street address */ street?: string | null; /** P.O. Box */ poBox?: string | null; /** Postal code */ postalCode?: string | null; /** City */ postOffice?: string | null; /** Country code */ countryCode?: string | null; /** Country name */ countryName?: string | null; } /** Absence period */ export interface UnpaidAbsencePeriod { /** Start date The date must not be earlier than 1 January 1800. */ startDate?: string | null; /** End date The "End date" may not be earlier than the "Start date". */ endDate?: string | null; /** Number of days of absence The value must be a non-negative number. */ absenceDays?: number | null; /** Cause of absence */ causeCode?: UnpaidAbsenceCauseCode | null; } /** Absence period */ export interface PaidAbsencePeriod { /** Start date The date must not be earlier than 1 January 1800. */ startDate?: string | null; /** End date The "End date" may not be earlier than the "Start date” Mandatory data if 1 or 2 was specified as the ‘Payment data type’ in the ‘Reimbursement application data’ data group. The time period between the ‘Start date’ and ‘End date’ of the absence period must not overlap by a single day with the absence period of another paid absence on the same report (‘Start date’ – ‘End date’). The time period between the ‘Start date’ and ‘End date’ of the absence period must not overlap by a single day with the absence period of an unpaid absence in the same report(‘Start date’ – ‘End date’). */ endDate?: string | null; /** Number of days of absence */ absenceDays?: number | null; /** Absence continues, until when "Absence continues, until when" may not be earlier than "Start date". */ absenceUntil?: string | null; /** Cause of absence */ causeCode?: PaidAbsenceCauseCode | null; /** Pay for period of paid absence The value must be a non-negative number. */ amount?: number | null; /** Reimbursement application data */ reimbApp?: ReimbPayment[] | null; /** Additional reimbursement application data You can enter freeform text as additional information. This information may be entered only when the ‘Reimbursement application data’ data group has been specified in connection with the absence period.In other situations, the additional information must not be specified. */ paidAbsencePeriodInfo?: string | null; } /** Payment data */ export interface ReimbPayment { /** Payment data type If ‘Payment data type’ = 1 (Kela, daily allowance application), the ‘Reason for unpaid absence’ must only be one of the following: 1 (illness), 3 (maternity, paternity or parental leave), 4 (special maternity leave) or 5 (rehabilitation). If ‘Payment data type’ = 2 (Kela, family leave compensation), the ‘Reason for unpaid absence’ must be 3 (maternity, paternity or parental leave). */ paymentType?: ReimbPaymentType | null; /** Payment's reference number */ paymentRef?: string | null; /** Payment specifier */ paymentSpecifier?: string | null; } /** Api Schedule Object */ export interface IrApiScheduleObject { /** Id of the object in the data storage to schedule */ id?: string | null; /** The date when the object was created. */ startAt?: string | null; /** Schedule action to take. */ action?: IrScheduleAction | null; /** User context information. */ userContext?: UserContext | null; } /** Current user context. */ export interface UserContext { /** Owner for this data */ owner?: string | null; /** Owner ID for this data */ ownerId?: string | null; /** Partner ID for this data */ partnerId?: string | null; /** Login partner ID for this data */ loginPartnerId?: string | null; /** Credential ID for this data */ credentialId?: string | null; /** Users scope, currently only 'admin' supported. */ scope?: string | null; } /** Version information for the API object. */ export interface VersionInfo { /** Identifier for the version. */ versionId?: string | null; /** Operation which created the version. */ operation?: string | null; /** Date and time when the version was created. */ date?: string | null; /** User account who created the version. */ userAccount?: Avatar | null; } export interface PageResultOfEarningsPaymentListItem { items?: EarningsPaymentListItem[] | null; nextPageLink?: string | null; count?: number | null; } /** Represents a single item in a list of earnings payments in the user interface. It contains all essential information of the report and is basis for searching, filtering and sorting. */ export interface EarningsPaymentListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: EarningsPaymentReportStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: EarningsPaymentData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Object that represents a Salaxy account. */ export interface AccountInIndex { /** Avatar for the account */ avatar?: Avatar | null; /** Official id of the person or company. */ officialId?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; } /** Earnings payment specific business data for index. */ export interface EarningsPaymentData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Current status in the Incomes Register. */ irStatus?: ReportLogEventType | null; /** Date and time for the next scheduled delivery of the report. */ scheduledFor?: string | null; /** Date and time for the first delivery of the report. */ firstDeliveredAt?: string | null; /** Date and time for the last delivery of the report. */ lastDeliveredAt?: string | null; /** Partner id for invoicing. */ partnerId?: string | null; /** Service Model id for invoicing. */ serviceModelId?: string | null; /** Payment channel for invoicing. */ paymentChannel?: EarningsPaymentDataPaymentChannel | null; /** Application id for invoicing. */ applicationId?: string | null; /** Assumed earnings payment report date for the report. */ reportDate?: string | null; } export interface EarningsPaymentNotification { /** Taken schedule action. */ action?: ReportLogEventType | null; /** Status response for the sent request. */ statusResponse?: StatusResponse | null; /** Record data */ deliveryData?: DeliveryData | null; /** Identifier of the object in the data storage. */ id?: string | null; } /** Processing feedback data */ export interface StatusResponse { /** Record status */ deliveryDataStatus?: StatusResponseDeliveryDataStatus | null; /** Incomes Register record reference If the record has been saved in the Incomes Register, the reference assigned to the record by the Incomes Register is delivered in this element.The Incomes Register record reference uniquely identifies all records submitted to the Incomes Register. If the record has not been saved in the Incomes Register, this data is blank. */ irDeliveryId?: string | null; /** Approved items The valid items submitted in the record are returned in this data group. */ validItems?: Item[] | null; /** Rejected items The invalid items submitted in the record and rejected on the basis of itemspecific errors are returned in this data group. If all items in the record are rejected on the basis of record-level errors, the rejected items are not returned in this data group. */ invalidItems?: Item[] | null; /** Message-level errors This data group is used to return technical and authorisation errors. If message-level errors are detected in a record submitted to the Incomes Register, the record is not processed further in the Incomes Register. In addition to message-level errors, the processing feedback cannot therefore contain any other errors(record-level errors, and rejected items and the errors related to them). */ messageErrors?: ErrorInfo[] | null; /** Record-level errors This data group is used to return errors related to the contents of record-level data. Record-level errors apply to all items in the record.If there are record-level errors in the record, all items of the record are invalid and will not be saved in the Incomes Register.In such a case, the invalid items are not separately delivered in the "Rejected items" data group. */ deliveryErrors?: ErrorInfo[] | null; /** Incomes Register message reference */ irResponseId?: string | null; /** Processing feedback timestamp */ irResponseTimestamp?: string | null; } export interface Item { /** Record submitter's reference This element always appears in the data of an approved item. */ itemId?: string | null; /** Incomes Register reference This element always appears in the data of an approved item. */ irItemId?: string | null; /** Report version number The Incomes Register assigns version number 1 to a new report. The version number of a substitute report is the number of the substituted version + 1. */ itemVersion?: number | null; /** Item Version specified */ itemVersionSpecified?: boolean | null; /** Errors */ itemErrors?: ErrorInfo[] | null; } /** Error information */ export interface ErrorInfo { /** Error code */ errorCode?: string | null; /** Error code description */ errorMessage?: string | null; /** Error details */ errorDetails?: string | null; } /** ActionCode enumeration */ export enum ActionCode { NewReport = "newReport", ReplacementReport = "replacementReport" } /** AddressType enumeration */ export enum AddressType { AddressInHomeCountry = "addressInHomeCountry", AddressInTheCountryOfWork = "addressInTheCountryOfWork" } /** AgeGroupCode enumeration */ export enum AgeGroupCode { A = "a", B = "b", C = "c", U = "u" } /** AllowanceCode enumeration */ export enum AllowanceCode { MealAllowance = "mealAllowance", PartialDailyAllowance = "partialDailyAllowance", FullDailyAllowance = "fullDailyAllowance", InternationalDailyAllowance = "internationalDailyAllowance", TaxExemptReimbursementsAbroad = "taxExemptReimbursementsAbroad" } /** ApiValidationErrorType enumeration */ export enum ApiValidationErrorType { General = "general", Required = "required", Invalid = "invalid", Warning = "warning" } /** BenefitCode enumeration */ export enum BenefitCode { AccommodationBenefit = "accommodationBenefit", TelephoneBenefit = "telephoneBenefit", MealBenefit = "mealBenefit", OtherBenefits = "otherBenefits" } /** CalcGroup enumeration */ export enum CalcGroup { Undefined = "undefined", BaseSalary = "baseSalary", SalaryAdditions = "salaryAdditions", Benefits = "benefits", Expenses = "expenses", Deductions = "deductions", OtherNoPayment = "otherNoPayment", Totals = "totals", Disabled = "disabled" } /** CarBenefitCode enumeration */ export enum CarBenefitCode { LimitedCarBenefit = "limitedCarBenefit", FullCarBenefit = "fullCarBenefit" } /** DeliveryDataType enumeration */ export enum DeliveryDataType { EarningsPaymentReports = "earningsPaymentReports", EmployersSeparateReports = "employersSeparateReports", BenefitsPaymentReports = "benefitsPaymentReports", RecordSubscription = "recordSubscription", Messages = "messages", CancellationOfEarningsPaymentReports = "cancellationOfEarningsPaymentReports", CancellationOfEmployersSeparateReports = "cancellationOfEmployersSeparateReports", CancellationOfBenefitsPaymentReports = "cancellationOfBenefitsPaymentReports", CancellationOfARecordSubscription = "cancellationOfARecordSubscription", CancellationOfARecordContainingEarningsPaymentReports = "cancellationOfARecordContainingEarningsPaymentReports", CancellationOfARecordContainingEmployersSeparateReports = "cancellationOfARecordContainingEmployersSeparateReports", CancellationOfARecordContainingBenefitsPaymentReports = "cancellationOfARecordContainingBenefitsPaymentReports", CancellationOfARecordContainingARecordSubscription = "cancellationOfARecordContainingARecordSubscription" } /** EarningsPaymentReportStatus enumeration */ export enum EarningsPaymentReportStatus { New = "new", Scheduled = "scheduled", Succeeded = "succeeded", Canceled = "canceled", Error = "error", Invalid = "invalid" } /** EmploymentCode enumeration */ export enum EmploymentCode { FullTime = "fullTime", PartTime = "partTime", NotAvailable = "notAvailable" } /** EmploymentEndingCode enumeration */ export enum EmploymentEndingCode { EmployeesResignation = "employeesResignation", Other = "other", TerminationGroundsRelatedToEmployeesPerson = "terminationGroundsRelatedToEmployeesPerson", FinancialAndProductionRelatedGrounds = "financialAndProductionRelatedGrounds", JointAgreement = "jointAgreement", Retirement = "retirement", TerminationOfaFixedTermEmployment = "terminationOfaFixedTermEmployment" } /** EmploymentEndingType enumeration */ export enum EmploymentEndingType { KevaCodes = "kevaCodes", BankOfFinlandCodes = "bankOfFinlandCodes", IncomesRegisterCodes = "incomesRegisterCodes" } /** EmploymentRegType enumeration */ export enum EmploymentRegType { KevasGroundsForRegistration = "kevasGroundsForRegistration", BankOfFinlandsGroundsForRegistration = "bankOfFinlandsGroundsForRegistration" } /** ExceptionCode enumeration */ export enum ExceptionCode { NoObligationToSocialInsurance = "noObligationToSocialInsurance", NoObligationToHealthInsurance = "noObligationToHealthInsurance", NoObligationToEarningsRelatedPensionInsurance = "noObligationToEarningsRelatedPensionInsurance", NoObligationToAccidentAndOccupationalDiseaseInsurance = "noObligationToAccidentAndOccupationalDiseaseInsurance", NoObligationToUnemploymentInsurance = "noObligationToUnemploymentInsurance", NotSubjectToSocialInsurance = "notSubjectToSocialInsurance", NotSubjectToEarningsRelatedPensionInsurance = "notSubjectToEarningsRelatedPensionInsurance", NotSubjectToAccidentAndOccupationalDiseaseInsurance = "notSubjectToAccidentAndOccupationalDiseaseInsurance", NotSubjectToUnemploymentInsurance = "notSubjectToUnemploymentInsurance", NotSubjectToHealthInsurance = "notSubjectToHealthInsurance", VoluntaryEarningsRelatedPensionInsurance = "voluntaryEarningsRelatedPensionInsurance" } /** FaultyControl enumeration */ export enum FaultyControl { OnlyInvalidItems = "onlyInvalidItems", EntireRecordIsRejected = "entireRecordIsRejected" } /** Gender enumeration */ export enum Gender { Male = "male", Female = "female" } /** IdType enumeration */ export enum IdType { BusinessId = "businessId", PersonalIdentificationNumber = "personalIdentificationNumber", Vat = "vat", Giin = "giin", TaxIdentificationNumber = "taxIdentificationNumber", FinnishTradeRegistrationNumber = "finnishTradeRegistrationNumber", ForeignBusinessRegistrationNumber = "foreignBusinessRegistrationNumber", ForeignPersonalIdentificationNumber = "foreignPersonalIdentificationNumber", Other = "other" } /** IncomeEarnerType enumeration */ export enum IncomeEarnerType { EmployedByStateEmploymentFund = "employedByStateEmploymentFund", JointOwnerWithPayer = "jointOwnerWithPayer", PartialOwner = "partialOwner", KeyEmployee = "keyEmployee", LeasedEmployeeLivingAbroad = "leasedEmployeeLivingAbroad", PersonWorkingInFrontierDistrict = "personWorkingInFrontierDistrict", PersonWorkingAbroad = "personWorkingAbroad", Athlete = "athlete", PerformingArtist = "performingArtist", RestrictedPeriodInFinland = "restrictedPeriodInFinland", NetOfTaxContract = "netOfTaxContract", Organization = "organization", PersonWorkingOnAlandFerry = "personWorkingOnAlandFerry", EntrepreneurOrFarmerNoPensionRequired = "entrepreneurOrFarmerNoPensionRequired", DimplomaticMission = "dimplomaticMission", Eppo = "eppo", LightEntrepreneur = "lightEntrepreneur" } /** IrScheduleAction enumeration */ export enum IrScheduleAction { Send = "send", Cancel = "cancel" } /** InsuranceCode enumeration */ export enum InsuranceCode { SubjectToSocialInsuranceContributions = "subjectToSocialInsuranceContributions", SubjectToEarningsRelatedPensionInsuranceContribution = "subjectToEarningsRelatedPensionInsuranceContribution", SubjectToHealthInsuranceContribution = "subjectToHealthInsuranceContribution", SubjectToUnemploymentInsuranceContribution = "subjectToUnemploymentInsuranceContribution", SubjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution = "subjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution" } /** Language enumeration */ export enum Language { Fi = "fi", Sv = "sv", En = "en" } /** PaidAbsenceCauseCode enumeration */ export enum PaidAbsenceCauseCode { Illness = "illness", PartTimeSickLeave = "partTimeSickLeave", ParentalLeave = "parentalLeave", SpecialMaternityLeave = "specialMaternityLeave", Rehabilitation = "rehabilitation", ChildIllness = "childIllness", PartTimeChildCareLeave = "partTimeChildCareLeave", Training = "training", LeaveOfAbsence = "leaveOfAbsence", MilitaryRefresherTraining = "militaryRefresherTraining", MidWeekHoliday = "midWeekHoliday", AccruedHoliday = "accruedHoliday", OccupationalAccident = "occupationalAccident", AnnualLeave = "annualLeave", PartTimeAbsenceDueToRehabilitation = "partTimeAbsenceDueToRehabilitation", Other = "other" } /** PayerSubOrgType enumeration */ export enum PayerSubOrgType { KevasSubmitterCodes = "kevasSubmitterCodes", PayersOwnCodes = "payersOwnCodes", GovernmentAgencyIdentifier = "governmentAgencyIdentifier" } /** PayerType enumeration */ export enum PayerType { PublicSector = "publicSector", Household = "household", TemporaryEmployer = "temporaryEmployer", ForeignEmployer = "foreignEmployer", State = "state", UnincorporatedStateEnterpriseOrGovernmentalInstitution = "unincorporatedStateEnterpriseOrGovernmentalInstitution", SpecialisedAgency = "specialisedAgency", ForeignGroupCompany = "foreignGroupCompany", PoolOfHouseholdEmployers = "poolOfHouseholdEmployers" } /** PaymentType enumeration */ export enum PaymentType { Monthly = "monthly", Hourly = "hourly", ContractPay = "contractPay" } /** PensionActCode enumeration */ export enum PensionActCode { EmployeesEarningsRelatedPensionInsurance = "employeesEarningsRelatedPensionInsurance", PensionInsuranceForFarmers = "pensionInsuranceForFarmers", PensionInsuranceForTheSelfEmployed = "pensionInsuranceForTheSelfEmployed" } /** PensionProvIdCode enumeration */ export enum PensionProvIdCode { None = "none", FinnishCentreForPensions = "finnishCentreForPensions", ClergyOfTheOrthodoxChurch = "clergyOfTheOrthodoxChurch", KevaMemberOrganisations = "kevaMemberOrganisations", KevaÅlandLandskapsregeringsPensionssystem = "keva\u00C5landLandskapsregeringsPensionssystem", KevaChurch = "kevaChurch", BankOfFinland = "bankOfFinland", KevaKelaEmploymentPensions = "kevaKelaEmploymentPensions", KevaState = "kevaState", Seafarers = "seafarers", Farmers = "farmers", Alandia = "alandia", Ilmarinen = "ilmarinen", Elo = "elo", Varma = "varma", Veritas = "veritas", Etera = "etera", UPM = "uPM", Sanoma = "sanoma", Sandvik = "sandvik", Kontino = "kontino", Yleisradio = "yleisradio", ABB = "aBB", LFashionGroup = "lFashionGroup", Honeywell = "honeywell", Telia = "telia", YaraSuomi = "yaraSuomi", Orion = "orion", Valio = "valio", OP = "oP", Verso = "verso", Apteekkien = "apteekkien", Viabek = "viabek", Reka = "reka" } /** ProfessionType enumeration */ export enum ProfessionType { StatisticsFinland = "statisticsFinland", Keva = "keva", BankOfFinland = "bankOfFinland", Trafi = "trafi" } /** RefPaymentType enumeration */ export enum RefPaymentType { EarningsRelatedPensionProvider = "earningsRelatedPensionProvider" } /** ReimbPaymentType enumeration */ export enum ReimbPaymentType { KelaDailyAllowanceApplication = "kelaDailyAllowanceApplication", KelaFamilyLeaveCompensation = "kelaFamilyLeaveCompensation" } /** RemunerationCode enumeration */ export enum RemunerationCode { DailyAllowance = "dailyAllowance", AccommodationBenefit = "accommodationBenefit", CarBenefit = "carBenefit", OtherBenefit = "otherBenefit" } /** ReportLogEventType enumeration */ export enum ReportLogEventType { Undefined = "undefined", Sent = "sent", Canceled = "canceled", Error = "error" } /** ResponsibilityCode enumeration */ export enum ResponsibilityCode { ContentIssues = "contentIssues", TechnicalIssues = "technicalIssues" } /** TermCode enumeration */ export enum TermCode { UntilFurtherNotice = "untilFurtherNotice", FixedTerm = "fixedTerm" } /** TransactionCode enumeration */ export enum TransactionCode { Unknown = "unknown", Ignored = "ignored", TimeRatePay = "timeRatePay", InitiativeFee = "initiativeFee", BonusPay = "bonusPay", ComplementaryWagePaidDuringBenefitPeriod = "complementaryWagePaidDuringBenefitPeriod", EmergencyWorkCompensation = "emergencyWorkCompensation", EveningWorkCompensation = "eveningWorkCompensation", EveningShiftAllowance = "eveningShiftAllowance", NoticePeriodCompensation = "noticePeriodCompensation", KilometreAllowanceTaxable = "kilometreAllowanceTaxable", MeetingFee = "meetingFee", SaturdayPay = "saturdayPay", ExtraWorkPremium = "extraWorkPremium", HolidayBonus = "holidayBonus", LectureFee = "lectureFee", CompensationForTrustPosition = "compensationForTrustPosition", OtherCompensation = "otherCompensation", WaitingTimeCompensation = "waitingTimeCompensation", WorkingConditionCompensation = "workingConditionCompensation", PartialPayDuringSickLeave = "partialPayDuringSickLeave", Commission = "commission", SundayWorkCompensation = "sundayWorkCompensation", BenefitArisingFromSyntheticOption = "benefitArisingFromSyntheticOption", PerformanceBonus = "performanceBonus", MonetaryCompensationFromWorkingTimeBank = "monetaryCompensationFromWorkingTimeBank", CompensationForAccruedTimeOff = "compensationForAccruedTimeOff", ShareIssueForEmployees = "shareIssueForEmployees", ContractPay = "contractPay", DamagesInConjunctionWithTermination = "damagesInConjunctionWithTermination", StandByCompensation = "standByCompensation", VoluntaryCompensationInConjunctionWithTermination = "voluntaryCompensationInConjunctionWithTermination", WeeklyRestCompensation = "weeklyRestCompensation", ProfitSharingBonus = "profitSharingBonus", AnnualHolidayCompensation = "annualHolidayCompensation", OvertimeCompensation = "overtimeCompensation", NightWorkAllowance = "nightWorkAllowance", NightShiftCompensation = "nightShiftCompensation", OtherRegularCompensation = "otherRegularCompensation", CompensationForUnusedCompensatoryLeave = "compensationForUnusedCompensatoryLeave", AccommodationBenefit = "accommodationBenefit", InterestBenefitForHousingLoan = "interestBenefitForHousingLoan", MealAllowance = "mealAllowance", CarBenefit = "carBenefit", CompensationForGoverningBodyMembership = "compensationForGoverningBodyMembership", ShareOfReserveDrawnFromPersonnelFund = "shareOfReserveDrawnFromPersonnelFund", MonetaryGiftForEmployees = "monetaryGiftForEmployees", KilometreAllowanceTaxExempt = "kilometreAllowanceTaxExempt", TreatmentFeeForMunicipalVeterinarian = "treatmentFeeForMunicipalVeterinarian", CompensationForUseEarnedIncome = "compensationForUseEarnedIncome", CompensationForUseCapitalIncome = "compensationForUseCapitalIncome", OtherTaxableBenefitForEmployees = "otherTaxableBenefitForEmployees", OtherTaxableIncomeDeemedEarnedIncome = "otherTaxableIncomeDeemedEarnedIncome", OtherFringeBenefit = "otherFringeBenefit", KinshipCarersFee = "kinshipCarersFee", StockOptions = "stockOptions", WagesPaidBySubstitutePayerIncludingSocialInsurance = "wagesPaidBySubstitutePayerIncludingSocialInsurance", WagesPaidBySubstitutePayerIncludingEarningsRelatedPensionInsurance = "wagesPaidBySubstitutePayerIncludingEarningsRelatedPensionInsurance", WagesPaidBySubstitutePayerIncludingUnemploymentInsurance = "wagesPaidBySubstitutePayerIncludingUnemploymentInsurance", WagesPaidBySubstitutePayerIncludingAccidentAndOccupationalDiseaseInsurance = "wagesPaidBySubstitutePayerIncludingAccidentAndOccupationalDiseaseInsurance", WagesPaidBySubstitutePayerIncludingHealthInsurance = "wagesPaidBySubstitutePayerIncludingHealthInsurance", CompensationForEmployeeInvention = "compensationForEmployeeInvention", ReimbursementOfPrivateCaretakersExpenses = "reimbursementOfPrivateCaretakersExpenses", PrivateCaretakersFee = "privateCaretakersFee", ReimbursementOfFamilyDayCareProvidersExpenses = "reimbursementOfFamilyDayCareProvidersExpenses", TelephoneBenefit = "telephoneBenefit", DailyAllowance = "dailyAllowance", CapitalIncomePayment = "capitalIncomePayment", MealBenefit = "mealBenefit", ReimbursementOfCostsPaidToConciliator = "reimbursementOfCostsPaidToConciliator", NonWageCompensationForWork = "nonWageCompensationForWork", SupplementaryDailyAllowancePaidByEmployerSpecificHealthInsuranceFund = "supplementaryDailyAllowancePaidByEmployerSpecificHealthInsuranceFund", PensionPaidByEmployer = "pensionPaidByEmployer", DividendsBasedOnWages = "dividendsBasedOnWages", DividendsBasedOnNonWage = "dividendsBasedOnNonWage", EmployerSubsidisedCommuterTicketTaxExempt = "employerSubsidisedCommuterTicketTaxExempt", EmployerSubsidisedCommuterTicketTaxable = "employerSubsidisedCommuterTicketTaxable", EmployeeStockOption = "employeeStockOption", WagesTransferredToAthletesSpecialFund = "wagesTransferredToAthletesSpecialFund", WagesPaidFromAthletesSpecialFund = "wagesPaidFromAthletesSpecialFund", WagesForInsurancePurposes = "wagesForInsurancePurposes", TaxableReimbursementOfExpenses = "taxableReimbursementOfExpenses", PrivateDayCareAllowanceMunicipalSupplement = "privateDayCareAllowanceMunicipalSupplement", PrivateDayCareAllowanceWages = "privateDayCareAllowanceWages", PrivateDayCareAllowanceNonWage = "privateDayCareAllowanceNonWage", KilometreAllowancePaidByNonProfitOrganisation = "kilometreAllowancePaidByNonProfitOrganisation", DailyAllowancePaidByNonProfitOrganisation = "dailyAllowancePaidByNonProfitOrganisation", UnjustEnrichment = "unjustEnrichment", EmployeeStockOptionLowerMarketPrice = "employeeStockOptionLowerMarketPrice", RoyaltyPaidToNonResidentTaxpayer = "royaltyPaidToNonResidentTaxpayer", BicycleBenefitTaxExempt = "bicycleBenefitTaxExempt", BicycleBenefitTaxable = "bicycleBenefitTaxable", ConditionalStockOptions = "conditionalStockOptions", CopyrightRoyaltiesEarnedIncome = "copyrightRoyaltiesEarnedIncome", StockGrantPaidInMoney = "stockGrantPaidInMoney", EmployeeStockOptionPaidInMoney = "employeeStockOptionPaidInMoney", EarningsFromJuELEmployerToLightEntrepreneur = "earningsFromJuELEmployerToLightEntrepreneur", CompensationCollectedForCarBenefit = "compensationCollectedForCarBenefit", WithholdingTax = "withholdingTax", ElectedOfficialFee = "electedOfficialFee", TaxAtSource = "taxAtSource", TaxAtSourceDeduction = "taxAtSourceDeduction", WagesPaid = "wagesPaid", ReimbursementCollectedForOtherFringeBenefits = "reimbursementCollectedForOtherFringeBenefits", OtherItemDeductibleFromNetWage = "otherItemDeductibleFromNetWage", NetWage = "netWage", EmployerPaidPremiumForCollectiveAdditionalPensionInsurance = "employerPaidPremiumForCollectiveAdditionalPensionInsurance", EmployerPaidPremiumForCollectiveAdditionalPensionInsuranceEmployeesContribution = "employerPaidPremiumForCollectiveAdditionalPensionInsuranceEmployeesContribution", EmployeesHealthInsuranceContribution = "employeesHealthInsuranceContribution", EmployeesPensionInsuranceContribution = "employeesPensionInsuranceContribution", EmployeesUnemploymentInsuranceContribution = "employeesUnemploymentInsuranceContribution", ReimbursementForEmployerSubsidisedCommuterTicket = "reimbursementForEmployerSubsidisedCommuterTicket", TaxPaidAbroad = "taxPaidAbroad", Distraint = "distraint", VoluntaryIndividualPensionInsurancePremium = "voluntaryIndividualPensionInsurancePremium", DeductionBeforeWithholding = "deductionBeforeWithholding", ReimbursementCollectedForBicycleBenefit = "reimbursementCollectedForBicycleBenefit" } /** UnpaidAbsenceCauseCode enumeration */ export enum UnpaidAbsenceCauseCode { Illness = "illness", PartTimeSickLeave = "partTimeSickLeave", ParentalLeave = "parentalLeave", SpecialMaternityLeave = "specialMaternityLeave", Rehabilitation = "rehabilitation", ChildIllness = "childIllness", PartTimeChildCareLeave = "partTimeChildCareLeave", Training = "training", JobAlternationLeave = "jobAlternationLeave", StudyLeave = "studyLeave", IndustrialAction = "industrialAction", InterruptionInWorkProvision = "interruptionInWorkProvision", LeaveOfAbsence = "leaveOfAbsence", MilitaryRefresherTraining = "militaryRefresherTraining", MilitaryService = "militaryService", LayOff = "layOff", ChildCareLeave = "childCareLeave", Other = "other" } /** WageUnitCode enumeration */ export enum WageUnitCode { Hour = "hour", Day = "day", Week = "week", Period = "period" } export enum EarningsPaymentReportExtensionsPaymentChannel { Undefined = "undefined", Test = "test", ZeroPayment = "zeroPayment", External = "external", PalkkausManual = "palkkausManual", PalkkausWS = "palkkausWS", PalkkausPersonal = "palkkausPersonal", PalkkausCfaPaytrail = "palkkausCfaPaytrail", PalkkausCfaReference = "palkkausCfaReference", PalkkausCfaFinvoice = "palkkausCfaFinvoice", PalkkausEcfaPaytrail = "palkkausEcfaPaytrail", PalkkausEcfaReference = "palkkausEcfaReference", PalkkausEcfaFinvoice = "palkkausEcfaFinvoice", PalkkausCfaTest = "palkkausCfaTest", AccountorGo = "accountorGo", TalenomOnline = "talenomOnline", TalenomCfa = "talenomCfa", HolviCfa = "holviCfa", FinagoSolo = "finagoSolo", Procountor = "procountor", Kevytyrittaja = "kevytyrittaja", VismaNetvisor = "vismaNetvisor", Askelma = "askelma", Briox = "briox", Lemonaid = "lemonaid", Laskupiste = "laskupiste", Holvi = "holvi", Kompassi = "kompassi", Domus = "domus" } export enum AvatarEntityType { Undefined = "undefined", Person = "person", Company = "company", PersonCreatedByEmployer = "personCreatedByEmployer", Partner = "partner" } export enum AvatarPictureType { Icon = "icon", Uploaded = "uploaded", Gravatar = "gravatar" } export enum WorkflowEventUi { Default = "default", Primary = "primary", Success = "success", Info = "info", Warning = "warning", Danger = "danger" } export enum Features { None = "none", IsActive = "isActive", IsEditable = "isEditable", IsRemovable = "isRemovable", IsOnHold = "isOnHold" } export enum InternationalDataPostedCertCode { FromFinlandA1CertificateOrAgreement = "fromFinlandA1CertificateOrAgreement", ToFinlandA1CertificateOrAgreement = "toFinlandA1CertificateOrAgreement", NonEUEEACountryOrNonSocialSecurityAgreementCountry = "nonEUEEACountryOrNonSocialSecurityAgreementCountry" } export enum WorkForm { NT1 = "nT1", NT2 = "nT2", EmployersReportOnPeriodsOfStayInFinland = "employersReportOnPeriodsOfStayInFinland", EmployeeLeasingNotice = "employeeLeasingNotice" } export enum EarningsPaymentDataPaymentChannel { Undefined = "undefined", Test = "test", ZeroPayment = "zeroPayment", External = "external", PalkkausManual = "palkkausManual", PalkkausWS = "palkkausWS", PalkkausPersonal = "palkkausPersonal", PalkkausCfaPaytrail = "palkkausCfaPaytrail", PalkkausCfaReference = "palkkausCfaReference", PalkkausCfaFinvoice = "palkkausCfaFinvoice", PalkkausEcfaPaytrail = "palkkausEcfaPaytrail", PalkkausEcfaReference = "palkkausEcfaReference", PalkkausEcfaFinvoice = "palkkausEcfaFinvoice", PalkkausCfaTest = "palkkausCfaTest", AccountorGo = "accountorGo", TalenomOnline = "talenomOnline", TalenomCfa = "talenomCfa", HolviCfa = "holviCfa", FinagoSolo = "finagoSolo", Procountor = "procountor", Kevytyrittaja = "kevytyrittaja", VismaNetvisor = "vismaNetvisor", Askelma = "askelma", Briox = "briox", Lemonaid = "lemonaid", Laskupiste = "laskupiste", Holvi = "holvi", Kompassi = "kompassi", Domus = "domus" } export enum StatusResponseDeliveryDataStatus { Unknown = "unknown", Received = "received", InProcess = "inProcess", Valid = "valid", RejectedAtReception = "rejectedAtReception", RejectedDuringProcessing = "rejectedDuringProcessing", Cancelled = "cancelled" } } /** IrFlags enumeration */ export declare enum IrFlags { NoMoney = "noMoney", OneOff = "oneOff", UnjustEnrichment = "unjustEnrichment" } /** Handles the Calculation of CalculationRowType.IrIncomeType to IrRows */ export declare interface IrIncomeTypeUsecase { /** Reporting details to Incomes registry (Tulorekisteri). */ irData?: IrDetails | null; /** Primary subtyping of the usecase. */ kind?: TransactionCode | null; } /** Client-side logic for IrIncomeTypeUsecase */ export declare class IrIncomeTypeUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. */ updateUsecase(row: UserDefinedRow): void; /** Gets validation message for IrIncomeTypeUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private getCodeDataByNumber; private getCodeDataByTransaction; private isIrIncomeTypeLabel; } /** IrInsuranceExceptions enumeration */ export declare enum IrInsuranceExceptions { IncludeAll = "includeAll", IncludePension = "includePension", IncludeHealthInsurance = "includeHealthInsurance", IncludeUnemployment = "includeUnemployment", IncludeAccidentInsurance = "includeAccidentInsurance", ExcludeAll = "excludeAll", ExcludePension = "excludePension", ExcludeHealthInsurance = "excludeHealthInsurance", ExcludeUnemployment = "excludeUnemployment", ExcludeAccidentInsurance = "excludeAccidentInsurance" } /** * Provides CRUD access for authenticated user to access a his/her own Earnings Payments objects */ export declare class IrPayerSummaries extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): irpsr.PayerSummary; /** Get odata base url */ getODataUrl(): any; /** Validate */ validate(earningsPayment: irpsr.PayerSummary): Promise; /** Send schedule item to Incomes register queue */ sendSchedule(aso: irpsr.IrApiScheduleObject): Promise; /** Get Service Bus queue item */ getIrQueueItem(id: string): Promise; /** Remove Service Bus queue item */ removeIrQueueItem(id: string): Promise; } export declare namespace irpsr { /** Object that stores National Incomes Register Payer Summary Reports. */ export interface PayerSummary { /** Delivery data from IR Wage Report. */ deliveryData?: DeliveryData | null; /** Salaxy data that can't be stored in Earnings Payment Report */ info?: PayerSummaryReportExtensions | null; /** Validation for the Payer Summary Report */ validation?: ApiValidation | null; /** Status of the Payer Summary Report. */ status?: PayerSummaryReportStatus | null; /** IR Report log. Successfully sent or canceled report ids and time stamps. */ reportLog?: ReportLogEntry[] | null; /** Last errors from IR. */ irErrors?: ApiValidation | null; /** Last successful status in Incomes Register */ irStatus?: ReportLogEventType | null; /** Current schedule for the report. */ scheduledFor?: string | null; /** Timestamp of the last action in IR. */ lastDeliveredAt?: string | null; /** If true, the report has been modified after the last send operation. */ isModified?: boolean | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Record data */ export interface DeliveryData { /** Time of record creation */ timestamp?: string | null; /** Data source */ source?: string | null; /** Record type */ deliveryDataType?: DeliveryDataType | null; /** Record owner's (payer's) record reference */ deliveryId?: string | null; /** Rule for processing invalid data (reports) */ faultyControl?: FaultyControl | null; /** Production environment */ productionEnvironment?: boolean | null; /** Record owner */ deliveryDataOwner?: Id | null; /** Record creator */ deliveryDataCreator?: Id | null; /** Record submitter */ deliveryDataSender?: Id | null; /** Contact persons for the record */ contactPersons?: ContactPerson[] | null; /** Report date */ reportDate?: string | null; /** Payer details */ payer?: Payer | null; /** Reports data */ reports?: Report[] | null; } /** Salaxy data that can't be stored in payer summary report */ export interface PayerSummaryReportExtensions { /** Employer's Id */ employerId?: string | null; /** All calculations on which the report is based. */ calculationIds?: string[] | null; } /** Common base class / interface for data validation. */ export interface ApiValidation { /** If true, the data is valid - no errors. */ readonly isValid?: boolean | null; /** If true, has required fields missing data. */ readonly hasAllRequiredFields?: boolean | null; /** Validation errors on invalid field values. Note that required fields missing error messages are not here. Only the invalid values. */ readonly errors?: ApiValidationError[] | null; } /** Log data from the successfull sending or cancellation. */ export interface ReportLogEntry { /** Response date from the Incomes Register. */ irTimestamp?: string | null; /** Event type: Sending or cancellation. */ eventType?: ReportLogEventType | null; /** Our own report id. */ reportId?: string | null; /** Generated id from the Incomes Register. */ irReportId?: string | null; /** Delivery id. */ irDeliveryId?: string | null; /** Response id. */ irResponseId?: string | null; /** Version. */ irVersion?: number | null; /** User who sent the report. */ user?: string | null; /** Credential of the user. */ credential?: string | null; /** Storage version id. */ versionId?: string | null; /** Message for the event. */ message?: string | null; } /** Defines the data that IWorkflowItem must provide. */ export interface WorkflowData { /** Workflow events for the item. */ events?: WorkflowEvent[] | null; } /** Employer Identifier */ export interface Id { /** Identifier type */ type?: IdType | null; /** Identifier If the "Identifier type" is "Business ID", the identifier must exist (according to information from the Business Information System (YTJ)). If the "Identifier type" is "Finnish Personal Identification Number", the identifier must exist (according to information from the Population Information System (VTJ)). */ code?: string | null; /** Country code Mandatory data if "Identifier type" is other than "Business ID" or "Finnish Personal Identification Number". */ countryCode?: string | null; /** Country name Mandatory data if "Country code" is "99". */ countryName?: string | null; } export interface ContactPerson { /** Name */ name?: string | null; /** Telephone number */ telephone?: string | null; /** E-mail address If the ‘Reimbursement application data’ data group is specified for a paid absence and 1 or 2 as the ‘Payment data type’ even in a single report in a record, you must report at least one ‘Contact person for the record’ for whom the ‘E-mail address’ and ‘Field of responsibility’ data items have been specified. */ email?: string | null; /** Field of responsibility If the ‘Reimbursement application data’ data group is specified for a paid absence and 1 or 2 as the ‘Payment data type’ even in a single report in a record, you must report at least one ‘‘Contact person for the record’ for whom the ‘E-mail address’ and ‘Field of responsibility’ data items have been specified, with ‘Field of responsibility’ having the value 1 (Content issues). */ responsibilityCode?: ResponsibilityCode | null; } /** Payer details */ export interface Payer { /** Payer identifiers */ payerIds?: Id[] | null; /** Basic payer details */ payerBasic?: PayerBasic | null; /** Payer's address */ address?: Address | null; /** Payer's suborganisations */ subOrgs?: SubOrg[] | null; /** Other payer details */ payerOther?: PayerOther | null; /** Earnings-related pension insurances */ pensionInsurances?: PensionInsurance[] | null; /** Occupational accident insurances */ accidentInsurances?: AccidentInsurance[] | null; } /** Report data */ export interface Report { /** Service data */ reportData?: ReportData | null; /** Reporting period */ paymentMonth?: PaymentMonth | null; /** Income types */ transactions?: Transaction[] | null; } /** Validation errors used in API output. */ export interface ApiValidationError { /** Full path to Name of the property / field (Member name in JSON). This may be null/empty for type General. */ key?: string | null; /** High level type: Specifies the relation to object and its Member. */ type: ApiValidationErrorType; /** Validation error message in the requested language. */ msg: string; /** Validation error long description in the requested language. */ description?: string | null; /** Some error providers may have a unique technical code for error or validator */ code?: string | null; } /** Event in the workflow */ export interface WorkflowEvent { /** Event-provider specific identifier for the event. For deletable events, this should identify , but do NOT trust this to be 100% unique. */ id?: string | null; /** Type of the event. This typically maps to parent-object specific enumeration. */ type?: string | null; /** Message for backoffice purposes from the User or system that created the event. */ message?: string | null; /** User Interface styling of the event: Indicates the severity for the end-user. */ ui?: WorkflowEventUi | null; /** Features for this event. */ features?: Features[] | null; /** UTC time for when the event occured. */ time?: string | null; /** User or system that created the event. */ user?: string | null; /** Credential of the user which is responsible of the event. */ assignedTo?: string | null; /** Record attached to this event. */ record?: string | null; } /** Basic payer details */ export interface PayerBasic { /** The payer does not have a customer ID Mandatory data, if no identifiers have been specified in the "Payer identifiers" data group. */ missingId?: boolean | null; /** Company name Mandatory data in the following cases: • No identifier where the "Identifier type" is "Business ID" or "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Last name" and "First name" have not been specified. • The value of "The payer does not have a customer ID" is "true", and "Last name" and "First name" have not been specified. */ companyName?: string | null; /** Last name Mandatory data in the following cases: • No identifier where the "Identifier type" is "Business ID" or "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Company name" has not been specified. • The value of "The payer does not have a customer ID" is "true", and "Company name" has not been specified. • The value of "Payer type" is "Temporary employer", and "Company name" has not been specified. */ lastName?: string | null; /** First name Mandatory data in the following cases: • No identifier where the "Identifier type" is "Business ID" or "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Company name" has not been specified. • The value of "The payer does not have a customer ID" is "true", and "Company name" has not been specified. • The value of "Payer type" is "Temporary employer", and "Company name" has not been specified. */ firstName?: string | null; /** Date of birth Mandatory data in the following cases: • No identifier where the "Identifier type" is "Finnish Personal Identification Number" has been specified in the "Payer identifiers" data group, and "Last name" and "First name" have been specified. • The value of "The payer does not have a customer ID" is "true", and "Last name" and "First name" have been specified. The date must not be later than the current date. The date must not be earlier than 1 January 1800 */ birthDate?: string | null; /** Contact language */ language?: Language | null; } /** Address */ export interface Address { /** c/o */ co?: string | null; /** Street address If this data group is included, either "Street address" or "P.O. Box" must be specified.Both must not be entered. */ street?: string | null; /** P.O. Box If this data group is included, either "Street address" or "P.O. Box" must be specified.Both must not be entered. */ poBox?: string | null; /** Postal code */ postalCode?: string | null; /** City */ postOffice?: string | null; /** Country code A two-character code in accordance with the ISO 3166 country codes. If the country is unknown, the value "99" is entered. */ countryCode?: string | null; /** Country name Mandatory data if "Country code" is "99" */ countryName?: string | null; } /** Payer's suborganisations */ export interface SubOrg { /** Suborganisation’s identifier type */ type?: PayerSubOrgType | null; /** Suborganisation identifier */ code?: string | null; } /** Other payer details */ export interface PayerOther { /** Payer types */ payerTypes?: PayerType[] | null; } /** Earnings-related pension insurances */ export interface PensionInsurance { /** Pension provider code */ pensionProvIdCode?: PensionProvIdCode | null; /** Pension policy number */ pensionPolicyNo?: string | null; } /** Occupational accident insurance If the "Action type" is "Replacement report", the data should match that of the report’s previous version. */ export interface AccidentInsurance { /** Occupational accident insurance company identifier */ accInsProvId?: Id | null; /** Occupational accident insurance policy number */ accInsPolicyNo?: string | null; } /** Service data */ export interface ReportData { /** Action type */ actionCode?: ActionCode | null; /** Incomes Register report reference */ irReportId?: string | null; /** Report reference */ reportId?: string | null; /** Report version number */ reportVersion?: number | null; } /** Reporting period */ export interface PaymentMonth { /** Payment month */ month?: number | null; /** Payment year */ year?: number | null; } /** Income type data */ export interface Transaction { /** General details on the income type */ transactionBasic?: TransactionBasic | null; } /** General details on the income type */ export interface TransactionBasic { /** Income type code */ summaryTransactionCode?: SummaryTransactionCode | null; /** Amount Mandatory data, if the "Income type code" is not "101" (No wages payable) */ amount?: number | null; } /** Api Schedule Object */ export interface IrApiScheduleObject { /** Id of the object in the data storage to schedule */ id?: string | null; /** The date when the object was created. */ startAt?: string | null; /** Schedule action to take. */ action?: IrScheduleAction | null; /** User context information. */ userContext?: UserContext | null; } /** Current user context. */ export interface UserContext { /** Owner for this data */ owner?: string | null; /** Owner ID for this data */ ownerId?: string | null; /** Partner ID for this data */ partnerId?: string | null; /** Login partner ID for this data */ loginPartnerId?: string | null; /** Credential ID for this data */ credentialId?: string | null; /** Users scope, currently only 'admin' supported. */ scope?: string | null; } /** Version information for the API object. */ export interface VersionInfo { /** Identifier for the version. */ versionId?: string | null; /** Operation which created the version. */ operation?: string | null; /** Date and time when the version was created. */ date?: string | null; /** User account who created the version. */ userAccount?: Avatar | null; } /** Defines an avatar for an account, profile etc. - mainly the image that should be shown, names and short description */ export interface Avatar { /** Entity type: person/company */ entityType?: AvatarEntityType | null; /** First name or company name */ firstName?: string | null; /** Last name, for companies, this should be null */ lastName?: string | null; /** Display name. For a person this is 'FirstName LastName' (auto-created). */ displayName?: string | null; /** Sortable name for ordered lists etc. For a person this is 'LastName, FirstName' (auto-created). Depending on the data storage, this may be all-lowercase for easier sorting and search. */ sortableName?: string | null; /** Type of the Avatar picture. */ pictureType?: AvatarPictureType | null; /** Color - currently only used by type Icon */ color?: string | null; /** Initials - currently only used by type Icon */ initials?: string | null; /** URL of the picture if specified as picture (null in a case of type Icon) */ url?: string | null; /** Short description of the user. This may be overriden by a context specific value by the business logic. */ description?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export interface PageResultOfPayerSummaryListItem { items?: PayerSummaryListItem[] | null; nextPageLink?: string | null; count?: number | null; } /** Represents a single item in a list of payer summaries in the user interface. It contains all essential information of the report and is basis for searching, filtering and sorting. */ export interface PayerSummaryListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: PayerSummaryReportStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: PayerSummaryData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Object that represents a Salaxy account. */ export interface AccountInIndex { /** Avatar for the account */ avatar?: Avatar | null; /** Official id of the person or company. */ officialId?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; } /** Payer summary specific business data for index. */ export interface PayerSummaryData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Current status in the Incomes Register. */ irStatus?: ReportLogEventType | null; /** Date and time for the next scheduled delivery of the report. */ scheduledFor?: string | null; /** Date and time for the first delivery of the report. */ firstDeliveredAt?: string | null; /** Date and time for the last delivery of the report. */ lastDeliveredAt?: string | null; /** Reported transaction code. */ transactionCode?: number | null; /** Reported social security. */ socialSecurity?: number | null; /** Reported social security deduction. */ socialSecurityDeduction?: number | null; } export interface PayerSummaryNotification { /** Taken schedule action. */ action?: ReportLogEventType | null; /** Status response for the sent request. */ statusResponse?: StatusResponse | null; /** Record data */ deliveryData?: DeliveryData | null; /** Identifier of the object in the data storage. */ id?: string | null; } /** Processing feedback data */ export interface StatusResponse { /** Record status */ deliveryDataStatus?: StatusResponseDeliveryDataStatus | null; /** Incomes Register record reference If the record has been saved in the Incomes Register, the reference assigned to the record by the Incomes Register is delivered in this element.The Incomes Register record reference uniquely identifies all records submitted to the Incomes Register. If the record has not been saved in the Incomes Register, this data is blank. */ irDeliveryId?: string | null; /** Approved items The valid items submitted in the record are returned in this data group. */ validItems?: Item[] | null; /** Rejected items The invalid items submitted in the record and rejected on the basis of itemspecific errors are returned in this data group. If all items in the record are rejected on the basis of record-level errors, the rejected items are not returned in this data group. */ invalidItems?: Item[] | null; /** Message-level errors This data group is used to return technical and authorisation errors. If message-level errors are detected in a record submitted to the Incomes Register, the record is not processed further in the Incomes Register. In addition to message-level errors, the processing feedback cannot therefore contain any other errors(record-level errors, and rejected items and the errors related to them). */ messageErrors?: ErrorInfo[] | null; /** Record-level errors This data group is used to return errors related to the contents of record-level data. Record-level errors apply to all items in the record.If there are record-level errors in the record, all items of the record are invalid and will not be saved in the Incomes Register.In such a case, the invalid items are not separately delivered in the "Rejected items" data group. */ deliveryErrors?: ErrorInfo[] | null; /** Incomes Register message reference */ irResponseId?: string | null; /** Processing feedback timestamp */ irResponseTimestamp?: string | null; } export interface Item { /** Record submitter's reference This element always appears in the data of an approved item. */ itemId?: string | null; /** Incomes Register reference This element always appears in the data of an approved item. */ irItemId?: string | null; /** Report version number The Incomes Register assigns version number 1 to a new report. The version number of a substitute report is the number of the substituted version + 1. */ itemVersion?: number | null; /** Item Version specified */ itemVersionSpecified?: boolean | null; /** Errors */ itemErrors?: ErrorInfo[] | null; } /** Error information */ export interface ErrorInfo { /** Error code */ errorCode?: string | null; /** Error code description */ errorMessage?: string | null; /** Error details */ errorDetails?: string | null; } /** ActionCode enumeration */ export enum ActionCode { NewReport = "newReport", ReplacementReport = "replacementReport" } /** AddressType enumeration */ export enum AddressType { AddressInHomeCountry = "addressInHomeCountry", AddressInTheCountryOfWork = "addressInTheCountryOfWork" } /** AgeGroupCode enumeration */ export enum AgeGroupCode { A = "a", B = "b", C = "c", U = "u" } /** AllowanceCode enumeration */ export enum AllowanceCode { MealAllowance = "mealAllowance", PartialDailyAllowance = "partialDailyAllowance", FullDailyAllowance = "fullDailyAllowance", InternationalDailyAllowance = "internationalDailyAllowance", TaxExemptReimbursementsAbroad = "taxExemptReimbursementsAbroad" } /** ApiValidationErrorType enumeration */ export enum ApiValidationErrorType { General = "general", Required = "required", Invalid = "invalid", Warning = "warning" } /** BenefitCode enumeration */ export enum BenefitCode { AccommodationBenefit = "accommodationBenefit", TelephoneBenefit = "telephoneBenefit", MealBenefit = "mealBenefit", OtherBenefits = "otherBenefits" } /** CarBenefitCode enumeration */ export enum CarBenefitCode { LimitedCarBenefit = "limitedCarBenefit", FullCarBenefit = "fullCarBenefit" } /** DeliveryDataType enumeration */ export enum DeliveryDataType { EarningsPaymentReports = "earningsPaymentReports", EmployersSeparateReports = "employersSeparateReports", BenefitsPaymentReports = "benefitsPaymentReports", RecordSubscription = "recordSubscription", Messages = "messages", CancellationOfEarningsPaymentReports = "cancellationOfEarningsPaymentReports", CancellationOfEmployersSeparateReports = "cancellationOfEmployersSeparateReports", CancellationOfBenefitsPaymentReports = "cancellationOfBenefitsPaymentReports", CancellationOfARecordSubscription = "cancellationOfARecordSubscription", CancellationOfARecordContainingEarningsPaymentReports = "cancellationOfARecordContainingEarningsPaymentReports", CancellationOfARecordContainingEmployersSeparateReports = "cancellationOfARecordContainingEmployersSeparateReports", CancellationOfARecordContainingBenefitsPaymentReports = "cancellationOfARecordContainingBenefitsPaymentReports", CancellationOfARecordContainingARecordSubscription = "cancellationOfARecordContainingARecordSubscription" } /** EmploymentCode enumeration */ export enum EmploymentCode { FullTime = "fullTime", PartTime = "partTime", NotAvailable = "notAvailable" } /** EmploymentEndingCode enumeration */ export enum EmploymentEndingCode { EmployeesResignation = "employeesResignation", Other = "other", TerminationGroundsRelatedToEmployeesPerson = "terminationGroundsRelatedToEmployeesPerson", FinancialAndProductionRelatedGrounds = "financialAndProductionRelatedGrounds", JointAgreement = "jointAgreement", Retirement = "retirement", TerminationOfaFixedTermEmployment = "terminationOfaFixedTermEmployment" } /** EmploymentEndingType enumeration */ export enum EmploymentEndingType { KevaCodes = "kevaCodes", BankOfFinlandCodes = "bankOfFinlandCodes", IncomesRegisterCodes = "incomesRegisterCodes" } /** ExceptionCode enumeration */ export enum ExceptionCode { NoObligationToSocialInsurance = "noObligationToSocialInsurance", NoObligationToHealthInsurance = "noObligationToHealthInsurance", NoObligationToEarningsRelatedPensionInsurance = "noObligationToEarningsRelatedPensionInsurance", NoObligationToAccidentAndOccupationalDiseaseInsurance = "noObligationToAccidentAndOccupationalDiseaseInsurance", NoObligationToUnemploymentInsurance = "noObligationToUnemploymentInsurance", NotSubjectToSocialInsurance = "notSubjectToSocialInsurance", NotSubjectToEarningsRelatedPensionInsurance = "notSubjectToEarningsRelatedPensionInsurance", NotSubjectToAccidentAndOccupationalDiseaseInsurance = "notSubjectToAccidentAndOccupationalDiseaseInsurance", NotSubjectToUnemploymentInsurance = "notSubjectToUnemploymentInsurance", NotSubjectToHealthInsurance = "notSubjectToHealthInsurance", VoluntaryEarningsRelatedPensionInsurance = "voluntaryEarningsRelatedPensionInsurance" } /** FaultyControl enumeration */ export enum FaultyControl { OnlyInvalidItems = "onlyInvalidItems", EntireRecordIsRejected = "entireRecordIsRejected" } /** Gender enumeration */ export enum Gender { Male = "male", Female = "female" } /** IdType enumeration */ export enum IdType { BusinessId = "businessId", PersonalIdentificationNumber = "personalIdentificationNumber", Vat = "vat", Giin = "giin", TaxIdentificationNumber = "taxIdentificationNumber", FinnishTradeRegistrationNumber = "finnishTradeRegistrationNumber", ForeignBusinessRegistrationNumber = "foreignBusinessRegistrationNumber", ForeignPersonalIdentificationNumber = "foreignPersonalIdentificationNumber", Other = "other" } /** InsuranceCode enumeration */ export enum InsuranceCode { SubjectToSocialInsuranceContributions = "subjectToSocialInsuranceContributions", SubjectToEarningsRelatedPensionInsuranceContribution = "subjectToEarningsRelatedPensionInsuranceContribution", SubjectToHealthInsuranceContribution = "subjectToHealthInsuranceContribution", SubjectToUnemploymentInsuranceContribution = "subjectToUnemploymentInsuranceContribution", SubjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution = "subjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution" } /** IrScheduleAction enumeration */ export enum IrScheduleAction { Send = "send", Cancel = "cancel" } /** Language enumeration */ export enum Language { Fi = "fi", Sv = "sv", En = "en" } /** PaidAbsenceCauseCode enumeration */ export enum PaidAbsenceCauseCode { Illness = "illness", PartTimeSickLeave = "partTimeSickLeave", ParentalLeave = "parentalLeave", SpecialMaternityLeave = "specialMaternityLeave", Rehabilitation = "rehabilitation", ChildIllness = "childIllness", PartTimeChildCareLeave = "partTimeChildCareLeave", Training = "training", LeaveOfAbsence = "leaveOfAbsence", MilitaryRefresherTraining = "militaryRefresherTraining", MidWeekHoliday = "midWeekHoliday", AccruedHoliday = "accruedHoliday", OccupationalAccident = "occupationalAccident", AnnualLeave = "annualLeave", PartTimeAbsenceDueToRehabilitation = "partTimeAbsenceDueToRehabilitation", Other = "other" } /** PayerType enumeration */ export enum PayerType { PublicSector = "publicSector", Household = "household", TemporaryEmployer = "temporaryEmployer", ForeignEmployer = "foreignEmployer", State = "state", UnincorporatedStateEnterpriseOrGovernmentalInstitution = "unincorporatedStateEnterpriseOrGovernmentalInstitution", SpecialisedAgency = "specialisedAgency", ForeignGroupCompany = "foreignGroupCompany", PoolOfHouseholdEmployers = "poolOfHouseholdEmployers" } /** PayerSubOrgType enumeration */ export enum PayerSubOrgType { KevasSubmitterCodes = "kevasSubmitterCodes", PayersOwnCodes = "payersOwnCodes", GovernmentAgencyIdentifier = "governmentAgencyIdentifier" } /** PayerSummaryReportStatus enumeration */ export enum PayerSummaryReportStatus { New = "new", Scheduled = "scheduled", Succeeded = "succeeded", Canceled = "canceled", Error = "error", Invalid = "invalid" } /** PaymentType enumeration */ export enum PaymentType { Monthly = "monthly", Hourly = "hourly", ContractPay = "contractPay" } /** PensionActCode enumeration */ export enum PensionActCode { EmployeesEarningsRelatedPensionInsurance = "employeesEarningsRelatedPensionInsurance", PensionInsuranceForFarmers = "pensionInsuranceForFarmers", PensionInsuranceForTheSelfEmployed = "pensionInsuranceForTheSelfEmployed" } /** PensionProvIdCode enumeration */ export enum PensionProvIdCode { None = "none", FinnishCentreForPensions = "finnishCentreForPensions", ClergyOfTheOrthodoxChurch = "clergyOfTheOrthodoxChurch", KevaMemberOrganisations = "kevaMemberOrganisations", KevaÅlandLandskapsregeringsPensionssystem = "keva\u00C5landLandskapsregeringsPensionssystem", KevaChurch = "kevaChurch", BankOfFinland = "bankOfFinland", KevaKelaEmploymentPensions = "kevaKelaEmploymentPensions", KevaState = "kevaState", Seafarers = "seafarers", Farmers = "farmers", Alandia = "alandia", Ilmarinen = "ilmarinen", Elo = "elo", Varma = "varma", Veritas = "veritas", Etera = "etera", UPM = "uPM", Sanoma = "sanoma", Sandvik = "sandvik", Kontino = "kontino", Yleisradio = "yleisradio", ABB = "aBB", LFashionGroup = "lFashionGroup", Honeywell = "honeywell", Telia = "telia", YaraSuomi = "yaraSuomi", Orion = "orion", Valio = "valio", OP = "oP", Verso = "verso", Apteekkien = "apteekkien", Viabek = "viabek", Reka = "reka" } /** ProfessionType enumeration */ export enum ProfessionType { StatisticsFinland = "statisticsFinland", Keva = "keva", BankOfFinland = "bankOfFinland", Trafi = "trafi" } /** RefPaymentType enumeration */ export enum RefPaymentType { EarningsRelatedPensionProvider = "earningsRelatedPensionProvider" } /** ReimbPaymentType enumeration */ export enum ReimbPaymentType { KelaDailyAllowanceApplication = "kelaDailyAllowanceApplication", KelaFamilyLeaveCompensation = "kelaFamilyLeaveCompensation" } /** RemunerationCode enumeration */ export enum RemunerationCode { DailyAllowance = "dailyAllowance", AccommodationBenefit = "accommodationBenefit", CarBenefit = "carBenefit", OtherBenefit = "otherBenefit" } /** ReportLogEventType enumeration */ export enum ReportLogEventType { Undefined = "undefined", Sent = "sent", Canceled = "canceled", Error = "error" } /** ResponsibilityCode enumeration */ export enum ResponsibilityCode { ContentIssues = "contentIssues", TechnicalIssues = "technicalIssues" } /** SummaryTransactionCode enumeration */ export enum SummaryTransactionCode { Undefined = "undefined", NoWagesPayable = "noWagesPayable", EmployersHealthInsuranceContribution = "employersHealthInsuranceContribution", DeductionsToBeMadeFromTheEmployersHealthInsuranceContribution = "deductionsToBeMadeFromTheEmployersHealthInsuranceContribution" } /** TermCode enumeration */ export enum TermCode { UntilFurtherNotice = "untilFurtherNotice", FixedTerm = "fixedTerm" } /** TransactionCode enumeration */ export enum TransactionCode { Unknown = "unknown", Ignored = "ignored", TimeRatePay = "timeRatePay", InitiativeFee = "initiativeFee", BonusPay = "bonusPay", ComplementaryWagePaidDuringBenefitPeriod = "complementaryWagePaidDuringBenefitPeriod", EmergencyWorkCompensation = "emergencyWorkCompensation", EveningWorkCompensation = "eveningWorkCompensation", EveningShiftAllowance = "eveningShiftAllowance", NoticePeriodCompensation = "noticePeriodCompensation", KilometreAllowanceTaxable = "kilometreAllowanceTaxable", MeetingFee = "meetingFee", SaturdayPay = "saturdayPay", ExtraWorkPremium = "extraWorkPremium", HolidayBonus = "holidayBonus", LectureFee = "lectureFee", CompensationForTrustPosition = "compensationForTrustPosition", OtherCompensation = "otherCompensation", WaitingTimeCompensation = "waitingTimeCompensation", WorkingConditionCompensation = "workingConditionCompensation", PartialPayDuringSickLeave = "partialPayDuringSickLeave", Commission = "commission", SundayWorkCompensation = "sundayWorkCompensation", BenefitArisingFromSyntheticOption = "benefitArisingFromSyntheticOption", PerformanceBonus = "performanceBonus", MonetaryCompensationFromWorkingTimeBank = "monetaryCompensationFromWorkingTimeBank", CompensationForAccruedTimeOff = "compensationForAccruedTimeOff", ShareIssueForEmployees = "shareIssueForEmployees", ContractPay = "contractPay", DamagesInConjunctionWithTermination = "damagesInConjunctionWithTermination", StandByCompensation = "standByCompensation", VoluntaryCompensationInConjunctionWithTermination = "voluntaryCompensationInConjunctionWithTermination", WeeklyRestCompensation = "weeklyRestCompensation", ProfitSharingBonus = "profitSharingBonus", AnnualHolidayCompensation = "annualHolidayCompensation", OvertimeCompensation = "overtimeCompensation", NightWorkAllowance = "nightWorkAllowance", NightShiftCompensation = "nightShiftCompensation", OtherRegularCompensation = "otherRegularCompensation", CompensationForUnusedCompensatoryLeave = "compensationForUnusedCompensatoryLeave", AccommodationBenefit = "accommodationBenefit", InterestBenefitForHousingLoan = "interestBenefitForHousingLoan", MealAllowance = "mealAllowance", CarBenefit = "carBenefit", CompensationForGoverningBodyMembership = "compensationForGoverningBodyMembership", ShareOfReserveDrawnFromPersonnelFund = "shareOfReserveDrawnFromPersonnelFund", MonetaryGiftForEmployees = "monetaryGiftForEmployees", KilometreAllowanceTaxExempt = "kilometreAllowanceTaxExempt", TreatmentFeeForMunicipalVeterinarian = "treatmentFeeForMunicipalVeterinarian", CompensationForUseEarnedIncome = "compensationForUseEarnedIncome", CompensationForUseCapitalIncome = "compensationForUseCapitalIncome", OtherTaxableBenefitForEmployees = "otherTaxableBenefitForEmployees", OtherTaxableIncomeDeemedEarnedIncome = "otherTaxableIncomeDeemedEarnedIncome", OtherFringeBenefit = "otherFringeBenefit", KinshipCarersFee = "kinshipCarersFee", StockOptions = "stockOptions", WagesPaidBySubstitutePayerIncludingSocialInsurance = "wagesPaidBySubstitutePayerIncludingSocialInsurance", WagesPaidBySubstitutePayerIncludingEarningsRelatedPensionInsurance = "wagesPaidBySubstitutePayerIncludingEarningsRelatedPensionInsurance", WagesPaidBySubstitutePayerIncludingUnemploymentInsurance = "wagesPaidBySubstitutePayerIncludingUnemploymentInsurance", WagesPaidBySubstitutePayerIncludingAccidentAndOccupationalDiseaseInsurance = "wagesPaidBySubstitutePayerIncludingAccidentAndOccupationalDiseaseInsurance", WagesPaidBySubstitutePayerIncludingHealthInsurance = "wagesPaidBySubstitutePayerIncludingHealthInsurance", CompensationForEmployeeInvention = "compensationForEmployeeInvention", ReimbursementOfPrivateCaretakersExpenses = "reimbursementOfPrivateCaretakersExpenses", PrivateCaretakersFee = "privateCaretakersFee", ReimbursementOfFamilyDayCareProvidersExpenses = "reimbursementOfFamilyDayCareProvidersExpenses", TelephoneBenefit = "telephoneBenefit", DailyAllowance = "dailyAllowance", CapitalIncomePayment = "capitalIncomePayment", MealBenefit = "mealBenefit", ReimbursementOfCostsPaidToConciliator = "reimbursementOfCostsPaidToConciliator", NonWageCompensationForWork = "nonWageCompensationForWork", SupplementaryDailyAllowancePaidByEmployerSpecificHealthInsuranceFund = "supplementaryDailyAllowancePaidByEmployerSpecificHealthInsuranceFund", PensionPaidByEmployer = "pensionPaidByEmployer", DividendsBasedOnWages = "dividendsBasedOnWages", DividendsBasedOnNonWage = "dividendsBasedOnNonWage", EmployerSubsidisedCommuterTicketTaxExempt = "employerSubsidisedCommuterTicketTaxExempt", EmployerSubsidisedCommuterTicketTaxable = "employerSubsidisedCommuterTicketTaxable", EmployeeStockOption = "employeeStockOption", WagesTransferredToAthletesSpecialFund = "wagesTransferredToAthletesSpecialFund", WagesPaidFromAthletesSpecialFund = "wagesPaidFromAthletesSpecialFund", WagesForInsurancePurposes = "wagesForInsurancePurposes", TaxableReimbursementOfExpenses = "taxableReimbursementOfExpenses", PrivateDayCareAllowanceMunicipalSupplement = "privateDayCareAllowanceMunicipalSupplement", PrivateDayCareAllowanceWages = "privateDayCareAllowanceWages", PrivateDayCareAllowanceNonWage = "privateDayCareAllowanceNonWage", KilometreAllowancePaidByNonProfitOrganisation = "kilometreAllowancePaidByNonProfitOrganisation", DailyAllowancePaidByNonProfitOrganisation = "dailyAllowancePaidByNonProfitOrganisation", UnjustEnrichment = "unjustEnrichment", EmployeeStockOptionLowerMarketPrice = "employeeStockOptionLowerMarketPrice", RoyaltyPaidToNonResidentTaxpayer = "royaltyPaidToNonResidentTaxpayer", BicycleBenefitTaxExempt = "bicycleBenefitTaxExempt", BicycleBenefitTaxable = "bicycleBenefitTaxable", ConditionalStockOptions = "conditionalStockOptions", CopyrightRoyaltiesEarnedIncome = "copyrightRoyaltiesEarnedIncome", StockGrantPaidInMoney = "stockGrantPaidInMoney", EmployeeStockOptionPaidInMoney = "employeeStockOptionPaidInMoney", EarningsFromJuELEmployerToLightEntrepreneur = "earningsFromJuELEmployerToLightEntrepreneur", CompensationCollectedForCarBenefit = "compensationCollectedForCarBenefit", WithholdingTax = "withholdingTax", ElectedOfficialFee = "electedOfficialFee", TaxAtSource = "taxAtSource", TaxAtSourceDeduction = "taxAtSourceDeduction", WagesPaid = "wagesPaid", ReimbursementCollectedForOtherFringeBenefits = "reimbursementCollectedForOtherFringeBenefits", OtherItemDeductibleFromNetWage = "otherItemDeductibleFromNetWage", NetWage = "netWage", EmployerPaidPremiumForCollectiveAdditionalPensionInsurance = "employerPaidPremiumForCollectiveAdditionalPensionInsurance", EmployerPaidPremiumForCollectiveAdditionalPensionInsuranceEmployeesContribution = "employerPaidPremiumForCollectiveAdditionalPensionInsuranceEmployeesContribution", EmployeesHealthInsuranceContribution = "employeesHealthInsuranceContribution", EmployeesPensionInsuranceContribution = "employeesPensionInsuranceContribution", EmployeesUnemploymentInsuranceContribution = "employeesUnemploymentInsuranceContribution", ReimbursementForEmployerSubsidisedCommuterTicket = "reimbursementForEmployerSubsidisedCommuterTicket", TaxPaidAbroad = "taxPaidAbroad", Distraint = "distraint", VoluntaryIndividualPensionInsurancePremium = "voluntaryIndividualPensionInsurancePremium", DeductionBeforeWithholding = "deductionBeforeWithholding", ReimbursementCollectedForBicycleBenefit = "reimbursementCollectedForBicycleBenefit" } /** UnpaidAbsenceCauseCode enumeration */ export enum UnpaidAbsenceCauseCode { Illness = "illness", PartTimeSickLeave = "partTimeSickLeave", ParentalLeave = "parentalLeave", SpecialMaternityLeave = "specialMaternityLeave", Rehabilitation = "rehabilitation", ChildIllness = "childIllness", PartTimeChildCareLeave = "partTimeChildCareLeave", Training = "training", JobAlternationLeave = "jobAlternationLeave", StudyLeave = "studyLeave", IndustrialAction = "industrialAction", InterruptionInWorkProvision = "interruptionInWorkProvision", LeaveOfAbsence = "leaveOfAbsence", MilitaryRefresherTraining = "militaryRefresherTraining", MilitaryService = "militaryService", LayOff = "layOff", ChildCareLeave = "childCareLeave", Other = "other" } /** WageUnitCode enumeration */ export enum WageUnitCode { Hour = "hour", Day = "day", Week = "week", Period = "period" } export enum WorkflowEventUi { Default = "default", Primary = "primary", Success = "success", Info = "info", Warning = "warning", Danger = "danger" } export enum Features { None = "none", IsActive = "isActive", IsEditable = "isEditable", IsRemovable = "isRemovable", IsOnHold = "isOnHold" } export enum AvatarEntityType { Undefined = "undefined", Person = "person", Company = "company", PersonCreatedByEmployer = "personCreatedByEmployer", Partner = "partner" } export enum AvatarPictureType { Icon = "icon", Uploaded = "uploaded", Gravatar = "gravatar" } export enum StatusResponseDeliveryDataStatus { Unknown = "unknown", Received = "received", InProcess = "inProcess", Valid = "valid", RejectedAtReception = "rejectedAtReception", RejectedDuringProcessing = "rejectedDuringProcessing", Cancelled = "cancelled" } } /** Business level modeling corresponding to WageReportsToIRTypes Transaction. Also contains additional data for accounting and integration purposes. */ export declare interface IrRow { /** Type of the row - basically describes the source for this row: Either Manual (default) or Usecase logic, which may be legacy / API v02 or new / API v03. */ type?: IrRowSourceType | null; /** Description text of the row that is shown in reports. */ message?: string | null; /** Count for the row. Default is one. */ count?: number | null; /** Price for the row. */ price?: number | null; /** Simple multiplication: Count * Price - no other logic. Not used as Input. */ total?: number | null; /** Unit for the row. If specified as Undefined, set by the server-logic based on row type etc. */ unit?: Unit | null; /** Details for the National Incomes registry */ irData?: IrDetails | null; /** Details from Salaxy internal calulcation point-of-view (logic not in IR). */ calcData?: IrRowCalculationProperties | null; /** Earnings period if different than the report period. Note that this property may be (and by default is) null. */ earningPeriod?: DateRange | null; /** Period for the calculation row. This is mainly used for absences (AbsencePeriod row type), leaves and holidays (HolidaySalary, HolidayBonus and HolidayCompensation). Note that this property may be (and by default is) null. */ period?: DateRange | null; /** Accounting related data for the row. */ accounting?: RowAccounting | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** Details from Salaxy internal calulcation point-of-view (logic not in IR). */ export declare interface IrRowCalculationProperties { /** Grouping for reports etc. */ grouping?: CalcGroup | null; /** Defines the behavior of the row in Salaxy calculation process. */ behavior?: CalculationFlag[] | null; /** Wage type. Either a built in wage type in Salaxy or a custom wage type created by the user. Please note that this type fully determines the and the kind. */ type?: string | null; } /** IrRowSourceType enumeration */ export declare enum IrRowSourceType { Manual = "manual", Usecase = "usecase", UsecaseV02 = "usecaseV02" } /** Provides information about a new issued certificate. */ export declare interface IssuedCertificate { /** Certificate thumbprint: A unique identifier for the created certificate. */ thumbprint?: string | null; /** Certificate bytes when the certifcate is a file. Currently PFX or ZIP. */ bytes?: string | null; /** Certificate / public key as text (PEM) if provided by the generation process. */ cert?: string | null; /** Private key as text (PEM) if provided by the generation process. */ key?: string | null; } /** Generic index for all User Object Containers. */ export declare interface IUserObjectIndex { /** Unique key for the object. Unique within an Index. * In the case of UserObject, this is [Guid]_[ContainerType]_[Owner]. * For non-user objects, it should typically be just a Guid. */ id?: string | null; /** Guid of the container. * This is not always unique within the index. * Howver, within the container this is unique. */ containerGuid?: string | null; /** The container type that is the source of this index item. */ containerType?: string | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Updated at time: Note that in typical implementations, this is the UserUpdatedAt time. */ updatedAt?: string | null; /** Created at time */ createdAt?: string | null; /** Latest partner information. */ partner?: string | null; /** * Owner of the object is also the Partition key. * Mandatory in most storage scenarios. */ owner?: string | null; /** Classifications for the object. First implementation supports BusinessEventType enumeration for values. */ flags?: string[] | null; /** The business object type that is the source of this event. */ payloadType?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. * Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: * Total payment for the Employer and Net salary for the Worker in the case of a calculation. * Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated revenue that the transaction generated to Palkkaus.fi. Only add here the revenue, if the payment is really made. */ revenue?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** A short detail describing the transaction. * Should contain the relevant information for administration purposes. */ additionalInfo?: string | null; /** Messages (Error, Warning, OnHold, Note) that are active in the system. * Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. E.g. Filing code in MoneyTransfer. */ externalId?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** Icon for the purposes of listings. */ icon?: string | null; /** This is the recorded handling date for the object. E.g. when the calculation was paid to worker. */ handledAt?: string | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business attributes to include further information of the object. */ businessAttributes?: { [key: string]: any; } | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; } /** An account that is verified. Typically this means a digitally signed contract. This means that the account also has an Identity object. However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */ export declare interface IVerifiedAccount { /** Information about the verification of the account. NOTE that this object may not be present in many method calls - this is because it contains confidential information. */ identity?: Identity | null; /** If true, the account has been verified. Typically this means a digitally signed contract. This means that the account also has an Identity object. However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */ readonly isVerified?: boolean | null; /** Avatar is the visual representation of the Account. */ avatar?: Avatar | null; /** Contact information for the Account. */ contact?: Contact | null; /** Language of the person/company. */ language?: Language | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated */ updatedAt?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Pricing partner information. */ partner?: string | null; } /** Possible input types bases on JSON Schema generation. */ export declare type JsonInputType = OpenAPIV3.NonArraySchemaObjectType | OpenAPIV3.ArraySchemaObjectType | "error"; /** * Implemenatation of cache of resolved schemas and methods on reading their structure. */ export declare class JsonSchemaCache { /** Cache for loaded schema elements. */ schemaCache: JsonSchemaCacheItem[]; private ajax; constructor(ajax: Ajax); /** * Adds a local schema document and derefernces it. * @param url URL that identifies the schema * @param doc The schema document as object. * @returns A promise of the object. */ addSchemaDocument(url: string, doc: OpenAPIV3.Document | OpenAPIV2.Document | IJsonSchema): OpenAPIV3.Document; /** * Prepares the scehma for our use: * Dereferences the internal references ($ref-attribute) as JavaScript references. * Also adds the schema names to the format attribute of schema. * External references are currently not handled. */ prepareSchema(doc: OpenAPIV3.Document): void; /** * Sorts the properties in JSON schema according to some misc. logic rules * (e.g. id first, objects and arrays lower and unknown last). * TODO: We could potentially put this in another place: Server-side? UI framework? */ static sortSchemaProperties(schema: OpenAPIV3.SchemaObject): void; /** * Assures that a schema document identified by URL is loaded from server to the cache. * Currently, supports only OpenApi 3, but we may later support OpenApi 2 and/or plain JSON schema. * @param openApiUrl URL to the open API document. * @returns A promise that resolves when the document has been loaded and you can call other methods on it. */ assureSchemaDocument(openApiUrl: string): Promise; /** * Finds a schema document from the cache. * This method is syncronous base method for other schema operations * Make sure that the schme document has been loaded before calling as this will not load the document, * but will fail instead if the schema document is not there. * @param openApiUrl URL to the open API document. * @param throwIfNotFound If true, will throw an error if the document is not found in the cache. */ findSchemaDoc(openApiUrl: string, throwIfNotFound: boolean): JsonSchemaCacheItem; /** * Finds a single schema (Data model) within a schema document * Make sure that the schema document has been loaded before calling as this will not load the document, * but will fail instead if the schema document is not there. * @param openApiUrl URL to the open API document. * @param name Name of the schema (data model) */ findSchema(openApiUrl: string, name: string): OpenAPIV3.SchemaObject | null; /** * Gets an absolute, environment-specific URL for a relative URL: * Directs "salaxy-secure/[...rest of url]" to the API server specified by Ajax and * "/[...rest of url]" to the root of window.location.href (requires browser context). * @param url URL that is potentially relative either to current site or API server. */ private getAbsoluteUrl; } /** * Represents a schema that has been loaded, resolved and cached. * COMPATIBILITY WARNING: The doc will be changed as Schema instead of OpenApi document. * This change might not be marked as breaking change! */ export declare interface JsonSchemaCacheItem { /** * URL of the schema. This is typically the unique ID. * Note that the URL here is all-lowercase for faster retrieval. */ url: string; /** Type of the schema. */ type: "OpenAPIV2" | "OpenAPIV3" | "unknown"; /** * The schema document. If the doc is null/undefined, you should take reference to loadingDonePromise. * @deprecated The doc will be changed as Schema instead of OpenApi document. * This change might not be marked as breaking change! */ doc?: OpenAPIV3.Document; /** * If set, the document is being loaded to the cache and this promise will be fired * when the document is ready and loaded as doc (a new item in cache array). */ loadingDonePromise?: Promise; } /** * Defines a SchemaObject for the purposes of Salaxy UI generation * Besides the standard schema properties, adds property name and containing type for property. */ export declare interface JsonSchemaProperty { /** * If the schema object is fetched as a property (or items of array property), * this is the property name. Otherwise null. */ propertyName: string; /** * If the schema object is fetched as a property (or items of array property), * this is the name of the immediate containing schema (parent). Otherwise null. */ parentName: string; /** The actual schema type. */ schema: OpenAPIV3.SchemaObject; /** If true, the parent specifies this property as required. */ isRequired: boolean; } /** Static utilities for JSON Schemas an Open API documents. */ export declare class JsonSchemaUtils { /** * Checks if the given object can be rendered/parsed as a table: * All properties are single values: type != "object". * NOTE: The function may later consider some known object types (e.g. Avatar, DateRange) * as single values without that being a breaking change. * @param schema The schema to evaluate. * @returns True if the schema can be rendered as a non-hierarchical table. */ static isTable(schema: OpenAPIV3.NonArraySchemaObject): boolean; /** * Gets all the properties (the entire tree) from the schema * @param schema Schema from which to fetch the properties * @param prefix Prefix to add to property path: Mainly used in recursion. * @returns InputEnumOptions (typically used in UI) where value and text are * the property path, e.g. "owner.avatar.sortableName" and title shows the title or description from the schema. */ static getAllProperties(schema: OpenAPIV3.SchemaObject, prefix?: string): InputEnumOption[]; /** * Guesses the schema based on a data object. * @param data A data object, e.g. the first line (after header) of incoming data. */ static guessSchema(data: { [key: string]: any; }, typeResolve?: "string" | "guess"): OpenAPIV3.NonArraySchemaObject; /** * Gets a property from a schema document. Supports single property names or longer property paths. * @param schema The root type from which the property is found. * @param path Property path starting with the root schema. */ static getProperty(schema: OpenAPIV3.SchemaObject, path: string): JsonSchemaProperty; /** * Checks if the given schema is defined in the current usecase: Exists and has any properties. * @param schemaDoc Schema document, typically Usecase.Schema * @param schemaNames One or several names of the schema to check whether they are defined. * If any schema is exists and has properties, returns true. */ static isDefined(schemaDoc: OpenAPIV3.Document, ...schemaNames: string[]): boolean; /** Typeguard for OpenAPIV2 */ static isOpenAPIV3(doc: OpenAPIV3.Document | OpenAPIV2.Document | IJsonSchema): doc is OpenAPIV3.Document; /** Typeguard for OpenAPIV3 */ static isOpenAPIV2(doc: OpenAPIV3.Document | OpenAPIV2.Document | IJsonSchema): doc is OpenAPIV2.Document; /** Typeguard for JSON schema (TODO: consider adding more generic Schema typing).) */ static isSchemaDocument(doc: OpenAPIV3.Document | OpenAPIV2.Document | IJsonSchema): doc is IJsonSchema; /** Typeguard for OpenAPIV3.ReferenceObject */ static isReferenceObject(schema: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject): schema is OpenAPIV3.ReferenceObject; /** Typeguard for OpenAPIV3.NonArraySchemaObject */ static isNonArraySchemaObject(schema: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject): schema is OpenAPIV3.NonArraySchemaObject; /** Typeguard for OpenAPIV3.ArraySchemaObject */ static isArraySchemaObject(schema: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject): schema is OpenAPIV3.ArraySchemaObject; } /** * Keva employment registration codes. * Created manually. */ export declare const kevaEmploymentRegCodes: { pensionCompany: string; code: string; labelFi: string; labelSv: string; }[]; /** Language enumeration */ export declare enum Language { Default = "default", Fi = "fi", Sv = "sv", En = "en" } export declare interface LaskupisteInvoice { id?: number | null; customerId?: number | null; currency?: string | null; orderedDate?: string | null; invoiceNumber?: number | null; invoiceName?: string | null; rows?: LaskupisteInvoiceRow[] | null; invoiceState?: string | null; } /** Single invoice row for Laskupiste */ export declare interface LaskupisteInvoiceRow { productId?: number | null; name?: string | null; amount?: number | null; amountType?: string | null; unitPrice?: number | null; vatPercent?: number | null; specifier?: string | null; specifierType?: string | null; meta?: { [key: string]: any; } | null; } /** Represents a single accounting ledger. */ export declare interface LedgerAccount { /** Legder entries */ entries?: LedgerEntry[] | null; /** Account number. */ accountNumber?: string | null; /** Account name. */ accountName?: string | null; /** Account grouping. */ accountGrouping?: string | null; /** Current saldo for the ledger. */ readonly saldo?: number | null; } /** Represents a single ledger entry. */ export declare interface LedgerEntry { /** Id for the entry. */ id?: string | null; /** Entry date. */ entryDate?: string | null; /** Entry description. */ description?: string | null; /** Debit indicator. */ isDebit?: boolean | null; /** Posted amount. Includes VAT. */ amount?: number | null; /** VAT percent. */ vatPercent?: number | null; /** VAT amount of specific VAT rate. */ vatAmount?: number | null; /** Applied VAT rate. */ vatRate?: VatRate | null; /** Account number. */ accountNumber?: string | null; /** Account name. */ accountName?: string | null; /** Account grouping. */ accountGrouping?: string | null; /** Dimension data. */ dimension?: { [key: string]: any; } | null; } /** LegacyServiceModel enumeration */ export declare enum LegacyServiceModel { Shared = "shared", PartnerOnly = "partnerOnly" } /** LegalEntityType enumeration */ export declare enum LegalEntityType { Undefined = "undefined", Person = "person", Company = "company", PersonCreatedByEmployer = "personCreatedByEmployer", Partner = "partner" } /** Local Tapiola insurance order API object. */ export declare interface LocalTapiolaInsuranceOrder { /** Status of the Local Tapiola insurance order. */ status?: LocalTapiolaInsuranceOrderStatus | null; /** Information about the company placing the Local Tapiola insurance order. */ company?: LocalTapiolaInsuranceOrderCompanyInfo | null; /** Information about the Local Tapiola worker insurance order. */ items?: LocalTapiolInsuranceOrderInfo[] | null; /** Validation information. */ validation?: ApiValidation | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** LocalTapiolaInsuranceOrderAuthorizationType enumeration */ export declare enum LocalTapiolaInsuranceOrderAuthorizationType { Procuration = "procuration", PowerOfAttorney = "powerOfAttorney", ApparentAuthority = "apparentAuthority", Other = "other" } /** Information required for a company contact person with a Local Tapiola occupational accident insurance. */ export declare interface LocalTapiolaInsuranceOrderCompanyContactPerson { /** The authorization type of for the contact person. */ authorizationType?: LocalTapiolaInsuranceOrderAuthorizationType | null; /** Avatar for the account */ avatar?: Avatar | null; /** Official id of the person or company. */ officialId?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; } /** Information required for an insured company with a Local Tapiola occupational accident insurance. */ export declare interface LocalTapiolaInsuranceOrderCompanyInfo { /** Company details. */ details?: AccountInIndex | null; /** Company address. */ address?: Contact | null; /** If true, the address of the Principal Place Of Business differs from the company address. */ hasPrincipalBusinessAddress?: boolean | null; /** Address of the principal place of business. */ principalBusinessAddress?: Contact | null; /** Information of the insured companys delegate person. */ contactPerson?: LocalTapiolaInsuranceOrderCompanyContactPerson | null; /** Company owner structure is too complex to be fully represented with simple form data i.e. list of InsuranceOrderCompanyOwnerInfo objects. */ complexOwnerStructure?: boolean | null; /** List of beneficial owners of the company. */ owners?: BeneficialOwner[] | null; /** List of other beneficiaries than beneficial owners of the company */ beneficiaries?: Beneficiary[] | null; } /** Occupation information required with a new Local Tapiola worker occupational accident insurance order. */ export declare interface LocalTapiolaInsuranceOrderOccupation { /** Occupation code. */ occupationCode?: string | null; /** Occupation name. */ occupationName?: string | null; /** Estimated annual salary income. */ estimatedIncome?: number | null; } /** LocalTapiolaInsuranceOrderStatus enumeration */ export declare enum LocalTapiolaInsuranceOrderStatus { Draft = "draft", WaitingApproval = "waitingApproval", Checked = "checked", Sent = "sent", Handled = "handled", Canceled = "canceled" } /** LocalTapiolaInsuranceOrderType enumeration */ export declare enum LocalTapiolaInsuranceOrderType { NewWorkerInsurance = "newWorkerInsurance", MoveWorkerInsurance = "moveWorkerInsurance", NewEntrepreneurInsurance = "newEntrepreneurInsurance", MoveEntrepreneurInsurance = "moveEntrepreneurInsurance", Other = "other" } /** Information required with a Local Tapiola worker accident insurance order. */ export declare interface LocalTapiolInsuranceOrderInfo { /** Type of the Local Tapiola insurance order. */ orderType?: LocalTapiolaInsuranceOrderType | null; /** Start date of the insurance. Only valid for new occupational accident insurance and entrepreneur insurance. If insurance is moved to Local Tapiola from another insurance company, StartingPoint should be used instead. */ startDate?: string | null; /** Billing interval (1, 2, 3 or 4 times per year). Applies only to entrepreneur insurance. */ billingInterval?: number | null; /** Name of the old insurance company, if the insurance is transferred to Local Tapiola from some other insurance company. */ oldInsuranceCompany?: string | null; /** Industry that the company operates in. */ industry?: string | null; /** Occupation types and income estimates. Can be many entries for an occupational accident insurance and only a single entry for an entrepreneur insurance. */ occupations?: LocalTapiolaInsuranceOrderOccupation[] | null; /** Name of the entrepreneur. */ insuredName?: string | null; /** Social security number of the entrepreneur. */ insuredOfficialId?: string | null; } /** MealBenefitKind enumeration */ export declare enum MealBenefitKind { Undefined = "undefined", CateringContract = "cateringContract", MealTicket = "mealTicket", TaxableAmount = "taxableAmount", MealAllowance = "mealAllowance", Institute = "institute", Teacher = "teacher", RestaurantWorker = "restaurantWorker", CollectedReimbursement = "collectedReimbursement" } /** Handles the Calculation of CalculationRowType.MealBenefit to IrRows */ export declare interface MealBenefitUsecase { /** Deduction from salary */ deduction?: number | null; /** The taxable price calculated by the server. */ taxablePrice?: number | null; /** If true, the deduction from Worker salary corresponds to taxable value. */ isTaxValue?: boolean | null; /** If true, the deduction from Worker Salary has already been done or will be done and is not added to this calculation. */ isTaxValueDeductionDone?: boolean | null; /** Primary subtyping of the usecase. */ kind?: MealBenefitKind | null; } /** Client-side logic for MealBenefitUsecase */ export declare class MealBenefitUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. */ updateUsecase(row: UserDefinedRow, date: DatelyObject): void; /** Gets validation message for MealBenefitUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private setValues; } /** Measurement value. */ export declare interface Measurement { /** Tag for the measurement. */ tag?: string | null; /** Time when the measurement was recorded. */ timestamp?: string | null; /** Actual measurement value. */ value?: number | null; } /** A message within a messaging thread. */ export declare interface Message { /** Unique identifier for the message. */ id?: string | null; /** Time for the message */ time?: string | null; /** Content type of the message */ type?: ThreadedMessageType | null; /** Textual content: If message, this is the content text. If other type, short title / description typically shown in the title bar. */ content?: string | null; /** Identifier of the external content. BlobFile Id for attachments, Calculation ID for calculations etc. */ contentId?: string | null; /** Other misc. data that is used in displaying the content in the immediate message view. Do not include the entire object here. Just the immediately available data. */ contentData?: { [key: string]: any; } | null; /** Content type specific text for preview. This may be URI, ID or boolean. For BlobFile, it is currently the BlobFile Guid (the same as ContentId) or null, but in the future, the field may also contain an URL without that being a breaking change! */ preview?: string | null; /** The party / type of the message sender. */ fromParty?: MessageFrom | null; /** If set, specifies the time when the message has been read by the thread owner. */ readByOwner?: string | null; /** If set, specifies the time when the message has been read by the other party. */ readByOtherParty?: string | null; /** Validates the object that is the payload of the message. */ validation?: ApiValidation | null; } /** Message thread specific business data for index. */ export declare interface MessageData { /** Title for the message */ title?: string | null; /** Last message that was was created by the owner */ ownerLastMessage?: string | null; /** Last message that was created by the other party */ otherPartyLastMessage?: string | null; /** Number of messages by Owner that have not been read by the other party */ ownerUnreadCount?: number | null; /** Number of messages that have been read by the Other party and have not been read by the owner. */ otherPartyUnreadCount?: number | null; /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Key for the usecase based on which it is resolved. Later, this may resolve to a user interface, microservice or a to manifest registering one. For now, just use a unique string starting with a domain you own. */ usecaseUri?: string | null; /** If true, the message is a salaxy email, generated by the system. */ isSalaxyEmail?: boolean | null; /** Start date of the default salary period */ periodStart?: string | null; /** End date of the default salary period */ periodEnd?: string | null; /** Count of calculations in this Payroll */ calcCount?: number | null; /** Time of the last message posted by owner. */ ownerUpdatedAt?: string | null; /** Time of the last message posted by other party. */ otherPartyUpdatedAt?: string | null; } /** MessageFrom enumeration */ export declare enum MessageFrom { Undefined = "undefined", Owner = "owner", OtherParty = "otherParty", System = "system" } /** Represents a single item in a list of message threads in the user interface. It contains header data of the message thread and is basis for searching, filtering and sorting. */ export declare interface MessageListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: MessageData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Messages thread groups togehter a set of related messages and/or attachments. */ export declare interface MessageThread { /** Title for the message */ title?: string | null; /** Status for the entire message thread. */ status?: MessageThreadStatus | null; /** The owner of the thread: The entity that has the right to delete or move the thread. This may or may not be the originator the message thread. The owner is typically Company or Household, in some cases Worker person. It should NOT be partner or person from a company. */ ownerInfo?: Avatar | null; /** Palkkaus.fi id (IBAN) of the other party. The other party is the second entity(besides the owner) in that is juridically in the message. This may or may not be the originator the message thread. It is typically the Partner or Palkkaus.fi, but may also be the Worker in the future. */ otherParty?: string | null; /** The other party is the second entity (besides the owner) in that is juridically in the message. This may or may not be the originator the message thread. It is typically the Partner or Palkkaus.fi, but may also be the Worker in the future. */ otherPartyInfo?: Avatar | null; /** List of messages and attachments in this thread */ messages?: Message[] | null; /** The workflow from the Owner point-of-view. */ ownerWorkflow?: MessageThreadWorkflow | null; /** The workflow from the other party point-of-view. */ otherPartyWorkflow?: MessageThreadWorkflow | null; /** The workflow data for manual editing and approval purposes. */ workflowData?: WorkflowData | null; /** Provides data for the usecase: The customer or service model level customization that is done for this object. The customization may define user interface, data model and even scripts or worflow related to the object. */ usecase?: UsecaseData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides CRUD access for Message threads. */ export declare class MessageThreads extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Gets a new blank message thread. */ getBlank(): MessageThread; /** * Adds a new message with text. * @param id Identifier of the messages thread. * @param message The message to add. */ addMessage(id: string, message: Message): Promise; /** * Gets the upload URL for attachment files of a message thread. * This URL is compatible with the HTML forms standard multipart/form-data upload. * @param id Identifier of the messages thread. * @returns The URL for multipart/form-data upload */ getUploadUrl(id: string): string; /** * Marks all messages as read by a given party * @param id Identifier of the thread * @param readBy The party for which the messages are marked as read. * @returns The entire thread with the messages marked as read. */ markAsRead(id: string, readBy: MessageFrom): Promise; /** * Sends an email notification to the owner of the message thread. * @param id Identifier of the thread * @param subject Subject of the notification. * @param body Body of the notification. * @returns A boolean indicating if the email was sent successfully. */ sendNotification(id: string, subject: string, body: string): Promise; } /** MessageThreadStatus enumeration */ export declare enum MessageThreadStatus { Draft = "draft", Active = "active", Approved = "approved", Rejected = "rejected", Archived = "archived", Template = "template" } /** Defines workflow actions for a message thread. */ export declare interface MessageThreadWorkflow { /** Number of messages that this party has posted that have not been read by the other party. */ unreadCount?: number | null; /** The salary date for the discussion. Owner's and other party's are typically the same, but they may differ: e.g. one may be the requested / estimated date and the other the first possible date if the requested is unrealistic. NOTE: Unlike in Salaxy, this is always UTC. */ salaryDate?: string | null; /** Time of the last message posted by this party. NOTE: Unlike in Salaxy, this is always UTC. */ updatedAt?: string | null; /** Text for the last message (written by this party). This is for preview purposes: May be shortened. */ lastMessageText?: string | null; } /** MessageType enumeration */ export declare enum MessageType { Email = "email", Sms = "sms" } /** Settings related to Messaging */ export declare interface MessagingSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Partner messages enabled. */ partnerMessages?: boolean | null; /** Options for the notification to be sent to the worker after the salary payment. */ workerSalaryNotifications?: WorkerSalaryNotification[] | null; /** Options for the delivery of the payslip to the worker. */ workerSalarySlipDeliveryMethods?: WorkerSalarySlipDeliveryMethod[] | null; } /** Defines the data model for calculating tax free compensation for using Workers own car (kilometrikorvaus). */ export declare interface MilageOwnCarUsecase { /** * Type of the vehicle, default is "car" as regular car. * "carLimitedBenefit" is for a limited car benefit car (käyttöetu), if Worker pays gasoline / electricity etc. * There are other types of vehicles that may differ from one year to another such as motorcycle, snow mobile etc. */ vehicleType: "car" | "carLimitedBenefit" | string; /** Number of passengers in addition to the driver (typically owner) in the car. */ passengerCount?: number; /** If true, the vehicle type allows additions. Currently only car. */ additionsAllowed?: boolean; /** If true, the vehicle type allows passengers. Currently only car and other (not carLimitedBenefit or custom). */ passengersAllowed?: boolean; /** * Additions, such as trailer, dog, mobile home etc. Currently, these only apply to car/carLimitedBenefit, * but they may apply to other vehicle types in the future. */ additions?: string | string[]; } /** * Usecase logic for Milage (km) using own car. */ export declare class MilageOwnCarUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. */ updateUsecase(row: UsecaseRow, date: DatelyObject): void; /** Gets validation message for BoardUsecaseLogic */ getUcValidation(): UsecaseValidationMessage; /** * Gets the vehicle type selection. * @param date Date for which the selection is fetched (default: today). The prices changes yearly an also the selection may change. */ getVehicleTypeSelection(date?: DatelyObject): InputEnumOption[]; /** * Gets the vehicle type selection. * @param date Date for which the selection is fetched (default: today). The prices changes yearly an also the selection may change. */ getAdditionsSelection(date?: DatelyObject): InputEnumOption[]; private getMilage; } /** Holiday Accrual for a calendar month in releation to a calculation. */ export declare interface MonthlyHolidayAccrual { /** First day of month for the holiday month */ month?: string | null; /** Holiday accrual for this month. Note that -1 is indication that accrual should not be updated for this particylar month. There is no possiblity for negative accrual. */ daysAccrued?: number | null; /** Number of absence days used in the calculation. */ absencesDays?: number | null; /** Work days in determining the accrual for the month in 14 days rule. */ workDays?: number | null; /** Work hours in determining the accrual fot the month in 35 hour rule. */ workHours?: number | null; /** Id of the calculation that this accrual is related to. */ calcId?: string | null; } /** NonProfitOrgKind enumeration */ export declare enum NonProfitOrgKind { Undefined = "undefined", KilometreAllowance = "kilometreAllowance", DailyAllowance = "dailyAllowance", AccomodationAllowance = "accomodationAllowance" } /** Handles the Calculation of CalculationRowType.NonProfitOrg to IrRows */ export declare interface NonProfitOrgUsecase { /** Primary subtyping of the usecase. */ kind?: NonProfitOrgKind | null; } /** * Handles the usecase for Non-profit organization specific allowances. */ export declare class NonProfitOrgUsecaseLogic extends BaseUsecaseLogic { /** Gets validation message for BoardUsecaseLogic */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** * Helpers for handling numbers: Mathematical operations, parsing and formatting numbers in our supported languages etc. */ export declare class Numeric { /** * Parses a user input to a float taking into consideration the Finnish culture. * Main case is that decimal separator is usually a comma (,). * If there is both comma (,) and point (.) in the same string, NaN is returned. * Whitespaces are removed and if string contains commas they are replaced with points before conversion to Number. * Null, undefined return original value, empty strings (or whitespace only) return null. * * @param numCandidate - text that should be converted to a number if possible. */ static parseNumber(numCandidate: string | number): number; /** * Formats a number as a euro price. Uses comma as decimal separator. * @param value - Numeric value to format * @param addSuffix - If true (default), adds the €-suffix. * @param nullChar The character or string for null or Nan value, the default is '-'. */ static formatPrice(value: any, addSuffix?: boolean, nullChar?: string): string; /** * Rounds a JavaScript number in a reliable way. * @param value Number that is rounded. If null given, returns null. * @param decimals Number of decimals after the decimal separator. Default is 2 as in money. * @returns Number properly rounded, Null/undefined as null, Non-numeric values return Number.NaN */ static round(value: number, decimals?: number): number; /** * Fixes floating point problems in typical number.toString() scenarios. * E.g. `console.debug((0.07 * 100).toString());` returns "7.000000000000001". * Null/undefined returns empty string, numbers fixed and otherwise toString() is called. * @param value Number to show as string. * @returns Number rounded to specified number of decimals. Null/undefined returns empty string. * @example * console.debug(Numeric.toString(0.07 * 100)); // returns "7" * console.debug((0.07 * 100).toString()); // returns "7.000000000000001" */ static toString(value: number): string; /** * Fixes floating point problems in typical number.toFixed() scenarios. * E.g. `console.debug((1.005).toFixed(2));` returns "1.00" * @param value Number to show as string. Supports null/undefined, but otherwise should be a number. * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. * @returns Number rounded to specified number of decimals. Null/undefined returns empty string. * @example * console.debug(Numeric.toFixed(1.005, 2)) // returns "1.01" * console.debug((1.005).toFixed(2)) // returns 1.00 */ static toFixed(value: number, fractionDigits?: number): string; /** * Rounds a JavaScript number in a reliable way in percentage format. * * @param value Number that is rounded. * @param decimals Number of decimals after the decimal separator. Default is 2 as in money. * If decimals is null, no rounding is done. * @param addSuffix If true, adds '%' sign at the end. * @param nullChar The character or string for null or Nan value, the default is '-'. */ static formatPercent(value: any, decimals?: number, addSuffix?: boolean, nullChar?: string): string; /** * Rounds a JavaScript number and formats it using comma as a separator and optional suffix. * * @param value Number that is rounded. * @param decimals Number of decimals after the decimal separator. Default is 2 as in money. If decimals is null, no rounding is done. * @param suffix The suffix to add to the number. * @param nullChar The character or string for null or Nan value, the default is '-'. */ static formatNumber(value: any, decimals?: number, suffix?: string, nullChar?: string): string; /** * Formats a number as count optionally taking into account the related unit * @param input Input to format * @param unit Unit that is used in formatting * @param decimals Number of decimals to show * @param nullText Text to show if the value is null / undefined. By default returns null, which can then be cought by another filter or logical or ("||") * @param zeroText If specified, will use this text without the Unit formatting if the value is zero. By default zero is formatted as "0 [unitText]" * @returns formatted input */ static formatUnit(input: number, unit?: Unit, decimals?: number, nullText?: string, zeroText?: string): string; /** * Checks if the given object is a number. * @param numberCandidate Object to check */ static isNumber(numberCandidate: any): boolean; } /** * Methods for oauth2 communication. */ export declare class OAuth2 { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Token endpoint. * * @param msg - OAuth 2.0 authorization request. * * @returns A Promise with OAuthMessage. */ token(msg: OAuthMessage): Promise; /** * Gets a federation message for the currently signed-in account as OpenID Connect UserInfo Response * (http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). * This message can be used by trusted authentication providers (mainly Banks) to federate authentication and authorization information to Salaxy. * In such a flow this service end-point provides an example that could be used in testing. * * @returns A Promise with federation message {OpenIdUserInfoSupportedClaims}. */ getFederationMessage(): Promise; } /** OAuthError enumeration */ export declare enum OAuthError { Undefined, Invalid_request, Unauthorized_client, Access_denied, Unsupported_response_type, Invalid_scope, Server_error, Temporarily_unavailable } /** OAuthGrantType enumeration */ export declare enum OAuthGrantType { Undefined, Authorization_code, Password, Client_credentials, Refresh_token, JwtBearer } /** Based on standard https://tools.ietf.org/html/rfc6749 . */ export declare interface OAuthMessage { /** The client identifier issued to the client during the registration process. */ client_id?: string | null; /** The client secret. The client MAY omit the parameter if the client secret is an empty string. */ client_secret?: string | null; /** The value MUST be one of "code" for requesting an authorization code, "token" for requesting an access token(implicit grant), or a registered extension value. */ response_type?: OAuthResponseType | null; /** The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings.The strings are defined by the authorization server. */ scope?: string | null; /** An opaque value used by the client to maintain state between the request and callback.The authorization server includes this value when redirecting the user-agent back to the client. The parameter SHOULD be used for preventing cross-site request forgery. */ state?: string | null; /** After completing its interaction with the resource owner, the authorization server directs the resource owner's user-agent back to the client. */ redirect_uri?: string | null; /** A single ASCII [USASCII] error code. */ error?: OAuthError | null; /** Human-readable ASCII [USASCII] text providing additional information, used to assist the client developer in understanding the error that occurred. */ error_description?: string | null; /** A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. */ error_uri?: string | null; /** Requested grant type. */ grant_type?: OAuthGrantType | null; /** The authorization code received from the authorization server. */ code?: string | null; /** The access token issued by the authorization server. */ access_token?: string | null; /** The type of the token issued. */ token_type?: OAuthTokenType | null; /** The lifetime in seconds of the access token. For example, the value "3600" denotes that the access token will expire in one hour from the time the response was generated. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value. */ expires_in?: number | null; /** Auth0 connection */ connection?: string | null; /** The resource owner username. */ username?: string | null; /** The resource owner password. */ password?: string | null; /** The refresh token, which can be used to obtain new access tokens. */ refresh_token?: string | null; /** The value of the "assertion" parameter MUST contain a single JWT. */ assertion?: string | null; /** The id token issued by the authorization server. */ id_token?: string | null; /** Salaxy specific onboarding uri. */ salaxy_onboarding_uri?: string | null; /** User interface language. */ salaxy_language?: string | null; /** Users role. */ salaxy_role?: string | null; } /** OAuthResponseType enumeration */ export declare enum OAuthResponseType { Undefined, Code, Token } /** OAuthSalaxyAuthorizeMode enumeration */ export declare enum OAuthSalaxyAuthorizeMode { Undefined, Sign_in, Sign_up } /** OAuthTokenType enumeration */ export declare enum OAuthTokenType { Undefined, Bearer, Mac } /** * Helpers for performing operations with objects */ export declare class Objects { /** * Returns true if an object has a property with specified name. * Using hasOwnProperty in a safe, easy and concise way. * @param obj Object to check * @param key String key to look for. */ static has(obj: any, key: string): boolean; /** * Gets a property based on multi-level property path. * Null / undefined at any level will return null as in AngularJS expressions. * @param obj Object from which to fetch a property. * @param propertyPath Path to the property to fetch. */ static getProperty(obj: any, propertyPath: string): any; /** * Sets a property of an object based on property path. * Will create the entire path even if the intermittent objects do not exist. * @param obj Object whose property should be set. * @param propertyPath Dot-delimited property path to the property that should be set. * @param value The value that should be set. * @returns True if the property is set. Value is not set if there is no propertyPath/obj or * if the value is already set to new value (currently strict equality check "===", * but may be changed without it being a breaking change). */ static setProperty(obj: any, propertyPath: string, value: any): boolean; /** * Uses JSON Serialization / Deserialization to deep clone an object. * @param value Object to clone * @returns A cloned object. */ static copy(value: T): T; /** * Extends one object with another using Intersection types. * https://www.typescriptlang.org/docs/handbook/advanced-types.html * @param first First object. * @param second Second object. */ static extend(first: T, second: U): T & U; /** * Compares objects a and b. * Returns true if the objects are equal using value-to-value comparison. * * @param a - Any object. * @param b - Any object to compare with. */ static equal(a: any, b: any): boolean; } /** * Occupation according to Statistics Finland. * Used for insurance pricing and reporting. */ export declare interface Occupation { /** Salaxy identifier for the Occupation. Begins with code, but may have a suffix. */ id?: string | null; /** Statistics Finland code. There may be duplicates with different id. */ code?: string | null; /** Language for the entry */ lang?: "fi" | "en" | "sv" | null; /** Label */ label?: string | null; /** Lower case text that contains the id, label and potentially other text that should match in searches. */ search?: string | null; /** * Free text * TODO: Do we need to expose this? Why? */ freeText?: string | null; /** Keywords for searching etc. */ keyword?: string | null; } /** * Helper for Statistics Finland Occupation codes and texts related to them. * Occupation is used for insurance pricing and reporting.. */ export declare class Occupations { /** Gets all occupations for all languages. */ static getAllForAllLanguages(): Occupation[]; /** * Gets all the items of a given type. * @returns All occupation entries */ static getAll(language?: Language.Fi | Language.En | Language.Sv | null): Occupation[]; /** * Searches the occupations. * @param searchString String to search for. Typically user input. * @param language Language to search for. */ static search(searchString: string, language?: Language.Fi | Language.En | Language.Sv | null): Occupation[]; /** * Gets a single occupation based on the original Statistics Finland code. * @param code - Statistics finland 5-number code. * Note that this is different than the Salaxy ID stored in Calculation. * Salaxy ID may specify additional suffix separated by dash. For Salaxy ID, use getById() instead. * @returns Occupation metadata or null if not found. */ static getByCode(code: string): Occupation; /** * Gets a single occupation based on the its Salaxy ID, which is derived from the original Statistics Finland code. * @param id - Salaxy ID for the occupation. * This is the id stored in the calculation, but not the one that is reported to Incomes Register. * @returns Occupation metadata or null if not found. */ static getById(id: string): Occupation; /** * Fetches a list of occupations either based on list of IDs or a known keyword. * @param idListOrKeyword Either a comma separated list of ID's * or a known keyword: "household" and "company" currently supported. */ static getByIds(idListOrKeyword: string): Occupation[]; private static data; } /** Provides helpers for handling OData queries */ export declare class OData { /** * Makes an OData query to the the given service URL. * @param baseUrl The service URL that is used, e.g. "/v03/api/taxcards/current". * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. * @param ajax The Ajax implementation that is used for HTTP get. */ static getOData(baseUrl: string, query: ODataQueryOptions | string | undefined, ajax: Ajax): Promise>; /** * Export items: Fetches multiple pages (of 50 items) from the storage to achieve high $top (all if zero / null). * @param baseUrl The service URL that is used, e.g. "/v03/api/taxcards/current". * @param options The options for the query: Filter, search sort etc. * @param ajax The Ajax implementation that is used for HTTP get. * @param notify Function for notifying progress. */ static exportItems(baseUrl: string, options: ODataQueryOptions, ajax: Ajax, notify?: progressNotification): Promise; /** * Export items: Fetches multiple pages (server default page size) from the storage to achieve high $top (all if zero / null). * @param odataMethod The OData method that is called. Note that Salaxy API methods need the this, so you will need to pass * e.g. `(options) => srv.getOData(options)`, not simply `srv.getOData` because the call needs `this`. * @param options The options for the query: Filter, search sort etc. * Use $top to restrict the amount of items * Note that $top currently only restricts within page size (e.g. 50, 100), not exactly to the number of items. This may later change without being a breaking change. * @param notify Optional function for notifying progress. Called before each page await. */ static getAllPages(odataMethod: (options: ODataQueryOptions) => Promise>, options: ODataQueryOptions, notify?: progressNotification): Promise>; /** * Gets the result from Ajax result (json) to strongly typed result. * @param data Result data coming from the ajax call. * This may be either an OData object with count and next page link or just an array depending on the call. */ static getODataResult(data: ODataResult | T[]): ODataResult; /** * Escapes the Lucene search language special characters in search text values. * Special characters in Lucene Full syntax are: "+-&|!(){}[]^"~*?:\/" * and in simple syntax: "-*+|"()'\" * @param searchValue Search text value to escape for Lucene. * @param isSimpleSyntax If true, only escapes the necessary characters for simple syntax. */ static escapeSearchValue(searchValue: string, isSimpleSyntax?: boolean): string; /** * Gets the URL including the query string using the provided OData query options. * @param baseUrl Base URL of the service to which the query is added. * If null, the returned URL is the query string part starting with the question mark * ...or if none of the options is set, returns just an empty string. * @param queryOptions options based on which the query is constructed. */ static getUrl(baseUrl: string, queryOptions: ODataQueryOptions): string; } /** Defines the query options of OData */ export declare interface ODataQueryOptions { /** Tells the server to include the total count of matching entities in the response. (Useful for server-side paging.) */ $count?: boolean; /** Expands related entities inline. At the moment, this typically not implemented. */ $expand?: string; /** Filters the results, based on a Boolean condition. */ $filter?: string; /** Sorts the results. */ $orderby?: string; /** Selects which properties to include in the response. */ $select?: string; /** Skips the first n results. */ $skip?: number; /** Returns only the first n the results. */ $top?: number; /** * Performs free-text search using the in-built logic in the API. * The logic will consider this as a direct end-user input: * Wildcard search string is added and the text value is encoded. */ $search?: string; /** * Performs a free-text search using the Lucene full Syntax and searchmode All (not Any). * The search must be in final valid format: No escaping or adding of wildcards is done to this search string. * https://docs.microsoft.com/en-us/azure/search/query-lucene-syntax * NOTE: Any search here will ignore $search parameter. */ fullSearch?: string; /** * If true, perfoms the query also in anonymous mode * (no token, token expired or invalid token). * Default is that the query is done only if user has a valid token. */ anon?: boolean; } /** Result from OData query */ export declare interface ODataResult { /** Actual results array */ items: T[]; /** * Total count of the items (server-side/storage) if updated in the previous query. * Note that this may be null if the count is not fetched. */ count?: number; /** Next page link */ nextPageLink?: string; } /** Provides the data for onboarding process for a company. Onboarding is the process where Salaxy gathers sufficient information to at least create an acccount, often even more so that the user can pay a salaary with the account. */ export declare interface Onboarding { /** Type of the account to be created. */ accountType: WebSiteUserRole; /** Partner that should be added as primary authorization when the object is created. Currently not used in update operations (only New and Signature / VismaSign) and does not set as primary partner except if exception specifically made for a partner. */ authorizePartner?: string | null; /** The server-side status of the onboarding process. NOTE that there is a more relaxed user interface-level state in ui.state and ui.stateFullText that can be used in onboarding user interfaces. */ status?: OnboardingStatus | null; /** Input that is needed for creating a company account. */ company?: CompanyInput | null; /** Input that is needed for creating a personal account. This may be 1) the principal account if the account is created for 1a) Worker or 1b) Household or 2) creator owner if the account is created for a Company. */ person?: PersonInput | null; /** Possibility to define products. These can only be defined to one account as part of the onboarding process: If company account is created, the products are always for Company, not for the Person => Person will have default products in that case and they need to be edited in a separate process once the accounts have been created. */ products?: AccountProducts | null; /** Input and post data for digital signature. */ signature?: SignatureData | null; /** Validation status and errors. */ validation?: AccountValidation | null; /** User interface related data: Mainly the state of the UI. */ ui?: OnboardingUIState | null; credentials?: OnboardingCredentials | null; /** Custom state object that is guaranteed to survive the round-trip in the onboarding process. Calling application to the onboarding may pass here any data that it needs after the onboarding process is ready and user has been authenticated. */ appState?: { [key: string]: string; } | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Contact verification object for single message type. */ export declare interface OnboardingContactVerification { /** Given pin code. */ pin?: string | null; } /** Contact verification object for onboarding. */ export declare interface OnboardingContactVerifications { /** Verification for email contact. */ email?: OnboardingContactVerification | null; /** Verification for telephone contact. */ telephone?: OnboardingContactVerification | null; } /** Stores information about the credentials that were used in the Onboarding process. */ export declare interface OnboardingCredentials { /** Identifier of the credentials (UserAccount Guid in the database). */ credentialId?: string | null; /** The partner that initiated the Onboarding process. */ partnerId?: string | null; } /** * Business logic relating to Onboarding process and Digital signature. */ export declare class OnboardingLogic { /** Gets the authentication methods for digital signature. */ static getTupasMethods(): Array<{ /** Identifier */ id: string; /** Title that can be shown to user */ title: string; /** Method image (bank logo) */ img: string; /** True, if the method is considered being one of the most popular (Nordea, OP etc.) */ isPopular: boolean; }>; /** * Gets the new version of authentication methods by Telia. * @returns Array of euthentication methods. */ static getTeliaMethods(): Array<{ /** Identifier */ id: string; /** Title that can be shown to user */ title: string; /** Method image (bank logo) */ img: string; /** True, if the method is considered being one of the most popular (Nordea, OP etc.) */ isPopular: boolean; }>; } /** * Provides functionality for Onboarding: * The process where the user becomes a user of Salaxy service and an account is created for him / her / the company. */ export declare class Onboardings { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Gets a single Onboarding object based on identier * * @param id - Unique identifier for the object * * @returns A Promise with result data (Onboarding). */ getOnboarding(id: string): Promise; /** * Gets a single Onboarding object for authorizing account * * @param accountId - Account id of the authorizing account. * * @returns A Promise with result data (Onboarding). */ getOnboardingForAccount(accountId: string): Promise; /** * Creates or updates an Onboarding. * * @param onboarding - The Onboarding object that is updated. * * @returns A Promise with result data (saved Onboarding). */ saveOnboarding(onboarding: Onboarding): Promise; /** * Deletes an onboarding object from the storage * * @param id - Unique identifier for the object * * @returns A Promise with result data "Object deleted". */ deleteOnboarding(id: string): Promise; /** * Commits onboarding and creates/updates the account. * * @param onboarding - The Onboarding object that is to be committed.. * * @returns A Promise with result data (committed Onboarding). */ commitOnboarding(onboarding: Onboarding): Promise; /** * Returns the url to start the onboarding for current account (server side). * @param id - Optional id for the existing onboarding object. */ getLaunchUrl(id?: string): string; } /** OnboardingStatus enumeration */ export declare enum OnboardingStatus { Created = "created", Open = "open", Error = "error", Cancel = "cancel", Done = "done", Expired = "expired" } /** Stores data for the onboarding user interface. */ export declare interface OnboardingUIState { /** State of the user interface. Typically an enumeration that stores where the UI was. E.g. Wizard step. */ state?: string | null; /** Full description of the user interface state for admin and analyses purposes. */ stateFullText?: string | null; /** URL where the user should be redirected back to when the onboarding process is complete. */ successUrl?: string | null; /** URL where the user should be redirected back to if the process is canceled or there is an urecoverable error. */ cancelUrl?: string | null; /** Response type to OAuth -request */ oAuthResponseType?: string | null; /** Salaxy worker invitation key that points to a Salary slip / calculation that the user is coming to fetch in this onboarding process. The Onboarding data is prefilled with the data from th Salary calculation. */ invitationKey?: string | null; } /** * Adding the Open API types manually from openapi-types package. * * Simply referring to the package was not working: Because the types were not * in node_modules/@types they could not be used in exported classes / interfaces without consuming * code being built with skipLibCheck (which can then result to problems in other places). * * TODO: This could be removed by switching the types to @types/openapi, but that needs to be tested. */ export declare namespace OpenAPI { export type Document = OpenAPIV2.Document | OpenAPIV3.Document; export type Operation = OpenAPIV2.OperationObject | OpenAPIV3.OperationObject; export type Parameter = OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject | OpenAPIV2.ReferenceObject | OpenAPIV2.Parameter; export type Parameters = (OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject)[] | (OpenAPIV2.ReferenceObject | OpenAPIV2.Parameter)[]; export interface Request { body?: any; headers?: object; params?: object; query?: object; } } export declare namespace OpenAPIV2 { export interface Document { basePath?: string; consumes?: MimeTypes; definitions?: DefinitionsObject; externalDocs?: ExternalDocumentationObject; host?: string; info: InfoObject; parameters?: ParametersDefinitionsObject; paths: PathsObject; produces?: MimeTypes; responses?: ResponsesDefinitionsObject; schemes?: string[]; security?: SecurityRequirementObject[]; securityDefinitions?: SecurityDefinitionsObject; swagger: string; tags?: TagObject[]; 'x-express-openapi-additional-middleware'?: (((request: any, response: any, next: any) => Promise) | ((request: any, response: any, next: any) => void))[]; 'x-express-openapi-validation-strict'?: boolean; } export interface TagObject { name: string; description?: string; externalDocs?: ExternalDocumentationObject; } export interface SecuritySchemeObjectBase { type: 'basic' | 'apiKey' | 'oauth2'; description?: string; } export interface SecuritySchemeBasic extends SecuritySchemeObjectBase { type: 'basic'; } export interface SecuritySchemeApiKey extends SecuritySchemeObjectBase { type: 'apiKey'; name: string; in: string; } export type SecuritySchemeOauth2 = SecuritySchemeOauth2Implicit | SecuritySchemeOauth2AccessCode | SecuritySchemeOauth2Password | SecuritySchemeOauth2Application; export interface ScopesObject { [index: string]: any; } export interface SecuritySchemeOauth2Base extends SecuritySchemeObjectBase { type: 'oauth2'; flow: 'implicit' | 'password' | 'application' | 'accessCode'; scopes: ScopesObject; } export interface SecuritySchemeOauth2Implicit extends SecuritySchemeOauth2Base { flow: 'implicit'; authorizationUrl: string; } export interface SecuritySchemeOauth2AccessCode extends SecuritySchemeOauth2Base { flow: 'accessCode'; authorizationUrl: string; tokenUrl: string; } export interface SecuritySchemeOauth2Password extends SecuritySchemeOauth2Base { flow: 'password'; tokenUrl: string; } export interface SecuritySchemeOauth2Application extends SecuritySchemeOauth2Base { flow: 'application'; tokenUrl: string; } export type SecuritySchemeObject = SecuritySchemeBasic | SecuritySchemeApiKey | SecuritySchemeOauth2; export interface SecurityDefinitionsObject { [index: string]: SecuritySchemeObject; } export interface SecurityRequirementObject { [index: string]: string[]; } export interface ReferenceObject { $ref: string; } export type Response = ResponseObject | ReferenceObject; export interface ResponsesDefinitionsObject { [index: string]: ResponseObject; } export type Schema = SchemaObject | ReferenceObject; export interface ResponseObject { description: string; schema?: Schema; headers?: HeadersObject; examples?: ExampleObject; } export interface HeadersObject { [index: string]: HeaderObject; } export interface HeaderObject extends ItemsObject { } export interface ExampleObject { [index: string]: any; } export interface ResponseObject { description: string; schema?: Schema; headers?: HeadersObject; examples?: ExampleObject; } export type OperationObject = { tags?: string[]; summary?: string; description?: string; externalDocs?: ExternalDocumentationObject; operationId?: string; consumes?: MimeTypes; produces?: MimeTypes; parameters?: Parameters; responses: ResponsesObject; schemes?: string[]; deprecated?: boolean; security?: SecurityRequirementObject[]; } & T; export interface ResponsesObject { [index: string]: Response | any; default?: Response; } export type Parameters = (ReferenceObject | Parameter)[]; export type Parameter = InBodyParameterObject | GeneralParameterObject; export interface InBodyParameterObject extends ParameterObject { schema: Schema; } export interface GeneralParameterObject extends ParameterObject, ItemsObject { allowEmptyValue?: boolean; } export interface PathItemObject { $ref?: string; get?: OperationObject; put?: OperationObject; post?: OperationObject; del?: OperationObject; delete?: OperationObject; options?: OperationObject; head?: OperationObject; patch?: OperationObject; parameters?: Parameters; } export interface PathsObject { [index: string]: PathItemObject | any; } export interface ParametersDefinitionsObject { [index: string]: ParameterObject; } export interface ParameterObject { name: string; in: string; description?: string; required?: boolean; [index: string]: any; } export type MimeTypes = string[]; export interface DefinitionsObject { [index: string]: SchemaObject; } export interface SchemaObject extends IJsonSchema { [index: string]: any; discriminator?: string; readOnly?: boolean; xml?: XMLObject; externalDocs?: ExternalDocumentationObject; example?: any; default?: any; items?: ItemsObject; properties?: { [name: string]: SchemaObject; }; } export interface ExternalDocumentationObject { [index: string]: any; description?: string; url: string; } export interface ItemsObject { type: string; format?: string; items?: ItemsObject; collectionFormat?: string; default?: any; maximum?: number; exclusiveMaximum?: boolean; minimum?: number; exclusiveMinimum?: boolean; maxLength?: number; minLength?: number; pattern?: string; maxItems?: number; minItems?: number; uniqueItems?: boolean; enum?: any[]; multipleOf?: number; $ref?: string; } export interface XMLObject { [index: string]: any; name?: string; namespace?: string; prefix?: string; attribute?: boolean; wrapped?: boolean; } export interface InfoObject { title: string; description?: string; termsOfService?: string; contact?: ContactObject; license?: LicenseObject; version: string; "x-salaxy-model-namespace"?: string; "x-salaxy-enum-namespace"?: string; } export interface ContactObject { name?: string; url?: string; email?: string; } export interface LicenseObject { name: string; url?: string; } } export declare namespace OpenAPIV3 { export interface Document { openapi: string; info: InfoObject; servers?: ServerObject[]; paths: PathsObject; components?: ComponentsObject; security?: SecurityRequirementObject[]; tags?: TagObject[]; externalDocs?: ExternalDocumentationObject; 'x-express-openapi-additional-middleware'?: (((request: any, response: any, next: any) => Promise) | ((request: any, response: any, next: any) => void))[]; 'x-express-openapi-validation-strict'?: boolean; } export interface InfoObject { title: string; description?: string; termsOfService?: string; contact?: ContactObject; license?: LicenseObject; version: string; "x-salaxy-model-namespace"?: string; "x-salaxy-enum-namespace"?: string; } export interface ContactObject { name?: string; url?: string; email?: string; } export interface LicenseObject { name: string; url?: string; } export interface ServerObject { url: string; description?: string; variables?: { [variable: string]: ServerVariableObject; }; } export interface ServerVariableObject { enum?: string[]; default: string; description?: string; } export interface PathsObject { [pattern: string]: PathItemObject | undefined; } export interface PathItemObject { $ref?: string; summary?: string; description?: string; get?: OperationObject; put?: OperationObject; post?: OperationObject; delete?: OperationObject; options?: OperationObject; head?: OperationObject; patch?: OperationObject; trace?: OperationObject; servers?: ServerObject[]; parameters?: (ReferenceObject | ParameterObject)[]; } export type OperationObject = { tags?: string[]; summary?: string; description?: string; externalDocs?: ExternalDocumentationObject; operationId?: string; parameters?: (ReferenceObject | ParameterObject)[]; requestBody?: ReferenceObject | RequestBodyObject; responses?: ResponsesObject; callbacks?: { [callback: string]: ReferenceObject | CallbackObject; }; deprecated?: boolean; security?: SecurityRequirementObject[]; servers?: ServerObject[]; } & T; export interface ExternalDocumentationObject { description?: string; url: string; } export interface ParameterObject extends ParameterBaseObject { name: string; in: string; } export interface HeaderObject extends ParameterBaseObject { } export interface ParameterBaseObject { description?: string; required?: boolean; deprecated?: boolean; allowEmptyValue?: boolean; style?: string; explode?: boolean; allowReserved?: boolean; schema?: ReferenceObject | SchemaObject; example?: any; examples?: { [media: string]: ReferenceObject | ExampleObject; }; content?: { [media: string]: MediaTypeObject; }; } export type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer'; export type ArraySchemaObjectType = 'array'; export type SchemaObject = ArraySchemaObject | NonArraySchemaObject; export interface ArraySchemaObject extends BaseSchemaObject { type: ArraySchemaObjectType; items: ReferenceObject | SchemaObject; } export interface NonArraySchemaObject extends BaseSchemaObject { type?: NonArraySchemaObjectType; } export interface BaseSchemaObject { title?: string; description?: string; format?: string; default?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: boolean; minimum?: number; exclusiveMinimum?: boolean; maxLength?: number; minLength?: number; pattern?: string; additionalProperties?: boolean | ReferenceObject | SchemaObject; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string[]; enum?: any[]; properties?: { [name: string]: ReferenceObject | SchemaObject; }; allOf?: (ReferenceObject | SchemaObject)[]; oneOf?: (ReferenceObject | SchemaObject)[]; anyOf?: (ReferenceObject | SchemaObject)[]; not?: ReferenceObject | SchemaObject; nullable?: boolean; discriminator?: DiscriminatorObject; readOnly?: boolean; writeOnly?: boolean; xml?: XMLObject; externalDocs?: ExternalDocumentationObject; example?: any; deprecated?: boolean; } export interface DiscriminatorObject { propertyName: string; mapping?: { [value: string]: string; }; } export interface XMLObject { name?: string; namespace?: string; prefix?: string; attribute?: boolean; wrapped?: boolean; } export interface ReferenceObject { $ref: string; } export interface ExampleObject { summary?: string; description?: string; value?: any; externalValue?: string; } export interface MediaTypeObject { schema?: ReferenceObject | SchemaObject; example?: any; examples?: { [media: string]: ReferenceObject | ExampleObject; }; encoding?: { [media: string]: EncodingObject; }; } export interface EncodingObject { contentType?: string; headers?: { [header: string]: ReferenceObject | HeaderObject; }; style?: string; explode?: boolean; allowReserved?: boolean; } export interface RequestBodyObject { description?: string; content: { [media: string]: MediaTypeObject; }; required?: boolean; } export interface ResponsesObject { [code: string]: ReferenceObject | ResponseObject; } export interface ResponseObject { description: string; headers?: { [header: string]: ReferenceObject | HeaderObject; }; content?: { [media: string]: MediaTypeObject; }; links?: { [link: string]: ReferenceObject | LinkObject; }; } export interface LinkObject { operationRef?: string; operationId?: string; parameters?: { [parameter: string]: any; }; requestBody?: any; description?: string; server?: ServerObject; } export interface CallbackObject { [url: string]: PathItemObject; } export interface SecurityRequirementObject { [name: string]: string[]; } export interface ComponentsObject { schemas?: { [key: string]: ReferenceObject | SchemaObject; }; responses?: { [key: string]: ReferenceObject | ResponseObject; }; parameters?: { [key: string]: ReferenceObject | ParameterObject; }; examples?: { [key: string]: ReferenceObject | ExampleObject; }; requestBodies?: { [key: string]: ReferenceObject | RequestBodyObject; }; headers?: { [key: string]: ReferenceObject | HeaderObject; }; securitySchemes?: { [key: string]: ReferenceObject | SecuritySchemeObject; }; links?: { [key: string]: ReferenceObject | LinkObject; }; callbacks?: { [key: string]: ReferenceObject | CallbackObject; }; } export type SecuritySchemeObject = HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme; export interface HttpSecurityScheme { type: 'http'; description?: string; scheme: string; bearerFormat?: string; } export interface ApiKeySecurityScheme { type: 'apiKey'; description?: string; name: string; in: string; } export interface OAuth2SecurityScheme { type: 'oauth2'; flows: { implicit?: { authorizationUrl: string; refreshUrl?: string; scopes: { [scope: string]: string; }; }; password?: { tokenUrl: string; refreshUrl?: string; scopes: { [scope: string]: string; }; }; clientCredentials?: { tokenUrl: string; refreshUrl?: string; scopes: { [scope: string]: string; }; }; authorizationCode?: { authorizationUrl: string; tokenUrl: string; refreshUrl?: string; scopes: { [scope: string]: string; }; }; }; } export interface OpenIdSecurityScheme { type: 'openIdConnect'; description?: string; openIdConnectUrl: string; } export interface TagObject { name: string; description?: string; externalDocs?: ExternalDocumentationObject; } } /** The Address Claim represents a physical mailing address in OpenID Connect UserInfo response message. This object is modeled according to: http://openid.net/specs/openid-connect-basic-1_0.html#AddressClaim */ export declare interface OpenIdUserInfoAddress { /** Full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information. */ street_address?: string | null; /** City or locality component. */ locality?: string | null; /** Zip code or postal code component. */ postal_code?: string | null; } /** Part of the OpenId specification that is supported by Salaxy federated authentication / Authorization. */ export declare interface OpenIdUserInfoSupportedClaims { /** REQUIRED. Issuer Identifier for the Issuer of the response. The iss value is a case-sensitive URL using the https scheme that contains scheme, host, and optionally, port number and path components and no query or fragment components. */ iss?: string | null; /** In Salaxy federation this should be the federation endpoint: "https://secure.salaxy.com/security/federation" in production OR "https://test-api.salaxy.com/security/federation" in the test environment. From the spec: REQUIRED. Audience(s) that this ID Token is intended for. It MUST contain the OAuth 2.0 client_id of the Relying Party as an audience value. It MAY also contain identifiers for other audiences. In the general case, the aud value is an array of case-sensitive strings. In the common special case when there is one audience, the aud value MAY be a single case-sensitive string. */ aud?: string | null; /** REQUIRED. Expiration time on or after which the ID Token MUST NOT be accepted for processing. The processing of this parameter requires that the current date/time MUST be before the expiration date/time listed in the value. Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew. Its value is a JSON [RFC7159] number representing the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular. */ exp?: number | null; /** REQUIRED. Subject - Identifier for the End-User at the Issuer. */ sub: string; /** End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. NOTE: In creating account etc., Salaxy will use given_name and family_name separately and therefore ignore the name. */ name?: string | null; /** Given name(s) or first name(s) of the End-User. */ given_name?: string | null; /** Surname(s) or last name(s) of the End-User. */ family_name?: string | null; /** URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. */ picture?: string | null; /** End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 2.5.3. */ email?: string | null; /** True if the End-User's e-mail address has been verified; otherwise false. IMPORTANT: In Salaxy federation context, avoid sending non-confirmed e-mails. This may later become an error without being considered a breaking change. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. */ email_verified?: boolean | null; /** End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. */ birthdate?: string | null; /** End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. */ locale?: string | null; /** End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. */ phone_number?: string | null; /** True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. */ phone_number_verified?: boolean | null; /** End-User's preferred postal address. The value of the address member is a JSON [RFC4627] structure containing some or all of the members defined in Section 2.5.1. */ address?: OpenIdUserInfoAddress | null; /** Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time. */ updated_at?: number | null; /** Salaxy extension to Open ID Connect UserInfo claims for Company federation. */ "https://salaxy.com/federation/company"?: UserInfoCompanyAccount | null; /** Salaxy extension to Open ID Connect UserInfo claims for Personal account federation. */ "https://salaxy.com/federation/person"?: UserInfoPersonAccount | null; /** Salaxy extension to Open ID Connect UserInfo claims for Application data. */ "https://salaxy.com/federation/app"?: UserInfoApplication | null; } /** OtherCompensationKind enumeration */ export declare enum OtherCompensationKind { Undefined = "undefined", MeetingFee = "meetingFee", LectureFee = "lectureFee", PositionOfTrustCompensation = "positionOfTrustCompensation", AccruedTimeOffCompensation = "accruedTimeOffCompensation", MembershipOfGoverningBodyCompensation = "membershipOfGoverningBodyCompensation", MonetaryGiftForEmployees = "monetaryGiftForEmployees", UseCompensationAsEarnedIncome = "useCompensationAsEarnedIncome", UseCompensationAsCapitalIncome = "useCompensationAsCapitalIncome", OtherTaxableIncomeAsEarnedIncome = "otherTaxableIncomeAsEarnedIncome", StockOptionsAndGrants = "stockOptionsAndGrants", EmployeeInventionCompensation = "employeeInventionCompensation", CapitalIncomePayment = "capitalIncomePayment", WorkEffortBasedDividendsAsWage = "workEffortBasedDividendsAsWage", WorkEffortBasedDividendsAsNonWage = "workEffortBasedDividendsAsNonWage", EmployeeStockOption = "employeeStockOption", EmployeeStockOptionWithLowerPrice = "employeeStockOptionWithLowerPrice", CopyrightRoyaltiesEarnedIncome = "copyrightRoyaltiesEarnedIncome", StockGrantPaidInMoney = "stockGrantPaidInMoney", EmployeeStockOptionPaidInMoney = "employeeStockOptionPaidInMoney" } /** Handles the Calculation of CalculationRowType.OtherCompensation to IrRows */ export declare interface OtherCompensationUsecase { /** Primary subtyping of the usecase. */ kind?: OtherCompensationKind | null; } /** Client-side logic for OtherCompensationUsecase */ export declare class OtherCompensationUsecaseLogic extends BaseUsecaseLogic { /** Gets validation message */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private getCodeData; private isIrIncomeTypeLabel; } /** * Methods for testing the API. * Note that getWelcomeDataWorker() is currently used in Wecome component. * TODO: Remove getWelcomeDataWorker() and then remove the entire class. */ export declare class Overview { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Makes an OData query over all objects within the current account. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ getAllData(query: ODataQueryOptions | string): Promise>; /** * Gets the welcome page data for a Worker account. */ getWelcomeDataWorker(): Promise; private getShortMessage; } /** Contains additional info of the owned company. */ export declare interface OwnedCompanyInfo { /** Total count of shares. */ totalNumberOfShares?: number | null; } export declare interface Ownership { /** If true, authorities require tracking the shareholders. In Finland, with current legistlation, this is if a shareholder has over 25% of the shares. */ isRequiredTracking?: boolean | null; /** List of shareholders for the company */ shareHolders?: Shareholder[] | null; } export declare interface PageResultOfAccountingTargetListItem { items?: AccountingTargetListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfApiListItem { items?: ApiListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfBrandListItem { items?: BrandListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfCalculationListItem { items?: CalculationListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfCalendarEventListItem { items?: CalendarEventListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfCustomerInvoiceListItem { items?: CustomerInvoiceListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfDatasetListItem { items?: DatasetListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfEmploymentListItem { items?: EmploymentListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfFileListItem { items?: FileListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfHolidayYearListItem { items?: HolidayYearListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfHouseholdYearListItem { items?: HouseholdYearListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfInvoiceListItem { items?: InvoiceListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfMessageListItem { items?: MessageListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfPayrollListItem { items?: PayrollListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfPrimaryPartnerListItem { items?: PrimaryPartnerListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfRecordListItem { items?: RecordListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfReferenceObjectListItem { items?: ReferenceObjectListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfSampleListItem { items?: SampleListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfServiceModelListItem { items?: ServiceModelListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfTaxcardListItem { items?: TaxcardListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfUsecaseListItem { items?: UsecaseListItem[] | null; nextPageLink?: string | null; count?: number | null; } export declare interface PageResultOfWorkerListItem { items?: WorkerListItem[] | null; nextPageLink?: string | null; count?: number | null; } /** PaidSickLeaveKind enumeration */ export declare enum PaidSickLeaveKind { Undefined = "undefined", PaidSickLeaveSalary = "paidSickLeaveSalary", PaidSickLeaveHourlySalary = "paidSickLeaveHourlySalary", PaidSickLeaveMonthlySalary = "paidSickLeaveMonthlySalary" } /** Handles the Calculation of CalculationRowType.PaidSickLeave to IrRows */ export declare interface PaidSickLeaveUsecase { /** Primary subtyping of the usecase. */ kind?: PaidSickLeaveKind | null; } /** Client-side logic for PaidSickLeaveUsecase */ export declare class PaidSickLeaveUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * param row Row to update. */ updateUsecase(): void; /** Gets validation message for IrIncomeTypeUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** Information about a Customer account for a Partner */ export declare interface PartnerCompanyAccountInfo { /** Account Id */ accountId?: string | null; /** Account Id formatted for dispaly to end user */ accountIdFormatted?: string | null; /** Avatar for display information */ avatar?: Avatar | null; /** If true, the account has a verified owner. */ isVerified?: boolean | null; /** If true, the current user (the partner) is authorized to access the account */ isAuthorized?: boolean | null; /** The partner account ID to which the access is currently restricted. */ partnerAccountId?: string | null; } /** Defines how the primary partner services the customer TODO: To be designed, see G:\My Drive\Tech\Phase 7\Settings\Palvelumallit.pptx */ export declare interface PartnerServiceModel { /** The main product package that defines the product features. */ features?: ServiceModelFeatures | null; /** Picing settings. */ pricing?: ServiceModelPricing | null; /** Partner branding settings: site logo, css etc. */ branding?: ServiceModelBranding | null; /** Default site for customers. */ site?: ServiceModelSite | null; } /** * API for partner services, like pension, insurance and health care. */ export declare class PartnerServices { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Returns a new Varma pension order with default values for the current account. */ getNewVarmaPensionOrder(): Promise; /** * Validate the given Varma pension order in the server. */ validateVarmaPensionOrder(order: VarmaPensionOrder): Promise; /** * Send a new Varma pension order for later processing. */ sendVarmaPensionOrder(order: VarmaPensionOrder): Promise; /** * Returns a new Local Tapiola Insurance order with default values for the current account. */ getNewLocalTapiolaInsuranceOrder(): Promise; /** * Validate the given Local Tapiola Insurance order in the server. */ validateLocalTapiolaInsuranceOrder(order: LocalTapiolaInsuranceOrder): Promise; /** * Send a new Local Tapiola Insurance order for later processing. */ sendLocalTapiolaInsuranceOrder(order: LocalTapiolaInsuranceOrder): Promise; } /** PayerSummaryReportStatus enumeration */ export declare enum PayerSummaryReportStatus { New = "new", Scheduled = "scheduled", Succeeded = "succeeded", Canceled = "canceled", Error = "error", Invalid = "invalid" } /** PaymentChannel enumeration */ export declare enum PaymentChannel { Undefined = "undefined", Test = "test", ZeroPayment = "zeroPayment", External = "external", PalkkausManual = "palkkausManual", PalkkausWS = "palkkausWS", PalkkausPersonal = "palkkausPersonal", PalkkausInvoices = "palkkausInvoices", PalkkausCfaPaytrail = "palkkausCfaPaytrail", PalkkausCfaReference = "palkkausCfaReference", PalkkausCfaFinvoice = "palkkausCfaFinvoice", PalkkausEcfaPaytrail = "palkkausEcfaPaytrail", PalkkausEcfaReference = "palkkausEcfaReference", PalkkausEcfaFinvoice = "palkkausEcfaFinvoice", PalkkausCfaTest = "palkkausCfaTest", AccountorGo = "accountorGo", TalenomOnline = "talenomOnline", TalenomCfa = "talenomCfa", HolviCfa = "holviCfa", FinagoSolo = "finagoSolo", Procountor = "procountor", Kevytyrittaja = "kevytyrittaja", VismaNetvisor = "vismaNetvisor", Askelma = "askelma", Briox = "briox", Lemonaid = "lemonaid", Laskupiste = "laskupiste", Holvi = "holvi", Kompassi = "kompassi", Domus = "domus", PasseliMerit = "passeliMerit", Odoo = "odoo", Ecom = "ecom", Kitsas = "kitsas" } /** * Payment channels are methods that hanlde salary payments: * Paytrail / Palkkaus.fi Customer funds account handling, Finvoice, Accounting software, Banks Web Services etc. * This controller is for those channels to fetch Invoices and other data as well as to update payment feedback back to Palkkaus.fi. * The services can only be used by registered payment channels: Ask us if you wish to register. */ export declare class PaymentChannelApi extends CrudApiBase { private paymentChannel; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL is set by the constructor because it is using the paymentChannel as part of URL. */ protected baseUrl: string; /** Creates a new API class for a given PaymentChannel */ constructor(paymentChannel: PaymentChannel, ajax: Ajax); /** * NOTE: Direct Save is currently not supported. * Use createInvoices and updateStatus instead. * This method is only for compatibility with CrudApiBase and in expectation of future needs (non-salary invoices). * @param itemToSave - The item that is updated/inserted. * @throws Not supported */ save(itemToSave: Invoice): Promise; /** * Client-side (synchronous) method for getting a new blank item as bases for UI binding. * NOTE: At the moment, this method is pretty useless as you cannot save invoice items: * You need to create them using createInvoice() method based on a calculation. */ getBlank(): Invoice; /** * Gets invoices with their full payload - including PDF content - filtering by a status. * NOTE: This is designed mainly for long-running batch processes for reading unread Invoices. * They can read the items in one read. For browser process we suggest OData query (with list item) * and then fetching items one-by-one. * This is for more http-queries, but each taking a shorter time so you can use ) * @param status Status filter for the query. Default is unread. * @param start Optional start date for the period to query the invoices. If not set, defaults to last 14 days. * @param end Optional end date for the period to query the invoices. If not set, today is used. * @param dateKind Optional date specifier for the period: invoicing date (default), due date or logical date (like salary date). * @returns Invoices which have been created in the Invoices queue. */ getInvoicesByStatus(status?: InvoiceStatus, start?: DatelyObject, end?: DatelyObject, dateKind?: InvoiceDateKind): Promise; /** * Makes an OData query to the service's main OData method. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ getOData(query: ODataQueryOptions | string): Promise>; /** * Gets all the items of a given type. * @throws Not supported */ getAll(): Promise; /** * Gets a single item based on identier * @param id - Unique identifier for the object * @returns A Promise with result data. */ getSingle(id: string): Promise; /** * Updates the payment statuses of invoices. * @param data Array of invoices to update. */ updateStatus(data: InvoiceStatusNotification[]): Promise; /** * Returns content (PDF) url for an invoice. * @param id The id of the invoice. * @param inline If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). */ getContentUrl(id: string, inline?: boolean): string; } /** Channel-specific payment settings */ export declare interface PaymentChannelSettings { /** Identifies the channel */ channel?: PaymentChannel | null; /** If true, the channel is enabled for the current user */ isEnabled?: boolean | null; /** Read-only property that tells whether the payment channel is available in the current session. */ isAvailable?: boolean | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** * Data that is used in editing Payment Channel settings in an external window. * Combines Payment channel settings and attributes in to one object. */ export declare interface PaymentChannelSettingsInfo { /** Identifier of the channel: The PaymentChannel enum value. */ id: PaymentChannel; /** If true, the channel is the default channel for the current user */ isDefault: boolean; /** The settings object for the channel */ settings: { /** If true, the channel is enabled for the current user */ isEnabled: boolean; /** If true, the channel is available for selection */ isAvailable: boolean; /** Identifier of the accounting target that specifies how the accounting data is exported as part of payment. */ accountingTargetId?: string; /** Channel specific data stored in the settings. */ data: any; }; /** The customer funds settings. Sent only to Palkkaus CFA setup screens. */ customerFundsSettings?: { /** If true, worker salary and expense payments are paid directly by the employer. */ isWorkerSelfHandling: boolean; /** If true, the user handles the reporting and payments himself/herself. */ isPensionSelfHandling: boolean; /** * True for partner pension companies. * If false, isPensionSelfHandling is always true: it cannot be changed without chaning the pension company. */ isPensionIncludedSupported: boolean; /** If true, tax and social security payments are paid directly by the employer. */ isTaxAndSocialSecuritySelfHandling: boolean; }; /** The invoice settings. Sent only to channels that are allowed to modify bank account number etc. */ invoiceSettings?: { /** Receiver's address for the e-invoice. */ eInvoiceReceiver: string; /** Receiver's operator for the e-invoice. */ eInvoiceIntermediator: string; /** SEPA maksatustunnus */ sepaBankPartyId: string; /** Bank account IBAN number used in generating invoices. */ ibanNumber: string; }; } /** * Business logic relating to payments. */ export declare class PaymentLogic { /** * OBSOLETE * @deprecated This is not any more updated and should not be used. */ static getEInvoiceIntermediators(): any; } /** PaymentMethod enumeration */ export declare enum PaymentMethod { Undefined = "undefined", Sepa = "sepa", Siirto = "siirto", Test = "test" } /** Payment related settings. */ export declare interface PaymentSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Settings related to payment methods that use the customer funds account (gross payment). */ customerFunds?: CustomerFundsSettings | null; /** Settings related to invoices: Either salary payment or other invoicing. */ invoice?: InvoiceSettings | null; /** The default channel when making payments. */ defaultChannel?: PaymentChannel | null; /** Channel specific settings. */ channels?: PaymentChannelSettings[] | null; } /** PaymentStatus enumeration */ export declare enum PaymentStatus { New = "new", SentToBank = "sentToBank", BankTechApproval = "bankTechApproval", BankDelivered = "bankDelivered", BankPartialError = "bankPartialError", BankError = "bankError", Paid = "paid", Unknown = "unknown", Cancelled = "cancelled" } /** Provides Read-only information about the Payroll In the case of non-paid Payrolls, this is the latest save/validation. In the case of paid Payrolls, this is the status of the Payroll when it was paid. */ export declare interface Payroll03Info { /** Date that the Info was last updated. */ date?: string | null; /** Count of calculations in this Payroll */ calcCount?: number | null; /** Total gross salary */ totalGrossSalary?: number | null; /** Total payment for the Payroll. */ totalPayment?: number | null; /** Total Palkkaus.fi fees for the Payroll */ fees?: number | null; /** If true, all calculations have been validated and they are valid for payment. If false, validation has not been done or some calculations are not valid for payment. */ isReadyForPayment?: boolean | null; /** Status for the payroll and its calculations in the payment Workflow. */ status?: PayrollStatus | null; /** Due date for the payroll. Date when the payment should be made to achieve SalaryDate. */ dueDate?: string | null; /** Paid at date for the payroll. (Date of the employer's payment). */ paymentDate?: string | null; /** The estimated date when the salary is withdrawable by the worker. */ salaryDate?: string | null; /** The reference number of the payment after payment is made. */ paymentId?: string | null; /** Original Payment reference number */ originalPaymentId?: string | null; /** Application id for invoicing etc. purposes. */ applicationId?: string | null; /** The MessageThread Id, if this payroll is referred in a message thread. */ messageThreadId?: string | null; } /** Payroll specific business data for index. */ export declare interface PayrollData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Title that can be specified by the end user. */ title?: string | null; /** What types of wages are paid with this payroll. May affect the rendering of the user interface (e.g. for holidays, hours and absences). Also affects which Workers are show in the add / link dialog by default. */ wageBasis?: WageBasis | null; /** Due date for the payroll. Date when the payment should be made to achieve SalaryDate. */ dueDate?: string | null; /** If true, all calculations have been validated and they are valid for payment. If false, validation has not been done or some calculations are not valid for payment. */ isReady?: boolean | null; /** Paid at date for the payroll. (Date of the employer's payment). */ paymentDate?: string | null; /** Start date of the default salary period */ periodStart?: string | null; /** End date of the default salary period */ periodEnd?: string | null; /** Count of calculations in this Payroll */ calcCount?: number | null; /** If the Payroll is based on a template, this is the identifier of the template. */ template?: string | null; /** ID of the calendar event that is scheduling creation of occurences from this template. */ calendarEvent?: string | null; /** ID of the calendar event that created this occurence. */ calendarOccurence?: string | null; /** The MessageThread Id, if this payroll is referred in a message thread. */ messageThreadId?: string | null; /** Payment channel. */ paymentChannel?: PaymentChannel | null; } /** New version 03 of Payroll. Payroll (Palkkalista) is a list of employees who receive salary or wages from a particular organization. Typical usecase is that a a company has e.g. a monthly salary list that is paid at the end of month. For next month, a copy is then made from the latest list and the copy is potentially modified with the changes of that particular month. */ export declare interface PayrollDetails { /** Input that defines the Payroll. */ input?: PayrollInput | null; /** General summary information about the Payroll and when it was las processed. */ info?: Payroll03Info | null; /** Snapshots of the calculations based on the ID's specified in Info */ calcs?: Calculation[] | null; /** When saved or validated, provides a validation object for each calculation: Whether the calculations are ready for payment. */ validations?: ApiListItemValidation[] | null; /** A usecase for creating and editing Payroll lists. In practice, a usecase is either a user interface or a microservice that provides a Payroll processing and it may be implemented outside Salaxy. Provides the possibility to store useacase specific data as part of the Payroll. */ usecase?: UsecaseData | null; /** The workflow data for manual editing and approval purposes. */ workflowData?: WorkflowData | null; /** Stores the data for automation */ automation?: ApiAutomation | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Input that user defines about the Payroll */ export declare interface PayrollInput { /** Title that can be specified by the end user. */ title?: string | null; /** The Default Salary period for the Payroll. This may be overriden for an individual calculation. */ period?: DateRange | null; /** The requested date for the SalaryDate from the employer. */ salaryDate?: string | null; /** Defines the re-setting of the salary date in the calculation re-calculation. */ salaryDateKind?: SalaryDateKind | null; /** Channel that is used for payment. */ paymentChannel?: PaymentChannel | null; /** What types of wages are paid with this payroll. May affect the rendering of the user interface (e.g. for holidays, hours and absences). Also affects which Workers are show in the add / link dialog by default. */ wageBasis?: WageBasis | null; /** If true, the calculation rows are not updated from employment when the Payroll is copied. Default is that the rows and other data is updated in copy / create new etc. */ noUpdateFromEmployment?: boolean | null; /** If the Payroll is based on a template, this is the identifier of the template. The field can be manually set to null / ID to break / reconnect that connection. */ template?: string | null; /** List of calculations that are attached to this calculation. */ calculations?: string[] | null; /** Identifier of the payroll in a source system. Used in imports etc. */ sourceId?: string | null; } /** Represents a single item in a list of payrolls in the user interface. It contains header data of the payroll and is basis for searching, filtering and sorting. */ export declare interface PayrollListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: PayrollStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: PayrollData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Logic related to Payroll. */ export declare class PayrollLogic { /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ static getBlank(): PayrollDetails; } /** * Provides CRUD access for authenticated user to access a his/her own PayrollDetails objects */ export declare class Payrolls extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Saves an item to the storage. * If id is null, this is add/insert. If id exists, this is update. * @param itemToSave - The item that is updated/inserted. * @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.). */ save(itemToSave: PayrollDetails): Promise; /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): PayrollDetails; /** Because of historical reasons, Payrolls v03 has a non-standard endpoint for OData methods. */ getODataUrl(): string; /** * Validates a PayrollDetails object for payment. * @param payrollToValidate PayrollDetails that should be validated. * @returns The PayrollDetails object with Calculations added to the Result object and Validated. */ validate(payrollToValidate: PayrollDetails): Promise; /** * Saves changes to to a Calculation that is part of a Payroll and returns the Paryoll validation data. * @param calc The calculation object that is updated. * @param payrollId Payroll ID where calculation belongs to. * Note, that the current implementation does not assure that the calculation is within a Payroll. * The ID is simply used for assuring corrrect data in Calculation. * @returns The Saved Payroll object with Calculations added to the Result object and Validated. */ calculationSave(calc: Calculation, payrollId: string): Promise; /** * Adds existing calculations to the the payroll and saves the payroll object. * If calculation is read-only, a copy is made. If it is draft, the calculation is moved. * @param payroll The Payroll object to update and save. * @param calculationIds Array of calculation id's that are copied / moved to the Payroll list. * @returns The Saved Payroll object with Calculations added to the Result object and Validated. */ addCalculations(payroll: PayrollDetails, calculationIds: string[]): Promise; /** * Remove calculations from the payroll and saves the payroll object. * The calculations are completely deleted. * This can only be done if the calculations and the payroll have not been paid yet. * @param payroll The Payroll object. * @param calculationIds Array of calculation id's that are deleted. * @returns The Saved Payroll object with Calculations removed from the Result object and Validated. */ deleteCalculations(payroll: PayrollDetails, calculationIds: string[]): Promise; /** * Remove calculations from the payroll and saves the payroll object. * The calculations are unlinked and they become individual calculations in the draft list (and can then be processed individually). * This can only be done if the calculations and the payroll have not been paid yet. * @param payroll The Payroll object. * @param calculationIds Array of calculation id's that are unlinked from the Payroll list. * @returns The Saved Payroll object with Calculations removed from the Result object and Validated. */ unlinkCalculations(payroll: PayrollDetails, calculationIds: string[]): Promise; /** * Adds new calculations to the the payroll and saves the payroll object. * The calculations are added based on employment relation ID's. * @param payroll The Payroll object to update and save. * @param employmentIds Array of employment relation id's for which the a new calculation is added to the Payroll list. * @returns The Saved Payroll object with Calculations added to the Result object and Validated. */ addEmployments(payroll: PayrollDetails, employmentIds: string[]): Promise; /** * Cancels the invoice or payment processing for the given payroll. * Please note that this is possible only if the channel supports the cancel action. * @param id Payroll for which the cancellation is requested. * @returns Payroll which have been cancelled. */ cancel(id: string): Promise; } /** * EXPERIMENTAL v4 version of the Payrolls API. * NOTE: This is just a quick hack version => Not for production before complete review!! */ export declare class Payrolls4 extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Saves the Payroll object to the storage. * If id is null, this is add. If id exists, this is update. * @param payroll - The Payroll object to add or update. * @param options - Further save options. * @param options.applyEmploymentDefaultRows - If true, applies the employment default rows to the calculation when creating a new payroll. * @returns The saved Payroll object. */ save(payroll: PayrollDetails, options?: { applyEmploymentDefaultRows: boolean; }): Promise; /** Client-side (synchronous) method for getting a new Payroll object as bases for UI binding. */ getBlank(): PayrollDetails; /** * Adds new calculations to the the Payroll and saves the Payroll object. * The calculations are added based on employment relation id's. * @param id The Id of the Payroll object to update and save. * @param employmentIds Array of employment relation id's for which the a new calculation is added to the Payroll list. * @returns Added calculations as list items. */ addEmployments(id: string, employmentIds: string[]): Promise; /** * Makes an OData query to the calculations of a single Payroll. * @param id The id of the payroll. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ getCalcsOData(id: string, query: ODataQueryOptions | string): Promise>; /** * Adds or updates the calculations to the the Payroll and saves the Payroll object. * If calculation is read-only, a copy is made. * @param id The id of the Payroll object to update and save. * @param calculationIds Array of calculation ids that are added or updated to the Payroll list. * @returns Added or updated calculations as list items. */ addCalculations(id: string, calculationIds: string[]): Promise; /** * Adds or updates the calculations to the the Payroll and saves the Payroll object. * If calculation is read-only, a copy is made. * @param id The id of the Payroll object to update and save. * @param calcsOrIds Array of calculations or calculation ids that are added or updated to the Payroll list. * @param applyWorktime If true, resolves, recalculates and updates holidays and absences to the given calculations. * @returns Added or updated calculations as list items. */ saveCalculations(id: string, calcsOrIds: Calculation[], applyWorktime?: boolean): Promise; /** * Adds or updates the calculations to the the Payroll and saves the Payroll object. * If calculation is read-only, a copy is made. * @param id The id of the Payroll object to update and save. * @param calcsOrIds Array of calculations or calculation ids that are added or updated to the Payroll list. * @param applyWorktime If true, resolves, recalculates and updates holidays and absences to the given calculations. * @returns Added or updated calculations as list items. */ saveCalculations(id: string, calcsOrIds: string[], applyWorktime?: boolean): Promise; /** * Merges the calculations by employment to the the Payroll and saves the Payroll object. * If calculation is read-only, a copy is made. * @param id The id of the Payroll object to update and save. * @param calculationIds Array of calculation ids that are added or updated to the Payroll list. * @param removeImportedRows If true, removes the imported rows (rows with sourceId) from the calculation. * @param applyEmploymentDefaultRows If true, applies the employment default rows to the calculation. * @returns Added or updated calculations as list items. */ mergeCalculations(id: string, calculationIds: string[], removeImportedRows?: boolean, applyEmploymentDefaultRows?: boolean): Promise; /** * Removes the calculation from the Payroll and saves the Payroll object. * The calculation is completely deleted. * This can only be done if the calculation and the payroll have not been paid yet. * @param id The id of the Payroll object. * @param calculationId The id of the calculation to be removed from the Payroll list and deleted. * @returns The Saved Payroll object. */ deleteCalculation(id: string, calculationId: string): Promise; /** * Removes the calculation from the Payroll and saves the Payroll object. * The calculation is unlinked and it becomes an individual calculation in the draft list (and can then be processed individually). * This can only be done if the calculation and the payroll have not been paid yet. * @param id The id of the Payroll object. * @param calculationId The id of the calculation which is unlinked from the Payroll list. * @returns The Saved Payroll object. */ unlinkCalculation(id: string, calculationId: string): Promise; /** * Cancels the invoice or payment processing for the given Payroll. * Please note that this is possible only if the channel supports the cancel action. * @param id The id of the Payroll for which the cancellation is requested. * @param calculationIds Array of calculation id's that are cancelled. * @param excludePeriodicInvoices If true, excludes the periodic invoice adjust operation. * @returns The Saved Payroll object. */ cancelInvoices(id: string, calculationIds: string[], excludePeriodicInvoices?: boolean): Promise; /** * Returns the invoice preview data for the given Payroll and calculations. * @param id The id of the Payroll for which the preview is requested. * @param calculationIds Array of calculation id's for which the preview is generated. * @param excludePeriodicInvoices If true, excludes the periodic invoices from the preview. * @returns Array of invoice preview objects. */ previewInvoices(id: string, calculationIds: string[], excludePeriodicInvoices?: boolean): Promise; /** * Creates invoices for the given Payroll and calculations. * @param id The id of the Payroll for which the invoices are created. * @param calculationIds Array of calculation id's for which the invoices are created. * @param excludePeriodicInvoices If true, excludes the periodic invoices from the creation. * @returns Array of invoice objects. */ createInvoices(id: string, calculationIds: string[], excludePeriodicInvoices?: boolean): Promise; } /** PayrollStatus enumeration */ export declare enum PayrollStatus { Draft = "draft", PaymentStarted = "paymentStarted", PaymentSucceeded = "paymentSucceeded", PaymentCanceled = "paymentCanceled", PaymentError = "paymentError", WaitingApproval = "waitingApproval", Handled = "handled", Template = "template" } /** PensionCalculation enumeration */ export declare enum PensionCalculation { Undefined = "undefined", Employee = "employee", Entrepreneur = "entrepreneur", Farmer = "farmer", PartialOwner = "partialOwner", Athlete = "athlete", Compensation = "compensation", BoardRemuneration = "boardRemuneration", SmallEntrepreneur = "smallEntrepreneur", SmallFarmer = "smallFarmer", PublicSector = "publicSector" } /** PensionCompany enumeration */ export declare enum PensionCompany { None = "none", Etera = "etera", Ilmarinen = "ilmarinen", Elo = "elo", PensionsAlandia = "pensionsAlandia", Varma = "varma", Veritas = "veritas", Apteekkien = "apteekkien", Verso = "verso", KevaMunicipal = "kevaMunicipal", KevaAland = "kevaAland", KevaChurch = "kevaChurch", KevaKela = "kevaKela", KevaState = "kevaState", Valio = "valio", Other = "other" } /** Defines a pension contract. */ export declare interface PensionContract { /** The pension company where the user has a contract. */ company?: PensionCompany | null; /** The pension contract number that should be validated accordingly. */ contractNumber?: string | null; /** Sub organization code for the Incomes Registry. */ subOrgCode?: string | null; /** Pension discount percent. */ pensionDiscountPercent?: number | null; /** Custom pension percent. */ pensionPercent?: number | null; /** Read only pension percent which is valid if pension percent is not set. */ readonly pensionDefaultPercent?: number | null; /** Unique identifier (guid) for the contract. The value is automaticallyh added on the server side: Any input is ignored/invalid. Set as null for new contracts. */ id?: string | null; /** Status of the contract */ status?: SettingsStatus | null; /** If specified, defines the start date for the contract. If in the future, the the contract is inactive. Null (default) means the contract is valid indefinetely from the past. */ startDate?: string | null; /** If specified, defines the end date for the contract. Date is inclusive meaning that if EndDate is 31.12., contract is valid until end-of-year: Valid on 31.12. and invalid 1.1. If in the past, the the contract is inactive. Null (default) means the contract is valid indefinetely to future. */ endDate?: string | null; } export declare interface PensionEntrepreneurProduct { readonly status?: string | null; /** If true, user wants to order a YEL-contract. */ tempContractMarker?: boolean | null; /** Enabled property set automatically by TempContractMarker. */ enabled?: boolean | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** Pension for Workers: The payments and monthly reporting. */ export declare interface PensionProduct { readonly status?: string | null; /** The use has a pension contract done (as opposed to acting as a temporary employer that pays the pension without a acontract). */ isPensionContractDone?: boolean | null; /** The pension company where the user has a contract. */ pensionCompany?: PensionCompany | null; /** Number for the contract. */ pensionContractNumber?: string | null; /** If true, the user handles the reporting and payments himself/herself. */ isPensionSelfHandling?: boolean | null; /** If true, there is a new pending contract. */ isPendingContract?: boolean | null; /** Enabled property set automatically by IsPensionSelfHandling. */ enabled?: boolean | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** PensionRule enumeration */ export declare enum PensionRule { Default = "default", MonthlyLowerLimit = "monthlyLowerLimit" } /** PeriodDateKind enumeration */ export declare enum PeriodDateKind { PaidAtDate = "paidAtDate", SalaryDate = "salaryDate", WorkDate = "workDate", WorkDateStart = "workDateStart", WorkDateEnd = "workDateEnd" } /** Data that is needed for determening PeriodRecalculationParams and thus at the end recalculating holidays and absences to a calculation. */ export declare interface PeriodRecalculationData { /** The salary calculation that should be recalculated. */ calc?: Calculation | null; /** Current employment data. */ employment?: Employment | null; /** Holiday year with holidays that should be added as salary rows. If not provided, holidays are not calculated. */ holidayYear?: HolidayYear | null; /** Absences that should be deducted from monthly salary. If not provided, absences are not calculated. */ absences?: WorkerAbsences | null; } /** PeriodType enumeration */ export declare enum PeriodType { Month = "month", Quarter = "quarter", Year = "year", Custom = "custom" } /** An account for a Person - can be both Employer and Worker */ export declare interface PersonAccount { /** Information about the verification of the account. NOTE that this object may not be present in many method calls - this is because it contains confidential information. */ identity?: Identity | null; /** Type of the last login - the user role */ lastLoginAs?: WebSiteUserRole | null; /** Contact verification pin for securing contact address changes. */ contactVerificationPin?: string | null; /** Entity type of the account. Type PersonCreatedByEmployer means that the Worker has not yet signed into the system and there may be multiple instances of the same logical person (Official ID) - one for each employer. */ entityType?: LegalEntityType | null; /** If true the object Account is and Employer account - it has the EmployerInfo object */ isEmployer?: boolean | null; /** If true the object Account is and Worker account - it has the WorkerInfo object */ isWorker?: boolean | null; /** If true, the account has been verified. Typically this means a digitally signed contract. This means that the account also has an Identity object. However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */ isVerified?: boolean | null; /** Avatar is the visual representation of the Account. */ avatar?: Avatar | null; /** Contact information for the Account. */ contact?: Contact | null; /** Language of the person/company. */ language?: Language | null; /** Service model for the account. */ serviceModelId?: string | null; /** Workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export declare interface PersonInput { /** If true, creates a personal account based on this data. Otherwise this is just user data for Company. */ doCreate?: boolean | null; /** Contact information for the user / personal account */ contact?: Contact | null; /** Verification objects for contact verification. */ contactVerification?: OnboardingContactVerifications | null; /** Finnish Personal ID (Henkilötunnus /HETU) */ personalId?: string | null; /** This is an official name of the actor. It originates from the YTJ or Bank authentication. */ officialName?: string | null; /** If an object with the given PersonalId exists, it is resolved here: The unique ID is set here by the onboarding service. This field cannot be set. */ resolvedId?: string | null; /** First name or company name */ firstName?: string | null; /** Last name, for companies, this should be null */ lastName?: string | null; /** URL of the picture if specified as picture (null in a case of type Icon) */ picture?: string | null; /** Bank account number for salary payment */ bankAccountIban?: string | null; /** Language of the person. */ language?: Language | null; } /** Legacy pricing partner information stored in the Person object */ export declare interface PersonPricingPartner { /** Partner account id. */ accountId?: string | null; /** Pricing model by the partner. */ pricingModel?: PricingModel | null; /** Fee for one calculation, which is visible and paid by customer. This is not relevant if the PricingModel is PalkkausFee */ fixedFee?: number | null; /** Service model by the partner. */ serviceModelId?: string | null; } /** PricingModel enumeration */ export declare enum PricingModel { PalkkausFee = "palkkausFee", NoFee = "noFee", FixedFee = "fixedFee" } /** Defines the pricing partner, service model and pricing model. */ export declare interface PricingProduct { /** Current status of pricing. */ readonly status?: string | null; /** Enabled property set automatically if partner set and partner specific pricing model. */ enabled?: boolean | null; /** Defines the pricing partner, service model and pricing model. */ pricingPartner?: PersonPricingPartner | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** Primary partner specific business data for index. */ export declare interface PrimaryPartnerData { /** Human-readable, human decided, recognizable short unique key for the partner: All lower-case, a-z, 0-9, "-" and "_". Used in URL's etc. */ key?: string | null; /** Display name for the account. */ name?: string | null; /** Description of the primary account. */ description?: string | null; } /** Represents a single item in a list of primary partners in the user interface. It contains all essential information of the report and is basis for searching, filtering and sorting. */ export declare interface PrimaryPartnerListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: PrimaryPartnerData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Settings related to the primary partner, service model and settings */ export declare interface PrimaryPartnerSettings { /** Partner account id. */ accountId?: string | null; /** TODO: Consider is this the right place for the all this info or should we have only the input here. */ info?: AccountantInfo | null; /** If true, the accountant is a registered Palkkaus.fi account who typically has access to this account. */ type?: AccountantType | null; /** Id of the service model. */ serviceModelId?: string | null; /** Defines the service model for the customer. */ serviceModel?: PartnerServiceModel | null; } /** * Methods for PRO users (accountants, integrated services), for fetching data accross multiple accounts * and impersonating as different authorized acccounts: Fetching the token and session. */ export declare class ProApi { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; private routePrefix; constructor(ajax: Ajax); /** Gets the PRO session for the current account (the PRO account) including the Service Model */ getProSession(): Promise; /** Lists all accounts on behalf of which this account has been authorized to act. */ getAccounts(): Promise; /** * Set the current account as primary partner for the account. * @param accountId The account id for which the primary partner is set. * @param serviceModelId Selected service model. * @returns Updated account with the partner set. */ saveAccountPartner(accountId: string, serviceModelId: string): Promise; /** * Remove the current primary partner (current account) from the account. * @param accountId The account id from which the primary partner is removed. * @returns Updated account with the partner removed. */ deleteAccountPartner(accountId: string): Promise; /** * Lists all credentials for this partner account. * @returns Credentials for the partner account. */ getCredentials(): Promise; /** * Returns a new JWT token for the given account. * The requesting user must have access to the account. * @param accountId The account id for which the token is requested. * @returns A valid Salaxy JWT token for the given account */ getToken(accountId: string): Promise; /** * Returns list of payrolls for the current partner (all customers). * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchPayrolls(query?: ODataQueryOptions | string): Promise>; /** * Returns list of invoices for the current partner (all customers). * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchInvoices(query?: ODataQueryOptions | string): Promise>; /** * Returns list of messages for the current partner (all customers). * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchMessages(query?: ODataQueryOptions | string): Promise>; /** * Returns list of editable calculations for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchEditableCalculations(query?: ODataQueryOptions | string): Promise>; /** * Returns list of readonly calculations for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchReadonlyCalculations(query?: ODataQueryOptions | string): Promise>; /** * Returns list of workers for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchWorkers(query?: ODataQueryOptions | string): Promise>; /** * Returns list of files for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchFiles(query?: ODataQueryOptions | string): Promise>; /** * Returns list of taxcards for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchTaxcards(query?: ODataQueryOptions | string): Promise>; /** * Returns list of Earnings Payment Reports (EPR / Palkkatietoilmoitus) * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchEarningsPayments(query?: ODataQueryOptions | string): Promise>; /** * Returns list of Payer Summary Reports (PSR / Erillisilmoitus) * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchPayerSummaries(query?: ODataQueryOptions | string): Promise>; /** * Returns household yearly list items for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. */ oDataSearchHouseholdYears(query?: ODataQueryOptions | string): Promise>; /** * Returns settings list items for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. * TODO: Return type should be Promise> but AccountSettingsListItem is currently not available. See if the typing should be brought to project. */ oDataSearchAccountSettings(query?: ODataQueryOptions | string): Promise>; /** * Returns list of customers for the current partner. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. * TODO: Return type should be Promise> */ oDataSearchCustomers(query?: ODataQueryOptions | string): Promise>; /** * Returns list of customers for the current partner. * @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned. * @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month. * @param endDate End date for the period. Required only for the custom period. * @returns List of customers for the current partner. */ searchCustomers(refDate: string, periodType?: PeriodType, endDate?: string): Promise; } /** * Base inteface for Products. * The common properties for all Products: BaseSalaryProduct, TaxProduct, UnemploymentProduct etc. */ export declare interface Product { /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** The status text that should give the user. Restrict the length to 56 characters. */ readonly status?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If true, the product is enabled for the current user */ enabled?: boolean | null; /** * If false, it is not bossible to enable this product for the current account / environment. * Typically, this means that the UI should not show this product. * E.g. Raksaloki is available for households only and this is a Company account => Should not show the product. */ visible?: boolean | null; } /** ProductListFilter enumeration */ export declare enum ProductListFilter { Available = "available", All = "all" } /** ProductPackage enumeration */ export declare enum ProductPackage { Default = "default", PartnerBasic = "partnerBasic", PartnerPro = "partnerPro" } /** * A progress notification function is used by a long running asynchronous process to notify the * parent process of the progress and statues of the process. * @param message The translated end-user message. * May also be specified by the parent interface as a technical (English) message. * @param index Index of the current item that is being processed. * @param count Optional total count if known by the process. * @param data Optional additional data, e.g. validation data, errors, warnings. */ export declare type progressNotification = (message?: string, index?: number, count?: number, data?: TData) => void; /** * Helpers for handling promises. */ export declare class Promises { /** * Runs promises in sequence (not paralles as in Promise.all) * @param promiseTasks Tasks creating promises to resolve in sequence. * @returns Result array of promises. */ static sequence(promiseTasks: Array<() => Promise>): Promise; } /** * Helpers for generating qr code values. * * @see https://www.finanssiala.fi/wp-content/uploads/2021/03/QR_koodin_kaytto_tilisiirtolomakkeella.pdf */ export declare class QrCodes { /** * Get the value as svg. * * @param bic The BIC code. * @param nameOfReceiver The name of the receiver. * @param iban The IBAN. * @param ref The reference. * @param message The message. * @param amount The amount. * @param dueDate The due date. * @returns The value as svg. */ static getValue(bic: string, nameOfReceiver: string, iban: string, ref?: string | null, message?: string | null, amount?: number, dueDate?: string | false): Promise; } /** Record for storing company or employment details. */ declare interface Record_2 { /** Salaxy ID of the worker / other paty. This value is required when inserting and cannot be edited later. WorkerSnapshot is automatically updated upon save. */ otherId?: string | null; /** Optional entity id, for example the employment relation for the worker. */ entityId?: string | null; /** Entity type of the business object, which the records are targeted to. */ entityType?: string | null; /** Record type. This should be based on customer specific enumeration. */ recordType?: string | null; /** Start date of the record. */ startDate?: string | null; /** End date of the record. */ endDate?: string | null; /** Title for the record */ title?: string | null; /** Textual content */ text?: string | null; /** Attachments. */ attachments?: Attachment[] | null; /** A usecase for creating and editing records. In practice, a usecase is either a user interface or a microservice that provides a salary calculation and it may be implemented outside Salaxy. */ usecase?: UsecaseData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export { Record_2 as Record } /** Record specific business data for index. */ export declare interface RecordData { /** Record type. This should be based on customer specific enumeration. */ recordType?: string | null; /** Key for the usecase based on which it is resolved. Later, this may resolve to a user interface, microservice or a to manifest registering one. For now, just use a unique string starting with a domain you own. */ usecaseUri?: string | null; } /** Represents a single item in a list of records in the user interface. */ export declare interface RecordListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: RecordData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides CRUD access to records. */ export declare class Records extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): Record_2; /** * Returns all distinct record types from all records. * @returns A Promise with result data array. */ getRecordTypes(): Promise; /** * Returns all records for the entity. * @param entityType Entity type of the business object. * @param entityId Optional id for the business object. */ getForEntity(entityType: "account" | "employment" | string, entityId?: string): Promise; /** * Gets the upload URL for attachment files. * This URL is compatible with the HTML forms standard multipart/form-data upload. * @param entityType Entity type of the business object. * @param entityId Optional id for the business object. * @returns The URL for multipart/form-data upload */ getRecordUploadUrl(entityType: "account" | "employment" | string, entityId?: string): string; } /** RecurringEventCreateMode enumeration */ export declare enum RecurringEventCreateMode { Default = "default", CreateRecurrence = "createRecurrence" } /** Reference object. For testing and development purposes only. This object is a typical business object. The implementation is based on the current development conventions. The reference objects have no meaning or use outside development or testing environments, and they should not be used in production for any business purpose. */ export declare interface ReferenceObject { /** Header for the reference object. Contains typical header data of various types. */ header?: ReferenceObjectHeader | null; /** Collection of events for the reference object. */ events?: ReferenceObjectEvent[] | null; /** A usecase for reference objects. In practice, a usecase is either a user interface or a microservice that provides an extension to the default Salaxy functionality, and it may be implemented outside Salaxy. */ usecase?: UsecaseData | null; /** The workflow data for manual editing and approval purposes. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export declare interface ReferenceObjectData { } /** A single event in the collection of events for the reference object. Contains typical row specific data of various types. */ export declare interface ReferenceObjectEvent { /** A free text property, the name of the event. */ name?: string | null; /** Nullable date property, the date for the event. */ date?: string | null; /** Enumerated property, the result for the event. */ result?: BootstrapStyle | null; } /** Header for the reference object. Contains typical header data of various types. */ export declare interface ReferenceObjectHeader { /** A free text property, the description of the object. */ description?: string | null; /** Enumerated property, the status for the object. */ status?: BootstrapStyle | null; /** Nullable date property, the reference date for the object. */ referenceDate?: string | null; } /** List item for Reference object. For testing and development purposes only. This object is a typical list item for the business object. The implementation is based on the current development conventions. The reference objects have no meaning or use outside development or testing environments, and they should not be used in production for any business purpose. */ export declare interface ReferenceObjectListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: BootstrapStyle | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: ReferenceObjectData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * FOR TESTING OR DEVELOPMENT USE ONLY - NOT FOR PRODUCTION USE. * ============================================================= * Provides CRUD access for Reference Objects. * The implementation is based on the current development conventions. * The reference objects have no meaning or use outside development or testing environments, and they * should not be used in production for any business purpose. */ export declare class ReferenceObjects extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): ReferenceObject; } /** Mirrors the typedoc ReflectionKind as union string type. */ export declare type ReflectionKind = "Global" | "ExternalModule" | "Module" | "Enum" | "EnumMember" | "Variable" | "Function" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "ObjectLiteral" | "TypeAlias" | "Event" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue"; /** RemunerationKind enumeration */ export declare enum RemunerationKind { Undefined = "undefined", InitiativeFee = "initiativeFee", BonusPay = "bonusPay", Commission = "commission", PerformanceBonus = "performanceBonus", ShareIssueForEmployees = "shareIssueForEmployees", ProfitSharingBonus = "profitSharingBonus" } /** Handles the Calculation of CalculationRowType.Remuneration to IrRows */ export declare interface RemunerationUsecase { /** Primary subtyping of the usecase. */ kind?: RemunerationKind | null; } /** Client-side logic for RemunerationUsecase */ export declare class RemunerationUsecaseLogic extends BaseUsecaseLogic { /** Gets validation message for IrIncomeTypeUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private getCodeData; } /** Describes a logical generated report. This is a report instance e.g. a monthly report for January 2017. It may contain several files of different types: PDF, preview PNG, HTML etc. */ declare interface Report_2 { /** Short title for the report that can be shown to the end user. */ title?: string | null; /** Report date: For monthly and yearly reports this is the first day of the year/month. For ad-hoc reports, this is the start date of the period. */ reportDate?: string | null; /** Type of the report */ type?: ReportType | null; /** PDF report for viewing and printing. This is typically the main report. For preview and demo, there is typically only HTML version - no PDF. */ pdfUrl?: string | null; /** Thumbnail image for the report. For preview and demo data this is typically a fixed image - the thumbnail is only generated when PDF is generated. */ thumbnail?: string | null; /** HTML for the report. Use salaxy-rpt.css for formatting. For preview and demo, this is the format to show to the user - PDF is not generated. */ htmlUrl?: string | null; /** Some reports are also available in JSON format, from which you can create lists, CSV, Excel files etc. */ jsonUrl?: string | null; /** If true, the report is in preview state, typically in the middle of the month. This means that the data itself is production, its just not final. */ isPreview?: boolean | null; /** If true, the report is created using demo data - should be used only in the beginning when the user has not paid any salaries. This may be e.g. calculations in draft stage or completely invented demo data such as example workers. Demo data should not be confused to test database (test-api.palkkaus.fi / test-api.salaxy.com): Paid calculations in test database are production data. */ isDemoData?: boolean | null; /** Time when the PDF, HTML or JSON URL's expire IF they are generated in a way that they are callable without authentication for a specified time period. This property is null if the URL requires authentication. */ urlsExpireAt?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export { Report_2 as Report } /** ReportCategory enumeration */ export declare enum ReportCategory { All = "all", Monthly = "monthly", Yearly = "yearly" } export declare interface ReportingArea { /** Top margin. */ top?: number | null; /** Right margin. */ right?: number | null; /** Bottom margin. */ bottom?: number | null; /** Left margin. */ left?: number | null; } /** Deserializable calculation. */ export declare interface ReportingCalculation { /** The employer object for this calculation. Typically, you do not need to set this before the actual payment process. */ employer?: CalcEmployer | null; /** The Worker (employee) that has performed the work. */ worker?: CalcWorker | null; /** Information about the workflow and state of the calculation. */ workflow?: CalcWorkflow | null; /** The main salary element. Alternatively the salary can be set in the Rows object - this will be the only way to set multiple salary rows (not yet supported). */ salary?: Salary | null; /** Set of rows that make up the salary calculation: Expenses, Benefits, deductions etc. Note that side costs are not rows. */ rows?: UserDefinedRow[] | null; /** DEPRECIATED: Usecase will be replacing this functionality in a next major release. The Framework Agreement (TES) parameters that affect the framework based side costs etc. of this calculation */ framework?: TesParameters | null; /** A usecase for creating and editing salary calculations. In practice, a usecase is either a user interface or a microservice that provides a salary calculation and it may be implemented outside Salaxy. Provides the possibility to store useacase specific data as part of calculation. NOTE: This functionality will replace Framework property in a next major release. */ usecase?: UsecaseData | null; /** The results of the calculation. In the API, this is a read-only object. */ result?: CalculationResult | null; /** Information about the work that is not directly related to calculating salary and expenses. */ info?: CalcInfo | null; /** Sharing of the calculation. This object cannot be modified directly, use specialized methods in Calculations service. */ sharing?: CalculationSharing | null; /** Contains calculation specific data for accounting (both cost and financial accounting). */ accounting?: CalculationAccounting | null; /** Worktime data that is stored as part of Salary calculation: work days, absences, holidays and holiday accrual. In the future may also contain relevant part of timesheet data (work hours). */ worktime?: CalcWorktime | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Stores the CSS and images for the report creation. */ export declare interface ReportingLayoutTemplate { /** HTML template for the print header. Use the following handlebars tags to inject values into the header: - `{{ date }}` Logical report date, e.g.Salary date for salary slip. - `{ { today } }` Printing date of the report. - `{{ title }}` Report specific title, e.g. "Palkkalaskelma". - `{{ subTitle}}` Report specific sub title, e.g. "Palkkapäivä 1.6.2020". - `{{> pageNumber }}` Current page number.Rendered as SPAN element. - `{ {> totalPages } }` total pages in the document.Rendered as SPAN element. - `{ {> logo } }` The main logo for the page as uploaded to settings.Rendered as SVG or IMG element. - `{ {> img2 } }` Secondary image as uploaded to settings.Rendered as SVG or IMG element. */ headerTemplate?: string | null; /** HTML template for the print footer. Use the following handlebars tags to inject values into the footer: - `{{ date }}` Logical report date, e.g.Salary date for salary slip. - `{ { today } }` Printing date of the report. - `{{ title }}` Report specific title, e.g. "Palkkalaskelma". - `{{ subTitle}}` Report specific sub title, e.g. "Palkkapäivä 1.6.2020". - `{{> pageNumber }}` Current page number.Rendered as SPAN element. - `{ {> totalPages } }` total pages in the document.Rendered as SPAN element. - `{ {> logo } }` The main logo for the page as uploaded to settings.Rendered as SVG or IMG element. - `{ {> img2 } }` Secondary image as uploaded to settings.Rendered as SVG or IMG element. */ footerTemplate?: string | null; /** Additional CSS that is used to customize the layout of the report. */ css?: string | null; /** Main logo image as embedded SVG or image (HTML). This should preferably be an SVG or alternatively an image tag with data uri. */ logo?: string | null; /** Secondary image that can be used in header / footer as embedded SVG or image (HTML). This should preferably be an SVG or alternatively an image tag with data uri. */ img2?: string | null; /** Defines the margins of the content area */ margin?: ReportingArea | null; /** Print background graphics if such are added to the report using css property above. */ printBackground?: boolean | null; } /** Defines the settings for producing reports: Mainly PDF's but also HTMl previews. */ export declare interface ReportingSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Identifier of the report layout template in id@partition or URI format. */ layoutTemplateId?: string | null; /** Layouts may define some variables that may be overriden, e.g. colors, margins, font-sizes. */ layoutTemplateVariables?: string | null; /** The company logo that is used by some Layouts */ logo?: string | null; } /** * Report partials that are available as HTML for developers to create their own * reporting views */ export declare type reportPartial = "employer" | "employerPage2" | "worker" | "workerPage2" | "payments"; /** * Provides access to HTML reports on calculations */ export declare class Reports { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Gets a list of generated HTML/PDF/JSON reports by type. * * @param reportType - Type of reports to fetch. * * @returns A Promise with result data (array of reports). */ getReportsByType(reportType: ReportType): Promise; /** * Gets a single generated HTML/PDF/JSON report by type and id. * * @param reportType - Type of the report to fetch. * @param id - Id of the report to fetch. * @param wait - Optional flag to indicate whether to wait for the report to be generated. * * @returns A Promise with result data (report). */ getReport(reportType: ReportType, id: string, wait: boolean): Promise; /** * Gets the monthly / quarterly/ yearly accounting data for the current account. * * @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned. * @param target Accounting target name : contains default ruleset and other parameters for creating accounting entries. * @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month. * @param endDate End date for the period. Required only for the custom period. * @param periodDateKind Period date type: paid at date or salary date. * @param minStatus Minimum status level for the calculations to include in the data. The default level is PaymentSucceeded. * @param ruleSet Optional additional ruleset for the target to use for creating the accounting entries. * @returns A Promise with result data (Raw data for accounting purposes). */ getAccountingDataForPeriod(refDate: string, target?: string, periodType?: PeriodType, endDate?: string, periodDateKind?: PeriodDateKind, minStatus?: CalculationStatus, ruleSet?: string): Promise; /** * Gets the accounting data based on given set of calculations. * * @param calculationIds - Calculations that are the bases for the report. * @param target - Accounting target name : contains default ruleset and other parameters for creating accounting entries. * @param ruleSet - Optional additional ruleset for the target to use for creating the accounting entries. * @returns A Promise with result data (Raw data for accounting purposes). */ getAccountingDataForCalculationIds(calculationIds: string[], target?: string, ruleSet?: string): Promise; /** * Gets the accounting data based on given report id. * * @param id - Saved report id containing accounting data. * @param target - Accounting target name : contains default ruleset and other parameters for creating accounting entries. * @param ruleSet - Optional additional ruleset for the target to use for creating the accounting entries. * @returns A Promise with result data (Raw data for accounting purposes). */ getAccountingData(id: string, target?: string, ruleSet?: string): Promise; /** * Gets the accounting report based on given set of calculations. * This method can be used anonymously. * * @param calculations - Calculations that are the bases for the report. * @param target - Accounting target name : contains default ruleset and other parameters for creating accounting entries. * @param ruleSet - Optional additional ruleset for the target to use for creating the accounting entries. * @returns A Promise with result data (Raw data for accounting purposes). */ getAccountingDataForCalculations(calculations: Calculation[], target?: string, ruleSet?: string): Promise; /** * Closes the accounting period for the given period, and generates a report for the period. * @param refDate - Period reference date. * @param option - Closing option. Currently only default -option supported. * @returns Report id for the period. */ closeAccountingPeriod(refDate: string, option?: AccountingPeriodClosingOption): Promise; /** * Gets the accounting data for the holiday pay debt. * * @param refDate The date to which the holiday pay debt is calculated. * @param target Accounting target name : contains default ruleset and other parameters for creating accounting entries. * @param employmentIds Optional list of employment ids (by official id) to include in the report. * @param fromHolidayYear Optional starting holiday year for the calculations.PaymentSucceeded. * @returns A Promise with result data. Holiday pay debt accounting data. */ getAccountingDataForHolidayPayDebt(refDate: string, target?: string, employmentIds?: string[], fromHolidayYear?: string): Promise; /** * Gets the monthly / quarterly/ yearly summary data for the current account. * * @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned. * @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month. * @param endDate End date for the period. Required only for the custom period. * @param periodDateKind Period date type: paid at date or salary date. * @param workers List of workers (by official id) to include in the report. * @returns A Promise with result data (Raw data for summary reports). */ getSummaryReportData(refDate: string, periodType?: PeriodType, endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise; /** * Gets the monthly / quarterly/ yearly summary for worker id * * @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned. * @param workerId For searching summary date * @param employerId Optionally provided and used to search workers summary date on specific employer * @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month. * @param endDate End date for the period. Required only for the custom period. * @param periodDateKind Period date type: paid at date or salary date. * @returns A Promise with result data (Raw data for summary reports). */ getWorkerSummaryReportData(refDate: string, workerId: string, employerId?: string, periodType?: PeriodType, endDate?: string, periodDateKind?: PeriodDateKind): Promise; /** * Gets the monthly / quarterly/ yearly summary data data based on given set of calculations. * * @param calculationIds - Calculations that are the bases for the report. * @returns A Promise with result data (Raw data for summary reports). */ getSummaryReportDataForCalculationIds(calculationIds: string[]): Promise; /** * Returns the raw data for the calculation based reports. * * @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned. * @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month. * @param endDate End date for the period. Required only for the custom period. * @param periodDateKind Period date type: paid at date or salary date. * @param workers List of workers (by official id) to include in the report. * @returns A Promise with result data (Raw data for the calculation based reports). */ getCalculationReportData(refDate: string, periodType?: PeriodType, endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise; /** * Returns the raw data for the calculation based reports. * * @param calculationIds - Calculations that are the bases for the report. * @returns A Promise with result data (Raw data for the calculation based reports). */ getCalculationReportDataForCalculationIds(calculationIds: string[]): Promise; /** * Returns the raw data for the accounting row based reports. * * @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned. * @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month. * @param endDate End date for the period. Required only for the custom period. * @param periodDateKind Period date type: paid at date or salary date. * @param workers List of workers (by official id) to include in the report. * @returns A Promise with result data (Raw data for the accounting row based reports). */ getAccountingRowReportData(refDate: string, periodType?: PeriodType, endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise; /** * Returns the raw data for the accounting row based reports. * * @param calculationIds - Calculations that are the bases for the report. * @returns A Promise with result data (Raw data for the accounting row based reports). */ getAccountingRowReportDataForCalculationIds(calculationIds: string[]): Promise; /** * Returns a calculation with cumulative data for reporting purposes. * @param id Id of the calculation. * @returns Calculation with cumulative data included. */ getCumulativeCalculation(id: string): Promise; /** * Returns a URL for a pay certificate pdf file. This is a absolute link containing * both the server address and the access token. * @param workerId Worker id for which the certificate should be created. * @param calculationIds Calculation ids to include in the certificate. * @param inline - If true, the Content-Disposition header is returned with inline parameter. */ getPayCertificatePdfUrl(workerId: string, calculationIds: string[], inline?: boolean): string; /** * Validates the pay certificate server side. * @param workerId Id of the worker in the certificate. * @param calculationIds Calculation ids to include in the certificate. * @returns Validation result. */ validatePayCertificate(workerId: string, calculationIds: string[]): Promise; /** * Gets an HTML report based on Calculation ID. * * @param reportType - Type of the report to fetch. See the HtmlReportType enumeration for possible values. * @param calculationId - GUID for the calculation * * @returns A Promise with result HTML. */ getReportHtmlById(reportType: reportPartial, calculationId: string): Promise; /** * Gets the monthly / quarterly/ yearly accounting data for the current account. * * @deprecated Use new accounting/{target} -method for more detailed accounting data * @param refDate - Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned. * @param tableType - Accounting table type. * @param periodType - Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month. * @param endDate - End date for the period. Required only for the custom period. * @returns A Promise with result data (Raw data for accounting purposes). * @ignore */ getAccountingReportTableForPeriod(refDate: string, tableType?: AccountingReportTableType, periodType?: PeriodType, endDate?: string): Promise; /** * Experimental: Gets the accounting report based on given set of calculations. * * @deprecated Use new accounting/{target} -method for more detailed accounting data * @param calculationIds - Calculations that are the bases for the report. * @param tableType - Accounting table type. * @returns Account report based on the calculations. * @ignore */ getAccountingReportTableForCalculationIds(calculationIds: string[], tableType?: AccountingReportTableType): Promise; /** * Experimental: Gets the accounting report based on given set of calculations. * * @deprecated Use new accounting/{target} -method for more detailed accounting data * @param calculations - Calculations that are the bases for the report. * @param tableType - Accounting table type. * @returns Account report based on the calculations. * @ignore */ getAccountingReportTableForCalculations(calculations: Calculation[], tableType?: AccountingReportTableType): Promise; /** * Returns the holiday pay debt report data. * * @param refDate Reference date to which the holiday pay debt is calculated. * @param employmentIds Optional list of employment ids (by official id) to include in the report. * @returns A Promise with result data containing holiday pay debt data. */ getAccountingHolidayPayDebtReportData(refDate: string, employmentIds?: string[]): Promise; } /** * Framework independendent business logic methods and helpers for Reporting. */ export declare class ReportsLogic { /** * Gets a link URL for a yearly report. This is a relative link from the servr root (e.g. "/ReportHtml/YearEndReportJson?year=2017"). * Typically the environment specific implementation needs to figure out the server address and token. * @param type - Type of the report must be one of the yearly reports * @param year - Year for the report * @param token - Token for authentication. Adds "access_token" to the query string. * This is typically required from the environment specific implementation, * but in exceptional cases you may use some other authentication mechanism and thus leave this null. * @param id - Worker ID for those reports that are specific to one Worker. * @param id2 - Second Worker ID for those reports that have two Workers in one report */ static getYearlyReportUrl(type: ReportType, year: number, token?: string, id?: string, id2?: string): string; /** * Gets a URL for a calculation pdf file. This is a relative link from the servr root (e.g. "/ReportPdf/SalarySlip/CALC_ID_HERE"). * Typically the environment specific implementation needs to figure out the server address and token. * @param reportType - Type of report * @param calcId - Identifier of the calculation. This method requires that the calculation has been saved. * @param inline - If true, the Content-Disposition header is returned with inline parameter. * @param token - Token for authentication. Adds "access_token" to the query string. * This is typically required from the environment specific implementation, * but in exceptional cases you may use some other authentication mechanism and thus leave this null. */ static getCalcPdfUrl(reportType: calcReportType, calcId: string, inline?: boolean, token?: string): string; /** Gets metadata about the supported report types */ static getReportTypes(): any; /** * Returns a URL for a pay certificate pdf file. This is a relative link from the server root. * Typically the environment specific implementation needs to figure out the server address and token. * @param workerId Worker id for which the certificate should be created. * @param calculationIds Calculation ids to include in the certificate. * @param inline - If true, the Content-Disposition header is returned with inline parameter. * @param token - Token for authentication. Adds "access_token" to the query string. * This is typically required from the environment specific implementation, * but in exceptional cases you may use some other authentication mechanism and thus leave this null. */ static getPayCertificatePdfUrl(workerId: string, calculationIds: string[], inline?: boolean, token?: string): string; } /** ReportType enumeration */ export declare enum ReportType { Undefined = "undefined", Example = "example", MonthlyDetails = "monthlyDetails", TaxMonthly4001 = "taxMonthly4001", PayerSummaryReport = "payerSummaryReport", MonthlyPension = "monthlyPension", MonthlyLiikekirjuri = "monthlyLiikekirjuri", MonthlyLiikekirjuriLegacy = "monthlyLiikekirjuriLegacy", MonthlyRapko = "monthlyRapko", MonthlyAccounting = "monthlyAccounting", MonthlyAccountingExcel = "monthlyAccountingExcel", YearlyDetails = "yearlyDetails", YearEndReport = "yearEndReport", YearlyWorkerSummary = "yearlyWorkerSummary", TaxYearly7801 = "taxYearly7801", Unemployment = "unemployment", Insurance = "insurance", HouseholdDeduction = "householdDeduction", TaxHouseholdDeduction14B = "taxHouseholdDeduction14B", TaxHouseholdDeduction14BSpouseA = "taxHouseholdDeduction14BSpouseA", TaxHouseholdDeduction14BSpouseB = "taxHouseholdDeduction14BSpouseB", SalarySlip = "salarySlip", SalarySlipPaid = "salarySlipPaid", SalarySlipCopy = "salarySlipCopy", ESalarySpecification = "eSalarySpecification", EmployerReport = "employerReport", PaymentReport = "paymentReport", PaymentSummaryReport = "paymentSummaryReport", TotalsReport = "totalsReport", EarningsPaymentReport = "earningsPaymentReport", AccountingReport = "accountingReport", Invoice = "invoice", InvoiceList = "invoiceList", EmploymentContract = "employmentContract", Authorization = "authorization" } /** Defines a Calculation row in the calculation results */ export declare interface ResultRow { /** Row index that matches this row to a user defined row (which is zero-based). If the row is generated by calculation business logic (e.g. based on framework agreement), the index is -1. */ userRowIndex?: number | null; /** Wage type. Either a built in wage type in Salaxy or a custom wage type created by the user. Please note that this type fully determines the and the kind. */ type?: string | null; /** Logical type of the row */ rowType?: CalculationRowType | null; /** Source of the calculation row - affects how the row is handled in editing / recalculation scenarios. */ rowSource?: CalculationRowSource | null; /** Description text of the row that is shown in reports. If null, will be set according to type. */ message?: string | null; /** Count for the row - default is one */ count?: number | null; /** Price for the row */ price?: number | null; /** Unit for the row */ unit?: CalculationRowUnit | null; /** Total for the row - always Price * Count */ total?: number | null; /** Base salary (Peruspalkka) is the monthly salary or total salary without addiotions (overtime, holidays etc.) */ totalBaseSalary?: number | null; /** Gross salary (Bruttopalkka) is "real" salary including the additions (overtime, holidays etc.) but not benefits. */ totalGrossSalary?: number | null; /** Taxable income (Ennakonpidätyksen alainen ansio) is the salary from taxation point-of-view. It is basically the Gross Salary plus benefits. */ totalTaxable?: number | null; /** Social Security Base (Sosiaaliturvan alainen ansio) is typically the same as TotalTaxable, but e.g. child care subsidy (yksityisen hoidon tuki) is handled differently. */ totalSocialSecurityBase?: number | null; /** Taxfree expenses compensation */ totalExpenses?: number | null; /** Deductions from the salary: Union payment, Advance, Foreclosure */ totalDeduction?: number | null; /** Identifier in the source system is a key defined by a source system / partner system. This is a pass-through string that is kept as-is in the Salaxy system. */ sourceId?: string | null; /** Period if different than the Period of calculation. Will be reported to the National Incomes registry, but also affect some other calculations. Note that this property may be (and by default is) null. */ period?: DateRange | null; /** Accounting related data for the row. */ accounting?: RowAccounting | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** Role enumeration */ export declare enum Role { Undefined = "undefined", Accountant = "accountant", TrustedPartner = "trustedPartner", AccountantCandidate = "accountantCandidate", PricingPartner = "pricingPartner", SepaPartner = "sepaPartner" } /** * Provides business logic for role membership rules. */ export declare class RoleLogic { /** * Checks whether the user is in a given role * @param session - Session of the current account. * @param appStatus - Additional information about the session and application status. * @param role - One of the known roles or role from server. * You can also use exclamation mark for negative (e.g.) * @returns Boolean whether user is in the given role */ static isInRole(session: UserSession, appStatus: AppStatus, role: SystemRole | Role | string): boolean; /** * Returns true if the current account is a member of all of the given roles. * Returns true if the roles is null or an empty array or and an empty string. * @param session - Session of the current account. * @param appStatus - Additional information about the session and application status. * @param roles - Array of role values. */ static isInAllRoles(session: UserSession, appStatus: AppStatus, roles: Array): boolean; /** * Returns true if the current account is a member of some of the given roles. * Returns true if the roles is null or an empty array or an empty string. * @param session Session of the current account. * @param appStatus State of the current application (i.e. login, session check etc.) * @param roles Array of role values. */ static isInSomeRole(session: UserSession, appStatus: AppStatus, roles: Array): boolean; } /** * Defines a root level declaration (Salaxy libraries point-of-view): Interface, class or enumeration. * Other declarations are children of these declarations: properties, methods, parameters etc. * This structure is a simplification of the general programming strucutres, but fits well with our documentation needs. */ export declare interface RootDeclarationReflection extends DeclarationReflection { /** Reflection ID for the library. Unique within one library. */ id: number; /** * Type of item: "class", "interface" and "enum" are root level types, * "controller", "controllerBase" and "component" are specialized types classes. */ kind: "class" | "interface" | "controller" | "controllerBase" | "component" | "enum"; /** The library that defines the item */ lib: string; /** Primary grouping depending on the library */ group?: string; /** The source file that defines the component */ source?: string; /** AngularJS views (templates) that contain more comprehensive example pages. */ exampleUrls?: string[]; /** Paths to screen shot pictures. */ screenShots?: string[]; } /** Provides row specific data for accounting (both cost and financial accounting). */ export declare interface RowAccounting { /** Percent for VAT calculation expressed as decimal: 24% is 0.24. */ vatPercent?: number | null; /** Total VAT amount splitted by VAT rates. Please note, that if both {Palkkaus.Model.Calc.RowAccounting.VatPercent} and the {Palkkaus.Model.Calc.RowAccounting.VatEntries} with some entries given, the {Palkkaus.Model.Calc.RowAccounting.VatEntries} are applied. Please note that this is null by default. */ vatEntries?: VatEntry[] | null; /** Values for cost accounting dimensions */ dimensions?: CostAccountingDimension[] | null; } /** * Provides logic for usecase user interfaces based on calculation rows. */ export declare class RowsUsecaseLogic { /** * Gets a blank UserDefinedRow with typed usecase data and usecase specific default data. * @param type Type of the usecase for the row. */ static getBlankUsecaseRow(type: CalculationRowType.AbsencePeriod): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.BicycleBenefit): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.Board): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.CarBenefit): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.DailyAllowance): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.EmploymentTermination): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.Expenses): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.Foreclosure): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.HourlySalaryWithWorkingTimeCompensation): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.IrIncomeType): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.MealBenefit): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.MilageOwnCar): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.NonProfitOrg): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.OtherCompensation): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.PaidSickLeave): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.PrepaidExpenses): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.Remuneration): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.SubsidisedCommute): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.TotalWorkerPayment): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.Training): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.UnionPayment): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.WorkingTimeCompensation): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.TaxAtSource): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType.TaxWithholding): UsecaseRow; static getBlankUsecaseRow(type: CalculationRowType): UsecaseRow; /** * Gets the usecase specific logic for a row type. * @param type Row type for which we should return the logic. * @returns Usecase logic for the row type. */ static getUsecaseLogic(type: CalculationRowType.AbsencePeriod): AbsencePeriodUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.BicycleBenefit): BicycleBenefitUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.Board): BoardUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.CarBenefit): CarBenefitUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.DailyAllowance): DailyAllowanceUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.EmploymentTermination): EmploymentTerminationUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.Expenses): ExpensesUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.Foreclosure): ForeclosureUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.HourlySalaryWithWorkingTimeCompensation): HourlySalaryWithWorkingTimeCompensationUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.IrIncomeType): IrIncomeTypeUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.MealBenefit): MealBenefitUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.MilageOwnCar): MilageOwnCarUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.NonProfitOrg): NonProfitOrgUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.OtherCompensation): OtherCompensationUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.PaidSickLeave): PaidSickLeaveUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.PrepaidExpenses): ExpensesUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.Remuneration): RemunerationUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.SubsidisedCommute): SubsidisedCommuteUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.TotalWorkerPayment): TotalWorkerPaymentUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.Training): TrainingUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.UnionPayment): UnionPaymentUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.WorkingTimeCompensation): WorkingTimeCompensationUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.TaxAtSource): TaxAtSourceUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.TaxWithholding): TaxWithholdingUsecaseLogic; static getUsecaseLogic(type: CalculationRowType.HolidayBonus | CalculationRowType.HolidaySalary | CalculationRowType.HolidayCompensation): HolidaysUsecaseLogic; static getUsecaseLogic(type: CalculationRowType): BaseUsecaseLogic; /** * Returns usecase logic for a row and calculation. * @param row Row that the logic operates on. * @param calc Calculation that contains the row (used for date, potentially other things). * @param doUpdate If true, will run first updateUsecase on the row. */ static getUsecaseLogicForCalc(row: UserDefinedRow, calc: Calculation, doUpdate?: boolean): BaseUsecaseLogic; /** * Returns a validation message for a row or null if none is provided. * Does the common validations (price and count) and then runs usecase specific validations. * @param row The row that is validated. */ static getValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** * Extends the UserDefinedRow by adding the configuration: How the row type should behave and and how to show it in the UI. * TODO: Should be moved to server-side => Should be the type of CalculationSettings.SalaryDefaults. */ export declare interface RowTypeDefinition extends UserDefinedRow { /** Configuration for the row type. */ config: CalcRowConfig; } /** Defines a matcher that matches a row type in source system to target system */ export declare interface RowTypeMatch { /** * A string or regular expression that matches the row type in source system. */ search: string | RegExp; /** * Type of search pattern. * Default is string: exact case-insensitive match. */ searchType?: "string" | "regExp"; /** * Type of match / conversion: * - null: results to an undefined row: Same as no match. * - row: Simple row functionality. Values are set as-is. * - hourlyRow: The row is based on hourly salary: Price is multiplier to hourly salary. * - ignore: Ignore this row without any error or warning * - warning: Ignore the row, but display a warning to the end user. Message in comment field. * - error: Throw an error with this row. Message in comment field. */ type: null | "row" | "hourlyRow" | "monthlySalary" | "ignore" | "warning" | "error"; /** Resulting row type. */ rowType?: CalculationRowType; /** Count multiplier. Default is 1. If incoming count is null, it is also assumed 1. */ count?: number; /** * Price depending on the use case. * For type "row", this is the default price if not available in employment relation. * For type "hourlyRow", this is price multiplier (default 1). */ price?: number; /** * Message for the resulting row. * May start with "SALAXY." to use language versioned texts. */ message?: string; /** * Additional information for debugging the import. * For error and warning, this is the error/warning message to end user. * May start with "SALAXY." to use language versioned texts. */ comment?: string; /** * Usecase specific data for the row. * The exact contents and properties of this data is dependent on the rowType. */ data?: { /** Primary subtyping of the usecase. The enumeration is dependent on the rowType. */ kind?: string | null; /** An additional comment row that is added to the salary slip. */ sxySalarySlipRowComment?: string | null; } | null; } /** * Abstracts the data from Calculation that a row usecase may use in update method. * Separated so that it is clear which parts of a calculation may be used by row usecases. */ export declare class RowUsecaseCalcData { /** * Creates the RowUsecaseCalcData from a calculation. * @param calc Calculation that is used in the usecase. */ static fromCalc(calc: Calculation): RowUsecaseCalcData; /** If true, the values have been set - there was the calculation */ hasValues: boolean; /** Period for the calculation with days count. */ period: DateRange; /** Salary for foreclosure is salaryAfterTax minus pension and unemploymentInsurance. */ foreclosureSalary?: number; /** Total taxable income. */ totalTaxable?: number; /** Employer official id */ employerOfficialId?: string; /** Worker official id */ workerOfficialId?: string; } /** Defines the main salary that is the bases for the calculation */ export declare interface Salary { /** Type of the salary being calculated */ kind: SalaryKind; /** Amount of e.g. hours, months for the salary. Default is 1. */ amount?: number | null; /** Price of one unit - e.g. hour, month. */ price: number; /** E.g. hour, month. Typically this parameter can be left empty/null and the unit is set according to type. */ unit?: string | null; /** Optional message for the salary row that is shown in reports. If null, will be set according to type. */ message?: string | null; /** If set to true, will calculate the household deduction. Applies only to natural persons - as oppsed to companies. */ isHouseholdDeductible?: boolean | null; /** If tax IsHouseholdDeductible is set to true, please also select the category (categories). Note that "OwnPropety" is a default, it does not need to be set: Only set RelativesProperty if necessary. */ taxDeductionCategories?: TaxDeductionWorkCategories | null; } /** A row of Salary bases: Data that is used to build Salary Calculations with salary rows typically grouped to Payroll objects. */ export declare interface SalaryBasesRow { /** Logical Date of the row (not datetime) */ date?: string | null; /** Employment relation ID (or Worker ID) in the source system */ srcEmploymentId?: string | null; /** Row type ID in the source system */ srcRowTypeId?: string | null; /** Message text */ message?: string | null; /** Count / amount of the row */ count?: number | null; /** Price of the row - may be fetched from the employment relation. */ price?: number | null; /** Row type */ rowType?: CalculationRowType | null; /** Palkkaus Employment relation ID. When importing, this may also a personal ID or Owrker ID that is then converted to employment relation ID. */ employmentId?: string | null; /** Contains the full employment after it has been requested and resolved: Null before that. */ employment?: Employment | null; /** * Cost center or value of Dimension 1. * If more than one dimension or if dimensions are more complex the Data property may be used with custom names, data types and logic. */ costCenter?: string | null; /** * Usecase specific data for the row. * The exact contents and properties of this data is dependent on the rowType. */ data?: { /** Primary subtyping of the usecase. The enumeration is dependent on the rowType. */ kind?: string | null; /** An additional comment row that is added to the salary slip. */ sxySalarySlipRowComment?: string | null; } | null; } /** SalaryDateKind enumeration */ export declare enum SalaryDateKind { Default = "default", InPast = "inPast" } /** * Provides business logic for calculating salary date. */ export declare class SalaryDateLogic { /** * Returns true, if the given date is a valid Salary date for given gross salary payment date. * * @param salaryDate - Salary date (the date when the salary is in worker). * @param iban - Bank account number of the worker. * @param paidAt - Date for the gross salary payment. * @param isRequestedSalaryDateSet - Boolean indicating if the salary date is the requested salary date. * @param channel - Payment channel. * @param zeroPayment - A boolean indicating if the net salary payment to worker is zero. * @param role - Current client role, only: pro and admin roles have effect currently * @returns - True if the given dates are not conflicting (salary date is possible for given paid at date). */ static isValidSalaryDate(salaryDate: DatelyObject, iban?: string, paidAt?: any, isRequestedSalaryDateSet?: boolean, channel?: PaymentChannel, zeroPayment?: boolean, role?: string): boolean; /** * Calculates the estimated salary date (the date when the salary is in worker) for the given gross salary payment date. * * @param _iban - The iban number of the worker. * @param paidAt - Date for the salary gross payment. * @param isRequestedSalaryDateSet - Flag to indicate, if the requested salary date is set. * @param channel - Payment channel. * @param zeroPayment - A boolean indicating if the net salary payment to worker is zero. */ static calculateSalaryDate(_iban?: string, paidAt?: any, isRequestedSalaryDateSet?: boolean, channel?: PaymentChannel, zeroPayment?: boolean): string; /** * Required days to process the incoming payment to worker net payment. */ private static daysCustomerServiceProcessing; /** * Payment delay if the payment takes place outside bank hours. */ private static daysLatePaymentDelay; } /** SalaryKind enumeration */ export declare enum SalaryKind { Undefined = "undefined", FixedSalary = "fixedSalary", HourlySalary = "hourlySalary", MonthlySalary = "monthlySalary", Compensation = "compensation", TotalWorkerPayment = "totalWorkerPayment", TotalEmployerPayment = "totalEmployerPayment" } /** SalaryType enumeration */ export declare enum SalaryType { Tyel = "tyel", Yel = "yel", Compensation = "compensation" } /** Sample object for creating v03 controller */ export declare interface SampleApiObject { /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Sample custom data in search index */ export declare interface SampleData { /** A test string */ test?: string | null; } /** Available Search index data of the Sample object */ export declare interface SampleListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: SampleData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export declare interface ServiceModel { /** Name of the service model */ name?: string | null; /** URL for the icon that represents the service model */ icon?: string | null; /** Service model features, which can be switched on/off. */ features?: ServiceModelFeatures | null; /** Default accounting settings. */ accounting?: ServiceModelAccounting | null; /** Default cost accounting settings. */ costAccounting?: ServiceModelCostAccounting | null; /** Default holiday settings. */ holiday?: ServiceModelHoliday | null; /** Default pricing settings. */ pricing?: ServiceModelPricing | null; /** Default payment channels. */ payments?: ServiceModelPayments | null; /** Partner branding settings: site logo, css etc. */ branding?: ServiceModelBranding | null; /** Reporting layout settings. */ reporting?: ServiceModelReporting | null; /** Default site for customers. */ site?: ServiceModelSite | null; /** Settings related to usecases. */ usecase?: ServiceModelUsecase | null; /** Settings related to messaging. */ messaging?: ServiceModelMessaging | null; /** Settings related to the calculation data delivery by forms. */ forms?: ServiceModelForms | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Settings related to Accounting */ export declare interface ServiceModelAccounting { /** Default accounting target. */ defaultTargetId?: string | null; /** Default period selection method: PaidAt date (paid by employer), Salary date (paid to worker) or Work date (work done). The default is PaidAt date. */ defaultPeriodDateKind?: PeriodDateKind | null; /** Accounting target systems and the rulesets assigned to them. */ targets?: AccountingTargetSettings[] | null; } /** Service model branding settings: logo, css etc. */ export declare interface ServiceModelBranding { /** Url to logo. */ logo?: string | null; /** Css path. */ skin?: string | null; } /** Settings related to Cost Accounting */ export declare interface ServiceModelCostAccounting { /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** Service model specific business data for index. */ export declare interface ServiceModelData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Url to logo. */ logo?: string | null; /** Css path. */ skin?: string | null; /** Name for the web application- */ webAppName?: string | null; /** Square icon for the service model. Used in listings etc. */ icon?: string | null; } /** Service model features, which can be swithced on/off. */ export declare interface ServiceModelFeatures { /** If true, the messaging is switched on for this service model. */ messaging?: boolean | null; /** If true, the calculation data delivery by forms is switched on. */ forms?: boolean | null; /** If true, the service model accounting settings override company settings. */ accounting?: boolean | null; /** If true, the service model cost accounting settings override company settings. */ costAccounting?: boolean | null; /** If true, the service model holiday settings override company settings. */ holiday?: boolean | null; /** If true, the service model payment settings override company settings. */ payments?: boolean | null; /** If true, the service model reporting settings override company settings. */ reporting?: boolean | null; /** If true, the service model usecase settings override company settings. */ usecase?: boolean | null; } /** Settings related to the calculation data delivery by forms. */ export declare interface ServiceModelForms { } /** Settings related to Holiday */ export declare interface ServiceModelHoliday { /** Settings for holiday pay calculations. The default is null and the default settings are used. */ holidayPaySettings?: HolidayPaySettings[] | null; /** Settings for the accrual calculations. The default is null and the default settings are used. */ holidayAccrualSettings?: HolidayAccrualSettings[] | null; } /** Represents a partner service model. */ export declare interface ServiceModelListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: ServiceModelData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Settings related to Messaging. */ export declare interface ServiceModelMessaging { /** Enable partner communication. Enabled by default. */ partnerMessages?: boolean | null; /** Options for the notification to be sent to the worker after the salary payment. */ workerSalaryNotifications?: WorkerSalaryNotification[] | null; /** Options for the delivery of the payslip to the worker. */ workerSalarySlipDeliveryMethods?: WorkerSalarySlipDeliveryMethod[] | null; } /** Default payment channels for customers. */ export declare interface ServiceModelPayments { /** The default channel when making payments. */ defaultChannel?: PaymentChannel | null; /** Channel specific settings. */ channels?: PaymentChannelSettings[] | null; } /** Service model specific pricing settings for customers. */ export declare interface ServiceModelPricing { /** Pricing model by the partner. */ pricingModel?: PricingModel | null; /** Fee for one calculation, which is visible and paid by customer. This is not relevant if the PricingModel is PalkkausFee */ fixedFee?: number | null; } /** Defines the settings for producing reports: Mainly PDF's but also HTMl previews. */ export declare interface ServiceModelReporting { /** Identifier of the report layout template in id@partition or URI format. */ layoutTemplateId?: string | null; /** Layouts may define some variables that may be overriden, e.g. colors, margins, font-sizes. */ layoutTemplateVariables?: string | null; /** The company logo that is used by some Layouts */ logo?: string | null; } /** * Provides CRUD access for Service Models */ export declare class ServiceModels extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): ServiceModel; } /** Stores information about the web site that is used for customer (employer) to access the customer web site. */ export declare interface ServiceModelSite { /** Type of web app that the customer is using to interact in the service process. */ webApp?: CustomerWebApp | null; /** Web application URL when the WebApp is Custom. */ webAppUrl?: string | null; /** Name for the web application- */ webAppName?: string | null; /** Override the translated texts for a service model. Key in the dictionary is a full key starting from the language, e.g. "fi.SALAXY.NG1_Sitemap.home". */ texts?: { [key: string]: string; } | null; /** Sitemap customizations based on product sitemap. Key is a full sitemap id (dot path) and data is a dataobject that is merged to SiteMap. */ sitemap?: { [key: string]: any; } | null; } /** Usecase related settings. */ export declare interface ServiceModelUsecase { /** Available usecases for the current account. */ usecases?: UsecaseInSettings[] | null; } /** * Provides read-only access to the current user session */ export declare class Session { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Checks whether the current browser session is authorized. * * @returns A Promise with result data (boolean). */ isAuthorized(): Promise; /** * Gets the current session information or null if there is no active session. * UserSession data is the Authorization object that provides information about the current session. Null, if there is no session. * * @returns A Promise with result data (UserSession). */ getSession(): Promise; /** * Returns server address */ getServerAddress(): string; /** * Gets the URL for login / register UI to Salaxy API. * * @param redirectUrl The URL where the user is taken after a successfull login. * If not specified, uses window.location.protocol + "//" + window.location.host + window.location.pathname. * In non-browser environments, this must be specified. * @param role Optional role (household, worker or company) for the situations where it is known - mainly for new users. * @param partnerSite The partner site is passed as client_id to the sign-in process. * @param mode Salaxy login mode: "sign_in" (login screen) or "sign_up" (register as new user). * @param urlPostfix Additional string that is added to tha URL. * Used in adding other parameters to the URL, e.g. "&salaxy_language=en" */ getSignInAddress(redirectUrl?: string, role?: string, partnerSite?: string, mode?: OAuthSalaxyAuthorizeMode, urlPostfix?: string): string; } /** Represents a user credential in session: This credential is typically based on Claims and is availble without going to database. */ export declare interface SessionUserCredential { /** The date when the object was created. */ createdAt?: string | null; /** Unique identitier for the user ID coming from the Auth0 database: '[MethodText]|[ProviderId]', e.g. 'facebook|12345678901234567' (Number may contain more characters - not sure for the exact cahracters count) */ id?: string | null; /** Avatar object that contains the visual reresentation of the User account. */ avatar?: Avatar | null; /** E-mail address if provided by the authentication provider. */ email?: string | null; /** The ultimate authentication provider that authenticated the user, e.g. Facebook, Google. */ authenticationMethod?: AuthenticationMethod | null; } /** Logic related to settings: Insurances, pension etc. */ export declare class SettingsLogic { /** * Returns pension number for test account * @param company The company enumerations. * Only the most common pension companies are supported. */ static getPensionNumberForTest(company: PensionCompany): string | null; } /** SettingsStatus enumeration */ export declare enum SettingsStatus { Undefined = "undefined", Checked = "checked", Pending = "pending" } /** Provides a a result to query of whether a taxcard exists for a personal ID (no personal information). */ export declare interface SharedTaxcardExistsResult { /** Returns true if a shared taxcard exists. */ sharedExists?: boolean | null; /** Returns true if there is already an owned taxcard for the employer. */ ownedExists?: boolean | null; /** Uri for the Shared taxcard */ uri?: string | null; /** If Owned taxcard exists, it is returned here. */ ownedTaxcard?: Taxcard | null; /** If true there was an error fetching the information. Typically, this would be that there were too many attempts to fetch Personal ID's and request was classified as phishing. In this case, you should currently create the employment relation and fetch the taxcard infor after that. We may later introduce a "Are you robot" type of interface to go around this (if necessary). */ isError?: boolean | null; /** Type of the taxcard. Undefined if none is found. */ kind?: TaxcardKind | null; /** Validity of the taxcard. Note that this property is null when Exists is false. */ validity?: DateRange | null; /** The personal ID that was used in fetching. It may be validated and formatted, or just the original string if there were issues. */ personalId?: string | null; } /** Defines a shareholder. At the moment, this is only a name and it is used only if the person has more than 25% of the shares. Expect this object to be developed with, Ownership percent or number of shares, Id or other such link to the actual person etc. */ export declare interface Shareholder { /** Name of the shareholder. */ name?: string | null; } /** SharingUriType enumeration */ export declare enum SharingUriType { Undefined = "undefined", Url = "url", Employer = "employer" } export declare interface SignatureData { /** Name of the signing person. By default, this is Onboarding Person, but it may be a completely different person. */ personName?: string | null; /** Personal ID of the person, who has the right to sign. */ personalId?: string | null; /** Email that is sent to Signature provider, if any. */ email?: string | null; /** Telephone that is sent to Signature provider, if any. */ telephone?: string | null; /** If true, the person signing is PEP (Politically Exposed Person */ isPep?: boolean | null; /** TODO: To be removed after Signicat is in production. Data related to VismaSign signature process (API v01). */ vismaSignData?: VismaSignV01ObData | null; /** Data related to Signicat signature process. */ signicatData?: SignicatData | null; /** The account is authorized to sign on behalf of the actual account. */ isProcura?: boolean | null; } /** Data about the Signicat process. */ export declare interface SignicatData { /** Identifier of the document that is signed. */ documentId?: string | null; /** Document summary after the signature has been done. */ documentSummary?: any | null; /** URI to the signed PDF document: Full unique URI for the BlobFile. */ pdfBlobUri?: string | null; } /** * Base class for APIs that return only one item (not a list as in CRUD). */ export declare abstract class SingleItemApiBase { protected ajax: Ajax; /** * Deriving classes should define the baseURL for the method. E.g. "/v03/api/settings/accounting" * Ajax implementations will add the beginning. */ protected abstract baseUrl: string; /** Constructor creates a new CRUD api with given Ajax-implementation */ constructor(ajax: Ajax); /** * Gets a single settings object. * @returns A Promise with settings object. */ get(): Promise; /** * Saves the settings to the storage. * @param settings - The settings that is saved. * @returns A Promise with settings object. */ save(settings: T): Promise; } /** * A node in Palkkaus sitemap: Node has some known common properties, but may be extended * with node specific properites (schema defined in params) or site-specific parameters. */ export declare interface SitemapNode { /** Identifier for the node: Should be unique within one set of children. */ id?: string; /** * Hard-coded single-language title. This should be used in dev/testing only: * The texts should typically be coming from language versioned based on full id (e.g. "SALAXY.NG1_Sitemap.calculations.newForWorker"). */ title?: string; /** * Navigation URL for the node. * This is not necessarily unique, but please not that first matching will then be resolved as current. */ url: string; /** Roles for limiting the visibility of the node. */ roles?: string | string[]; /** Specifies how the node is shown in the navi / UI. Default / null is "visible". */ visibility?: SitemapVisibility | null | "visible" | "hidden" | "readOnly" | "hiddenReadOnly" | "disabled"; /** If true, sets container class to container-fluid: The */ isFullWidth?: boolean; /** * Array of child nodes. * NOTE: Current implementations may support children only on 2 and 3 levels (section and perhaps first node level). */ children?: SitemapNode[]; /** Array of i18n prefixes for listing the translations that are related to this page. */ i18n?: string[]; /** Defines the json schema for parameters that may be defined for a single node/page. */ params?: { [key: string]: OpenAPIV3.SchemaObject; }; /** * Base structure may be extended with node specific properites (schema defined in params) or site-specific parameters. */ [key: string]: any; } /** Different values for visibility of sitemap node. */ export declare enum SitemapVisibility { /** Node is visible if it matches the roles filter. This is the default value (null). */ Visible = "visible", /** * Node is hidden in the navigation, but can be navigated to (parent is shown as current in navi). * Details pages are often like: You cannot navigate into them directly from navi, only with ID. */ Hidden = "hidden", /** * Page is shown as read-only if supported by the page. * Note that this is should not be considered as a security measure - it is for UI purposes only. */ ReadOnly = "readOnly", /** Page is both hidden and read-only. */ HiddenReadOnly = "hiddenReadOnly", /** * Page is disabled completely: Cannot be used in navigation. * Note that this is should not be considered as a security measure - it is for UI purposes only. */ Disabled = "disabled" } /** Input data for calculation snapshot. */ export declare interface SnapshotInput { /** Reason code for the snapshot. */ reasonCode?: number | null; /** Severity code for snapshot case. */ severityCode?: number | null; /** Free form description. */ description?: string | null; /** Categories for the snapshot case. */ categories?: string[] | null; } /** Connector for a single service in the staging API. */ export declare class StagingApiConnector { protected serviceUrl: string; protected ajax: Ajax; private getBlank; /** Current JSON for upload */ currentJson: string; /** The current selected item */ current: TDetails | undefined; /** List of items after they have been loaded from the server. */ list: TList[]; /** Error message from save operation. */ error: string; constructor(serviceUrl: string, ajax: Ajax, getBlank: () => TDetails); /** Sets the current item */ setCurrent(item: TDetails | undefined): void; /** Shows the details view */ showDetails(id: string): void; /** * Gets an item by ID. This does not set the current item. * @param id Item ID to get. */ getItem(id: string): Promise; /** * Save any item to the server: Not connected to current item in any way. * @param item Item to save. */ saveItem(item: TDetails): Promise; /** * Saves changes to the current item. * @returns The saved item after save done. */ saveCurrent(): Promise; /** Creates a new item */ createNew(): void; /** * Reloads the list. Also sets the current item to undefined. */ reloadList(): void; /** Saves the current JSON. */ saveJson(): void; /** Deletes an item */ delete(id: string): void; /** * Calls the Update worktime method in the API (like the integrating services would). * @param worktimeImportData Data that is sent to the API. * This data may contain rows or employment relations or both and they are parsed, validated and saved in the API * as one set of rows employment. Employments are created / updated as necessary. */ callUpdateWorktime(worktimeImportData: WorktimeImport): Promise; } /** * Provides helper methods related to storage and search including Uri and Id helpers. */ export declare class StorageLogic { /** * Gets the idAtOwner format full ID ("[id]@[owner]") for a URI. * IdAtOwner format is easier to use in REST API, as part of URL than URI format. * @param uriString URI as ("[Potentially, a server]/[PayloadType]/[Owner]/[Id]", e.g. "/CalculationDTO/FI86POYL0009461858/16ea052e-f23f-4b72-83a9-b8f6590f0dc9") * @returns The owner and is in "[id]@[owner]" format. */ static getIdAtOwner(uriString: string): string; /** * Gets the URL in local form without the server part: * "/[PayloadType]/[Owner]/[Id]", e.g. "/CalculationDTO/FI86POYL0009461858/16ea052e-f23f-4b72-83a9-b8f6590f0dc9". * @param uriString Uri that potentially has a server in the beginning (like list item uri). * @param forceParse If true, the URI is parsed to URI parts even if it already seems to be a local URI (starts with "/"). * By default URI's that start with "/" are returned as is without further conversion. */ static getLocalUri(uriString: string, forceParse?: boolean): string; /** * Parses a Palkkaus storage URI in list item or container to relevant parts: * Payload type, Owner and Id. * @param uriString Uri string to parse as relevant URI parts. * ("[Potentially, a server]/[PayloadType]/[Owner]/[Id]", e.g. "/CalculationDTO/FI86POYL0009461858/16ea052e-f23f-4b72-83a9-b8f6590f0dc9") * @returns Reelvant URI parts: Payload type, Owner and Id. */ static parseUri(uriString: string): { /** Payload type of the container */ payloadType: string; /** Owner of the Container / Partition key in the storage. */ owner: string; /** Unique identifier in the storage, typically Guid. */ id: string; }; } export declare interface Stream { readonly canRead?: boolean | null; readonly canSeek?: boolean | null; readonly canTimeout?: boolean | null; readonly canWrite?: boolean | null; readonly length?: number | null; position?: number | null; readTimeout?: number | null; writeTimeout?: number | null; } /** SubsidisedCommuteKind enumeration */ export declare enum SubsidisedCommuteKind { Undefined = "undefined", NoDeduction = "noDeduction", SingleDeduction = "singleDeduction", PeriodicalDeduction = "periodicalDeduction" } /** Handles the Calculation of CalculationRowType.SubsidisedCommute to IrRows */ export declare interface SubsidisedCommuteUsecase { /** Deduction from salary */ deduction?: number | null; /** Taxable amount of the benefit. */ taxable?: number | null; /** Number of periods if Kind is PeriodicalDeduction. Otherwise this value is null. */ periodDivider?: number | null; /** Primary subtyping of the usecase. */ kind?: SubsidisedCommuteKind | null; } /** Client-side logic for SubsidisedCommuteUsecase */ export declare class SubsidisedCommuteUsecaseLogic extends BaseUsecaseLogic { private _calculatedTaxable; private _calculatedTaxfree; private _isBefore2021; private _row; private _date; /** Returns calculated taxable value. */ get calculatedTaxable(): number; /** Returns calculated taxfree value */ get calculatedTaxfree(): number; /** Returns true if the date for calculation is before 2021. */ get isBefore2021(): boolean; /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. */ updateUsecase(row: UserDefinedRow, date: DatelyObject): void; /** * Gets validation message for the usecase. * @param row Row to validate * @returns A message that is either an error or OK (default). Warnings, info etc. may later be supported. */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** Row containing summary data for the summary report. */ export declare interface SummaryCalculationRow { /** Description text of the row that is shown in reports. */ message?: string | null; /** Count for the row. */ count?: number | null; /** Price for the row. */ price?: number | null; /** Total sum. */ total?: number | null; /** Usecase specific data This contains especially row label parameters: calculationRowType, kind and code */ data?: { [key: string]: any; } | null; } /** Rows and totals for a set of calculation rows. */ export declare interface SummaryCalculationRows { /** Summary rows. */ rows?: SummaryCalculationRow[] | null; /** Total sum of rows. */ total?: number | null; } /** A summary report for an employer for a specific period (typically month or year). */ export declare interface SummaryReportData { statistics?: CalculationResultStatistics | null; /** Finnish Business Identifier (Y-tunnus) for the company. */ businessId?: string | null; /** Employer avatar */ employer?: Avatar | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Start date for the report */ startDate?: string | null; /** End date for the report */ endDate?: string | null; /** The total sum information for the report - this is the main payload of the report */ result?: CalculationResult | null; /** Individual calculations based on which the report is made. Depending on the request, this may be filled in or null (as opposed to empty list). */ calculations?: Calculation[] | null; } /** Settings object that is injectable to Custom Elements based sxy-forms. */ export declare class SxyFormsSettings { /** Resolves an URL (shortened schema document URL) as an absolute URL string. */ resolveUrl(url: string): string; /** * Gets a custom validator for the given element. * If none is returned, the default validators are used. * If you want to disable default validators, you should return a function that returns null. * @param element Element for which the validator is fetched. * @param element.validator Validator is a string identifying the validator (attribute in the input component). * @param element.getRequire Function that returns true if the input is required. * @returns A custom validator function or undefined if the default validators should be used. * Validator function takes the value (bool and nmber are currently typed) and returns and error message or null if the value is valid. * Message is typically a key for a translation. */ getValidator(element: { validator: string; getRequire: () => boolean; }): ((value: any) => string) | undefined; /** * Translates given key to the current language with default value. * @param key - Key for the text. * @param defaultValue - The default value that is returned if the key is not found. * Note that `null` and `undefined` (omitted parameter) function differently here: * Null returns undefined if the key is not found. * Undefined returns always a text: It uses the resolve logic of the translations provider. * Typically, this logic will attempt to find the text in the default language of the app and if not available, * returns the last part of the key with potential red exclamation mark. * @returns The translated value or default value as explained above. */ getText(key?: string, defaultValue?: string | null | undefined): string | undefined; /** * Gets a unit text for an input that has a given format. * Units are short texts in the input e.g. %, km, €, h, min, days, weeks. * @param format - Format of the input either in the schema or explicitly as input component attribute. */ getUnitText(format: string): string | undefined; /** * Gets a description text for an enumeration value in current language. * Note that this may not be available for all enumerations by design. * @param enumType - Name of the Type of the enumeration. * @param enumValue Name/value of the member for which the description is fetched. * @returns Language specific text form translations or undefined if none is found. */ getEnumDescr(enumType: string, enumValue: string): string | undefined; /** * Gets a label text for an enumeration value. * @param enumType Name of the Type of the enumeration. * @param enumValue Name/value of the member for which the label is fetched. * @returns Language specific text form translations or the memberName text if no translation is found. */ getEnumLabel(enumType: string, enumValue: string): string; /** * Gets the metadata (texts etc.) for an enumeration and its values. * @param enumName - Name of the Type of the enumeration. */ getEnumMetadata(enumName: string): EnumMetadata | undefined; } /** * Enumerates the system roles: * The roles that are not returned from server as account roles but * rather as derived from properties of the current session. */ export declare enum SystemRole { /** Session check is in progress: The role of the user is unknown. */ Unknown = "unknown", /** User is anonymous: The session has been checked and there is no token, token has expired or the token is invalid. */ Anon = "anon", /** User is authenticated either as Company or Person */ Auth = "auth", /** * Initialization is in progress: * At the moment, this is the same as Session check period (SystemRole Unknown), * but there may later be other server-checks in the initialization. */ Init = "init", /** User is in Worker role. */ Worker = "worker", /** User is in Employer role: Either Household or Company. */ Employer = "employer", /** User is Household (Employer) */ Household = "household", /** User is Company (Employer) */ Company = "company", /** User is a Person: Employer and/or Worker (not Company) */ Person = "person", /** Hidden always returns false. Used to hide items in navigation. */ Hidden = "hidden", /** System is running with test data */ Test = "test", /** System is runnin with production data */ Prod = "prod", /** Finnish personal company ("Yksityinen elinkeinonharjoittaja"). */ FiTm = "fiTm", /** Finnish Limited liability company ("Osakeyhtiö"). */ FiOy = "fiOy", /** Finnish Association ("yhdistys") */ FiRy = "fiRy", /** * Any user ("any" or "*") always returns true. * Note that in most scenarios also no roles ([], "" or null) are equivalent to Any. */ Any = "any", /** * System role for account that is not verified. * Typically this means that the onboarding object should be shown e.g. before payment or on the fornt page. * The role is not set while account is not there (anonymous or session check in progress). */ NonVerified = "nonVerified", /** * Roles which are coming from the primary partner. * Indicates that the partner messaging is enabled. */ PartnerMessaging = "partnerMessaging" } /** File format for a table. */ export declare enum TableFormat { /** Tab separated table. */ Txt = "txt", /** Comma separated table. */ Csv = "csv", /** Excel formatted table. */ Xlsx = "xlsx" } /** Utility class for processing tables. Eg. exporting and importing table formatted data. */ export declare class Tables { /** * Exports table data as in defined format. The default is csv formatted table. * @param rows Rows as an array of objects with properties specified as headers. * @param format File format for a table export. * @param localeId Locale for data export. Defaults to Finnish (fi). Affects separator (; vs ,), formatting of date (D.M.YYYY vs YYYY-MM-DD) and numeric fields (, vs . as decimal separator). */ static export(rows: TRow[], format?: TableFormat, localeId?: Culture): any; /** * Exports data as an array of rows, each of which consists of an array of cell values. * @param rows Array of row objects. */ static exportAsArrays(rows: TRow[]): any[][]; /** * Imports table from the given data and format. * @param data Table data. * @param format Format for the table data. * @param localeId Locale for data import. Defaults to Finnish (fi). * Affects formatting of date (D.M.YYYY vs YYYY-MM-DD)and numeric fields (, vs . as decimal separator). * @returns An import result which has the imported data as well as headers of the file, errors and number of ignored lines (typically empty lines). */ static import(data: any, format?: TableFormat, localeId?: Culture, headers?: string[]): ImportResult; /** * Gets first row of data or a new object * @param data from where to get first line * @param separator file separator * @returns Returns first row as object or {} */ static getFirstRow(data: any, separator: FileDelimiter): any; private static objectToSeparated; private static toRow; private static toField; private static objectFromSeparated; private static fromRow; private static fromHeaderField; private static fromField; } /** TargetOption */ declare interface TargetOption { /** Export function */ getExportData?: (accountingData: AccountingData, schemeId?: string) => any[]; /** List of supported schemes */ schemes?: { id: string; label: string; }[]; /** Default export method */ defaultExportMethod?: string; /** Boolean indicating if the csv export should contain quoted strings */ noCsvQuotedStrings?: boolean; /** Boolean indicating if the csv export should contain byte order mark */ noCsvBom?: boolean; /** Format data as text*/ formatAsText?: (data: any[], isFinnish: boolean) => string; } /** TargetOption */ declare interface TargetOptions { [key: string]: TargetOption; } /** The information about tax at source, typically from non-resident taxcard (lähdeverokortti) for non-residents. */ export declare interface TaxAtSource { /** Tax percent. As of writing, this is 35% by default and 15% for athletes and performingg artists, but the percentage may change and bust be checked from the taxcard (or legistlattion if there is no card available). */ percent?: number | null; /** Monthly deduction (e.g. 510 €/month) if one can be used for this card. */ deductionMonthly?: number | null; /** Daily deduction (e.g. 17 €/day) if one can be used for this card. */ deductionDaily?: number | null; } /** TaxAtSourceKind enumeration */ export declare enum TaxAtSourceKind { Undefined = "undefined", NoDeduction = "noDeduction", MonthlyDeduction = "monthlyDeduction", DailyDeduction = "dailyDeduction", FixedValues = "fixedValues" } export declare interface TaxAtSourceUsecase { /** Tax value is either the fixed value (euro) or percentage (0-1) depending on the kind. */ taxValue?: number | null; /** Deduction for the tax at source: Fixed, Monthly or Daily */ deductionPrice?: number | null; /** Count of deduction units: 1 or number of months or days. */ deductionCount?: number | null; /** Value of the deduction: Deduction * DeductionCount */ deduction?: number | null; /** Total taxable value of the salary calculation. */ totalTaxable?: number | null; /** Tax at source related employmment data. */ employmentData?: TaxAtSource | null; /** List of allowed kinds (deductions based on source data). Currently as a comma separated string. */ allowedKinds?: string | null; /** Primary subtyping of the usecase. */ kind?: TaxAtSourceKind | null; } /** Client-side logic for TaxAtSource */ export declare class TaxAtSourceUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param _date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. * @param _calcData The calculation related data that is required by the more complex calculations: * This data is available only after first round-trip to the server (results object exists) and not all user interfaces may provide this. */ updateUsecase(row: UserDefinedRow, _date: DatelyObject, _calcData: RowUsecaseCalcData): void; /** Gets validation message*/ protected getUcValidation?(row: UserDefinedRow): UsecaseValidationMessage; } /** Full tax card that is stored in database and that is used in tax card percentage calculations. Also contains the salary history in the income log. */ export declare interface Taxcard { /** The Worker, whose salaries are paid based on this tax card. */ worker?: Avatar | null; /** Employment for which the tax card is created. */ employmentId?: string | null; /** The input that is coming from the Worker / Tax authorities */ card: TaxcardInput; /** Calculations that have been paid to this tax card. */ incomeLog?: TaxCardIncome[] | null; /** Read-only calculation results and other logic values on the Taxcard. */ readonly result?: TaxcardResults | null; /** If the item is an employer instance of a shared taxcard, contains the original identifier as URI ("[Server]/[PayloadType]/[Owner]/[Id]", e.g. "https://test-secure.salaxy.com/CalculationDTO/FI86POYL0009461858/16ea052e-f23f-4b72-83a9-b8f6590f0dc9"); This item cannot be set in Save - only in Approve method. */ copyOfUri?: string | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides business logic related to TaxCards: * The Finnish way of determining the widtholding tax that Employer should deduct from Worker salary. * Taxcard handling was changed by tax authorities significantly for year 2019, hence the naming. */ export declare class TaxCard2019Logic { /** * Gets a new blank taxcard with default values, suitable for UI binding. * * @param personalId The personal ID that is used to connect the Taxcard to a person. This is required in save. * @param kind If specified, sets the type and defaults according to the type * @param year Specifies the year. This is used in December-January when there may be cards from both years. * Current year is the default. * @param today Allows changing the today date in unit testing etc. Default is actual today. */ static getBlank(personalId: string, kind?: TaxcardKind, year?: number, today?: string): Taxcard; /** * Gets display information and texts for taxcard within a calculation. * Helper for showing taxcards UI's for calculations. * NOTE: The data is cached to the calculation ($ui) until round-trip to server. * @param calc Calculation for which the data is resolved. */ static getCalcTaxcardInfo(calc: Calculation): TaxcardUiInfo; /** * Checks if the taxcard is valid for the salary date. * This is used when in test environment the salaryDate may be changed in UX. * Typically, you should get this information from the API methods. * @param card Taxcard to check. * @param salaryDate Salary date. Default is today. */ static isTaxcardValid(card: Taxcard, salaryDate?: string): boolean; /** * TODO: This is currently used for charting only. As such it could probably be simplified * and / or combined with getMainChart() / getPieChart(). * Gets information about the the income limit and real percent. * Note that this method calculates the real percent i.e. * for examples and no tax cards 60%. If you wish to see the example percent here (23%), * catch it separately. * @param taxcard Card to analyze */ static getIncomeLimitInfo(taxcard: Taxcard): { /** Taxcard type */ type: TaxcardKind; /** Current percent as number */ percent: number; /** True if the card has a limit */ hasLimit: boolean; /** Total income divided by taxcard limit */ fractionOfLimit: number; }; /** Gets the main chart for taxcards */ static getMainChart(taxcard: Taxcard): any; /** Gets the main chart for taxcards */ static getMainChartV2(taxcard: Taxcard): any; /** Gets the pie chart for the taxcards. This is used for simplistic cases that do not have an income limit. */ static getPieChartDataV2(taxcard: Taxcard): any; /** Gets the pie chart for the taxcards. This is used for simplistic cases that do not have an income limit. */ static getPieChartData(taxcard: Taxcard): any; } /** TaxcardApiIncomeType enumeration */ export declare enum TaxcardApiIncomeType { Undefined = "undefined", Salary = "salary", DividendsForWorkAsSalary = "dividendsForWorkAsSalary", PersonnelFundIncome = "personnelFundIncome", SalaryOneOff = "salaryOneOff", CompensationForUseEarnedIncome = "compensationForUseEarnedIncome", CompensationForUseCapitalIncome = "compensationForUseCapitalIncome", CompensationVatResponsible = "compensationVatResponsible", Compensation = "compensation", DividendsForWorkAsCompensation = "dividendsForWorkAsCompensation", AthletePay = "athletePay", OtherTaxableIncome = "otherTaxableIncome", OtherTaxableIncomeOneOff = "otherTaxableIncomeOneOff", EmployeeStockOption = "employeeStockOption" } /** TaxcardApprovalMethod enumeration */ export declare enum TaxcardApprovalMethod { AssureWaiting = "assureWaiting", Approve = "approve", Reject = "reject" } /** TaxcardCalcDiffCheck enumeration */ export declare enum TaxcardCalcDiffCheck { GetDiff = "getDiff", NoCheck = "noCheck", CommitDiff = "commitDiff" } /** Tax card specific business data for index. */ export declare interface TaxcardData { /** Year that the tax card is valid for. Typically this means from February of this year to January of the following. */ forYear?: number | null; /** Tax percent as percent. I.e. for 50% set 50, not 0.5. */ taxPercent?: number | null; /** Income up to which the TaxPercent can be used. Any income above the limit is taxed with ExcessTaxPercent. */ incomeLimit?: number | null; /** Total income paid to the taxcard during the year (forYear). */ totalIncome?: number | null; /** Tax percentage that is used in calculating the widthholding tax for the part of income above the IncomeLimit. */ taxPercent2?: number | null; /** A Worker may request a minimum percent that is deducted even if the effective tax percent would be lower. This can be used if Worker knows that he/she will be earning more in the year than what was estimated when the taxcard was created. */ taxPercentMin?: number | null; /** The income type of the taxacard if fetched from the tax authorities taxcard API. */ incomeType?: TaxcardApiIncomeType | null; /** The type of the tax card. */ kind?: TaxcardKind | null; /** Employment id. */ employmentId?: string | null; /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Start date of the taxcard validity */ start?: string | null; /** End date of the taxcard validity. This may be null on NoTaxcard types. */ end?: string | null; /** If the item is an employer instance of a shared taxcard, contains the original identifier as URI ("/[PayloadType]/[Owner]/[Id]", e.g. "/CalculationDTO/FI86POYL0009461858/16ea052e-f23f-4b72-83a9-b8f6590f0dc9"); This item cannot be set in Save - only in Approve method. */ copyOfUri?: string | null; /** Validity resolved as enumeration in relation to payment date given in the query. This is not available in direct database OData queries as it is relevant to current / given date. */ validity?: TaxcardValidity | null; /** Uri to the file copy of the tax card. */ fileUri?: string | null; /** Uri to the preview image of the tax card. */ previewUri?: string | null; } /** Defines income that is recorded in a Taxcard: A paid salary calulation, income from previous employers or other salaries that affect the income calculation. */ export declare interface TaxCardIncome { /** Type of income */ type?: TaxCardIncomeType | null; /** Calculation id in the Salaxy database. If the calculation is not in the Salaxy Database, leave this null. */ id?: string | null; /** Owner of the row, typically the employer that paid the salary. Null meaning that it is the owner of the original taxcard. */ owner?: string | null; /** A short description of the paid calculation. This is a mandatory field if the Id is null. */ description?: string | null; /** Beginning of the salary payment period from taxation point-of-view. This is typically the same as CalcInfo.WorkStartDate, but may be different in edge cases. */ startDate?: string | null; /** End of the salary payment period from taxation point-of-view. This is typically the same as CalcInfo.WorkEndDate, but may be different in edge cases. */ endDate?: string | null; /** The paidAt date which tells mainly to which year the payment should be attributed. This is reliable only if the salary is paid by Salaxy (TaxCardIncomeType.SalaxyCalculation). In other cases it is just the reporting date. */ paidAt?: string | null; /** Taxable income from this calculation */ income?: number | null; /** Widthholding tax in euro */ tax?: number | null; /** When loading calculations from the database (in taxcard Save and FindBy with diff), this property identifies the differences in the entry. */ diff?: IncomeLogDiff | null; } /** TaxCardIncomeType enumeration */ export declare enum TaxCardIncomeType { Unknown = "unknown", SalaxyCalculation = "salaxyCalculation", PreviousEmployerSalaries = "previousEmployerSalaries", ExternalSalaries = "externalSalaries", SharedCardExtSum = "sharedCardExtSum", Diff = "diff" } /** Input from user for a tax card: What is written in the card plus the state infomration that is directly editable by the user. */ export declare interface TaxcardInput { /** The personal ID as written in the tax card. */ personalId: string; /** Tax card approval state */ state?: TaxcardState | null; /** Year that the tax card is valid for. Typically this means from February of this year to January of the following. */ forYear: number; /** Validity for the taxcard as expressed in the card. Note that the end date may not be reliable if new taxcard has replaced this one. */ validity?: DateRange | null; /** Tax percent as percent. I.e. for 50% set 50, not 0.5. */ taxPercent?: number | null; /** Income up to which the TaxPercent can be used. Any income above the limit is taxed with ExcessTaxPercent. */ incomeLimit?: number | null; /** Tax percentage that is used in calculating the widthholding tax for the part of income above the IncomeLimit. */ taxPercent2?: number | null; /** A Worker may request a minimum percent that is deducted even if the effective tax percent would be lower. This can be used if Worker knows that he/she will be earning more in the year than what was estimated when the taxcard was created. */ taxPercentMin?: number | null; /** TaxPercentMin set by owner of the card. This overrides the tax percent min set by the taxcard sharer. */ taxPercentMinOwned?: number | null; /** Explicit value of when the item was last checked. At the moment, updated in API fetches only, but may be used later for other checks. Undefined value is 1.1.2000 */ lastChecked?: string | null; /** The income type of the taxacard if fetched from the tax authorities taxcard API. */ incomeType?: TaxcardApiIncomeType | null; /** Withholding Percentage may include Stock Options and Grants (information from the taxcard API). This property is not currently in use. */ includesStockOptionsAndGrants?: boolean | null; /** Type of the taxcard as of 2019, when the taxcards logic was simplified by the Finnish tazx authorities. */ kind?: TaxcardKind | null; /** Uri to the file copy of the tax card. Set by the system as part of the upload process, do not change in the API though it may be technically possible. This may have unintended results. */ fileUri?: string | null; /** Uri to the preview image of the tax card. Set by the system as part of the upload process, do not change in the API though it may be technically possible. This may have unintended results. */ previewUri?: string | null; } /** TaxcardKind enumeration */ export declare enum TaxcardKind { Undefined = "undefined", NoTaxCard = "noTaxCard", Auto = "auto", DefaultYearly = "defaultYearly", Replacement = "replacement", NoWithholdingHousehold = "noWithholdingHousehold", Others = "others", Historical = "historical" } /** List item of taxcard searches. */ export declare interface TaxcardListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: TaxcardState | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: TaxcardData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Provides the results of the tax card calculation and business logic. */ export declare interface TaxcardResult { /** Sum of income for this year based on the items marked on the tax card. */ yearlyPreviousIncome?: number | null; /** Provides a decimal number for a recommended widthholding tax IF it is possible to calculate that based on given information. Null, if the information is not sufficient to give a recommendation. */ tax?: number | null; } /** Read-only calculations and other logic methods on a Taxcard. */ export declare interface TaxcardResults { /** Total income for the actual year, which is used for income limit. Note that this does not include January income that may be paid for previous year taxcard. */ readonly totalIncome?: number | null; /** Total income for January of the following year that is paid for previous year taxcard (this taxcard) if there is no new taxcard for January. */ readonly totalIncomeJanuary?: number | null; /** Payments of the salary calculations that were made using Palkkaus.fi system (as opposed to external salaries etc) and that were marked to this card. These are for the actual year, which is used for income limit. For Shared card, all employers are considered, for Owner copies of shared card, only salaries paid by owner is considered. */ readonly payment?: number | null; /** Payments of the salary calculations that were made using Palkkaus.fi system (as opposed to external salaries etc) and that were marked to this card. These are for January of the following year that is paid for previous year taxcard (this taxcard) if there is no new taxcard for January. For Shared card, all employers are considered, for Owner copies of shared card, only salaries paid by owner is considered. */ readonly paymentJanuary?: number | null; /** Gets the validity of the taxcard today. This value reflects purely the date value - it does not take into account approval or replacement. */ readonly validityToday?: TaxcardValidity | null; } /** * Provides CRUD functionality as well as business logic for storing and using Finnish Taxcards and calculating Withholding tax. */ export declare class Taxcards extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Sets the auto-taxcard functionality on for the given personal ID. * Auto-taxcard fetches the widtholding data automatically from the tax authorities API every time the salary is paid. * NOTE: In current implementation, the income type is always Salary (00024: Palkkaa). * @param personalId The Personal ID for the person to whom to set the taxcard as auto. * @param firstSalaryDate First salary date if known: If this is close enought to the actual salary date we do not need to refetch the taxcard from the authorities. * @returns The saved new automatic taxcard. * If null, the tax authorities do not have a record for this personal id: It must be handled manually (cannot be set as shared). */ setAuto(personalId: string, firstSalaryDate?: DatelyObject): Promise; /** * Checks automatic taxcards from the tax authorities. If the taxcard has been checked within 2 days, does nothing. * If there are no changes, updates the LastChecked date only. If there are changes, creates a new taxcard container and returns it instead. * @param taxcardIds List of identifiers of taxcards that should be checked. * @param salaryDate Salary date for which the taxcard is checked. * @param forceUpdate If true, skips the 2 day rule and always checks from the tax athorities API. * @returns The refreshed taxcards. */ refreshAuto(taxcardIds: string, salaryDate?: DatelyObject, forceUpdate?: boolean): Promise; /** * Client-side (synchronous) method for getting a new blank item as bases for UI binding. * You need to set the Personal ID to bind the taxcard to an account. */ getBlank(): Taxcard; /** * Saves a taxcard to the storage. * Removes empty incomeLog entries because they may be added by data binding in UI. * Entries are currently considered empty if both id and income are falsy: Typically income should be there, * but taxable income may be zero on a calculation (entry with id) and it makes sense to keep the entry still. * @param itemToSave - The item that is updated/inserted. * @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.). */ save(itemToSave: Taxcard): Promise; /** * Commits the current DIFF to the saved item. * Diff is the difference of income log saved in the taxcard to real paid calculations in the storage.. * It is returned in each Save / GetSingle. * Modifications to non-modified items are also saved, but modifications to diff items have no effect: Diff is fetched from server. * Removes empty incomeLog entries because they may be added by data binding in UI (see Save for details). * @param itemToSave - The item that is updated/inserted with Diff saved. * @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.). */ commitDiff(itemToSave: Taxcard): Promise; /** * Calculates the widhholding tax based on a given tax card. * * @param id - Identifier of the tax card. * @param income - New salary or other income, for which the widthholding tax is calculated. * * @returns A Promise with result data (TaxCardResult). */ calculateWithId(id: string, income: number): Promise; /** * Calculates the widhholding tax based on a given tax card * * @param income - New salary or other income, for which the widthholding tax is calculated. * @param taxCard - Tax card based on which the widthholding tax is calculated. This method will not connect to database in any way so the taxcard may or may not be stored. * * @returns A Promise with result data (TaxCardResult). */ calculate(income: number, taxCard: Taxcard): Promise; /** * Gets all the current taxcards for the current Worker account: * The cards that the account has uploaded as well as the cards created by all Employers. * This method can only be run for a personal account (not for a Company account). * @returns The cards that the account has uploaded as well as the cards created by all Employers. * Only current cards (not expired) are provided. */ getMyTaxcards(): Promise; /** * Gets all the current taxcards for an employment relation: * All the cards by the Employer, but also the latest card uploaded by the Worker herself. * @param employmentId The employment id for which to search the taxcards. * @param paymentDate Payment date for which the validity (current card in use) is calculated. If null, Next workday is used. * This may be changed to next default payment date without that being a breaking change. * @returns The cards created by the Employer and also the latest card uploaded by the Worker herself. * Only current cards (not expired) are provided. */ getEmploymentTaxcards(employmentId: string, paymentDate: DatelyObject): Promise; /** * Returns the url where to post the tax card file using form post ('multipart/form-data'). */ getUploadUrl(): string; /** * Returns the url where to get the tax card file with authentication token. */ getDownloadUrl(taxCard: Taxcard): string; /** * Returns the url where to get the tax card preview image with authentication token. * @param taxcard Either an API object or list item for which the preview is shown. * For Workers, supports Employer owned taxcards by passing owner ID in addition to just ID. */ getPreviewUrl(taxcard: Taxcard | TaxcardListItem | ApiListItem): string; /** * Gets a list of all non-terminated employments of the employer and resolves their current taxcards. * The current taxcards may be for the current year or for next year if the current date is either December or January. * @param query The options for the query: Filter, search sort etc. * This is either a strongly typed object or query string that is added directly. * @param paymentDate Payment date for which the validity (current card in use) is calculated. If null, Next workday is used. * This may be changed to next default payment date without that being a breaking change. */ getCurrentCards(query: ODataQueryOptions | string, paymentDate?: DatelyObject): Promise>; } /** Basic information about the taxcard: This object has the information printed in SalarySlip etc. but not the full salaries paid to the taxcard etc. */ export declare interface TaxcardSnapshot { /** Year that the tax card is valid for. Typically this means from February of this year to January of the following. */ forYear: number; /** Validity for the taxcard as expressed in the card. Note that the end date may not be reliable if new taxcard has replaced this one. */ validity?: DateRange | null; /** Tax percent as percent. I.e. for 50% set 50, not 0.5. */ taxPercent?: number | null; /** Income up to which the TaxPercent can be used. Any income above the limit is taxed with ExcessTaxPercent. */ incomeLimit?: number | null; /** Cumulative income on the taxcard - including this calculation. Note that with shared taxcards, this may include income from other employers. */ cumulativeIncome?: number | null; /** Tax percentage that is used in calculating the widthholding tax for the part of income above the IncomeLimit. This is percent. I.e. for 50% set 50, not 0.5. */ taxPercent2?: number | null; /** A Worker may request a minimum percent that is deducted even if the effective tax percent would be lower. This can be used if Worker knows that he/she will be earning more in the year than what was estimated when the taxcard was created. */ taxPercentMin?: number | null; /** TaxPercentMin set by owner of the card. This overrides the tax percent min set by the taxcard sharer. */ taxPercentMinOwned?: number | null; /** The income type of the taxacard if fetched from the tax authorities taxcard API. */ incomeType?: TaxcardApiIncomeType | null; /** Type of the taxcard as of 2019, when the taxcards logic was simplified by the Finnish tazx authorities. */ kind?: TaxcardKind | null; /** Uri to the file copy of the tax card. Set by the system as part of the upload process, do not change in the API though it may be technically possible. This may have unintended results. */ fileUri?: string | null; /** Uri to the preview image of the tax card. Set by the system as part of the upload process, do not change in the API though it may be technically possible. This may have unintended results. */ previewUri?: string | null; /** Explicit value of when the item was last checked. At the moment, updated in API fetches only, but may be used later for other checks. Undefined value is 1.1.2000 */ lastChecked?: string | null; } /** TaxcardState enumeration */ export declare enum TaxcardState { New = "new", Approved = "approved", EmployerAdded = "employerAdded", VerifiedVero = "verifiedVero", SharedWaiting = "sharedWaiting", SharedApproved = "sharedApproved", SharedRejected = "sharedRejected", SharedRejectedWithoutOpen = "sharedRejectedWithoutOpen", Shared = "shared" } /** * Display information and language versioned texts that make sense to * end-users about the status of taxcard. */ export declare interface TaxcardUiInfo { /** * Status as in * "ok": Valid taxcard, * "missing": No taxcard, employer should add a new one., * "waiting": A shared taxcard is waiting for approval. Existing may be valid or not. * or null: No calculation or employment relation specified. */ status: "ok" | "waiting" | "missing" | null; /** * Kind that is quaranteed to be non-null (undefined). This is about the existing taxcard, * there may still be a new card "waiting" and that may have another kind specified. */ kind: TaxcardKind; /** Descriptive text to the end user containing the percent if relevant. */ text: string; /** Shorter version of the descriptive text to the end user. */ shortText: string; /** * The tax percent if it is relevant for the taxcard. * Number is 0-60, not decimal e.g. 0.60. Null if not relevant. */ percent: number; } /** TaxcardValidity enumeration */ export declare enum TaxcardValidity { Undefined = "undefined", Valid = "valid", ValidJanuary = "validJanuary", Future = "future", Expired = "expired" } /** Informs the employer that there is a Worker taxcard waiting for approval potentially without revealing personal information. */ export declare interface TaxcardWaitingApproval { /** URI for the shared card: This is the taxcard owned by the Worker and to view it you need to request your own copy (would be in FullCard). */ uri?: string | null; /** Type of the taxcard. */ kind?: TaxcardKind | null; /** Status of the taxcard */ state?: TaxcardState | null; /** Time when the taxcard was added. */ createdAt?: string | null; /** Owner account that added the taxcard. */ owner?: Avatar | null; /** If true, the relation has not yet been confirmed: I.e. the employer has just input the Finnish Personal Id (HETU) of the Worker. The employment relation is confirmed when salaries are paid or salary request is received from Worker. */ isRelationUnconfirmed?: boolean | null; /** If there is an owner instance of taxcard for the employer, the copy is added here. Instance exists only if there is a confirmed employment relation or if employer explicitly requests the taxcard. */ fullCard?: Taxcard | null; } /** TaxDeductionWorkCategories enumeration */ export declare enum TaxDeductionWorkCategories { None = "none", Householdwork = "householdwork", Carework = "carework", HomeImprovement = "homeImprovement", OwnPropety = "ownPropety", RelativesProperty = "relativesProperty", OilHeatingReplacementWork = "oilHeatingReplacementWork" } /** Service related to integration, reporting and payments to tax authorities. */ export declare interface TaxProduct { /** The reference number for the tax authorities */ paymentReferenceNumber?: string | null; /** Defines how the reporting is done for Incomes registry (Tulorekisteri). */ irReporting?: TaxReportHandling | null; /** If true, tax and social security payments are paid directly by the employer. */ isTaxAndSocialSecuritySelfHandling?: boolean | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** The status text that should give the user. Restrict the length to 56 characters. */ readonly status?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If true, the product is enabled for the current user */ enabled?: boolean | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** TaxReportHandling enumeration */ export declare enum TaxReportHandling { Default = "default", NoZeroSalaryReport = "noZeroSalaryReport", NoMonthlyReport = "noMonthlyReport", Always = "always" } /** TaxWithholdingKind enumeration */ export declare enum TaxWithholdingKind { Undefined = "undefined", Percentage = "percentage", FixedValue = "fixedValue" } export declare interface TaxWithholdingUsecase { /** Tax percent (0 - 1) {Palkkaus.Model.Usecases.CalculationRows.TaxWithholdingKind.Percentage} or fixed euro amount {Palkkaus.Model.Usecases.CalculationRows.TaxWithholdingKind.FixedValue} for tax with holding. */ taxValue?: number | null; /** Primary subtyping of the usecase. */ kind?: TaxWithholdingKind | null; } /** Client-side logic for TaxWithholding */ export declare class TaxWithholdingUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param _date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. * @param calcData The calculation related data that is required by the more complex calculations: * This data is available only after first round-trip to the server (results object exists) and not all user interfaces may provide this. */ updateUsecase(row: UserDefinedRow, _date: DatelyObject, calcData: RowUsecaseCalcData): void; /** Gets validation message*/ protected getUcValidation?(row: UserDefinedRow): UsecaseValidationMessage; } /** Captures the collection of parameters that different Framework agreements (TES) have. */ export declare interface TesParameters { /** Type of the work framework */ type?: FrameworkAgreement | null; /** Subtype when one framework has several options */ subType?: TesSubtype | null; /** Marker that the payments defined by framework agreement are included in the salary (will not be added by the calculation). */ isTesIncludedInSalary?: boolean | null; /** Number of days may affect calculation of different payments calculated based on a Framework agreement */ numberOfDays?: number | null; /** Travel expences per day */ dailyTravelExpenses?: number | null; /** The amount of kilometers travelled by day - used to define the amount of travel expenses in aomse framework agreements. */ dailyTravelExpensesKm?: number | null; /** Daily expenses amount */ dailyExpenses?: number | null; /** If true will calculate the Finnish child care subsidy */ isYksityisenHoidonTuki?: boolean | null; /** Amount of Finnish child care subsidy */ yksityisenHoidonTukiAmount?: number | null; } /** TesSubtype enumeration */ export declare enum TesSubtype { NotSelected = "notSelected", ConstructionCarpenter = "constructionCarpenter", ConstructionFloor = "constructionFloor", ConstructionOther = "constructionOther", ConstructionFreeContract = "constructionFreeContract" } /** * Methods for testing the API. */ export declare class Test { private ajax; /** * For NG1-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax); /** * Basic hello world message. Echoes the given message back. * * @param message - Message. * * @returns A Promise with result data (message). */ hello(message: string): Promise; /** * Test a long lasting request. * * @param seconds - Delay in seconds. * * @returns A Promise with result data (Delay in seconds). */ delay(seconds: number): Promise; /** * Test JSON serialization. Echoes a given object either in success callback or in the promise. * * @param testValues - TestValues object. * * @returns A Promise with result. */ values(testValues: TestValues): Promise; /** * Creates a test account and returns test account details. * * @param onboarding - Onboarding object. * * @returns A Promise with result data (test accounts). */ createTestAccount(onboarding: Onboarding): Promise; /** * Deletes a test account and related objects * * @param accountId - Account id to delete. * * @returns A Promise with result data "Object deleted". */ deleteTestAccount(accountId: string): Promise; /** * Test methods that throws an exception on server side. * * @param errorType Type of error * * @returns A Promise if success parameter is null. For throwException, * the promise is always rejected after the error is thrown in the server. */ throwException(errorType: ApiTestErrorType): Promise; /** * Delete the current account data and credentials (including Auth0 user). * Can be called only in a test environment. */ deleteCurrentAccount(): Promise; /** * Remove all calculations, workers etc. user objects except products and signature from the account. * Can be called only in a test environment. */ deleteCurrentAccountData(): Promise; /** * Remove all calculations, payrolls and payments from the account. * Can be called only in a test environment. */ deleteCurrentAccountCalculations(): Promise; /** * Remove workers including calculations, employment contracts and tax cards from the account. * Can be called only in a test environment. */ deleteCurrentAccountWorkers(): Promise; /** * Remove all holiday year from all workers. Does not touch the default values of holidays in Worker Employment relation. * Can be called only in a test environment. */ deleteCurrentAccountHolidays(): Promise; /** * Remove pension and insurance from the account. * Can be called only in a test environment. */ deleteCurrentAccountPensionAndInsurance(): Promise; /** * Remove the signature from the account. * Can be called only in a test environment. */ deleteCurrentAccountSignature(): Promise; /** * Delete all empty accounts (company or worker) created by this account. * Can be called only in a test environment. */ deleteCurrentAccountAuthorizingAccounts(): Promise; /** * Sets the data for taxcards API for a personal Id for system-wide (all users). * @param testData The data that is stored as test data. * If the taxcard kind is Undefined, the data is cleared for that taxcard. * If the kind is NoTaxcard, the API wil return null. * Other kinds will be set as Auto. * @returns The data as it would be returnded now from the API */ setTaxcardApi(testData: TaxcardInput): Promise; /** * Gets taxcard information for a personal Id. * @param personalId Personal ID for which the data is fetched. * @returns Taxcard input or null if none is stored in the test data file. * Note if this APi returns null, system defaults to a fixed test taxcard. * If you want the system to return null, set kind to NoTaxcard. */ getTaxcardApi(personalId: string): Promise; /** * Deletes the current account's KYC (Know Your Customer) information. * @returns A Promise that resolves to a string representing the result of the deletion. */ deleteCurrentAccountKyc(): Promise; /** * Activates the current account's KYC (Know Your Customer) using the provided data. * @returns A Promise that resolves to the company account. */ activateCurrentAccountKyc(): Promise; } /** Object containing essential details of the test account */ export declare interface TestAccountInfo { /** Bearer token for authentication. */ token?: string | null; /** The current user credentials. */ userCredential?: SessionUserCredential | null; } /** TestEnum enumeration */ export declare enum TestEnum { ValueZero = "valueZero", ValueOne = "valueOne", ValueTwo = "valueTwo", ValueThree = "valueThree", ValueFour = "valueFour", ValueFive = "valueFive", ValueSix = "valueSix", ValueSeven = "valueSeven", ValueEight = "valueEight", ValueNine = "valueNine", ValueTen = "valueTen" } /** Test object with value properties. */ export declare interface TestValues { /** Test integer. */ intValue?: number | null; /** Test double. */ doubleValue?: number | null; /** Test decimal. */ decimalValue?: number | null; /** Test string. */ stringValue?: string | null; /** Test DateTime. */ dateTimeValue?: string | null; /** Test Date. */ dateValue?: string | null; /** Test bool. */ boolValue?: boolean | null; /** Test object. */ objectValue?: any | null; /** Test array */ arrayValue?: any[] | null; /** Test enum */ enumValue?: TestEnum | null; /** Free values dictionary. */ dictValue?: { [key: string]: any; } | null; } /** * Helpers for formatting and encoding / decoding texts. */ export declare class Texts { /** * Escapes HTML * @param html HTML text to escape * @returns HTML escaped (&<>!'/) */ static escapeHtml(html: string): string; /** * Replaces characters in strings that are illegal/unsafe for filenames. * Unsafe characters are either removed or replaced by a substitute set * in the optional `options` object. * * Illegal Characters on Various Operating Systems * / ? < > \ : * | " * https://kb.acronis.com/content/39790 * * Unicode Control codes * C0 0x00-0x1f & C1 (0x80-0x9f) * http://en.wikipedia.org/wiki/C0_and_C1_control_codes * * Reserved filenames on Unix-based systems (".", "..") * Reserved filenames in Windows ("CON", "PRN", "AUX", "NUL", "COM1", * "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", * "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", and * "LPT9") case-insesitively and with or without filename extensions. * * Capped at 255 characters in length. * http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs * * @param name File name to escape. */ static escapeFileName(name: string): string; } /** ThreadedMessageType enumeration */ export declare enum ThreadedMessageType { Text = "text", BlobFile = "blobFile", Calculation = "calculation", Payroll = "payroll", WorkerAccount = "workerAccount", Email = "email", SalaxyEmail = "salaxyEmail", Sms = "sms", SalaxySms = "salaxySms", Timer = "timer", TimerEdited = "timerEdited", HourlyReport = "hourlyReport", TimeReport = "timeReport", Absence = "absence", AnnualLeave = "annualLeave", CalcRow = "calcRow", Travel = "travel", Expense = "expense" } /** * Defining message object TimesheetInput */ export declare interface TimesheetInput { /** TimesheetInput modification status */ modification?: TimesheetInputModification | null; /** TimesheetInput period info */ period?: DateRange | null; /** startTime for worktime reporting */ startTime?: string | null; /** endTime for worktime reporting */ endTime?: string | null; /** total reported time */ totalTime?: number | null; /** total reported time in seconds */ totalTimeInSeconds?: number | null; /** TimesheetInput related project */ project?: string | null; /** Description for project? */ projectText?: string | null; /** Validation text */ validation?: ApiValidation | null; /** Accounting related data for the row. */ accounting?: RowAccounting | null; } /** TimesheetInput modification status */ export declare enum TimesheetInputModification { /** modification status create */ CREATE = "create", /** modification status update */ UPDATE = "update", /** modification status delete */ DELETE = "delete" } /** * Helper class for JWT tokens. */ export declare class Token { /** * Validates the JWT token. Please note that the method does not check the signature. * Returns: * noToken - the token is null, * invalid - the token has invalid format, or some payload values (e.g. exp) are missing, * expired - the token has expired, * ok - token is valid. */ static validate(token: string): "noToken" | "ok" | "expired" | "invalid"; /** * Decodes and parses the payload from the string formatted token. * @param token Token as a string. * @returns Payload of the token as JSON object. */ static parsePayload(token: string): any; /** * Decodes and parses the header from the string formatted token. * @param token Token as a string. * @returns Payload of the token as JSON object. */ static parseHeader(token: string): any; } /** Calculates the total numbers - the ones that are common to Employer and worker. */ export declare interface TotalCalculationDTO { /** The total pension payment for this calculation */ pension?: number | null; /** The total unemployment payment sum. */ unemployment?: number | null; /** The total of all calculation rows */ total?: number | null; /** The base salary without overtime and other such additions that are part of gross salary. */ totalBaseSalary?: number | null; /** Gross salary is the salary including additions like overtime, but not benefits or expenses */ totalGrossSalary?: number | null; /** Taxable salary is the salary from the taxation point of view - includes some benefits. */ totalTaxable?: number | null; /** Deduction from TotalTaxable to tax at source calculation. */ taxAtSourceDeduction?: number | null; /** DEPRICATED: This is now the same as TotalPensionInsuranceBase. For other social insurances, you may want to use TotalUnemploymentInsuranceBase, TotalHealthInsuranceBase or TotalAccidentInsuranceBase, */ totalSocialSecurityBase?: number | null; /** Base income for calculating the Pension insurance contributions. */ totalPensionInsuranceBase?: number | null; /** Base income for calculating the Unemployment insurance contributions. */ totalUnemploymentInsuranceBase?: number | null; /** Base income for calculating the Health insurance contributions. */ totalHealthInsuranceBase?: number | null; /** Base income for calculating the Accident insurance contributions. */ totalAccidentInsuranceBase?: number | null; /** Tax free expenses. */ totalExpenses?: number | null; /** Total sum of rows that are paid through Salaxy Customer Funds account. This is the Gross sum before side costs, deductions etc., but it is not Gross salary as it includes expenses etc. */ totalPayable?: number | null; } /** TotalWorkerPaymentKind enumeration */ export declare enum TotalWorkerPaymentKind { Undefined = "undefined", TotalWorkerPayment = "totalWorkerPayment", TotalWorkerWorkerPaymentExcludingExpenses = "totalWorkerWorkerPaymentExcludingExpenses", TotalWorkerPaymentAndTax = "totalWorkerPaymentAndTax", TotalWorkerWorkerPaymentAndTaxExcludingExpenses = "totalWorkerWorkerPaymentAndTaxExcludingExpenses" } /** Optimizes the worker payments using the given target amount. */ export declare interface TotalWorkerPaymentUsecase { /** Calculation row type for adjusting the amount. */ rowType?: CalculationRowType | null; /** Message for the row. */ message?: string | null; /** Primary subtyping of the usecase. */ kind?: TotalWorkerPaymentKind | null; } /** Client-side logic for TotalWorkerPayment */ export declare class TotalWorkerPaymentUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. */ updateUsecase(row: UserDefinedRow): void; /** Gets validation message for BoardUsecaseLogic */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** TrainingKind enumeration */ export declare enum TrainingKind { Undefined = "undefined", TrainingSalary = "trainingSalary", TrainingHourlySalary = "trainingHourlySalary", TrainingMonthlySalary = "trainingMonthlySalary" } /** Handles the Calculation of CalculationRowType.Training to IrRows */ export declare interface TrainingUsecase { /** Primary subtyping of the usecase. */ kind?: TrainingKind | null; } /** Client-side logic for TrainingUsecase */ export declare class TrainingUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * param row Row to update. */ updateUsecase(): void; /** Gets validation message for IrIncomeTypeUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; } /** TransactionCode enumeration */ export declare enum TransactionCode { Unknown = "unknown", Ignored = "ignored", TimeRatePay = "timeRatePay", InitiativeFee = "initiativeFee", BonusPay = "bonusPay", ComplementaryWagePaidDuringBenefitPeriod = "complementaryWagePaidDuringBenefitPeriod", EmergencyWorkCompensation = "emergencyWorkCompensation", EveningWorkCompensation = "eveningWorkCompensation", EveningShiftAllowance = "eveningShiftAllowance", NoticePeriodCompensation = "noticePeriodCompensation", KilometreAllowanceTaxable = "kilometreAllowanceTaxable", MeetingFee = "meetingFee", SaturdayPay = "saturdayPay", ExtraWorkPremium = "extraWorkPremium", HolidayBonus = "holidayBonus", LectureFee = "lectureFee", CompensationForTrustPosition = "compensationForTrustPosition", OtherCompensation = "otherCompensation", WaitingTimeCompensation = "waitingTimeCompensation", WorkingConditionCompensation = "workingConditionCompensation", PartialPayDuringSickLeave = "partialPayDuringSickLeave", Commission = "commission", SundayWorkCompensation = "sundayWorkCompensation", BenefitArisingFromSyntheticOption = "benefitArisingFromSyntheticOption", PerformanceBonus = "performanceBonus", MonetaryCompensationFromWorkingTimeBank = "monetaryCompensationFromWorkingTimeBank", CompensationForAccruedTimeOff = "compensationForAccruedTimeOff", ShareIssueForEmployees = "shareIssueForEmployees", ContractPay = "contractPay", DamagesInConjunctionWithTermination = "damagesInConjunctionWithTermination", StandByCompensation = "standByCompensation", VoluntaryCompensationInConjunctionWithTermination = "voluntaryCompensationInConjunctionWithTermination", WeeklyRestCompensation = "weeklyRestCompensation", ProfitSharingBonus = "profitSharingBonus", AnnualHolidayCompensation = "annualHolidayCompensation", OvertimeCompensation = "overtimeCompensation", NightWorkAllowance = "nightWorkAllowance", NightShiftCompensation = "nightShiftCompensation", OtherRegularCompensation = "otherRegularCompensation", CompensationForUnusedCompensatoryLeave = "compensationForUnusedCompensatoryLeave", AccommodationBenefit = "accommodationBenefit", InterestBenefitForHousingLoan = "interestBenefitForHousingLoan", MealAllowance = "mealAllowance", CarBenefit = "carBenefit", CompensationForGoverningBodyMembership = "compensationForGoverningBodyMembership", ShareOfReserveDrawnFromPersonnelFund = "shareOfReserveDrawnFromPersonnelFund", MonetaryGiftForEmployees = "monetaryGiftForEmployees", KilometreAllowanceTaxExempt = "kilometreAllowanceTaxExempt", TreatmentFeeForMunicipalVeterinarian = "treatmentFeeForMunicipalVeterinarian", CompensationForUseEarnedIncome = "compensationForUseEarnedIncome", CompensationForUseCapitalIncome = "compensationForUseCapitalIncome", OtherTaxableBenefitForEmployees = "otherTaxableBenefitForEmployees", OtherTaxableIncomeDeemedEarnedIncome = "otherTaxableIncomeDeemedEarnedIncome", OtherFringeBenefit = "otherFringeBenefit", KinshipCarersFee = "kinshipCarersFee", StockOptions = "stockOptions", WagesPaidBySubstitutePayerIncludingSocialInsurance = "wagesPaidBySubstitutePayerIncludingSocialInsurance", WagesPaidBySubstitutePayerIncludingEarningsRelatedPensionInsurance = "wagesPaidBySubstitutePayerIncludingEarningsRelatedPensionInsurance", WagesPaidBySubstitutePayerIncludingUnemploymentInsurance = "wagesPaidBySubstitutePayerIncludingUnemploymentInsurance", WagesPaidBySubstitutePayerIncludingAccidentAndOccupationalDiseaseInsurance = "wagesPaidBySubstitutePayerIncludingAccidentAndOccupationalDiseaseInsurance", WagesPaidBySubstitutePayerIncludingHealthInsurance = "wagesPaidBySubstitutePayerIncludingHealthInsurance", CompensationForEmployeeInvention = "compensationForEmployeeInvention", ReimbursementOfPrivateCaretakersExpenses = "reimbursementOfPrivateCaretakersExpenses", PrivateCaretakersFee = "privateCaretakersFee", ReimbursementOfFamilyDayCareProvidersExpenses = "reimbursementOfFamilyDayCareProvidersExpenses", TelephoneBenefit = "telephoneBenefit", DailyAllowance = "dailyAllowance", CapitalIncomePayment = "capitalIncomePayment", MealBenefit = "mealBenefit", ReimbursementOfCostsPaidToConciliator = "reimbursementOfCostsPaidToConciliator", NonWageCompensationForWork = "nonWageCompensationForWork", SupplementaryDailyAllowancePaidByEmployerSpecificHealthInsuranceFund = "supplementaryDailyAllowancePaidByEmployerSpecificHealthInsuranceFund", PensionPaidByEmployer = "pensionPaidByEmployer", DividendsBasedOnWages = "dividendsBasedOnWages", DividendsBasedOnNonWage = "dividendsBasedOnNonWage", EmployerSubsidisedCommuterTicketTaxExempt = "employerSubsidisedCommuterTicketTaxExempt", EmployerSubsidisedCommuterTicketTaxable = "employerSubsidisedCommuterTicketTaxable", EmployeeStockOption = "employeeStockOption", WagesTransferredToAthletesSpecialFund = "wagesTransferredToAthletesSpecialFund", WagesPaidFromAthletesSpecialFund = "wagesPaidFromAthletesSpecialFund", WagesForInsurancePurposes = "wagesForInsurancePurposes", TaxableReimbursementOfExpenses = "taxableReimbursementOfExpenses", PrivateDayCareAllowanceMunicipalSupplement = "privateDayCareAllowanceMunicipalSupplement", PrivateDayCareAllowanceWages = "privateDayCareAllowanceWages", PrivateDayCareAllowanceNonWage = "privateDayCareAllowanceNonWage", KilometreAllowancePaidByNonProfitOrganisation = "kilometreAllowancePaidByNonProfitOrganisation", DailyAllowancePaidByNonProfitOrganisation = "dailyAllowancePaidByNonProfitOrganisation", UnjustEnrichment = "unjustEnrichment", EmployeeStockOptionLowerMarketPrice = "employeeStockOptionLowerMarketPrice", RoyaltyPaidToNonResidentTaxpayer = "royaltyPaidToNonResidentTaxpayer", BicycleBenefitTaxExempt = "bicycleBenefitTaxExempt", BicycleBenefitTaxable = "bicycleBenefitTaxable", ConditionalStockOptions = "conditionalStockOptions", CopyrightRoyaltiesEarnedIncome = "copyrightRoyaltiesEarnedIncome", StockGrantPaidInMoney = "stockGrantPaidInMoney", EmployeeStockOptionPaidInMoney = "employeeStockOptionPaidInMoney", EarningsFromJuELEmployerToLightEntrepreneur = "earningsFromJuELEmployerToLightEntrepreneur", CompensationCollectedForCarBenefit = "compensationCollectedForCarBenefit", WithholdingTax = "withholdingTax", ElectedOfficialFee = "electedOfficialFee", TaxAtSource = "taxAtSource", TaxAtSourceDeduction = "taxAtSourceDeduction", WagesPaid = "wagesPaid", ReimbursementCollectedForOtherFringeBenefits = "reimbursementCollectedForOtherFringeBenefits", OtherItemDeductibleFromNetWage = "otherItemDeductibleFromNetWage", NetWage = "netWage", EmployerPaidPremiumForCollectiveAdditionalPensionInsurance = "employerPaidPremiumForCollectiveAdditionalPensionInsurance", EmployerPaidPremiumForCollectiveAdditionalPensionInsuranceEmployeesContribution = "employerPaidPremiumForCollectiveAdditionalPensionInsuranceEmployeesContribution", EmployeesHealthInsuranceContribution = "employeesHealthInsuranceContribution", EmployeesPensionInsuranceContribution = "employeesPensionInsuranceContribution", EmployeesUnemploymentInsuranceContribution = "employeesUnemploymentInsuranceContribution", ReimbursementForEmployerSubsidisedCommuterTicket = "reimbursementForEmployerSubsidisedCommuterTicket", TaxPaidAbroad = "taxPaidAbroad", Distraint = "distraint", VoluntaryIndividualPensionInsurancePremium = "voluntaryIndividualPensionInsurancePremium", DeductionBeforeWithholding = "deductionBeforeWithholding", ReimbursementCollectedForBicycleBenefit = "reimbursementCollectedForBicycleBenefit" } /** * Provides universal i18n methods (language versions) as a singleton service in global scope (browser window or NPM thread). */ export declare class Translations { /** * Gets the singleton instance behind the static methods: * Can be used to access more advanced methods that are not available in static class. */ static readonly instance: TranslationsInstance; /** * Sets the locales path from which the locales will loaded. * @param path The path to the directory in wwwroot where locales can be found. Default is "locales". */ static setLocalesPath(path: string): void; /** * Sets the function which is responsible for loading a dictionary for the given language. * This is an alternative to the default locales path functionality. * @param localesFunc The function that will be called to load the dictionary for the given language. */ static setLocalesFunc(localesFunc: (lang: string) => Promise): void; /** * Translates given key to the current language. * @param key - Key for the text. * @param interpolateParams - Variables for the interpolation. * @param lang Language to fetch. Default is the current language. * @param templateOnly If true, will fetch the template directly without the interpolation. * @returns The translated value in current/given language, potentially interpolated. * If none is found... * * - If the key does not start with "SALAXY." (plain text, not a key), returns the text as-is. * - If the Finnish translation is found, returns it. Prefixed with red exclamation mark in test only. * - If fi translation not found, returns the key - always prefixed with red exclamation mark (prod and test). */ static get(key: string, interpolateParams?: any, lang?: string, templateOnly?: boolean): string; /** * Translates given key to the current language with default value. * @param key - Key for the text. * @param defaultValue - The default value that is returned if the key is not found. Null is the default. * @param lang Language to fetch. Default is the current language. * @returns The translated value in current language or if none is found the key. */ static getWithDefault(key: string, defaultValue?: any, lang?: string): string; /** * Gets any object (string or dictionary) with the given property path. * @param key Key for the text. * @param lang Language to fetch. Default is the current language. * @returns The object if found using the key, null if none is found. */ static getAny(key: string, lang?: string): any; /** * Loads a language bundle from the server on-demand. * The method will check the loadedLanguages collection, so it will load a language only once => Can be called every time the user language changes. * This method is designed to fail outside browser. Browser is recognized based on having globalThis.fetch. * The default Finnish dictionary is added added from code lib (not http) unless the Config has the * noCache attribute set (used in dev-mode to get the templates and i18n directly from files instead of dist). * @param lang Language to load. */ static loadLanguage(lang: string): Promise; /** * Adds a dictionary. * @param lang - ISO language code for the dictionary to be added: fi, en or sv. * @param translations - A translations object (json). */ static addDictionary(lang: string, translations: DictionaryLang): void; /** * Add all dictionaries from a single language object. * @param translations - A translations object (json). * This object must have language codes as first level keys. */ static addDictionaries(translations: { [key: string]: DictionaryLang; }): void; /** * Sets the Salaxy user interface language. * @param lang - One of the supported languages: "fi", "en" or "sv". */ static setLanguage(lang: "fi" | "en" | "sv"): void; /** * Gets the current user interface language * @returns One of the supported languages: "fi", "en" or "sv". */ static getLanguage(): "fi" | "en" | "sv"; } /** Dictionary with all the known languages. */ export declare interface TranslationsDictionary { /** Finnish: The primary and source language that comes as part of the @salaxy/core library. */ fi: DictionaryLang; /** English */ en: DictionaryLang; /** Swedish */ sv: DictionaryLang; } /** * Provides universal i18n methods: This is an instance class that can be instanciated for editing etc. * Use Translations static class to access the singleton instance attached to global / window: * This is woulc be the most common usecase. */ export declare class TranslationsInstance { /** The path to the folder that contains the locales files (i18n). */ localesPath: string; localesFunc: (lang: string) => Promise; /** Current language. */ private lang; /** Assign the dictionary to static property that may be updated by the environment. */ private dictionary; /** Tracking for languages that are already loaded to prevent unnecessary reloads. */ private loadedLanguages; /** * Creates a new TranslationsInstance * @param dict Optional dictionary object that contains the translations. * The default Finnish dictionary is added in any case (for fallback) unless the Config has the * noCache attribute set (used in dev-mode to get the templates and i18n directly from files instead of dist). */ constructor(dict?: any); /** * Translates given key to the current language. * @param key - Key for the text. * @param interpolateParams - Variables for the interpolation. * @param lang Language to fetch. Default is the current language. * @param templateOnly If true, will fetch the template directly without the interpolation. * @returns The translated value in current/given language, potentially interpolated. * If none is found... * * - If the key does not start with "SALAXY." (plain text, not a key), returns the text as-is. * - If the Finnish translation is found, returns it. Prefixed with red exclamation mark in test only. * - If fi translation not found, returns the key - always prefixed with red exclamation mark (prod and test). */ get(key: string, interpolateParams?: any, lang?: string, templateOnly?: boolean): string; /** * Translates given key to the current language with default value. * @param key - Key for the text. * @param defaultValue - The default value that is returned if the key is not found. Null is the default. * @param lang Language to fetch. Default is the current language. * @returns The translated value in current language or if none is found the key. */ getWithDefault(key: string, defaultValue?: any, lang?: string): string; /** * Gets any object (string or dictionary) with the given property path. * @param key Key for the text. * @param lang Language to fetch. Default is the current language. * @returns The object if found using the key, null if none is found. */ getAny(key: string, lang?: string): any; /** * Loads a language bundle from the server on-demand. * The method will check the loadedLanguages collection, so it will load a language only once => Can be called every time the user language changes. * This method is designed to fail outside browser. Browser is recognized based on having globalThis.fetch. * The default Finnish dictionary is added added from code lib (not http) unless the Config has the * noCache attribute set (used in dev-mode to get the templates and i18n directly from files instead of dist). * @param lang Language to load. */ loadLanguage(lang: string): Promise; /** * Adds a dictionary. Note that adding is really merge: non-existent keys will not be removed. * @param lang - ISO language code for the dictionary to be added: fi, en or sv. * @param translations - A translations object (json). */ addDictionary(lang: string, translations: DictionaryLang): void; /** * Add all dictionaries from a single language object. * Note that adding is really merge: non-existent keys will not be removed. * @param translations - A translations object (json). * This object must have language codes as first level keys. */ addDictionaries(translations: { [key: string]: DictionaryLang; }): void; /** * Sets a collection of terms (potentially different languages) that can be used in * ad-hoc changes of terms or when loading customized texts in service model. * @param terms An object with terms in format { [key: string]: string } where key * is a full key starting from the language, e.g. "fi.SALAXY.NG1_Sitemap.home" * and value is always an indidivual text (never an object). */ setTerms(terms: { [key: string]: string; }): void; /** * Sets the Salaxy user interface language. * @param lang - One of the supported languages: "fi", "en" or "sv". */ setLanguage(lang: "fi" | "en" | "sv"): void; /** * Gets the current user interface language * @returns One of the supported languages: "fi", "en" or "sv". */ getLanguage(): "fi" | "en" | "sv"; /** Gets the current core dictionary (all languages). */ getCurrentDictionary(): TranslationsDictionary; /** * Loads all languages from server using the locales path. * @returns The full dictionary (this is not stored to current dictionary - just fetched). */ getBaseDictionary(): Promise; /** * Fetches a single language from server language This method fails outside browser. * @param lang url param * @returns One language as dictionary object (this is not stored to current dictionary - just fetched). */ private fetchLanguage; /** * Merges objects. * @param objects - Objects to merge. */ private mergeDeep; private readValue; private isBrowser; } /** * Logic functions related to Typedoc parsing and interpretation. * TODO: This should probably be factored outside core to a separate Dev library or ng1-dev site. */ export declare class TypedocLogic { private static reflectionKind; /** * Finds an interface based on the type name. * @param docs Array of classes and interfaces from which to find an interface. * @param typeName The type name of the interface to look for. Search is case-insensitive. */ static findInterface(docs: ClassDoc[], typeName: string): ClassDoc; /** * Finds an enum based on the type name. * @param allEnums All enumerations from which to find the enum by name. * @param name The enum name to look for. Search is case-insensitive. */ static findEnum(allEnums: EnumDoc[], name: string): EnumDoc; /** * Gets a property from an interface supports single property names or longer property paths. * @param type The root type from which the property is found. * @param path Property path starting with the root type. * @param interfaces The interfaces that is used in finding types. * Typically, this is the full colelction of all classes and interfaces. */ static getProperty(type: ClassDoc, path: string, interfaces: ClassDoc[]): ClassMemberDoc; /** * Gets a typedoc type formatted as text. * @param type Type as typedoc object model. */ static getTypeAsText(type: any): string; /** * Gets a typedoc type formatted as HTML. * @param type Type as typedoc object model. * @param typeLinker Method that resolves a Typedoc type to link in the current environment. */ static getTypeHtml(type: TypeDocType, typeLinker: (typedocType: any) => string): string; /** Gets the enumerations for the given library from raw TypeDoc json. */ static getEnums(typedoc: any, lib: string): EnumDoc[]; /** Gets the classes and interfaces strongly typed from raw TypeDoc json */ static getClasses(typedoc: any, lib: string): ClassDoc[]; /** * Gets the common ROOT declaration reflection types from the Typedoc JSON: class, interface and enum * and their sub-kinds in AngularJS: controller, controllerBase and component. */ static getRootDeclarationReflection(kind: string, lib: string, typedocSource: any): RootDeclarationReflection; /** * Sets the DeclarationReflection properties from source JSON * @param target Target data structure * @param tdSource The source object from raw typedoc JSON source. */ static setDeclrProperties(target: DeclarationReflection, tdSource: any): void; /** Gets the grouping based on library and source file */ static getGroup(lib: string, source: string): string; /** For an array of types, gets an array type strings */ private static getTypeStrings; } /** Simplified read-only interface for typedoc type. */ export declare interface TypeDocType { /** Type of type */ type: "intrinsic" | "union" | "array" | "stringLiteral" | "typeParameter" | "reference" | string; /** Name of type in intrinsic and typeParameter */ name?: string; /** Collection of types in union */ types?: TypeDocType[]; /** Element type in array */ elementType?: TypeDocType; /** Value if literal */ value?: string; /** Identifier in reference */ id?: number; /** Type arguments in reference */ typeArguments?: TypeDocType[]; } /** Settings related to unemployment insurance. */ export declare interface UnemploymentInsuranceSettings { /** Status for indicating whether the total amount of paid salaries exceeds the thresold for higher unemployment insurance percent. */ payrollLimitStatus?: UnemploymentPayrollLimitStatus | null; } /** UnemploymentPayrollLimitStatus enumeration */ export declare enum UnemploymentPayrollLimitStatus { Default = "default", Higher = "higher" } /** Product that helps employer to handle the mandatory unemployment insurance reports and payments. */ export declare interface UnemploymentProduct { /** If true, the account has paid salaries this year outside Palkkaus.fi. This affects the yearly reporting - Palkkaus needs to contact the account. Note that this is a shared option with the taxation product. */ isSalariesPaidThisYear?: boolean | null; /** If true, the account has made prepayments or is registered to make prepayments. Palkkaus needs to contact the account. */ isPrepayments?: boolean | null; /** If true, the account himself handles the unemployment insurance notifications. */ isNotificationsSelfHandling?: boolean | null; /** Identifier for the product */ readonly id?: string | null; /** The main short title for the product / service */ readonly title?: string | null; /** The status text that should give the user. Restrict the length to 56 characters. */ readonly status?: string | null; /** One paragraph description text */ readonly description?: string | null; /** The logo image for the product. */ readonly img?: string | null; /** Identifier for the main product desription article in the Palkkaus.fi CMS */ readonly articleId?: string | null; /** If true, the product is enabled for the current user */ enabled?: boolean | null; /** If false, it is not bossible to enable this product for the current account / environment. Typically, this means that the UI should not show this product. */ visible?: boolean | null; /** Indicates (true-value) if the end user has confirmed the product options. If false, the end user has not confirmed the option. */ visited?: boolean | null; } /** UnionPaymentKind enumeration */ export declare enum UnionPaymentKind { Undefined = "undefined", Fixed = "fixed", Percentage = "percentage", PercentageAndLimits = "percentageAndLimits", RaksaNormal = "raksaNormal", RaksaUnemploymentOnly = "raksaUnemploymentOnly", Other = "other" } /** UnionPaymentType enumeration */ export declare enum UnionPaymentType { NotSelected = "notSelected", RaksaNormal = "raksaNormal", RaksaUnemploymentOnly = "raksaUnemploymentOnly", Other = "other" } /** Handles the Calculation of CalculationRowType.UnionPayment to IrRows */ export declare interface UnionPaymentUsecase { /** Reference for the union payment. */ referenceNumber?: string | null; /** The full name of the union for payment purposes. */ recipientFullName?: string | null; /** The International Bank Account Number of the union. */ iban?: string | null; /** Percentage of the total taxable amount to pay. Please note that this is only applicable for {Palkkaus.Model.Usecases.CalculationRows.UnionPaymentKind.PercentageAndLimits}. */ paymentPercentage?: number | null; /** Maximum payment limit, or null if not desired. Please note that this is only applicable for {Palkkaus.Model.Usecases.CalculationRows.UnionPaymentKind.PercentageAndLimits}. */ maximumPayment?: number | null; /** Minimum payment limit, or null if not desired. Please note that this is only applicable for {Palkkaus.Model.Usecases.CalculationRows.UnionPaymentKind.PercentageAndLimits}. */ minimumPayment?: number | null; /** Primary subtyping of the usecase. */ kind?: UnionPaymentKind | null; } /** Client-side logic for UnionPaymentUsecase */ export declare class UnionPaymentUsecaseLogic extends BaseUsecaseLogic { /** * Updates the usecase values based on user input without going to the server. * @param row Row to update. * @param date The reference date for which the logic is done. * Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features. * @param calcData The calculation related data that is required by the more complex calculations: * This data is available only after first round-trip to the server (results object exists). */ updateUsecase(row: UserDefinedRow, date?: DatelyObject, calcData?: RowUsecaseCalcData): void; /** Gets validation message for UnionPaymentUsecase */ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private setReferenceNumber; private getCheckNumber; } /** Unit enumeration */ export declare enum Unit { Undefined = "undefined", Hours = "hours", Days = "days", Weeks = "weeks", Period = "period", One = "one", Count = "count", Percent = "percent", Kilometers = "kilometers", Euro = "euro" } /** Usecase definition */ export declare interface Usecase { /** Uri with owner information. */ uri?: string | null; /** Short title for the usecase. */ label?: string | null; /** Longer description for what the usecase is used for. */ description?: string | null; /** URL for the icon that represents the service model. Supports font-awesome icons v4: https://fontawesome.com/v4.7/ (e.g. "fa-wrench") and images with absolute URL (https). */ icon?: string | null; /** Item type of the usecase */ itemType?: ApiItemType | null; /** The default status of the usecase in the settings. The status affects the visibilty of the usecase. */ status?: UsecaseStatus | null; /** Order setting for the usecases. This is needed e.g. ad hoc reports. */ order?: number | null; /** JSON schema defines the data model and the automatically generated default user interface for the usecase. */ schema?: any | null; /** The actions related to this usecase. */ actions?: UsecaseAction[] | null; /** Customized userinterface definitions (views) for the usecase. */ views?: UsecaseView[] | null; /** Readonly workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } export declare interface UsecaseAction { /** Type of the automation action */ actionType?: UsecaseActionType | null; /** Title of the action */ label?: string | null; /** If true, the button is shown in the user interfaces. TODO: This property may be removed before final production version => Set on/off depending on the view. */ uiShowButton?: boolean | null; /** Text for the UI button. */ uiText?: string | null; /** Defines the color of the UI button */ uiColor?: BootstrapStyle | null; /** Description of the action */ description?: string | null; /** The content: The script or other definition. */ content?: string | null; } /** UsecaseActionType enumeration */ export declare enum UsecaseActionType { ClientScript = "clientScript", ClientScriptAsync = "clientScriptAsync", ServerScript = "serverScript", ServerScriptAsync = "serverScriptAsync", WebServiceCall = "webServiceCall", PowerAutomateFlow = "powerAutomateFlow" } /** Defines the usecase data for childCare including the MLL childCare */ export declare interface UsecaseChildCare extends HouseholdUsecase { /** * If true, the work is done on Sunday or public holiday. * This means that the salary is increased by 100% according to Finnish law */ isSunday: boolean; /** * If true, a custom price is used instead of the recommended price. * Currently, this only affects the MLL case as the normal childCare price is always set by the user. */ useCustomPrice: boolean; /** If true, the salary calculation includes child care subsidy paid by the government / community. */ isChildcareSubsidy?: boolean; /** Amount for the child care subsidy paid by the government / community. */ subsidyAmount: number; } /** Defines the usecase data for cleaning */ export declare interface UsecaseCleaning extends HouseholdUsecase { /** * If salaries are compensated (when holidays are not kept, isFullTime=false), * the percentage is different depending on whether the person has been working for a full year or not. */ isContractLessThanYear: boolean; /** * If true, this is a full time contract in the respect of holidays: * Holidays are kept during summer and salary is paid for these holidays. */ isFullTime: boolean; /** * If worktype is "other", the user should describe the work. * These descriptions may be used in insurance reports generation. */ workTypeOtherMessage: boolean; } /** Defines the usecase data for construction */ export declare interface UsecaseConstruction extends HouseholdUsecase { /** * If worktype is "other", the user should describe the work. * These descriptions may be used in insurance reports generation. */ workTypeOtherMessage: boolean; /** If true, the TES additions are included in the agreed salary. */ isTesIncludedInSalary: boolean; /** * If true, the expenses are agreed in a bispoken way. * Default is that expenses are based on Framework agreement (TES) tables. */ isExpensesCustom: boolean; /** Daily distance (km) from worker home to construction site. */ dailyTravelExpensesKm: number; /** Daily expenses (työkalukorvaus) if isExpensesCustom=true */ dailyExpenses: number; /** Daily travel expenses if isExpensesCustom=true */ dailyTravelExpenses: number; } /** A usecase for creating and editing salary calculations and other . In practice, a usecase is either a user interface or a microservice that provides the bases for the object. Provides the possibility to store useacase specific data as part of object. NOTE: For Calculations, this functionality will replace TesParameters in the 3.0 version. */ export declare interface UsecaseData { /** Key for the usecase based on which it is resolved. Later, this may resolve to a user interface, microservice or a to manifest registering one. For now, just use a unique string starting with a domain you own. */ uri?: string | null; /** A short label of that can be shown to the end user. */ label?: string | null; /** Optional description of the use case for the end user. Shown in detail views when explaining the logic of the usecase. */ description?: string | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** Usecase definition. */ export declare interface UsecaseInSettings { /** Uri of the usecase */ uri?: string | null; /** Item type of the usecase */ itemType?: ApiItemType | null; /** Short title for the usecase */ label?: string | null; /** Status of the usecase in the settings. The status affects the visibilty of the usecase. */ status?: UsecaseStatus | null; /** Order setting for the usecases. This is needed e.g. ad hoc reports. */ order?: number | null; } /** Represents a single item in a list of usecases. */ export declare interface UsecaseListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: UsecaseStatus | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: UsecaseListItemData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Usecase specific business data for index. */ export declare interface UsecaseListItemData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; /** Longer description for what the usecase is used for. */ description?: string | null; /** URL for the icon that represents the service model. Supports font-awesome icons v4: https://fontawesome.com/v4.7/ (e.g. "fa-wrench") and images with absolute URL (https). */ icon?: string | null; /** Order setting for the usecases. This is needed e.g. ad hoc reports. */ order?: number | null; } /** UserDefinedRow with typed usecase data. */ export declare interface UsecaseRow extends UserDefinedRow { /** Logical type of the row */ rowType: T; /** Usecase specific data */ data: D; } /** * Provides CRUD access for Service Models */ export declare class Usecases extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): Usecase; /** * Saves an item to the storage. * If id is null, this is add/insert. If id exists, this is update. * @param itemToSave - The item that is updated/inserted. * @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.). */ save(itemToSave: Usecase): Promise; /** * Gets an URL to a resource (currently HTML user interface) in the usecase. * @param uri Full uri of the usecase. * @param type Type of the resource to fetch. Only "html" is currently supported. * @param ix Index number of the view if there are several. Default is 0. */ getResourceUrl(uri: string, type: "js" | "html", ix?: number): string; private getTempSchema; } /** Usecase related settings. */ export declare interface UsecaseSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Available usecases for the current account. */ usecases?: UsecaseInSettings[] | null; /** URL to custom staging / integration server. Used in running custom usecases and other custom integrations (currently imports). */ serverUrl?: string | null; } /** UsecaseStatus enumeration */ export declare enum UsecaseStatus { Undefined = "undefined", Active = "active", Default = "default", Inactive = "inactive" } /** Client-side validation message for a usecase input. */ export declare interface UsecaseValidationMessage { /** Message text */ msg: string; /** Type of the message. */ type: "default" | "error"; } /** Customized user interface view. */ export declare interface UsecaseView { /** Title of the action */ label?: string | null; /** Description of the action */ description?: string | null; /** The content: The HTML for the view. */ content?: string | null; } /** This is a user defined calculation row as opposed to CalculationRow that may be either based on a user defined row or generated by the system based on e.g. TES parameters. */ export declare interface UserDefinedRow { /** Zero based row index that can be used to match the row to result rows or when deleting. NOTE: The Row ID is given values on the fly so setting this will not have any effect at the moment. It may reorder the entries in later implementations. */ rowIndex?: number | null; /** Wage type. Either a built in wage type in Salaxy or a custom wage type created by the user. Please note that this type fully determines the and the kind. */ type?: string | null; /** Logical type of the row */ rowType?: CalculationRowType | null; /** Description text of the row that is shown in reports. If null, will be set according to type. */ message?: string | null; /** Count for the row - default is one */ count?: number | null; /** Price for the row */ price?: number | null; /** Unit for the row. Guessed based on the RowType and count, but you are better off setting it to be sure. */ unit?: CalculationRowUnit | null; /** Source of the calculation row - affects how the row is handled in editing / recalculation scenarios. */ source?: CalculationRowSource | null; /** Identifier in the source system is a key defined by a source system / partner system. This is a pass-through string that is passed to the result calculations. */ sourceId?: string | null; /** Accounting related data for the row. */ accounting?: RowAccounting | null; /** Period if different than the Period of calculation. Will be reported to the National Incomes registry, but also affect some other calculations. Note that this property may be (and by default is) null. */ period?: DateRange | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** * Represents the logic for handling user-defined rows. */ export declare class UserDefinedRowLogic { /** * Returns a blank UserDefinedRow object with the specified rowIndex. * * @param rowIndex - The index of the row. * @returns A blank UserDefinedRow object. */ static getBlank(rowIndex: number): UserDefinedRow; } /** Salaxy extension to Open ID Connect UserInfo claims for Application data. */ export declare interface UserInfoApplication { /** Return link back to the calling application. Token is added to this string */ return_link?: string | null; /** Return link in case of error or user cancel. */ cancel_link?: string | null; /** Application role that the user has in relation to the account in this session. Currently supported values are: "noAccess" and "owner" Also "unknown" (the default if null) is technically supported, but that value is an error in federation process by design. */ role?: UserInfoApplicationRole | null; /** Application specific state data that is sent from the federation provider to the end-application. This data is guaranteed to survive the onboarding process. */ state?: { [key: string]: string; } | null; /** TEMPORARY */ custom?: { [key: string]: string; } | null; } export declare enum UserInfoApplicationRole { Unknown = "unknown", NoAccess = "noAccess", ReadOnly = "readOnly", ReadWrite = "readWrite", Owner = "owner" } /** Salaxy extension to Open ID claims for company federation. */ export declare interface UserInfoCompanyAccount { /** If true, the authorization is made for a company account. The root user claims are just for a current user acting in behalf of the company. If false, the entire CompanyClaims object will be ignored. */ as_company?: boolean | null; /** The Business ID (Y-tunnus / Business Identity Code) is a code given to businesses and organizations by the PRH or the Tax Administration. It consists of seven digits, a dash and a control mark, for example 1234567-8. Alternative accepted formats incule international VAT number "FI12345678" or number without the dash: "12345678". */ business_id: string; /** One of the Salaxy Finnish company type shortcuts: fiOy, fiTm, fiRy, fiYy (Other) */ type: CompanyType; /** Company name - the owner of the Salaxy account and shown in salary calculations, reports and invoices. Typically this is the official full name of the company as in Business registry. */ name?: string | null; /** URL of the Company profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. The URL SHOULD specifically reference a company logo picture (PNG preferred) and it should be a square. If not, it may be converted, cropped and/or extended. */ picture?: string | null; /** The company's preferred e-mail address in relation to salary payments. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. */ email?: string | null; /** True if the Company's e-mail address has been verified; otherwise false. IMPORTANT: In Salaxy federation context, avoid sending non-confirmed e-mails. This may later become an error without being considered a breaking change. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. */ email_verified?: boolean | null; /** Company's preferred telephone number for salary payment purposes. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. */ phone_number?: string | null; /** True if the Company's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. */ phone_number_verified?: boolean | null; /** Company's preferred postal address in relation to salary payments. The value of the address member is a JSON [RFC4627] structure containing some or all of the members defined in Section 2.5.1. */ address?: OpenIdUserInfoAddress | null; /** The primary partner account for the new company to create. If the company already exists and has given authorization to the primary partner, and does not have any primary partner, the primary partner will be set. Please note, that the calling account must have the authorization to the primary partner account, or be the primary partner itself. */ proxy_partner?: string | null; /** The account identifier at the partner site. If present, this ID is used to restrict the authorization to one account at partner site only. */ partner_account_id?: string | null; } /** Salaxy extension to Open ID Connect UserInfo claims for Personal account federation. */ export declare interface UserInfoPersonAccount { /** If true, the user issuer indicates that the current user has the right to sign in behalf of the company / association. In this case the provider must also provide a valid Finnish personal ID in personal_id field. */ can_sign_company?: boolean | null; /** A Finnish Personal ID (Henkilötunnus / HETU) for digital signature. If can_sign_company is set to true, the issuer should provide a valid personal id here. */ personal_id?: string | null; } /** Passes the data about the authorization that is the bases for callin the services that require user authorization. */ export declare interface UserSession { /** If false, the current user needs to be authenticated or authenticated user does not have acces to the system. */ isAuthorized?: boolean | null; /** If false, the current user does not have a credential in the system => need to redirect to login */ hasCredential?: boolean | null; /** If false, the current user does not have a current account. If HasCredential is true, this means that the user should be redirected to Account creation wizard. */ hasCurrentAccount?: boolean | null; /** Authorization status */ status?: AuthorizationStatus | null; /** Avatar that should be shown for the current session. Typically CurrentAccount.Avatar, but could theoretically be something different. */ avatar?: Avatar | null; /** The current user credentials. */ currentCredential?: SessionUserCredential | null; /** The current Palkkaus.fi-account that the user acting as */ currentAccount?: IVerifiedAccount | null; /** Contains html for system alert. */ systemAlertHtml?: string | null; /** Often needed settings directly in session object. NOTE: For editing settings, request the full settings object separately. */ settings?: AccountSettingsInSession | null; } /** * Provides base methods for validation. * These are typically used in user interface validator components. */ export declare class Validation { /** * Converts a validation error to a string that is in the same format as the messages in ApiList items. * Used in moving validatiaon errors to list items. */ static validationErrorAsMessage(error: ApiValidationError): string; /** * Returns true if the given value is a valid Finnish Personal ID (HETU / SSN). * Checks the format and checksum. * @param value Candidate for Finnish Personal ID. */ static isPersonalIdFi(value: string): boolean; /** * Returns true if the value is a valid e-mail. * Currently uses a simple regex (source?). * @param value E-mail candidate. */ static isEmail(value: string): boolean; /** * Returns true if the value is a valid mobile phone number: 5-16 numbers and spaces (5-18 if there is a "+" in the beginning). * Currently uses a naive regex, but we could extend this to take into account the regional differences. * @param value Mobile phone number candidate. */ static isMobilePhone(value: string): boolean; /** * Returns true if the value is a valid currency amount with maximum two decimals. * @param value Currency amount candidate */ static isCurrency(value: string): boolean; /** * Returns true if the value is a valid number. * @param value Number candidate */ static isNumber(value: string): boolean; /** * Returns true if the value is a valid integer. * @param value Number candidate */ static isInteger(value: string): boolean; /** * Returns true if the value is a valid tax percent amount with maximum one decimal. * @param value Tax percent candidate */ static isTaxPercent(value: string): boolean; /** Returns true if the value is a valid Finnish Postal code: 5 numbers. */ static isPostalCodeFi(value: string): boolean; /** * Returns true if the value is a valid Finnish Company ID. If the format is not correct, will return false. * @param companyIdCandidate String to validate / format * @param allowStarAsChecksum If true, allows the checksum character (the last char) to be an asterix (*). * @returns boolean */ static formatCompanyIdFi(companyIdCandidate: string, allowStarAsChecksum?: boolean): boolean; /** * Returns true if the value is a valid IBAN number. * Checks for the country specific length as well as checksum. * @param value IBAN number number candidate. */ static isIban(value: string): boolean; /** * For validating (RF) reference number. * @param value - (RF) reference number. * * In Finland, the RF reference is formed on the basis of the Finnish reference number. Structure of the RF reference is as follows: * RFXX1234561, in which * RF is the identifier * XX are the two check digits * 1234561 is the Finnish reference number, which can be freely formed by the customer. * Maximum length of the number is 20 digits, and the final number is a check digit calculated using the algorithm for Finnish reference numbers. * The Finnish reference number is appended with the numbers "2715" (the letters RF converted into integers) and "00" * The modulo 97 operation is performed on the resulting figure. * The remainder is then deducted from 98, which then results in the checksum. If the checksum is smaller than 10, a leading zero is added. */ static isFinnishBankReferenceNumber(value: string): boolean; /** * For calculating bank reference checksum number. * @param value - Reference number without checksum. * * The reference number must always include a checksum. The checksum is calculated as follows: * All digits of the reference number are multiplied from right to left with the values 7, 3, 1. * The products are then summed up and the sum is subtracted from the following full ten. * The resulting difference is the checksum, the final digit in the reference number. * If the difference is 10, the checksum is 0. */ static getCheckNumber(value: string): number | undefined; /** * Returns PensionCompany for the given pension contract number. * @param value - Pension contract number. */ static isPensionContractNumber(value: string): PensionCompany; /** * Returns PensionCompany for the given *temporary* pension contract number. * @param value - TemporaryPension contract number. */ static isTemporaryPensionContractNumber(value: string): PensionCompany; } /** * Helper for custom validation methods. */ export declare class ValidationHelper { /** The validation object that is used for adding errors warnings etc. */ validation: ApiValidation; constructor(validation: ApiValidation); /** * Add a warning to the validations object * @param message Required warning message * @param code Optional unique code for the validation error * @param field Full path to Name of the property / field (Member name in JSON). */ warn(message: string, code?: string, field?: string): void; /** Add a error to the validations object */ error(message: string, code?: string, field?: string): void; /** Adds a missing required field to validations object */ missing(field: string, message?: string): void; /** * Checks that the required item is not null / empty. * If it is adds a required field missing error. */ checkNotEmpty(root: any, path: string, message?: string): boolean; /** * Clears any existing validation errors * @param code If specified clears only errors with specified code. May be a string or regexp. */ clear(code?: RegExp | string): void; /** * Merges the errors of another validation error to this validation. * @param validation Another api validation object with potential errors. * May also be null or with null error array without raising errors. */ merge(validation: ApiValidation): void; /** Recalculates the read-only helper properties based on the errors list. */ recalc(): void; } /** Contains order data for Varma pensions (TyEL, YEL) and required operations. */ export declare interface VarmaPensionOrder { /** Orderer information. */ orderer?: InvoiceParty | null; /** Action for the order. */ action?: VarmaPensionOrderAction | null; /** Validation information. */ validation?: ApiValidation | null; /** YEL data for the order */ yel?: VarmaPensionOrderYel | null; /** TyEL data for the order */ tyel?: VarmaPensionOrderTyel | null; } /** VarmaPensionOrderAction enumeration */ export declare enum VarmaPensionOrderAction { Undefined = "undefined", NewYel = "newYel", NewTyel = "newTyel", Move = "move" } /** Varma pension order TyEL details. */ export declare interface VarmaPensionOrderTyel { /** Personal id number. */ personalId?: string | null; /** If true, indicates that existing contract will be moved to Varma. */ isMove?: boolean | null; /** Estimated yerly income. */ yearlyIncome?: number | null; /** Start year for the new order. */ startYear?: string | null; /** Start month for the new order. */ startMonth?: string | null; /** Movement timing. (Q1,Q2,Q3 or Q4, or as soon as possible) */ moveMoment?: string | null; } /** Varma pension order YEL details. */ export declare interface VarmaPensionOrderYel { /** Personal id number. */ personalId?: string | null; /** Payer definition. */ payer?: VarmaPensionOrderYelPayer | null; /** If true, indicates that existing contract will be moved to Varma. */ isMove?: boolean | null; /** Estimated yearly income. */ yearlyIncome?: number | null; /** Start date for the new pension. */ startDate?: string | null; /** Movement timing. (Q1,Q2,Q3 or Q4, or as soon as possible) */ moveMoment?: string | null; /** Indicates if the existing yearly income estimate will be changed. */ isYearlyIncomeChange?: boolean | null; } /** VarmaPensionOrderYelPayer enumeration */ export declare enum VarmaPensionOrderYelPayer { Undefined = "undefined", Entrepreneur = "entrepreneur", Company = "company" } /** For VAT breakdown of a receipt (ALV-erittely) represents a single VAT rate and the revenue and tax with that rate. */ export declare interface VatEntry { /** Tax amount of specific VAT rate in euro. This value is mandatory, if the collection of VatEntries contains more than one item. */ tax?: number | null; /** Applied VAT rate. This is always mandatory. */ vatRate?: VatRate | null; /** Tax as percent of Net sales (0-1). Currently just informative, but may later be used for Custom non-standard VAT rates. */ taxPercent?: number | null; /** Gross sales for specific VAT rate including the tax (VAT). This value is mandatory, if the collection of VatEntries contains more than one item. */ gross?: number | null; /** Net sales for specific VAT rate excluding the tax (VAT). This value is mandatory, if the collection of VatEntries contains more than one item. */ net?: number | null; } /** VatRate enumeration */ export declare enum VatRate { Undefined = "undefined", None = "none", Vat0000 = "vat0000", Vat1000 = "vat1000", Vat1400 = "vat1400", Vat2400 = "vat2400", Vat2550 = "vat2550", Other = "other" } /** Version information for the API object. */ export declare interface VersionInfo { /** Identifier for the version. */ versionId?: string | null; /** Operation which created the version. */ operation?: string | null; /** Date and time when the version was created. */ date?: string | null; /** User account who created the version. */ userAccount?: Avatar | null; } /** * Authentication methods for VismaSign. * This is the raw list of methods as returned by https://www.onnistuu.fi/api/v1/auth/methods * We will override most of these images as the ones below are pretty outdated. * @ignore */ export declare const vismaSignOriginalMethods: { identifier: string; name: string; image: string; }[]; /** For Visma Sign V01, data that is stored within the onboarding object. */ export declare interface VismaSignV01ObData { /** Document ID identifies the document (one or several files) that are to be signed in Visma Sign storage. */ documentId?: string | null; /** Invitation ID that is used in the signature process */ invitationId?: string | null; /** Category / folder where the item is stored. */ category?: string | null; /** File name in Visma Sign. */ fileName?: string | null; /** Logs the authentication service (e.g. 'tupas-osuuspankki', 'tupas-nordea') for later analyses. All methods are available in https://sign.visma.net/api/v1/auth/methods (test: https://vismasign.frakt.io/api/v1/auth/methods) */ authService?: string | null; } /** WageBasis enumeration */ export declare enum WageBasis { Undefined = "undefined", Monthly = "monthly", Hourly = "hourly", PerformanceBased = "performanceBased", Other = "other" } /** Type of the account to be created. */ export declare enum WebSiteAccountType { None = "none", Household = "household", Worker = "worker", Company = "company" } /** WebSiteUserRole enumeration */ export declare enum WebSiteUserRole { None = "none", Household = "household", Worker = "worker", Company = "company" } /** Data that is used for displaying the welcome page for the Worker account. */ export declare interface WelcomeDataWorker { /** The welcome page timeline cards. */ timeline?: ApiListItem[] | null; /** Active taxcard added by the Worker or null, if none is added (or none is valid for today). */ activeTaxcard?: Taxcard | null; } /** Describes the work that is being performed - mainly for Employment relation purposes. */ export declare interface WorkDescription { /** Free text description of the work that is being performed. */ description?: string | null; /** Occupation classification, used at least for Accident insurance purposes, but may be used for other reporting. For Finnish Salaries use the Statistics Finland "Classification of Occupations 2010" (TK10): https://www.stat.fi/meta/luokitukset/ammatti/017-2018-05-15/index_en.html */ occupationCode?: string | null; /** Secondary occupation classification. Some earnings payment reports may require two occupation codes. */ occupationCode2?: string | null; /** Contains default calculation rows for the worker. Typically used for setting for example monthly salary or hourly salary price for workers. */ salaryDefaults?: UserDefinedRow[] | null; /** Default bases for wage. */ wageBasis?: WageBasis | null; /** Number of hours per month defined in the employment contract. */ monthlyHours?: number | null; /** Contains calculation specific data for accounting (both cost and financial accounting). */ accounting?: CalculationAccounting | null; } /** Absence Period with Worker information. */ export declare interface WorkerAbsencePeriod { /** WorkerAbsences storage object that contains the period */ absencesId?: string | null; /** The Worker that owns the Absence period */ worker?: Avatar | null; /** Identifies a single leave. */ id?: string | null; /** Period for the absance. */ period?: DateRange | null; /** Cause / type of the absence */ causeCode?: AbsenceCauseCode | null; /** If true, the absence is paid by the employer. */ isPaid?: boolean | null; /** If true, annual leaves are accrued from the absence. If false, these days are deducted from the accrual. By default, you may leave this null and it always follows the IsPaid. */ isHolidayAccrual?: boolean | null; /** Amount of salary that is paid for the absense. Currently not in use: Would be used in Incomes Register integration. */ amount?: number | null; /** Additional information as recorded by the Employer. */ notes?: string | null; /** Identifier in the source system is a key defined by a source system / partner system. This is a pass-through string that is passed to the result calculations. */ sourceId?: string | null; /** Number of Bonus days to be paid. */ bonusDaysCount?: number | null; } /** Absences for a single Worker. */ export declare interface WorkerAbsences { /** Account ID for the worker whose absences are recorded. */ workerId?: string | null; /** The employment relation id for the worker whose absences are recorded. */ employmentId: string; /** Collection of absence periods. */ periods?: AbsencePeriod[] | null; /** Basic information for the Worker. Automatically updated upon save based on WorkerId. Mainly for the listings etc. */ workerSnapshot?: Avatar | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Account data that is relevant for a Worker. */ export declare interface WorkerAccount { /** Tha bank account number of the Worker - in Iban format. */ ibanNumber?: string | null; /** If created (and still owned) by an employer, this is the AccountOwnerId of the employer who created this account. */ employerId?: string | null; /** The Person ID of the worker if known. */ officialPersonId?: string | null; /** Age range that is relevant to workers salary calculation and/or employment. Set this especially if OfficialPersonId is not set. If OfficialPersonId is valid, this property is always set based on it. */ ageRange?: AgeRange | null; /** Current Employment Relation: The data that is owned by the Employer about the Worker even if the Worker has registered and created an account. If employer has several Employment Relations, this is the one that is marked as Primary. */ employment?: WorkerAccountEmployment | null; /** Provides validation errors currently only in Save operations, but potentially in the future also in detail/list views. */ validation?: ApiValidation | null; /** The unique id for the employment. This does not change within one employment. */ employmentId?: string | null; /** Entity type of the account. Type PersonCreatedByEmployer means that the Worker has not yet signed into the system and there may be multiple instances of the same logical person (Official ID) - one for each employer. */ entityType?: LegalEntityType | null; /** If true the object Account is and Employer account - it has the EmployerInfo object */ isEmployer?: boolean | null; /** If true the object Account is and Worker account - it has the WorkerInfo object */ isWorker?: boolean | null; /** If true, the account has been verified. Typically this means a digitally signed contract. This means that the account also has an Identity object. However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */ isVerified?: boolean | null; /** Avatar is the visual representation of the Account. */ avatar?: Avatar | null; /** Contact information for the Account. */ contact?: Contact | null; /** Language of the person/company. */ language?: Language | null; /** Service model for the account. */ serviceModelId?: string | null; /** Workflow data, which is exposed to API. */ workflowData?: WorkflowData | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Employment Relation as it is shown as part of WorkerAccount. */ export declare interface WorkerAccountEmployment { /** Type of the employment relation */ type?: EmploymentRelationType | null; /** Type of additional income earner data by National Incomer Register classification . If several types apply, all of them should be selected. */ irIncomeEarnerTypes?: IncomeEarnerType[] | null; /** Describes the work that is being performed in this Employment Relation. */ work?: WorkDescription | null; /** Defines how the holidays are specified to this Worker. */ holidays?: HolidaySpecification | null; /** Usecase is data related to the source and processing of the Employment data outside the Salaxy backend service / system. Typically, Usecase data would be processed by an external system that has originally created the Employment Relation (Worker / Employee in many systems). E.g. expenses system, hourly reporting system. */ usecase?: UsecaseData | null; /** Type for the pension insurance. */ pensionCalculation?: PensionCalculation | null; /** Rules (e.g. effect of monthly lower limit) for pension calculation. */ pensionRule?: PensionRule | null; /** The id of the pension company. */ pensionCompany?: PensionCompany | null; /** The pension contract number. */ pensionContractNumber?: string | null; /** The id of the insurance company. */ insuranceCompany?: InsuranceCompany | null; /** The accident insurance contract number. */ insuranceContractNumber?: string | null; /** Taxcard type from the employment point of view. */ taxcard?: EmploymentRelationTaxcard | null; /** Worker's salary payment method, bank account, external etc. */ salaryPaymentMethod?: EmploymentRelationSalaryPaymentMethod | null; /** Start date of the Employment Relation. */ startDate?: string | null; /** End date of the Employment Relation. */ endDate?: string | null; /** Duration of the employment. If true, the employment relation is for a fixed term. Otherwise (which is the default) the employment relation continues until further notice. */ isFixedTerm?: boolean | null; /** Indicates that the employment relation has been terminated. Saving with this status also makes the employment relation Archived. */ isTerminated?: boolean | null; /** If true, the worker is the same person as the actual signed owner of the account. */ isAccountOwner?: boolean | null; /** Identifier in a source system. Used in imports etc. */ sourceId?: string | null; /** Employment registration code for Incomes Registry. */ employmentRegCode?: string | null; } /** The Worker side of the calculation. SalarySlip is largely written based on this calculation. */ export declare interface WorkerCalculationDTO { /** The benefits as valued by the tax authority. */ benefits?: number | null; /** All the items that are deducted from the salary (this is also the order if there is not enough payable money): SalaryAdvance + Tax + Pension + UnemploymentInsurance + UnionPayment + OtherDeductions */ deductions?: number | null; /** The payment that is made to the Worker based on salary after all deductions. Does not include expenses. */ salaryPayment?: number | null; /** The salary advance that was paid to the Worker */ salaryAdvance?: number | null; /** The foreclosure that been deducted from the salary by the employer. */ foreclosure?: number | null; /** Ennakonpidätys: The taxes that were deducted from the worker salary. */ tax?: number | null; /** Lähdevero: The tax at source that were deducted from the worker salary. */ taxAtSource?: number | null; /** Net salary after tax - before worker foreclosure or deductions of the side costs */ salaryAfterTax?: number | null; /** Net salary after tax and foreclosure. */ salaryAfterTaxAndForeclosure?: number | null; /** Part of the Pension that is taken from the Worker side of the salary. */ pension?: number | null; /** Workers part of the unemployment insurance. */ unemploymentInsurance?: number | null; /** The social security payment. NOT paid as a part of tax withhold . */ socialSecurity?: number | null; /** The union payment that is deducted from the Worker salarya s per workers request. */ unionPayment?: number | null; /** Widthholding tax: The original calulated version - there might not be enough money to finally pay this. */ fullTax?: number | null; /** Tax at source: The original calulated version - there might not be enough money to finally pay this. */ fullTaxAtSource?: number | null; /** The salary advance that was paid to the Worker The original calulated version - there might not be enough money to finally pay this. */ fullSalaryAdvance?: number | null; /** Part of the Pension that is taken from the Worker side of the salary. The original calulated version - there might not be anough money to finally pay this. */ fullPension?: number | null; /** Workers part of the unemployment insurance. The original calulated version - there might not be anough money to finally pay this. */ fullUnemploymentInsurance?: number | null; /** The social security payment. NOT paid as a part of tax withhold . The original calculted version. */ fullSocialSecurity?: number | null; /** The union payment that is deducted from the Worker salarya s per workers request. */ fullUnionPayment?: number | null; /** The sum that is at the end paid to the Worker: Salary payment + expenses */ totalWorkerPayment?: number | null; /** Total payment using pre Insiders register calculation logic. DEPRICATED: This is provided for special scenarios and may be removed without warning */ totalWorkerPaymentLegacy?: number | null; /** The side costs that are deducted from the Worker salary according to law: Pension, Unemployment and Union payment. Tax is not included in this number. This is not an official number, really used in the charts etc. */ workerSideCosts?: number | null; /** Other deductions that are deducted from the net salary. The original calulated version - there might not be enough money to finally deduct this. */ fullOtherDeductions?: number | null; /** Part of the other deductions that are deducted from the net salary. */ otherDeductions?: number | null; /** Prepaid expenses that are deducted from the expenses to be paid to the worker. The original calulated version - there might not be enough money to finally deduct this. */ fullPrepaidExpenses?: number | null; /** Part of the prepaid expenses that are deducted from the expenses. */ prepaidExpenses?: number | null; } /** API worker check object. The API uses this object for checking the existence of a worker with employment. */ export declare interface WorkerCheck { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 This field is optional and defaults to the company number of the current account. */ officialId?: string | null; /** Item id to check. This can be external ID, official ID or Salaxy ID. */ id?: string | null; /** Validation for the import */ validation?: ApiValidation | null; /** Result object of the import. */ result?: ApiCheckResultOfWorkerAccountOf | null; } /** Contains the status and necessary data with Workers current taxcards. */ export declare interface WorkerCurrentTaxcards { /** The currently active taxcard if one exists. This property is null by default. */ active?: Taxcard | null; /** All the relevant taxcards as list items. For Workes own taxcards search (MyTaxcards) this is ownerd cards only */ list?: TaxcardListItem[] | null; /** Employer taxcards from all Employers for the Worker account. All available within the searched timestring. This list is only available for the Worker, not for the Employer. */ employers?: TaxcardListItem[] | null; /** Personal ID that is used for taxcard binding. This always exists as opposed to Employment. */ personalId?: string | null; /** Employment relation if the search is done based on employment relation ID and not Current worker account. */ employment?: AccountInIndex | null; /** A shared taxcard waiting for approval if one exists. This property is null by default. */ waitingApproval?: TaxcardWaitingApproval | null; /** Employment preference for the taxcard. */ employmentTaxcard?: EmploymentRelationTaxcard | null; } /** Worker specific business data for index. */ export declare interface WorkerData { /** Type of the employment relation. */ type?: EmploymentRelationType | null; /** Type for the pension insurance. */ pensionCalculation?: PensionCalculation | null; /** Taxcard type from the employment point of view. */ taxcard?: EmploymentRelationTaxcard | null; /** Start date of the Employment Relation. */ startDate?: string | null; /** End date of the Employment Relation. */ endDate?: string | null; /** Duration of the employment. If true, the employment relation is for a fixed term. Otherwise (which is the default) the employment relation continues until further notice. */ isFixedTerm?: boolean | null; /** Indicates that the employment relation has been terminated. Saving with this status also makes the employment relation Archived. */ isTerminated?: boolean | null; } /** API worker import object. The API uses this object for mass operations for creating or assuring the worker employment relations in the system. */ export declare interface WorkerImport { /** Company number in the the trade register (Y-tunnus). Format is "1234567-8" - 7 numbers, one control character, with or without the dash. Also, the international VAT format is allowed: FI12345678 This field is optional and defaults to the company number of the current account. */ officialId?: string | null; /** Additional parameters for import. Defaults to string. */ parameters?: { [key: string]: any; } | null; /** Item for import. */ item?: WorkerAccount | null; /** Validation for the import */ validation?: ApiValidation | null; /** Result object of the import. */ result?: ApiImportResultOfString | null; } /** * Type for a single worker import row. */ export declare interface WorkerImportRow extends DataRow { /** Official ID of the payer company. */ companyOfficialId?: string; /** The personal ID for the worker. */ personalId?: string; /** Identifier in a source system. Used in imports etc. */ sourceId?: string | null; /** First name */ firstName?: string | null; /** Last name */ lastName?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; /** Street address */ street?: string | null; /** Postal code */ postalCode?: string | null; /** City or community (postitoimipaikka) */ city?: string | null; /** * This is the ISO code for country. * Currently, it should always be "fi". */ countryCode?: string | null; /** Start date of the Employment Relation. */ startDate?: string | null; /** Type of the employment relation */ employmentType?: EmploymentRelationType | null; /** Type for the pension insurance. */ pensionCalculation?: PensionCalculation | null; /** * Free text description of the work that is being performed. */ description?: string | null; /** * Occupation classification, used at least for Accident insurance purposes, but may be used for other reporting. * For Finnish Salaries use the Statistics Finland * "Classification of Occupations 2010" (TK10): https://www.stat.fi/meta/luokitukset/ammatti/017-2018-05-15/index_en.html */ occupationCode?: string | null; /** * Taxcard type from the employment point of view. */ taxcard?: EmploymentRelationTaxcard | null; /** Default salary row type. */ defaultRowType?: CalculationRowType | null; /** Default kind if the default row type requires kind. */ defaultRowKind?: any | null; /** Default salary */ defaultSalary?: number | null; } /** Represents a single item in a list of workers in the user interface. It contains all essential information of the worker and is basis for searching, filtering and sorting. */ export declare interface WorkerListItem { /** The date when the object was created. */ createdAt?: string | null; /** The time when the object was last updated. Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Person GUID for the owner of the object. */ ownerId?: string | null; /** Metadata for the owner */ ownerInfo?: AccountInIndex | null; /** The main status depending on the type of the object. */ status?: string | null; /** The back office status depending on the type of the object. */ backOfficeStatus?: string | null; /** When the event started. Typically, this is the CreatedAt date, but it may be something else. */ startAt?: string | null; /** This is the end date of the event. Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */ endAt?: string | null; /** Gross salary if that is relevant to the transaction. */ grossSalary?: number | null; /** This is the payment from the Owner point-of-view: Total payment for the Employer and Net salary for the Worker in the case of a calculation. Only add here the payment, if the payment is really made. */ payment?: number | null; /** Estimated fee of the transaction to Palkkaus.fi. */ fee?: number | null; /** The GUID for the other party. Currently, this is always the PersonID. */ otherId?: string | null; /** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */ otherPartyInfo?: AccountInIndex | null; /** A very short description describing the object as an event. E.g. "Paid salary" */ shortText?: string | null; /** Business object ids related to this object. E.g. calculations and payrolls in the payment. */ businessObjects?: string[] | null; /** This is valid for calculations only. The estimated date of salary in worker. */ salaryDate?: string | null; /** Business data to include further information of the object. */ data?: WorkerData | null; /** Version number. May be used in conflicts */ versionNumber?: number | null; /** Salaxy uri of the resource. */ uri?: string | null; /** Workflow flags for the object. Only workflow events with API supported message types are listed. */ flags?: string[] | null; /** Workflow messages for the object. Only workflow events with API supported message types are listed. Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */ messages?: string[] | null; /** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */ entityType?: string | null; /** The date for the actual period for which this object is done. */ logicalDate?: string | null; /** Reference information. E.g. Payment or MoneyTransfer reference number. */ reference?: string | null; /** External id for the object in 3rd party system. */ externalId?: string | null; /** Identifier of the object. */ id?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** * Provides CRUD access to Workers (employees) created by the employer * or to whom the employer has paid salaries. */ export declare class Workers extends CrudApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** Gets the OData URL */ getODataUrl(): string; /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): WorkerAccount; /** Saves the Worker account ot the storage */ save(itemToSave: WorkerAccount): Promise; /** * Adds/updates the workflow event for the item. * * @param item - Item for which to set the workflow event. * @param wfEvent - Event to add or update. * @returns Workflow data for the item. */ saveWorkflowEvent(item: WorkerAccount, wfEvent: WorkflowEvent): Promise; /** * Deletes the workflow item or items from the item. * @param item - Item for which to delete workflow events. * @param wfIdOrType - Event id or type. * @returns A Promise with result data "Object deleted". */ deleteWorkflowEvent(item: WorkerAccount, wfIdOrType: string): Promise; /** * Gets a single workflow event for the item. * @param item - Item for which to get the single event. * @param wfId - Event id or type. * @returns A Promise with event data". */ getWorkflowEvent(item: WorkerAccount, wfId: string): Promise; } /** WorkerSalaryNotification enumeration */ export declare enum WorkerSalaryNotification { Always = "always", Silent = "silent" } /** WorkerSalarySlipDeliveryMethod enumeration */ export declare enum WorkerSalarySlipDeliveryMethod { Default = "default", Payslip = "payslip", Omapalkka = "omapalkka" } /** * Data row for employments data. This is typically used for imports and exports. */ export declare interface WorkersDataRow extends DataRow { /** Id for the worker */ id?: string | null; /** First name */ firstName?: string | null; /** Last name */ lastName?: string | null; /** Email address. */ email?: string | null; /** Telephone number. */ telephone?: string | null; /** Bank account number (IBAN) */ ibanNumber?: string | null; /** Official id of the person or company. */ officialId?: string | null; } /** A summary report for a worker for a specific period (typically month or year) and selected employer. */ export declare interface WorkerSummaryReportData { statistics?: CalculationResultStatistics | null; /** Worker avatar */ worker?: Avatar | null; /** Worker's socials security number */ workerSocialSecurityNumber?: string | null; /** Worker's bank account number */ workerIbanNumber?: string | null; /** Contact information for the report. Typically the employer, but may be something else. */ workerContact?: Contact | null; /** Additional result data for the worker summary report. */ workerResult?: WorkerSummaryResult | null; /** Finnish Business Identifier (Y-tunnus) for the company. */ businessId?: string | null; /** Employer avatar */ employer?: Avatar | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Start date for the report */ startDate?: string | null; /** End date for the report */ endDate?: string | null; /** The total sum information for the report - this is the main payload of the report */ result?: CalculationResult | null; /** Individual calculations based on which the report is made. Depending on the request, this may be filled in or null (as opposed to empty list). */ calculations?: Calculation[] | null; } /** Additional result data for the worker summary report. */ export declare interface WorkerSummaryResult { /** Cash salary row details. */ cashSalary?: SummaryCalculationRows | null; /** Benefits details. */ benefitsInKind?: SummaryCalculationRows | null; /** Expense details. */ expenses?: SummaryCalculationRows | null; } /** Defines the data that IWorkflowItem must provide. */ export declare interface WorkflowData { /** Workflow events for the item. */ events?: WorkflowEvent[] | null; } /** Event in the workflow */ export declare interface WorkflowEvent { /** Event-provider specific identifier for the event. For deletable events, this should identify , but do NOT trust this to be 100% unique. */ id?: string | null; /** Type of the event. This typically maps to parent-object specific enumeration. */ type?: string | null; /** Message for backoffice purposes from the User or system that created the event. */ message?: string | null; /** User Interface styling of the event: Indicates the severity for the end-user. */ ui?: BootstrapStyle | null; /** Features for this event. */ features?: WorkflowEventFeatures[] | null; /** UTC time for when the event occured. */ time?: string | null; /** User or system that created the event. */ user?: string | null; /** Credential of the user which is responsible of the event. */ assignedTo?: string | null; /** Record attached to this event. */ record?: string | null; } /** WorkflowEventFeatures enumeration */ export declare enum WorkflowEventFeatures { None = "none", IsActive = "isActive", IsEditable = "isEditable", IsRemovable = "isRemovable", IsOnHold = "isOnHold" } /** WorkingTimeCompensationKind enumeration */ export declare enum WorkingTimeCompensationKind { Undefined = "undefined", EmergencyWorkCompensation = "emergencyWorkCompensation", EveningWorkCompensation = "eveningWorkCompensation", EveningShiftAllowance = "eveningShiftAllowance", SaturdayPay = "saturdayPay", ExtraWorkPremium = "extraWorkPremium", OtherCompensation = "otherCompensation", WaitingTimeCompensation = "waitingTimeCompensation", SundayWorkCompensation = "sundayWorkCompensation", StandByCompensation = "standByCompensation", WeeklyRestCompensation = "weeklyRestCompensation", OvertimeCompensation = "overtimeCompensation", NightWorkAllowance = "nightWorkAllowance", NightShiftCompensation = "nightShiftCompensation" } /** WorkingTimeCompensationPricing enumeration */ export declare enum WorkingTimeCompensationPricing { Undefined = "undefined", Percent = "percent", Fixed = "fixed" } /** Working time compensation row. */ export declare interface WorkingTimeCompensationRow { /** Count for compensation row. */ count?: number | null; /** Percent for price calculation. */ percent?: number | null; /** Compensation price, fixed price or calculated using percent. */ price?: number | null; /** Message for compensation row */ message?: string | null; /** Unit for compensation row. */ unit?: CalculationRowUnit | null; /** Accounting related data for the row. */ accounting?: RowAccounting | null; } /** Handles the Calculation of CalculationRowType.WorkingTimeCompensation to IrRows */ export declare interface WorkingTimeCompensationUsecase { /** Primary subtyping of the usecase. */ kind?: WorkingTimeCompensationKind | null; } /** Client-side logic for WorkingTimeCompensationUsecase */ export declare class WorkingTimeCompensationUsecaseLogic extends BaseUsecaseLogic { /** Gets validation message*/ getUcValidation(row: UserDefinedRow): UsecaseValidationMessage; private getCodeData; } /** Connects to Worktime service in the staging server */ export declare class WorktimeApiConnector extends StagingApiConnector { constructor(serviceUrl: string, ajax: Ajax); /** * If a payroll is selected, filters the list of worktime imports to only show those with calculations for the selected payroll. */ get filteredList(): WorktimeImportInStagingListItem[]; /** The current rows filtered by current payroll */ filteredRows: WorktimeImportRow[]; /** Manually editable rows */ editableRows: WorktimeImportRow[]; /** Number of rows that are outside the already created Payrolls. */ rowsOutsidePayrollCount: number; /** * List of payrolls available in the system * Undefined if the payrolls have not yet been fetched. */ payrolls: PayrollListItem[] | undefined; /** Currently selected Payroll */ payroll: PayrollDetails | undefined; /** Current payroll id if the payroll filter has been set. */ get payrollId(): string | undefined; /** Current calc is the main preview calculation if available. */ currentCalc: Calculation | undefined; /** All preview calculations as input enum bindable array */ calculations: InputEnumOption[]; /** Getter and setter for current calculation by ID. */ get currentCalcId(): string | undefined; set currentCalcId(value: string | undefined); /** * Set the current payroll * @param payroll The payroll to set as current. */ setPayroll(payroll: PayrollDetails | undefined): void; /** * Marks the selected rows with given state. * @param rows - The rows to mark. * @param status - The status to set. * Status "new" is essentially reverting the state from "ignored" => final state may be "preview", "new" or "error" depending on other properties of the row. */ setStatus(rows: WorktimeImportRow[], status: "ignored" | "new"): Promise; /** Sets the current item in the UI. */ setCurrent(item: WorktimeImport | undefined): void; /** * Client-side (synchronous) method for getting a new blank item as bases for UI binding. * TODO: Move to helpers. */ static getBlank(): WorktimeImport; /** * Gets the payroll (list item) for the currently selected calculation. * This returns undefined if the list of payrolls has not been loaded (Payroll details view). * @returns The payroll metadata if found or undefined. */ getPayrollForCurrentCalc(): PayrollListItem | undefined; /** * Recalculates a worktime item in storage. * @param id Identifier of the worktime item to recalculate. If none, is specified recaculates the current (current is also set). * @returns The recalculated worktime item or undefined if not found / no current & id. */ recalculateWorktime(id?: string): Promise; /** * Saves the manual rows to the server. * @returns The updated worktime import. */ saveManualRows(): Promise; private setcurrentCalcByPayrollId; private setFiltersByCurrentCalc; } /** Worktime Import is a shortcut to import worktime data from external sources to Payroll, Calculations, Ebsences and Holidays. */ export declare interface WorktimeImport { /** General data about how the import should be performed. */ header?: WorktimeImportHeader | null; /** The Worktime import rows that are added / merged in this import. */ rows?: WorktimeImportRow[] | null; /** * Employment information that may be coming in as part of Worktime import. * Typically, these would be used only when creating a new employment. Perhaps some contact information is updated later depending on the import logic. */ employments?: WorktimeImportEmployment[] | null; /** Potential files (CSV, Excel, JSON etc.) that may be the source of the import. */ files?: WorktimeImportFile[] | null; /** Usecase Uri defines a custom handling for the import and data may contain additional parameters for the import logic. */ usecase?: UsecaseData | null; /** The workflow data for manual editing and approval purposes. */ workflowData?: WorkflowData | null; /** Preview of the objects that would be created / updated in the import. */ preview?: WorktimeImportPreview | null; /** Identifier of the object. */ id?: string | null; /** The date when the object was created. */ createdAt?: string | null; /** * The time when the object was last updated. * Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */ updatedAt?: string | null; /** Owner ID for this data */ owner?: string | null; /** Indication that for the currently logged-in account, the data is generally read-only. */ isReadOnly?: boolean | null; /** Primary partner information. Automatically updated from the storage container Partner. */ partner?: string | null; } /** Employment information that may be coming in as part of Worktime import. Typically, these would be used only when creating a new employment. Perhaps some contact information is updated later depending on the import logic. */ export declare interface WorktimeImportEmployment { /** * Contains values that are needed when creating an employment, but where changing is restricted in the future: * E.g. names and personalId are required when creating a new employment, but once a calculation is created (or at least paid), * editing of theses is no longer possible. See the editing rules for individual properties. */ identity?: EmploymentIdentity | null; /** Describes the work that is being performed in this Employment Relation. */ work?: WorkDescription | null; /** General information about the Employment relation. */ info?: EmploymentRelationInfo | null; /** Contacts for the employment. */ contacts?: ContactAdvanced[] | null; /** After server-side resolving, this will contain the resolved ID of the employment or may be "new:n" if the employment is new (n is 1 based counter). */ resolvedId?: string | null; /** Validation information for the object (after validation / preview / import, before that it is null). */ validation?: ApiValidation | null; } /** Represents a file that is to be imported as worktime data. */ export declare interface WorktimeImportFile { /** File name. */ name?: string | null; /** * MimeType of the file. * May be used by the import logic to support multiple file formats (e.g. CSV, Excel) and then determine the file format. */ mimeType?: string | null; /** Usecase Uri defines a custom handling for the import and data may contain additional parameters for the import logic. */ usecase?: UsecaseData | null; /** Actual data of the file (CSV, Excel, JSON etc.): source of the import. */ data?: string | null; } /** For Worktime information, general data about how the import should be performed. */ export declare interface WorktimeImportHeader { /** Status of the import. Only used in storag */ status?: WorktimeImportStatus; /** Title of the import, also used as title in the target Payroll */ title?: string; /** * Identifier of the patch in the source system is a key defined by a source system / partner system. * In import processes where a Payroll is created automatically, this source ID is used to identify new or existing Payroll. */ sourceId?: string; /** * Defines the identifier for Payroll into which the data should be added (as calculations). * Typically, it is better to use the sourceId as a unique ID so you can generate that already in the source system. */ payrollId?: string; /** Target salary date for the import generated payroll/calculations. */ salaryDate?: string; /** The period for the import to staging and/or generated payroll/calculations. This is typically required */ period?: DateRange; /** Payment Channel that is used for payment of the generated Payroll (or calculations in the future versions). */ paymentChannel?: PaymentChannel; } /** * Defines the properties that are available for WorktimeImport objects directly from the list without loading the entire item. */ export declare interface WorktimeImportInStagingListItem { /** Unique identifier of the object. */ id: string; /** Identifier of the owner of the item. */ owner: string; /** * ISO datetime (utc) for when the item was created. */ createdAt: string; /** * ISO datetime (utc) for when the item was last updated by the user. */ updatedAt: string; /** * Avatar for the employment relation / worker. * * NOTE: That this is abit simplified version of the Avatar in @salaxy/core. * Most UI elements should be able to render both versions, but when mapping between models, * a converted is needed. Main difference is that this model does not have all the details * and type replaces more complex entityType. */ avatar: { /** * Entity type: person/company. * This affects the visual representation of the entity, currently only the icon. * NOTE, that UI implementations etc. should also support @salaxy/core `entityType` if this property `type` is not present. */ type?: "person" | "company"; /** * Display name. For a person this is 'FirstName LastName'. * Used as title / alt text in the avatar representation. */ displayName?: string; /** Color that is used in the icon (web colors). */ color?: string; /** Initials used in the icon */ initials?: string; /** URL of the picture if specified as picture (null in a case of type Icon) */ url?: string; }; /** Personal ID for the employment relation */ personalId: string; /** Type of employment relation */ employmentType: EmploymentRelationType; /** Sortable name for the Worker */ sortableName: string; /** Metadata for the entire worktime import file */ totals: WorktimeImportPreviewMetadata; /** Payroll-specific metadata: Key is Payroll ID, value is the metadata for that payroll. */ payrolls: Record; /** TODO: Consider the status: What should this show */ status: string; } /** WorktimeImportKnownUsecase enumeration */ export declare enum WorktimeImportKnownUsecase { Unknown = "unknown", Palkkaus = "palkkaus", Mepco = "mepco", Tyovuorovelho = "tyovuorovelho", MaraPlan = "maraPlan", Other = "other" } /** Defines the set of data that can be posted to the Worktime Import endpoint using regular form post (application/x-www-form-urlencoded). */ export declare interface WorktimeImportPostPayload { /** Optional general data about how the import should be performed. */ header?: WorktimeImportHeader | null; /** Defines the type ofthe import: the usecase that is used in parsing the files and creating the data. */ type?: WorktimeImportKnownUsecase | null; /** Usecase URI if type is set to Other. */ typeOther?: string | null; /** * Redirect URL to take the browser after successful import of files. * If null, the method will return 200 OK with text "OK". */ redirectUrl?: string | null; /** Payload 1: Calculation rows data as a file: Typically CSV, Excel (base64 encoded) or JSON. */ rowsFile?: string | null; /** Payload 2: Absences data as a file: Typically CSV, Excel (base64 encoded) or JSON. */ absencesFile?: string | null; /** * Optional payload 3: Employment data as a file. * This optional information required for resolving / creating the Worker and Employment relation. * Typically CSV, Excel (base64 encoded) or JSON. */ employmentFile?: string | null; /** * Possibility to provide the authentication token directly on the form. * This token is checked first and token if not null/empty is used over any possible authorization in http header. */ authToken?: string | null; /** * User ID for the authentication if it is done directly on the form. * Uid is checked after AuthToken and token if not null/empty is used over any possible authorization in http header. * If AuthPwd is specified, AuthPwd is also required. */ authUid?: string | null; /** * Passwod for the authentication if it is done directly on the form. * Required, and used only if, AuthUid is specified. */ authPwd?: string | null; } /** Contains a Preview of objects that would be created / updated in the import. */ export declare interface WorktimeImportPreview { /** * List of all employments that are part of the import. * This list is populated already as part of the Validations phase to check that all rows have a valid employment. */ allEmployments?: EmploymentListItem[] | null; /** Employments that will be updated (created or changed) in the import. */ employments?: Employment[] | null; /** * Payrolls that will be updated (created or changed) in the import. * These also contain the Calculations that are part of the Payroll. */ payrolls?: PayrollDetails[] | null; /** Calculations that will be updated (created or changed) in the import. */ calculations?: Calculation[] | null; /** WorkerAbsences that will be updated (created or changed) in the import. */ absences?: WorkerAbsences[] | null; /** Holiday years that will be updated (created or changed) in the import. */ holidayYears?: HolidayYear[] | null; } /** * Class that allows serializing the metadata of worktime preview calculation (in relation to payroll) to Blob storage metadata and back. */ export declare class WorktimeImportPreviewMetadata { /** Period for the calculation */ period: DateRange; /** Salary date for the payroll, undefined for worktime. */ salaryDate?: string; /** Metadata about the preview calculations */ calcs: { /** Number of calculations, typically 1, except for "totals" */ count: number; /** Total gross salary */ gross: number; /** Total worker payment as net. */ net: number; }; /** Number of rows */ rows: { /** Total number of rows. */ count: number; /** Rows that are in preview state: Not yet approved in source system. */ preview: number; /** New rows very for approval in staging / to be committed to Palkkaus (approved in source system). */ new: number; /** Rows that have been committed to Palkkaus */ committed: number; /** Marked as ignored by payroll expert, will not be committed. */ ignored: number; /** Deleted rows: Only committed rows can be marked deleted. If a new or preview row is deleted in source system, it is simply removed from data. */ deleted: number; /** Rows manually edited, not currently in use. */ edited: number; /** Rows that have validation errors and cannot be committed. */ error: number; }; } /** Worktime import row extends User defined row with employment relation basic info: EmploymentId or PersonalId/EmploymentType combination. */ export declare interface WorktimeImportRow { /** Identifier for the employment relation. Either Employment ID or Personal ID is required. */ employmentId?: string | null; /** * Personal ID is an alternative way of defining the Employment relation. * Either Employment ID or Personal ID should is required. If both are provided, Employment ID is used. * Fetching employment relation also checks for Employment type if provided. */ personalId?: string | null; /** Type of employment relation. Used if Personal ID is provided without Employment ID. */ employmentType?: EmploymentRelationType | null; /** Validation information for the object (after validation / preview / import, before that it is null). */ validation?: ApiValidation | null; /** * Zero based row index that can be used to match the row to result rows or when deleting. * NOTE: The Row ID is given values on the fly so setting this will not have any effect at the moment. * It may reorder the entries in later implementations. */ rowIndex?: number | null; /** * Logical type of the row. * This is preferably a value from enum CalculationRowType, but mey be some other parseable string that the import logic handles. */ rowType?: string | null; /** * Wage type. Either a built in wage type in Salaxy or a custom wage type created by the user. * Please note that this type fully determines the CalculationRowType and the kind. */ type?: string | null; /** Status of the row. */ status?: "preview" | "new" | "committed" | "ignored" | "deleted" | "edited" | "error" | null; /** Description text of the row that is shown in reports. If null, will be set according to type. */ message?: string | null; /** Count for the row - default is one */ count?: number | null; /** Price for the row */ price?: number | null; /** Unit for the row. Guessed based on the RowType and count, but you are better off setting it to be sure. */ unit?: CalculationRowUnit | null; /** Source of the calculation row - affects how the row is handled in editing / recalculation scenarios. */ source?: CalculationRowSource | null; /** * Identifier in the source system is a key defined by a source system / partner system. * This is a pass-through string that is passed to the result calculations. */ sourceId?: string | null; /** Accounting related data for the row. */ accounting?: RowAccounting | null; /** * Period for the calculation row. This is mainly used for absences (AbsencePeriod row type), leaves and holidays (HolidaySalary, HolidayBonus and HolidayCompensation). * Note that this property may be (and by default is) null. */ period?: DateRange | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** WorktimeImportStatus enumeration */ export declare enum WorktimeImportStatus { Uploaded = "uploaded", Parsed = "parsed", Processing = "processing", Processed = "processed", Error = "error", Archived = "archived" } /** YearEndAdminCheck enumeration */ export declare enum YearEndAdminCheck { NotChecked = "notChecked", Ok = "ok", OkWithWarning = "okWithWarning", Errors = "errors" } /** YearEndFeedbackCalculationType enumeration */ export declare enum YearEndFeedbackCalculationType { Unknown = "unknown", SalaxyPayment = "salaxyPayment", External = "external", Correction = "correction" } /** YearEndUserFeedback enumeration */ export declare enum YearEndUserFeedback { NotChecked = "notChecked", Ok = "ok", OkWithModifications = "okWithModifications", WillHandleMyself = "willHandleMyself", NoYearlyReports = "noYearlyReports" } /** Parameters that are changing yearly. This class is made for the change of the year and it is typically updated in December. It is not for recording longer history of numbers. */ export declare interface YearlyChangingNumbers { /** Year for numbers. */ readonly year?: number | null; /** Returns yearly sidecosts. */ readonly sideCosts?: YearlySideCosts | null; /** Returns holidays for the year. */ holidays?: Holidays | null; } /** Holidays for the entire year. */ export declare interface YearlyHolidays { /** Year for the holidays. */ readonly year?: number | null; /** Holidays for the year. */ readonly holidays?: holidays | null; } /** * Yearly holidays. */ export declare const yearlyHolidaysYears: YearlyHolidays[]; /** Encapsulates yearly side costs into one class. */ export declare interface YearlySideCosts { /** Unemployment insurance payment percent - Employer */ readonly unemploymentEmployerPercent?: number | null; /** Unemployment insurance payment percent - Large Employer */ readonly unemploymentHigherEmployerPercent?: number | null; /** Unemployment insurance payment percent - deducted from Worker */ readonly unemploymentWorkerPercent?: number | null; /** Unemployment insurance payment percent for partial owner worker - deducted from Worker */ readonly unemploymentPartialOwnerWorkerPercent?: number | null; /** Pension payment income limit per month */ readonly tyelIncomeLimit?: number | null; /** Pension payment base percentage */ readonly tyelBasePercent?: number | null; /** Pension payment base percentage - deducted from Worker salary */ readonly tyelWorkerPercent?: number | null; /** Pension payment base percentage - deducted from 53-62 year old Worker */ readonly tyel53Percent?: number | null; /** Pension contract employer six month limit */ readonly tyelContractEmployerLimit?: number | null; /** Social Security payment for employer (SAVA-maksu) */ readonly socSecPercent?: number | null; /** Illness Insurance care percent that is withhold from the Worker. (vakuutetun sairausvakuutusmaksu: päivärahamaksu + sairaanhoitomaksu */ readonly illnessInsurancePercent?: number | null; /** Medical care contribution of the employee's health insurance contribution. */ readonly healthInsuranceMedicalCareContribution?: number | null; /** Daily allowance contribution of the employee's health insurance contribution. */ readonly healthInsuranceDailyAllowanceContribution?: number | null; /** Tax free daily allowance for full day approved by tax authorities. */ readonly taxFreeDailyAllowance?: number | null; /** Tax free daily allowance for half day approved by tax authorities. */ readonly taxFreeDailyHalfAllowance?: number | null; /** Tax free meal allowance approved by tax authorities. */ readonly taxFreeMealAllowance?: number | null; /** Tax free bicycle benefit approved by tax authorities. */ readonly taxFreeBicycleBenefit?: number | null; /** Tax free subsidised sommute benefit approved by tax authorities. */ readonly taxFreeSubsidisedCommute?: number | null; /** Tax free milage allowance approved by tax authorities. */ readonly taxFreeKmAllowance?: number | null; /** Union payment: Rakennusliitto, A (typical) */ readonly unionPaymentRaksaA?: number | null; /** Union payment: Rakennusliitto, AO and TA */ readonly unionPaymentRaksaAoTa?: number | null; /** ALV-% for the fee. */ readonly palkkausVatPercent?: number | null; /** ALV-% for the fee. */ readonly palkkausVatRate?: VatRate | null; /** Household deduction */ readonly householdDeduction?: number | null; /** Household deduction */ readonly householdDeductionExtended?: number | null; /** Household deduction max amount */ readonly householdDeductionMaxAmount?: number | null; /** Household deduction max amount */ readonly householdDeductionMaxAmountExtended?: number | null; /** Tax deduction categories, which extend the deduction. */ readonly householdDeductionCategoriesExtended?: TaxDeductionWorkCategories[] | null; /** Household deduction deductible */ readonly householdDeductionDeductible?: number | null; /** Meal benefit for catering contract */ readonly mealBenefitCateringContract?: number | null; /** Meal benefit for institute */ readonly mealBenefitInstitute?: number | null; /** Meal benefit for restaurant worker */ readonly mealBenefitRestaurantWorker?: number | null; /** Meal benefit for teacher */ readonly mealBenefitTeacher?: number | null; /** Meal ticket lower limit */ readonly mealTicketLowerLimit?: number | null; /** Meal ticket upper limit */ readonly mealTicketUpperLimit?: number | null; /** Taxable-% of meal ticket */ readonly mealTicketTaxable?: number | null; /** Foreclosure: protected portion. */ readonly protectedPortionBase?: number | null; /** Foreclosure: protected portion for each dependant. */ readonly protectedPortionDependant?: number | null; } /** * Tax free numbers defined yearly by the Finnish tax authorities. */ export declare interface YearlyTaxFreeNumbers { /** Milage / kilometer allowance for vehicles. */ milage: { /** Regular car */ car: number; /** Additions to car per kilometer. */ carAdditions: { [key: string]: number; }; /** For a limited car benefit car (käyttöetu), the milage if Worker pays gasoline / electricity etc. */ carLimitedBenefit: number; /** Additional cents paid for extra passengers in the vehicle */ passanger: number; /** Other vehicles (motorcycle, snow mobile etc.) */ other: { [key: string]: number; }; }; /** Countries or regions for international ddaily allowance. */ countries: { [key: string]: number; }; } /** * Yearly tax-free decisions from the tax authorities starting from year 2023 */ export declare const yearlyTaxFreeYears: Array; /** * Helper for yearly changing sidecost percentages and holidays. */ export declare class Years { /** * Gets salary calculation parameters that are changing yearly and holidays of the year. * The method is designed for the end-of-year and as such it only supports 2 years: * the current / previous year (from Jan to Nov) OR current / next year (in approx. December). * * @param refDate - Dately object (JavaScript date, ISO string formatted date, or DayJS-object) for which the numbers are fetched. * @param nullIfNotSupported - Boolean indicating whether to return null if the year is not supported. By default the method throws an error if no year for the date found. * * @returns The yearly changing numbers if year supported. Error if year not supported. */ static getYearlyChangingNumbers(refDate: DatelyObject, nullIfNotSupported?: boolean): YearlyChangingNumbers; /** * Gets holidays for the given year. * * @param forYear - Dately object (JavaScript date, ISO string formatted date, or DayJS-object * @returns The holidays for the given year. */ static getYearlyHolidays(forYear: DatelyObject): Holidays; /** * Gets the yearly tax-free numbers from the tax authorities. * @param forYear - Dately object (JavaScript date, ISO string formatted date, or DayJS-object) for which the numbers are fetched. * @returns The numbers for the given year or current year. If given year is not supported, gives an error in the console (does not fail). */ static getYearlyTaxFreeNumbers(forYear: DatelyObject): YearlyTaxFreeNumbers; } /** The details of company data as provided by the Finnish Business Infromation System (YTJ/BIS) */ export declare interface YtjCompany { /** The Business ID (Y-tunnus / Business Identity Code) is a code given to businesses and organizations by the PRH or the Tax Administration. It consists of seven digits, a dash and a control mark, for example 1234567-8. Alternative accepted formats incule international VAT number "FI12345678" or number without the dash: "12345678". */ businessId?: string | null; /** Official name of the company. Source: Tiedostonimi.Tiedostonimi */ name?: string | null; /** The legal type of the company, as categorized by Palkkaus / used in generating IBAN numbers. */ companyType?: CompanyType | null; /** YTJ's legal type of the company as a string. This is only to be used for display purposes. Source: YritysHaku.YritysMuoto */ companyTypeText?: string | null; /** The internal YTJ code number for the company's legal type. */ ytjCompanyType?: YtjCompanyType | null; /** Original YTJ company type code. */ ytjCompanyTypeCode?: number | null; /** Contact information for the */ contact?: Contact | null; /** Social security number of the contact person in the company, if available. */ contactPersonPersonalId?: string | null; /** Names are not necessarily avaiable. If they are, they may not be reliable. */ contactPerson?: string | null; /** Mobile for or other company phone. Difference between Contact.Phone and ContactPhone is that this (ContactPhone) is first mobile number, then company general phone if the former was null. Contact.Phone is fisrt general phone number and mobile number only if not available. */ contactPhone?: string | null; /** Web site address */ www?: string | null; /** The sector where the company is active. (Toimialatieto.Koodi) */ sectorOfBusinessCode?: number | null; /** Text of the sector where company operates. */ sectorOfBusinessText?: string | null; } /** YtjCompanyType enumeration */ export declare enum YtjCompanyType { NoCompanyType = "noCompanyType", HousingCooperative = "housingCooperative", Condominium = "condominium", AsoAssociation = "asoAssociation", OpenCompany = "openCompany", Association = "association", HypoAssociation = "hypoAssociation", MutualRealEstateCompany = "mutualRealEstateCompany", Ky = "ky", Osuuskunta = "osuuskunta", CooperativeBank = "cooperativeBank", Oy = "oy", PublicLimitedCompany = "publicLimitedCompany", Foundation = "foundation", Branch = "branch", SavingsBank = "savingsBank", FinancialAssociation = "financialAssociation", StateEstablishment = "stateEstablishment", InsuranceAssociation = "insuranceAssociation", PrivateEntrepreneur = "privateEntrepreneur", OtherAssociation = "otherAssociation", SpecialPurposeAssociation = "specialPurposeAssociation", ForestCareAssociation = "forestCareAssociation", OtherFinancialAssociation = "otherFinancialAssociation", ReligiousCommunity = "religiousCommunity", JointInterestGroups = "jointInterestGroups", TaxableGrouping = "taxableGrouping", DeathEstate = "deathEstate", MutualInsuranceAssociation = "mutualInsuranceAssociation", ForeignOrganisation = "foreignOrganisation", MunicipalEstablishment = "municipalEstablishment", FederationOfMunicipalitiesEstablishment = "federationOfMunicipalitiesEstablishment", AlandFederation = "alandFederation", EuropeanCooperative = "europeanCooperative", EuropeanCooperativeBank = "europeanCooperativeBank", ReindeerHerdingCooperative = "reindeerHerdingCooperative", Unknown = "unknown" } /** Search result for free text search from the Finnish Business Infromation System (YTJ/BIS). Returns a list of companies without details. */ export declare interface YtjSearchResult { /** The original search string - without trimming etc. that are done in the actual search. */ rawInput?: string | null; /** If true, search is a success. This may mean that no results were found though. */ isSuccess?: boolean | null; /** If true, the searh is too generic. Typically either there was more than 200 results or less than 3 characters in the search string. Both of these return an error in the API. */ isTooGeneric?: boolean | null; /** Technical status - for developers / admin. */ status?: string | null; /** A message that can be shown to the end user. */ userMessage?: string | null; /** API quota counter */ counter?: number | null; /** Result of the search. */ result?: YtjSearchResultCompany[] | null; } /** Search result list level of detail of companies coming from YTJ. */ export declare interface YtjSearchResultCompany { /** The Business ID (Y-tunnus / Business Identity Code) is a code given to businesses and organizations by the PRH or the Tax Administration. It consists of seven digits, a dash and a control mark, for example 1234567-8. Alternative accepted formats incule international VAT number "FI12345678" or number without the dash: "12345678". */ businessId?: string | null; /** Official name of the company. */ name?: string | null; /** Numeric ID ("Yritysavain") */ id?: number | null; /** Type of the company. This is a free text type. Not necessary parseable to company type enumeration in details. */ type?: string | null; } /** * Interface for Zendesk article * https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/ */ export declare interface ZendeskArticle { /** * The id of the user who wrote the article (set to the user who made the request on create by default) */ author_id?: number; /** * HTML body of the article. Unsafe tags and attributes may be removed before display. For a list of safe tags and attributes, https://support.zendesk.com/hc/en-us/articles/4408824584602 */ body?: string; /** * True if comments are disabled; false otherwise */ comments_disabled?: boolean; /** * The list of content tags attached to the article */ content_tag_ids?: string[]; /** * The time the article was created */ readonly created_at?: string; /** * True if the translation for the current locale is a draft; false otherwise. false by default. Can be set when creating but not when updating. For updating, see Translations */ readonly draft?: boolean; /** * The time the article was last edited in its displayed locale */ readonly edited_at?: string; /** * The time the article was last edited in its displayed locale */ readonly html_url?: string; /** * Automatically assigned when the article is created */ readonly id?: number; /** * An array of label names associated with this article. By default no label names are used. Only available on certain plans */ label_names?: string[]; /** * The locale that the article is being displayed in */ locale: string; /** * Deprecated. Always false because the source translation is always the most up-to-date translation */ readonly outdated?: boolean; /** * Locales in which the article was marked as outdated */ readonly outdated_locales?: string[]; /** * Locales in which the article was marked as outdated */ permission_group_id: number; /** * The position of this article in the article list. 0 by default */ position?: number; /** * The position of this article in the article list. 0 by default */ promoted?: boolean; /** * The id of the section to which this article belongs */ section_id?: number; /** * The source (default) locale of the article */ readonly source_locale?: string; /** * The title of the article */ title: string; /** * The time the article was last updated */ readonly updated_at: string; /** * The API url of the article */ readonly url?: string; /** * The id of the user segment which defines who can see this article. Set to null to make it accessible to everyone */ user_segment_id: number; /** * The total number of upvotes and downvotes */ readonly vote_acount?: number; /** * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative */ readonly vote_sum?: number; } export { }