/// /// import { default as angular_2 } from 'angular'; import * as angular_3 from 'angular'; import { BubbleDataPoint } from 'chart.js'; import { ChartConfiguration } from 'chart.js'; import { ChartType } from 'chart.js'; import { ColumnDefinition } from 'tabulator-tables'; import { Editor } from 'tabulator-tables'; import { EventCallBackMethods } from 'tabulator-tables'; import { IQService } from 'angular'; import { ISCEService } from 'angular'; import { Options } from 'tabulator-tables'; import { ScatterDataPoint } from 'chart.js'; import { TabulatorFull } from 'tabulator-tables'; /** AbsenceCauseCode enumeration */ 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 */ declare interface AbsencePeriod { /** Identifies a single leave. */ id?: string | null; /** Period for the absance. */ period?: DateRange_2 | 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. This is applicable only for {Palkkaus.Model.Worktime.Absences.AbsenceCauseCode.AnnualLeave}AnnualLeave. */ bonusDaysCount?: number | null; } /** * UI for the absences list (poissaolokirjanpito). * @example * ```html * * ``` */ export declare class AbsencePeriods extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { condensed: string; filterStart: string; filterEnd: string; /** * UI for the absences list (poissaolokirjanpito). * @example * ```html * * ``` */ parent: string; onCommit: string; onReset: string; onStartEdit: string; isInEdit: string; mode: string; }; /** Uses the AbsencePeriodsController */ controller: typeof AbsencePeriodsController; /** The default template for the component. */ defaultTemplate: string; } /** * Controls the absences list (poissaolokirjanpito) for a selected holiday year. */ export declare class AbsencePeriodsController extends ListControllerBase { /** Bindings for components that use this controller */ static bindings: AbsencePeriodsControllerBindings; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, will format the table with class table-condensed. Later may add some other condensed formatting. */ condensed: boolean; /** Date filter start value. Will be applied to period start dates. */ filterStart: string; /** Date filter end value. Will be applied to period end dates. */ filterEnd: string; constructor(uiHelpers: UiHelpers); /** List of items */ get list(): AbsencePeriod[]; /** Maps WorkerAbsences to calendar series. */ mapToCalendar: (abs: WorkerAbsences_2) => CalendarSeries[]; /** * Filter that is applied to the list * @param value Item in the list */ filter: (value: AbsencePeriod) => boolean; /** Creating of a new item. */ getBlank(): AbsencePeriod; /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; /** Calendar is clicked => Show edit dialog accorging to calendar data. */ calendarClick(type: "event" | "day", date: string, event: CalendarUiEvent): void; /** Gets the needed logic for Edit dialog */ getEditDialogLogic(): { canSelectIsPaid: (current: AbsencePeriod) => boolean; updateIsPaid: (current: AbsencePeriod) => void; updateIsHolidayAccrual: (current: AbsencePeriod) => void; updatePeriodDays: (current: AbsencePeriod) => void; setDaysSelection: (period: AbsencePeriod) => void; }; /** Gets a total days calculation for different types. */ getTotalDays(type?: "all" | "absencesPaid" | "absencesUnpaid" | "absencesHolidayAccrual" | "absencesNoHolidayAccrual"): number | null; } declare class AbsencePeriodsControllerBindings extends ListControllerBaseBindings { /** If true, will format the table with class table-condensed. Later may add some other condensed formatting. */ condensed: string; /** Date filter start value. Will be compared to period end date. */ filterStart: string; /** Date filter end value. Will be compared to period start date. */ filterEnd: string; } /** * Provides CRUD access for Absences of a Worker */ 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(employmentId?: string, workerId?: string): WorkerAbsences_2; /** * 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; } /** * Payment Settings * @example * ```html * * ``` */ export declare class Accountant extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** If true, removing accountant is disabled */ removalDisabled: string; }; /** Uses the AccountController */ controller: typeof AccountantController; /** Default template is the view */ defaultTemplate: string; } /** * Controller for the accountant settings. */ export declare class AccountantController implements angular_2.IController { private ajax; private settingsService; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** if true, removing accountant is disabled */ removalDisabled: boolean; constructor(ajax: Ajax, settingsService: SettingsService, uiHelpers: UiHelpers); /** * Returns current accountant. */ get accountant(): PrimaryPartnerSettings; /** Returns accountant main type */ get accountantMainType(): "company" | "none"; /** Shows the edit dialog */ showEdit(removalDisabled?: boolean): Promise; /** Removes pricing partner using confirmation dialog. */ showConfirmPartnerRemoval(): void; /** Save current accountant. This mainly for email address. */ save(): Promise; private getAccountantMainType; } /** Accountant details. */ declare interface AccountantInfo { /** Avatar for the account */ avatar?: Avatar_2 | 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 */ declare enum AccountantType { Unknown = "unknown", UnlinkedPrimaryPartner = "unlinkedPrimaryPartner", UnlinkedAccountingOnly = "unlinkedAccountingOnly", PendingPrimaryPartner = "pendingPrimaryPartner", PrimaryPartner = "primaryPartner", None = "none" } /** * Base controller for accountant wizard management. */ export declare class AccountantWizardController implements angular_2.IController { private ajax; private onboardingService; private sessionService; private uiHelpers; private $location; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(ajax: Ajax, onboardingService: OnboardingService, sessionService: SessionService, uiHelpers: UiHelpers, $location: angular_2.ILocationService); /** Opens wizard as modal dialog */ openAccountantWizardDialog(): Promise; /** Launches company wizard. */ launchAccountantWizard(): Promise | undefined; private readTokenFromUrl; } /** * Handles user interaction for viewing and modifying authorized and authorizing accounts. */ export declare class AccountAuthorizationController extends CrudControllerBase { private authorizedAccountService; private sessionService; private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, the switch will be disabled and its value cannot be changed by clicking/toggling it */ disabled: boolean; constructor(authorizedAccountService: AuthorizedAccountService, $location: angular.ILocationService, $attrs: angular.IAttributes, uiHelpers: UiHelpers, sessionService: SessionService, ajax: Ajax); /** * Returns the list of Integration partner sites available and the status of each partner. */ get partnerIntegrationSites(): any; /** * Gets a specific partner site for the current user * @param id Identifier of the site */ getPartnerSite(id: string): any; /** * Returns the current partner site */ get currentPartnerSite(): any; /** * Shows a dialog for adding / removing authorizations from known partners that * frequently require authorizations. These are typically integrated software * that are added without Primary Partner flag. * @param id - The id of the partner site for which the dialog is shown. */ showPartnerSiteDialog(id: string): void; /** Toggles the authorization option and makes the corresponding api call. */ switchAuthorization(): void; /** * Returns the authorizing accounts for the current account */ get authorizingAccounts(): (PersonAccount | CompanyAccount)[]; /** Deletes the account. Only in test. */ deleteAccount(accountId: string): void; /** * Shows a dialog for adding any new authorized account. */ showAuthorizedAccountAddDialog(): void; /** Adds authorized account */ saveCurrent(callback?: (avatar: AuthorizedAvatar) => void): Promise; /** * Adds access token to url. * @param accountId - Account id to login as. */ getLoginAsUrl(accountId: any): string; /** * Checks whether the user is in a given role * @param role - One of the known roles */ isInRole(role: any): boolean; } /** * Shows account authorization and Credentials information including * a link to Authorization document (digitally signed pdf) and * type and UID (typically e-mail) of the current credentials. * @example * ```html * * ``` */ export declare class AccountAuthorizationPerson extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to controller implementation */ bindings: {}; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } /** * Edit the avatar information: Picture upload, Initials + color or Gravatar. * @example * ```html * * ``` */ export declare class AccountAvatarEdit extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } /** * Edit the avatar information: Picture upload, Initials + color or Gravatar. * Currently used only in Personal accounts, but this could potentially be also * used in Company side to edit Avatar? * @example * ```html * * ``` */ export declare class AccountAvatarEditPerson extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Current person account. Optional */ current: string; }; /** Uses the PersonAccountController */ controller: typeof PersonAccountController; /** The default template for the component. */ defaultTemplate: string; } /** 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. */ 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_2 | 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; } /** * Editing UI of Contact information for account. * @example * ```html * * ``` */ export declare class AccountContactEdit extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } /** * Editing UI of Contact information for Personal account. * @example * ```html * * ``` */ export declare class AccountContactEditPerson extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Current person account. Optional */ current: string; }; /** Uses the PersonAccountController */ controller: typeof PersonAccountController; /** The default template for the component. */ defaultTemplate: string; } /** * Editor for main identity data of Personal account: Names (currently opens a wizard), * Personal ID (read-only) or IBAN (should require strong authentication). * @example * ```html * * ``` */ export declare class AccountDetailsEditPerson extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Current person account. Optional */ current: string; }; /** Uses the PersonAccountController */ controller: typeof PersonAccountController; /** The default template for the component. */ defaultTemplate: string; } /** * Editor view for Person's contact and payment information, * for example avatar, phone number and bank account number. * @example * ```html * * ``` */ export declare class AccountDetailsPerson extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Current tab in initialization. If not set, will be fetched from url hash. */ currentTab: string; }; /** Uses the PersonAccountController */ controller: typeof PersonAccountController; /** The default template for the component. */ defaultTemplate: string; } /** * Simple presentation of Salaxy account info: employer and/or worker data * @example * ```html * * ``` */ export declare class AccountInfo extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to controller implementation */ bindings: {}; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } /** * Quick basic information about the Person account: Avatar, name, phone and e-mail. * The component may be bound with ng-model or if omitted binds to session current account. * The component is currently for Personal acocunt only, but it could be generalized * for companies as well. * @example * ```html * * ``` */ export declare class AccountInfoPerson extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** ngModel may be used */ require: { model: string; }; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } /** AccountingChannel enumeration */ declare enum AccountingChannel { Undefined = "undefined", Procountor = "procountor", VismaNetvisor = "vismaNetvisor", VismaFivaldi = "vismaFivaldi" } /** * Handles user interfaces for specifying settings for Payment Channels (and other payment related settings). */ export declare class AccountingChannelSettingsController implements angular_2.IController { private settingsService; private uiHelpers; private sessionService; private $http; private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private closeFn; private static channelPaths; constructor(settingsService: SettingsService, uiHelpers: UiHelpers, sessionService: SessionService, $http: angular_2.IHttpService, ajax: Ajax); /** * Controller initializations */ $onInit: () => void; /** * Returns true if the given accounting target item is an API integration type acccounting * target. * @param item The accounting target item * @returns True or false. */ isApiIntegration(item: any): boolean; /** Opens the channel setup dialog in a new window. */ openChannelSetupDialog(target: AccountingTargetSettings_2, closeFn: (string: any) => any): void; /** * Loads the chart of accounts from the channel. * @param target Accounting target. * @param closeFn $close function to call. */ configureCoa(target: AccountingTargetSettings_2, closeFn: (string: any) => any): Promise; private loadCoaFromChannel; private getAccountingTargetSettingsUrl; private getExternalDialogConfigByTarget; private getCoaUrl; private handleExternalDialogReturnData; private saveSettings; private findAccountingTargetFromCompanySettings; private isAdmin; } /** Accounting data for reports. */ 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_2 | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange_2 | 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. */ 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. */ declare interface AccountingHolidayPayDebtReportData { /** Finnish Business Identifier (Y-tunnus) for the company. */ officialId?: string | null; /** Employer avatar */ employer?: Avatar_2 | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange_2 | 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. */ 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; } /** * Shows the accounting holiday debt report builder for ad hoc reporting queries. * @example * ```html * * ``` */ export declare class AccountingHolidayPayDebtReportQuery extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: string; /** The language for report*/ lang: string; }; /** Uses the AccountingReportQueryController */ controller: typeof AccountingHolidayPayDebtReportQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality for building ad hoc accounting holiday pay debt reports. */ export declare class AccountingHolidayPayDebtReportQueryController implements angular_2.IController { private reportsApi; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: "partial" | "full"; /** Ref date to which the debt is calculated. */ refDate: string; /** Accounting data */ data: AccountingData; /**Selected report language */ lang: string; /** Data reader for the control. */ dataReader: { /** * Function to read data into given array */ read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: () => boolean; }; constructor(reportsApi: Reports, uiHelpers: UiHelpers); /** * Initialize controller values. */ $onInit(): void; /** Queries the report data. */ queryData(target?: string): void; } /** AccountingPeriodClosingOption enumeration */ 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. */ 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; } /** * The new ApiCrudObject type of CRUD controller for the BlobFile of the accounting report. */ export declare class AccountingReportCrudController extends ApiCrudObjectController { private filesApi; private reportsApi; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Default query options for panel */ panelQueryOptions: { $filter: string; $orderby: string; $top: number; }; /** Data reader for selected items. */ selectionDataReader: { /** Function to read data into given array */ read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise; /** Optional label for data export */ exportLabel: string; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: () => boolean; }; /** Data reader for the current loaded data. */ currentDataReader: { /** Function to read data into given array */ read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: () => boolean; }; /** Status for current data . */ private currentDataStatus; private _currentData; private logicalDate; constructor(filesApi: Files, reportsApi: Reports, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, $timeout: angular_2.ITimeoutService); /** * Initialization code. */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Returns OData filter. */ getODataFilter: () => string; /** Data reader for one item. */ getItemDataReader: (item: { /** List item id */ id: string; /** List item owner */ owner: string; }) => { /** Function to read data into given array */ read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: boolean; }; /** Event handler for logical date. */ logicalDateChanged(): void; /** Unselect all */ unselectAll(): void; /** Select all */ selectAll(): void; /** Accounting data of the current item. */ get currentData(): AccountingData; /** Load current data */ loadCurrentData(targetId?: string): void; private setWorkflowEvent; } /** Settings for Accounting report delivery. */ declare interface AccountingReportDelivery { /** If true, the delivery is active. */ isEnabled?: boolean | null; /** Address for delivery. Currently only email supported. */ address?: string | null; } /** * Handles user interaction for displaying accounting report */ export declare class AccountingReportDisplayController implements angular_2.IController { private uiHelpers; private reports; static $inject: string[]; /** * Creates a new instance of AccountingReportDisplayController * @param uiHelpers - Salaxy ui helpers service. */ constructor(uiHelpers: UiHelpers, reports: Reports); /** * Display accounting report * @param refDate date */ display(refDate: string): void; } /** * Shows a list of accounting reports. * @example * ```html * * ``` */ export declare class AccountingReportList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * list view 'mode'. * If undefined, defaults to full list. * Use panel for dashboards etc. */ mode: string; }; /** Uses the AccountingReportCrudController */ controller: typeof AccountingReportCrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows the accounting report builder for ad hoc reporting queries. * @example * ```html * * ``` */ export declare class AccountingReportQuery extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Specify the calculations that should be reported. * If null, will show a user interface to select calculations or period. */ calcs: string; /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: string; /** The language for report*/ lang: string; }; /** Uses the AccountingReportQueryController */ controller: typeof AccountingReportQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality for building ad hoc accounting reports. */ export declare class AccountingReportQueryController implements angular_2.IController { private reportsApi; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: "partial" | "full"; /** Query type: Query period or set of id's from database or calcs to specify the calculations. */ queryType: "periodQuery" | "selectionQuery" | "calcs"; /** Period type for the query. */ periodType: PeriodType; /** Period date kind for the query. */ periodDateKind: PeriodDateKind; /** Ref date for the period. */ refDate?: string; /** End date for the custom period. */ endDate?: string; /** Accounting data */ data: AccountingData; /**Selected report language */ lang: string; /** * Calculations that are selected by used to show be fetched and shown in reports. * Only the ID is really used: the rest of the calculation data is fetched from database. */ calculations: CalculationListItem[]; /** * Calculations that are shown in the database directly. * If set, will hide the query interface and set queryType accordingly (only in init). */ calcs: Calculation[]; /** Data reader for the control. */ dataReader: { /** * Function to read data into given array * TODO: Should make interface for this or otherwise go-through. */ read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: () => boolean; }; constructor(reportsApi: Reports, uiHelpers: UiHelpers); /** * Initialize controller values. */ $onInit(): void; /** * Opens the list of calculations into a dialog window for selection and then adds them to the selected calculations * @param category Either "paid" or "draft". */ addCalcs(category?: "paid" | "draft"): void; /** Removes the selected calculation from the calculations list. */ removeCalc(calculation: any): void; /** Queries the report data. */ queryData(target?: string): void; } /** Accounting report table row. */ 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; } /** * Shows the rows of the accounting report. * @example * ```html * * ``` */ export declare class AccountingReportRows extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Accounting data */ data: string; /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: string; /** The language for report*/ lang: string; }; /** Uses the AccountingReportRowsController */ controller: typeof AccountingReportRowsController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality to show report rows. */ export declare class AccountingReportRowsController implements angular_2.IController { private templates; private $sce; private settingsService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: "partial" | "full"; /** Accounting data */ data: AccountingData; /** Boolean indicating if the refresh is in progress. */ refreshInprogress: boolean; /**Selected report language */ lang: string; /** Trusted language used in html */ calcLang: string; private renderedData; private reportOptions; private renderedLang; private reportData; private htmlData; constructor(templates: Templates, $sce: angular_2.ISCEService, settingsService: SettingsService); /** * Initialize controller values. */ $onInit(): void; /** Expand/close all nodes */ expand(close?: boolean): void; /** Returns true if at least one account is toggled */ get anyExpanded(): boolean; /** Bindable and trusted html. */ get html(): any; /** * Refresh calculation report data. */ private refresh; private getDefaultReportOptions; } /** AccountingReportRowType enumeration */ declare enum AccountingReportRowType { Debit = "debit", Credit = "credit", Total = "total", GroupHeader = "groupHeader", GroupTotal = "groupTotal", ChildRow = "childRow" } /** Contains accounting rows for one or many calculations. */ 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_2 | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange_2 | 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. */ 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 */ declare enum AccountingReportTableType { Classic = "classic", Simple = "simple", Mapped = "mapped" } /** * Shows the export tools for the accounting report. * @example * ```html * * ``` */ export declare class AccountingReportTools extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Reference to the data reader object. */ reader: string; /** Called when the target has been changed. */ onTargetChange: string; /** Called when the expand button state changed */ onExpandChange: string; /** Binded expand state*/ anyExpanded: string; /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: string; }; /** Uses the AccountingReportToolsController */ controller: typeof AccountingReportToolsController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality to export accounting data in various formats. */ export declare class AccountingReportToolsController implements angular_2.IController { private uiHelpers; private $timeout; private settingsService; private sessionService; private $location; private $http; private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Locale for exports */ localeId: string; /** * Supported locales for exports * TODO: This could be replaced with Culture enum directly in the UI. */ locales: { /** Locale id */ id: string; /** Locale label */ label: string; /** Local description */ description: string; }[]; /** Size of the data export */ schemeId: string; /** Export format */ exportMethod: string; /** Supported export formats */ private _exportMethods; /** Export target */ targetId: string; /** Targets */ targets: any[]; /** * Object with read function to call for retrieving the accounting data. * Function has the following argument: arr, which is an array of accounting data into which the result will be appended. */ reader: { /** Function for reading data into given array. */ read: ( /** Target for accounting data */ target: string, /** RuleSet for accounting data */ ruleSet: string, /** Array for accounting data read results */ arr: AccountingData[], /** Message for workflow (loading) */ message: string) => Promise; /** Optional label for data export */ exportLabel?: string; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: boolean; }; /** * Indicator for any expanded row */ anyExpanded: boolean; /** * Report view table only (partial) or pdf preview (full) * Defaults to 'partial' */ view: "partial" | "full"; /** * Function that is called when the target has been changed * Function has the following locals: targetId: the selected accounting target id. */ onTargetChange: (params: { /** Selected target id */ targetId: any; }) => void; /** * Function that is called when row expand change */ onExpandChange: (params: { /** Selected target id */ close: boolean; }) => void; /** Supported targets */ private targetOptions; private defaultOption; private static channelBasePaths; constructor(uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService, settingsService: SettingsService, sessionService: SessionService, $location: angular_2.ILocationService, $http: angular_2.IHttpService, ajax: Ajax); /** * Initialize controller values. */ $onInit(): void; /** Exports data in defined format. */ export(reader?: { /** Function for reading data into given array. */ read: ( /** Target for accounting data */ target: string, /** RuleSet for accounting data */ ruleSet: string, /** Array for accounting data read results */ arr: AccountingData[], /** Workflow loading message */ message: string) => Promise; /** Optional label for data export */ exportLabel?: string; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: boolean; }, /** If true, does not show loading indicator. Default is false. */ hideLoading?: boolean): Promise; /** Navigates to given path and closes possible open modal dialogs. */ navigate(path: string): void; /** * Change target and call event handler. * @param targetId - New target id. */ changeTarget(targetId: string): void; /** * Returns the export methods that are available for the accounting target. */ get exportMethods(): { /** File type id */ id: string; /** File type label */ label: string; /** Boolean indicating if the file type supports different locales */ hasLocales: boolean; /** Workflow message after export */ workflowMessage: any; }[]; /** * Returns the export method type definition * @param exportMethodId export method id */ getExportMethod(exportMethodId: string): { /** File type id */ id: string; /** File type label */ label: string; /** Boolean indicating if the file type supports different locales */ hasLocales: boolean; /** Workflow message after export */ workflowMessage: any; } | undefined; /** * Returns the target definition * @param targetId Target id. */ getTarget(targetId: string): any; /** * Returns the locale definition * @param localeId Locale id. */ getLocale(localeId: string): { /** Locale id */ id: string; /** Locale label */ label: string; /** Local description */ description: string; } | undefined; /** * Returns the scheme definition. * @param schemeId Scheme id. */ getScheme(schemeId: string): any; private setExportMethod; /** * Method for calling onExpandChange event * @param close If true, closes the expanding component. */ expand(close?: boolean): void; private getFileName; private getZipName; private getWorkflowMessage; private getCsv; private getText; private getPdf; private getTabbed; private formatRow; private formatField; private copyToClipboard; private sendToApi; private getAccountingDataUrl; private getAccountingDataError; private getAccountingDataResult; private getAccountingDataPreviewTemplate; } /** * Shows the accounting report viewer for the pre-built reports. * @example * ```html * * ``` */ export declare class AccountingReportViewer extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the AccountingReportCrudController */ controller: typeof AccountingReportCrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows the rows report builder for ad hoc accounting row based reports. * @example * ```html * * ``` */ export declare class AccountingRowReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Template for the report */ templateId: string; }; /** Uses the AccountngRowReportController */ controller: typeof AccountingRowReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for accounting row based reports. */ export declare class AccountingRowReportController extends ConfigurableGridReportControllerBase { private reports; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Usecase uri for report templates */ usecaseUri: string; /** Current grid options. */ gridOptions: any; /** ID for the element containing grid. */ gridElmentId: string; /** Default templates */ defaultTemplates: ({ id: string; owner: null; label: string; config: null; isReadOnly: boolean; avatar: { initials: string; entityType: LegalEntityType; color: string; }; } | { id: string; owner: null; label: string; config: { isPivotMode: boolean; }; isReadOnly: boolean; avatar: { initials: string; entityType: LegalEntityType; color: string; }; })[]; private entryCodeGroups; private entryCodes; constructor(datasets: Datasets, uiHelpers: UiHelpers, sessionService: SessionService, reports: Reports, $timeout: angular_2.ITimeoutService); /** * Initialize controller values. */ $onInit(): void; /** * Processes and sets the data. */ setData(result: AccountingRowReportData): void; private getEntryCodeGroupName; private getEntryCodeName; /** * Gets the monthly / quarterly / yearly accounitng row 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, salary date or work date. * @param workers List of worker official ids. * @returns A Promise with result data. */ queryDataForPeriod(refDate: string, periodType?: PeriodType | "all", endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise; /** * Gets the accounting row data based on given set of calculations. * @param calculationIds - Calculations that are the bases for the report. * @returns A Promise with result data. */ queryDataForCalculationIds(calculationIds: string[]): Promise; private createHolidaysPreset; private createPresetCol; } /** Container for accounting based report data. */ 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_2 | null; /** Contact information for the report. Typically the employer, but may be something else. */ contact?: Contact | null; /** Period for the report. */ period?: DateRange_2 | 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. */ 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. */ 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. */ 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. */ 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; } /** * Accounting settings. * @example * ```html * * ``` */ export declare class AccountingSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** Settings related to Accounting */ declare interface AccountingSettings_2 { /** 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_2[] | 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). */ 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; } /** * UI logic for viewing and adding new (modifying) accounting targets. * Accounting targets define where the accounting data is sent and how it is mapped to a Chart of Accounts (CoA) */ export declare class AccountingTargetCrudController extends ApiCrudObjectController { private fullApi; private sessionService; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If the current item is based on template, it should be here once loaded from server. */ template: AccountingTarget; /** import data */ rawData: string | null; fileExtension: string | null; accountFilter: string; showDistinct: boolean; optionTypes: never[]; private entryCodeGroups; private totalTypes; private incomeTypes; constructor(fullApi: AccountingTargets, sessionService: SessionService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, $timeout: angular_2.ITimeoutService); /** * Implement IController */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Additional setup after the item has been loaded. * @param item Item that has been loaded */ setCurrentRef(item: AccountingTarget): void; /** * Shows the detail view for the item. * Supports viewing public items from other users as read-only. * @param item Item may be either Container or list item. */ showDetails(item: AccountingTargetListItem | AccountingTarget): angular_2.ILocationService; /** Gets entry description */ getEntryDescription(row: AccountingRuleSetRow): string; /** Selects entry */ selectEntry(row: AccountingRuleSetRow): void; /** * Shows the detail view with a new item that is a copy of the given item. * Please note that this method supports copying public items from other users. Override is required because the default cannoty copy from other users * @param item Item may be either Container or list item. */ showCopyAsNew(item: AccountingTargetListItem | AccountingTarget): angular_2.ILocationService; /** * Creates a copy of the current set * Changes the settings so that the accounting target becomes a new item * @param copySource Item (container item) to copy as new. */ copyItem(copySource: AccountingTarget): AccountingTarget; /** Selects the account */ selectAccount(row: AccountingRuleSetRow, isCredit: boolean): void; /** * Sets selectedAccount * @param selectedAccount selectedAccount */ selectTargetAccount(selectedAccount: AccountingRuleSetAccount): void; /** Return targetCoA */ get hasTargetCoA(): boolean; private groupBy; /** Gets the ruleset rouws grouped by account and grouping */ get groupedRows(): { [key: string]: AccountingRuleSetRow[]; }; /** * Get rows based on current ruleSet, account and isDebet * @param account iterated account from current.ruleSet.accounts * @param isDebet indicates if debet or credit account */ getRulesetByAccount(account: AccountingRuleSetAccount, isDebet: boolean): AccountingRuleSetRow[]; /** Returns account details */ getAccount(id: string): AccountingRuleSetAccount | undefined; /** Adds new account */ addAccount(addToEnd?: boolean): void; /** * Add new account to TargetCoA * @param addToEnd tells if adds to end of array or not */ addTargetCoaAccount(addToEnd?: boolean): void; /** Removes the account */ removeAccount(row: AccountingRuleSetAccount, removeFromTargetCoa?: boolean): void; /** * Validated row input * @param row Row to be validated */ isValidAccount(row: AccountingRuleSetAccount): boolean; /** Adds a new row */ addRow(row: AccountingRuleSetRow, addToStart?: boolean): void; /** Removes the row */ removeRow(row: AccountingRuleSetRow): void; /** Selects flags */ selectFlags(row: AccountingRuleSetRow): void; /** Paste data from clipboard. */ pasteFromClipboard(): Promise; /** * Reads the file * @param file Selected file */ readFile(file: File): Promise; /** * Import data */ import(): void; /** * Sort accounts */ sortRulesetAccounts(): void; /** * Updates ruleSet account with provided targetCoA account * @param targetCoaAccount targetCoA account */ updateRuleSetAccount(targetCoaAccount: AccountingRuleSetAccount): void; /** * Updates provided account text to match targetCoa account * @param rulesetAccount ruleSet account */ updateAccountToMatchTargetCoa(rulesetAccount: AccountingRuleSetAccount): void; /** * Return account text to ui */ get accountFilterText(): "SALAXY.NG1.AccountingTargetDetailsComponent.filters.all" | "SALAXY.NG1.AccountingTargetDetailsComponent.filters.includedAndEnabled" | "SALAXY.NG1.AccountingTargetDetailsComponent.filters.error" | undefined; /** * Filter accounts */ get filteredAccounts(): AccountingRuleSetAccount[]; /** * Get accounting rules acount for distinct view * @param account account id * @returns rules count as number */ getRulesCount(account: string): number; /** Returns flag text */ getFlagText(flag: string): { found: boolean; text: string; }; /** * Created distinct object array with account key */ get distinctAccounts(): AccountingRuleSetAccount[]; /** * Acount number of digits in account candidate */ private countDigits; /** * Validated generated Tables data * @returns is TableData valid */ private validateTableData; private newGuid; private legacyFlags; private getCalculationRowTypeLabel; } /** Accounting Target specific business data for index. */ 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; } /** * Provides UI for viewing and adding new (modifying) accounting targets. * Accounting targets define where the accounting data is sent and how it is mapped to a Chart of Accounts (CoA) * @example * ```html * * ``` */ export declare class AccountingTargetDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the AccountController */ controller: typeof AccountingTargetCrudController; /** Default template is the view */ defaultTemplate: string; } /** Specifies the general information of the behavior of Accounting target: Especially the channel and the related properties. */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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 CRUD access for Accounting Targets */ 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; } /** * Accounting target settings. * @example * ```html * * ``` */ export declare class AccountingTargetSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Forced read only state */ isReadOnlyForced: string; }; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** Specifies thee properties that are set for this accounting target in relation to the accounting channel. */ declare interface AccountingTargetSettings_2 { /** 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_2 | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** AccountingTargetStatus enumeration */ declare enum AccountingTargetStatus { Undefined = "undefined", OwnedTarget = "ownedTarget", ProductTarget = "productTarget", SharedTarget = "sharedTarget" } /** Object that represents a Salaxy account. */ declare interface AccountInIndex { /** Avatar for the account */ avatar?: Avatar_2 | 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; } /** * Edit UI for Household's own insurance information including Pension and Unemployment insurance. * Designed for Person Employer only, should not be shown in Worker scenarios as it may be confusing. * @example * ```html * * ``` */ export declare class AccountInsuranceEditPerson extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** The default template for the component. */ defaultTemplate: string; } /** Provides an overview and the possibility to edit products that are enabled to this account */ 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 editing test account * @example * ```html * * ``` */ export declare class AccountReset extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to controller implementation */ bindings: {}; /** Uses the SessionController */ controller: typeof AccountResetController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for resetting account data in the test environment. */ export declare class AccountResetController implements angular_2.IController { private testApi; private uiHelpers; private ajax; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new AccountResetController. * @param testApi - Api methods for resetting account data. * @param uiHelpers - Salaxy UI Helpers. * @param ajax - Salaxy ajax component. */ constructor(testApi: Test, uiHelpers: UiHelpers, ajax: Ajax, sessionService: SessionService); /** * Delete the current account data and credentials (including Auth0 user). * Can be called only in a test environment. */ deleteCurrent(): void; /** * Remove all calculations, workers etc. user objects except products and signature from the account. * Can be called only in a test environment. */ deleteData(): void; /** * Remove all calculations, payrolls and payments from the account. * Can be called only in a test environment. */ deleteCalculations(): void; /** * Remove workers including calculations, employment contracts and tax cards from the account. * Can be called only in a test environment. */ deleteWorkers(): void; /** * 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. */ deleteHolidays(): void; /** * Delete all empty accounts (company or worker) created by this account. * Can be called only in a test environment. */ deleteAuthorizingAccounts(): void; /** * Remove pension and insurance from the account. * Can be called only in a test environment. */ deletePensionAndInsurance(): void; /** * Remove the signature from the account. * Can be called only in a test environment. */ deleteSignature(): void; /** * Checks if the KYC (Know Your Customer) process is done for the current account. * @returns A boolean value indicating whether the KYC process is done. */ isKycMissing(): boolean; /** * Handles the KYC (Know Your Customer) process. * If KYC is missing, it activates the KYC. * Otherwise, it deletes the KYC. */ handleKyc(): void; /** * Deletes the KYC (Know Your Customer) information for the current account. * Shows a confirmation dialog before deleting the KYC. * If the user confirms, it makes an API call to delete the KYC and logs out the user. */ private deleteKyc; /** * Activates the KYC for the account. * Displays a confirmation dialog and proceeds with the activation if confirmed. * Deletes the current account signature and logs out after successful activation. */ private activateKyc; private logout; } /** * Methods for updating account information */ 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) */ declare class AccountSettings extends SingleItemApiBase { /** * For NG1-dependency injection * @ignore */ static $inject: string[]; /** Base URL for details etc. */ protected baseUrl: string; constructor(ajax: Ajax); /** * Creates a new IR certificate. * @param transferId Transfer ID for the IR certificate. * @param transferPassword One time transfer password for the IR certificate. * @returns Information about the created IR certificate. */ createIrCertificate(transferId: string, transferPassword: string): Promise; /** * Renews an existing IR certificate. * @returns Information about the created IR certificate. */ renewIrCertificate(): Promise; /** * Gets the detials of the existing IR certificate or null if no certificate exists. * @returns Information about the current IR certificate. */ getIrCertificate(): Promise; } /** Read-only account settings in Session: These are the settings that should be immediately available in the regular UI without separate loading. */ 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_2 | 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; /** Customer specific preferences. */ preferences?: Preference[] | null; } /** Validation errors for the onboarding process */ 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_2 | 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 component to generate buttons with known actions such as creating a new worker, new calculation etc. * @example * ```html * * ``` */ export declare class ActionButton extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Text for the button */ label: string; /** Additional Bootstrap or custom style classes. Bootstrap I.e. btn-danger, btn-sm, my-btn. Defaults to btn-primary */ buttonClass: string; /** Disabled but visible */ disabled: string; /** Options for button. */ options: string; /** * Action to be executed. * newCalc: starts a new blank calculation. * newCalcForEmployment: starts a new calculation for the given employment id. * newPayroll: starts a new blank payroll. * newWorker: opens workerWizard for creating a new worker. * newMessage: starts a new message thread with partner. * payment: Not supported at the moment. opens the payment dialog for the current calculation. * newTaxcard: Links to taxcards page. Currently supported only when role is Worker. * newRepair: Starts a repair process for a calculation. */ action: string; /** * Function that is called after the function. This is typically used for navigation or a list reload. */ onAfterAction: string; }; /** Uses the NaviController */ controller: typeof ActionButtonController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for action button */ export declare class ActionButtonController implements angular_2.IController { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** Text for the button */ label: string; /** Additional Bootstrap or custom style classes. I.e. btn-danger, btn-sm, my-btn. Defaults to btn-primary. */ buttonClass: string; /** * Action to be executed. * newCalc: starts a new blank calculation. * newCalcForEmployment: starts a new calculation for the given employment ID. * newPayroll: starts a new blank payroll. * newWorker: opens workerWizard for creating a new worker. * newMessage: starts a new message thread with partner. * payment: opens the payment dialog for the current calculation. * newTaxcard: Links to taxcards page. Currently supported only when role is Worker. * newRepair: starts a new repair process for a calculation. */ action: "newCalc" | "newCalcForEmployment" | "newPayroll" | "newWorker" | "newMessage" | "payment" | "newTaxcard" | "newRepair"; /** Disabled but visible */ disabled?: boolean; /** Optional options for button. */ options?: { /** * id: id of current item such as Employment or Calculation. Currently used only in newCalcForEmployment action. */ id: string; }; /** * Function that is called after the function. This is typically used for navigation or a list reload. */ onAfterAction: () => Promise; /** * Creates a new InputController * @ignore */ constructor(); /** * Implement IController */ $onInit: () => void; /** * Returns environment based on config. * TODO: Replace this with ConfigsLogic */ getEnv(): "local" | "test" | "demo" | "prod" | "rc"; } /** * Helper class for executing usecase actions. */ 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 */ declare enum AgeGroupCode { A = "a", B = "b", C = "c", U = "u" } /** AgeRange enumeration */ 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. */ 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 | null; /** 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; /** * Gets a blob (binary data) from the 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 that resolves to an object containing: * - data: The blob data from the response * - headers: An object containing the response headers as key-value pairs */ getBlob(method: string): Promise<{ data: Blob; headers: { [key: string]: string; }; }>; /** * 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; /** * POSTS data to server and receives back a blob (binary data). * * @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 that resolves to an object containing: * - data: The blob data from the response * - headers: An object containing the response headers as key-value pairs */ postBlob(method: string, data: any): Promise<{ data: Blob; headers: { [key: string]: string; }; }>; /** * 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 $http access to the server methods: GET, POST and DELETE * with different return types and authentication / error events. */ export declare class AjaxNg1 implements Ajax { private $http; private $q; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Alert service for ajax. */ static alertService: any; /** * 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 AjaxNg1 * @param $http - Angular http * @param $q - Angular q * @param config - Optional config containing keys which override the corresponding global Config keys. */ constructor($http: angular.IHttpService, $q: IQService, config?: Config); /** * 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 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; /** * 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; /** * Gets a blob (binary data) from the 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 that resolves to an object containing: * - data: The blob data from the response * - headers: An object containing the response headers as key-value pairs */ getBlob(method: string): Promise<{ data: Blob; headers: { [key: string]: string; }; }>; /** * POSTS data to server and receives back a blob (binary data). * @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 that resolves to an object containing: * - data: The blob data from the response * - headers: An object containing the response headers as key-value pairs */ postBlob(method: string, data: any): Promise<{ data: Blob; headers: { [key: string]: string; }; }>; /** * 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; /** * 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; /** * 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; /** * 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; /** If missing, append the API server address to the given url method string */ private getUrl; private handleError; } /** * Shows an alert box with styling. * * Based on Bootstrap alert, but has the following additional functionality: * * - primary style (in addition to success, info, warning and danger) for banner type of advertising * - Icon for better visuality * - Optional "Read more" area * @example * ```html * * ``` */ export declare class Alert extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Possibility to speicfy a font-awesome icon. * Setting "none", will show no icon. * If not set, it is determined by type. */ icon: string; /** Type of the alert is the Bootstrap style: Note that also "primary" and "default" are supported. */ type: string; /** * Alert main content as simple text. * You can alternatively provide html as main element. */ text: string; /** If true, the aside part is shown immidiately. Also hides "read more"- button. */ forceMoreInfo: string; }; /** * Transclusion slots */ transclude: { /** * The main content of the alert. * You can alternatively provide a simple text in "text" property. */ main: string; /** * Optional Details part of the alert. * Will automatically show "Read more" button. */ aside: string; }; /** Uses the AlertController */ controller: typeof AlertController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller rendering an Alert box in the page area. */ export declare class AlertController implements angular_2.IController { private $transclude; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Type of the alert is the Bootstrap style: Note that also "primary" and "default" are supported. */ type: "default" | "primary" | "success" | "info" | "warning" | "danger"; /** * Alert main content as simple text. * You can alternatively provide html as main element. * NOTE: If necessary we could provide a html property to bind from JavaScript and to allow HTML in the binded content. */ text: string; /** * Possibility to speicfy a font-awesome icon. * Setting "none", will show no icon. * If not set, it is determined by type. */ icon: "none" | string; /** If true (and hasMoreInfo is true), the more info html is shown. */ showMoreInfo: boolean; /** If true, the aside part is shown immidiately. Also hides "read more"- button. */ forceMoreInfo: boolean; /** * Creates a new AlertController * @ignore */ constructor($transclude: angular_2.ITranscludeFunction); /** * Implement IController */ $onInit: () => void; /** Returns true if details part (aside element) is filled / "More info" button should be shown. */ get hasMoreInfo(): any; /** Returns the icon based on the type. */ getIcon(): string | null; } /** * Handles error, warning and debug alerts and other such error handling situations. * Default functionality is to find #salaxy-alert-container and insert a bootstrap alert box into that container. */ export declare class AlertService { private $rootScope; private $timeout; private $sce; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Default duration for alerts to be visible */ duration: number; /** Service level counter of alerts. Used for identifier. */ private alertCounter; private alerts; private eventPrefix; /** Dependency injection etc. */ constructor($rootScope: angular.IRootScopeService, $timeout: angular.ITimeoutService, $sce: angular.ISCEService); /** * Adds an error message * @param message Message to add */ addError(message: string): void; /** * Adds a warning message * @param message Message to add */ addWarning(message: string): void; /** * Adds a success message * @param message Message to add */ addSuccess(message: string): void; /** * Adds an info message * @param message Message to add */ addInfo(message: string): void; /** * Last message - consider this a temporary implementation of the custom alert handling * @returns Last message */ getLastMessage(): string; /** * Last alertType is bootstrap type: info (default), success, warning or danger. * Consider this a temporary implementation of the custom alert handling * @returns Last alert type */ getLastAlertType(): string; /** * INTERNAL ONLY: This functionality is under consideration. * We may not support it in the future and we may remove it without it being a breaking change. * * Controllers can subscribe to changes in service data using this method. * Read more about the pattern in: http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/ * @ignore * @param scope - Controller scope for the subscribing controller (or directive etc.) * @param callback - The event listener function. See $on documentation for details */ onChange(scope: angular.IScope, callback: (event: angular.IAngularEvent, ...args: any[]) => any): void; /** * Attaches the alert service to AjaxNg1. * The init is currently called automatically in constructor, but here you can make an explicit call. */ init(): void; /** * Adds an alert message * @param message - A message text for the Alert. Preferably a short text so that it fits to the pull-righ box. * @param alertType - Bootstrap color code for the alert info (default), success, warning or danger */ private addAlert; private renderAlerts; private notify; } /** AllowanceCode enumeration */ 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 */ declare interface AnnualLeave { /** Identifies a single leave. */ id?: string | null; /** The planned holiday period. */ period?: DateRange_2 | null; /** Additional information as recorded by the Employer. */ notes?: string | null; } /** Payment related to annual leave: holiday salary, bonus and compensation */ 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_2 | null; /** Additional information as recorded by the Employer. */ notes?: string | null; } /** AnnualLeavePaymentKind enumeration */ declare enum AnnualLeavePaymentKind { Undefined = "undefined", Planned = "planned", ManualSalary = "manualSalary", ManualCompensation = "manualCompensation", ManualBonus = "manualBonus", PaidCalc = "paidCalc", DraftCalc = "draftCalc" } declare type AnnualLeavePaymentWithAvatar = AnnualLeavePayment & { avatar: Avatar_2; }; /** Data about the annual leaves planned and used during the holiday year. */ 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; } /** Result of the check. Both status and possible item are returned. */ 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. */ declare interface ApiCheckResultOfWorkerAccountOf { /** Status of the check */ status?: ApiCheckStatus | null; /** Result object of the check. Defaults to null. */ item?: WorkerAccount[] | null; } /** ApiCheckStatus enumeration */ declare enum ApiCheckStatus { Ignored = "ignored", Success = "success", Warning = "warning", Error = "error" } /** Abstract base class for implementing CRUD objects in the Salaxy API. */ 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; } /** * Base class for version 03 CRUD controllers where OData list functionality has been * separated from the item editing CRUD functionality. * This version also shifts away from the old Service-infrastructure. */ export declare abstract class ApiCrudObjectController implements angular_2.IController { protected api: CrudApiBase; protected uiHelpers: UiHelpers; protected $location: angular_2.ILocationService; protected $routeParams: any; /** * Defines the binding mode of the component. * * - "model" takes the model directly from the model parameter. * - "parentCtrl" takes the model from the given parent controller. Main actions (like Save, reload) are delegated to that controller. * - "id" fetches the item from the server using the current-id attribute (currentId property). * - "url" like "id", but the id is fetched from route parameters. * - "new" Creates a new item as current. * - "null": Current item is null * * The mode is set in the model property setter. */ bindingMode: "id" | "url" | "model" | "parentCtrl" | "new" | "null"; /** Action for the controller */ action: "default" | "copy-as-new" | string; /** * For list-controls, this is the URL for item select event * as well as the URL where a new item is edited. Basically showing the Details view. * Id is added directly to the string and this is an angular route. * I.e. use "/calc/details/" (not "#/calc/details/" or "/calc/details") * For more control, use onListSelect or onCreateNew events. * @example */ detailsUrl: string; /** * URL for the list view. At the moment, if specified, the browser is redirected here after delete. * @example * * */ listUrl: string; /** If the Crud controller is used from within a ODataQueryController, this is the containing controller. */ odataController: ODataQueryController; /** If the controller is bound to parent controller, the controller is set here. */ parentController: ApiCrudObjectController; /** * Contains the inner value currentId if stored by this controller and not the parent. */ protected _currentId: string; /** * The status of the data loading for the current controller. */ private _status; private _current; private _original; private _model; /** If true, current item is read only */ private _isReadOnlyForced; private _versions; private _versionsId; private _version; private _versionId; /** The status of the initialization process $onInit */ protected initStatus: { isInitDone: boolean; isReloadRequested: boolean; }; /** * Creates a new CrudControllerBase. * @param api Api module typically defined in @salaxy/core used for communicating to server. * @param uiHelpers - Salaxy ui helpers service. * @param $location Angular.js Location service that is used for navigation. Especially the list views. * @param $routeParams - Angular.js routing component */ constructor(api: CrudApiBase, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); /** * Implement IController by providing onInit method. * We currently do nothing here, but if you override this function, * you should call this method in base class for future compatibility. */ $onInit(): void; /** URL for the OData list service */ get odataServiceUrl(): string; /** * Set the Current selected item (the model). * The model may be: * * - TItem: A bound item (default), which can also be null. * - ApiCrudObjectController: Parent controller of the same type. Model is fetched from its current and all methods are delegated. * - "new": A new item is created. * - "url": Fetches the item from the server using the id query string (crudItemId in routeParams). * - string: Any other string is interpreted as id which is used to fetch the item from the server. */ set model(value: "new" | "url" | string | TItem | ApiCrudObjectController); /** Gets the Current selected item (the model). */ get model(): "new" | "url" | string | TItem | ApiCrudObjectController; /** Gets the Current selected item. */ get current(): TItem; /** The current Id for the controller. */ get currentId(): string; /** Gets the Original item before changes. */ get original(): TItem; /** Gets the isReadOnlyForced status. */ get isReadOnlyForced(): boolean; /** Sets the isReadOnlyForced status. */ set isReadOnlyForced(value: boolean); /** * Gets the defaults for service-specific URLs, options etc. * This method must be implemented when implementing ApiCrudObjectController. */ abstract getDefaults(): { /** * URL for the list view. This is list-url attribute with controller-specific default value (e.g. "/articles"). * At the moment, if specified, the browser is redirected here after delete. */ listUrl: string; /** * For lists, this is the URL for item select event as well as the URL where a new item is edited. * Basically showing the Details view. For more control, use onListSelect or onCreateNew events. * This is details-url attribute with controller-specific default value. * Id is added directly to the string and this is an angular route. * I.e. use "/calc/details/" (not "#/calc/details/" or "/calc/details") */ detailsUrl: string; /** Template for displaying the items as list. */ oDataTemplateUrl: string; /** The OData options for default query. */ oDataOptions: ODataQueryOptions; }; /** If true, this is a new unsaved object */ isNew(): boolean; /** If true, the component is in the middle of loading data. */ get isLoading(): boolean; /** * If true, the form controls should be disabled. */ get isDisabled(): boolean; /** * If true, the form controls should be read-only (no input control at all). */ get isReadOnly(): boolean; /** Returns true, if the current object has changes. */ get hasChanges(): boolean; /** * Gets the status of the data if it is being loaded from a remote server. */ get status(): "noInit" | "initialLoading" | "loaded" | "reloading" | "loadError"; /** Makes an OData query */ getOData(options: ODataQueryOptions, result?: ODataResult): Promise>; /** Returns base url of the underlying api. */ getBaseUrl(): string; /** Gets the data transmitted in the route / url */ getRouteData(): { /** id parameter in the route */ id: string; /** Action parameter in the route. */ action: "default" | "copy-as-new" | string; }; /** Save changes to the current item */ save(options?: any): Promise; /** Reset the changes in the current element */ reset(): TItem; /** * Shows the detail view for the item. * Typically, this takes the user to a new page with the ID. * @param item Item may be either Container or list item. */ showDetails(item: TItem | IUserObjectIndex): angular_2.ILocationService; /** * Shows the detail view with a new item that is a copy of the given item. * Typically, this takes the user to a new page with the ID with action "copy-as-new". * @param item Item may be either Container or list item. */ showCopyAsNew(item: TItem | IUserObjectIndex): angular_2.ILocationService; /** * Shows the "Are you sure?" dialog and if user clicks OK, deletes the item. * Cancels the started payment for the payroll too. * @param item Item to be deleted. * If not specified, the current item. * @param confirmMessage Optional custom message for the confirm dialog. * If not specified, a generic message is shown. * If set to boolean false, the confirm message is not shown at all. * @returns Promise that resolves to true if the item is deleted. * False, if user cancels and fails if the deletion fails. */ delete: (item?: TItem, confirmMessage?: string) => Promise; /** * Gets the id for the object regardless of whther the object is Container or list item. * Error is thrown if the item does not exist. * The method is an extension point for future item types that may have other ID's in the future. * @param item The item for which to fetch the ID. */ getId(item: TItem | IUserObjectIndex): string | null | undefined; /** * Deletes an item without showing the confirm dialog. * The method shows the "Please wait..." loader, but does not refresh the * list or move the browser to listUrl. The caller should take care * of the UX actions after delete if necessary. * @param item Item to be deleted. * @returns Promise that resolves to true (never false). Fails if the deletion fails. */ deleteNoConfirm(item: TItem | IUserObjectIndex): Promise; /** * Creates a copy of a given item. * This is a synchronous method that should basically convert a saved item to a new item. * @param copySource Item (container item) to copy as new. */ copyItem(copySource: TItem): TItem; /** * Starts the reload process depending on the bindingMode: */ reload(): Promise; /** * Sets the current item as the given object (reference to a new object). * This also resets the original item. This method is typically used when the object is first loaded, * when object that is being edited is changed or when object is reloaded from server after saving. * @param item The new current item. */ setCurrentRef(item: TItem): any; /** * Sets the current item value: * The object reference remains the same, but all its properties are copied using angular.copy(). * Original object remains as-is by default. This method is typically used at the end of modifyinjg user interfaces. * @param item The new current item. * @param resetOriginal If true, also resets the orginal value. */ setCurrentValue(item: TItem, resetOriginal?: boolean): any; /** * Sets the current item. This also resets the original item. * @param item The new current item. * @param keepOriginalAsIs If true, will not update the original. */ setCurrent(item: TItem, keepOriginalAsIs?: boolean): void; /** * Calls a promise updating the status on the controller. * @param loadAction The promise that executes the loading from server. * If action is null, the status is directly set as "loaded". */ setStatus(loadAction: Promise): Promise; /** * Adds/updates the workflow event for the current using API. * @param wfEvent - Workflow event to add/update. * @returns - Reloaded item. */ saveWorkflowEvent(wfEvent: WorkflowEvent): Promise; /** * Deletes the given event or all events with given type using API. * @param wfIdOrType Id or type of the workflow event. * @returns - Reloaded item. */ deleteWorkflowEvent(wfIdOrType: string): Promise; /** * Gets a single workflow event for the item. * @param wfId Id of the workflow event. * @returns - Single workflow event */ getWorkflowEvent(wfId: string): Promise; /** Returns the current api */ getApi(): CrudApiBase; /** * Returns the versions for the current item. */ get versions(): VersionInfo[]; /** * Gets a version of the current item. * @param version VersionInfo of the item. */ getVersion(version: VersionInfo): { version: VersionInfo; item?: TItem; }; } /** * Bindings for the components that use ApiCrudObjectController. */ export declare class ApiCrudObjectControllerBindings { [boundProperty: string]: string; /** * URL to which the component navigates when an item is clicked. * The "id" or "rowIndex" property of the selected item is added to the URL. * URL is ignored if onListSelect is set. In this case, you may navigate yourself in that method. * Id is added directly to the string and this is an angular route. * I.e. use "/calc/details/" (not "#/calc/details/" or "#/calc/details") * @example */ detailsUrl: string; /** * URL for the list view. At the moment, if specified, the browser is redirected here after delete. * @example * * */ listUrl: string; /** * Set the Current selected item (the model). * The model may be: * * - TItem: A bound item (default), which can also be null. * - "new": A new item is created. * - "url": Fetches the item from the server using the id query string (crudItemId in routeParams). * - string: Any other string is interpreted as id which is used to fetch the item from the server. */ model: string; /** If true, current item is read only */ isReadOnlyForced: string; } /** Result of the import. Both status and possible item are returned. */ 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. */ 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. */ 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. */ 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 */ declare enum ApiImportStatus { Ignored = "ignored", Success = "success", Warning = "warning", Error = "error" } /** ApiItemType enumeration */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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 */ 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 */ 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; } /** ApiTestErrorType enumeration */ declare enum ApiTestErrorType { Default = "default", UserFriendly = "userFriendly" } /** Common base class / interface for data validation. */ 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. */ 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 */ declare enum ApiValidationErrorType { General = "general", Required = "required", Invalid = "invalid", Warning = "warning" } /** * Appends the given element to the current element. * The existing element will be removed from the source parent element. * The attribute value should resolve to an existing DOM node or string. * @example * ```html *
* ``` */ export declare class AppendNodeDirective implements angular_2.IDirective { /** * Factory for directive registration. * @ignore */ static salaxyAppendNode(): { (): AppendNodeDirective; $inject: any[]; }; /** * Applies to attributes only. * @ignore */ restrict: string; /** * Creates a new instance of the directive. */ constructor(); /** * Evaluates the attribute value (DOM node or default string), and appends it to the current element. * @ignore */ link(scope: any, element: any, attrs: any): void; } /** Exception tracking with AppInsight */ export declare class AppInsightExceptionTracking { /** * For NG-dependency injection * @ignore */ protected static $inject: string[]; constructor($provide: angular_2.auto.IProvideService); } /** * Supports the UserSession object by providing additional information about the status * of fetching the session, data, expiration etc. */ 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[]; } /** Request to assure that a company account exists: Either an account is returned or an account stub (non-verified) will be created. */ 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; } /** * Component that assures that customer has specified a partner. * @example * ```html *
This content is shown if partner selected!
* ``` */ export declare class AssurePartner extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** * The "main" element contents is shown if the partner has been selected. Defaults to current partner info. * The "header" element is shown before the "main" Defaults to "Service provided by" + an actions drop-down. */ transclude: { main: string; header: string; }; /** Uses the AccountAuthorizationController */ controller: typeof PartnerController; /** The default template for the component. */ defaultTemplate: string; } /** Attachment. */ declare interface Attachment { /** Name of the attachment. E.g. monthly-details-2018-01.pdf */ fileName?: string | null; /** Content for data. */ contentId?: string | null; } /** * Shows a card for granting authorization * @example * ```html *
*
*
* *
*
*
* ``` */ export declare class AuthCard extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Id that specifies what auth card to be shown */ authId: string; /** If set to true, the switch is not shown on the card. */ hideSwitch: string; }; /** Uses the AccountAuthorizationController */ controller: typeof AccountAuthorizationController; /** The default template for the component. */ defaultTemplate: string; } /** AuthenticationMethod enumeration */ 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. */ 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 */ 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; } /** AuthorizationStatus enumeration */ declare enum AuthorizationStatus { Undefined = "undefined", OK = "oK", AccessDenied = "accessDenied", ExpiredOauthToken = "expiredOauthToken", InvalidOAuthToken = "invalidOAuthToken", NoOauthToken = "noOauthToken" } /** AuthorizationType enumeration */ declare enum AuthorizationType { None = "none", EmployerAuthorization = "employerAuthorization", WorkerContract = "workerContract", CompanyContract = "companyContract", PartnerContract = "partnerContract", Manual = "manual", Temporary = "temporary" } /** * Shows a list of all authorized accounts which can act on behalf of this account. * @example * ```html * * ``` */ export declare class AuthorizedAccounts extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { onListSelect: string; onDelete: string; onCreateNew: string; detailsUrl: string; listUrl: string; }; /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ transclude: { header: string; }; /** Uses the AccountAuthorizationController */ controller: typeof AccountAuthorizationController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides CRUD access for authenticated user to access a his/her own authorized accounts */ declare class AuthorizedAccounts_2 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)[]>; /** * Lists all accounts that have authorized the current account to act on their behalf. * Makes a GET request to the API base URL using the configured Ajax instance. * @returns A Promise that resolves to an array of PersonAccount and CompanyAccount objects */ getAll(): Promise<(PersonAccount | CompanyAccount)[]>; /** * OData query is not supported for authorized accounts. * @param _query OData query parameters (not used) * @throws Error indicating operation is not supported */ getOData(_query: any): any; /** * Getting a single authorized account is not supported. * @param _id Identifier of the account (not used) * @throws Error indicating operation is not supported */ getSingle(_id: any): any; } /** * CRUD functionality for the authorized accounts. * Additionally listing of authorizing accounts. */ export declare class AuthorizedAccountService extends BaseService { private authorizedAccountsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * String that identifies the service event (onChange/notify). * Must be unique for the service class. */ protected eventPrefix: string; private authorizingAccounts; /** Intial data owner */ private initialAuthorizingAccountsOwner; private currentPartnerSite; /** * List of Software/Integration partner sites */ private partnerIntegrationSiteList; constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, authorizedAccountsApi: AuthorizedAccounts_2); /** * Refreshes existing authorizing accounts. * @returns A Promise with result data (PersonAccount|CompanyAccount)[] */ reloadAuthorizingAccounts(): Promise<(PersonAccount | CompanyAccount)[]>; /** * Lists all accounts on behalf of which this account has been authorized to act. * @returns A Promise with result data (PersonAccount|CompanyAccount)[] */ getAuthorizingAccounts(): (PersonAccount | CompanyAccount)[]; /** * Sets the current partner site * @param partnerSite A partner site to be set as current */ setCurrentPartnerSite(partnerSite: any): void; /** * Returns the current partner site */ getCurrentPartnerSite(): any; /** * Return a list of all possible Integration partner sites * * Partner sites are services that have Salaxy or Palkkaus functionality in them. Others are services that have a different sign-in method, * and these services need an authorization to access user's Salaxy/Palkkaus account. Others use the Salaxy/Palkkaus sign-in method, so they don't * need separate authorization. Due to some services needing an authorization and others not needing it, all partner services need to be stored in a * separate property, simply listing authorizations does not suffice. * * Partner services that need an authorization have a property accountId, that is the IBAN for their Salaxy acccount * @returns List of partner site objects. */ getPartnerIntegrationSiteList(): any; /** * Returns the partner site with given id * @param id The name of the partner site * @returns Partner site object with the given id, or undefined. */ getPartnerSite(id: any): any; private refreshAuthorizingAccounts; } /** Avatar for authorized account. */ 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; } /** * Shows a list of all authorizing accounts on behalf of which this account can act. * @example * ```html * * ``` */ export declare class AuthorizingAccounts extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ transclude: { header: string; }; /** Uses the AccountAuthorizationController */ controller: typeof AccountAuthorizationController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows the Palkkaus Avatar image: This is either an image or a font-icon with a user specific color/initilas combination. * @example * ```html * * ``` */ export declare class Avatar extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The Avatar object that should be rendered */ avatar: string; }; /** Uses the AvatarController */ controller: typeof AvatarController; /** The default template for the component. */ defaultTemplate: string; /** Rendered HTML replaces the original element */ replace: true; } /** Defines an avatar for an account, profile etc. - mainly the image that should be shown, names and short description */ declare interface Avatar_2 { /** 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; } /** * Controller rendering a Salaxy account Avatar (image for the person / company). */ export declare class AvatarController implements angular_2.IController { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** The Avatar object which the controller is rendering */ avatar: any; /** * Creates a new AvatarController * @ignore */ constructor(); /** * Implement IController */ $onInit: () => void; /** Returns true if the avatar is an image url (as opposed to icon rendering) */ get isImage(): boolean; /** Returns true if the avatar should be rendered as a person icon */ get isPersonIcon(): boolean; /** Returns true if the avatar should be rendered as a company icon */ get isCompanyIcon(): boolean; /** Returns the avatar color or 'gray' if nothing is defined. */ get color(): string; /** Returns the initials for rendering the avatar */ get initials(): string; /** * Return the color for the avatar icon and line strokes. * If some colors require adjustments due to accessibility reasons, they can be implemented here. */ private getColor; } /** AvatarPictureType enumeration */ declare enum AvatarPictureType { Icon = "icon", Uploaded = "uploaded", Gravatar = "gravatar" } /** First version of the product that integrates the Palkkaus.fi-salary payments to employers accounting. */ 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; } /** * Legacy service model: Stores the edited items in browser session context. * Most new implementations should use the new API CRUD model instead. * However, this service model may still be the right choice in certain circumstances where the editable data should be * cached or is already in session (like account data). */ declare abstract class BaseService implements IService { private $rootScope; protected sessionService: SessionService; private api; /** * List of items loaded to the service. * Empty list if items are still been loaded. */ list: T[]; /** Currently selected item. */ current: T; /** Set to true when the initial data hase been loaded from the server (not the anonymous dummy data). */ isInitialDataLoaded: boolean; /** Intial data owner */ private initialOwner; /** * String that identifies the service event (onChange/notify). * Must be unique for the service class. */ protected abstract eventPrefix: any; constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, api: CrudApiBase); /** * Gets all items from the service's base URL endpoint. * Makes a GET request to the API base URL using the configured Ajax instance. * @returns A Promise that resolves to an array of items of type T. */ getAll(): Promise; /** * Reloads the list from the server - called in init and e.g. after Delete and Add new * @returns A Promise with result data */ reloadList(): Promise; /** * Client-side (synchronous) method for getting a new blank item as bases for UI binding. * @returns A Blank item with default values. */ getBlank(): T; /** * Get the identifier of the current item, null if none is selected. * @returns The identifier of current item, or null if not set */ getCurrentId(): string | null; /** * Set the current item by id. * If id parameter is "new", the item is set to a new blank item. * If id paramter is null, the current item is set to null. * @param id - The Identifier for the item to set as current */ setCurrentId(id: "new" | string): void; /** * Set the current item to given item * @param item - The item to set as current */ setCurrent(item: T): void; /** * Sets the current item to a new blank item. */ newCurrent(): void; /** * Saves the current item to database. * @returns A Promise with result data: The current object after round-trip to server. */ saveCurrent(): Promise; /** * Saves the given item to database. * @param item - Item to be saved * @returns A Promise with the item after the round-trip to server. */ save(item: T): Promise; /** * Deletes the specified item. * @param id - The identifier for the item to be deleted * @returns A Promise with result data ("Object deleted") */ delete(id: string): Promise; /** * Creates a copy of a given item. * This method does not yet set the item as current. * @param copySource Item to copy as new. */ copyAsNew(copySource: T): T; /** * INTERNAL ONLY: This functionality is under consideration. * We may not support it in the future and we may remove it without it being a breaking change. * * Controllers can subscribe to changes in service data using this method. * Read more about the pattern in: http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/ * @param scope - Controller scope for the subscribing controller (or directive etc.) * @param callback - The event listener function. See $on documentation for details * @ignore */ onChange(scope: angular_2.IScope, callback: (event: angular_2.IAngularEvent, ...args: any[]) => any): void; /** INTERNAL ONLY: Emits the service event (typically list reload). This functionality may be dropped in future versions without warning. */ protected notify(): void; private init; } /** * Client-side logic for Usecase. */ 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 | undefined): 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 | undefined; /** Internal validation method that deriving classes should implement. */ protected abstract getUcValidation?(row: UserDefinedRow): UsecaseValidationMessage | undefined; /** * 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; } /** * Used for running batch processes to the server. * At the time of writing, the controller isonly used in Modal dialogs, but may�be used for something else later. */ export declare class BatchProcessController implements angular_2.IController { protected $uibModalInstance: any; private $timeout; private jsonSchemaService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Counter and status for the processing of the items */ processCounter: { /** If true, the processing is in progress (started and not yet done). */ isProcessing: boolean; /** If true, the processing is done. Note that this may also mean that the processing has been canceled by the user. */ isDone: boolean; /** Total count of items that should be processed. */ totalCount: number; /** Count of items that have been processed. Note that also errors are counted as processed. */ processedCount: number; /** Errors that occured. */ errorsCount: number; /** If true, the process has been canceled by the user. If also isDone is true, the canceling has completed. */ canceling: boolean; }; /** Options for the modal dialog */ dialogHeader: string; /** Columns that are shown in the grid. Leave empty use default columns */ columns: string | (string | ColumnDefinition)[]; /** List of items that should be processed. */ list: any[]; /** Usecase specific data for the dialog. */ data: any; /** * Method that is called by the process. * ItemOrArray is the item/array that is processed, Data is the controller data that may be edited in the form. * The promise may return a message that is shown after text "OK". * Promise rejection is cached. */ method: (itemOrArray: any | any[], data: any) => Promise<({ message: string; result: any[]; }[])>; /** * Optional chunk size for the batch process. This is used if the method supports arrays. */ chunkSize: number; /** Start process right after opening the invoice. */ autoStart: boolean; /** Close dialog after process. */ autoClose: boolean; /** Options that are bound to the grid. */ tableOptions: SxyTableOptions; /** Inner template that is included for usecase specific form and other UI. */ batchTemplateUrl: string; /** Binding for start button, which launches the processing. */ isProcessStarted: boolean; /** The table controller after it has been initialized. */ $table: SxyTableController; /** References a schema document directly: the schema document is not fetched from the UI */ openApiDoc: any; /** * URL for the Open API document that contains the definition for the type. * The url can be an absolute url, relative url or an url with salaxy-secure/ -prefix. * The salaxy-secure/ -prefix will be replaced in runtime with the salaxy api server url of the curren environment. */ openApi: string; /** The schema model */ schemaModel: OpenAPIV3.SchemaObject; /** If true, the schema loading is ready. */ isReady: boolean; /** * Constructor for dependency instance. * @param $uibModalInstance Modal instance supports functions such as close(result), dismiss(reason) and promises result, opened, closed and rendered. * @param data Rest of the data injected from the caller. */ constructor($uibModalInstance: any, data: any, $sce: angular_2.ISCEService, $timeout: angular_2.ITimeoutService, jsonSchemaService: JsonSchemaService); /** Initialization */ $onInit: () => void; /** Starts the processing */ startProcess(): void; /** Processes next items in the queue */ processNextItems(): void; private processNextItemsInternal; /** Closes the dialog. */ close(): void; /** Resets the processed status column(s) */ resetProcessed(): void; /** Cancels the process: Waits for the next response, but does not start a new one. */ cancelProcess(): void; private getColumns; /** * Gets a column definition for avatar column: Renders an avatar with sortable name and second info line. * @param party The party to render: either "owner" (ownerInfo) or "other" (otherPartyInfo). * @param title The title of the column. * @param props Other properties that should be set on the column. */ getAvatarCols(party: "owner" | "other", title: string, props?: any): any[]; /** * Gets a column definition for enumerations column * @param field The field name / path in the data model. * @param title The title of the column. * @param enumType The type name of the enumeration. * @param props Other properties that should be set on the column. */ getEnumColumn(field: string, title: string, enumType: string, props?: any): any; /** Gets the options for the UI grid */ private getGridOptions; } /** Name and ids of the owner and the number/percent of shares. */ 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_2 | 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. */ 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 */ 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. */ declare interface Beneficiary { /** Nationality of the beneficiary. */ nationality?: string | null; /** Avatar for the account */ avatar?: Avatar_2 | 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; } /** Customer specific business configuration. */ declare interface BizConfig { /** Flag for disabling the configuration without deleting it. */ disabled?: boolean | null; /** If specified, defines the start date for the settings. If in the future, the the settings is inactive. Null (default) means the settings is valid indefinetely from the past. */ startDate?: string | null; /** If specified, defines the end date for the settings. Date is inclusive meaning that if EndDate is 31.12., settings is valid until end-of-year: Valid on 31.12. and invalid 1.1. If in the past, the the settings is inactive. Null (default) means the settings is valid indefinetely to future. */ endDate?: string | null; /** Name for the configuration. */ name?: string | null; /** Applicable collective agreement */ cbaCode?: number | null; /** Employee group. */ employeeGroup?: string | null; /** Type of the configuration data. It can be a value type or object type. */ dataType?: string | null; /** Configuration data. */ data?: any | null; /** Last time the configuration was created/updated. */ updatedAt?: string | null; /** User who last updated the configuration. */ updatedBy?: string | null; } /** The BlobFile stores metadata about miscellaneous BLOB-files that are stored to the system. For example Receipts and Authorizations. */ 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. */ 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_2 | 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 */ 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 */ declare enum BlobRepository { UserFiles = "userFiles", VersionHistory = "versionHistory", SystemFiles = "systemFiles", Payload = "payload", Reports = "reports", CdnImages = "cdnImages", Iam = "iam", GitContent = "gitContent", FileSystemContent = "fileSystemContent" } /** BootstrapStyle enumeration */ declare enum BootstrapStyle { Default = "default", Primary = "primary", Success = "success", Info = "info", Warning = "warning", Danger = "danger" } /** Brand specific business data for index. */ declare interface BrandData { /** Url to logo. */ logo?: string | null; /** Css path. */ skin?: string | null; } /** Represents a single item in a list of brands. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** * Fires the necessary Bootstrap 5 initialization for the given element. * @example * ```html * inline links * ``` */ export declare class Bs5Popover implements angular_2.IDirective { /** * Factory for directive registration. * @ignore */ static salaxyBs5Popover(): { (): Bs5Popover; $inject: any[]; }; /** * Applies to attributes only. * @ignore */ restrict: string; /** * Creates a new instance of the directive. */ constructor(); /** * Attaches the appropriate Bootstrap scripts to the element. * @ignore */ link(scope: any, element: JQLite, attrs: any): void; } /** * Fires the necessary Bootstrap 5 initialization for the given element. * @example * ```html * inline links * ``` */ export declare class Bs5Tooltip implements angular_2.IDirective { /** * Factory for directive registration. * @ignore */ static salaxyBs5Tooltip(): { (): Bs5Tooltip; $inject: any[]; }; /** * Applies to attributes only. * @ignore */ restrict: string; /** * Creates a new instance of the directive. */ constructor(); /** * Attaches the appropriate Bootstrap scripts to the element. * @ignore */ link(scope: any, element: JQLite, attrs: any): void; } /** * Provides CRUD access for business templates. */ declare class BusinessTemplates 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(): Template_2; } /** Provides a way to cache lists and items to centralized cache. */ export declare class CacheService { /** The raw cache array */ private rawCache; /** Return true if the given item is in the cache. */ hasData(key: string, url: string): boolean; /** Returns the data if exists / is valid. */ getData(key: string, url: string): any; /** Returns the full cache data based on key without any validation. */ getFullCache(key: string): { /** * URL that was called to fetch the cache. * Technically, this can be any string that just determines whether the URL / query has changed. */ url: string; /** The payload for the cache. */ data: any; /** * Time when the cache expires. * This is time in milliseconds, i.e. Date().getTime(). */ validMs: number; } | null; /** * Sets the new data to the cache. * @param key The cache key. Defining the instance where the cache is being used. * If null, does nothing. * @param url URL that was called to fetch the cache. * Technically, this can be any string that just determines whether the URL / query has changed. * @param data Data that is cached * @param expiresSeconds Time to live for the data in seconds starting from the current time. */ setData(key: string, url: string, data: any, expiresSeconds: number): void; /** Clears the entire cache - all keys. */ clearAllKeys(): void; /** Clears a given cache key */ clear(key: string): void; } /** * The **salaxy.ng1.components.Calc** is the generic Angular-based salary calculator implementation. * It shows the basic features required for a salary calculator user interfaces: * * 1. Setting the Worker for the calculation * 2. Defining the Worktime information: Period, Absences and holidays. * 3. Defining the Salary and the benefits * 4. Defining Expenses, benefits, household subsidies etc. * 5. Showing the results as charts and reports. * * Controllers are defined in **salaxy.ng1.controllers**. Most of the functionality comes from Calculator2019Controller. * The views can be modified separately for each component using the templateUrl. See documentation for details. * @example * ```html * * ``` */ export declare class Calc extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; anonOptions: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the Calculator2019Controller */ controller: typeof Calculator2019Controller; /** The default template for the component. */ defaultTemplate: string; } /** * Chart.js based chart. * @example * ```html * * ``` */ export declare class CalcChart extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Calculation for which the chart is rendered. */ calc: string; /** Role for which the chart is rendered. Currently, 'worker' and 'employer' are supported. Employer is the default. */ role: string; /** If true, the Y axis of this chart is scaled so that if worker and employer charts are side to side, their Y axis are the same */ scaleYAxis: string; /** Type of the chart - "pie" and "bar" (default) are currently supported. */ chartType: string; /** - colors: Custom colors for the chart as a string containing hex values of the colors, separated by comma */ colors: string; }; /** Uses the CalcChartController */ controller: typeof CalcChartController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for employer and worker charts using chart.js */ export declare class CalcChartController implements angular_2.IController { private $element; private $timeout; private $scope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Role for which the chart is rendered: employer (default) or worker */ role: "employer" | "worker"; /** Calculation that is rendered. */ calc: Calculation; /** Y axis scale */ scaleYAxis: boolean; /** Chart type: "pie" and "bar" (default) are currently supported. */ chartType: "pie" | "bar"; private chart; /** Created datasets from Calculation input */ private datasetData; private barChartOptions; private pieChartOptions; private chartColors; constructor($element: JQLite, $timeout: angular_2.ITimeoutService, $scope: angular_2.IScope); /** Initializes the controller. */ init(): void; /** Creates chart based on data and options to canvas or updates chart if it already exists */ createChart(): void; /** * Updates provided current chart * "none" parameters means no animation for update */ updateChart(): void; /** * Calculates and sets a proper Y axis max value for a given value * @param value The number of the highest bar in chart */ private setChartYAxisLimit; private getChartData; private formatCurrency; private setChartOptions; private getDatasets; private setChartColors; private get getDatasetData(); } /** * Shows the cost accounting details for the calculation. * @example * ```html * * ``` */ export declare class CalcCostAccounting extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation. */ calc: string; /** Forced read only state */ readOnly: string; /** * Optional CostAccountingDimensionDefinitions * If not set, cost accounting dimensions and their options are read from the settings. */ dimensions: string; /** * Style of the inputs. * Supports empty or 'openClose'. Only available in not readOnly */ inputMode: string; }; /** Uses the CalcCostAccountingController */ controller: typeof CalcCostAccountingController; /** The default template for the component. */ defaultTemplate: string; } /** * Handles the user interaction for entering cost accounting data for the calculation. */ export declare class CalcCostAccountingController extends CostAccountingController { /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The calculation*/ calc: Calculation; /** * Creates a new CalcCostAccountingController * @ignore */ constructor(sessionService: SessionService); /** * Implement IController */ $onInit(): void; /** * Returns true if the current calculation is read only. */ get isReadOnly(): boolean; /** Returns the cost accounting model type */ get isLegacy(): boolean; /** Returns total cost center percentage */ getLegacySum(): number; /** Returns current costCenter. */ get costCenter(): any; } /** * Shows lists of calculations * @example * ```html * * ``` */ export declare class CalcDashboard extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Option to hide new calc button. * Set this true if the site has action buttons configured elsewhere. */ hideButton: string; /** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */ readOnly: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Editor for the given calculation. * @example * ```html * * ``` */ export declare class CalcEditor extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcReportController */ controller: typeof CalculationEditorController; /** The default template for the component. */ defaultTemplate: string; } /** Employer of a calculation */ 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_2 | 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; } /** * Shows / edits the relevant employment relation: * Employer, if the current user is worker * Worker, if the current user is employer or potentially both in some future admin / pro scenarios. * @example * ```html * * ``` */ export declare class CalcEmployment extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation that is being edited */ model: string; /** * If true, will also update the calculation rows from employment relation when the employment * relation is selected. By default, does not update the rows. */ updateRows: string; }; /** Uses the CalcEmploymentController */ controller: typeof CalcEmploymentController; /** The default template for the component. */ defaultTemplate: string; } /** * Allows editing the employmen */ export declare class CalcEmploymentController implements angular_2.IController { private uiHelpers; private uiCrudHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Setter for the calculations controller that edits the current item. * Possibility to support other data types. */ model: CalculationCrudController; /** * If true, will also update the calculation rows from employment relation when the employment * relation is selected. By default, does not update the rows. */ updateRows: boolean; constructor(uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers); /** Gets the current calculation. By convention, set in model. */ get current(): Calculation; /** * Opens a dialog that shows the wizard to create a new Employment relation. */ launchEmploymentWizard(): void; } /** CalcGroup enumeration */ declare enum CalcGroup { Undefined = "undefined", BaseSalary = "baseSalary", SalaryAdditions = "salaryAdditions", Benefits = "benefits", Expenses = "expenses", Deductions = "deductions", OtherNoPayment = "otherNoPayment", Totals = "totals", Disabled = "disabled" } /** * UI for setting the Household Usecases within the calculator * @example * ```html * * ``` */ export declare class CalcHouseholdUsecase extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation that the component edits */ calc: string; /** Alternative data binding: creates a calculation based on Worker defaults. */ worker: string; /** * Shows the Save and Reset buttons. * Currently, this is only enabled for WorkerAccount data binding, but may later be enabled for calc. */ showSave: string; /** isReadOnly*/ isReadOnly: string; }; /** Uses the CalcHouseholdUsecaseController */ controller: typeof CalcHouseholdUsecaseController; /** The default template for the component. */ defaultTemplate: string; } /** * Handles the user interaction of Worktime within the Calculator. * The Worktime contains the logic for fetching holidays and absences * for that particular period and adding calculation rows for them if necessary. */ export declare class CalcHouseholdUsecaseController implements angular_2.IController { private uiHelpers; private calcApi; private workersApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** User interface shortcuts for period selection */ periodShortcuts: { /** Text for current month. */ monthCurrent: string; /** Text for last month. */ monthLast: string; /** Text for other month. */ monthOther: string; /** Text for two weeks. */ weeks2: string; /** Text for half a month */ monthHalf: string; /** Text for other period. */ other: string; }; /** The calculation that the controller edits. */ calc: Calculation; /** Alternative data binding: creates a calculation based on Worker defaults. */ worker: WorkerAccount; /** * Shows the Save and Reset buttons. * Currently, this is only enabled for WorkerAccount data binding, but mayu later be enabled for calc. */ showSave: boolean; /** * If true, indicates that we are editing salary template information for employment relation: * Not a concrete calculation. */ isEmployment: boolean; /** If true, the UI is in read-only mode. */ isReadOnly: boolean; /** If there is a validation error in period start, it is added here. */ periodStartDateError: null; /** * Worktime data for the period fetched from the server */ worktime: CalcWorktime_2; /** The tree for selecting the calculation usecase (household) */ private tree; private _periodStartDate; private _dateRange; /** * Creates a new CalcHouseholdUsecaseController * @ignore */ constructor(uiHelpers: UiHelpers, calcApi: Calculations, workersApi: Workers); /** * Implement IController */ $onInit(): void; /** * The use case that we are editing */ get usecaseData(): HouseholdUsecase; /** Gets the view template that is used for showing the usecase details part. */ getTemplate(): string; /** * Gets or sets the isHouseholdDeductible within the usecase. * Currently, this is part of the usecase specification and will be set to Salary (household properties in V03) from there. */ get isHouseholdDeductible(): boolean; set isHouseholdDeductible(value: boolean); /** Gets the current calculation object */ get currentCalc(): Calculation; /** * Returns true if there is no net salary payment to worker at all. */ get isCurrentZeroPayment(): boolean; /** * Submit the usecase data and recalculate */ submitHouseholdUsecase(): void; /** Saves the usecase to employment */ saveEmployment(): void; /** * Does recalculation on the usecase and and applies it to worker account. * @returns The updated worker account. The changes are also applied to the worker property. */ updateWorkerAccount(): Promise; /** Resets the usecase from employment */ resetEmployment(): void; /** Starts the edit mode if the component is in read-only mode. */ startEdit(): void; /** * The salary row is the first row is the first row in the rows list */ get salaryRow(): UserDefinedRow; /** Returns true if the usecase has been selected. */ get isUsecaseSelected(): boolean; /** Gets the label for price input */ get priceLabel(): "Kuukausipalkka" | "Työkorvaus" | "Kertakorvaus" | "Tuntipalkka" | "Kokonaiskustannus" | "Nettopalkka" | "Hinta"; /** * Select and set usecase in UI */ selectUsecase(usecase: any): void; /** Resets the price and amount when row type is changed. */ changeRowType(): void; /** * Resets the usecase to empty: Shows the usecase selection again. */ resetUsecase(): void; /** Getter and setter for Calculation daterange in compatible format for new DateRange component. */ get dateRange(): DateRange_2; set dateRange(value: DateRange_2); /** * Called when the date range changes. * @param noPeriodStartDateUpdate If true, the _periodStartDate is not updated. * Should be true if the change is triggered by that input to avoid UI flickering. */ dateRangeChange(noPeriodStartDateUpdate?: boolean): void; /** * Gets or sets the period start date, which is bound to editable input in case the period type * is not "other" (date the range / calendar component) */ get periodStartDate(): string; set periodStartDate(value: string); /** * Gets the user interface shortcut for the period type: * Different user interfaces are shown depending on the period shortcut. */ get periodShortcut(): "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other"; set periodShortcut(value: "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other"); private initDateRanges; } /** * User interface for calculation mass loading. * @example * ```html * * ``` */ export declare class CalcImport extends DataImportComponentBase { /** Uses the CalcImportController */ controller: typeof CalcImportController; } /** * Controller for calculation imports. */ export declare class CalcImportController extends DataImportControllerBase { private importsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Boolean indicating if the worker validation is in progress. */ isValidating: boolean; /** Options form */ optionsForm: angular_2.IFormController; /** Custom options */ customOptions: "addRows" | "removeImportedRows" | "removeAllRows"; private getTargetKey; private getSourceKey; private getCheckTargetKey; private getCheckSourceKey; private extraValidator; /** * Creates a new WorkerImportController * @ignore */ constructor(importsApi: Imports, jsonSchemaService: JsonSchemaService, $timeout: angular_2.ITimeoutService); /** * Implement IController */ $onInit(): Promise; /** * Updates options from the ui. */ updateOptions(): void; /** * Options validation. If required, override this method in the inheritied class. */ hasInvalidOptions(): any; /** Import data */ import(): Promise; /** Help */ help(): Promise; /** Returns extra validator */ getExtraValidators(): Array<{ validate: () => void; buttonLabel: string; }>; protected getImportMapper(): Promise>; /** Import data */ private validateWorkers; } /** Informational object that stores data about the salary calculation / payment that is not directly related to calculating the salary. */ 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; /** Earnings Payment Report Official id of the sender. */ irSenderOfficialId?: 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; /** Applicable collective agreement */ cbaCode?: number | null; /** Employee group. */ employeeGroup?: 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; } /** * Editor for Incomes Register (Tulorekisteri) rows from Calculation. * @example * ```html * * ``` */ export declare class CalcIrRows extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; anonOptions: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcIrRowsController */ controller: typeof CalcIrRowsController; /** The default template for the component. */ defaultTemplate: string; } /** * IR-rows based editor for calculation */ export declare class CalcIrRowsController extends Calculator2019Controller { protected invoicesService: InvoicesService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Translated enums */ groupingOptions: any; /** * Active tab of editor */ protected activeTab: number; private _currentRow; /** * Creates a new instance of the controller with dependency injection. * @ignore */ constructor(calcApi: Calculations, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, ajax: Ajax); /** * Implement IController */ $onInit(): void; /** The current row that is being viewed / edited. */ get currentRow(): IrRow; /** The metadata that describes currentRow */ get currentRowType(): IncomeTypeMetadata; /** IR-rows that are viewed / edited by the controller */ get irRows(): IrRow[]; /** Sets the current edited / viewd row */ setCurrentIrRow(row: IrRow): void; /** Deletes a row */ deleteIrRow(row: any): void; /** Returns true if the row is read-only: Cannot be directly edited. */ get isIrRowReadOnly(): boolean; /** Updates the current row type. */ updateCurrentRowType(): void; /** Gets the income type (the metadata) object for the currently selected row. */ getIncomeType(row: any): IncomeTypeMetadata; /** Adds a new IR row to the collection. */ addIrRow(): void; } /** * Displays payments for current calculation period. * @example * ```html * * ``` */ export declare class CalcLeaves extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation*/ calc: string; /** The worktime*/ worktime: string; }; /** Uses the CalcLeavesController */ controller: typeof CalcLeavesController; /** The default template for the component. */ defaultTemplate: string; } /** * Displays leaves for current calculation period. */ export declare class CalcLeavesController implements angular_2.IController { private fullApi; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; annualLeavestoBePaid: AbsencePeriod[]; annualLeavesWaitingForPayment: AbsencePeriod[]; absencesToUse: AbsencePeriod[]; absencesToReject: AbsencePeriod[]; /** Current calculation. */ calc: Calculation; /** Current worktime. */ worktime: CalcWorktime_2; /** All holiday years for employment */ employmentHolidayYears: HolidayYear[]; /** Current holiday year for employment */ currentEmploymentHolidayYear: HolidayYear; /** * Creates a new CalcReportsController * @ignore */ constructor(fullApi: HolidayYears, uiHelpers: UiHelpers); /** * Implement IController */ $onInit(): void; /** Returns final absences periods */ getAbsencesPeriods(): any; /** Loads holiday years for employment and sets current holiday year */ getHolidayYearsForEmployment(employmentId: string): Promise; /** * Moves an item between different payment lists. * @param item - The item to be moved. * @param target - The target payment list. */ moveItem(item: any, target: "annualLeavestoBePaid" | "annualLeavesWaitingForPayment"): void; /** * Moves an item between different payment lists. * @param item - The item to be moved. * @param target - The target payment list. */ moveAbsenceItem(item: any, target: "absencesToUse" | "absencesToReject"): void; /** * Determines if a given leave should be disabled based on its type and whether it's in the list of leaves to be paid. * @param {AnnualLeave} leave - The leave object to check. */ isSelectedToBePaid(leave: AbsencePeriod): boolean; /** * Determines if a given absence should be disabled based on it's in the list of absences to use. * @param {AbsencePeriod} absence - The leave object to check. */ isAbsenceSelectedToUse(absence: AbsencePeriod): boolean; /** * Determines the style for a given leave based on whether it should be disabled or not. * @param {AnnualLeave} leave - The leave object to check. */ getDisabledStyle(leave: AbsencePeriod): { "background-color": string; opacity: string; } | undefined; /** * Determines the style for a given absence based on whether it should be disabled or not. * @param {AnnualLeave} absence - The absences object to check. */ getAbsenceDisabledStyle(absence: AbsencePeriod): { "background-color": string; opacity: string; } | undefined; /** Returns daysCount sum of annualLeavestoBePaid/bonusPeriodstoBePaid depending on type parameter*/ getAccrualRemaningsToBePaid(type: "holidayPay" | "holidayBonus"): number; /** * Shows the edit dialog. * @param item AnnualLeave to edit. */ showEditDialog(item: AbsencePeriod): void; private newGuid; } /** * Shows a list of calculations * @example * ```html * * ``` */ export declare class CalcList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Filters list by given field:value */ filter: string; /** Max count of calculations to show in the list. */ limitTo: string; /** Status category for the list. Possible categories: draft, paid. Default is paid */ category: string; /** * List of statuses to include in the list. * WARNING: This may be depricated in v03: Use category and/or $filter instead. */ statusList: string; /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selections (single and multi). Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items. * @example */ onListSelect: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Type of the view. Currently supports "default", "panel" and "select" */ mode: string; /** OData query options */ options: string; /** URL to the OData service. */ url: string; /** Data passed from the parent to the component / view */ data: string; /** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */ readOnly: string; /** * CRUD controller that implements Delete and potentially other methods about the object. * If you wish to use this in the view use "as $controllerName" syntax * @example * */ crudController: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows an introduction text (instructions) for the user when user starts a new calculation. * @example * ```html * * ``` */ export declare class CalcNewIntro extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; anonOptions: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the Calculator2019Controller */ controller: typeof Calculator2019Controller; /** The default template for the component. */ defaultTemplate: string; } /** * Editor for repairing the given calculation. * @example * ```html * * ``` */ export declare class CalcRepair extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcReportController */ controller: typeof CalcRepairController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for repairing paid calculations. */ export declare class CalcRepairController extends Calculator2019Controller { private repairApi; private uiHelpersApi; private reportsApi; /** * For NG-dependency injection */ static $inject: string[]; /** Data reader for the accounting diffa data. */ accountingDiffDataReader: { /** Function to read data into given array */ read: (target: string, ruleSet: string, arr: AccountingData[]) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: () => boolean; }; excludeDiffPaths: string[]; /** Calc reports type */ shared: { reportType: string; }; private _loading; private _pendingChanges; private _accountingDiffData; private _diffCalc; private _latestCurrent; private _latestBase; private _base; private _documentFlow; private _dateRange; private _baseCfa; private _currentCfa; /** * Creates a new CalculationsProController */ constructor(repairApi: Calculations, uiHelpersApi: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, ajax: Ajax, reportsApi: Reports); /** Initialize */ $onInit(): void; /** * Finalize the repair and replace the original version with the new one. */ commitRepair(): Promise; /** * Update repair */ saveRepair(): Promise; /** * Recalculate repair */ recalculateRepair(): Promise; /** * Select taxcard for the repaired calc. */ selectTaxcard(): Promise; /** Original calculation */ get base(): Calculation | null; /** Document flow for the current calculation */ get documentFlow(): DocumentFlowItem; /** Calculation total result diff between original and current calculation. */ get diffCalc(): Calculation; /** Accounting data diff between original and current calculation. */ get accountingDiffData(): AccountingData; /** Change accounting data target */ onTargetChange(targetId?: string): void; /** Returns cfa data for base. */ get baseCfa(): any; /** Returns cfa data for current. */ get currentCfa(): any; /** Getter and setter for Calculation daterange in compatible format for new DateRange component. */ get dateRange(): DateRange_2; set dateRange(value: DateRange_2); /** * Called when the date range changes. */ dateRangeChange(): void; /** * Returns valid employment reg codes for the selected pensions company. * @returns Options for the employment reg codes. */ getEmploymentRegCodeOptions(): Array; /** Load accounting data and calculate diff. */ private loadAccountingDiffData; private diffAccountingData; private checkCalculationChange; private calculateCfa; } /** * Shows the repair info for the current calculation. * @example * ```html * * ``` */ export declare class CalcRepairInfo extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcRepairInfoController */ controller: typeof CalcRepairInfoController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for showing possible calculation repair history. */ export declare class CalcRepairInfoController extends CalculationCrudController { protected invoicesService: InvoicesService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new CalcSharingController * @ignore */ constructor(calculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService); /** * Implement IController */ $onInit(): void; /** Shows a selection list for repaired calculations */ showRepaired(): Promise>; } /** * Shows the report for the given calculation. * @example * ```html * * ``` */ export declare class CalcReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation for the report. */ calc: string; /** Calculation report type (for example: salarySlip, employerReport or paymentReport) */ reportType: string; /** Template for the report (for example: salarySlipV2, employerReportV2, paymentReportV2 ) */ templateName: string; /** If true, uses the current style of the site. The default value is false. */ applySiteStyles: string; /** The language for report*/ lang: string; /** If true, adds the preview watermark to the report */ preview: string; /** Called when the report type has been changed. */ onReportTypeChange: string; }; /** Uses the CalcReportController */ controller: typeof CalcReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Renders a calculation report or a calculation summary report for the given calculation(s). * Uses Handlebars templates (@salaxy/reports). */ export declare class CalcReportController implements angular_2.IController { private templates; private ajax; private $sce; private settingsService; private $timeout; private sessionService; private reportsApi; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The calculation(s) for the report. Todo add Calcs*/ calc: Calculation | Calculation[]; /** Template for the report */ templateName: string; /** Boolean indicating if the refresh is in progress. */ refreshInprogress: boolean; /**Selected report language */ lang: Language; /** If true, adds the preview watermark to the preview. */ preview?: boolean; /** * Function that is called when the report type has been changed * Function has the following locals: reportType: the selected report type. */ onReportTypeChange: (params: { /** Selected reportType */ reportType: ReportType | calcReportType; }) => void; /** Ref to used SxyTable */ $sxyTable: SxyTableController; /** The type for the calculation report. */ private _reportType; private renderedCalc; private renderedOptions; private renderedLang; private htmlData; private reportOptions; private reportData; private isXslLoading; private xslText; private sxyTableConfig; /** * Creates a new CalcReportController * @ignore */ constructor(templates: Templates, ajax: Ajax, $sce: angular_2.ISCEService, settingsService: SettingsService, $timeout: angular_2.ITimeoutService, sessionService: SessionService, reportsApi: Reports, uiHelpers: UiHelpers); /** * Implement IController */ $onInit(): void; /** The type for the calculation report. */ get reportType(): ReportType | calcReportType; /** The type for the calculation report. */ set reportType(value: ReportType | calcReportType); /** Bindable and trusted html. */ get html(): any; /** * Config for SxyTable */ get tableConfig(): { options: SxyTableOptions; include: ColumnDefinition[]; data: any[]; }; /** * Method used to refresh table config */ refreshTableConfig(): Promise; private refreshESalaryXml; private resolveCumulativeCalculation; /** * Refresh calculation report data. */ private refresh; private getDefaultReportOptions; private getDefaultLanguage; } /** * Shows the salary reports for the given calculations. * @example * ```html * void; /** Report type */ private _reportType; private employerLang; private workerLangs; /** Report templates and the currently selected template */ private reports; private sxyTableConfig; private _epr; /** * Creates a new CalcReportsController * @ignore */ constructor(ajax: Ajax, uiHelpers: UiHelpers, sessionService: SessionService, $timeout: angular_2.ITimeoutService, $http: angular_2.IHttpService, reportsApi: Reports, calculationsApi: Calculations); /** * Implement IController */ $onInit(): void; /** Sets reportLang and refreshes table if $sxyTable exists */ setReportLang(lang: Language): Promise; /** * Get lang for employer reports * @returns language for calculation */ getEmployerLang(): Language; /** * Get lang for worker reports * @param calc selected calculation * @returns language for calculation */ getWorkerLang(calc: Calculation): Language; /** The type for the calculation report. */ get reportType(): ReportType | calcReportType; /** The type for the calculation report. */ set reportType(value: ReportType | calcReportType); /** * Return languge text to ui */ get languageText(): "SALAXY.ENUM.Language.fi.label" | "SALAXY.ENUM.Language.en.label" | "SALAXY.ENUM.Language.sv.label" | "SALAXY.NG1.CalcReportsComponent.reportLanguageWorker" | "SALAXY.NG1.CalcReportsComponent.reportLanguageCompany"; /** * Exports tabulator based reports data as excel file */ downloadExcel(): Promise; /** * Shows a download dialog for the given calculations. * @param inline - If true, the download link opens the pdf into a new web page. */ showDownloadDialog(inline?: boolean): void; /** Reloads the current report */ reload(): void; /** Loads epr for the calculation */ loadEpr(calc: Calculation): irepr.EarningsPayment; /** * Config for SxyTable */ get reportTableConfig(): { options: SxyTableOptions; include: ColumnDefinition[]; data: any[]; }; private refreshTableConfig; private getDefaultLanguage; private checkForEprChange; } /** * Handles user interaction for displaying calculation */ export declare class CalcReportsDisplayController implements angular_2.IController { private uiHelpers; private calculations; static $inject: string[]; /** * Creates a new instance of CalcReportsDisplayController * @param uiHelpers - Salaxy ui helpers service. */ constructor(uiHelpers: UiHelpers, calculations: Calculations); /** * Display CalcReports * @param reportType Report type * @param calculation BusinessObject */ display(reportType: calcReportType, calculation: Calculation): void; /** * Display CalcReports * @param reportType Report type * @param calculationId BusinessObject id */ displayForId(reportType: calcReportType, calculationId: string): Promise; } /** * Report types that are available for calculations as stand-alone (typically pop-up dialog) */ declare type calcReportType = "salarySlip" | "employerReport" | "paymentReport" | "paymentSummaryReport" | "accountingReport" | "totalsReport" | "rowsReport" | "irRows"; /** * Shows the results view for the Calculator * @example * ```html * * ``` */ export declare class CalcResults extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; anonOptions: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the Calculator2019Controller */ controller: typeof Calculator2019Controller; /** The default template for the component. */ defaultTemplate: string; } /** Amount input */ declare interface CalcRowAmountConfig { /** Label for the input */ label?: string | null; /** Default value */ default?: number | null; /** Type of the input control to use */ input?: CalcRowConfigNumberInput | null; /** Default unit. */ unit?: CalculationRowUnit | null; /** Allowed units. If not set, only default unit allowed. */ units?: CalculationRowUnit[] | null; } /** Configuration for user interface of a Calculation row type: Either built-in or custom. */ declare interface CalcRowConfig { /** Name / unique identifier of the row type. */ name?: string | null; /** The built-in row type */ rowType?: CalculationRowType | null; /** The type string, e.g. "/builtIn/salary" or "/custom/boardMember" */ type?: string | null; /** Order number in the lists */ order?: number | null; /** Label for the row type */ label?: string | null; /** Description for the row type */ descr?: string | null; /** More info HTML */ moreInfo?: string | null; /** Categorization of the row types. */ category?: CalculationRowCategory | null; /** 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 | null; /** 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 | null; /** If the row has a kind selection (the main subtype), definition of the subtypes. */ kind?: CalcRowKindsConfig | null; /** 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?: CalcRowConfigTypeGroup | null; /** Price input */ price?: CalcRowPriceConfig | null; /** Amount input */ amount?: CalcRowAmountConfig | null; /** The total input or read-only field. */ total?: CalcRowTotalConfig | null; /** This is only info field for ui */ incomeTypes?: number[] | null; /** Scripts for the type. */ scripts?: CalcRowScriptConfig[] | null; } /** CalcRowConfigNumberInput enumeration */ declare enum CalcRowConfigNumberInput { Number = "number", Hidden = "hidden", ReadOnly = "readOnly" } /** CalcRowConfigTypeGroup enumeration */ declare enum CalcRowConfigTypeGroup { BuiltIn = "builtIn", Custom = "custom" } /** * Shows the cost accounting details for the calculation row. * @example * ```html * * ``` */ export declare class CalcRowCostAccounting extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Calculation for the row. */ calc: string; /** The calculation row. */ row: string; /** Forced read only state */ readOnly: string; /** * Optional CostAccountingDimensionDefinitions * If not set, cost accounting dimensions and their options are read from the settings. */ dimensions: string; }; /** Uses the CalcRowCostAccountingController */ controller: typeof CalcRowCostAccountingController; /** The default template for the component. */ defaultTemplate: string; } /** * Handles the user interaction for entering cost accounting data for the calculation row. */ export declare class CalcRowCostAccountingController extends CostAccountingController { /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The calculation for row */ calc: Calculation; /** Current row */ row: UserDefinedRow; /** * Creates a new CalcCostAccountingController * @ignore */ constructor(sessionService: SessionService); /** * Implement IController */ $onInit(): void; /** * Returns true if the current calculation is read only. */ get isReadOnly(): boolean; /** Returns the cost accounting model type */ get isLegacy(): boolean; /** Returns total cost center percentage */ getLegacySum(): number; /** Returns current costCenter. */ get costCenter(): any; } /** * Represents a component for handling dimension input in a calculation row. * @example * ```html * * ``` */ export declare class CalcRowDimensionInput extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Currently edited row */ row: string; /** Dimension definition. */ definition: string; /** Possible inherited dimensions values from upper lever (e.g. calc level to rows) */ inherited: string; /** Forced read only state */ readOnly: string; /** * Style of the inputs. * Supports empty or 'openClose'. Only available when not readOnly */ inputMode: string; }; /** Uses the CalcRowDimensionInputController */ controller: typeof CalcRowDimensionInputController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for handling row dimension input in the CalcRowsEditor. */ export declare class CalcRowDimensionInputController implements angular_2.IController { private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Currently edited row */ row: UserDefinedRow; /** Current dimension defition */ definition: CostAccountingDimensionDefinition; /** Possible upper level (e.g. calculation) dimensions that are inherited */ private _inherited; /** Bindable read-only */ readOnly?: boolean; /** * Style of inputs. * If null or empty, displays normal input. * - "openeClose" shows readOnly-like input with toggle button to open the field for editing. */ inputMode: "" | "openClose"; private _options; private _newDimensions; constructor(uiHelpers: UiHelpers); /** Copy of inherited dimensions */ get inherited(): CostAccountingDimension[]; /** Copy of inherited dimensions */ set inherited(value: CostAccountingDimension[]); /** * Returns true if the dimension values are inherited. */ isInherited(): boolean; /** * Determines if cost sharing is enabled based on the current definition. * @returns {boolean} True if cost sharing is allowed, otherwise false. */ isCostSharingEnabled(): boolean; /** * Retrieves the cost sharing values for the current row dimension. * This method uses a caching mechanism to store the computed values for performance optimization. It truncates the text values to a maximum of 10 characters, appending "..." if the text exceeds this length * If the dimension is inherited, it filters and maps the inherited dimensions to the required format. Otherwise, it uses the current row's accounting dimensions. */ getCostSharingValues(): { text: string; value: number; }[]; /** * Returns inherited single value. */ getInheritedSingleValue(): CostAccountingDimension | undefined; /** * Sets single value. */ setSingleValue(value: any): void; /** * Returns single value. */ getSingleValue(): CostAccountingDimension | undefined; /** * Returns true if options exists for the dimension. * @returns True, if an option exists for the value. */ hasOptions(): boolean; /** * Returns available options for dimension. */ getOptions(): { /** Option value. */ value: any; /** Option text. */ text: string; /** Option description. */ title?: string | undefined; }[]; private cleanDimensions; private modifyOptions; } /** * Generates documentation and examples for given row (UserDefinedRow) * @example * ```html * * ``` */ export declare class CalcRowDocumentation extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation row. */ row: string; }; /** Uses the CalcRowDocumentationController */ controller: typeof CalcRowDocumentationController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller responsible for handling the documentation of calculation rows. * Implements the Angular IController interface. */ export declare class CalcRowDocumentationController implements angular_2.IController { private uiHelpers; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Currently edited row */ row: UserDefinedRow; /** * An object that holds example data for the CalcRowDocumentationController. */ allExamples: RowTypeDocumentation[]; selectedKind: string; private _isLoading; tabOptions: { value: string; text: number; }[]; /** * Constructor to initialize the controller with dependencies. * @param uiHelpers - Helper utilities for UI operations. * @param $timeout - Angular's timeout service. */ constructor(uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService); /** * Lifecycle hook that is called after the controller's data-bound properties have been initialized. * Fetches example data from the CDN and updates the loading state. */ $onInit(): void; /** * Determines if the loader should be displayed. * @returns {boolean} True if the loader should be shown, false otherwise. */ showLoader(): boolean; /** * Fetches a file from the CDN. */ fetchExamplesFromCdn(): Promise; /** * Gets the description text for the current example type. */ get example(): RowTypeDocumentation | undefined; /** * Generates a local example for the current row type and selected kind. * This method: * 1. Checks if there is a valid row to generate an example for * 2. Determines if the row has a kind configuration * 3. If conditions are met: * - Finds or creates an example for the current row type * - Removes any existing generated examples * - Creates a new sample with generated code * - Adds the sample to the examples collection * 4. Triggers Angular digest cycle via $timeout */ generateExampleLocally(): void; /** * Gets the code samples for the current row type and kind. * Results are cached based on the type and kind combination. */ get exampleSamples(): { /** Description of the sample */ description: string; /** The specific kind/variant of the sample */ kind: string; /** Code sample */ code: string; }[]; private generateCodeExample; } /** * Formula editor for a calculation row (UserDefinedRow). * @example * ```html * * ``` */ export declare class CalcRowFormula extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation row. */ row: string; }; /** Uses the CalcRowFormulaController */ controller: typeof CalcRowFormulaController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for the CalcRowFormula component that provides formula editing capabilities for calculation rows. * Used by the CalcRowFormula component to manage formula editing functionality. * @implements {angular.IController} */ export declare class CalcRowFormulaController implements angular_2.IController { private settingsService; private uiHelpers; private employments; private calculations; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Currently edited row */ row: RowTypeDefinition; /** Available properties for scripting */ scriptNames: InputEnumOption[]; selectedEmployment: Employment; selectedCalc: Calculation; /** Selected script name for addScript */ selectedScriptName: string; evalResult: string; /** * Creates a new EmbeddedUiController * @ignore */ constructor(settingsService: SettingsService, uiHelpers: UiHelpers, employments: Employments, calculations: Calculations); /** Gets the description for a script name */ getDescription(scriptName: string): string | undefined; /** Returns true if the selected script name has already been added. */ get selectedScriptAdded(): boolean; /** * Adds a new script expression to the row. * @param {string} scriptName - The name of the script to add. selectedScriptName is used if not provided. */ addScript(scriptName?: string): void; /** Name of the script that is currently edited in full-dialog editor. */ editingScript?: CalcRowScriptConfig; /** * Selects a script for editing in full-dialog editor. * @param {string} script - The script object to edit. * Undefined for closing the editor. */ editScript(script?: CalcRowScriptConfig): void; /** * Removes a script from the row. * @param {string} script - The script to remove. */ removeScript(script: CalcRowScriptConfig): void; /** * Determines if the currently edited script can be evaluated. * A script is evaluatable when all required dependencies are available: * - A selected employment is set * - A selected calculation is set * - A script is currently being edited * @returns {boolean} True if the script can be evaluated, false otherwise */ isScriptEvaluatable(): boolean; /** * Evaluates the currently edited script using a wrapped eval pattern. * The script can refer to $data (which includes sxy and settings). * @returns {*} The result of the evaluated script. */ evaluateEditingScript(): any; /** * Opens a dialog to select an existing calculation. * @returns {Promise} A promise that resolves when the dialog is closed. */ addExistingCalc(): Promise; } /** Defines a single row kind (sub type) within a row type. */ declare interface CalcRowKindConfig { /** Text value of the enumeration (lowerCamelCase). */ name?: string | null; /** Sorting order number of the value within the enum. */ order?: number | null; /** Label of the enumeration if the translations have been applied. */ label?: string | null; /** Description of the kind. */ descr?: string | null; /** Price input */ price?: CalcRowPriceConfig | null; /** Amount input */ amount?: CalcRowAmountConfig | null; /** The total input or read-only field. */ total?: CalcRowTotalConfig | null; } /** Describes the set of kinds (sub types) used by a row type. */ 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 | null; /** Values of the enumeration. */ values?: CalcRowKindConfig[] | null; } /** Price input. */ declare interface CalcRowPriceConfig { /** Label for the input */ label?: string | null; /** Default value */ default?: number | null; /** Type of the input control to use */ input?: CalcRowConfigNumberInput | null; } /** * Editor for Calculation rows / usecases. * Can be bound to a Calculation or to Employment relation. */ export declare class CalcRows2019Controller extends ListControllerBase { private $timeout; private session; private $element; private rowTypeService; private accountingTargets; private calculations; /** Bindings for components that use this controller */ static bindings: CalcRows2019ControllerBindings; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** New empty row for databinding when creating a new row. */ newRow: UserDefinedRow; /** Currently selected row in 2022 UI. */ current: UserDefinedRow; /** Title in the Table header */ title: string; /** Shows edit buttons. Used in Payroll. */ showEditButtons: boolean; /** Shows gross totals and total payment in table footer */ showGrossTotals: boolean; /** * Alternative binding for parent: Give just a stand-alone rows list. * Setting the row to an array will set these rows to the parent component * or create a new parent component if no parent component is specified. * The resolving occures in list get, so the order of setting is not an issue. */ rows: UserDefinedRow[]; /** * Propertieds and logic for the situation where the dialog is displayed as part of row type definition editor. * If undefined, this is a rows editor (typically for a calculation) and not a row type definition editor. */ definitionEditor?: { /** Mode of the definition editor. */ mode: "builtIn" | "custom" | "prices"; }; /** * If set, filters the rows based on categories (plus rowTypes if set). * Note that category error (validation errors) is added later and may not be supported by all parts of the UI. */ categories: ("salary" | "salaryCalc" | "holidays" | "salaryAdditions" | "benefits" | "expenses" | "deductions" | "other")[]; /** * Defines the helper texts and branding color for row type selection list dialog * (showRowTypeSelectionDialog method) */ rowTypeSelectHelp: "salaries" | "benefits" | "expenses" | "deductions"; /** If set, shows only these types (plus categories if set) */ rowTypes: CalculationRowType[]; /** If set, shows only the rows with these statuses. */ statuses: string[] | string; /** * If set, shows only these sources in the source drop-down. * This is a comma separated list of enum values. */ rowSources: string; /** User interface type of the editor: Default is the one used in calculators. */ type: "worktime-import" | "worktime-import-employment" | "salary-defaults" | "default"; /** If true, the current UI is a modal dialog. */ isDialog: boolean; /** Information on the usecase specific data / UI for this row. */ usecase: { isLoading?: boolean; schema?: any; isDefined?: boolean; }; /** Hides final cost row. */ hideFinalCostRow: boolean; /** Default dimension to show in rows editor */ defaultDimension: string; /** Count of dimension to show in editor */ dimensionCount: number; _dimensions: CostAccountingDimensionDefinition[]; private _vehicleTypeSelection; private _vehicleAdditions; private _dailyAllowanceRegions; /** * Creates a new CalcRows2019Controller * @param uiHelpers - Salaxy UI helpers service. * @ignore */ constructor(uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService, session: SessionService, editDialogParams: EditDialogParameters, $element: JQLite, rowTypeService: RowTypeService, accountingTargets: AccountingTargets, calculations: Calculations); /** Sets the default values in init. */ $onInit(): void; /** Yearlysidecosts for translations, used in template */ get yearlySideCosts(): { current: YearlyChangingNumbers; previous: YearlyChangingNumbers; }; /** * Marks that the editor is stand-alone, meaning that it does not edit a calculation, * but it just edits a set of rows, typically in employment or settings. * In this case the editor has creaed a fake calculation (because calculation is currently required for the row editor to work). * TODO: Consider separating Calculation rows editor from stand-alone row editor. */ get isStandAlone(): boolean; /** Copies the given text to clipboard. */ copyToClipboard(text: string): void; /** List of rows */ get list(): WorktimeImportRow[] | null; /** List filtered by categories and rowTypes. */ get filteredList(): WorktimeImportRow[] | null; /** Combines together categories and rowTypes properties as one list of row types. */ get rowTypesToShow(): CalculationRowType[]; /** Creating of a new item. */ getBlank(): UserDefinedRow; /** * Returns a validation message for a row or null if none is required. * @param row The row that is validated. */ getValidation(row: UserDefinedRow): { /** Validation message */ msg: string; /** Type of validation message */ type: "default" | "error"; } | undefined; /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; /** * Shows whether accounting editing is enabled * @returns true if accounting editing is enabled */ showAccountingEditing(): boolean; /** * Opens the accounting ruleset selection dialog * @param isDebit - Whether to set debit account (true) or credit account (false) * @returns Promise that resolves when the dialog is closed */ openAccountingRulesetSelection(isDebit: boolean): Promise; /** * Shows a preview of the accounting report for the currently selected row. * Creates a calculation with only the current row, recalculates it, and opens * a dialog to display the accounting report query. * @returns Promise that resolves when the dialog is closed * @throws {Error} If no current row is selected or if recalculation fails * @example * // Show accounting preview for the current row * await this.showRowAccountingPreview(); */ showRowAccountingPreview(): Promise; /** checks if the image fileUrl given in the cost line is not a blob (omapalkka image upload adds blob) */ showImagePreview(): boolean; /** * Gets the UX configuration for a row. * @param row Row for which the config is fetched. * If not set, gets the config for current. */ getConfig(row?: UserDefinedRow): CalcRowConfig | undefined; /** * Gets the placeholder text for an input. */ getPlaceholderText(row: UserDefinedRow, field: "amount" | "price"): string | null | undefined; /** * Return the total for the row */ getRowTotal(row: UserDefinedRow): number | null | undefined; /** * Returns true, if the row is disabled. The row is interpreted as disabled if it has no rowType * or it has been set as hidden in the configuration. * @param row Row to check * @param field Type of the input / field. */ isDisabled(row: UserDefinedRow, field: "amount" | "price"): boolean; /** * Updates the compensation row with the calculated price based on the unit type. * @param row - The row containing both the main row price and compensation row data. */ updateCompensationRow(row: UserDefinedRow): void; /** Row type changes on a row */ rowTypeChanged(row: UserDefinedRow): void; /** * Commits the new row in newRow property and adds it to the rows list. * Updates usecase and sets the newRow as new blank row. */ commitNewRow(showEdit?: boolean): UserDefinedRow; /** Shows the selection dialog for the row type. */ showRowTypeSelectionDialog(): void; /** Updates the usecase property values without going to server. */ updateUsecase(row: UserDefinedRow): void; /** * Returns the usecase logic instance for current row, also running the first update cycle on the row. */ getUsecaseLogic(row: UserDefinedRow): BaseUsecaseLogic; /** * Gets vehicle type selections from usecase * @returns InputEnumOption[] of vehicle selections */ getVehicleTypeSelection(): InputEnumOption[]; /** * Gets vehicle additions from usecase * @returns InputEnumOption[] of vehicle additions */ getVehicleAdditions(): InputEnumOption[]; /** * Gets the regions for InternationalDailyAllowance as of today */ get dailyAllowanceRegions(): InputEnumOption[]; /** * Gets the Incomes Register metadata for a calculation row. * @param row Row to check, null for current row. * @returns The income type metadata. Empty object for empty row or empty irData. */ getIrCodeData(row?: UserDefinedRow): {} | undefined; /** Return the metadata based on irCode */ getIrCodeDataWithCode(irCode: number): IncomeTypeMetadata; /** Returns true if the filtered list has any rows. */ get hasRows(): boolean; /** Gets the total for the current rows. */ getTotal(): number; /** * Gets the gross total for the calculation. * Current implementation does not support filtering. */ getGrossTotal(): number | null | undefined; /** * Gets the total payment for the calculation. * Current implementation does not support filtering. */ getFinalCost(): number | null | undefined; /** * Gets the net salary for the calculation. * Current implementation does not support filtering. */ getNetSalary(): number | null | undefined; /** * Gets the total payment that is paid to palkkaus.fi. * Current implementation does not support filtering. */ getTotalPayment(): number | null | undefined; /** * Closes the edit dialog (either modal dialog or inline). * @param method The closing method. * @param $close In the case of modal dialog, this is the modal dialog close method. */ closeEditDialog(method: "cancel" | "ok-no-save" | "delete-no-save", $close?: any): void; /** * Shows the editor UI that may either be a dialog or an inline edit UI. * @param item Item to edit. If rowIndex is null/undefined, the item is considered a new row and the properties * extend new item (fetched from getBlank()). * @param type Type of the edit UI. */ showEdit(item: UserDefinedRow, type?: "dialog" | "inline" | "auto"): void; /** * Shows the edit dialog: Extends the base functionality with custom controller (non-supported results removed). * @param item Item to edit or string "new" for creating a new one. * @param isNew Optional way of specifying that the item is a new item (with default values, not yet added to the list). * If item is string "new", this parameter will have no effect (will always be true). */ showEditDialog(item: UserDefinedRow | "new", isNew?: boolean): void; /** * Gets or sets the flag telling whether the component is in edit or read-only mode. */ get isInEdit(): boolean; set isInEdit(value: boolean); /** * Changes the view from read-only mode to edit mode. */ startEdit(): void; /** * Returns placeholder text for row * @param row used row * @returns row message as string */ getMessagePlaceholderText(row: UserDefinedRow): string; /** Initializes and returns the unit for the row. */ ensureUnit(row: UserDefinedRow): CalculationRowUnit; /** * Select a row in the list or unselect if already selected. * @param row Row to select or "all" to select all currently vivisble rows. * @param value Optional value to force selection true or false regardless of the current state. */ toggleSelectedRow(row: WorktimeImportRow | "all", value?: boolean): void; /** * Gets the selected rows in the list (only the filtered / visible rows). * @returns The selected rows. */ getSelectedRows(): WorktimeImportRow[]; /** * Determines the visibility of dimensions based on certain conditions. * @returns {boolean} - Returns `true` if dimensions should be visible, otherwise `false`. */ showDimension(): boolean; /** * Returns the number of dimensions to show. * @returns {number} The number of dimensions to show. If `dimensionCount` is not defined, returns 0. */ dimensionsCountToShow(): number; /** * Retrieves the dimensions to show based on the session settings and predefined rules. * This method filters the available dimensions to exclude hidden ones and includes * those that match specific scope criteria. It prioritizes adding the default dimension * and cost center first, followed by the remaining dimensions until the limit defined * by `dimensionsCountToShow` is reached. * @returns {CostAccountingDimensionDefinition[]} An array of dimensions to be displayed. */ getDimensionsToShow(): CostAccountingDimensionDefinition[]; private formatYearlyNumbers; } declare class CalcRows2019ControllerBindings extends ListControllerBaseBindings { /** Sets the title in the table header. */ title: string; /** Shows edit buttons. Used in Payroll. */ showEditButtons: string; /** Shows gross totals and total payment in table footer */ showGrossTotals: string; /** * Alternative binding for parent: Give just a stand-alone rows list. * Setting the row to an array will set these rows to the parent component * or create a new parent component if no parent component is specified. */ rows: string; /** If set, filters the rows based on categories (plus rowTypes if set) */ categories: string; /** If set, filters the rows based on statuses (Worktime rows only) */ statuses: string; /** * Defines the helper texts and branding color for row type selection list dialog. * Null for default "primary" (no texts) */ rowTypeSelectHelp: string; /** If set, shows only these types (plus categories if set) */ rowTypes: string; /** * If set, shows only these sources in the source drop-down. * This is a comma separated list of enum values. */ rowSources: string; /** * Optional CostAccountingDimensionDefinitions * If not set, cost accounting dimensions and their options are read from the settings. */ dimensions: string; /** * User interface type of the editor: "default" is the one used in calculators. * "worktime-import" is used in editing worktime import (contains employment relation). * "worktime-import-employment" is used in editing worktime import (no employment, contains period). * "salary-defaults" is used behind empoloyment to specify defaults (also in the settings). */ type: string; /** Hides final cost row. */ hideFinalCostRow: string; /** * Propertieds and logic for the situation where the dialog is dispalyed as part of row type definition editor. */ definitionEditor: string; /** Default dimension id to show in rows editor */ defaultDimension: string; /** Count of dimension to show in editor */ dimensionCount: string; /** In supported modes, shows the rows selection checkboxes */ showRowSelection: string; } /** * Shows a grid-type rows editor for addding calculation rows: Salaries, expenses, benefits etc. * @example * ```html * * ``` */ export declare class CalcRows2019Editor extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { title: string; showEditButtons: string; showGrossTotals: string; rows: string; categories: string; statuses: string; rowTypeSelectHelp: string; rowTypes: string; rowSources: string; dimensions: string; type: string; hideFinalCostRow: string; definitionEditor: string; defaultDimension: string; dimensionCount: string; showRowSelection: string; parent: string; onCommit: string; onReset: string; onStartEdit: string; isInEdit: string; mode: string; }; /** Uses the CalcRows2019Controller */ controller: typeof CalcRows2019Controller; /** The default template for the component. */ defaultTemplate: string; } /** Property script configuration for a calculation row. */ declare interface CalcRowScriptConfig { /** Name of the property. */ name?: string | null; /** Optional kind for types with kind. */ kind?: string | null; /** Script for the property. */ script?: string | null; } /** * Shows a mobile friendly rows editor for addding calculation rows: Salaries, expenses, benefits etc. * @example * ```html * * ``` */ export declare class CalcRowsEditor extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { title: string; showEditButtons: string; showGrossTotals: string; rows: string; categories: string; statuses: string; rowTypeSelectHelp: string; rowTypes: string; rowSources: string; dimensions: string; type: string; hideFinalCostRow: string; definitionEditor: string; defaultDimension: string; dimensionCount: string; showRowSelection: string; parent: string; onCommit: string; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ onReset: string; onStartEdit: string; isInEdit: string; mode: string; }; /** * The "footer" is at the bottom of the rows list where "Add new row" buttons would typically be. */ transclude: { footer: string; }; /** Uses the CalcRows2019Controller */ controller: typeof CalcRows2019Controller; /** The default template for the component. */ defaultTemplate: string; } /** * Provides business logic for Calculation rows: * How to create user interfaces, reports etc. based on them and their categories. */ 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 | undefined; /** * Gets an indicator string (1-2 characters) for a unit. * @param unit Unit that should be described. * @returns Given unit indicator or undefined if none is matched (convert to empty string if necessary). */ static getUnitIndicator(unit: CalculationRowUnit | Unit | string | undefined, language?: Language | undefined): string | undefined; /** Gets the row configuration for row type "unknown". */ static getUnknownConfig(): CalcRowConfig | undefined; /** 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 | undefined; /** * 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; } /** The total input or read-only field. */ declare interface CalcRowTotalConfig { /** Type of the input control to use */ input?: CalcRowConfigNumberInput | null; } /** * Select component for Calculations row types. * @example * ```html * * ``` */ export declare class CalcRowType extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Type of the input element. Options are typeahead and list (select, search-list and radio may be supported later). */ type: string; /** If set, filters the rows based on categories (plus rowTypes if set) */ categories: string; /** If set, shows only these types (plus categories if set) */ rowTypes: string; /** Name and identifier of the typeahead input */ name: string; /** * Placeholder text in the typeahead input. * Default is 'SALAXY.UI_Terms.select'. */ placeholder: string; /** The calculation row that this component modifies. */ model: string; /** * Function that is called after the row type and potentially kind and message have been changed. * @example */ onRowChanged: string; /** If true, the list will show all the children under each parent that is shown */ showChildren: string; /** Normally (default true), the selected value is cleared and a row is created/added, but in some cases (false) the value is saved as-is (and not cleared - the typical typeahead element behaviour). */ clearOnSelect: string; }; /** Uses the InputCalcRowTypeController */ controller: typeof CalcRowTypeController; /** The default template for the component. */ defaultTemplate: string; } /** * UI logic for changing the row type and potentially the kind for UserDefined row in calculation. * Note that changing the type may change the message of the row as well: * In the future, usecase defaults may also be changed. */ export declare class CalcRowTypeController implements angular_2.IController { private session; private uiHelpers; private rowTypeService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Type of the input element. Default is typeahead. */ type: "typehead" | "list" | "read-only"; /** If set, filters the rows based on categories (plus rowTypes if set) */ categories: CalculationRowCategory[]; /** If set, shows only these types (plus categories if set) */ rowTypes: CalculationRowType[]; /** Name and identifier of the typehead input */ name: string; /** * Placeholder text in the typeahead input. * Default is 'SALAXY.UI_Terms.select'. */ placeholder: string; /** * If true, the list will show all the children under each parent that is shown as a direct hit. */ showChildren: boolean; /** * Function that is called after the row type and potentially kind and message have been changed. * @example */ onRowChanged: (eventData: { /** New item which was created. */ row: UserDefinedRow; }) => void; /** The calculation row that this component modifies. */ model: UserDefinedRow; /** * The default number of items that is returned from the typeahead search list. * Default is 50. */ top: number; private _internalValue; private modelRowType; private modelType; private modelDataKind; private listCache; constructor(session: SessionService, uiHelpers: UiHelpers, rowTypeService: RowTypeService); /** Sets the default values in init. */ $onInit(): void; /** * Detects the changes in the model properties "rowType" and "data.kind" * and reflects them to internalValue. */ $doCheck(): void; /** * Internal value from view to the controller. This is one of the numerations returned by getList() * if model has been set and it matches to oneof those values. */ protected get internalValue(): InputEnumOption; protected set internalValue(val: InputEnumOption); /** * Gets the list of row types according to options: * This list changes and is cached based on role (household/company), language, * rowTypes and categories. Currently the same as search(null), but cached. */ getList(): InputEnumOption[]; /** * Gets the search as cached item: Can be bound to ng-repeat. * @param searchText The search text. If null or empty, returns the full list. */ getCachedSearch(searchText: string): InputEnumOption[]; /** * Searches the row types. * @param searchText The search text. If null or empty, returns the full list. * @param ignoreTop If true, ignores the this.top setting to return only top n items of the search * @param showChildren Forces the showChildren value to true for this run. * By default, children are only shown if they match the search. */ search: (searchText: string, ignoreTop?: boolean, showChildren?: boolean) => InputEnumOption[]; /** Gets a label for the given internal value. */ getRowLabel(rowTypeKey: string): string | null | undefined; /** * Shows a dilaog that contains information about the row type. * @param rowType The row type to show information about. */ showInfoScreen(rowType: InputEnumOption): void; /** * Gets the list of row types. Method filters based on rowTypes and categories, * the texts are language versioned and there is a role filter for "household"/"company". */ private getRowTypes; } /** * Shows the sharing control for the current calculation * @example * ```html * * ``` */ export declare class CalcSharing extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** If true, template shows option to share direct link to the calculation. Currently used only in Rakennusliitto site. */ showLinkSharing: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcSharingController */ controller: typeof CalcSharingController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for sharing the calculation between worker and employer. */ export declare class CalcSharingController extends CalculationCrudController { private sharingCalculationsApi; private employmentsApi; private onboardingService; private taxcards; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Employing relations for the current account */ employingRelations: ApiListItem[]; /** True, if the current link has been copied to the clipboard */ uriCopied: boolean; /** If true, template shows option to share direct link to the calculation. Currently used only in Rakennusliitto site. */ showLinkSharing: boolean; /** Web sharing targets */ webSharingTargets: { email: { title: string; icon: string; action: () => void; }; whatsApp: { title: string; icon: string; getUrl: () => string; }; telegram: { title: string; icon: string; getUrl: () => string; }; }; /** Web sharing targets */ mobileSharingTargets: { email: { title: string; icon: string; action: () => void; }; device: { title: string; icon: string; action: () => Promise; }; }; /** Loading indicator. */ isSharingType: string; /** * Creates a new CalcSharingController * @ignore */ constructor(sharingCalculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService, employmentsApi: Employments, onboardingService: OnboardingService, taxcards: Taxcards); /** * Implement IController */ $onInit(): void; /** Show sharing page for the current calculation. */ showSharing(action?: string): Promise; /** * Shares the current calculation. * @param type Type of the sharing action or link. * @param employer List item for employer to share the calculation with. Mandatory in Direct share. * @returns Sharing object of the calculation. */ share(type?: SharingUriType, employer?: ApiListItem): Promise; /** * Loads employing relations of the existing employers for the current account. * @param options OData query options. */ loadEmployingRelations(options?: ODataQueryOptions): Promise; /** * Returns validation for current calculation or empty validation object if the calculation has not been recalculated (validated). */ get validation(): ApiValidation; /** Returns the employer for the given id using employing employers as a source */ get employer(): any; /** Returns email address for current accoount */ get cc(): string; /** Copies link to clipboard */ copyUri(): void; /** Returns true if the given typing is just processing sharing */ isSharing(type: string): boolean; /** Returns true if the navigator.share -function exists. */ get isMobileSharingEnabled(): boolean; /** Whatsapp-link */ private getWhatsAppUrl; /** Telegram-link */ private getTelegramUrl; /** Mobile sharing */ private shareInMobile; private showEmailSharing; private createSharingMessage; private sendSharingEmail; private getSharingMessage; private getSharingTitle; /** * Shows an alert if the signature is missing. */ private showMissingSignatureAlert; } /** * Shows the current status of sharing for the calculation * @example * ```html * * ``` */ export declare class CalcSharingInfo extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the CalcSharingController */ controller: typeof CalcSharingController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows the sharing receipt action control for the given calculation id. * @example * ```html * * ``` */ export declare class CalcSharingReceiptAction extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** Sharing action (approve or reject) */ type: string; /** Disables the control. */ disabled: string; /** Optional style class to use for button. Defaults to 'btn-block btn-sm' */ buttonClass: string; /** Shows only icon in button. Used in compact views, i.e. panels */ iconOnly: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcSharingReceiptActionController */ controller: typeof CalcSharingReceiptActionController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for sharing actions: accept, decline */ export declare class CalcSharingReceiptActionController extends CalculationCrudController { protected invoicesService: InvoicesService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new CalcSharingController * @ignore */ constructor(calculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService); /** * Implement IController */ $onInit(): void; /** Approve the the calculation requested by the worker. */ approve(): Promise; /** Reject the the calculation requested by the worker. */ reject(): Promise; } /** * Component for showing tabulator based report of ir rows of given calculations * @example * ```html * ; private getDefaultLanguage; } /** Tax card information stored as part of the Calculation object */ 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. */ 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_2 | 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). */ 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. */ 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_2[] | null; } /** * The new ApiCrudObject type of CRUD controller for the calculations. */ export declare class CalculationCrudController extends ApiCrudObjectController { private calculationsApi; protected reportsService: ReportsService; protected sessionService: SessionService; protected invoicesService: InvoicesService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * If true, will also update the calculation rows from employment relation when the employment * relation is selected. Note that this value is true by default for historical reasons. */ updateRows: boolean; constructor(calculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService); /** * Initialization code. */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Recalculates the current calculation */ recalculate(): void; /** * Gets the URL for a calculation pdf. * If report has not been saved (ID is null), returns null.s * @param calc - Calculation. This method requires that the calculation has been saved. * @returns Url for specified report */ getPdfUrl(calc: Calculation): string | null; /** * If true, this is a new unsaved object. * Adds "new-for-employment" actions as new item. */ isNew(): boolean; /** * Starts the reload process depending on the bindingMode: * Overrides a different load process for "new-for-employment". */ reload(): Promise; /** * Creates a copy of a given item. * This is a synchronous method that should basically convert a saved item to a new item. * @param copySource Item (container item) to copy as new. */ copyItem(copySource: Calculation): Calculation; /** Shows the paymentd dialog / the invoices UI. */ showPaymentDialog(): void; /** Shows inspection dialog for invoices of paid calculation*/ showInvoicesDialog(): void; /** * Updates the calculation from Employment ID by deleting all the rows and re-setting the employment. * @param employmentId Employement Id to set. * If null, the employment Id already in calculation is used: * This method cannot be used to remove the Worker (extend if necessary). * @param updateRows If true, updates also the calc rows from the default rows in * employment relation. If false, the rows are kept as is. * @returns The Calculation after recalc (no saving). */ updateFromEmployment(employmentId: string | undefined, updateRows: boolean): Promise; /** * Cancels the payment or invoice processing for the current calculation. */ cancel(): Promise; /** * Opens the list for selecting a new paid calculation for repair. * @param onAfterAction Function to call after the action. * @param calcId Optional ID of the calculation to repair. */ launchCreateRepair(onAfterAction: () => Promise, calcId?: string): Promise; /** * If true, the form controls should be read-only (no control at all). */ get isReadOnly(): boolean; /** * Returns true if there is no net salary payment to worker at all. */ get isCurrentZeroPayment(): boolean; private setDefaultPaymentChannel; /** * HACK: This will be removed after moved to useCase based calculators. * Temporary redirecting to correct details view. * TODO: Should be replaced with full usecase logic based implementation. */ showDetails(item: Calculation | CalculationListItem): angular_2.ILocationService; /** Shows the earnings payment report for the epr. */ showEpr(item: Calculation | CalculationListItem): Promise; } /** Calculation specific business data for index. */ 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; /** The original id the calculation which this calculation is a copy of. */ originalId?: 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; /** The requested salary date. */ inputSalaryDate?: string | null; /** Defines the re-setting of the salary date in the calculation re-calculation. */ salaryDateKind?: SalaryDateKind | null; /** Last date and time when this calculation was repaired after payment. */ repairedAt?: string | null; } /** * CalculationEditorController used to handle EPR actions * This controller extends ApiCrudObjectController (via CalculationCrudController). */ export declare class CalculationEditorController extends CalculationCrudController { protected uiCrudHelpers: UiCrudHelpers; protected invoicesService: InvoicesService; private reportsApi; private ajax; /** Bindings for components that use this controller */ static bindings: {}; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Flags to indicate if the request is in progress */ loaders: any; /** Indicates if the details sidebar is open */ isRightSidebarOpen: boolean; /** Data reader for the accounting diffa data. */ accountingDiffDataReader: { /** Function to read data into given array */ read: (target: string, ruleSet: string, arr: AccountingData[]) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; showExpand: boolean; hasRows: () => boolean; }; /** Status for diff data . */ private accountingDiffDataStatus; private _accountingDiffData; private _diffCalc; private latestCurrent; private latestBase; private pendingAccountingDiffData; private _documentFlow; private _state; private baseCalc; private versionId; constructor(calcApi: Calculations, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, reportsApi: Reports, ajax: Ajax); /** * Initializes the controller */ $onInit(): void; /** Calculation total result diff between original and current calculation. */ get diffCalc(): Calculation; /** Accounting data diff between original and current calculation. */ get accountingDiffData(): AccountingData; /** Document flow for the current calculation */ get documentFlow(): { item: ApiListItem; children: any[]; }; /** * Returns validation for calculation */ get validation(): ApiValidation | null | undefined; /** * Starts the reload process depending on the bindingMode: */ reload(): Promise; /** Load accounting data and calculate diff. */ loadAccountingDiffData(targetId?: string): void; /** * Change base calculations */ changeBase(): void; /** * Refreshes the calculation using the server side logic. * @param refresh Option for refresh. */ refresh(refresh?: string): void; /** * Saves the edited readonly calculation. */ saveEdited(): void; private _dateRange; /** Getter and setter for Calculation daterange in compatible format for new DateRange component. */ get dateRange(): DateRange_2; set dateRange(value: DateRange_2); /** * Called when the date range changes. */ dateRangeChange(): void; private get base(); /** * Returns valid employment reg codes for the selected pensions company. * @returns Options for the employment reg codes. */ getEmploymentRegCodeOptions(): Array; private diffAccountingData; private onCalculationChange; } /** CalculationFlag enumeration */ 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. */ 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. */ 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; /** Unit for the row */ unit?: CalculationRowUnit | 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** * Shows the calculation report builder for ad hoc calculation reports. * @example * ```html * * ``` */ export declare class CalculationReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Template for the report */ templateId: string; }; /** Uses the CalculationReportController */ controller: typeof CalculationReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for calculation reports. */ export declare class CalculationReportController extends ConfigurableGridReportControllerBase { private reports; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Usecase uri for report templates */ usecaseUri: string; /** Current grid options. */ gridOptions: any; /** ID for the element containing grid. */ gridElmentId: string; /** Default templates */ defaultTemplates: ({ id: string; owner: null; label: string; config: null; isReadOnly: boolean; avatar: { initials: string; entityType: LegalEntityType; color: string; }; } | { id: string; owner: null; label: string; config: {}; isReadOnly: boolean; avatar: { initials: string; entityType: LegalEntityType; color: string; }; })[]; constructor(datasets: Datasets, uiHelpers: UiHelpers, sessionService: SessionService, reports: Reports, $timeout: angular_2.ITimeoutService); /** * Initialize controller values. */ $onInit(): void; /** * Processes and sets the data. */ setData(result: CalculationReportData): void; /** * Gets the monthly / quarterly / yearly cumulative 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, salary date or work date. * @param workers List of worker official ids. * @returns A Promise with result data. */ queryDataForPeriod(refDate: string, periodType?: PeriodType | "all", endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise; /** * Gets the cumulative data based on given set of calculations. * @param calculationIds - Calculations that are the bases for the report. * @returns A Promise with result data. */ queryDataForCalculationIds(calculationIds: string[]): Promise; private createIncomeTypesPreset; private createTotalsPreset; private createPresetCol; } /** Container for calculation report data. */ 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; } 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; } /** Statistics data calculated from the calculation result. */ 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 */ 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[]; } /** CalculationRowCategory enumeration */ declare enum CalculationRowCategory { Salary = "salary", SalaryAdditions = "salaryAdditions", SalaryCalc = "salaryCalc", Holidays = "holidays", Benefits = "benefits", Expenses = "expenses", Deductions = "deductions", Other = "other" } /** CalculationRowSource enumeration */ declare enum CalculationRowSource { Undefined = "undefined", Disabled = "disabled", ManualRow = "manualRow", WorktimeImport = "worktimeImport", PriceEmployment = "priceEmployment", PriceCompany = "priceCompany", CopyEmployment = "copyEmployment", CopyCompany = "copyCompany", CustomRowtype = "customRowtype" } /** CalculationRowType enumeration */ declare enum CalculationRowType { Unknown = "unknown", Salary = "salary", HourlySalary = "hourlySalary", MonthlySalary = "monthlySalary", TotalWorkerPayment = "totalWorkerPayment", TotalEmployerPayment = "totalEmployerPayment", TimeRatePay = "timeRatePay", 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", PayStats = "payStats", TaxAtSource = "taxAtSource", TaxWithholding = "taxWithholding", AbsencePeriod = "absencePeriod", ServiceCharge = "serviceCharge", Service = "service", Script = "script", Totals = "totals" } /** CalculationRowUnit enumeration */ declare enum CalculationRowUnit { Undefined = "undefined", Count = "count", Percent = "percent", Days = "days", Kilometers = "kilometers", Hours = "hours", Weeks = "weeks", Months = "months" } /** * Provides CRUD access for authenticated user to access a his/her own calculations */ 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 | null, to?: string | null, cc?: string | null, message?: string | null): 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 | null, cc?: string | null, message?: string | null): 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; /** * Creates a copy of an existing calculation. * @param id The ID of the calculation to copy. * @returns A Promise containing the newly created copy of the calculation. */ copy(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; /** * Starts the repair process for the calculation. * Returns a new modifiable copy of the calculation to be repaired. * @param id Calculation for which the repair is requested. * @returns A modifiable copy of the calculation to be repaired. */ startRepair(id: string): Promise; /** * Commits the repairs for the calculation. * @param calculation Calculation which contains the repaired data. * @returns A repaired version of the calculation which was repaired. */ commitRepair(calculation: Calculation): Promise; /** * Saves the repairs for the calculation. * @param calculation Calculation which contains the repaired data. * @returns The saved repair calculation. */ saveRepair(calculation: Calculation): Promise; /** * Recalculates the repair for the calculation. * @param calculation Calculation which contains the repaired data. * @returns The recalculated repair calculation. */ recalculateRepair(calculation: Calculation): Promise; /** * Returns the document flow for the given calculation. * Documentflow contains invoices, earnings payment reports, payer suymmary reports and payrolls refering to the calculation. * @param id Id of the calculation for the document flow. * @returns Document flow for the calculation. */ getDocumentFlow(id: string): Promise; } /** Settings that affect the calculation result of the salaries. */ 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, default prices and custom row types for calculations. */ salaryDefaults?: RowTypeDefinition[] | null; /** List of company employee groups. */ employeeGroups?: EmployeeGroupDefinition[] | null; } /** Defines the properties related to sharing and sending of the calculation. */ 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 */ declare enum CalculationStatus { Draft = "draft", PaymentStarted = "paymentStarted", PaymentSucceeded = "paymentSucceeded", PaymentCanceled = "paymentCanceled", PaymentError = "paymentError", PaymentWorkerCopy = "paymentWorkerCopy", WorkerRequested = "workerRequested", WorkerRequestAccepted = "workerRequestAccepted", WorkerRequestDeclined = "workerRequestDeclined", PaymentRefunded = "paymentRefunded", PaymentRepairCopy = "paymentRepairCopy", WaitingApproval = "waitingApproval", PayrollDraft = "payrollDraft", Repair = "repair", ProDraft = "proDraft", SharedWaiting = "sharedWaiting", SharedApproved = "sharedApproved", SharedRejected = "sharedRejected", History = "history", Template = "template" } /** * Calculator is the main module for creating and modifying salary calculations. * The module can be used completely anonymously without any authentication. */ 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_2): 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 | undefined; /** * 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; } /** * Year 2019 Calculator controller that is not dependent on sigleton Calculations service. * This controller extends ApiCrudObjectController (via CalculationCrudController). */ export declare class Calculator2019Controller extends CalculationCrudController { private calcApi; protected uiCrudHelpers: UiCrudHelpers; protected invoicesService: InvoicesService; private ajax; /** Component bindings */ static crudBindings: Calculator2019ControllerCrudBindings; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Type of the chart to show by default. */ chartType: string; /** Options for the behavior of the calculator when in anonymous (demo) mode. */ anonOptions: { role: "company" | "household"; }; /** Flags to indicate if the request is in progress */ loaders: any; constructor(calcApi: Calculations, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, ajax: Ajax); /** * Initialization code. */ $onInit(): void; /** Returns the current. Called currentCalc for backward compatibility with the old views. */ get currentCalc(): Calculation; /** * Gets the Sections object for the current calculation. * It keeps track of which section is currently shown and what text etc. is shown in that section. */ get calcSections(): CalculatorSections; /** * Gets or sets the isHouseholdDeductible. * This will be moved to a different location in V03, hence the abstraction. */ get isHouseholdDeductible(): boolean; set isHouseholdDeductible(value: boolean); /** * Gets or sets the taxDeductionCategory (used to be salary.taxDeductionCategories). * This will be moved to a different location in V03, hence the abstraction. */ get taxDeductionCategory(): TaxDeductionWorkCategories; set taxDeductionCategory(value: TaxDeductionWorkCategories); /** * Returns true if the calculator is in "household" mode (as opposed to default "company" mode). */ get isHousehold(): boolean; /** * If true, the given action (button) is displayed. * @param action One of the action values. * For now, validation and role based action logic is in UI. * Todo: some edge cases, i.e. isForcePayAllAllowed (for pay-button) are still in UI. */ showAction(action: CalculatorActions_2): boolean; /** * Returns true, if action (button) is disabled * TODO: Add rules based on roles and validation? Pay button logic is in UI. */ isActionDisabled(action: CalculatorActions_2): boolean; /** * Gets the first row of the calculation assuring that it exists * If there is no current calculation, the calculation is not added. */ getFirstRow(): UserDefinedRow; /** * Takes the current calculation, creates a copy of it in draft state * and sets that calculation as current. * This is done typically, when a calculation was in Paid state. */ copyAsNew(): void; /** * Reset worker in the calculations. */ resetWorker(): void; /** * Gets misc. logic calculations and operations (client side, based on rows etc.) * that affect how the user interface is rendered. */ get calcLogic(): { /** If true, calcualtion contains compensation. This is useful for customizing texts and other UI elements */ hasCompensation?: undefined; /** Expenses box total. TODO: We should see can we move this to result / server side! */ expensesTotal?: undefined; /** Sum for child care subsidy. This is shown separately in the UI. */ childCareSubsidy?: undefined; } | { /** If true, calcualtion contains compensation. This is useful for customizing texts and other UI elements */ hasCompensation: boolean; /** Expenses box total. TODO: We should see can we move this to result / server side! */ expensesTotal: number; /** Sum for child care subsidy. This is shown separately in the UI. */ childCareSubsidy: number | null; }; /** * Opens the login form for the current user * @param redirectUrl - The URL where the user is taken after a successfull login. * @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users */ signIn(redirectUrl?: string, role?: string): void; /** * Opens the login dialog with signUp / register functionality * @param redirectUrl - The URL where the user is taken after a successfull login * @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users */ register(redirectUrl?: string, role?: string): void; /** * Shows a report for the current calculation using a modal dialog. * @param reportType - Type of report to show */ showReportDialog(reportType: calcReportType): void; /** * Deletes the currently selected calculation */ deleteCalc(path: string): void; /** * Recalculates the current calculation using the API. * @returns A Promise with result data (Calculation) */ recalculate(): Promise; /** * Sets the current item as the given object (reference to a new object). * This also resets the original item and sets the state as loaded. * Override also sets either employer or worker based on the current role. * @param item The new current item. */ setCurrentRef(item: Calculation): void; /** Overrides the save method to allow anonymous saving to local storage */ save(): Promise; /** * Returns validation for current calculation or empty validation object if the calculation has not been recalculated (validated). */ get validation(): ApiValidation; /** Returns date range text. */ getDatesRangeText(): string; /** Returns household usecase text */ getUsecaseText(): string; /** Returns true if the payment is possible when the employer pays all. */ get isForcePayAllAllowed(): boolean; /** * Shows a dialog for adding a new Employment relation. * If user goes through the wizard the employment relation is saved and set to the calculation. */ showNewWorkerDialog(): void; /** * Shows a dialog during the check of auto taxcard. */ showRefreshAutoTaxcardDialog(): void; /** * Shows a dialog for modifying an existing Worker: * Saves changes and updates the calculation. */ showWorkerEditDialog(): void; /** UI related data and texts about the taxcard. */ get taxUi(): TaxcardUiInfo; /** * Gets the text for pension. * @param isOverview If true, returns the shorter text for overview. */ getPensionText(isOverview?: boolean): string | undefined; /** * Sends the payroll from company to PRO. * @param message Message to the accountant */ sendToPro(message: string): void; /** * Calculates the total amount of days for the given period type. * @param periodType Period type to calculate days for. * @returns Sum of days for the given period type. */ calculatePeriodDays(periodType: "absencesDays" | "leavesDays" | "paidAbsencesDays"): number; /** * Saves a calculation to local storage * @param calc - Calculation to store */ private setToLocalStorage; /** * Deletes a calculation in local storage */ private deleteFromLocalStorage; } declare class Calculator2019ControllerCrudBindings extends ApiCrudObjectControllerBindings { /** Options for the behavior of the calculator when in anonymous (demo) mode. */ anonOptions: string; } /** * Year 2022 version of the Calculator controller designed for customized calculator UI's (usecases). * Removes old methods that are no longer necessary (household, old calculator UI) * and adds more support for customization. */ export declare class Calculator2022Controller extends CalculationCrudController { protected invoicesService: InvoicesService; protected uiCrudHelpers: UiCrudHelpers; private usecasesService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Component bindings */ static crudBindings: { [boundProperty: string]: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** * The usecase definition if specified and loaded. * Check the usecaseState if the. */ usecase: null | Usecase; /** Available usecases if the user needs to make a selection of which usecase to take. */ usecases: UsecaseListItem[]; /** If true, additional worker info is displayed in the UI */ isWorkerInfoOpen: boolean; constructor(calcApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService, uiCrudHelpers: UiCrudHelpers, usecasesService: UsecasesService); /** * Initialization code. */ $onInit(): void; /** Overrides the reload to assure that usecase is also loaded. */ reload(): Promise; /** * If true, the given action (button) is displayed. * @param action One of the action values. * For now, validation and role based action logic is in UI. * Todo: some edge cases, i.e. isForcePayAllAllowed (for pay-button) are still in UI. */ showAction(action: CalculatorActions): boolean; /** * Returns true, if action (button) is disabled * TODO: Add rules based on roles and validation? Pay button logic is in UI. */ isActionDisabled(action: CalculatorActions): boolean; /** Loads the available usecases => The UI shows them as selection. */ showUsecasesSelection(): Promise; /** * Sets the given usecase to the current calculation. * @param uri Uri for the new usecase. */ setUsecase(uri: string): void; /** * Gets a total of row type(s) * @param types A single row type or array of types to filter for calculation. */ getRowTotal(types: CalculationRowType | CalculationRowType[]): number; /** * Shows a report for the current calculation using a modal dialog. * @param reportType - Type of report to show */ showReportDialog(reportType: calcReportType): void; /** * Shows a dialog for modifying an existing Worker: * Saves changes and updates the calculation. */ showWorkerEditDialog(): void; /** Shows infor dialog about the current usecase in the calculation. */ showUsecaseInfo(): void; /** * Shows a dialog during the check of auto taxcard. */ showRefreshAutoTaxcardDialog(): void; /** * Shows a dialog for adding a new Employment relation. * If user goes through the wizard the employment relation is saved and set to the calculation. */ showNewWorkerDialog(): void; /** * Returns validation for current calculation or empty validation object if the calculation has not been recalculated (validated). */ get validation(): ApiValidation; /** Returns true if the payment is possible when the employer pays all. */ get isForcePayAllAllowed(): boolean; /** HACK: This will be removed after moved to useCase based calculators. Placeholder for usecase specific logic in history calculation. */ historyUsecase: { save: () => void; recalculate: () => void; }; } /** Enumerations for calculator actions */ declare enum CalculatorActions { AllowForcePay = "allowForcePay", Approve = "approve", Cancel = "cancel", CopyAsNew = "copyAsNew", Delete = "delete", Pay = "pay", Recalculate = "recalculate", Reject = "reject", Save = "save", SendToPro = "sendToPro", ShowPaymentDialog = "showPaymentDialog", SetSalaryDateKind = "setSalaryDateKind" } /** Enumerations for calculator actions */ declare enum CalculatorActions_2 { AllowForcePay = "allowForcePay", Approve = "approve", Cancel = "cancel", CopyAsNew = "copyAsNew", Delete = "delete", Pay = "pay", Recalculate = "recalculate", Reject = "reject", Save = "save", SendToPro = "sendToPro", ShowPaymentDialog = "showPaymentDialog", SetSalaryDateKind = "setSalaryDateKind", ContinuePsdPayment = "continuePsdPayment" } /** * Defines the panels logic in the Calculator */ export declare class CalculatorPanels { calc: Calculation; /** * Creates a new CalculatorPanels helper for a calculation * @param calc - The Calculation object for which the helper operates */ constructor(calc: Calculation); /** Stores the UI properties to the calculation until a roundtrip to server. Then the property is set to null */ get ui(): any; /** * Toggles the user interface panels active (open/close) in a hierarchical way. * The functionality mimics a hierarchical panel/menu structure in HTML / components that are not hierarchical. * See the example to better understand the logic. * Hierarchy logic is supported to 2 levels only - it is not tested on deeper hierarchy though it may function. * @param panels - Identifiers of panel or two panels (panel and its child) that should be toggled. * @example * Assume we have these two panels open: "panel1", "panel2" * * - togglePanel("panel1", "panel2") => ["panel1"] // Normal 2nd level toggle opens and closes the last level. * - togglePanel("panel2") => ["panel1"] // Alternative explicit last level close * - togglePanel("panel1") => [] // Normal 1st level toggle opens and closes the first level * - togglePanel("panel3") => ["panel3"] // Opening another "path" of the hierarchy * - togglePanel("panel3", "panel4") => ["panel3", "panel4"] * - togglePanel("panel1", "panel4") => ["panel1", "panel4"] // Being a separate "path" is determined by last element only * - togglePanel("last") => ["panel1"] // Special keyword for closing the last panel * - togglePanel() => [] // Closes all panels */ toggleActivePanel(...panels: any[]): void; /** * Returns true if the panel is active (open). * @param panel - identifier of the panel. */ isPanelActive(panel: string): boolean; } /** Logical section / area of the calculator ui. */ export declare class CalculatorSection { isActive: boolean; isSelectionDone: boolean; title: string; /** * Creates a new CalculatorSection * @param isActive - If true, the section is currently active / selected in te user interface. * @param isSelectionDone - If true, user has selected some values for the section * @param title - Short text title for the section */ constructor(isActive: boolean, isSelectionDone: boolean, title: string); /** * Shortcut for isSelectionDone or isActive. * This is when the overview window should be shown colored */ get isOverviewActive(): boolean; } /** Sections defines areas of the calculator: worker, household-usecase, worktime, salary, expenses and results. */ export declare class CalculatorSections { calc: Calculation; /** * Creates a new CalculatorSections helper for a calculation * @param calc The Calculation object for which the helper operates */ constructor(calc: Calculation); /** Stores the UI properties to the calculation until a roundtrip to server. Then the property is set to null */ get ui(): any; /** * Activates a section in the calculator (opens the detail view). * @param section - Name of the section */ setActive(section: string): void; /** * Toggles the section */ toggleActive(section: string): void; /** * Toggles the section active / non-active. */ toggle(section: string): void; /** Gets a section */ get(section: string): CalculatorSection | undefined; } /** * The **CalcUsecase** is the 2022 version of the calculator (Calc) that supports * usecases: customizations to user interfaces and logic using HTML and JavaScript. * It is expected to eventually replace the old Calc component. * * The component provides functionality for: * * 1. Selecting the Employment relation / Worker to the calculation (employer if the current user is Worker) * 2. Selecting the usecase if one is not provided in the URI. * 3. Defining the Worktime information: Period, Absences and holidays. * 4. Defining the calculation rows: salary, expences, benefits, deductions etc. * 5. Showing the results as charts and reports. * 6. Starting the payment process * * Controllers are defined in **salaxy.ng1.controllers**. Most of the functionality comes from Calculator2022Controller. * The view (html) can be modified using the usecase view mechanism. * @example * ```html * * ``` */ export declare class CalcUsecase extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; detailsUrl: string; listUrl: string; model: string; /** Uses the Calculator2022Controller */ isReadOnlyForced: string; }; /** Uses the Calculator2022Controller */ controller: typeof Calculator2022Controller; /** The default template for the component. */ defaultTemplate: string; } /** Worker object for the current calculation */ 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_2 | 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; } /** * Shows information about the Worker / employment relation within a calculation. * @example * ```html * * ``` */ export declare class CalcWorkerInfo extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; anonOptions: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the Calculator2019Controller */ controller: typeof Calculator2019Controller; /** The default template for the component. */ defaultTemplate: string; } /** The required information for paying the Salary to Worker. */ 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. */ 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; /** Last date and time when this calculation was repaired after payment. */ repairedAt?: 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; /** The original id the calculation which this calculation is a copy of. */ originalId?: string | null; } /** * UI for setting the Worktime properties within the calculator * The process starts by selecting the period based on which relevatn worktime * data is fetched: Holidays, Absences and later Hours. * Calculation rows are then added based on this worktime. * @example * ```html * * ``` */ export declare class CalcWorktime extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The calculation that the component edits (shows in read-only mode). */ calc: string; }; /** Uses the CalcWorktimeController */ controller: typeof CalcWorktimeController; /** The default template for the component. */ defaultTemplate: string; } /** 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). */ declare interface CalcWorktime_2 { /** Employment period that is updated from employment at each recalculation (as opposed to holiday specification). */ employmentPeriod?: DateRange_2 | 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_2 | 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; } /** * Handles the user interaction of Worktime within the Calculator. * The Worktime contains the logic for fetching holidays and absences * for that particular period and adding calculation rows for them if necessary. */ export declare class CalcWorktimeController implements angular_2.IController { private uiHelpers; private calcApi; private anonCalcApi; private sessionService; private employmentsApi; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** User interface shortcuts for period selection */ periodShortcuts: { /** Text for current month. */ monthCurrent: string; /** Text for last month. */ monthLast: string; /** Text for other month. */ monthOther: string; /** Text for two weeks. */ weeks2: string; /** Text for half a month */ monthHalf: string; /** Text for other period. */ other: string; }; /** The calculation that the controller edits (shows in read-only mode). */ calc: Calculation; /** * The employment data for the worker. */ workerEmployment: Employment; /** * Worktime data for the period fetched from the server */ worktime: CalcWorktime_2; /** If there is a validation error in period start, it is added here. */ periodStartDateError: null; /** Demodata for the anonymous demo calculator. */ demoData: { /** Start date for which the data was generated. */ startDate: string; /** End date for which the data was generated. */ endDate: string; /** The holiday data */ holidays?: HolidayYear; /** Absences data. */ absences?: WorkerAbsences_2; }; private _periodStartDate; private _dateRange; /** * Creates a new CalcWorktimeController * @ignore */ constructor(uiHelpers: UiHelpers, calcApi: Calculations, anonCalcApi: Calculator, sessionService: SessionService, employmentsApi: Employments, $timeout: angular_2.ITimeoutService); /** * Implement IController */ $onInit(): void; /** * Reset the controller to initial state. */ reset(): void; /** * Loads the employment data for the current worker. */ loadEmployment(): Promise; /** * Getter for checking if WorkerHolidays is active. */ get isWorkerHolidaysActive(): boolean; /** Gets the requested salary date */ get requestedSalaryDate(): string; set requestedSalaryDate(value: string); /** * Reloads the holidays from server. */ reloadHolidays(): void; /** Holiday year has been changed and must be saved and reloaded. */ holidaysChanged(holidaysCtrl: HolidayYearCrudController): void; /** Absences has been changed and must be saved and reloaded. */ absencesChanged(absencesCtrl: WorkerAbsencesCrudController): void; /** Gets the current calculation object */ get currentCalc(): Calculation; /** * Returns true if there is no net salary payment to worker at all. */ get isCurrentZeroPayment(): boolean; /** Disable function for the salary date picker. */ isDisabledSalaryDate: (date: any) => boolean; /** Getter and setter for Calculation daterange in compatible format for new DateRange component. */ get dateRange(): DateRange_2; set dateRange(value: DateRange_2); /** Returns true if the holidays uses accrual. */ get isHolidayAccrual(): boolean; /** Returns true if holidays are accrued for this calc. */ get accruesHolidays(): boolean; /** * Called when the date range changes. * @param noPeriodStartDateUpdate If true, the _periodStartDate is not updated. * Should be true if the change is triggered by that input to avoid UI flickering. */ dateRangeChange(noPeriodStartDateUpdate?: boolean): void; /** * Gets or sets the period start date, which is bound to editable input in case the period type * is not "other" (date the range / calendar component) */ get periodStartDate(): string; set periodStartDate(value: string); /** * Gets the user interface shortcut for the period type: * Different user interfaces are shown depending on the period shortcut. */ get periodShortcut(): "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other"; set periodShortcut(value: "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other"); /** * Submit the data in the Worktime (period) dialog. */ submitWorktime(): void; /** Returns true if the current worktime data seems to have holidays or absences to add as rows in the salary calculation. */ hasHolidaysOrAbsences(): boolean; /** * Returns the logic for the worktime data related lists * @returns Logic object for the lists. */ getLogicForLists(): any; /** Shows the pro-dialog */ showPeriodDetails(): void; /** * Gets the status for the current holidays and absences fetching. * These are fetched from the server when the period and / or worker changes. */ getHolidaysStatus(): "noWorker" | "noPeriod" | "loading" | "ok"; /** * Gets the monthly text for calendar month for accruals. * @param type Type of the text is either header or description. */ getAccrualMonthText(type: "header" | "description", month: MonthlyHolidayAccrual): string; /** * Gets the accrual explanation text. This is currently not in use. * TODO: translate */ getAccrualText(monthlyAccrual: MonthlyHolidayAccrual): string; /** * Opens the dialog for editing calculation payments */ openCalcLeavesDialog(): void; /** Checks if the period has changed and if so resets the demo data. */ checkDemoData(): void; private initDateRanges; /** Programmatic tab change via a UI link text. */ changeTab(tabId: string): void; } /** * Renders a monthly calendar where one month is one row and you can show ranges and special days (only partial support). * Future implementations will support categories / swimlanes of periods (e.g. holidays from several persons) * and have better support for special days: different types of markers, pop-up etc. * @example * ```html * * ``` */ export declare class Calendar extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Start date for the calendar as ISO date yyyy-MM-dd. Renders from the beginning of this month. */ start: string; /** * End date of the calendar as ISO date yyyy-MM-dd. Renders until the end of this month. */ end: string; /** * Today date for the calendar as ISO date yyyy-MM-dd. * Can be set as dately object (e.g. ISO string, JS Date or key string "today") */ today: string; /** The data that is plotted on the calendar chart. */ data: string; /** Optional data mapper function that is used in mapping the data to CalendarSeries array. */ mapper: string; /** TODO: Remove */ periods: string; /** TODO: Remove */ days: string; /** Type of chart: "align-weekdays", "align-left" or horizontal. */ mode: string; /** * Function that is called when user selects an item in the calendar. * Function can have the following locals: type: "event" | "day", date: string, day: Full calendar day with all the day info, * calEvent: The calendar event if type is "event", series: Series that the event belongs to or the series that is clicked (not always available). * @example */ onListSelect: string; /** Possibility of specifying a list controller that can be used for item editing. */ listController: string; /** If set to true, the export buttons are visible. */ showExport: string; }; /** Uses the CalendarController */ controller: typeof CalendarController; /** The default template for the component. */ defaultTemplate: string; } /** Salaxy calendar action is an extension to iCalendar Alarms: It supports the standard alarms: Display, Email and Audio, but also salaxy action scripts. */ 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. */ 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 */ declare enum CalendarActionType { Undefined = "undefined", Display = "display", Email = "email", Audio = "audio", CreateItem = "createItem", Script = "script", PaymentDate = "paymentDate" } /** Attachment for calendar event or Action/Alarm. */ 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. */ 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; } /** * Renders a calendar control for visualisation of holidays. */ export declare class CalendarController implements angular_2.IController { private uiHelpers; private $http; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Start date for the calendar as ISO date yyyy-MM-dd. Renders from the beginning of this month. */ start: string; /** * End date of the calendar as ISO date yyyy-MM-dd. Renders until the end of this month. */ end: string; /** * Calendar data where single series can be represented as an array of events (CalendarUiEvent or date ISO string). * Several series should be represented as CalendarSeries that contain events. * Note that a DateRange also passes as CalendarUiEvent because it has start and end dates. */ data: CalendarSeries[] | (CalendarUiEvent | string)[] | any; /** * Function that is called when user selects an item in the calendar. * Function can have the following locals: type: "event" | "day", date: string, day: Full calendar day with all the day info, * calEvent: The calendar event if type is "event", series: Series that the event belongs to or the series that is clicked (not always available). * @example */ onListSelect: (params: { /** Selection type. */ type: "event" | "day" | "series"; /** Seleted date as ISO string. */ date: string; /** Full calendar day with all the day info. */ day: CalendarDay; /** Calendar event that was clicked: Only if selection type is "event." */ calEvent?: CalendarUiEvent; /** * Series that the event belongs to or the series that is clicked. * Note that some clicks of type "day" might not have the series info, in current UI the header above series when calendar supports multiple series. */ series?: CalendarSeries; }) => void; /** Language versioned weekdays short texts (e.g. "ma", "ti",...) */ weekdays: string[]; /** Get the header days for the whole calendar. */ weekdaysForMonth: { /** Weekday index number (align-weekdays) or day of month (align-left). */ ix: number; /** Week day number in week (align-weekdays). */ weekday?: number; /** Text for the week day (align-weekdays) or day of month (align-left). */ text: string; }[]; /** A mapper that is used in converting custom data to Calendar series array. */ mapper: (sourceData: any) => CalendarSeries[]; /** If specified, this is the list controller that should be used for editing the item. */ listController: ListControllerBase; /** If set to true, the export buttons are visible. */ showExport: boolean; private _today; private _mode; private _series; private HOLIDAY_COLOR; private WEEKEND_COLOR; private EVENT_COLOR; constructor(uiHelpers: UiHelpers, $http: angular_2.IHttpService); /** * Implement IController */ $onInit: () => void; /** Initialize the header (days) */ initHeader(): void; /** * Specifies how the weekdays are aligned from one month to another. * "horizontal" shows all months side-by-side horizontally, so there is no alignment. */ get mode(): "align-weekdays" | "align-left" | "horizontal" | "list"; set mode(value: "align-weekdays" | "align-left" | "horizontal" | "list"); /** Gets the Today date for the calendar as ISO date yyyy-MM-dd. */ get today(): string; /** Sets the Today date as dately object (e.g. ISO string, JS Date or key string "today") */ set today(value: string); /** Gets all days of all months */ get allDays(): CalendarDay[]; /** * Gets the data harmonized as an array of Calendar Series */ get series(): CalendarSeries[]; /** * Gets the monthly list: Only the dates that have events on them. * Only the start of event is considered except for the first month where all intercepting properties are. */ get monthlyList(): CalendarMonth[]; /** The collection of months that the calendar renders. */ get months(): CalendarMonth[]; /** * Gets the short text "ma", "ti", "ke", "to", "pe", "la", "su". * @param date Date as ISO string or date */ getShortWeekdayText(date: any): string; /** Gets the CSS class(es) for a calendar event. */ getCssClass(event: CalendarUiEvent): string; /** * Get the event CSS style for a single day. Main thing is to set the disposition and smaller size if the day has overlapping items. * @param event Event for which to calculate the styles. * @param allEvents All events in the given series/type: Either period or singleDay. */ getEventStyle(event: CalendarUiEvent, allEvents: CalendarUiEvent[]): any; /** * A date in the calendar was clicked. * @param day Day that was clicked. * @param series The series that contains the event. * If null, the click is in header etc. where series is not available. * @param $event The AngularJS event used to stop propagation. */ dateClicked(day: CalendarDay, series: CalendarSeries, $event: angular_2.IAngularEvent): void; /** * Called by view when an event is clicked. * @param ev Event that is being clicked * @param day Day on which the event occurs * @param series The series that contains the event. If null, the first series is taken. * @param $event AngularJS event: Used for stopping propagation. */ eventClicked(ev: CalendarUiEvent, day: CalendarDay, series: CalendarSeries, $event: angular_2.IAngularEvent): void; /** * A series title in the calendar was clicked. * @param series The series. * @param $event The AngularJS event used to stop propagation. */ seriesClicked(series: CalendarSeries, $event: angular_2.IAngularEvent): void; /** * Exports the calendar as a PDF. * This method shows a loading indicator, constructs a URL for the PDF request, * and handles the PDF request. */ exportCalendarPdf(): void; private handlePdfRequest; private fetchPdf; /** * Export the calendar as Excel. */ exportCalendarExcel(): void; private generateExcelHeaders; private generateExcelDataRows; private generateExcelDataRow; /** * Copies the data as normalized data set so that we can harmonize the dates and potentially make other changes in the future. * Copy is shallow copy of CalendarUiEvent. */ private assureNormalizedCopy; /** Get a simplified cache key for caching months / days. */ private getCacheKey; /** * Cache counter is updated by months getter, which is the foundation of data refresh and observes full getCacheKey. * Rest of the methods can just check this simpler cacheCounter for refreshes. */ private cacheCounter; } /** Single day in the calendar */ 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. */ declare interface CalendarEvent { /** 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. */ 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; } /** * Renders an editor / details component for a Calendar Event. * @example * ```html * * ``` */ export declare class CalendarEventDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalendarEventsCrudController */ controller: typeof CalendarEventsCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Represents a single item in a list of calendar events in the search index. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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. */ 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. */ declare class CalendarEvents 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(): 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 | null, end?: DatelyObject | null): Promise; } /** * Controller for implementing Calendars that contain CalendarEvents (iCalendar). */ export declare class CalendarEventsCrudController extends ApiCrudObjectController { private fullApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; endMinDate: string; _tabOptions: any[]; /** * Creates a new WorkflowController * @ignore */ constructor(fullApi: CalendarEvents, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); /** * Controller initialization */ $onInit(): void; /** Dynamic tabs */ get tabOptions(): any[]; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Adds a new recurrence rule to the event */ addRecurrenceRule(): void; /** Adds a new action to the event */ addAction(): void; /** * Deletes an item in the recurrence rules * @param index The index number of the item to delete. */ deleteRecurrence(index: number): void; /** * Deletes an item in the actions * @param index The index number of the item to delete. */ deleteAction(index: number): void; /** * Saves the calendar item. * Override done so that durations (timespans) are converted from number to string. */ save(): Promise; /** Gets the event duration, even if it is null (start and end defined). */ getEventDuration(): string | null; /** Assures that the durations are strings, not numbers. The UI binding makes them numbers. */ checkDurations(): void; } /** CalendarEventStatus enumeration */ declare enum CalendarEventStatus { Undefined = "undefined", Cancelled = "cancelled", Confirmed = "confirmed", Tentative = "tentative", NeedsAction = "needsAction", Completed = "completed", InProcess = "inProcess" } /** Helper component for calendar related user interfaces: Dates and Times formatting etc. */ export declare class CalendarHelper { private $sce; /** Periods / date ranges plotted on the chart. */ calendarPeriods: CalendarSeries[]; constructor($sce: angular.ISCEService); /** * Gets a HTML formatted version of the description. * @param description Description text to format */ formatDescription(description: any): any; } /** Month in a calendar. */ 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 */ 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. */ 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_2; /** 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). */ 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. */ 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. */ 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 */ declare enum CarBenefitCode { LimitedCarBenefit = "limitedCarBenefit", FullCarBenefit = "fullCarBenefit" } /** User certificate. */ 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; } /** Certificate controller for listing certificate, revoking and requesting a new certificate. */ export declare class CertificateController extends CrudControllerBase { private certificateService; private certificateApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(certificateService: CertificateService, $location: angular.ILocationService, $attrs: angular.IAttributes, uiHelpers: UiHelpers, certificateApi: Certificates_2); /** Creates a new certificate */ createNew(): Certificate; result: { /** Certificate file as blob. */ blob: Blob; /** Certificate file as text. */ text: string; /** Certificate thumbprint. */ thumbprint: string; }; /** Certificate format (id) */ certFormat: "pfx" | "pem"; /** Returns the metadata for the certFrmat */ get currentCertFormat(): InputEnumOption; /** Avilabe certificate formats */ certFormats: InputEnumOption[]; /** * Shows a dialog for adding nw certificate. */ showCertificateAddDialog(): void; /** Creates a new certificate */ createCert(): void; /** * Downloads current.blob as pfx and sets current.id as name */ downloadCertFile(): void; } /** * Plain CRUD controller for Certificates. */ export declare class CertificateCrudController extends ApiCrudObjectController { private fullApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(fullApi: Certificates_2, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); /** * Implement IController */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; } /** * Shows a list of all certificates which has been generated for this account. * @example * ```html * * ``` */ export declare class Certificates extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ onListSelect: string; onDelete: string; onCreateNew: string; detailsUrl: string; listUrl: string; }; /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ transclude: { header: string; }; /** Uses the CertificateController */ controller: typeof CertificateController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides CRUD access for authenticated user to access a his/her own Certificates */ declare class Certificates_2 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 * @param certificate The certificate to issue * @param options Optional parameters for the issue operation * @returns A Promise containing the issued certificate */ issueSertificate(certificate: Certificate, options?: any): Promise; /** * 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; /** * Gets all certificates from the API. * @returns A Promise that resolves to an array of Certificate objects. */ getAll(): Promise; /** * OData query is not supported for certificates. * @param _query OData query parameters (not used) * @throws Error indicating operation is not supported */ getOData(_query: any): any; /** * Getting a single certificate is not supported. * @param _id Identifier of the certificate (not used) * @throws Error indicating operation is not supported */ getSingle(_id: any): any; } /** * CRUD functionality for the Payroll objects and functionality for payroll in general. */ export declare class CertificateService extends BaseService { private certificateApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * String that identifies the service event (onChange/notify). * Must be unique for the service class. */ protected eventPrefix: string; constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, certificateApi: Certificates_2); } /** * Controller rendering chart by provided config * Config type example: config: ChartConfiguration<"pie" | "bar", { labels: string[]; datasets: any[] }, any> * Config follows official chart.js ChartConfiguration interface * @example * ```html * * ``` */ declare class Chart_2 extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Config of chart */ config: string; /** Custom height of chart */ customHeight: string; /** Custom height of chart */ customWidth: string; /** Custom height of chart */ customClass: string; }; /** Uses the ChartController */ controller: typeof ChartController; /** The default template for the component. */ defaultTemplate: string; } export { Chart_2 as Chart } /** Controller rendering chart by provided config */ export declare class ChartController implements angular_2.IController { private $element; private $timeout; private $scope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Configuration of chart */ config: ChartConfiguration; private chart; /** Custom height of chart */ customHeight: string; /** Custom width of chart */ customWidth: string; /** Custom class of chart */ customClass: string; constructor($element: JQLite, $timeout: angular_2.ITimeoutService, $scope: angular_2.IScope); /** * Implement IController */ init(): void; /** Creates chart based on data and options to canvas or updates chart if it already exists */ createChart(): void; /** * Updates provided current chart * "none" parameters means no animation for update */ updateChart(): void; } /** A company account - note that this can also be an association etc. - something that has a Company ID. */ 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_2 | 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; } /** Company account controller for editing basic information. */ export declare class CompanyAccountController implements angular_2.IComponentController { private accounts; private sessionService; private ajax; private uiHelpers; private uploadService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Current company account */ current: CompanyAccount; /** Constructor for dependency injection */ constructor(accounts: Accounts, sessionService: SessionService, ajax: Ajax, uiHelpers: UiHelpers, uploadService: UploadService); /** * Implement IController */ $onInit(): void; /** Gets the language of the current company */ getAccountLanguage(): Language | null | undefined; /** Updates the company */ saveCurrent(): Promise; /** * Uploads avatar image file to the server. * @param avatar - selected file */ uploadAvatarImage(avatar: any, current?: CompanyAccount): void; /** Called when avatar changes */ emailForAvatarChanged(current?: CompanyAccount): void; /** Called when avatar changes */ typeForAvatarChanged(current?: CompanyAccount): void; /** * Adds/updates the workflow event for the current using API. * @param wfEvent - Workflow event to add/update. * @returns - Reloaded item. */ saveWorkflowEvent(wfEvent: WorkflowEvent): Promise; /** * Deletes the given event or all events with given type using API. * @param wfIdOrType Id or type of the workflow event. * @returns - Reloaded item. */ deleteWorkflowEvent(wfIdOrType: string): Promise; /** * Gets a single workflow event for the item. * @param wfId Id the workflow event. * @returns - Workflow event. */ getWorkflowEvent(wfId: string): Promise; /** * Opens modal for avatar edit */ openEditDialog(editType: "avatar" | "contactInfo"): void; } /** Provides the settings for a Company Employer account (all settings details for employer). */ 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_2 | null; /** Cost accounting settings, e.g. cost centers and projects. */ costAccounting?: CostAccountingSettings_2 | null; /** Holiday settings for accruals and holiday pay calculations. */ holiday?: HolidaySettings_2 | null; /** Settings related to making of the payments. */ payments?: PaymentSettings_2 | 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; /** Settings related to pay statistics calculations. */ payStats?: PayStatsSettings_2 | null; /** Customer specific business configurations. */ configs?: BizConfig[] | null; /** Customer specific preferences. */ preferences?: Preference[] | 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; } /** * User interface for worker mass loading. * @example * ```html * * ``` */ export declare class CompanyImport extends DataImportComponentBase { /** Uses the CompanyImportController */ controller: typeof CompanyImportController; } /** API company import object. The API uses this object for mass operations for creating or assuring the customer companies in the system. */ declare interface CompanyImport_2 { /** 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; } /** * Controller for company imports. */ export declare class CompanyImportController extends DataImportControllerBase { private importsApi; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private dataEnricher; /** * Creates a new WorkerImportController * @ignore */ constructor(importsApi: Imports, jsonSchemaService: JsonSchemaService, $timeout: angular_2.ITimeoutService, uiHelpers: UiHelpers); /** * Implement IController */ $onInit(): Promise; /** Enrichs data */ getDataEnrichers(): Array<{ enrich: () => void; buttonLabel: string; }>; /** Import data */ import(): Promise; /** Help */ help(): Promise; protected getImportMapper(): Promise>; private enrichEInvoiceAddresses; } /** * Type for a single company import row. */ 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. */ 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; } /** * Shows the invoice processing ui for companies. * @example * ```html * * ``` */ export declare class CompanyInvoices extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * channel for the invocie processing. Default is PalkkausInvoices. */ channel: string; }; /** Uses the InvoiceCrudController */ controller: typeof CompanyInvoicesController; /** The default template for the component. */ defaultTemplate: string; } /** * Extends the InvoiceCrudController to provide * company invoices handling functionality. */ export declare class CompanyInvoicesController extends InvoiceCrudController { private companyAjax; private session; private $http; private $timeout; private $sce; /** * For NG-dependency injection */ static $inject: string[]; /** Default channel for payments */ channel: PaymentChannel; /** Month for invoices query */ private queryMonth; /** Queries for lists: Groups statuses to logical groups. */ queryOptions: InputEnumOption[]; queryDateFilterOptions: InputEnumOption[]; /** The current query */ queryOption: InputEnumOption; dateFilterQueryOption: InputEnumOption; private qrCodesCache; constructor(invoicesApi: Invoices, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, invoiceService: InvoicesService, companyAjax: Ajax, session: SessionService, $http: angular_2.IHttpService, $timeout: angular_2.ITimeoutService, $sce: angular_2.ISCEService); /** Intitializes the controller */ $onInit(): void; /** For list components, gets the OData query options. */ getListOptions(): any; /** * Sets the date filter query option. * @param option - The input enum option. */ setDateFilterQueryOption(option: InputEnumOption): void; /** Refreshes query */ doQuery(): void; /** Dropdown options for marking invoice as paid */ getMarkAsPaidOptions(items: InvoiceListItem[]): InputEnumOption[]; /** * Selects invoices of a specific type and marks them as selected. * @param action - The type of invoices to select. */ selectInvoicesByType(action: InvoiceType | "all" | "removeAll"): void; /** * Determines whether to show the "Mark as Paid" button for a given invoice. * @param invoice - The invoice to check. * @returns A boolean indicating whether to show the button. */ showMarkAsPaidButton(invoice: InvoiceListItem): boolean; /** * Determines whether to show the "Mark as Canceled" button for a given invoice. * @param invoice - The invoice to check. * @returns A boolean indicating whether to show the button. */ showMarkAsCanceledButton(invoice: InvoiceListItem): boolean; /** * Determines whether to show the IR cancel information text for a given invoice. * @param invoice - The invoice item to check. * @returns `true` if the invoice entity type is `Net` and the status is `Paid`, otherwise `false`. */ showIrCancelInfoText(invoice: InvoiceListItem): boolean; /** * Shows a dialog for a single invoice. * @param item Invoice item. */ showInvoiceDialog(item: InvoiceListItem): void; /** * Marks selected invoices as paid. * This method filters the selected invoices to exclude those that are already paid or canceled. * It then shows a loading indicator and processes each invoice by marking it as paid. * After processing all invoices, it refreshes the periodic invoices and dismisses the loading indicator. * @returns A promise that resolves when the operation is complete. */ markInvoicesAsPaid(): Promise; /** Update status of single invoice. */ updateInvoiceStatus(item: InvoiceListItem, status: InvoiceStatus): void; /** Data reader for one item. */ getInvoiceReader: (item: InvoiceListItem, status: InvoiceStatus, updatePeriodicInvoices?: boolean) => { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; getSepaData: (_arr: Invoice[]) => Promise; getFinvoiceData: (_arr: Invoice[]) => Promise; getPdfData: (_arr: Invoice[]) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** * Returns PDF url for a single invoice. * @param item Invoice list item. */ getPdfUrl(item: InvoiceListItem): string; /** * Retrieves the QR code for the specified invoice item. * If the QR code is not already cached, it generates the QR code and caches it for future use. * @param item - The invoice item for which to retrieve the QR code. * @returns The QR code string. */ getQrCode(item: InvoiceListItem): string; /** * Calculates barcode value for the invoice item. * @param item Invoice list item. */ getBarcodeValue(item: InvoiceListItem): string; /** * Calculates the invoice payment amount for a given invoice item. * If the invoice item is of type "tax" or "union" and the total paid amount * is different from the payment amount, it returns the rounded difference * between the payment amount and the total paid amount. * Otherwise, it returns the payment amount. * @param {InvoiceListItem} item - The invoice item to calculate the payment for. * @returns {number} - The calculated payment amount. */ getInvoicePayment(item: InvoiceListItem): number; /** * Retrieves the barcode for the invoice recipient's IBAN. * If the IBAN does not start with "fi" or is not provided, an empty string is returned. * The barcode is generated using the Barcodes.createBarcode function. * @returns The barcode as a string, wrapped in an HTML trust object. */ getBarcode(item: InvoiceListItem): string; /** * Copies the barcode to clipboard. * @param item Invoice list item. */ copyBarcode(item: InvoiceListItem): void; /** * Displays the PDF for the given invoice items. * @param items - The list of invoice items. */ showloadPfd(items: InvoiceListItem[]): void; /** * Generates a URL for the calculation details of an invoice item. * @param item - The invoice item for which to generate the URL. * @returns A string representing the URL for the calculation details. */ calculationHref(item: InvoiceListItem): string; private getEprWarning; /** Checks if the Epr report is delayed. */ private isDelayed; private getInvoice; private generateQrCodeSvgForInvoice; private handlePdfRequest; private fetchPdf; private refreshPeriodicInvoices; } /** * Wizard for creating a new Palkkaus.fi-account for a company. */ export declare class CompanyOnboardingController extends WizardController { private onboardingService; private sessionService; private ajax; private $location; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Field to expose forms validity state. */ formDataValidity: boolean; /** If true, step is proceeding */ isStepProceeding: boolean; constructor($scope: angular_2.IScope, wizardService: WizardService, onboardingService: OnboardingService, sessionService: SessionService, ajax: Ajax, $location: angular_2.ILocationService, data: any, uiHelpers: UiHelpers); /** * Implement IController */ $onInit(): void; /** Company wizard configuration */ getWizardSteps(): WizardStep[]; /** * Navigates to the next step if possible and saves the data. */ goNext(): Promise; /** Returns true if user can go forward in wizard */ get canGoNext(): boolean; /** * Navigates to the previous step if possible and saves the data. */ goPrevious(): void; /** * Saves the data to server */ save(): Promise; /** * Returns signing url. */ get vismaSignUrl(): string; /** * The onboarding model is provided by the onboarding service. */ get model(): Onboarding; /** IF true, the Suomi.fi company selection is used. */ get showCompanySelection(): boolean; /** Returns the PDF preview address for the authorization pdf. */ getPdfPreviewAddress(): string; /** * Existing company alert. */ get existingCompanyAlert(): boolean; /** Go to suomi fi ypa */ goToSuomifi(): void; /** * Launches the wizard. * @param id Optional onboarding id. */ launch(id?: string): Promise; /** * Sets the company's business id, clears the YTJ search results fetches other company info's via YTJ search and saves * @param businessId The business id that is set as the company's business id */ chooseBusinessId(businessId: any): void; /** * Sets the DoYtjUpdate flag to true and saves. * @param searchType - If true, sets the business ID to null * Use this option to force a YTJ name search, even if there already is something written in business ID field. */ searchYtj(searchType?: "businessId" | "name"): void; /** * Returns validation error for key if exists. * @param key - Validation error key. */ getValidationError(key: string): ApiValidationError; /** Opens wizard as modal dialog */ openSigningWizardDialog(onBoardingId?: null): Promise; /** Launches company wizard. */ launchSigningWizard(): Promise; /** Reloads the current session*/ checkSession(): Promise; private readTokenFromUrl; } /** * Controller for the accountant settings. */ export declare class CompanySettingsController implements angular_2.IController { private sessionService; private settingsService; private uiHelpers; private ajax; private $sce; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, current item is read only */ isReadOnlyForced: boolean; /** Possibility to restrict sections that are visible in settings. */ sections: SettingsSection[]; /** Yearly sidecosts */ sideCosts: YearlySideCosts | null | undefined; /** The current editable settings */ private _current; private _irCertificate; private _openAiKey; private saves; constructor(sessionService: SessionService, settingsService: SettingsService, uiHelpers: UiHelpers, ajax: Ajax, $sce: angular_2.ISCEService); /** * Initializes the controller */ $onInit(): void; /** Copy current from SettingsService */ get current(): CompanyAccountSettings; /** Returns current pension contracts once loaded assuring there is at least one active item. */ get pensionContracts(): PensionContract[] | null; /** Returns current insurance contracts once loaded assuring there is at least one active item. */ get insuranceContracts(): InsuranceContract[] | null; /** * Returns current default accounting target. */ get defaultAccountingTarget(): AccountingTargetSettings_2; /** * Returns true, if the contract should be visible: * Companies: All pending contracts and first active contract. * Personal: The first active contract, no pending contracts. * @param contract Contract to evaluate * @param allContracts Collection of contracts that contain the contract to evaluate. */ isVisibleContract(contract: ContractType, allContracts: ContractType[]): boolean; /** Gets the relevant contracts that are shown in personal (household) userinterface. */ get personal(): { insurance: InsuranceContract; pension: PensionContract; }; /** Returns OPEN AI Key */ get openAiKey(): string; /** Sets OPEN AI Key */ set openAiKey(value: string); /** Saves open AI Key */ saveOpenAiKey(): void; /** * Saves changes for settings * @param section Section to save: Copies only that section to settingsService. * Null saves nothing. */ save(section: SettingsSection | "all" | null): void; /** * Creates a new IR certificate. * @param transferId Transfer ID for the IR certificate. * @param transferPassword One time transfer password for the IR certificate. * @returns Information about the created IR certificate. */ createIrCertificate(transferId: string, transferPassword: string): Promise; /** * Renews an existing IR certificate. * @returns Information about the created IR certificate. */ renewIrCertificate(): Promise; /** Returns true if the account has chosen to use own certificate */ hasOwnIrCertificate(): boolean; /** Current IR certificate */ get irCertificate(): any; /** * Send all workers paid calculations to omapalkka */ sendPaidCalculationsToOmapalkka(): void; /** Checks if switch input should be disabled on salarySlipDeliveryMethodsForm*/ disableSwitchInput(): boolean; /** * Sets pension number for test account to the given contract * @param item Pension contract */ setPensionNumberForTest(item: PensionContract): void; /** * Shows the eInvoice selection dialog */ selectEInvoiceAddress(): void; /** * Gets the progress of save operation. * @param section Section to check for saving. * Note that "all" will check only "all" operations, not underlying sub-sections saving ("any"). */ isSaving(section: SettingsSection | "all"): boolean; /** * Event handler for accounting target selection. * @param current Settings object to edit/create. * @param logic Logic object passed to the dialog controller. * @param logic.isReadOnly Read-only flag in logic. * @param value Boolean indicating if the item is selected or not. * @param item The selected item. * @param allItems All selected items. */ onAccountingTargetSelect(current: AccountingTargetSettings_2, logic: { isReadOnly: boolean; }, value: boolean, item: AccountingTargetListItem, allItems: AccountingTargetListItem[]): void; /** * Event handler for usecase selection. * @param current Settings object to edit/create. * @param logic Logic object passed to the dialog controller. * @param logic.isReadOnly Read-only flag in logic. * @param value Boolean indicating if the item is selected or not. * @param item The selected item. * @param allItems All selected items. */ onUsecaseSelect(current: Usecase, logic: { isReadOnly: boolean; }, value: boolean, item: UsecaseListItem, allItems: UsecaseListItem[]): void; /** * Return Avatar from current.payment.channels ENUM * @returns Avatar */ getPaymentChannelAvatar(item: any): Avatar_2 | undefined; /** * Created InputEnumOption [] from current.accounting.targets * @returns InputEnumOption [] for template */ getSelectableAccountingTargets(): InputEnumOption[]; /** * Created InputEnumOption [] from current.payment.channels * @returns InputEnumOption [] for template */ getSelectablePaymenMethods(): InputEnumOption[]; /** * Returns true if the payslip is included in worker's SalarySlipDeliveryMethods. */ get payslip(): boolean; /** * Sets/unsets the payslip as one of worker's SalarySlipDeliveryMethods. * @param value Boolean value if the payslip should be set. */ set payslip(value: boolean); /** * Returns true if the omapalkka is included in worker's SalarySlipDeliveryMethods. */ get omapalkka(): boolean; /** * Sets/unsets the omapalkka as one of worker's SalarySlipDeliveryMethods. * @param value Boolean value if the payslip should be set. */ set omapalkka(value: boolean); /** * Confirm service change */ confirmServiceModelChange(): void; /** * Creates datauri for given image * @param logo Logo for dataurl */ createReportLogoDatauri(logo: any): void; /** * Retrieves the report logo. * @returns The report logo as a html string. */ getReportLogo(): string; private static getActive; } /** CompanyType enumeration */ declare enum CompanyType { Unknown = "unknown", FiOy = "fiOy", FiTm = "fiTm", FiRy = "fiRy", FiYy = "fiYy" } /** Abstract Base class for salaxy components */ export declare abstract class ComponentBase implements angular_2.IComponentOptions { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ abstract bindings: any; /** * Controller has the actual implementation of the component. * Same Controller may be reused between different components with different views and binding. */ abstract controller: any; /** The default template for the component. */ abstract defaultTemplate: any; /** * Set the template-url attribute to specify your custom template. * @ignore */ templateUrl: (string | (($element: JQLite, $attrs: angular_2.IAttributes) => any))[]; } /** * Provides the method for registering components to the module. */ export declare class ComponentsRegistration { /** Gets the components for Module registration. */ static getComponents(): { salaxyAccountInfo: any; salaxyAssurePartner: any; salaxyAuthCard: any; salaxyAuthorizedAccounts: any; salaxyAuthorizingAccounts: any; salaxyCertificates: any; salaxyCredentials: any; salaxyLanguageSelector: any; salaxyLoginButton: any; salaxySigning: any; salaxyUserInfo: any; salaxyAccountAvatarEdit: any; salaxyAccountContactEdit: any; salaxyAccountAuthorizationPerson: any; salaxyAccountAvatarEditPerson: any; salaxyAccountContactEditPerson: any; salaxyAccountDetailsEditPerson: any; salaxyAccountDetailsPerson: any; salaxyAccountInfoPerson: any; salaxyAccountInsuranceEditPerson: any; salaxyEmployerList: any; salaxyEmployerSelect: any; salaxyCalcEmployment: any; salaxyCalcHouseholdUsecase: any; salaxyCalcIrRows: any; salaxyCalcsIrRows: any; salaxyCalcList: any; salaxyCalcWorktime: any; salaxyCalc: any; salaxyCalcChart: any; salaxyCalcDashboard: any; salaxyCalcEditor: any; salaxyCalcNewIntro: any; salaxyCalcRepair: any; salaxyCalcRepairInfo: any; salaxyCalcReport: any; salaxyCalcReports: any; salaxyCalcResults: any; salaxyCalcRowType: any; salaxyCalcRowsEditor: any; salaxyCalcRows2019Editor: any; salaxyCalcRowFormula: any; salaxyCalcUsecase: any; salaxyPayrollDetails: any; salaxyPayrollDetailsList: any; salaxyPayrollDetailsSelectList: any; salaxyPayrollEdit: any; salaxyPayrollList: any; salaxyPayrollAssistant: any; salaxyPayButton: any; salaxySalaryDateKindButton: any; salaxyCalcSharing: any; salaxyCalcSharingInfo: any; salaxyCalcSharingReceiptAction: any; salaxyCalcLeaves: any; salaxyCalcWorkerInfo: any; salaxyPayrollSelectList: any; salaxyCalcCostAccounting: any; salaxyCalcRowCostAccounting: any; salaxyCalcRowDimensionInput: any; salaxyCalcRowDocumentation: any; salaxyCostAccounting: any; salaxyContactInfo: any; salaxyHourlyReport: any; salaxyMessageThread: any; salaxyMessageThreadList: any; salaxyTimer: any; salaxyVarmaBanner: any; salaxyWelcome: any; salaxyExpenseReport: any; sxyAlert: any; sxyCodeEditor: any; sxyFieldset: any; sxyForm: any; sxyGrid: any; sxyInput: any; sxySchemaEditor: any; sxyTable: any; salaxyAccountReset: any; salaxySmokeTest: any; salaxyDatepicker: any; salaxyDatepickerPopup: any; salaxyDateRange: any; salaxyFormGroup: any; salaxyInput: any; salaxyInputAccountingTarget: any; salaxyInputBoolean: any; salaxyInputCollectiveBargainAgreement: any; salaxyInputCredential: any; salaxyInputDuration: any; salaxyInputEmployeeGroup: any; salaxyInputEnum: any; salaxyInputIncomeType: any; salaxyInputMarkdown: any; salaxyMarkdownEditor: any; salaxyMarkdownViewer: any; salaxyInputNumber: any; salaxyInputOccupationType: any; salaxyInputRrule: any; salaxyInputTime: any; salaxyInputTypeahead: any; salaxyToggleButtons: any; salaxyTextarea: any; salaxyValidationSummary: any; salaxyInputHolidayMultipliers: any; salaxyInputPayStatsRowType: any; salaxyActionButton: any; salaxyAlert: any; salaxyAvatar: any; salaxyChart: any; salaxyCalendar: any; salaxyDataMapper: any; salaxyJsonFormatter: any; salaxyJsonDiff: any; salaxyNaviSitemap: any; salaxyNaviStarterLayout: any; salaxyOdataActions: any; salaxyOdataFooter: any; salaxyOdataTable: any; salaxySpinner: any; salaxyTabs: any; salaxyTab: any; salaxyTabButtons: any; salaxyUiTranslator: any; salaxyCalcImport: any; salaxyCompanyImport: any; salaxyImportStaging: any; salaxyWorkerImport: any; salaxyCreditTransfer: any; salaxyInvoiceAlerts: any; salaxyInvoiceEdit: any; salaxyInvoiceList: any; salaxyInvoicePreview: any; salaxyInvoicesCreate: any; salaxyPaymentChannelInvoicePreview: any; salaxyInvoiceTools: any; salaxyInvoiceReport: any; salaxyInvoicePaymentList: any; salaxyCompanyInvoices: CompanyInvoices; salaxyHolidayReport: any; salaxyHolidayPayReportQuery: any; salaxyIrEarningsPayment: any; salaxyIrEarningsPaymentList: any; salaxyIrPayerSummary: any; salaxyIrPayerSummaryList: any; salaxyReportList: any; salaxySalaryReportList: any; salaxyAccountingReportQuery: any; salaxyAccountingHolidayPayDebtReportQuery: any; salaxyAccountingReportList: any; salaxyAccountingReportRows: any; salaxyAccountingReportTools: any; salaxyAccountingReportViewer: any; salaxyPayCertificate: any; salaxyCalculationReport: any; salaxyAccountingRowReport: any; salaxyEmployerReport: any; salaxyWorkerReport: any; salaxyHouseholdDeductionReport: any; salaxyHouseholdYearDetails: any; salaxyHouseholdYearList: any; salaxySummaryReport: any; salaxySummaryReportQuery: any; salaxyWorkerSummaryReport: any; salaxyPayStatsReportQuery: any; salaxyAbsencePeriods: any; salaxyEmploymentDetails: EmploymentDetails; salaxyEmploymentTaxcards: any; salaxyHolidayYearAccrual: any; salaxyHolidayYearHolidays: any; salaxyHolidayYearPaid: any; salaxyTaxcardDetails: any; salaxyTaxcardIncomeLog: any; salaxyTaxcardManualEdit: any; salaxyTaxcardList: any; salaxyTaxCardsList: any; salaxyWorkerAbsences: any; salaxyWorkerDetails: any; salaxyWorkerHolidays: any; salaxyEmploymentList: any; salaxyWorkerList: any; salaxyWorkerAssure: any; salaxyCalendarEventDetails: any; salaxyDatasetDetails: any; salaxyWorkflowButtons: any; salaxyWorkflowReopen: any; salaxyWorkflowBadge: any; salaxyRecords: any; salaxyAccountant: any; salaxyRowTypesSettings: any; salaxyAccountingTargetDetails: any; salaxyInsurance: any; salaxyInsuranceSettings: any; salaxyOwnerSettings: any; salaxyPaymentChannelSettings: any; salaxyPaymentSettings: any; salaxyProSettings: any; salaxyAccountingTargetSettings: any; salaxyServiceModelDetails: any; salaxyUsecaseDetails: any; salaxyCostAccountingSettings: any; salaxyAccountingSettings: any; salaxyHolidaySettings: any; salaxyPayStatsSettings: any; salaxyIrDeliverySettings: any; }; } /** * Environment specific configuration for Salaxy API's and JavaScript in general. * Raw object as stored in the env file. */ 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; /** The base address of the code editor server, e.g. https://code-editor.salaxy.com */ codeEditor?: string | null; } /** * Controller base class for configurable grid reports. */ export declare abstract class ConfigurableGridReportControllerBase implements angular_2.IController { protected datasets: Datasets; protected uiHelpers: UiHelpers; protected sessionService: SessionService; /** Usecase uri for report templates */ abstract usecaseUri: string; /** Current grid options. */ abstract gridOptions: any; /** ID for the element containing grid. */ abstract gridElmentId: any; /** default templates */ protected abstract defaultTemplates: Template[]; /** Current data */ data: TData; /** Current grid. */ grid: any; /** Options for data query. */ queryOptions: { period: { /** Period type for the query. */ periodType: PeriodType; /** Ref date for the period. */ refDate?: string; /** End date for the custom period. */ endDate?: string; /** Period date kind */ periodDateKind: PeriodDateKind; /** Selected workers */ selectedWorkers: WorkerListItem[]; }; calculations: CalculationListItem[]; payrolls: PayrollListItem[]; }; /** Current report template */ templateId: string; /** All loaded templates */ templates: Template[]; constructor(datasets: Datasets, uiHelpers: UiHelpers, sessionService: SessionService); /** * Initialize controller values. */ $onInit(): void; /** * Returns the template definition * @param templateId Template id. */ getTemplate(templateId: string): Template | undefined; /** * Selects the template to show * @param templateId The selected template. */ selectTemplate(templateId: any): void; /** * Save template */ showSaveTemplate(): void; /** * Delete template */ showDeleteTemplate(): void; /** * Shows the period selection dialog and makes the search. */ showPeriodSelection(): void; /** * Shows the calculation selection dialog and makes the search. */ showCalcsSelection(): void; /** * Shows the calculation selection dialog and makes the search. */ showPayrollSelection(): void; /** * Gets the data based on given set of calculations. * @param calculationIds - Calculations that are the bases for the report. * @returns A Promise with result data. */ abstract queryDataForCalculationIds(calculationIds: string[]): Promise; /** * Gets the monthly / quarterly / yearly cumulative 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, salary date or work date. * @param workers List of worker official ids. * @returns A Promise with result data. */ abstract queryDataForPeriod(refDate: string, periodType?: PeriodType | "all", endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise; /** * Processes and sets the data. */ abstract setData(result: TData): any; private loadTemplates; private loadTemplateConfig; private setTemplateStateToGrid; private setGridStateToTemplate; } /** Common contact information object for Person, Company, Location etc. */ 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. */ 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; } /** * Shows the customer service contact info and reference to zendesk's help-widget. * Options to show short content and hide contact info. * @example * ```html * * ``` */ export declare class ContactInfo extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** If true, short version of the content is shown */ showShortContent: string; /** If true, contact info is hidden */ hideContactInfo: string; }; /** Uses the AlertController */ controller: typeof ContactInfoController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller rendering a contact info box in the page area. */ export declare class ContactInfoController implements angular_2.IController { /** * For NG-dependency injection * @ignore */ /** If true, short version of the content is shown */ showShortContent: boolean; /** If true, contact info is hidden */ hideContactInfo: boolean; /** * Creates a new ContactInfoController * @ignore */ constructor(); /** * Implement IController */ $onInit: () => void; } declare 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?: ContactPersonResponsibilityCode | null; } declare enum ContactPersonResponsibilityCode { ContentIssues = "contentIssues", TechnicalIssues = "technicalIssues" } /** ContactType enumeration */ declare enum ContactType { Default = "default", WorkerAccount = "workerAccount", EmployerOverride = "employerOverride", Foreign = "foreign" } /** Content for a API object property. */ declare interface ContentPackage { /** Api Item Type */ type?: ApiItemType | null; /** Path to the property. */ propertyPath?: string | null; /** Content for the property. */ content?: any | null; /** Action to be performed with the content. */ action?: ContentPackageAction | null; } /** ContentPackageAction enumeration */ declare enum ContentPackageAction { Undefined = "undefined", Overwrite = "overwrite", Preserve = "preserve", Append = "append" } /** A signing party in a contract. */ 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_2 | 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; } /** ContractPartyType enumeration */ declare enum ContractPartyType { Person = "person", CustomContact = "customContact" } /** * Provides methods for registering the Controllers to module * (and other related metadata in the future). */ export declare class ControllersRegistration { /** Gets the controllers for Module registration. */ static getControllers(): { AbsencePeriodsController: typeof AbsencePeriodsController; AccountantController: typeof AccountantController; AccountantWizardController: typeof AccountantWizardController; AccountingChannelSettingsController: typeof AccountingChannelSettingsController; AccountAuthorizationController: typeof AccountAuthorizationController; AccountingHolidayPayDebtReportQueryController: typeof AccountingHolidayPayDebtReportQueryController; AccountingReportCrudController: typeof AccountingReportCrudController; AccountingReportDisplayController: typeof AccountingReportDisplayController; AccountingReportQueryController: typeof AccountingReportQueryController; AccountingReportRowsController: typeof AccountingReportRowsController; AccountingReportToolsController: typeof AccountingReportToolsController; AccountingRowReportController: typeof AccountingRowReportController; AccountingTargetCrudController: typeof AccountingTargetCrudController; AccountResetController: typeof AccountResetController; ActionButtonController: typeof ActionButtonController; AlertController: typeof AlertController; AvatarController: typeof AvatarController; BatchProcessController: typeof BatchProcessController; CalcChartController: typeof CalcChartController; CalcCostAccountingController: typeof CalcCostAccountingController; CalcEmploymentController: typeof CalcEmploymentController; CalcHouseholdUsecaseController: typeof CalcHouseholdUsecaseController; CalcImportController: typeof CalcImportController; CalcIrRowsController: typeof CalcIrRowsController; CalcsIrRowsController: typeof CalcsIrRowsController; CalcWorktimeController: typeof CalcWorktimeController; CalcRepairController: typeof CalcRepairController; CalcRepairInfoController: typeof CalcRepairInfoController; CalcReportController: typeof CalcReportController; CalcReportsController: typeof CalcReportsController; CalcReportsDisplayController: typeof CalcReportsDisplayController; CalcRowCostAccountingController: typeof CalcRowCostAccountingController; CalcRowDimensionInputController: typeof CalcRowDimensionInputController; CalcRowDocumentationController: typeof CalcRowDocumentationController; CalcRowFormulaController: typeof CalcRowFormulaController; CalcRowTypeController: typeof CalcRowTypeController; CalcRows2019Controller: typeof CalcRows2019Controller; CalcSharingController: typeof CalcSharingController; CalcSharingReceiptActionController: typeof CalcSharingReceiptActionController; CalculationCrudController: typeof CalculationCrudController; CalculationEditorController: typeof CalculationEditorController; CalculationReportController: typeof CalculationReportController; Calculator2019Controller: typeof Calculator2019Controller; Calculator2022Controller: typeof Calculator2022Controller; CalcLeavesController: typeof CalcLeavesController; CalendarController: typeof CalendarController; CalendarEventsCrudController: typeof CalendarEventsCrudController; CertificateController: typeof CertificateController; ChartController: typeof ChartController; CompanyAccountController: typeof CompanyAccountController; CompanyInvoicesController: typeof CompanyInvoicesController; CompanyImportController: typeof CompanyImportController; CompanyOnboardingController: typeof CompanyOnboardingController; CompanySettingsController: typeof CompanySettingsController; ContactInfoController: typeof ContactInfoController; CostAccountingController: typeof CostAccountingController; CredentialController: typeof CredentialController; CreditTransferController: typeof CreditTransferController; CustomerInvoiceCrudController: typeof CustomerInvoiceCrudController; CustomerOnboardingController: typeof CustomerOnboardingController; DatasetsCrudController: typeof DatasetsCrudController; DatepickerController: typeof DatepickerController; DatepickerPopupController: typeof DatepickerPopupController; DateRangeController: typeof DateRangeController; EditDialogController: typeof EditDialogController; EmbeddedUiController: typeof EmbeddedUiController; EmployerListController: typeof EmployerListController; EmployerReportController: typeof EmployerReportController; EmployerSelectController: typeof EmployerSelectController; EmploymentCrudController: typeof EmploymentCrudController; EmploymentTaxcardsController: typeof EmploymentTaxcardsController; EmploymentWizardController: typeof EmploymentWizardController; ExportController: typeof ExportController; HolidayPayReportQueryController: typeof HolidayPayReportQueryController; HolidayReportController: typeof HolidayReportController; HolidayYearAccrualController: typeof HolidayYearAccrualController; HolidayYearCrudController: typeof HolidayYearCrudController; HolidayYearHolidaysController: typeof HolidayYearHolidaysController; HolidayYearPaidController: typeof HolidayYearPaidController; HouseholdDeductionReportController: typeof HouseholdDeductionReportController; HouseholdOnboardingController: typeof HouseholdOnboardingController; HouseholdYearCrudController: typeof HouseholdYearCrudController; ImportController: typeof ImportController; ImportStagingController: typeof ImportStagingController; InputBooleanController: typeof InputBooleanController; InputCollectiveBargainAgreementController: typeof InputCollectiveBargainAgreementController; InputCredentialController: typeof InputCredentialController; InputDurationController: typeof InputDurationController; InputEmployeeGroupController: typeof InputEmployeeGroupController; InputEnumController: typeof InputEnumController; InputHolidayMultipliersController: typeof InputHolidayMultipliersController; InputPayStatsRowTypeController: typeof InputPayStatsRowTypeController; InputIncomeTypeController: typeof InputIncomeTypeController; InputNumberController: typeof InputNumberController; InputRruleController: typeof InputRruleController; InputTimeController: typeof InputTimeController; InputTypeaheadController: typeof InputTypeaheadController; InsuranceWizardController: typeof InsuranceWizardController; InvoiceCrudController: typeof InvoiceCrudController; InvoicesCreateController: typeof InvoicesCreateController; InvoiceReportController: typeof InvoiceReportController; InvoiceSepaController: typeof InvoiceSepaController; InvoiceToolsController: typeof InvoiceToolsController; InvoiceAlertsController: typeof InvoiceAlertsController; InvoicePaymentListController: typeof InvoicePaymentListController; IrEarningsPaymentCrudController: typeof IrEarningsPaymentCrudController; IrPayerSummaryCrudController: typeof IrPayerSummaryCrudController; JsonFormatterController: typeof JsonFormatterController; JsonDiffController: typeof JsonDiffController; MarkdownEditorController: typeof MarkdownEditorController; MarkdownViewerController: typeof MarkdownViewerController; MessageThreadCrudController: typeof MessageThreadCrudController; ModalGenericDialogController: typeof ModalGenericDialogController; MyTaxcardsController: typeof MyTaxcardsController; NaviController: typeof NaviController; NewPaymentController: typeof NewPaymentController; ODataActionsController: typeof ODataActionsController; ODataHelperController: typeof ODataHelperController; ODataQueryController: typeof ODataQueryController; OmapalkkaController: typeof OmapalkkaController; OwnerSettingsController: typeof OwnerSettingsController; PartnerController: typeof PartnerController; PayCertificateController: typeof PayCertificateController; PaymentController: typeof PaymentController; PaymentChannelController: typeof PaymentChannelController; PaymentChannelSettingsController: typeof PaymentChannelSettingsController; PayrollCrudController: typeof PayrollCrudController; Payroll4AssistantController: typeof Payroll4AssistantController; Payroll4CrudController: typeof Payroll4CrudController; PayStatsReportQueryController: typeof PayStatsReportQueryController; PalkkausPersonalPaymentOverviewController: typeof PalkkausPersonalPaymentOverviewController; PersonAccountController: typeof PersonAccountController; RecordsController: typeof RecordsController; ReferenceObjectCrudController: typeof ReferenceObjectCrudController; ReportsController: typeof ReportsController; RowTypesSettingsController: typeof RowTypesSettingsController; SalaryBasesController: typeof SalaryBasesController; SalaryDateKindController: typeof SalaryDateKindController; SalarySlipDownloadController: typeof SalarySlipDownloadController; SalaryReportCrudController: typeof SalaryReportCrudController; SessionController: typeof SessionController; ServiceModelCrudController: typeof ServiceModelCrudController; SignatureController: typeof SignatureController; SigningController: typeof SigningController; SmokeTestController: typeof SmokeTestController; SpinnerController: typeof SpinnerController; SummaryReportController: typeof SummaryReportController; SummaryReportDisplayController: typeof SummaryReportDisplayController; SummaryReportQueryController: typeof SummaryReportQueryController; SxyCodeEditorController: typeof SxyCodeEditorController; SxyFormController: typeof SxyFormController; SxyFormElementController: typeof SxyFormElementController; SxyTableController: typeof SxyTableController; SxyGridController: typeof SxyGridController; SxyInputController: typeof SxyInputController; SxySchemaEditorController: typeof SxySchemaEditorController; TabController: typeof TabController; TabsController: typeof TabsController; TabButtonsController: typeof TabButtonsController; TaxcardManualEditController: typeof TaxcardManualEditController; TaxcardCrudController: typeof TaxcardCrudController; TaxcardIncomeLogController: typeof TaxcardIncomeLogController; TemplateCrudController: typeof TemplateCrudController; ToggleButtonsController: typeof ToggleButtonsController; UiTranslatorController: typeof UiTranslatorController; UsecasesCrudController: typeof UsecasesCrudController; VarmaBannerController: typeof VarmaBannerController; WelcomeController: typeof WelcomeController; WizardController: typeof WizardController; WorkerAbsencesCrudController: typeof WorkerAbsencesCrudController; WorkerAccountCrudController: typeof WorkerAccountCrudController; WorkerAssureController: typeof WorkerAssureController; WorkerExpenseReportController: typeof WorkerExpenseReportController; WorkerHourlyReportController: typeof WorkerHourlyReportController; WorkerImportController: typeof WorkerImportController; WorkerOnboardingController: typeof WorkerOnboardingController; WorkerReportController: typeof WorkerReportController; WorkerSummaryReportController: typeof WorkerSummaryReportController; WorkerSummaryReportDisplayController: typeof WorkerSummaryReportDisplayController; WorkerTimerController: typeof WorkerTimerController; WorkflowController: typeof WorkflowController; WorkflowBadgeController: typeof WorkflowBadgeController; TimesheetWorkerDemoController: typeof TimesheetWorkerDemoController; ValidationSummaryController: typeof ValidationSummaryController; }; } /** * Shows the cost accounting details for the calculation. * @example * ```html * * ``` */ export declare class CostAccounting extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Dimension values for edit. */ current: string; /** Possible inherited dimensions values from upper lever (e.g. calc level to rows) */ inherited: string; /** Forced read only state */ readOnly: string; /** * Optional CostAccountingDimensionDefinitions * If not set, cost accounting dimensions and their options are read from the settings. */ dimensions: string; /** * Scope for the cost accounting: calculation or row. */ scope: string; /** * Style of the inputs. * Supports empty or 'openClose'. Only available when not readOnly */ inputMode: string; }; /** Uses the CostAccountingController */ controller: typeof CostAccountingController; /** The default template for the component. */ defaultTemplate: string; } /** * Handles the user interaction for entering cost accounting data. */ export declare class CostAccountingController implements angular_2.IController { protected sessionService: SessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Scope for the cost accounting: calculation or row. */ scope: CostAccountingDimensionScope; /** Dimension values to edit.*/ current: CostAccountingDimension[]; /** Possible upper level (e.g. calculation) dimensions that are inherited */ private _inherited; /** Bindable read-only */ readOnly?: boolean; /** CostAccountingDimensionDefinition including label, type and options */ dimensions: CostAccountingDimensionDefinition[]; /** * Style of inputs. * If null or empty, displays normal input. * - "openeClose" shows readOnly-like input with toggle button to open the field for editing. */ inputMode: "" | "openClose"; private _definitions; private _options; private _values; private _inheritedValues; private _obsoleteValues; private _newDimensions; /** * Creates a new CalcCostAccountingController * @ignore */ constructor(sessionService: SessionService); /** * Implement IController */ $onInit(): void; /** Copy of inherited dimensions */ get inherited(): CostAccountingDimension[]; /** Copy of inherited dimensions */ set inherited(value: CostAccountingDimension[]); /** Returns applicable dimensions*/ get definitions(): CostAccountingDimensionDefinition[]; /** * Returns true, if the dimension exists. * @param id Id of the dimension. * @returns True, if the dimension with given id exists. */ getDefinition(id: string): CostAccountingDimensionDefinition | undefined; /** * Returns total percentage for the dimension * @param id Name of the dimension. */ getSum(id: string): number; /** * Returns available options. * @param id Id of the dimension. */ getOptions(id: string): { /** Option value. */ value: any; /** Option text. */ text: string; /** Option description. */ title?: string | undefined; }[]; /** * Returns true if options exists for the dimension. * @param id Id of the dimension. * @param value Value of the dimension. * @returns True, if an option exists for the value. */ hasOptions(id: string, value: string): boolean; /** * Returns single value. * @param id Id of the dimension. */ getSingleValue(id: string): CostAccountingDimension | undefined; /** * Sets single value. * @param id Id of the dimension. * @param value Value of the dimension. */ setSingleValue(id: string, value: string): void; /** * Returns current values. * @param id Id of the dimension. */ getValues(id: string): CostAccountingDimension[]; /** * Sets values. * @param values Values of the dimension. */ setValues(values: CostAccountingDimension[]): void; /** * Deletes value from the dimensions * @param value Value to delete */ deleteValue(value: CostAccountingDimension): void; /** * Returns true if the dimension values are inherited. * @param id Id of the dimension. */ isInherited(id: string): boolean; /** * Returns inherited single value. * @param id Id of the dimension. */ getInheritedSingleValue(id: string): CostAccountingDimension | undefined; /** * Returns inherited values. * @param id Id of the dimension. */ getInheritedValues(id: string): CostAccountingDimension[]; /** * Returns total percentage for the dimension for inherited values * @param id Name of the dimension. */ getInheritedSum(id: string): number; /** * Returns current obsolete values. */ get obsoleteValues(): CostAccountingDimension[]; /** * Returns true if the values contains obsolete dimensions. * @returns True if the values contains obsolete dimensions. */ get hasObsoleteValues(): boolean; private modifyOptions; private cleanDimensions; } /** Id of the cost accounting dimension with optional percentage for shared costs. */ 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. */ 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. */ 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 */ declare enum CostAccountingDimensionScope { None = "none", Calculation = "calculation", Row = "row", Hidden = "hidden" } /** Cost accounting models for session. */ declare interface CostAccountingInSession { /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** * Cost accounting settings. * @example * ```html * * ``` */ export declare class CostAccountingSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Forced read only state */ isReadOnlyForced: string; }; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** Settings related to Cost Accounting */ declare interface CostAccountingSettings_2 { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** Country enumeration */ 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" } /** Credential controller for listing credentials and removing existing credentials. */ export declare class CredentialController extends CrudControllerBase { private uploadService; private credentialService; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Translated color options for input enum */ colorOptions: any; private originalAvatar; /** Constructor for dependency injection */ constructor(uploadService: UploadService, credentialService: CredentialService, sessionService: SessionService, $location: angular_2.ILocationService, $attrs: angular_2.IAttributes, uiHelpers: UiHelpers); /** * Uploads avatar image file to the server. * @param file - selected file */ uploadAvatarImage(file: any): void; /** Called when avatar changes */ emailForAvatarChanged(): void; /** Called when avatar changes */ typeForAvatarChanged(): void; /** Set current credential for edit. */ setCurrent(item: SessionUserCredential): void; /** Saves a new credential */ saveCurrent(): Promise; } /** * Shows a list of all login credentials which can access this account. * @example * ```html * * ``` */ export declare class Credentials extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { showEdit: string; }; /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ transclude: { header: string; }; /** Uses the CredentialController */ controller: typeof CredentialController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides CRUD access for authenticated user to access all credentials which can access this account. */ declare class Credentials_2 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; /** * Gets all credentials from the API. * @returns A Promise that resolves to an array of SessionUserCredential objects. */ getAll(): Promise; /** * OData query is not supported for credentials. * @param _query OData query parameters (not used) * @throws Error indicating operation is not supported */ getOData(_query: any): any; /** * Getting a single credential is not supported. * @param _id Identifier of the credential (not used) * @throws Error indicating operation is not supported */ getSingle(_id: any): any; } /** * CRUD functionality for the Credentials objects and functionality for Credentials in general. */ export declare class CredentialService extends BaseService { private credentialsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * String that identifies the service event (onChange/notify). * Must be unique for the service class. */ protected eventPrefix: string; constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, credentialsApi: Credentials_2); /** * Returns the url for uploading the avatar image file to the database * @returns Id of the credential */ getAvatarUploadUrl(credentialId: any): string; } /** * Credit Transfer Form for Invoice visualization. * @example * ```html * * My custom HTML message * * ``` */ export declare class CreditTransfer extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Invoice to display in the credit transfer. */ invoice: string; /** Invoice preview to display in the credit transfer. */ invoicePreview: string; /** * Display mode is either * * - "official": The official printable credit transfer (Finanssialan keskusliitto) * - "barcode-copy": The copy-paste input + button (in a div) for copy pasting the the barcode into a web bank * - "default": Both of the above separted by an explaining text. */ mode: string; }; /** * Transclusion slots */ transclude: { /** * HTML to include in the message section */ message: string; }; /** Uses the CreateCompanyAccountWizardController */ controller: typeof CreditTransferController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows an invoice as credit transfer: Either as printable display, copy-pasteable barcode or both. */ export declare class CreditTransferController implements angular_2.IController { private $scope; private $sce; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Invoice that is shown as credit transfer: The main data object. */ invoice: Invoice; private invoiceQrCode; /** * Display mode is either * * - "official": The official printable credit transfer (Finanssialan keskusliitto) * - "barcode-copy": The copy-paste input + button (in a div) for copy pasting the the barcode into a web bank * - "default": Both of the above separted by an explaining text. */ mode: "default" | "official" | "barcode-copy"; private _invoicePreview; /** * Creates a new CreditTransferController. * @ignore */ constructor($scope: angular_2.IScope, $sce: angular_2.ISCEService, $timeout: angular_2.ITimeoutService); /** Copies the barcode from input to clipboard. */ copyBarcode(): void; /** Gets a unique id for the barcode input (from which the copying to clipboard is done). */ getId(): number; /** * Retrieves the QR code for the specified invoice item. * If the QR code is not already cached, it generates the QR code and caches it for future use. * @returns The QR code string. */ getQrCode(): string; /** * Sets the Invoice based on an invoice preview (list item based preview) if the invoice is not empty. * I.e. if you wish to set to null, you need to set the invoice null separately. * Gets the original preview object if set. */ get invoicePreview(): InvoicePreview_2; set invoicePreview(value: InvoicePreview_2); /** * Retrieves the barcode for the invoice recipient's IBAN. * If the IBAN does not start with "fi" or is not provided, an empty string is returned. * The barcode is generated using the Barcodes.createBarcode function. * @returns The barcode as a string, wrapped in an HTML trust object. */ getBarcode(): string; /** Barcode value */ get bcValue(): string; /** * Generates the QR code for the invoice. */ generateQrCodeSvgForInvoice(): Promise; /** * Returns bic for iban * @param iban Iban to get bic for */ getBicForIban(iban: string): string; /** * Determines whether to show the QR code for the invoice. * @returns A boolean indicating whether to show the QR code. */ showQrCode(): boolean; /** * Checks if the IBAN of the recipient is an international IBAN. * @returns {boolean} True if the IBAN is international, false otherwise. */ isInternationalIban(): boolean; /** Maps an invoice preview object to invoice. */ private getInvoice; } /** * 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). */ 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>; /** * Retrieves the Ajax instance used by this CRUD API. * @returns {Ajax} The Ajax instance that is used for making HTTP requests. */ getAjax(): Ajax; /** * 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; } /** * Base class for CRUD controllers of legacy service model: BaseService / IService. * Most new implementations should use the new API CRUD model instead. * However, this service model may still be the right choice in certain circumstances where the editable data should be * cached or is already in session (like account data). */ export declare class CrudControllerBase implements angular.IController { protected crudService: IService; protected $location: angular.ILocationService; protected $attrs: angular.IAttributes; protected uiHelpers: UiHelpers; /** * Bindings for the component which uses CRUD controller. */ static crudBindings: { /** * Function that is called when user selects an item in the list. * The selected item is the parameter of the function call. * @example */ onListSelect: string; /** * Function that is called when an item is deleted. * The event is intended for user interface logic after delete (promise resolve) * and potentially when waiting for server to respond (from function call until promise resolve). * It is not meant for delete validation and/or for preventing deletion. * If onDelete is not specified, the browser is redirected to listUrl if specified. * @example */ onDelete: string; /** * Function that is called after a new item has been created. * At this point, the item has been created, but not yet selected as current. * If onCreateNew is not specified the browser is redirected to detailsUrl if specified and if not, only current item is set. * @example */ onCreateNew: string; /** * URL to which the component navigates when an item is clicked. * The "id" or "rowIndex" property of the selected item is added to the URL. * URL is ignored if onListSelect is set. In this case, you may navigate yourself in that method. * @example */ detailsUrl: string; /** * URL for the list view. At the moment, if specified, the browser is redirected here after delete. * @example * * */ listUrl: string; }; /** * For list-controls, this is the URL for item select event * as well as the URL where a new item is edited. Basically showing the Details view. * For more control, use onListSelect or onCreateNew events. * @example */ detailsUrl: string; /** * URL for the list view. At the moment, if specified, the browser is redirected here after delete. * @example * * */ listUrl: string; /** * Angular ng-model **if** the controller is bound to model using ng-model attribute. */ model: angular.INgModelController; /** * Function that is called when an item is deleted. * The event is intended for user interface logic after delete (promise resolve) * and potentially when waiting for server to respond (from function call until promise resolve). * It is not meant for delete validation and/or for preventing deletion. * If onDelete is not specified, the browser is redirected to listUrl if specified. * NOTE: the deleteResult should basically always be Promise or promise failure. Promise does not really make sense here. * @example */ onDelete: (eventData: { /** The deleteResult should basically always be Promise or promise failure. Promise does not really make sense here. */ deleteResult: Promise; }) => Promise; /** * Function that is called after a new item has been created. * At this point, the item has been created, but not yet selected as current. * If onCreateNew is not specified the browser is redirected to detailsUrl if specified and if not, only current item is set. * @example */ onCreateNew: (eventData: { /** New item which was created. */ item: T; }) => void; /** * For list-controls, this is the function of on-list-select event. * If onListSelect is not specified, the browser is redirected to detailsUrl if specified. * If detailsUrl is not specified, only current item is set. * @example */ onListSelect: (eventData: { /** The selected item. */ item: T; }) => void; /** * Creates a new CrudControllerBase. * @param crudService The the BaseService instance that is used for communicating to server. * @param $location Angular.js Location service that is used for navigation. Especially the list views. * @param $attrs Angular.js Attisbutes for determining whether events have been bound to. * @param uiHelpers - Salaxy ui helpers service. */ constructor(crudService: IService, $location: angular.ILocationService, $attrs: angular.IAttributes, uiHelpers: UiHelpers); /** * Implement IController by providing onInit method. * We currently do nothing here, but if you override this function, * you should call this method in base class for future compatibility. */ $onInit(): void; /** Gets the Current selected item. */ get current(): T; /** Gets the list of all CRUD objects listed. */ get list(): T[]; /** * Creates a new item. The item is not saved in this process yet. * Item is set as current unless onCreateNew is specified => Then you are responsible for doing it yourself. * If detailsUrl is specified, the browser is redirectedted there. * Current item is set also in this case (as opposed to listSelect) because the new item does not yet have an id * and passing it in current item is the only way using router. * Use onCreateNew event or crudService.getBlank() if you do not want to set the current item. * @param newItem Specify the new item if you want to initialize it with specific values. * In most cases, you should let the system create it with defaults. */ createNew(newItem?: T): T; /** Copies the current item and sets it as the new current */ copyCurrent(): void; /** * Creates a copy of a given item and sets it as current * unless onCreateNew is specified => Then you are responsible for doing it yourself. * If detailsUrl is specified, the browser is redirectedted there. * Current item is set also in this case (as opposed to listSelect) because the new item does not yet have an id * and passing it in current item is the only way using router. * Use onCreateNew event or crudService.copyAsNew() if you do not want to set the current item. * @param copySource The item to copy as new. * @returns The new item that is created. */ copyAsNew(copySource: T): T; /** * Creates a copy of a given item and sets it as current * unless onCreateNew is specified => Then you are responsible for doing it yourself. * If detailsUrl is specified, the browser is redirectedted there. * Current item is set also in this case (as opposed to listSelect) because the new item does not yet have an id * and passing it in current item is the only way using router. * Use onCreateNew event or crudService.copyAsNew() if you do not want to set the current item. * @param copySourceId The id of the item to copy as new. * @returns The new item that is created. */ copyIdAsNew: (copySourceId: string) => T; /** * Mode for data binding is "singleton" by default. * This means that this.current is bound to crudService.current. * If ng-model is defined for the component (this.ngModelController), * this.current is bound to ngModelController view value (as with form controls). */ getBindingMode(): "model" | "singleton"; /** Called by the view when the item is clicked. */ listSelect: (selectedItem: T) => void; /** Called by the view when the item (id) is clicked. */ listSelectId: (selectedItemId: string) => void; /** Saves the current item. */ saveCurrent(): Promise; /** * Sets the current item: Either to ng-model view value or crudService.setCurrent(). * @param item The item to set as Current. */ setCurrent(item: T): void; /** * Shows the "Are you sure?" dialog and if user clicks OK, deletes the item. * Cancels the started payment for the payroll too. * @param id Identifier of the item to be deleted. * @param confirmMessage Optional custom message for the confirm dialog. * If not specified, a generic message is shown. * If set to boolean false, the confirm message is not shown at all. * @returns Promise that resolves to true if the item is deleted. * False, if user cancels and fails if the deletion fails. */ delete: (id: string, confirmMessage?: string) => Promise; /** * Deletes an item without showing the confirm dialog. * The method shows the "Please wait..." loader, but does not call onDelete * or move the browser to listUrl. The caller should take care * of the UX actions after delete if necessary. * @param id Identifier of the item to be deleted. * @returns Promise that resolves to true (never false). Fails if the deletion fails. */ deleteNoConfirm(id: string): Promise; } /** * 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. */ 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. */ 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_2 | 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 */ declare interface CumulativeData { /** First and last Salary dates (days when Worker receives the salary) and number of payment days. */ salaryDates?: DateRange_2 | null; /** Working days based on the salary calculations. */ workingDays?: DateRange_2 | 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; } /** Contains information about the current sitemap node (if resoved) and other data related to route. */ export declare class CurrentRoute { constructor(currentPath: SitemapNode[]); /** The current path if resolved, otherwise an empty array */ path: SitemapNode[]; /** The current sitemap node */ node: SitemapNode; /** The current section if resolved. */ section: SitemapNode; /** If true, the route is resolved to current sitemap node. */ isResolved: boolean; /** * Gets logical visibility, as used in the views an UI logic, i.e.: * * - hidden: Node is null or visibility is Hidden, HiddenReadOnly or Disabled. * - readOnly: Node is null or visibility is ReadOnly, HiddenReadOnly. * - disabled: Visibility is Disabled. * - Visible: Visibility is Visible or null, node is not null. * - isFullWidth: The node has an isFullWidth boolean flag set to true. * * Supports exclamation mark (!) in the beginning to denote negation (true <=> false). * @param visibility The visibility value to evaluate for. */ getVisibility(visibility: SitemapVisibility | string): boolean; /** Returns true if the page should be displayed read-only */ get readOnly(): boolean; /** * Gets a parameter checking the default value from the schema. * The method fails if the parameter is not defined in the schema. * @param path Path to the sitemap value / schema definition. */ getParam(path: string): any; /** * Checks if the value contain the given flag value. * Typically the value is an array of enum strings and this method checks if it contains an item, * but the method also checks for a direct match (without being an array). * @param path Path to the sitemap value / schema definition. * @param flagValue Text value (typically a string enum) that should be present in the array. */ getFlag(path: string, flagValue: string): boolean; } /** Settings related to payment methods that use the customer funds account (gross payment). */ 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. */ 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; } /** * Controller for listing and browsing Customer Usecases. * NOTE: Access save / modify methods 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 / delete / modify customer invoices in the production environment. */ export declare class CustomerInvoiceCrudController extends ApiCrudObjectController { /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new DatasetsCrudController * @ignore */ constructor(fullApi: CustomerInvoices, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); /** * Controller initialization */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; } /** Header level data for the customer invoices. */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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. */ declare interface CustomerInvoiceListItemData { /** Number of end-companies in the invoice. */ companyCount?: number | null; } /** * Provides CRUD access for Customer invoices */ 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 */ 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. */ 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; } /** * Wizard for Creating a new Palkkaus.fi company account by accountant */ export declare class CustomerOnboardingController extends WizardController { private onboardingService; private sessionService; private authorizedAccountService; private ajax; private $location; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Form data validity */ formDataValidity: boolean; /** If true, step is proceeding */ isStepProceeding: boolean; /** Copy indicator */ linkCopied: boolean; constructor($scope: angular_2.IScope, wizardService: WizardService, onboardingService: OnboardingService, sessionService: SessionService, authorizedAccountService: AuthorizedAccountService, ajax: Ajax, $location: angular_2.ILocationService, data: any); /** * Implement IController */ $onInit(): void; /** Company wizard configuration */ getWizardSteps(): WizardStep[]; /** * The onboarding model is provided by the onboarding service. * */ get model(): Onboarding; /** * Navigates to the next step if possible and saves the data. */ goNext(): void; /** * Navigates to the previous step if possible and saves the data. */ goPrevious(): void; /** Returns true if user can go forward in wizard */ get canGoNext(): boolean; /** Sharing link for singing. */ get signingLink(): string; /** Sharing link for authorization mail. */ get sharingLink(): string; /** Copies link to clipboard */ copyLink(link: string): void; /** Mailto-link with sharing link. */ get mailtoLink(): string; /** * Existing company alert. */ get existingCompanyAlert(): boolean; /** * Proceeds to company selection in e-authorization service. */ goToCompanySelection(): void; /** Commit onboarding */ commit(): void; /** Sets pension fields (defaults) after user input. */ checkPensionCompanySelection(): void; /** Sets insurance fields (defaults) after user input. */ checkInsuranceCompanySelection(): void; /** * Saves the data to server */ save(): Promise; /** * Sets the pension contract number as a test number according to the selected company. */ setPensionNumberForTest(): void; /** * Launches the wizard. * @param accountId Optional account id. */ launch(accountId?: string): Promise; } /** CustomerWebApp enumeration */ declare enum CustomerWebApp { Palkkaus = "palkkaus", CustomSso = "customSso", CustomPalkkaus = "customPalkkaus", NoCustomerUi = "noCustomerUi" } /** * Base component for mass data loading. */ export declare abstract class DataImportComponentBase extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** No controller */ controller: null; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for data imports. */ export declare abstract class DataImportControllerBase implements angular_2.IController { /** JsonSchemaService */ protected jsonSchemaService: JsonSchemaService; /** Angular timeout service */ protected $timeout: angular_2.ITimeoutService; /** Tabular source row data. */ sourceData: Array; /** Target objects mapped from source data, and which should be imported */ targetData: Array; /** Table control*/ table: any; /** Current action */ action: "upload" | "validate" | "import"; /** Current import count */ importCurrent: number; /** Total import count */ importTotal: number; /** Flag for import in progress. */ isImporting: boolean; /** Flag for cancel. */ isCanceled: boolean; /** Optional options */ options: TOptions; /** Template for options */ optionsTemplate: string; /** Data mapper */ protected mapper: DataMapper_2; /** * Creates a new DataImportController * @ignore */ constructor( /** JsonSchemaService */ jsonSchemaService: JsonSchemaService, /** Angular timeout service */ $timeout: angular_2.ITimeoutService); /** * Implement IController */ $onInit(): Promise; /** * Download data or template * @param helpData Help data in the form or array of arrays */ download(helpData?: null): Promise; /** Upload rows to table */ upload(files: any[]): Promise; /** Reset data */ reset(setData?: boolean): void; /** Paste data */ paste(): Promise; /** Map and validate data */ validate(): Promise; /** Returns extra validator */ getExtraValidators(): Array<{ validate: () => void; buttonLabel: string; }>; /** Enrichs data */ getDataEnrichers(): Array<{ enrich: () => void; buttonLabel: string; }>; /** Cancel import */ cancel(): void; /** * Options validation. If required, override this method in the inheritied class. */ hasInvalidOptions(): boolean; /** Import data */ abstract import(): any; /** Help */ abstract help(): any; /** Returns number of undefined validation rows */ get validationUndoneRows(): number; /** Returns number of success rows */ get validationSuccessRows(): number; /** Returns number of error rows */ get validationErrorRows(): number; /** Returns number of success rows */ get importSuccessRows(): number; /** Returns number of error rows */ get importErrorRows(): number; /** Returns number of warning rows */ get importWarningRows(): number; /** Returns number of success rows */ get importIgnoredRows(): number; protected getFieldTitle(field: string): string; protected getEditor(field: string): any; protected validateField(field: string, value: any): boolean; /** Default help data for columns. */ protected getDefaultHelpDataForColumns(): any[]; private setFieldValue; /** Returns the import mapper */ protected abstract getImportMapper(): Promise>; private getImportStatusRows; private init; private hasData; } /** * User interface for debugging definition and values. * @example * ```html * * ``` */ export declare class DataMapper extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The DataMapper that is shown. */ model: string; /** * Type of the user interface: * * - "value-map" (default) Shows the source values in the table, target mapping is editable. * - "debug" Full data mapper debugger / editor UI. * - "source-value" Shows the source values in a table, also the validation column * - "target-value" Shows the target values in a table, also the validation column */ type: string; }; /** Uses the ModalGenericDialogController */ controller: typeof ModalGenericDialogController; /** The default template for the component. */ defaultTemplate: string; } /** * Defines a data mapper that maps data from a Data Source to Data Target. */ declare class DataMapper_2 { /** 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[] | undefined): 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_2; /** * 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 | undefined): void; private reverseChildren; } /** * Information about data mapper that is availble to user / system for * selecting the appropriate mapper(s) for given purpose. */ 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 | undefined; } /** Defines either source or target in DataMapper */ 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 | undefined; /** * 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). */ 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 | undefined, target?: string | undefined, func?: undefined | ((source: TSource, target: TTarget, selector: DataMapperSelector) => any)); /** The path for selecting the source */ source: string | undefined; /** The path for selecting the target */ target: string | undefined; /** The JSON schema property, if found, after the selectors have been resolved */ sourceProp: JsonSchemaProperty | undefined; /** The JSON schema property, if found, after the selectors have been resolved */ targetProp: JsonSchemaProperty | undefined; /** 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 | undefined, targetRootSchema: OpenAPIV3.NonArraySchemaObject | undefined): void; /** Does the mapping from source to target */ doMap(source: TSource, target: TTarget): void; } /** Interface for data row for exports and imports */ 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. */ 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; } 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; } /** * Provides UI for viewing and editing datasets. * @example * ```html * * ``` */ export declare class DatasetDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** Type of user interface to show. */ mode: string; /** Defines the default usecase (uri) that is used for new calculations. */ defaultUsecase: string; detailsUrl: string; /** Defines the default usecase (uri) that is used for new calculations. */ listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the DatasetsCrudController */ controller: typeof DatasetsCrudController; /** Default template is the view */ defaultTemplate: string; } /** Editable metadata info about a dataset. */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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. */ 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. */ 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; } /** * Controller for listing, using and setting the data in Datasets: * Some arbitrary external data, typically Imports, Exports and Reports. */ export declare class DatasetsCrudController extends ApiCrudObjectController { private usecasesService; private jsonSchemaService; private sessionService; private ajax; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Type of component user interface. * Default is usecase if one is specified, otherwise "data-edit". * "full-edit" shows the full editor with data schema selections, adding new data objects etc. */ mode: "full-edit" | "data-edit" | "usecase" | "default"; /** * The usecase definition if specified and loaded. * If the usecase has been checked from server, but none is defined, the value is "none". * For checking whether usecase really is available, check e.g. usecase.uri. */ usecase: null | "none" | SessionUsecase; /** Defines the default usecase (uri) that is used for new objects. */ defaultUsecase: string; /** Available usecases if the user needs to make a selection of which usecase to take. */ usecases: InputEnumOption[]; /** * Creates a new DatasetsCrudController * @ignore */ constructor(fullApi: Datasets, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, usecasesService: UsecasesService, jsonSchemaService: JsonSchemaService, sessionService: SessionService, ajax: AjaxNg1, $timeout: angular_2.ITimeoutService); /** * Controller initialization */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Creates options for the tabs in the UI. */ generateTabOptions: () => any; /** Overrides the reload to assure that usecase is also loaded. */ reload(): Promise; private assureUsecasesLoaded; /** Gets the user interface mode */ getMode(): "data-edit" | "full-edit" | "usecase" | "loading"; /** Adds a new "table" to the dataset */ addDataObject(): void; /** * Removes a data object from the dataset * @param index Index of the object to remove. */ deleteObject(index: number): void; /** Executes the current action with the current item. */ executeAction(action: UsecaseAction): Promise; /** * Adds an item to the default view (first view). Adds the view if it does not already exist. * Method may later be extended to support multiple views and/or more elaborate column properties. * @param dataObjectIndex Index of the data object to which the view item is added. * @param type Add include or exclude rule. * @param value Value to add to the array. */ addViewItem(dataObjectIndex: number, type: "include" | "exclude", value?: string): void; /** * Helper method to move an item in an array up or down. * @param arr Array to operate on * @param fromIndex Index of the item to move * @param step How many items to move and to which direction: -1 is one up, 1 is one down. */ arraymove(arr: [], fromIndex: number, step: number): void; /** * Gets the available schema documents that can be used for modeling the data objects. * @returns Cached collection of available schema documents. */ getSchemaDocs(): InputEnumOption[]; /** * Gets the schemas defined in the specified schema document * @param docUrl The URL (unique key in cache) for the schema document. */ getSchemas(docUrl: any): InputEnumOption[]; /** * Gets the full schema definition for the specified table. * @param index Index number of the data object in the data collection. */ getSchamaDef(index: number): OpenAPIV3.SchemaObject; /** * Gets all the properties within a schema for property selection. * @param index Index number of the data object in the data collection. */ getAllPropertiesOfSchema(index: number): InputEnumOption[]; private getProperties; private schemaCache; private propertyTreeCache; } /** DatasetStatus enumeration */ declare enum DatasetStatus { Draft = "draft", Instance = "instance", Template = "template" } /** DatasetType enumeration */ declare enum DatasetType { Undefined = "undefined", ReportAdHoc = "reportAdHoc", Import = "import", Export = "export", Batch = "batch" } /** Defines a view, typically an array view, for a dataset. */ 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. */ declare type DatelyObject = string | Date | number | number[] | "today" | "yesterday" | "tomorrow"; /** DateOfBirthAccuracy enumeration */ declare enum DateOfBirthAccuracy { Assumption = "assumption", AgeBased = "ageBased", AgeGroupBased = "ageGroupBased", MonthCorrect = "monthCorrect", Exact = "exact", Verified = "verified" } /** * Modified ui.bootstrap.datepicker. * The component can be bound to a string typed variable. * @example * ```html * * ``` */ export declare class Datepicker extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; /** ng-change callback */ onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** * Preset algorithms for enabled/disabled dates. * Currently, "salary" and "next-weekday" are implemented. * If set as "disable-function", you should set the disable-function too. */ dateDisabled: string; /** Disable function for date. If set, date-disabled is ignored. */ disableFunction: string; /** Payment channel. This affects which dates are disabled in the salary date selection. */ paymentChannel: string; /** Zero payment (no worker net salary payment). This affects which dates are disabled in the salary date selection. */ zeroPayment: string; /** * Minimum available date. * Bindable and ISO string version of the datepicker-options.minDate. * Currently not supported together with dateDisabled filters. */ minDate: string; /** * Maximum available date. * Bindable and ISO string version of the datepicker-options.maxDate. * Currently not supported together with dateDisabled filters. */ maxDate: string; /** * If true, can pick multiple dates from the selector. */ isMultiple: string; /** * Whether to show timepicker alongside the calendar. */ timepicker: string; /** * Whether to show Today/Clear buttons below the calendar. */ showButtons: string; /** * External value that causes the disabled dates function to re-run. */ updateDisabledDates: string; /** ng-change callback */ ngChange: string; }; /** Uses the DatepickerController */ controller: typeof DatepickerController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for datepicker control. */ export declare class DatepickerController implements angular_2.IController { private sessionService; private $element; private $timeout; private $scope; static $inject: string[]; form: angular_2.IFormController; /** Label for the control */ label: string; /** The model that is bound to the input */ model: angular_2.INgModelController; /** Form control name */ name: string; /** Validation error text */ validationError: string; /** The datepicker element instance. */ private datepicker; /** True = can change multiple dates, false = single date selection. */ isMultiple: boolean; /** Selection mechanism and format: "month" | "year" | undefined (= dates) */ format: string; /** Mechanism to disable certain dates: "salary" and "next-weekday" are pre-set functions. If set as "disable-function", a custom disabling function can and must be given. */ dateDisabled: "salary" | "next-weekday" | "disable-function" | null; /** If dateDisabled="disable-function", this function acts as the disabler. */ disableFunction: any; /** Dates before this are disabled in the picker. */ minDate: string; /** Dates after this are disabled in the picker. */ maxDate: string; /** Defines HTML for tooltip button */ tooltipHtml: string; /** Payment channel. This affects which dates are disabled in the salary date selection. */ paymentChannel: PaymentChannel; /** Boolean indicating if the net salary payment to the worker is zero. */ zeroPayment: boolean; /** * If true, displays the control as read-only div instead of the input control. * This "read-only" attribute is visualized in a different way than standard html "readonly" (ng-readonly): * The input is not shown and display is more compact. * Also note, that you may change the same read-only for the form using readonly / ng-readonly attribute. * @example * ```html *
* * * * */ readOnly: boolean; /** * @deprecated Use "require" instead: * This attribute overlaps with required/ng-required directive, which produces unexpected results. */ required: string; /** In multiple mode, the days count is set in this variable. */ daysCount: number; /** True = show timepicker alongside the calendar. */ timepicker: boolean; /** False = hide Today/Clear buttons below the datepicker. Note: in multiple mode buttons are always hidden. */ showButtons: boolean; /** Datepicker is initialized only once. */ private datepickerInitialized; /** Value of the datepicker. */ private _value; /** Manual input value of the datepicker. */ private _manualInput; /** True = inline datepicker. */ private isInline; /** Getter and setter for the datepicker value. */ get datepickerValue(): string; set datepickerValue(value: string); /** External value that causes the disabled dates function to re-run and update the datepicker component. */ updateDisabledDates: any; constructor(sessionService: SessionService, $element: JQLite, $timeout: angular_2.ITimeoutService, $scope: angular_2.IScope); /** Set the values and defaults on init */ $onInit(): void; /** Handles the external change of the disabled dates. */ private onDisabledDatesExternalChange; /** * Initialize the datepicker element. */ initDatepicker(isManualInputInit?: boolean): void; /** Disables dates in the datepicker. Used right after the initialization or when an external value dictates so. */ private disableDates; /** * Calculates the days count from a value object. * @param value Value object with days array or daysCount property. * @returns The number of days. */ private getDaysCount; /** Wrapper for updating component value. Note: update is always made "silent", so that the onSelect event won't get fired. */ private setDatepickerCalendarValue; /** * Pick date from the calendar plugin event method. * @param date Date value that's picked in the datepicker. */ private onSelect; /** * Determines if a given date is disabled based on the dateDisabled configuration. * Handles both custom disable functions and built-in disable methods. * @param date The date to evaluate. * @returns boolean Either true = date is disabled, false = not disabled. */ private isDateDisabled; /** * Checks if given date is disabled with one of two methods: "next-weekday" and "salary". * @param date The date to evaluate. * @returns boolean Either true = date is disabled, false = not disabled. */ checkDateDisabled(date: any): boolean | undefined; /** Gets the readonly value either from the controller or from the form */ protected getReadOnly(): boolean; /** Gets or sets the presence of the required validator in the underlying model. */ get require(): boolean; set require(value: boolean); /** Do validations. */ validate(): boolean; /** * Manually typed date changed. */ changeManualDate(): void; /** * Normalizes manual input based on format type. */ private normalizeManualInput; /** * Gets the appropriate validation error key based on format. */ private getValidationErrorKey; /** * Sets the error message of the datepicker. * @param errorMessage The error message to set. */ private setError; private clearValues; } /** * Validates the datepicker manual input using the same rules * as the actual calendar selection control. * Currently this directive is used internally in salaxy-datepicker-popup only. * */ export declare class DatepickerInputValidationDirective implements angular_2.IDirective { /** * Factory for directive registration. * @ignore */ static salaxyDatepickerInputValidation(): { (): DatepickerInputValidationDirective; $inject: any[]; }; /** * Applies to attributes only. * @ignore */ restrict: string; /** * Requires model. * @ignore */ require: string; /** * Creates a new instance of the directive. */ constructor(); /** * Validates the datepicker manual input using the same rules * as the actual calendar selection control. * @ignore */ link(scope: any, element: any, attrs: any, ngModel: any): void; } /** * Modified ui.bootstrap.datepickerPopup. * The component can be bound to a string typed variable. The standard ui.bootstrap.datepickerPopup can be bound successfully only to a Date variable. * @example * ```html * * * ``` */ export declare class DatepickerPopup extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** Format for the date, default is d.M.yyyy */ format: string; /** * Preset algorithms for enabled/disabled dates. * Currently, only "salary" is supported for salary dates, but more might be added later. * If set as "disable-function", you should set the disable-function too. */ dateDisabled: string; /** Disable function for date. If set, date-disabled is ignored. */ disableFunction: string; /** Payment channel. This affects which dates are disabled in the salary date selection. */ paymentChannel: string; /** Zero payment (no worker net salary payment). This affects which dates are disabled in the salary date selection. */ zeroPayment: string; /** * Minimum available date. * Bindable and ISO string version of the datepicker-options.minDate. * Currently not supported together with dateDisabled filters. */ minDate: string; /** * Maximum available date. * Bindable and ISO string version of the datepicker-options.maxDate. * Currently not supported together with dateDisabled filters. */ maxDate: string; /** ng-change callback */ ngChange: string; /** * External value that causes the disabled dates function to re-run. */ updateDisabledDates: string; }; /** Uses the DatepickerController */ controller: typeof DatepickerPopupController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for datepicker popup control. */ export declare class DatepickerPopupController extends DatepickerController { /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Date format in text input. Default is d.M.yyyy */ format: string; constructor(sessionService: SessionService, $element: JQLite, $timeout: ng.ITimeoutService, $scope: ng.IScope); /** Gets the tooltip HTML with necessary escape. */ protected getToolTipHtml(): string; } /** * Provides a user interface for picking up a date range * and optionally specifying also the number of working days within that range. * @example * ```html * * ``` */ export declare class DateRange extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; /** Uses the DateRangeController */ tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** * Label for the scondary input (Default: SALAXY.NG1.DateRange.labelDaysCount). * Translation is attempted. */ labelDaysCount: string; /** * The selection mode is either: * * - "range" for (default) calendar control with start and end. * - "calc" for period selection that is optimized for salary calculation (months, 2 weeks, 1/2 months etc.) */ mode: string; /** * Fires an event when the model is changing: Any of the values specific to the model are changing: start, end or daysCount. * This should typically used instead of ng-change because ng-change will only fire if the object reference changes. * On-change fires when dates or day count changes and this is typically what you are looking for. * @example */ onChange: string; /** * The data range values: start, end, daysCount and formattedDate. */ dateRangeValues: string; }; /** Uses the DateRangeController */ controller: typeof DateRangeController; /** The default template for the component. */ defaultTemplate: string; } /** Describes the range of dates from start to end and the number of days in between. */ declare interface DateRange_2 { /** 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; } /** * Provides a user interface for picking up a date range * and optionally specifying also the number of working days within that range. */ export declare class DateRangeController implements angular_2.IController { private $element; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Label for the control */ label: string; /** Label for the scondary input. Translation is attempted. Default is SALAXY.NG1.DateRange.labelDaysCount. */ labelDaysCount: string; /** The model that is bound to the input */ model: angular_2.INgModelController; /** The datepicker element instance. */ private datepicker; /** * The selection mode is either: * - "range" for (default) calendar control with start and end. * - "calc" for period selection that is optimized for salary calculation (months, 2 weeks, 1/2 months etc.) */ mode: "range" | "calc"; /** Form controller, if available */ form: angular_2.IFormController; /** If there is a validation error in period start, it is added here. */ periodStartDateError: null; /** * If true, displays the control as read-only div instead of the input control. * This "read-only" attribute is visualized in a different way than standard html "readonly" (ng-readonly): * The input is not shown and display is more compact. * Also note, that you may change the same read-only for the form using readonly / ng-readonly attribute. * @example * ```html * * * * * */ readOnly: boolean; /** * Fires an event when the model is changing: Any of the values specific to the model are changing: start, end or daysCount. * This should typically used instead of ng-change because ng-change will only fire if the object reference changes. * On-change fires when dates or day count changes and this is typically what you are looking for. * @example */ onChange: () => void; /** Validation error text */ validationError: string; /** User interface shortcuts for period selection */ periodShortcuts: { /** Text for current month. */ monthCurrent: string; /** Text for last month. */ monthLast: string; /** Text for other month. */ monthOther: string; /** Text for two weeks. */ weeks2: string; /** Text for half a month */ monthHalf: string; /** Text for other period. */ other: string; }; /** Form control name */ name: string; /** If true, the input value is required */ require: boolean; /** Value, that is used when selecting "other" period selection by typing a manual start date. */ private _periodStartDate; /** Object containing all the values in the date range selection (start, end, days and daysCount). */ dateRangeValues: DateRange_2 & { formattedRange?: string; }; /** Formatted start date displayed in the input field */ private _valueStart; /** Formatted end date displayed in the input field */ private _valueEnd; /** User's manual input for start date */ private _manualInputStart; /** User's manual input for end date */ private _manualInputEnd; /** Getter and setter for the start date value for the input field */ get datepickerValueStart(): string; set datepickerValueStart(value: string); /** Getter and setter for the end date value for the input field */ get datepickerValueEnd(): string; set datepickerValueEnd(value: string); constructor($element: JQLite, $timeout: angular_2.ITimeoutService); /** Set the values and defaults on init */ $onInit(): void; /** Gets or sets the period start date */ get periodStartDate(): string; set periodStartDate(value: string); /** Gets the user interface shortcut for the period. */ get periodShortcut(): string; set periodShortcut(value: string); /** * Initialize the datepicker element. */ initDatepicker(): void; /** * Builds a complete DateRange object with formattedRange. * @param dateRange Partial or complete DateRange object * @returns Complete DateRange object with formattedRange */ private buildDateRangeValues; /** * Sets the current date range values and updates view/model as needed. * @param dateRangeVals The date range values to set (should contain start and end). * @param updateDatepickerElemValues If true, updates the datepicker element to reflect new values. */ private setValues; /** * Datepicker element change event method. * @param date Date values that are picked in the datepicker. */ private onSelect; /** Gets the readonly value either from the controller or from the form */ protected getReadOnly(): boolean; /** * Normalizes date format by padding day and month with leading zeros. * @param value The date string to normalize (e.g., "1.2.2024") * @returns Normalized date string (e.g., "01.02.2024") */ private normalizeDate; /** * User types either the start or end date manually. */ changeManualDate(): void; /** * Sets the error message and clears the date range values. * @param errorMessage The error message to set. */ private setError; /** * Called when the daysCount input is manually changed. */ onDaysCountChange(): void; } /** * Provides methods for registering the Directives to module * (and other related metadata in the future). */ export declare class DirectivesRegistration { /** Gets the directives for Module registration. */ static getDirectives(): { salaxyIfRole: { (sessionService: SessionService, ngIfDirective: any): IfRoleDirective; $inject: string[]; }; salaxyAppendNode: { (): AppendNodeDirective; $inject: any[]; }; salaxyDatepickerInputValidation: { (): DatepickerInputValidationDirective; $inject: any[]; }; salaxyLoader: { (): LoaderDirective; $inject: any[]; }; sxyBs5Tooltip: { (): Bs5Tooltip; $inject: any[]; }; sxyBs5Popover: { (): Bs5Popover; $inject: any[]; }; sxyIfRole: { (sessionService: SessionService, ngIfDirective: any): IfRoleDirective; $inject: string[]; }; sxyIfSitemap: { (naviService: NaviService, ngIfDirective: any): IfSitemapDirective; $inject: string[]; }; sxyOrderby: { (): OrderbyDirective; $inject: any[]; }; sxyTaxPercent: () => any; sxyCurrency: () => any; sxyIban: () => any; sxyEmail: () => any; sxyEnumAsBoolean: () => any; sxyMobilePhone: () => any; sxyExcludeUnknowns: () => any; sxyBankReferenceFi: () => any; sxyPersonalIdFi: () => any; sxyCompanyIdFi: () => any; sxyOfficialIdFi: () => any; sxyPostalCodeFi: () => any; sxyNumber: () => any; sxyInteger: () => any; sxyMax: () => any; sxyMin: () => any; sxyMultipleOf: () => any; sxyPensionContractNumber: () => any; sxyHtml: any; sxyText: any; }; } /** Document in the document flow. */ declare interface DocumentFlowItem { /** Existing business object in the document flow. */ item?: IApiListItem | null; /** Child items, for example invoices for the calculation. */ children?: DocumentFlowItem[] | null; } /** * Controller for Item edit dialogs. */ export declare class EditDialogController { editDialogParams: EditDialogParameters; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * The item that is being edited. * This a copy of the original item to allow cancel / reset and other change tracking. */ current: any; /** Additional logic: Helper functions, metadata etc. that view can use to contruct the UI. */ logic: any; constructor(editDialogParams: EditDialogParameters); /** * Implement IController */ $onInit: () => void; } /** * Known dialog actions: Buttons that result in closing the dialog. * A dialog action can be a string for special purposes, but if the dialog action is something clerly reuasable, you may add it here. */ export declare enum EditDialogKnownActions { /** Primary action of the dialog: Often Save (Insert / Update) */ Ok = "ok", /** Primary action of the dialog: Often Save (Insert / Update). Does not perform any save operation against api. */ OkNoCommit = "ok-no-save", /** * Cancel / reset dialog action. * Also the close button at the top-right corner, esc keyboard action and clicking outside dialog when available. */ Cancel = "cancel", /** * Delete item action in editor windows. */ Delete = "delete", /** * Delete item action in editor windows. Does not perform any delete operation against api. */ DeleteNoCommit = "delete-no-save" } /** * Parameters that are passed to an Edit dialog using uiHelpers.openEditDialog() * and potentially in the future by other logic. */ export declare class EditDialogParameters { /** The edited item - published as $ctrl.current within the view. */ current: TItem; /** * Additional logic that can be used to pass small functions and non-item parameters / data to view. * Large amounts of logic should be passed as custom controllers. * Published as $ctrl.logic within the view. */ logic: any; } /** Result from a modal dialog */ export declare class EditDialogResult { /** * Result of the modal is typically either OK or Cancel. * Edit dialogs often also have "delete", but you may add custom actions. */ action: EditDialogKnownActions | string; /** * Result is the object that Dialog sends back in $close() method. * If this is string, it is interpreted as action. */ result: EditDialogKnownActions | string | { /** Action of the result. */ action?: EditDialogKnownActions | string; } | any; /** * Data that is being edited in the dialog. */ item: TItem; /** * The logic part should typically contain functions for the modal view, but in exceptional * scenarios you may pass some data back here as well. */ logic: any; /** If true, the item has been edited by the user and should typically be saved. */ hasChanges: boolean; } /** Result item of the EInvoice address query. */ 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. */ 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; } /** * The controller is used in creating embedded UI:s: When this NG1 based SPA is run in an iframe * and the parent sends token, session and settings as window messages. */ export declare class EmbeddedUiController implements angular_2.IController { private sessionService; private $timeout; private ajax; private $location; private userSettingsService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private _isLoading; /** * Creates a new EmbeddedUiController * @ignore */ constructor(sessionService: SessionService, $timeout: angular_2.ITimeoutService, ajax: AjaxNg1, $location: angular_2.ILocationService, userSettingsService: UserSettingsService); /** * Implement IController */ $onInit: () => void; /** * If true, the layout should show a full-page loader instead of normal pages. * Controllers in normal pages should be destoyed (e.g. using ng-if) so that this can also * be used in reloading the AngularJS user interface without full Browser reload. */ get showFullPageLoader(): boolean; /** * Gets the user-specific setting (service), stored in the local storage. */ get userSettings(): UserSettingsService; private firstMessageTimeout; private parentOrigin; /** * Starts listening for the session change events from the parent frame. */ startListening(): void; private onMessageReceived; } /** Definition for an employee group, e.g. "Office workers", "Blue collar workers" etc. */ declare interface EmployeeGroupDefinition { /** Id for the Employee Group. */ id?: string | null; /** Name for the Employee Group. */ name?: string | null; } /** Models the business logic of Employer side of the calculation. For documentation, see the IEmployerCalculation interface. */ 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 */ declare interface EmployerGroups { /** If true, the Employer is a private person. Otherwise Company or Unknown. */ isPrivatePerson?: boolean | null; } /** * Shows employer list * @example * ```html * * ``` */ export declare class EmployerList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Current list of items. */ items: string; /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selection. Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item. * @example */ onEmployerSelect: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcSharingController */ controller: typeof EmployerListController; /** The default template for the component. */ defaultTemplate: string; } /** * List of employers */ export declare class EmployerListController implements angular_2.IController { private employmentsApi; protected uiHelpers: UiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Employing relations for the current account */ employingRelations: ApiListItem[]; employerId: string; /** Items once loaded from the server. This is an empty array when the loading starts. */ items: any[]; /** Selected search items */ selectedItems: any[]; /** True if no employer is selected */ showFullEmployerList: boolean; /** * Creates a new EmployerSelectController * @ignore */ constructor(employmentsApi: Employments, uiHelpers: UiHelpers); /** * Implement IController */ $onInit(): void; /** * Loads employing relations of the existing employers for the current account. * @param options OData query options. */ loadEmployingRelations(options?: ODataQueryOptions): Promise; /** * Function that is called when user selects an employer in the list. * Function has the following locals: value: true/false, item: the last selected/unselected item. * @example */ onEmployerSelect: (params: { /** In multi-select mode, the value may be true (selected) or false (unselected). */ value: true | false; /** Item that was last selected / deselected. */ item: any; /** All items that are currently selected. */ allItems: any[]; }) => void; /** * Sets an item as selected. * @param item Item to set as selected * @param value Selected true / false or "toggle" to toggle to other value. */ setEmployerSelected(item: any, value?: true | false | "toggle"): void; /** * Returns true if the item is selected. * @param item Item to check for selected value. */ isEmployerSelected(item: any): boolean; /** Unselect all */ unselectAll(): void; /** Selects employer */ selectEmployer(employerId: string): void; } /** * Shows the employer report. * @example * ```html * * ``` */ export declare class EmployerReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the EmployerReportController */ controller: typeof EmployerReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Employer report. */ export declare class EmployerReportController implements angular_2.IController { private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Year options for the year select control. */ yearOptions: { value: string; name: string; }[]; private _currentReport; private _selectedYear; private _employers14BGroups; constructor(ajax: Ajax); /** * Controller initializations */ $onInit: () => void; /** * Returns the currently loaded report data. */ get currentReport(): any; /** * Returns the currently selected year. */ get selectedYear(): any; /** * Sets the currently selected year and reloads the data. */ set selectedYear(year: any); /** * Returns employer ids and names in groups of two as in the 14B form (14B Kotitalousvähennys – * työntekijälle maksettu palkka (3026)) */ get employers14BGroups(): any; /** * Returns the employer id from the current report data if available otherwise undefined. */ get employerId(): string; /** * Returns the salary amount for TVR (Työttömyysvakuutusrahasto). */ get tvrSalaryAmount(): number; /** * Returns avatar data based on the given url. * @param url Avatar url. * @returns Avatar data. */ avatarFrom(url: string): any; /** * Returns the worker email address from a report object otherwise null or undefined. * @param report The report object to search for worker email. * @returns Returns the email address or null/undefined. */ workerEmailFrom(report: any): string; /** * Checks if the selected reporting year is before incomes registry was established and/or * implemented. * @returns Returns true if selected year is before and false otherwise. */ get isSelectedYearBeforeIncomesRegistry(): boolean; /** * Returns the authorization token for the current user. */ get token(): string; /** * Returns the api server address. */ get apiServerAddress(): string; private avatarDataFromIcon; private avatarDataFromUrl; private refreshData; private extractEmployer14BGroups; } /** * Shows employer selection * @example * ```html * * ``` */ export declare class EmployerSelect extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Current list of items. */ items: string; /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selection. Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item. * @example */ onEmployerSelect: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the CalcSharingController */ controller: typeof EmployerSelectController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller handles Employer selection */ export declare class EmployerSelectController implements angular_2.IController { private employmentsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Employing relations for the current account */ employingRelations: ApiListItem[]; /** Items once loaded from the server. This is an empty array when the loading starts. */ items: any[]; /** Selected search items */ selectedItems: any[]; /** True if any employer is selected */ showFullEmployerList: boolean; /** * Creates a new EmployerSelectController * @ignore */ constructor(employmentsApi: Employments); /** * Implement IController */ $onInit(): void; /** * Loads employing relations of the existing employers for the current account. * @param options OData query options. */ loadEmployingRelations(options?: ODataQueryOptions): Promise; /** * Function that is called when user selects an employer in the list. * Function has the following locals: value: true/false, item: the last selected/unselected item. * @example */ onEmployerSelect: (params: { /** In multi-select mode, the value may be true (selected) or false (unselected). */ value: true | false; /** Item that was last selected / deselected. */ item: any; /** All items that are currently selected. */ allItems: any[]; }) => void; /** * Sets an item as selected. * @param item Item to set as selected * @param value Selected true / false or "toggle" to toggle to other value. */ setEmployerSelected(item: any, value?: true | false | "toggle"): void; /** * Returns true if the item is selected. * @param item Item to check for selected value. */ isEmployerSelected(item: any): boolean; /** Unselect all */ unselectAll(): void; } /** Employing relation info for the worker. */ 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. */ declare interface EmployingRelationCostAccounting { /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** Settings for the employing relation. */ 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. */ 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; /** Customer specific business configurations. */ configs?: BizConfig[] | null; /** Accrued time for the employment relation. */ accruals?: EmploymentAccrual[] | 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; } /** Accrued time for the employment. */ declare interface EmploymentAccrual { /** Accrued time type. */ type?: string | null; /** Start date of the accrued time. */ startDate?: string | null; /** End date of the accrued time. */ endDate?: string | null; /** Amount of time */ amount?: number | null; /** Unit for time. */ unit?: Unit | null; } /** * CRUD functionality for Employment relation. */ export declare class EmploymentCrudController extends ApiCrudObjectController { private fullApi; private sessionService; private fileService; private jsonSchemaService; private uiCrudHelpers; private $timeout; private calculations; private $route; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, the save/delete etc. buttons are not shown (they will come from the container / modal) */ isModal: boolean; /** * If set, the Worker details component can show infromation about the latest taxcard in the view. * This is not present in the employment, but taxcards controller may be present in the same view. * @example * In the Details.html view we set: * */ taxcardsController: EmploymentTaxcardsController; employmentForm: angular_2.IFormController; constructor(fullApi: Employments, sessionService: SessionService, fileService: FileService, jsonSchemaService: JsonSchemaService, uiCrudHelpers: UiCrudHelpers, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, $timeout: angular_2.ITimeoutService, calculations: Calculations, $route: angular_2.route.IRouteService); /** * Initialization code. */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Gets or sets the taxcard type in employment. * In set, shows a confirm dialog before committing the change. */ get taxcardType(): EmploymentRelationTaxcard; set taxcardType(value: EmploymentRelationTaxcard); /** Returns true if the employer is a household employer (person as opposed to company). */ get isHousehold(): boolean; /** * Gets a description text for an employment relation * @param employment The employment relation to describe. */ getEmploymentDescription(employment: Employment | EmploymentListItem): 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). */ getActiveText(employment: Employment | EmploymentListItem): string; /** * Gets the tax card info text for active taxcard. */ getTaxCardInfo(): { /** Text that is shown to the end user. */ text: string; /** If true, the taxcard is missing => show as error. */ isMissing: boolean; } | undefined; /** * Gets a contact of specific type. * @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. */ getContact(type: ContactType | null, createIfNotExists?: boolean): ContactAdvanced | null; private _readOnlyDefaultContact; /** * Returns default contact as read only. */ get readOnlyDefaultContact(): {}; /** * Gets the text for a Taxcard type badge (short text in lists). * Returns null if the badge should not be shown. */ getTaxcardBadge(cardType: EmploymentRelationTaxcard): string | null; /** * Opens the new Employment relation wizard and if a new relation is created, moves the user to the list view. */ launchCreateEmploymentWizard(): void; /** * Shows a dialog for editing an existing employment. * If user clicks OK, the changes are saved. * @param employmentId - Identifier of the Workers employment. * @param buttonTypes "default" shows standard save button, * "updateCalc" shows two buttons "ok" for full calc update and "ok-no-rows" update without touching default rows. * @param initialTab - Tab to open. * @returns Dialog result. Note that OK result may be either "ok" or "ok-no-rows". * The latter means that for calculation only worker info should be updated, not the default rows. */ openEditEmploymentDialog(employmentId: string, buttonTypes: "default" | "updateCalc", initialTab?: EmploymentDetailsTabs): Promise>; /** * Returns Exportable api for the used crud. * @returns Exportable api. */ getExportable(): Exportable; /** * Deletes the current employment if there are no associated calculations. * This method checks for any calculations associated with the current employment. * If no calculations are found, it proceeds to delete the employment. * Otherwise, it shows an alert indicating that the employment cannot be deleted because there are associated calculations that need to be removed first. */ deleteEmployment(): Promise; /** * Opens a list of employment relations in to a dialog window. * Creates list of selected employments and updates taxcard to auto. * @param items Optional array of currently loaded/visible items. * The data.taxcard is updated so that the changes are refelected in the list. */ selectAutoTaxcardForEmployments(items?: EmploymentListItem[]): void; /** * Called when the type of pension calculation changes * => Sets the PartialOwner and NoPensionRequired IncomeEarnerTypes accordingly. */ pensionCalculationChange(): void; /** Gets the session - currently used for company type */ get session(): UserSession; /** Called when the type of employment changes => Sets the income earner types accordingly. */ employmentTypeChange(): void; /** Gets the cached version of the social security selection. */ get socSec(): EmploymentSocialSecurityModel; /** Gets or sets the current country. When setting, the "foreign" address is reset. When getting Finland (fi) is converted to null. */ get country(): Country | null; set country(value: Country); /** * 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) */ getSocialSecurityModel(settings: AccountSettingsInSession, type: EmploymentRelationType, socialSecurity: "default" | "foreign" | "mixed", pensionCalculation: PensionCalculation, pensionCompany: PensionCompany, insuranceCompany: InsuranceCompany, socSecExceptions: InternationalSocialSecurityException[]): EmploymentSocialSecurityModel; /** Overrides the Save method so that it realoads the taxcards controller if present. */ save(): Promise; /** Recalculate pay statistics for the current employment */ recalculatePayStats(): Promise; /** Recalculate pay statistics for all employments */ recalculateAllPayStats(): Promise; /** * Gets a tooltip that shows which fields are editied in the employment relation to be different * from the worker account (what the registered Worker has input in their UI). * @param inputName Name of the field in Contact or "ibanNumber". * @returns Tooltip text if there is a diff and tooltip should be shown. */ getInputTooltip(inputName: "email" | "telephone" | "street" | "postalCode" | "city" | "ibanNumber"): string | undefined; /** * Returns the true if the field is required for the more complex UI fields. * @param inputName Name of the field in Contact address (currently email and telephone never required) or "ibanNumber". * @returns True if required. */ isRequired(inputName: "street" | "postalCode" | "city" | "ibanNumber"): boolean; /** * Returns true if the current personal ID is other identifier than Finnish Personal Identification Number (keinohetu). */ get isOtherIdentifier(): boolean; private _otherEmployments; /** * Gets the list of other employments with this personal ID. * First call starts the loading process and returns undefined. * Once response is received, the getter returns an array of employments (list items). */ get otherEmployments(): EmploymentListItem[] | undefined; /** Provides the logic for worker calculations OData UI. */ calcListLogic: { /** * Returns true if the calculation is for another employment relation than the current one. * @param calc Calculation to evaluate. * @returns True, if the calculation is for another employment relation. */ isNotCurrentEmployment: (calc: CalculationListItem) => boolean; }; } /** Employment specific business data for index. */ 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; } /** * Renders an edit view for single Employment relation (Worker for one Employer). * @example * ```html * * ``` */ export declare class EmploymentDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** Current tab in initialization. */ currentTab: string; /** If true, the component is shown in modal: Hide buttons and switch employment works in a different way. */ isModal: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the EmploymentCrudController */ controller: typeof EmploymentCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Tabs available in the Employment Relations details view */ export declare type EmploymentDetailsTabs = "default" | "calculations" | "taxcards" | "employment" | "calcRows" | "holidays" | "absences" | "records"; /** 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. */ 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; } /** * Shows a list of employment relations for an employer. * Note that for backward compatibility, this list is also available as * salaxy-worker-list component (to be removed). * @example * ```html * * * ``` */ export declare class EmploymentList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selections (single and multi). Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items. * @example */ onListSelect: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Type of the view. Currently supports "default" and "select" */ mode: string; /** Max count of workers to show in the list. */ limitTo: string; /** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */ readOnly: string; /** boolean indicating if toolbar should be shown*/ showToolbar: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** Represents a single item in a list of employment relations in the user interface. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** General information about the Employment relation. */ 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; /** Applicable collective agreement */ cbaCode?: number | null; /** Employee group. */ employeeGroup?: string | 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. */ 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 */ declare enum EmploymentRelationSalaryPaymentMethod { BankAccount = "bankAccount", External = "external" } /** EmploymentRelationStatus enumeration */ declare enum EmploymentRelationStatus { Unknown = "unknown", Primary = "primary", SecondaryCurrent = "secondaryCurrent", Archived = "archived" } /** EmploymentRelationTaxcard enumeration */ declare enum EmploymentRelationTaxcard { Undefined = "undefined", Auto = "auto", Manual = "manual", NoTaxCard = "noTaxCard", TaxAtSource = "taxAtSource" } /** EmploymentRelationType enumeration */ 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. */ 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; /** * Recalculates the pay statistics for the employment relation. * @param employmentId The employment relation for which to calculate the statistics values. * @returns A Promise with employment data containing pay stats. */ recalculateEmploymentPayStats(employmentId: string): Promise; /** * Recalculates the pay statistics for all employment relations. * @returns A Promise with employments containing pay stats. */ recalculatePayStats(): Promise; } /** * Mainly for user interfaces defines of model of potential choises available for the user: * pension, insurance and social security selections. */ 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[] | null; /** 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[]; } /** * Helps listing current all tax cards for an employment relation (latest and previous ones). * @example * ```html * * ``` */ export declare class EmploymentTaxcards extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Employment ID of the Worker whose taxcards are shown in the component. */ employmentId: string; /** * View mode: * * - "active" only shows the active taxcard. * - "list" only shows the history list. * - "all" (default) shows both active and history. */ mode: string; /** * Event that is called when a taxcard is saved and the parent UI probably needs to be refreshed. * @example */ onSave: string; /** If true, does not show the save / current buttons - the parent must show them. */ hideButtons: string; }; /** Uses the EmploymentTaxcardsController */ controller: typeof EmploymentTaxcardsController; /** The default template for the component. */ defaultTemplate: string; } /** * Helps listing current all tax cards for an employment relation (latest and previous ones). */ export declare class EmploymentTaxcardsController implements angular_2.IController { private taxcards; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The data after it has been loaded. Null if nothing is loaded yet. */ current: WorkerCurrentTaxcards; /** * View mode: * * - "active" only shows the active taxcard. * - "list" only shows the history list. * - "all" (default) shows both active and history. */ mode: "active" | "list" | "all"; /** * Today is explicitly defined, so that it can be changed in testing. */ today: string; /** If true, does not show the save / current buttons - the parent must show them. */ hideButtons: boolean; /** * Event that is called when a taxcard is saved and the parent UI probably needs to be refreshed. * @example */ onSave: (eventData: { /** The selected item. */ item: Taxcard; }) => void; private _employmentId; /** Creates a new EmploymentTaxcardsController */ constructor(taxcards: Taxcards, uiHelpers: UiHelpers); /** Initializes the controller. */ $onInit: () => void; /** * Defines to which employment relation the functionality is bound to. * The setter also starts the loading process. */ get employmentId(): string; set employmentId(value: string); /** List of taxcards after it has been loaded. Null if nothing is loaded yet. */ get list(): TaxcardListItem[]; /** Reloads the data from the server. */ reload(): void; /** * Removes a taxcard from the list and does a refresh. * @param id Taxcard id. */ deleteTaxCard(id: string): void; /** Edit income log. */ editIncomeLog(): void; } /** * Wizard for creating a new employment relation. */ export declare class EmploymentWizardController extends WizardController { private editDialogParameters; private sessionService; private uiHelpers; private api; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Form data validity: This is bound from the form tag in the view. */ formDataValidity: boolean; /** The employment relation that is being added. */ current: Employment; /** Taxcard that is optionally added. */ taxcard: Taxcard; /** * Creates a new WizardController with dependency injection. * @ignore */ constructor($scope: angular_2.IScope, editDialogParameters: EditDialogParameters, wizardService: WizardService, sessionService: SessionService, uiHelpers: UiHelpers, api: Employments); /** * Initialization of the controller */ $onInit(): void; /** Returns true if user can go forward in the wizard */ get canGoNext(): boolean; /** Gets the session - currently used for company type */ get session(): UserSession; /** Called when the type of employment changes => Sets the income earner types accordingly. */ employmentTypeChange(): void; /** Gets the cached version of the social security selection. */ get socSec(): EmploymentSocialSecurityModel; /** Gets or sets the current country. When setting, the "foreign" address is reset. When getting Finland (fi) is converted to null. */ get country(): Country | null; set country(value: Country); /** * 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) */ getSocialSecurityModel(settings: AccountSettingsInSession, type: EmploymentRelationType, socialSecurity: "default" | "foreign" | "mixed", pensionCalculation: PensionCalculation, pensionCompany: PensionCompany, insuranceCompany: InsuranceCompany, socSecExceptions: InternationalSocialSecurityException[]): EmploymentSocialSecurityModel; /** * Called when the type of pension calculation changes * => Sets the PartialOwner and NoPensionRequired IncomeEarnerTypes accordingly. */ pensionCalculationChange(): void; private _otherEmployments; private _otherEmploymentsLastPersonalId; /** * Gets the list of other employments with this personal ID. * First call starts the loading process and returns undefined. * Once response is received, the getter returns an array of employments (list items). * The method also initializes the taxcard (if personal ID is changed and valid). */ get otherEmployments(): EmploymentListItem[] | undefined; /** * Gets a description text for an employment relation * @param employment The employment relation to describe. */ getEmploymentDescription(employment: Employment | EmploymentListItem): 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). */ getActiveText(employment: Employment | EmploymentListItem): string; /** * Populates worker 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). */ populateWithTestData(useRealPersonaIdRange?: boolean): void; /** * Deletes a calculation row. * @param rowIndex - Zero based row index of the row that should be deleted. */ deleteSalaryDefaultsRow(rowIndex: number): void; /** Returns true if the employer is a household employer (person as opposed to company). */ get isHousehold(): boolean; /** Worker wizard configuration */ getWizardSteps(): WizardStep[]; /** Saves the taxcard and closes the dialog. */ saveAndClose(closeFunction: (result: any) => any): void; /** * Gets the contact information of the worker. Contact of the specific type will be created if one does not exist. * @param type Type of contact info. * @returns Contact object for data binding. */ getContact(type?: ContactType): ContactAdvanced | undefined; /** * Returns true if the current personal ID is other identifier than Finnish Personal Identification Number (keinohetu). */ get isOtherIdentifier(): boolean; private checkPersonalId; } /** * Parser and formatter functions for different enum inputs. * This is required for AngularJS versions less than 1.6 */ export declare class EnumParserFunctions { /** * Boolean conversion. * @example * ```html * * ``` */ static sxyEnumAsBoolean(): () => any; private static directive; private static getLink; private static booleanParser; private static defaultFormatter; } /** Utility service for generating excel files. */ export declare class ExcelHelpers { /** * Converts a data table to an excel file. * @param tableData Array of rows to convert to an excel file. Each row consists of an array of cell values. * @param fileName Name for the excel file without the file extension. */ static export(tableData: any[], fileName: string): Promise; /** * Converts multiple data tables to a zip file containing excel files. * @param tablesData Multiple data tables. Each table contains an array of rows to convert to a excel file. Each row consists of an array of cell values. * @param zipName Name for the zip file without the file extension. */ static exportMany(tablesData: { /** Array of rows to convert to an excel file. Each row consists of an array of cell values. */ tableData: any[]; /** Name for the excel file without the file extension. */ fileName: string; }[], zipName: string): Promise; private static zipcelx; private static getRowMapper; private static getFieldMapper; } /** * Component for ExpenseReport usecase * @example * ```html * * ``` */ export declare class ExpenseReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { reportType: string; crudController: string; parent: string; onCommit: string; onReset: string; onStartEdit: string; isInEdit: string; mode: string; }; /** Uses the WorkerExpenseReportController */ controller: typeof WorkerExpenseReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Interface for objects which implement export functionality. */ 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[]; } /** * Controller that provides export functionality for any data. */ export declare class ExportController implements angular_2.IController { private alertService; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Maximum length of the data export. * Because of the implementation of the enum input, the value is number as a string. * -1 has a special meaning as the items that have already been loaded to the preview. */ maxCount: string; /** Values available in the */ maxCountOptions: InputEnumOption[]; /** Locale for exports */ localeId: Culture; /** Exporters supported by the current API. */ exporters: FileExporter[]; /** Currently selected exporter. */ currentExporter: FileExporter; /** Current mapper once loaded. */ mapper: DataMapper_2; /** Flag for export in progress: Shows a small spinner in the export button (wizard). */ isExporting: boolean; /** Messages from exports shown in the UI. */ exportMessage: string; /** All mappers defined by the current Exportable API. */ allMappers: DataMapperInfo[]; /** Available list item mappers for export */ listItemMappers: DataMapperInfo[]; /** Available object mappers for export */ objectMappers: DataMapperInfo[]; private _api; constructor(alertService: AlertService, uiHelpers: UiHelpers); /** Gets or sets the API that implements the Exportable interface. */ get api(): Exportable; set api(value: Exportable); /** * Shows an export dialog for full export. * @param api Optional API implementing Exportable that is set to the controller. * The API must be set to the controller as property or in this parameter or showExport() will fail */ showExport(api: Exportable): void; /** * Executes an immediate quick export - typically directly from a view. * Shows the Loader while data is being loaded for the export. * @param exporterId Exporter ID. If null, the first exporter in API is used. * @param api Optional API implementing Exportable that is set to the controller. * The API must be set to the controller as property or in this parameter or quickExport() will fail * @param mapper Optional mapper to use in the export. This may be the full DataMapperInfo object or just its uri. * If null and mapper has already been set, keeps the current mapper, * If null and current mapper is null, sets the first available list mapper, then any mapper. No mappers fails. */ quickExport(exporterId: string, api: Exportable, mapper?: DataMapperInfo | string): Promise; /** * Exports data to desired format. * @param mapper The mapper to use in the export. This may be the full DataMapperInfo object or just its uri. * If null and mapper has already been set, keeps the current mapper, * If null and current mapper is null, sets the first available list mapper, then any mapper. No mappers fails. * @param exporterId Identifies the exporter defining the file type and how the result is presented (copy-paste, download, send to external...). * If no exporter is selected for the controller, the first exporter in API is used. */ export(mapper?: DataMapperInfo | string, exporterId?: string): Promise; /** * Loads the mapper definition and sets the current mapper to it. * @param newMapper New mapper to load and set as current: DataMapperInfo or its uri. * If null and mapper has already been set, keeps the current mapper, * If null and current mapper is null, sets the first available list mapper, then any mapper. No mappers fails. */ setExportMapper(newMapper: DataMapperInfo | string): Promise>; /** Toggles the debug view on/off. */ toggleDebug(): void; } /** ExportMethod enumeration */ declare enum ExportMethod { Undefined = "undefined", FileExcel = "fileExcel", FileCsv = "fileCsv", FilePdf = "filePdf", FileText = "fileText", CopyExcel = "copyExcel", CopyCsv = "copyCsv", CopyText = "copyText", PaymentChannel = "paymentChannel", Api = "api" } /** Properties / config for displaying an external dialog using window.open(). */ export declare interface ExternalDialogConfig { /** Height (in px) of the window. Default is 700. */ height?: number; /** Width (in px) of the window. Default is 600. */ width?: number; } /** * Data that is sent to external dialog and received back from it. * Used in cross-site communication. */ 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; } /** Report specific business data for index. */ 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; } /** Defines an exporter that can export data to different file formats (e.g. csv). */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** Defines a parser that parses a file (e.g. csv) to stadard tabular format. */ 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; } | undefined; /** 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. */ 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; /** * 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; } /** * Provides functionality related to working with files: Download, copy-paste etc. */ export declare class FileService { private alertService; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(alertService: AlertService, $timeout: angular_2.ITimeoutService); /** Copies given data to the clipboard. */ copyToClipboard(data: string): Promise; /** Gets the default exporters available in the current environment / account */ getDefaultExporters(): FileExporter[]; /** Gets a filename as ¨export_[YYYYMMDD]¨. */ private getFileName; } declare interface FileType { extension?: string | null; mimeType?: string | null; isImage?: boolean | null; readonly isText?: boolean | null; } /** * Contains the simple filter functions where implementation * is in some other class (typically @salaxy/core) and thus the filter implementation is very small. * This should typically the case, but some filters may contain a lot of NG1 specific * implementation (e.g. SalaxyTranslateFilter) and/or dependency injection and thus deserve their own class. */ export declare class FilterFunctions { /** * Formats a Workflow message string from index. * List of allowed message types can be given as a comma seprated list. * * Parameters of the filter are: * * - messageString: Workflow message * - types: Allowed message types. */ static sxyWorkflowMessage: (string | (($sce: angular.ISCEService) => (messageString: string, types: string) => any))[]; private static toWorkflowEvent; static sxyShow: (string | ((naviService: NaviService) => (sectionToCheck: string, sitemapPath: string) => boolean))[]; /** * Translate filter with key and interpolation parameter. * Converts content with translationId ending with '.html', to safe html. * Converts content with translationId ending with '.md', first to html and then to safe html. * If the text contains a variable placeholder like: 'Hello {{name}}!', it will be replaced by given parameter. * * Parameters of the filter are: * * - translationId: Translation key * - interpolateParams: Interpolation parameters applied if text had interpolation. * @example * ```html *

*

{{ 'SALAXY.NG1.hello' | sxyTranslate: { name: 'John'} }}

* ``` */ static sxyTranslate: (string | (($sce: angular.ISCEService) => (translationId: string, interpolateParams: any) => string))[]; /** * Formats a string using markdown and returns trusted HTML. * Parameters of the filter are: * - markdown: Markdown input to format as HTML. * @example * ```html *
* ``` */ static sxyMarkdown: (string | (($sce: angular.ISCEService) => (markdown: string) => string))[]; /** * IsInRole filter returns true if the user is in any of the given roles. * The input may be Array of roles or comma separated string containing role names. * This can be used instead of sxy-if-role directive when the component requires transcusion * and also in constructing other logic in expressions. * * Parameters of the filter are: * * - commaSeparatedRolesList: Comma separated list of roles * * NOTE: Because the actual value is constant, the filter is not rerun after session check). * Because of this, the method should only be used after the session has been checked. * Typically, by making sure, the filters are inside `sxy-if-role="$ctrl.current"`, `sxy-if-role="auth"` or `sxy-if-role="!unknown"`. * @example * ```html *
* *

{{ 'company' | sxyIsInRole ? 'Company text' : 'Default text' }}

*
* ``` */ static sxyIsInRole: (string | ((sessionService: SessionService) => (commaSeparatedRolesList: (SystemRole | Role | string)[] | string) => boolean))[]; /** * IsVisibility filter returns true/false when evaluating the logical visibility of a sitemap, * as used in the views an UI logic, i.e.: * * - hidden: Node is null or visibility is Hidden, HiddenReadOnly or Disabled. * - readOnly: Node is null or visibility is ReadOnly, HiddenReadOnly or Disabled. * - disabled: Visibility is Disabled. * - Visible: Visibility is Visible or null, node is not null. * - isFullWidth: The node has an isFullWidth boolean flag set to true. * * This can be used instead of sxy-if-sitemap directive when the component requires transcusion * and also in constructing other logic in expressions. * * Parameters of the filter are: * * - visibilityToEvaluate: The visibility value to evaluate for. * * NOTE: Because the actual value is constant, the filter is not rerun after session check). * Because of this, the method should only be used after the session has been checked. * Typically, by making sure, the filters are inside `sxy-if-role="$ctrl.current"`, `sxy-if-role="auth"` or `sxy-if-role="!unknown"`. * @example * ```html *
* *

{{ 'readOnly' | sxyIsVisibility ? 'Read-only text' : 'Default text' }}

*
* ``` */ static sxyIsVisibility: (string | ((naviService: NaviService) => (visibilityToEvaluate: string) => boolean))[]; /** * Returns the label for an enumeration. * * Parameters of the filter are: * * - input: Enumeration in format "[EnumType].[EnumName]". First letter is case-insensitive so you can use lowerCamelCase or UpperCamelCase. * - defaultValue: Optional default value when language version is not available. * Special values "name" and "#name", may be used to return the enum member name either with hash or without it. * Default is "#name", which returns "#[MemberName]" if the translation is not found. * @example * ```html *

{{ 'CalculationStatus.Draft' | sxyEnum }} - The enum full name

*

{{ 'CalculationStatus.paymentSucceeded' | sxyEnum }} - you may also use JSON value where first letter is lower-case.

*

{{ 'CalculationStatus.' + calc.status | sxyEnum }} - ...which makes it easy to use with data.

* ``` */ static sxyEnum(): (input: string, defaultValue?: null | string | "name" | "#name") => string | null; /** * Returns the description for an enumeration value in current language. * * Parameters of the filter are: * * - input: Enumeration in format "[EnumType].[EnumName]". First letter is case-insensitive so you can use lowerCamelCase or UpperCamelCase. * - defaultValue: Optional default value when language version is not available. Default is null * Special values "name" and "#name", may be used to return the enum member name either with hash or without it. * @example * ```html *

{{ 'CalculationStatus.Draft' | sxyEnumDescr }} - The enum full name

*

{{ 'CalculationStatus.paymentSucceeded' | sxyEnumDescr }} - you may also use JSON value where first letter is lower-case.

*

{{ 'CalculationStatus.' + calc.status | sxyEnumDescr }} - ...which makes it easy to use with data.

* ``` */ static sxyEnumDescr(): (input: string, defaultValue?: null | string | "name" | "#name") => string | null | undefined; /** * Formats the date with Dates.getFormattedDate in core project. * If the input is not recognized as date or if it is empty or less than year 1900, shows a dash. * * Parameters of the filter are: * * - input: Input to format * @example * ```html *

{{ calc.workflow.paidAt | sxyDate }}

* ``` */ static sxyDate(): (input: string) => string; /** * Formats a DateRange with Dates.getFormattedRange() in core project. * If input is null, shows a dash. * Also supports the ApiListItem (startAt, endAt), CalcInfo type in Calculation.info property (workStartDate and workEndDate) and EmploymentData (startDate and endDate) * * Parameters of the filter are: * * - input: Input to format * */ static sxyDateRange(): (input: DateRange_2) => string; /** * Iban formatting filter. * * Parameters of the filter are: * * - input: Input text to format as IBAN. * */ static sxyIban(): (input: string) => string | null; /** * Formats a number as count optionally taking into account the related unit * * Parameters of the filter are: * * - input: Input to format * - unit: Unit that is used in formatting. * - decimals: Number of decimals to show. * - 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 ("||"). * - zeroText: If specified, will use this text without the Unit formatting if the value is zero. By default zero is formatted as "0 [unitText]". */ static sxyCount(): (input: number, unit?: Unit, decimals?: number, nullText?: string, zeroText?: string) => string; /** * Formats a datetime ISO string (or other DayJS-object compatible time) * 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). * * Parameters of the filter are: * * - time: Input to format * */ static sxyTime(): (time: string) => string; /** * Calls the Salaxy standard Dates.asDate to convert a DatelyObject to ISO date string (without time). * ISO dates can then be used in comparison and equality. * Also note that, DatelyObject can be constants like "today" | "yesterday" | "tomorrow". See documentation for details. * * Parameters of the filter are: * * - input: Input to format as DatelyObject * - addWorkDays: If set, adds the number of workdays to the input. * May also be zero (0) to return input if it is a workday or next workday if input is not a workday. * */ static sxyAsDate(): (input: DatelyObject, addWorkDays: number) => string | undefined; /** * Formats a date/time range to an end-user friendly duration text. * Input may be Duration as ISO duration string (e.g. P3Y6M4DT12H30M5S) or .Net timespan (e.g. '7.23:59:59.999'). */ static sxyDuration(): (input: string) => string; /** * Converts the occupation to a language versioned string. * * Parameters of the filter are: * * - input: The occupation code as stored / returned from the API. * - format: Default is just the label for the occupation. "code-label" is in format "[code]: [label]` * */ static sxyOccupation(): (input: string, format: "default" | "code-label") => string | null | undefined; /** * Formats a time (input) to an end-user friendly totaltime (12:34 or 12:34:56) text. * Input may be Duration as ISO duration string (e.g. P3Y6M4DT12H30M5S) or .Net timespan (e.g. '7.23:59:59.999'). */ static sxyTotalTime(): (input: number, format: "minutes" | "seconds") => string; } /** * Provides the method for registering filters to the module. */ export declare class FiltersRegistration { /** Gets the filters for Module registration. */ static getFilters(): { sxyAsDate: typeof FilterFunctions.sxyAsDate; sxyCount: typeof FilterFunctions.sxyCount; sxyDate: typeof FilterFunctions.sxyDate; sxyDateRange: typeof FilterFunctions.sxyDateRange; sxyDuration: typeof FilterFunctions.sxyDuration; sxyEnum: typeof FilterFunctions.sxyEnum; sxyEnumDescr: typeof FilterFunctions.sxyEnumDescr; sxyIban: typeof FilterFunctions.sxyIban; sxyMarkdown: (string | (($sce: ISCEService) => (markdown: string) => string))[]; sxyOccupation: typeof FilterFunctions.sxyOccupation; sxyTime: typeof FilterFunctions.sxyTime; sxyTranslate: (string | (($sce: ISCEService) => (translationId: string, interpolateParams: any) => string))[]; sxyIsInRole: (string | ((sessionService: SessionService) => (commaSeparatedRolesList: string | string[]) => boolean))[]; sxyIsVisibility: (string | ((naviService: NaviService) => (visibilityToEvaluate: string) => boolean))[]; sxyWorkflowMessage: (string | (($sce: ISCEService) => (messageString: string, types: string) => any))[]; sxyTotalTime: typeof FilterFunctions.sxyTotalTime; sxyShow: (string | ((naviService: NaviService) => (sectionToCheck: string, sitemapPath: string) => boolean))[]; }; } /** * Helper for rendering the HTML for FormGroup: * This component renders only the label - input html. * It does not do any of the real form-control logic like ng-model, validations etc. (see salaxy-input for that). * The "input" part of the form group may be a non form control - e.g. just a text. * Also the label may be hidden. * @example * ```html *
Some text here
* ``` */ export declare class FormGroup extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Name of the input - also used as id. */ name: string; /** Label for the control */ label: string; /** * @deprecated Use "require" instead: * This attribute overlaps with required/ng-required directive, which produces unexpected results. */ required: string; /** If true the field is required (form validation) */ require: string; /** * Positioning of the label of form-control. * Supported values are "horizontal" (default), "no-label", "plain", "basic" and "empty-label". * See FormGourpLabelType for details. */ labelType: string; /** * Label columns expressed as Bootstrap grid columns. * Default is 'col-sm-4' for label-type: 'horizontal' and 'col-sm-12' for label-type: 'no-label'. * Other label-types do not have column classes at the moment. */ labelCols: string; }; /** Contents of the tag is the input element. */ transclude: boolean; /** Uses the InputController */ controller: typeof FormGroupController; /** The default template for the component. */ defaultTemplate: string; } /** * Helper for rendering the HTML for FormGroup: * This component renders only the label - input html. * It does not do any of the real form-control logic like ng-model, validations etc. * The "input" part of the form group may be a non form control - e.g. just a text. * Also the label may be hidden. */ export declare class FormGroupController implements angular_2.IController { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** Label for the control */ label: string; /** Form control name */ name: string; /** If true, shows the asterix in the label. */ require: boolean; /** * @deprecated Use "require" instead: * This attribute overlaps with required/ng-required directive, which produces unexpected results. */ required: string; /** * Positioning of the label of form-control. * Supported values are "horizontal" (default), "no-label", "plain", "basic", "inline" and "empty-label". * See FormGourpLabelType for details. */ labelType: FormGroupLabelType; /** * Label columns expressed as Bootstrap grid columns. * Default is 'col-sm-4' for label-type: 'horizontal' and 'col-sm-12' for label-type: 'no-label'. * Other label-types do not have column classes at the moment. */ labelCols: string; constructor(); /** * Checks the existence of name property. */ $onInit(): void; /** * Gets the class (or classes space separated) for label or value element. */ getLabelCols(forElement: "label" | "value" | "no-label"): string; /** Gets the label type with "horizontal" as default / unknown value. */ protected getLabelType(): "inline" | "horizontal" | "no-label" | "plain" | "basic" | "empty-label"; } /** * Defines how the label is positioned in relation to input. * Supported values are: * * - "horizontal" (default): Bootstrap form-horizontal form-control (https://getbootstrap.com/docs/3.3/css/#forms-horizontal) * - "basic": Basic Bootstrap form-group with label on top of input (https://getbootstrap.com/docs/3.3/css/#forms-example) * - "plain": Just the payload (typically input) with span class="salaxy-form-group-plain" around it. * - "no-label": Form control of width "col-sm-12" without label. * * Default is currently horizontal, but it may later be made configurable. */ export declare type FormGroupLabelType = "horizontal" | "no-label" | "plain" | "basic" | "empty-label" | "inline"; /** Settings for session related to the calculation data delivery by forms. */ declare interface FormsInSession { } /** Settings related to the calculation data delivery by forms. */ declare interface FormsSettings { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; } /** FrameworkAgreement enumeration */ declare enum FrameworkAgreement { NotDefined = "notDefined", Construction = "construction", Mll = "mll", ChildCare = "childCare", Cleaning = "cleaning", SantaClaus = "santaClaus", Entrepreneur = "entrepreneur", Other = "other" } /** Copied and modified from https://css-tricks.com/snippets/javascript/javascript-md5 */ export declare class GravatarHelpers { /** Create gravatar url from the given email. */ static getGravatarUrl(email: string): string; /** Returns true if the url is gravatar url. */ static isGravatarUrl(url: string): boolean; /** * Calculates md5. */ private static md5; } declare type GroupedItem = { id: string; businessObjectId?: string; groupType: string; title: string; sortableDate: string; invoices: InvoiceListItem[]; }; declare type GroupedItem_2 = { /** Group identifier / key */ id: string; /** Owner (employer) info */ ownerInfo: AccountInIndex; /** Invoice type */ invoiceType: InvoiceType; /** Status of the payments */ status: InvoiceStatus; /** Due date of the payments */ dueDate: string; /** Total payment for the group */ payment: number; /** Payment channel for the group. */ channel: string; /** Key data of the invoices */ invoices: any[]; }; /** Employer health care from the company Heltti */ 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; } /** HelttiIndustry enumeration */ 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 */ declare enum HelttiProductPackage { NotDefined = "notDefined", Small = "small", Medium = "medium", Large = "large" } /** Holiday enumeration */ 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. */ 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_2 | 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. */ 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. */ 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. */ declare interface HolidayAccrualSettings { /** Defines how the holidays are handled for the worker. */ code?: HolidayCode | null; /** Applicable collective agreement */ cbaCode?: number | null; /** Employee group. */ employeeGroup?: string | null; /** Flag for disabling the setting. */ disabled?: boolean | null; /** If specified, defines the start holiday year for the settings. If in the future, the settings is inactive. Null (default) means the settings is valid indefinetely from the past. */ startYear?: number | null; /** If specified, defines the end holiday year for the settings. The year is inclusive meaning. If in the past, the the settings is inactive. Null (default) means the settings is valid indefinetely to future. */ endYear?: number | 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; /** Script for the holiday accrual calculation. Used if {Palkkaus.Model.Settings.Holiday.HolidayAccrualSettings.Code} is {Palkkaus.Model.Worktime.Holidays.HolidayCode.Script}. */ script?: string | null; } /** HolidayAccrualSource enumeration */ declare enum HolidayAccrualSource { Initial = "initial", Manual = "manual", CalcDraft = "calcDraft", CalcPaid = "calcPaid" } /** HolidayBonusPaymentMethod enumeration */ 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. */ 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 */ declare enum HolidayCode { Undefined = "undefined", Permanent14Days = "permanent14Days", Permanent35Hours = "permanent35Hours", TemporaryTimeOff = "temporaryTimeOff", HolidayCompensation = "holidayCompensation", HolidayCompensationIncluded = "holidayCompensationIncluded", NoHolidays = "noHolidays", Other = "other", Script = "script" } declare interface HolidayDate { date?: string | null; holiday?: Holiday | null; readonly holidayGroups?: HolidayGroup[] | null; localName?: string | null; name?: string | null; } /** HolidayGroup enumeration */ declare enum HolidayGroup { Official = "official", NonBanking = "nonBanking", Holiday = "holiday" } /** Calculated holiday pay for the year. */ 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; /** For Script the result of the calculation by the script. */ scriptPay?: number | null; /** Accrual used in the calculation of the holiday daily pay. */ accrual?: number | null; } /** HolidayPayCalculation enumeration */ declare enum HolidayPayCalculation { Undefined = "undefined", NormalMonthlyPay = "normalMonthlyPay", AverageDailyPay = "averageDailyPay", PercentageBasedPay = "percentageBasedPay", AverageHourlyPay = "averageHourlyPay", HolidayCompensation = "holidayCompensation", OtherPay = "otherPay", ScriptPay = "scriptPay" } /** Report for containing all the result data and rules for the holiday pay calculation. */ 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. */ 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. */ 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; } /** * Shows holiday pay report of selected holiday year * @example * ```html * * ``` */ export declare class HolidayPayReportQuery extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the HolidayPayReportQueryController */ controller: typeof HolidayPayReportQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality for building ad hoc holiday pay reports. */ export declare class HolidayPayReportQueryController implements angular_2.IController { private holidayYearsApi; private uiHelpers; private $routeParams; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Raw report from api */ data: HolidayPayCalculationReportData; /** Current employment id */ employmentId: string; /** Current holidayYear */ year: number; years: string[]; totals: HolidayPayCalculationReportDataCalc; constructor(holidayYearsApi: HolidayYears, uiHelpers: UiHelpers, $routeParams: angular_2.route.IRouteParamsService); /** Controller initialization */ $onInit(): void; /** Queries the report data. */ query(): void; /** Returns label for the ir row. */ getLabel(irRow: IrRow): string; private loadYears; } /** Settings for the holiday pay calculations. */ declare interface HolidayPaySettings { /** Defines how the holiday pay is calculated. */ holidayPayCalculation?: HolidayPayCalculation | null; /** Applicable collective agreement */ cbaCode?: number | null; /** Employee group. */ employeeGroup?: string | null; /** Flag for disabling the setting. */ disabled?: boolean | null; /** If specified, defines the start holiday year for the settings. If in the future, the settings is inactive. Null (default) means the settings is valid indefinetely from the past. */ startYear?: number | null; /** If specified, defines the end holiday year for the settings. The year is inclusive meaning. If in the past, the the settings is inactive. Null (default) means the settings is valid indefinetely to future. */ endYear?: number | 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; /** Script for the holiday pay calculation. Used if {Palkkaus.Model.Settings.Holiday.HolidayPaySettings.HolidayPayCalculation} is {Palkkaus.Model.Worktime.Holidays.HolidayPayCalculation.ScriptPay}. */ script?: string | null; } /** * Shows holiday report of selected holiday year * @example * ```html * * ``` */ export declare class HolidayReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the HolidayReportController */ controller: typeof HolidayReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Component for displaying holiday report. */ export declare class HolidayReportController implements angular_2.IController { private holidayYears; private reports; private uiHelpers; private employments; private uiCrudHelpers; /** Ref date for the report. */ refDate: string; /** Current holiday years in the result. */ years: string[]; /** Current selected year. */ year: string | undefined; /** Result rows */ resultRows: ResultRow_2[]; /** Total holiday calculation */ holidayCalc: { [key: string]: HolidayCalculationDTO; }; /** Total of totals. */ holidayCalcTotal: { [key: string]: number; }; /** * Helper flag for UI. Indicates whether the debt has been queried. */ hasQueryedDebt: boolean; private data; private employmentListItems; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(holidayYears: HolidayYears, reports: Reports, uiHelpers: UiHelpers, employments: Employments, uiCrudHelpers: UiCrudHelpers); /** Controller initialization */ $onInit(): void; /** * Shows an edit dialog for the employment. * @param row Row that contains field employmentId (Identifier for the employment). * @param row.employmentId The row must contain the employment identifier. */ showEditEmploymentDialog(row: ResultRow_2): void; /** Query Holiday year data. */ query(queryDebt?: boolean): Promise; /** * Export totalRows to excel */ exportToExcel(): void; private loadEmployments; private createHolidayYearReportRows; private getBlankHolidayYearReportRow; } 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; } /** * Holiday settings. * @example * ```html * * ``` */ export declare class HolidaySettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** Settings related to holiday pay and accrual calculations. */ declare interface HolidaySettings_2 { /** 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; } /** Specifies how the holidays are handled for this Worker. */ 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. */ 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_2 | 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; } /** 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. */ 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_2 | 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_2 | 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; } /** * UI for holiday accrual (lomapäivien kertymä) of the annual leave for a selected holiday period. * @example * ```html * * ``` */ export declare class HolidayYearAccrual extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ListControllerBaseBindings; /** Uses the HolidayYearAccrualController */ controller: typeof HolidayYearAccrualController; /** The default template for the component. */ defaultTemplate: string; } /** * Controls holiday accrual (lomapäivien kertymä) of the annual leave for a selected holiday period. */ export declare class HolidayYearAccrualController extends ListControllerBase { private holidayYears; /** Bindings for components that use this controller */ static bindings: ListControllerBaseBindings; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(holidayYears: HolidayYears, uiHelpers: UiHelpers); /** List of items */ get list(): HolidayAccrualEntry[]; /** Creating of a new item. */ getBlank(): HolidayAccrualEntry; /** * Saves changes to the parent object using the CRUD API. */ saveParent(): void; /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; /** Chart config for accrual overview. */ getChartConfig(list: HolidayAccrualEntry[]): { type: string; data: any; options: any; }; private createConfig; /** Gets the color for the row avatar */ getRowColor(row: HolidayAccrualEntry | "start" | "total"): string | undefined; /** Gets this month: The first date of this month */ getThisMonth(): string; /** * Returns the notes if available or, if not, description text based on the source. */ getAccrualNotes(row: HolidayAccrualEntry): string; /** Gets calculations related to holiday accruals */ getAccrualCalculations(): { accrual: number; accrualToday: number; total: number; totalToday: number; }; } /** * Plain CRUD controller for HolidayYears. */ export declare class HolidayYearCrudController extends ApiCrudObjectController { private fullApi; private uiCrudHelpers; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** View type currently shown in the UI */ viewType: "overview" | "parameters" | "accrual" | "holidays" | "absenses"; /** * If employmentId is set, the controller fetches all the holiday years for this employment relation. * The dafault of them will then be set to model and they can be switched easily e.g. using dropdown. */ employmentHolidayYears: HolidayYear[]; /** If getHolidayYears() is called, the result will be here */ allYears: HolidayYear[]; /** * The date for which the UI is rendered. Default is today. * For employment holiday years (WorkerHolidays or CalcWorktime), set this to salary period begin * => Specifies the the holiday year to choose by default from all holiday years that Worker has: * If the date is Jan-March will show the previous year, April-Dec will show the current year. */ forDate: string; /** Parameters related to holiday report (lomalista). */ reportParams: { /** Today's date: Set this for testing how user interface is rendered (which view is presented) at different times of year. */ today: string; /** Start date of the view: Can be get/set directly by the view */ start: string; /** Start date of the view: Can be get/set directly by the view */ end: string; /** Start date of the holiday year. Typically, just get: Set by the reportYear setter */ yearStart: string; /** End date of the holiday year. Typically, just get: Set by the reportYear setter */ yearEnd: string; /** Years that can be selected. */ years: number[]; /** Underlying field of reportView */ _view: "summerPeriod" | "winterPeriod" | "otherPeriod" | "list"; /** Underlying field of reportYear */ _year: number; }; isAccrualView: boolean; private _employmentId; private visualizationCache; constructor(fullApi: HolidayYears, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, uiCrudHelpers: UiCrudHelpers, sessionService: SessionService); /** Controller initialization */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Sets the employment ID and if it is different then starts the loading of the Absences object to that employment ID. */ set employmentId(value: string); /** Gets the employment ID */ get employmentId(): string; /** Initializes the holidays for the current Worker */ initHolidays(spec: HolidaySpecification): void; /** * Gets the holiday logic for the given specification. * @param spec The specification for which the logic is calculated. * @returns The logic object that can be used in the UI. */ getHolidayLogic(spec: HolidaySpecificationForYear): { /** If true, has holiday years => A warning for overwrite should be shown. */ hasData: boolean; /** True if the accrual is based on law. Ui binds to this. */ accrualByLaw: boolean; /** * Sets the accrualFixed value based on accrualByLaw value * @param itemData The data that is being edited (current in view) */ accrualByLawChanged: (itemData: HolidaySpecificationForYear) => void; /** * Sets the accrualByLaw value based on accrualFixed value * @param itemData The data that is being edited (current in view) */ accrualFixedChanged: (itemData: HolidaySpecificationForYear) => void; /** * Business logic for field visibility * @param itemData The data that is being edited (current in view) * @param field Name of the field for which the visibility is calculated. */ getVisibility: (itemData: HolidaySpecificationForYear, field: "accrualFixed" | "compensation" | "bonusMethod" | "bonusPercent" | "startSaldo" | "accruesHolidays") => boolean; getholidayPayCalculationOptions: (itemData: HolidaySpecificationForYear) => InputEnumOption[]; }; /** Shows the Init holidays dialog for initializing the holiday years for the given worker */ showInitHolidays(): void; /** Gets the visualisation data for the selected holiday year. */ getYearVisualisation(): any; /** Gets a total days calculation for different types. */ getTotalDays(type?: "all" | "summer" | "winter" | "holidaysSaldoEnd" | "holidaysSaldoStart", year?: HolidayYear): number; /** * Gets items visibility based on properties of the selected holiday year. * @param elements Logical name of group of items in teh view. */ getVisibility(elements: "accrual" | "compensation" | "hourly"): boolean; /** For the reporting purposes, gets or sets the holiday year as year number. */ get reportYear(): number; set reportYear(value: number); /** * Gets or sets the report view that is currently shown. */ get reportView(): "summerPeriod" | "winterPeriod" | "otherPeriod" | "list"; set reportView(value: "summerPeriod" | "winterPeriod" | "otherPeriod" | "list"); /** * Returns missing holiday year. */ get missingHolidayYear(): number | null; /** * Saves a holiday year based on calendar input and updates the value in allYears property. */ saveYear(itemToSave: HolidayYear): Promise; /** * Show an edit dialog for the holiday year. * @param year The holiday year to update. */ showEditDialog(year: HolidayYear): void; /** * Shows worker selection dialog and after that opens selected workers employment dialog. */ showAddWorker(): void; /** * Gets the full holiday years for all Workers for reporting purposes * @param keepView If true, does not reset the view based on the incoming data. * If true, you should make sure the year does not change because then view will be invalid for the year * I.e. should be true only for reload scenarios. */ getHolidayYears(keepView?: boolean): void; /** Maps an array of HolidayYear to calendar series. */ mapToCalendar: (years: HolidayYear[]) => CalendarSeries[]; /** * Returns true, if two objects are different. * @param obj1 First object to compare * @param obj2 Second object to compare */ isChanged(obj1: any, obj2: any): boolean; /** * Sets the view type for the holiday year. * @param isAccrualView If true, the view is set to this.currentYear +1, otherwise to this.currentYear. */ setAccrualView(isAccrualView: boolean): void; /** * Sets the correct holiday year for the view based on the current date. * This is for planning/consuming holidays. */ setYear(): void; /** Recalculate holiday pay for the current holiday year */ recalculateHolidayPay(): Promise; /** Recalculate holiday pay for all employments in the holiday year */ recalculateAllHolidayPay(): Promise; } /** * UI for the planned holidays list (lomakirjanpito / lomakalenteri) for a selected holiday year. * @example * ```html * * ``` */ export declare class HolidayYearHolidays extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { condensed: string; filterStart: string; filterEnd: string; /** Uses the HolidayYearHolidaysController */ parent: string; onCommit: string; onReset: string; onStartEdit: string; isInEdit: string; mode: string; }; /** Uses the HolidayYearHolidaysController */ controller: typeof HolidayYearHolidaysController; /** The default template for the component. */ defaultTemplate: string; } /** * Controls the planned holidays list (lomakirjanpito / lomakalenteri) for a selected holiday year. */ export declare class HolidayYearHolidaysController extends ListControllerBase { /** Bindings for components that use this controller */ static bindings: HolidayYearHolidaysControllerBindings; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, will format the table with class table-condensed. Later may add some other condensed formatting. */ condensed: boolean; /** Date filter start value. Will be applied to period start dates. */ filterStart: string; /** Date filter end value. Will be applied to period end dates. */ filterEnd: string; constructor(uiHelpers: UiHelpers); /** List of items */ get list(): AnnualLeave[]; /** * Filter that is applied to the list when displayed. * This is done in view: Does not apply to list property, but does affect getTotalDays(). * @param value Item in the list */ filter: (value: AnnualLeave) => boolean; /** Creating of a new item. */ getBlank(): AnnualLeave; /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; /** Logic for edit dialog. */ getEditDialogLogic(): { /** Updates the workdays count */ updatePeriodDays: (current: AnnualLeave) => void; /** Sets the days array in period to enable days selection UI. */ setDaysSelection: (period: AnnualLeave) => void; /** * For example, when parent year is 2024: * - minDate is 2024-01-01 * - maxDate is 2025-04-30 */ minDate: string | undefined; maxDate: string | undefined; }; /** * Shows the edit dialog. * @param item Annual leave to edit or string "new" for creating a new one. * @param isNew Optional way of specifying that the item is a new item (with default values, not yet added to the list). * If item is string "new", this parameter will have no effect (will always be true). */ showEditDialog(item: AnnualLeave | "new", isNew?: boolean): void; /** Gets the description text for the planned holiday. */ getDescription(row: AnnualLeave): string; /** Gets a total days calculation for different types. */ getTotalDays(type?: "all" | "summer" | "winter" | "holidaysSaldoEnd" | "holidaysSaldoStart" | "filtered"): number | null; } declare class HolidayYearHolidaysControllerBindings extends ListControllerBaseBindings { /** If true, will format the table with class table-condensed. Later may add some other condensed formatting. */ condensed: string; /** Date filter start value. Will be compared to period end date. */ filterStart: string; /** Date filter end value. Will be compared to period start date. */ filterEnd: string; } /** * User interface for the annual leave payments: HolidayCompensation, HolidayBonus and HolidaySalary. * These payments are typically fetched from paid calculations automatically, * but may also be marked paid manually. Also, in client-side logic, payments are fetched * optionally from Draft calculations. * @example * ```html * * ``` */ export declare class HolidayYearPaid extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ListControllerBaseBindings; /** Uses the HolidayYearPaidController */ controller: typeof HolidayYearPaidController; /** The default template for the component. */ defaultTemplate: string; } /** * Controls the annual leave payments: HolidayCompensation, HolidayBonus and HolidaySalary. * These payments are typically fetched from paid calculations automatically, * but may also be marked paid manually. Also, in client-side logic, payments are fetched * optionally from Draft calculations. */ export declare class HolidayYearPaidController extends ListControllerBase { private reports; /** Bindings for components that use this controller */ static bindings: ListControllerBaseBindings; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Total holiday pays */ totals: { /** Total calculation */ total: AnnualLeavePayment; /** Start saldo of the payments */ startSaldo: AnnualLeavePayment; /** End saldo of the payments. */ endSaldo: AnnualLeavePayment; }; /** Total bonus */ bonusTotals: { /** Total calculation */ total: AnnualLeavePayment; /** Start saldo of the payments */ startSaldo: AnnualLeavePayment; /** End saldo of the payments. */ endSaldo: AnnualLeavePayment; }; constructor(uiHelpers: UiHelpers, reports: ReportsService); /** Gets the worker ID for the current holiday year. */ get workerId(): string; /** Gets the employment ID for the current holiday year. */ get employmentId(): string; /** * List of items fetched from the holiday year, * cached to the controller level, except when workerId changes. */ get list(): AnnualLeavePayment[]; /** * Returns true if the bonus should be paid for the employee. */ get shoudPayBonus(): boolean; /** * List of paid holidays. */ private getLeavesPaid; private copyAnnualLeavePayment; /** Creating of a new item. */ getBlank(): AnnualLeavePaymentWithAvatar; /** Gets calculations preview pdf url based on given id */ getPdfUrl(calcId: string): string; /** Logic for edit dialog. */ getEditDialogLogic(): { /** Updates the workdays count */ updatePeriodDays: (current: AnnualLeavePayment) => void; updateDaysCount: (current: AnnualLeavePayment) => void; getPdfUrl: (calcId: string) => string; }; /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; } declare interface HolidayYearReportRow { workerAvatar: Avatar_2; workerId: string; employmentId: string; startDate: string; endDate: string; employmentType: string; grossSalary: number; holidayCode: string; periodDefaultAccrual: number; holidayPayCalculation: string; startSaldo: number; total: number; paid: number; available: number; holidaySalary: number; holidayCompensation: number; paidBonus: number; availableBonus: number; holidayBonus: number; holidayPayDailySalary: number; totalAccruedHolidayPay: number; /** Total sum of accrued holiday pays. */ totalAccruedHolidayBonus: number; /** Total sum of social security payments for accrued holiday pays. */ totalAccruedHolidaySocialSecurity: number; /** Total sum of pension payments for accrued holiday pays. */ totalAccruedHolidayPension: number; /** Total sum of unemployment insurance payments for accrued holiday pays. */ totalAccruedHolidayUnemployment: number; /** Total accident insurance. */ totalAccruedHolidayAccidentInsurance: number; /** Total accident insurance. */ totalAccruedHolidayGroupLifeInsurance: number; totalAccruedHolidayTotal: number; } /** * Provides CRUD access for Holiday Years as a raw list and * more typically as holiday years relate to an employment relation. */ 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; /** * Recalculates the holiday pay for the employment relation. * @param year The holiday year for calculation. * @param employmentId The employment relation for which to calculate the holiday pay. * @returns A Promise with holiday year containing holiday pay. */ recalculateEmploymentHolidayPay(year: number, employmentId: string): Promise; /** * Recalculates the holiday pay for all employment relations. * @param year The holiday year for calculation. * @returns A Promise with holiday years containing holiday pays. */ recalculateHolidayPay(year: number): Promise; } /** * Component for HourlyReport usecase * @example * ```html * * ``` */ export declare class HourlyReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { reportType: string; /** Uses the WorkerHourlyReportController */ crudController: string; parent: string; onCommit: string; onReset: string; onStartEdit: string; isInEdit: string; mode: string; }; /** Uses the WorkerHourlyReportController */ controller: typeof WorkerHourlyReportController; /** The default template for the component. */ defaultTemplate: string; } /** TODO: Future interface for listing the hourly salaries for annual leave payments. */ export declare interface HourlySalaryEntry { /** TODO. */ todo?: string; } /** * Shows the household deduction report. * @example * ```html * * ``` */ export declare class HouseholdDeductionReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the HouseholdDeductionReportController */ controller: typeof HouseholdDeductionReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Employer report. */ export declare class HouseholdDeductionReportController implements angular_2.IController { private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Year options for the year select control. */ yearOptions: { value: string; name: string; }[]; private _currentReport; private _selectedYear; private _yearlyDeductionMaxAmounts; constructor(ajax: Ajax); /** * Controller initializations */ $onInit: () => void; /** * Returns the currently loaded report data. */ get currentReport(): any; /** * Returns the currently selected year. Defaults to current year minus one. */ get selectedYear(): any; /** * Sets the currently selected year and reloads the data. */ set selectedYear(year: any); /** * Returns the employer id from the current report data if available otherwise undefined. */ get employerId(): string; /** * Returns the total deduction amount from a given employer report. * @param employerReport The employer report for which the amount is calculated for. * @returns The total deduction amount from a given employer report. */ employerDeductionsTotalAmount(employerReport: any): string; /** * Returns the total deduction amount for a 14B form of a given year end report. */ yearlyForm14BTotalAmount(yearlyReport: any): string; /** * Returns the total house hold deduction amount of a given year end report. * @param yearlyReport The year end report for which the amount is calculated for. */ yearlyDeductionsTotalAmount(yearlyReport: any): string; /** * Returns the total deduction amount for a given reports with maximum and deductible amount taken * into account. * @param yearlyReport The year end report for which the amount is calculated for. * @param deductibleAmount The deductible amount (can change in the future?) * @returns The total deduction amount with maximum and deductible amount taken into account. */ yearlyDeductionTotal(yearlyReport: any, deductibleAmount?: number): string; /** * Returns... */ get deductionMaxAmount(): number; /** * Return the given amount formatted as a currency string. * @param amount The amount to be formatted. * @returns The amount formatted as currency. */ formatNumber(amount: number): string; /** * Formats the given start and end datetimes to an optimized datarange string. * @param start The start datetime of the date range. * @param end The end datetime of the date range. * @returns Returns the daterange as an optimized date range string. */ formatDateRange(start: string, end: string): string; /** * Returns an avatar. * @param url Avatart url. * @returns Avatar. */ avatarFrom(url: string): any; private calculateYearlyDeductionsTotalAmount; private avatarDataFromIcon; private avatarDataFromUrl; /** * Returns the worker email address from a report object otherwise null or undefined. * @param report The report object to search for worker email. * @returns Returns the email address or null/undefined. */ workerEmailFrom(report: any): string; private refreshData; } /** * Wizard for Creating a new Palkkaus.fi-account for a household. */ export declare class HouseholdOnboardingController extends WizardController { private onboardingService; private sessionService; private signatureService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Household wizard configuration */ wizardSteps: WizardStep[]; /** * Field to expose forms validity state. */ formDataValidity: boolean; /** If true, step is proceeding */ isStepProceeding: boolean; visibleSignatureMethods: object; constructor($scope: angular_2.IScope, wizardService: WizardService, onboardingService: OnboardingService, sessionService: SessionService, signatureService: SignatureService, data: any); /** * Implement IController */ $onInit(): void; /** * Navigates to the next step if possible and saves the data. */ goNext(): Promise; /** Returns true if user can go forward in wizard */ get canGoNext(): boolean; /** Runs a check function before going forward */ goNextIf(checkFunction: (goNext: () => Promise) => void): void; /** * Navigates to the previous step if possible and saves the data. */ goPrevious(): void; /** * Saves the data to server */ save(): Promise; /** * Returns signing url. */ get vismaSignUrl(): string; /** * The onboarding model is provided by the onboarding service. */ get model(): Onboarding; /** Returns the PDF preview address for the authorization pdf. */ getPdfPreviewAddress(): string; /** * Returns validation error for key if exists. * @param key - Validation error key. */ getValidationError(key: string): ApiValidationError; /** * Resets validation error for key if exists. * @param key - Validation error key. */ removeValidationError(key: string): void; /** * Launches the wizard. * @param id Optional onboarding id. */ launch(id?: string): Promise; } /** Calculation usecase for households. */ 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 | undefined; /** Occupation code for insurance purposes. */ occupation?: string; } /** Household yearly data. */ 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; } /** * Provides CRUD access to household yearly deductions. */ export declare class HouseholdYearCrudController extends ApiCrudObjectController { private householdYearsApi; private reportsService; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private _yearlyCalculations; constructor(householdYearsApi: HouseholdYears, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, reportsService: ReportsService, sessionService: SessionService); /** * Initializes the controller */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Save changes to the current item */ save(): Promise; /** Returns all paid calculations for the household year */ get yearlyCalculations(): { year: number; calculations: Calculation[]; modifiedCalculations: Calculation[]; status: "loading" | "loaded"; workers: Array<{ worker: CalcWorker; mandatorySideCosts: number; totalTaxable: number; calculations: Calculation[]; }>; }; /** Returns true if the feedback is active */ get isOpen(): boolean; /** Calculates the household tax deduction total */ getTaxDeductionTotal(): number; /** Calculates the household tax deduction total */ getTaxDeductionTotalExtended(): number; /** Returns true if the deduction should be split between spouses */ canSplitWithSpouse(): boolean; /** Returns current deduction max amount */ getSplittableMaxAmount(): number; /** Returns household deduction for calculation */ getHouseholdDeduction(calc: Calculation): number | null | undefined; /** Returns deduction deductible */ getHouseholdDeductionDeductible(): number | null | undefined; /** * Gets a link URL for a yearly report. This is a full link with token and absolute URL. * @param type - Type of the report must be one of the yearly reports * @param year - Year for the report * @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 */ getYearlyReport(type: ReportType, year: number, id?: string, id2?: string): string; /** Set calculation modified */ calculationUpdated(calc: Calculation): void; /** * Sets the active year to the controller. */ setActiveYear(): void; /** Export pdf for the given deductions */ export(): Promise; private downloadReportsForHousehold; private getYearlySideCosts; private getHouseholdDeductionMaxAmount; private getHouseholdDeductionMaxAmountExtended; private getTaxDeductionWorkCategories; private getHouseholdDeductionCategoriesExtended; private isHouseholdDeductionExtended; } /** Household year specific business data for index. */ declare interface HouseholdYearData { /** Contains the email or id of the responsible for the partner workflow event. */ partnerMessageAssignedTo?: string | null; } /** * Edit / actions user interface for a year specific household deductions. * @example * ```html * * ``` */ export declare class HouseholdYearDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the HouseholdYearCrudController */ controller: typeof HouseholdYearCrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows a list of household yearly deductions. * @example * ```html * * ``` */ export declare class HouseholdYearList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the HouseholdYearCrudController */ controller: typeof HouseholdYearCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Represents household yearly deduction data. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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 */ declare enum HouseholdYearProcessingStatus { Open = "open", Closed = "closed", Printed = "printed" } /** * Provides CRUD access for Service Models */ 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 */ declare enum HouseholdYearStatus { Undefined = "undefined", Ok = "ok", OkWithModifications = "okWithModifications", WillHandleMyself = "willHandleMyself" } /** * Directive for binding html for the element. * The attribute sxy-html should contain the translation key for the html content. * This directive should be used instead of the AngularJs ng-bind-html element. * Interpolation parameters for translation can be given using params -attribute. * @example * ```html *

* ``` */ export declare class HtmlDirective implements angular_2.IDirective { private $sce; /** * Factory method for the directive creation. * @ignore */ static sxyHtml(): any; /** * Directive restrictions. * @ignore */ restrict: string; /** * Creates a new instance of the directive. */ constructor($sce: angular_2.ISCEService); /** * Compile function for the directive. * @ignore */ compile(cElement: any, cAttr: any): any; } /** * A term with key and all the langauge versions. * Mainly for display purposes. */ export declare interface I18nTerm { /** Translation key */ key: string; /** Finnish language text */ fi?: string; /** Swedish language text */ sv?: string; /** English language text */ en?: string; } /** Interface for the line item for search and listing results. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** 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. */ 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 */ 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; } /** * Shows the element if the user is in the given role / in one of the given roles. * The attribute value should resolve to either role string or array of role strings. * @example * ```html *
You are not logged in.
*
This text is shown to Household or Worker roles.
* ``` */ export declare class IfRoleDirective implements angular_2.IDirective { private sessionService; /** * Factory method for the directive creation. * @ignore */ static sxyIfRole(): { (sessionService: SessionService, ngIfDirective: any): IfRoleDirective; $inject: string[]; }; /** * Directive restrictions. * @ignore */ restrict: any; /** * Transclusion. * @ignore */ transclude: any; /** * Priority parameter. * @ignore */ priority: any; /** * Terminal parameter. * @ignore */ terminal: any; /** Uses the original ngIf class as bases for the functionality. */ private ngIf; /** * Creates a new instance of the directive. */ constructor(sessionService: SessionService, ngIfDirective: any); /** * Link function for the directive. * @ignore */ link(scope: any, element: any, attrs: any): void; } /** * Shows the element based on Sitemap parameters: * Currently supported are Visibility and isFullWidth as interpreted by SitemapHelper.getVisibility() method, * e.g. "hidden" includes HiddenReadOnly, Disabled and current node not resolved situations besides Hidden. * See description of SitemapHelper.getVisibility() for exact details. * @example * ```html *
Shown if the current page is hidden (including HiddenReadOnly, Disabled and current node not resolved)
*
Shown if the current page is visible (visibility null or Visible).
* ``` */ export declare class IfSitemapDirective implements angular_2.IDirective { private naviService; /** * Factory method for the directive creation. * @ignore */ static sxyIfSitemap(): { (naviService: NaviService, ngIfDirective: any): IfSitemapDirective; $inject: string[]; }; /** * Directive restrictions. * @ignore */ restrict: any; /** * Transclusion. * @ignore */ transclude: any; /** * Priority parameter. * @ignore */ priority: any; /** * Terminal parameter. * @ignore */ terminal: any; /** Uses the original ngIf class as bases for the functionality. */ private ngIf; /** * Creates a new instance of the directive. */ constructor(naviService: NaviService, ngIfDirective: any); /** * Link function for the directive. * @ignore */ link(scope: any, element: any, attrs: any): void; } 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). */ 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. */ 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_2; /** * 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_2 | undefined; /** * 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_2, 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_2): 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 | undefined, parser: FileParser, localeId?: Culture): ApiValidation | undefined; /** * 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 | undefined): Promise; /** * Imports the batch data. * @param notify Function for notifying progress to caller. */ import(notify?: progressNotification | undefined): Promise; private updateValidation; } /** * Controller that provides import functionality for any data. */ export declare class ImportController implements angular_2.IController { private uiHelpers; private wizardService; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The importable api. */ private _api; /** Locale for reading the raw data (CSV delimiter, numbers and dates). */ localeId: Culture; /** Available file parsers for import. */ fileParsers: FileParser[]; /** Currently selected file parser. */ currentFileParser: FileParser; /** Current mapper that is used to import the data */ mapper: DataMapper_2; /** Wizard steps */ importSteps: WizardStep[]; /** Raw data to import. */ batch: ImportBatch; /** Progress indicator from 0 to 100 where 0 is not in progress. */ progress: number; /** * Status messages from asynchronous process (import / validation to server). * Only shown if isInProgress = true; */ progressMessage: string; /** Results (errors and warnings) from the last run (import validation etc.). */ lastResult: ApiValidation; /** All object mappers. */ private _objectMappers; /** * Constructor for Dependency Injection. * @param uiHelpers Salaxy ui helpers. * @param wizardService Wizard service. */ constructor(uiHelpers: UiHelpers, wizardService: WizardService, $timeout: angular_2.ITimeoutService); /** Gets or sets the Importable api that defines how the data is imported. */ get api(): Importable; set api(value: Importable); /** Available object mappers for export */ get objectMappers(): InputEnumOption[]; /** Clears the last validation result. */ clearLastResult(): void; /** * Shows import dialog. * @param api Optional API implementing Importable that is set to the controller. * The API must be set to the controller as property or in this parameter or showImport() will fail */ showImport(api?: Importable): void; /** Paste data from clipboard. */ pasteFromClipboard(): Promise; /** * Reads the file * @param file Selected file */ readFile(file: File): Promise; /** * Creates / resets the import batch as new using the current api * (should be selected before) and mapper (may be null / not yet selected). */ createBatch(): void; /** * Read batch raw data. * @returns The status of the read as API validation object (also saved to lastResult). */ readBatch(): ApiValidation; /** * Sets the import mapper by ID. * @param id Identifier of the new object mapper. * @returns The mapper once it has been loaded / resolved. */ setMapper(id: string): Promise>; /** Read batch data */ mapBatch(): void; /** Validate batch data */ validateBatch(): void; /** * Imports the batch data. * @param $close Close function of the UI Bootstrap dialog. */ importBatch($close: (action: EditDialogKnownActions) => void): void; /** * Sets the progress indicator * @param value Value of the progress 0-100. If the process is just starting, use 1. * If not in progress, use 0. If the count is null, you may also use absolute value (index+1) here: * The system will convert it to 1-100 first assuming there is 10 items, then that there is 100 items. * @param message Progress message * @param count Total count of items if known. */ private setProgress; /** Toggles the debug view on/off. */ toggleDebug(): void; } /** Result for importing data (CSV, Excel copy-paste etc.) */ 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. */ 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_2[]): Promise; /** * Imports workers. * * @param workers The worker import data. * @returns A Promise with result data containing worker IDs. */ importWorkers(workers: WorkerImport_2[]): Promise; /** * Imports calculations to a new/existing payroll. * * @param calculations The calculation import data. * @param options The save options for the payroll calculations. * @returns A Promise with result data containing payroll IDs. */ importCalculations(calculations: CalculationImport[], options: PayrollCalculationsSaveOptions): 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; private getUrlWithOptions; } /** * Provides an UI to the import staging area if one is available for the current company.. */ export declare class ImportStaging extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Binds the current payroll (the full object) typically from the Payroll details view. */ payroll: string; /** If the list off calculations committed into the Payroll typically from the Payroll details view. */ payrollCalcs: string; }; /** Uses the ImportStagingController */ controller: typeof ImportStagingController; /** The default template for the component. */ defaultTemplate: string; } /** Controller that connects to the Import Staging area */ export declare class ImportStagingController implements angular_2.IController { private ajax; private $timeout; private userSettingsService; private $sce; private sessionService; private uiHelpers; private reportsService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * If provided by the parent (payroll controller), contains the list off calculations commit into the Payroll * TODO: Consider including this to WorktimeImport wihtin the commit stage (also some other meta data)? */ payrollCalcs: CalculationListItem[]; /** API methods for the Worktime Service. */ worktimeApi: WorktimeApiConnector; /** Itsems to show in the salary slips list. */ salarySlipListType: "preview" | "committed" | "all" | "distinct"; /** The payroll that is potentially set by the parent Payroll component. This is only used in the init, changing it later will not take any effect. */ payroll: PayrollDetails_2 | undefined; debugJson: string; private _payrollId; private salarySlipCache; constructor(ajax: Ajax, $timeout: angular_2.ITimeoutService, userSettingsService: UserSettingsService, $sce: angular_2.ISCEService, sessionService: SessionService, uiHelpers: UiHelpers, reportsService: ReportsService); $onInit(): void; /** Gets or sets the current payroll in the controller and also updates the selected payroll in the WorktimeApiConnector. */ get payrollId(): string | undefined; set payrollId(value: string | undefined); /** * If supported for the company or partner, this URL is the integration server used in for the imports. */ get serverUrl(): string | undefined; /** * Gets the user-specific setting (service), stored in the local storage. */ get userSettings(): UserSettingsService; /** If true, the staginc server is supported for the partner. */ get isSupported(): boolean; /** Gets the calculations / salary slips for the employment. */ get currentEmploymentCalcs(): CalculationListItem[]; /** * Commits the current payroll. * @param scope - The scope of the commit: Payroll commits the entire payroll in the controller. * Employment commits the selected employment only and the Payroll specified in the employment. */ commitPayroll(scope: "payroll" | "employment"): Promise; /** Reloads the current user interface: Especially the payroll if we are in the Payroll view. */ reloadUi(): void; /** * Gets the totals for the selected payroll or the entire history if no payroll is selected. * @param row - The row for which to get the totals. */ getTotals(row: WorktimeImportInStagingListItem | "all"): WorktimeImportPreviewMetadata; /** * Recalculates the current worktime (if selected). */ recalculateWorktime(): Promise; /** * Saves the manual rows to the server and refreshes the view. * @returns The updated worktime import. */ saveManualRows(): Promise; /** Deletes the current worktime (with are you sure) */ deleteWorktime(): Promise; /** * Recalculates all the worktimes in the list. */ recalculateAllWorktimes(): Promise; /** * Shows a report for the current calculation using a modal dialog. * @param calculationId - Identifier of the calculation to show. * @param reportType - Type of report to show */ showReportDialog(calculationId: string, reportType?: calcReportType): void; /** * Shows the salary slip PDF in the IFrame UI. * Sets the currentEmploymentPdf to the PDF of the salary slip (Base64 resource URI). * @param calculationId Identifier of the calculation for which the PDF is shown. */ showSalarySlipPdf(calculationId: string | undefined): void; /** * Shows the salary slip HTML in the IFrame UI. * @param calculationId Identifier of the calculation for which the HTML is shown. */ showSalarySlipHtml(calculationId: string | undefined): void; /** * Shows (hides) an item in the details view * @param id - The ID of the item to show. If undefined, hides the details view. */ showDetails(id: string | undefined): void; /** Returns true if the offcanvas (dialog) should be shown. */ get showOffcanvas(): boolean; /** PDF salary slip that was last fetched for the current employment */ currentEmploymentPdf: string | undefined; /** * Uploads a JSON file for testing purposes. * Should be added to a form submit event. * @param event - The change event that triggered by the file upload * ...or string "clipboard" for clipboard data. * @example * ```html * * * * * ``` */ uploadTestFile(event?: Event | "clipboard"): Promise; /** * Uploads a JSON string for testing purposes. * @param text - The JSON string to upload */ uploadTestJson(text: string): Promise; /** * Formats the debug JSON string. */ formatDebugJson(): void; /** * Adds a blank WorktimeImport object to the debug JSON editor. * Uses WorktimeApiConnector.getBlank() to generate the empty object. */ debugJsonAddBlank(): void; uploadResults: any; /** * 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"): void; /** * Deletes the selected rows from the current worktime import and saves the changes . * @param rows - The rows to delete. */ deleteRows(rows: WorktimeImportRow[]): Promise; /** * Moves the selected rows to the given payroll. * @param rows - The rows to move. * @param payrollId - The payroll id to move to. * @returns The updated worktime import. */ moveToPayroll(rows: WorktimeImportRow[], payrollId: string): Promise; /** The current status group. */ get statusGroup(): { key: string; statuses: string[]; text: string; count: number; active?: boolean; }; set statusGroup(value: { key: string; statuses: string[]; text: string; count: number; active?: boolean; }); private updateCounts; /** The status groups availab. */ statusGroups: { key: string; statuses: string[]; text: string; count: number; active?: boolean; }[]; } /** IncomeEarnerType enumeration */ 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 */ declare enum IncomeLogDiff { Default = "default", New = "new", Changed = "changed", Removed = "removed" } 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; /** IR report delivery settings. */ irDelivery?: IrDelivery | null; } /** Describes the properties and behavior of the Income types in Incomes register. */ 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; } /** * Shows an input control with label, validation error, info etc. * * Basic label-input control for forms. * @example * ```html * * ``` */ export declare class Input extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ required: string; require: string; /** Minimum length for the text value, default is 0 (form validation) */ readOnly: string; /** Regular expression pattern for validation (form validation) */ readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** Minimum length for the text value, default is 0 (form validation) */ minlength: string; /** Maximum length for the text value, default is 1024 (form validation) */ maxlength: string; /** Regular expression pattern for validation (form validation) */ pattern: string; /** Type for the input. Defaults to text. Supports currently text and password. */ type: string; }; /** Uses the InputController */ controller: typeof InputController; /** The default template for the component. */ defaultTemplate: string; } /** * Select component for Accounting Targets. * @example * ```html * * ``` */ export declare class InputAccountingTarget extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the InputAccountingTargetController */ controller: typeof InputAccountingTargetController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that select an accounting target. */ export declare class InputAccountingTargetController extends InputController { private accountingTargets; /** * For NG-dependency injection * @ignore */ static $inject: string[]; _accountingTargetDisplayItem: AccountingTargetListItem; /** * Creates a new InputAccountingTargetController * @ignore */ constructor(accountingTargets: AccountingTargets); /** * Query all available accountingTargets from index */ queryAccountingTargets(search: string): Promise; /** * Get selected accounting target displayName * @param accountingTargetId selected accounting target id * @param refresher helper for refreshing view after * @returns accountingTargetDisplayName from otherPartyInfo.avatar.displayName */ queryAccountingTargetDisplayName(accountingTargetId: string, refresher: any[]): string; } /** * Base controller for form control groups (label, input, validation errors etc.). */ export declare class InputBase implements angular_2.IController { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ static crudBindings: { /** Name of the input - also used as id. */ name: string; /** Label for the control */ label: string; /** * @deprecated Use "require" instead: * This attribute overlaps with required/ng-required directive, which produces unexpected results. */ required: string; /** If true the field is required (form validation) */ require: string; /** * Expression for read-only display of the input control * This is visualized in a different way than readonly: The input is not shown and display is more compact. */ readOnly: string; /** Expression for ng-readonly of the input */ readonly: string; /** Expression for ng-disabled of the input */ disabled: string; /** * Positioning of the label of form-control. * Supported values are "horizontal" (default), "no-label", "plain" and "basic". * See FormGourpLabelType for details. */ labelType: string; /** * Label columns expressed as Bootstrap grid columns. Supports multiple classes (e.g. "col-xs-4 col-sm-2"). * Default is 'col-sm-4' for label-type: 'horizontal' and 'col-sm-12' for label-type: 'no-label'. * Other label-types do not have column classes at the moment. */ labelCols: string; /** Placeholder text */ placeholder: string; /** * TooltipHtml adds an info button after the input which opens a uib-popover-html. */ tooltipHtml: string; /** Options for ui.bootstrap.popover */ tooltipPlacement: string; /** * Disables the default validation error message. * Use this if you want to create custom error messages in the UI. */ disableValidationErrors: string; /** * Style of the input. * Supports empty or 'openClose' */ inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** Label for the control. If not set, it is derived from name. */ label: string; /** * Positioning of the label of form-control. * Supported values are "horizontal" (default), "no-label" | "plain" | "basic" | "empty-label" | "inline". * See FormGourpLabelType for details. */ labelType: FormGroupLabelType; /** The model that is bound to the input */ model: angular_2.INgModelController; /** Form controller, if available */ form: angular_2.IFormController; /** The value of the input */ value: T; /** Form control name */ name: string; /** List of validation error texts (typically language version keys that should be translated). */ validationErrors: string[]; /** Placeholder text */ placeholder: string; /** * @deprecated Use "require" instead: * This attribute overlaps with required/ng-required directive, which produces unexpected results. */ required: string; /** * If true, displays the control as read-only div instead of the input control. * This "read-only" attribute is visualized in a different way than standard html "readonly" (ng-readonly): * The input is not shown and display is more compact. * Also note, that you may change the same read-only for the form using readonly / ng-readonly attribute. * @example * ```html *
* * * * * ``` */ readOnly: boolean; /** If true, disabled is set on the input with ng-disabled */ disabled: boolean; /** Placement of tooltip button */ tooltipPlacement: string; /** Defines HTML for tooltip button */ tooltipHtml: string; /** * Style of the input. * If null or empty, displays normal input. * - "openeClose" shows readOnly-like input with toggle button to open the field for editing. * Recommended to use when only one or few fields of the form are expected to be edited. */ inputMode: "" | "openClose"; private _onInitValue; private requirePendingUpdate; /** * Creates a new InputController * @ignore */ constructor(); /** * Set the values and defaults on init. * When overridding at derived classes, do your own stuff first and then call this method * because this method calls validate() at the end. */ $onInit(): void; /** Gets or sets the presence of the required validator in the underlying model. */ get require(): boolean; set require(value: boolean); /** Gets the readonly value either from the controller or from the form */ protected getReadOnly(): boolean; /** Gets the disabled value either from the controller or from the form */ protected getDisabled(): boolean; /** Returns the placeholder text: We will probably add stuff about validation here if not explicitly set. */ protected getPlaceholder(): string; /** Gets the tooltip HTML with necessary escape. */ protected getToolTipHtml(): string; /** On change of the value, do preventive operations and set value to model. */ protected onChange(): void; /** Do validations. Automatically called on onInit() and onChange() */ protected validate(): boolean; /** Called after initial value assignment. Called only once. */ protected onInitValue(): void; private modifyValidationErrors; } /** * Shows a boolean input control with label, validation error, info etc. * @example * ```html * * ``` */ export declare class InputBoolean extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** Type of the input element. Options are checkbox, radio, select and switch */ type: string; /** * Text to show as a label for input with value FALSE * Supported by types radio and select */ labelFalse: string; /** * Text to show as a label for input with value TRUE * Supported by types radio, checkbox and select */ labelTrue: string; /** * TODO: Is this needed when there's support for 'empty-label' ? * BS class for offsetting the input (no-label) */ offsetCols: string; /** If true, the radio buttons are aligned horizontally side-by-side */ horizontal: string; }; /** Uses the InputEnumController */ controller: typeof InputBooleanController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind boolean form controls (checkbox, radio, switch) */ export declare class InputBooleanController extends InputBase { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** Type of the input element. Default is checkbox. */ type: "checkbox" | "radio" | "select" | "switch-xl" | "switch"; /** * Text to show as a label for input with value FALSE * Supported by types radio and dropdown */ labelFalse: string; /** * Text to show as a label for input with value TRUE * Supported by types radio, checkbox and dropdown */ labelTrue: string; /** * TODO: Is this needed when there's support for 'empty-label' ? * BS class for offsetting the input (no-label) */ offsetCols: string; /** If true, the radio buttons are aligned horizontally side-by-side */ horizontal: boolean; /** * Creates a new InputController * @ignore */ constructor(); /** Toggles boolean value. */ toggle(): void; } /** * Visual selection for collective bargain agreement codes. * @example * ```html * * ``` */ export declare class InputCollectiveBargainAgreement extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** List of collective bargain agreement codes to exclude from the selection list. */ hiddenCodes: string; }; /** Uses the InputCollectiveBargainAgreementController */ controller: typeof InputCollectiveBargainAgreementController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that selects Collective Bargain Agreement code. */ export declare class InputCollectiveBargainAgreementController extends InputController { /** * List of collective bargain agreement codes to exclude from the selection list. */ hiddenCodes: number[]; private cbaCodes; static $inject: never[]; /** * Creates a new InputCollectiveBargainAgreementController * @ignore */ constructor(); /** Sets the default values in init. */ $onInit(): void; /** * Returns filtered list of collective bargain agreement codes based on search string. * @param searchString - String to filter codes by * @returns Filtered list of collective bargain agreement codes as InputEnumOptions */ getCbaCodes: (searchString: string) => InputEnumOption[]; /** * Returns the label for given collective bargain agreement code. * @param value - Value of the collective bargain agreement code. */ getCbaLabel: (value: string) => string; /** Returns the placeholder text - this control has a default text. */ getPlaceholder(): string; /** * Returns the HTML for the tooltip. * @returns HTML for the tooltip */ getToolTipHtml(): string; } /** * Base controller for form control groups (label, input, validation errors etc.). */ export declare class InputController extends InputBase { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** Minimum length, 0 is the default */ minlength: number; /** Maximum length, 1024 is the default */ maxlength: number; /** The rows property of the textarea. Default is 3. Not used input, only textarea. */ rows: number; /** Regular expression pattern for validation */ pattern: string; /** If true, sets the readonly attribute of the input with ng-readonly. */ readonly: boolean; /** The model that is bound to the input */ model: angular_2.INgModelController; /** * Creates a new InputController * @ignore */ constructor(); /** Set the values and defaults on init */ $onInit(): void; /** On change of the value, do preventive operations and set value to model. */ onChange(): void; } /** * Select credential. * @example * ```html * * * * ``` */ export declare class InputCredential extends InputEnum { constructor(); } /** * Controller for selecting a credential. */ export declare class InputCredentialController extends InputEnumController { private $scope; private workflowService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private credentials; /** * Creates a new InputOccupationTypeController * @ignore */ constructor($scope: angular_2.IScope, workflowService: WorkflowService); /** Options list */ get options(): any[]; set options(value: any[]); } /** * Shows a an editor / display component for a .Net Duration. * .Net Duration is a string in format "ddd.hh:mm:ss.ttttttt". * @example * ```html * * ``` */ export declare class InputDuration extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the InputDurationController */ controller: typeof InputDurationController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for Duration edit input */ export declare class InputDurationController extends InputBase { /** * For NG-dependency injection * @ignore */ static $inject: never[]; innerValue: { /** If true, the duration is negative, meaning "before" the reference time. */ isNegative: boolean; /** Integer number of days. */ days: number; /** Rest of the duration is just kept if it exists. It cannot be edited at the moment. */ rest: string; }; /** * Creates a new InputController * @ignore */ constructor(); /** Set the values and defaults on init */ $onInit(): void; /** Called when the view changes the model. */ onChange(): void; /** Gets the inner value as string */ getInnerValue(): string; /** Parses an input string and sets the inner value based on it. */ setInnerValue(value: string): void; } /** * Select an employee group. * @example * ```html * * ``` */ export declare class InputEmployeeGroup extends InputEnum { constructor(); } /** * Controller for selecting an employee group. */ export declare class InputEmployeeGroupController extends InputEnumController { private $scope; private settingsService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private employeeGroups; /** * Creates a new InputOccupationTypeController * @ignore */ constructor($scope: angular_2.IScope, settingsService: SettingsService); /** Options list */ get options(): any[]; set options(value: any[]); } /** * Select component for enumerations. * @example * ```html * * * ``` */ export declare class InputEnum extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; /** * Options of the select control as a key-value object. */ disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** * Binds to an enumeration defined by the Salaxy API. * Set the name of the enumeration. */ enum: string; /** * Options of the select control as a key-value object. */ options: string; /** Type of the input element. Options are select, multi-select, radio and dropdown */ type: string; /** * These values are visible only if they are selected in the data. * I.e. after something else is selected, hidden value cannot be selected back. * Use for not-selected values ("Please choose...") when you do not want selection reversed * or legacy data that is not selectable, but may still exist on the server. */ hiddenOptions: string; /** * Array or comma separated string to filter the option values to just the given ones. * Also sets the order to this order, so works for ordering a given set of values. * Note that hiddenOptions is applied first, so if you want e.g. "undefined" to appear if selected, * you may add it here and it behaves as expected (undefined is still hidden if a value is selevted). */ filter: string; /** * Comma serapated list of values that should not be considered as valid in the UI. * Default is ["unknown"] and is only used when input is "required" and input type is "select". * Use in situations where an unknown/other/none value is set in API but should not be available as an option. */ invalidEnums: string; /** If true, the control is not caching values. */ disableCache: string; /** * Label format for the option. The default format is to show only the text of the option. * Options are: * "text" or empty: only the text of the option is displayed. * "text-value": in addition to the text, the value is also displayed in the label. * "value": only the value is displayed. */ labelFormat: string; /** * If set, last selected option is stored in LocalStorage and set as default/selected value in element. Currently supported only in type 'select' and 'uib-dropbdown'. */ remember: string; }; /** Uses the InputEnumController */ controller: typeof InputEnumController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that select an occupation type. */ export declare class InputEnumController extends InputController { /** * Binds to an enumeration defined by the Salaxy API. * Set the name of the enumeration. */ enum: string; /** Type of the input element. Options are typeahead, select (default) and radio. Todo: remove 'uib-dropdown' */ type: "select" | "radio" | "multi-select" | "dropdown"; /** Options of the select control as a key-value object. */ protected _options: any; /** * Array or comma separated string to filter the option values to just the given ones. * Also sets the order to this order, so works for ordering a given set of values. * Note that hiddenOptions is applied first, so if you want e.g. "undefined" to appear if selected, * you may add it here and it behaves as expected (undefined is still hidden if a value is selevted). */ filter: string[]; /** If set to true, does not cache enums. */ disableCache: any; /** * These values are visible only if they are selected in the data. * Default is ["undefined"], set to empty array to show all in every state. * I.e. after something else is selected, hidden value cannot be selected back. * Use for not-selected values ("Please choose...") when you do not want selection reversed * or legacy data that is not selectable, but may still exist on the server. */ hiddenOptions: string[]; /** * These values are not considered as valid in the UI. * Default is ["unknown"] and only used when input is "required" and input type is "select" * Use in situations where an unknown/other/none value is set in API but should not be available as an option. */ invalidEnums: string[]; /** * Label format for the option. The default format is to show only the text of the option. * Options are: * "text" or empty: only the text of the option is displayed. * "text-value": in addition to the text, the value is also displayed in the label. * "value": only the value is displayed. * "title": Title (description of enumeration) if available. Defaults to text. */ labelFormat: "text" | "value" | "text-value" | "title"; /** * If set, last selected option is stored in LocalStorage and set as default/selected value in element. * Currently supported only in type 'select' and 'uib-dropbdown'. */ remember: string; private enumCache; constructor(); /** Sets the default values in init. */ $onInit(): void; /** Options list */ get options(): any[]; set options(value: any[]); /** * Gets the label for an enumeration. * @param value Type of the enum. */ getEnumerationLabel(value: string): string; /** Returns true if the placeholder should be added to the options. */ get showPlaceholder(): boolean; /** Formats the label for display and typeahed searches. */ formatLabel(option: InputEnumOption): string; /** * Returns items for current enumeration. */ protected getEnumerations(): InputEnumOption[]; private modifyOptions; /** Store selection to LocalStorage */ setStoredValue(inputName: any, value: any): void; /** Get stored value from LocalStorage*/ getStoredValue(): string | null; } /** Defines an option in enumeration or within select element more generally */ 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; } /** * Form control for defining multipliers for holiday pay calculations. * @example * ```html * * ``` */ export declare class InputHolidayMultipliers extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the InputHolidayMultipliersController */ controller: typeof InputHolidayMultipliersController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form control which edits/displays holiday pay calculation multipliers. */ export declare class InputHolidayMultipliersController extends InputBase { /** Set the values and defaults on init */ $onInit(): void; /** Delete one multiplier */ delete(key: string): void; /** Add one multiplier */ createNew(): void; /** On key changed event. */ onKeyChanged(key: string, newKey: string): void; } /** * Visual selection for income types (and deductibles) resulting to number code in Incomes register. * @example * ```html * * ``` */ export declare class InputIncomeType extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** Type of the input element is either typehead or list. Default is typeahead. */ type: string; /** List of income type codes to exclude from the selection list. */ hiddenCodes: string; }; /** Uses the InputIncomeTypeController */ controller: typeof InputIncomeTypeController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that selects Income type code for transaction in Income Registry (Tulorekisteri). */ export declare class InputIncomeTypeController extends InputController { /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Type of the input element. Default is typeahead. */ type: "typehead" | "list"; /** * List of income type codes to exclude from the selection list. */ hiddenCodes: number[]; /** * Creates a new InputIncomeTypeController * @ignore */ constructor(); /** Sets the default values in init. */ $onInit(): void; /** Gets the list of all income types. */ getIncomeTypes: (searchString: string) => { value: number; text: string; title: string; ui: { initials: number; color: string; entityType: string; }; }[]; /** * Returns the label for given income type. * @param code - Income type code. */ getRowLabel(code: string): string; /** Returns the placeholder text - this control has a default text. */ getPlaceholder(): string; } /** * Form control for editing/viewing markdown content. * @example * ```html * * ``` */ export declare class InputMarkdown extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the InputController */ controller: typeof InputController; /** The default template for the component. */ defaultTemplate: string; } /** * Contains metadata about the default input that is determined * based on reflection model. */ 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 | undefined; /** * 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 | undefined; /** If true, the input is enumeration object. */ isEnum: boolean; /** In data binding scenarios, the path from the current object. */ path: string | null; /** Error message if the resolving fails: May be some other content in the future. */ content?: string; } /** * Input control for numbers. * @example * ```html * * ``` */ export declare class InputNumber extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ label: string; required: string; require: string; readOnly: string; readonly: string; /** Minimum number*/ disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** * Unit for the number. * If set, shows a visual clue of the unit. * For 'percent' editor value is multiplied by 100. */ unit: string; /** * Expression for the allowed Units for the number. * If set, shows a selection of control for the unit. */ units: string; /** Minimum number*/ minimum: string; /** Maximum number*/ maximum: string; /** Multiple of (step) number*/ multipleOf: string; /** * If true, the input edits negative value: The value is multiplied by -1. * E.g. "3" days ago => -3. */ negative: string; /** Type of the input element. Options: default or slider */ type: string; /** Step for slider */ sliderStep: string; /** * Function that is called when the unit has been changed. * Function has the following locals: unit: the selected unit. */ onUnitChange: string; }; /** Uses the InputNumberController */ controller: typeof InputNumberController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that select an occupation type. */ export declare class InputNumberController extends InputBase { /** * Unit for the number. * If set, shows a visual clue of the unit. * For 'percent' editor value is multiplied by 100. */ unit: CalculationRowUnit; /** * Expression for the allowed Units for the number. * If set, shows a selection of control for the unit. */ units: CalculationRowUnit[]; /** Type of the input element. Options are default and slider */ type: "default" | "slider"; /** Step for slider */ sliderStep: number; /** * If true, the input edits negative value: The value is multiplied by -1. * E.g. "3" days ago => -3. */ negative: boolean; /** * Function that is called when the unit has been changed. * Function has the following locals: unit: the selected unit. */ onUnitChange: (params: { /** Selected unit */ unit: CalculationRowUnit; }) => void; /** Sets the default values in init. */ $onInit(): void; /** * Gets or sets the string value that is used in the view. * For percent, this is multiplied by 100. */ get viewValue(): string; set viewValue(value: string); /** * Gets an indicator string (1-2 characters) for the unit. */ getUnitIndicator(unit: CalculationRowUnit): string | undefined; /** * Changes the unit and calls the onUnitChange function. * @param unit New unit. */ changeUnit(unit: CalculationRowUnit): void; } /** * Select component for Occupation types. * @example * ```html * * * ``` */ export declare class InputOccupationType extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** * One or comma-separated list of occupation IDs, or a known keyword to define which occupations are shown * Supported keywords: 'household' and 'company' * If empty, shows all */ defaultList: string; }; /** Uses the InputOccupationTypeController */ controller: typeof InputOccupationTypeController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that select an occupation type. */ export declare class InputOccupationTypeController extends InputController { private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * One or a list of occupation IDs or a known keyword to define which occupations are shown * Supported keywords: 'household' and 'company' */ defaultList: string; /** * Creates a new InputOccupationTypeController * @ignore */ constructor(sessionService: SessionService); /** Sets the default values in init. */ $onInit(): void; /** Gets the list of occupations in the search field. */ getOccupations: (searchString: string) => any; /** * Returns the label for given occupation id. * @param occupationId - Id of the occupation. */ getOccupationLabel(occupationId: string): string; /** Returns the placeholder text - this control has a default text. */ getPlaceholder(): string; } /** * Form control for defining row type for pay statistics calculations. * @example * ```html * * ``` */ export declare class InputPayStatsRowType extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the InputPayStatsRowTypeController */ controller: typeof InputPayStatsRowTypeController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form control which edits/displays row types for pay stats calculations. */ export declare class InputPayStatsRowTypeController extends InputController { private uiHelpers; private rowTypeService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(uiHelpers: UiHelpers, rowTypeService: RowTypeService); /** Set the values and defaults on init */ $onInit(): void; /** Returns true if this is an exclusive row type. */ get isExclusive(): boolean; /** Returns text for the row type */ get text(): string; /** Edit entry. */ edit(): void; private getCalculationRowTypeLabel; private parseRowType; private composeRowType; private composeType; } /** * Shows a an editor / display component for a Recurrence Rule (RRule). * Recurrence rules are a strings defined in iCalendar format, e.g. "FREQ=MONTHLY;INTERVAL=1". * For more information and examples, see http://jakubroztocil.github.io/rrule/ or https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html * @example * ```html * * ``` */ export declare class InputRrule extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; /** Uses the InputRruleController */ readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the InputRruleController */ controller: typeof InputRruleController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for Recurrence Rule (RRule) edit input */ export declare class InputRruleController extends InputBase { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** * Creates a new InputController * @ignore */ constructor(); /** * Gets the recurrence rule as human readable text. * @param rrule The iCalendar Recurrence rule that should be interpreted. */ getRRuleText(rrule: string): string; } /** * Input component for time * @example * ```html * * * ``` */ export declare class InputTime extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** * Used type in input. Types are minutes and isoTime */ type: string; }; /** Uses the InputTimeController */ controller: typeof InputTimeController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that select time */ export declare class InputTimeController extends InputBase { /** Type of the input element. Options are minutes and isoTime */ type: "minutes" | "time"; _viewValue: Date; debug: any; /** Sets the default values in init. */ $onInit(): void; /** * Gets or sets the string value that is used in the view. */ get viewValue(): Date; set viewValue(value: Date); } /** * Select component for typeahead. * @example * ```html * * ``` */ export declare class InputTypeahead extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; /** The object data that's to be returned. */ onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** * Binds to an enumeration defined by the Salaxy API. * Set the name of the enumeration. */ enum: string; /** * Options of the select control as a key-value object. */ options: string; /** * Array or comma separated string to filter the option values to just the given ones. * Also sets the order to this order, so works for ordering a given set of values. * Note that hiddenOptions is applied first, so if you want e.g. "undefined" to appear if selected, * you may add it here and it behaves as expected (undefined is still hidden if a value is selevted). */ filter: string; /** If true, the control is not caching values. */ disableCache: string; /** * Label format for the option. The default format is to show only the text of the option. * Options are: * "text" or empty: only the text of the option is displayed. * "text-value": in addition to the text, the value is also displayed in the label. * "value": only the value is displayed. */ labelFormat: string; /** If true, upon selection the value is not set for the input field (it is used for other things thought). */ clearOnSelect: string; /** If true, save new values (ones typed but not found in the select list) to database. Used in ng1-aspa. */ allowCustomValues: string; /** True = return the typeahead selection object alongside the value. */ returnObject: string; /** The object data that's to be returned. */ objectData: string; /** True = The value is saved as a whole object, false = as a primitive (string/number/etc. from the item key "value") */ valueAsObject: string; /** Text if the input field must have a placeholder text. */ placeholder: string; }; /** Uses the InputTypeaheadController */ controller: typeof InputTypeaheadController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller behind form controls that select an typeahead type. */ export declare class InputTypeaheadController extends InputController { private $timeout; private $element; private $scope; static $inject: string[]; /** Options of the select control as a key-value object. */ protected _options: any; /** * Array or comma separated string to filter the option values to just the given ones. * Also sets the order to this order, so works for ordering a given set of values. */ filter: string[]; /** If set to true, does not cache enums. */ disableCache: boolean; /** * Label format for the option. The default format is to show only the text of the option. * Options are: * "text" or empty: only the text of the option is displayed. * "text-value": in addition to the text, the value is also displayed in the label. * "value": only the value is displayed. * "title": Title (description of enumeration) if available. Defaults to text. */ labelFormat: "text" | "value" | "text-value" | "title"; private enumCache; /** List of typeahead options. */ filteredItems: InputEnumOption[]; /** Upon selecting a value from typeahead list, this function is triggered. */ onSelectFunction?: (args?: any) => void; /** Format values to a requried format. */ inputFormatter?: (value: string | number) => string; /** Function to get options for the typeahead list. */ getOptions?: any; /** Typeahead works as a "forwarding" element (searching for a value adds a row), not as an input field to which write values. */ clearOnSelect: boolean; /** Some typeahead inputs allow inserting values (such as tags) to database. */ allowCustomValues: boolean; /** Enums type typeahead, the enum options are fetched with EnumerationsLogic. */ enum: any; /** Object containing all data of typeahead selection. */ objectData: any; /** The typeahead result list. */ private resultList; /** The popper.js menu instance. */ private popperInstance; /** True = return object as well alongside the typical value. */ returnObject: boolean; /** True = The value is saved as a whole object, false = as a primitive (string/number/etc. from the item key "value") */ valueAsObject: boolean; /** Event listener listens for key presses (Up, Down, Tab and Enter). This flags it's status to prevent multiple listeners due to possible race conditions. */ private isKeyListenerActive; /** The field which acts as the search field. */ private inputField; /** User-written text search string. */ searchText: string; /** Flag to make sure the list initializes only once. */ private isInitialized; constructor($timeout: angular_2.ITimeoutService, $element: JQLite, $scope: any); /** Sets the default values in init. */ $onInit(): void; /** Readable value of the chosen option. */ get displayText(): string; /** Delete dom stuff - click event, result list and popper instance - upon destroying of the component (for example changing the tab). */ $onDestroy(): void; /** Creates the result list popper element. */ private initResultList; /** Show results list. */ private showResultsList; /** * Hide results list. */ private closeResultsList; /** Options list */ get options(): any[]; set options(value: any[]); /** Select an item from the typeahead list. */ selectItem(item: any): void; /** * Gets the label for an enumeration. * @param value Type of the enum. */ getEnumerationLabel(value: string): string; /** Formats the label for display and typeahed searches. */ formatLabel(option: InputEnumOption): string; /** * Returns items for current enumeration. */ protected getEnumerations(): InputEnumOption[]; private modifyOptions; /** Filter items based on the input query */ filterEnumItems(showAll: boolean): void; /** Reacts to the changing input value. */ onInputChange(): Promise; /** * Clears the selected value in the input field. */ clearValue(updateModel?: boolean): void; /** Show all typeahead results (that are currently at hand).*/ openResultsList(): Promise; /** * Method to register key down events (arrows Up/Down + Enter are supported). * @param event Captured keyboard event. */ private onKeyDown; } /** * Shop in shop modal for getting Lähitapiola insurance. * @example * ```html * * ``` */ export declare class Insurance extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the InsuranceWizardController */ controller: typeof InsuranceWizardController; /** Uses the controller as aliasing */ controllerAs: string; /** The default template for the component. */ defaultTemplate: string; } /** InsuranceCompany enumeration */ 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", Protector = "protector", 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. */ 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. */ 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 needed for insurance contracts and pension contracts. * @example * ```html * * ``` */ export declare class InsuranceSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Array of section ids to show * By default: ['pensionContracts','insuranceContracts'] * All options: * 'pensionContracts': Pension related settings * 'yelPensionContracts': Pension related settings * 'insuranceContracts' : Insureance contract related settings */ sections: string; /** Sets the isReadOnlyForced status. */ isReadOnlyForced: string; }; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** * Wizard for sending Local Tapiola Insurance Order */ export declare class InsuranceWizardController extends WizardController { private partnerServices; private uiHelpers; /** * For NG-dependency injection */ static $inject: string[]; /** Insurance action */ action: "newInsurance" | "moveInsurance" | "newInsuranceForEntrepreneur"; /** Form data validity */ formDataValidity: boolean; /** Indicates if the order has been sent. */ isSent: boolean; /** Indicates if order is just sending */ isSending: boolean; /** Current Local Tapiola insurance order data. */ current: LocalTapiolaInsuranceOrder; /** Today (for datepicker minDate) */ today: string; countryCodes: { value: string; text: string; }[]; /** Next possible dates for moving insurance to LocalTapiola */ insuranceStartingPointDateOptions: {}; /** LocalTapiola Insurance wizard configuration */ private wizardSteps; private newSteps; private newEntrepreneurSteps; private moveSteps; /** * Creates a new WizardController * @param $scope - The Angular scope * @param wizardService - Maintains the state of the wizard * @param partnerServices - Local Tapiola insurance orders API * @param uiHelpers - Salaxy UI helpers */ constructor($scope: angular_2.IScope, wizardService: WizardService, partnerServices: PartnerServices, uiHelpers: UiHelpers); /** * Sets the current wizard action and wizard steps * @param insuranceAction - Action to performs: order new or move existing insurance. */ setInsuranceAction(insuranceAction: "newInsurance" | "moveInsurance" | "newInsuranceForEntrepreneur"): void; /** * Controller initializations */ $onInit: () => void; /** Send the current order. */ send(): void; /** * Get next possible dates for moving existing insurance contract to LocalTapiola */ getStartingPointDates(): void; /** Go to the next step */ goNext(): void; /** * Go to the last step ("thank you" step) */ goToLast(): void; /** * Navigates to the previous step if possible and saves the data. */ goPrevious(): void; /** * Returns true, if the given order type exists in the current order items. * @param orderTypes - Order type to check. * @returns True, if the order type is found, otherwise default. */ hasOrderType(...orderTypes: LocalTapiolaInsuranceOrderType[]): boolean; /** Returns true if user can go forward in wizard */ get canGoNext(): boolean; /** Opens the insurance dialog. */ openModal(): void; /** * Validates the order. */ validate(): Promise; /** * Resets the current order. */ reset(): void; } /** Settings related to Integrations that should be immediately available with session without separate load. */ 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 */ declare enum InternationalIdentifier { Undefined = "undefined", TaxIdentificationNumber = "taxIdentificationNumber", ForeignPersonalIdentificationNumber = "foreignPersonalIdentificationNumber", Other = "other" } /** InternationalSocialSecurityException enumeration */ declare enum InternationalSocialSecurityException { NotSubjectToEarningsRelatedPensionInsurance = "notSubjectToEarningsRelatedPensionInsurance", NotSubjectToAccidentAndOccupationalDiseaseInsurance = "notSubjectToAccidentAndOccupationalDiseaseInsurance", NotSubjectToUnemploymentInsurance = "notSubjectToUnemploymentInsurance", NotSubjectToHealthInsurance = "notSubjectToHealthInsurance", VoluntaryEarningsRelatedPensionInsurance = "voluntaryEarningsRelatedPensionInsurance", NoObligationToHealthInsuranceDailyAllowanceContribution = "noObligationToHealthInsuranceDailyAllowanceContribution" } /** InternationalSocialSecurityType enumeration */ 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. */ 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; } /** * Component that displays alerts for invoices that are in "Payment Started" status. * This component shows warnings for each payment channel that has pending payments. * @example * ```html * * * ``` */ export declare class InvoiceAlerts extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Payment channels for OData query. */ paymentChannels: string; /** Indicates if used in pro. */ isPro: string; }; /** Uses the InvoiceAlertsController */ controller: typeof InvoiceAlertsController; /** The default template for the component. */ defaultTemplate: string; } /** * The `InvoiceAlertsController` class is responsible for managing invoice alerts within the application. */ export declare class InvoiceAlertsController implements angular_2.IController { private calculationsApi; private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Payment channels for OData query. */ paymentChannels: PaymentChannel[]; /** Indicates if used in pro. */ isPro: boolean; groupedPaymentChannelResult: string[]; /** Start date for filtering list of calculations with status "PaymentStarted". Displayed on front page */ private paymentStartedWarningStartDate; /** End date for filtering list of calculations with status "PaymentStarted". Displayed on front page */ private paymentStartedWarningEndDate; private result; constructor(calculationsApi: Calculations, ajax: Ajax); /** * Implement IController */ $onInit(): void; /** * Groups the results by payment channel and stores the unique payment channels. */ groupResultsByPaymentChannel(results: CalculationListItem[]): void; /** * Retrieves a list of calculation items based on OData filters * This method fetches data from the calculations API or a specific OData endpoint depending on the value of the `isPro` property. It applies filters to retrieve items with a status of 'paymentStarted' and within a specified salary date range. */ getOData(): Promise; /** * Generates an HTML string containing payment channel information. * The generated HTML includes: * - A header with the payment channel label. * - A description paragraph. * - Instruction text specific to the payment channel. * - Links related to the payment channel, including calculation and payroll links if applicable. * - A help link to an external article. */ getpaymentChannelInfoHtml(paymentChannel: PaymentChannel): string; private getUrls; private getPaymentChannelFilter; } /** * Provides read access for authenticated user to access his/her own invoices * and write access to create new salary and related payments based on calculations. */ export declare class InvoiceCrudController extends ApiCrudObjectController { protected invoicesApi: Invoices; private invoicesService; private ajax; private _reportCalcs; private _calcOrPayrollId; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** For list component, defines the layout / functionality of the list. */ mode: "default" | "panel" | "person"; /** Data reader for selected items. */ selectionDataReader: { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; /** Optional label for data export */ exportLabel: string; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** Data reader for selected items. */ selectionDataReaderPerson: { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; /** Optional label for data export */ exportLabel: string; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** Status filters for lists: Groups statuses to logical groups. */ statusFilters: InputEnumOption[]; constructor(invoicesApi: Invoices, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, invoicesService: InvoicesService, ajax: Ajax); /** * Initializes the controller */ $onInit(): void; /** Gets the default channel for the current account. */ get defaultChannel(): PaymentChannel; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Gets the type of the due date vs. the current date and status for display purposes. */ getDueDateType(listItem: InvoiceListItem): "default" | "estimation" | "canceled" | "overdue" | "future" | "unknown"; /** For list components, gets the OData query options. */ getListOptions(): { $filter: string; $top: number; $orderby: string; } | { $orderby: string; $filter?: undefined; $top?: undefined; }; /** Returns content url for the invoice. */ getContentUrl(id: string, inline?: boolean): string; /** * Request the status update for the invoice. * @param status Status data. If not set, uses the requestedStatus property of the controller. */ requestStatusUpdate(status?: InvoiceStatus): any; /** Requested status for binding */ get requestedStatus(): InvoiceStatus; /** Requested status for binding */ set requestedStatus(value: InvoiceStatus); /** * Delete invoice and related business objects (calculations and payrolls) * @param item - Invoice to delete. * @param confirmMessage - Optional message for confirm popup */ deleteWithBusinessObjects(item?: Invoice, confirmMessage?: string): Promise; /** * Data reader for one item. * TODO: Should add interface for the reader. */ getItemDataReader: (item: { /** List item id */ id: string; /** List item owner */ owner: string; }) => { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** Unselect all */ unselectAll(): void; /** Select all */ selectAll(): void; /** Open PaymentDialog for selected row */ showPaymentDialog(row: InvoiceListItem): void; /** Get invoices calculation by id */ getReportCalcs(): never[]; } /** Invoice specific business data for index. */ 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; /** The payroll ID of the calculation this invoice is based on (applicable only for Net and Foreclosure). */ payrollId?: string | null; /** The payroll Title of the calculation this invoice is based on (applicable only for Net and Foreclosure). */ payrollTitle?: string | null; /** Invoice/payment status in the external system. */ externalStatusAt?: string | null; /** External status of the invoice in the external system. */ externalStatus?: string | null; } /** * Edit / actions user interface for a single invoice. * @example * ```html * * ``` */ export declare class InvoiceEdit extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the InvoiceCrudController */ controller: typeof InvoiceCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Header for the invoice */ 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; /** Invoice/payment status in the external system. */ externalStatusAt?: string | null; /** External status of the invoice in the external system. */ externalStatus?: string | null; /** List of business object ids (typically calculations) on which the payment is based on. */ businessObjects?: string[] | null; /** The payroll ID of the calculation this invoice is based on (applicable only for Net and Foreclosure). */ payrollId?: string | null; /** The payroll Title of the calculation this invoice is based on (applicable only for Net and Foreclosure). */ payrollTitle?: 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_2 | 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; } /** * Shows a list of salary reports. * @example * ```html * * ``` */ export declare class InvoiceList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * list view 'mode'. * If undefined, defaults to full list. * Use panel for dashboards etc. */ mode: string; }; /** Uses the InvoiceCrudController */ controller: typeof InvoiceCrudController; /** The default template for the component. */ defaultTemplate: string; } /** 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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. */ 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. */ declare interface InvoicePayer { /** Avatar is the visual representation of the party. */ avatar?: Avatar_2 | 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; } /** * Shows the report for the given invoice. * @example * ```html * * ``` */ export declare class InvoicePaymentList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the InvoicePaymentListController */ controller: typeof InvoicePaymentListController; /** The default template for the component. */ defaultTemplate: string; } /** * Extends the InvoiceCrudController to provide * SEPA payment management functionality. */ export declare class InvoicePaymentListController extends InvoiceCrudController { private invService; private sepaAjax; private session; private $http; private $timeout; private $sce; private $scope; /** * For NG-dependency injection */ static $inject: string[]; /** URL for the OData list service, null for preventing automatic initial load */ get odataServiceUrl(): string; groupedItems: GroupedItem[]; /** Year for invoices query */ queryYear: string; selectedInvoices: any[]; /** Status filters for invoices */ invoiceEntityTypes: { label: string; value: string; }[]; /** Invoice entity type used in filtering */ invoiceEntityType: { label: string; value: string; } | undefined; /** Status filters for invoices */ statusFilters: { value: string; text: string; ui: string; }[]; /** The current status filter. "waitingConfirmation" is the default. */ statusFilter: { value: string; text: string; ui: string; } | undefined; /** Default sepa channel */ paymentChannel: PaymentChannel; currentTab: "netpaymentsandforeclosure" | "monthlypayments"; paymentChannelConfig: PaymentChannelConfig; companyAccount: CompanyAccount; sortMode: "asc" | "desc"; /** Filter for other party name */ otherPartyNameFilter: string; /** Filter for reference number */ referenceFilter: string; /** Filter for IBAN number */ ibanFilter: string; private qrCodesCache; private rowActionsCache; private rowGroupActionsCache; /** Tab buttons component controller, to programmatically change tabs. */ private tabButtonsCtrl; constructor(invoicesFullApi: Invoices, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, invService: InvoicesService, sepaAjax: Ajax, session: SessionService, $http: angular_2.IHttpService, $timeout: angular_2.ITimeoutService, $sce: angular_2.ISCEService, $scope: angular_2.IScope); /** Intitializes the controller */ $onInit(): void; /** * Selects and shows a tab in the payroll details view */ selectTab(tab: "netpaymentsandforeclosure" | "monthlypayments"): void; /** * Loads the data for the controller. */ loadData(showLoading?: boolean, idsToUpdate?: string[] | null): void; /** * Checks if multi-select functionality is supported by the current payment channel configuration * @returns True if multi-select is supported, false otherwise */ supportItemMultiSelect(): boolean; /** * Checks if the current payment channel configuration supports system messages * @returns True if system messages are supported, false otherwise */ hasExternalSystemMessagesEnabled(): boolean; /** * Checks if a given invoice item is currently selected * @param item The invoice item to check * @returns True if the item is in the selectedInvoices array, false otherwise */ isSelected(item: any): boolean; /** * Sets the selected state of an invoice item * @param item The invoice item to select/unselect * @param value True to select, false to unselect, "toggle" to toggle selection state */ setSelected(item: any, value?: true | false | "toggle"): void; /** * Determines if a given invoice item is selectable based on the current payment channel. * For the PalkkausWS payment channel, only invoices with status WaitingConfirmation are selectable. * For other payment channels, no items are selectable. * @param {InvoiceListItem} item - The invoice item to check for selectability. * @returns {boolean} True if the item is selectable, false otherwise. */ isItemSelectable(item: InvoiceListItem): boolean; /** * Sets the payment channel configuration based on the current payment channel. * This method calls getPaymentChannelConfig() to get the appropriate configuration * and assigns it to the paymentChannelConfig property. */ setPaymentChannelConfig(): void; /** * Checks if the current user is an authorized payer. * This method is only used when the payment channel is PalkkausWS. * @returns True if the user is strongly authenticated (authorized payer), false otherwise. */ isStronglyAuthorizedPayer(): boolean; /** * Opens a strong authentication dialog for the user. * This method launches an external dialog for strong authentication using a third-party service. * If the authentication is successful and a token is received, it exchanges the token for a new access token * via the backend OAuth2 token exchange endpoint. The new access token is then set as the current token. * If authentication fails or no token is received, an error is shown to the user. * @returns {Promise} A promise that resolves when the authentication flow is complete. * @throws {Error} If no token is received from the authentication dialog or the token exchange fails. */ openStrongAuthDialog(): Promise; /** * Gets the payment channel configuration based on the current payment channel. * @returns A configuration object containing row actions for invoice items. * Currently only handles PaymentChannel.PalkkausManual channel. * For PalkkausManual channel, returns an object with: * - rowActions: Function that returns an array of actions available for an invoice item * - For unread/read status: Adds "Merkitse maksetuiksi" (Mark as paid) action * - For unread/read/paid status: Adds "Peru lasku" (Cancel invoice) action * - Actions are cached by invoice ID and status * Each action has: * - text: Display text for the action * - onClick: Handler function that shows confirmation dialog and updates invoice status */ getPaymentChannelConfig(): PaymentChannelConfig | null; /** * Returns the CSS class for a given VismaPay status. * These statuses are from VismaPay. * @param status The VismaPay status string. * @returns The corresponding badge CSS class. * TODO: More later to config if more statuses are needed. */ getBadgeClass(status: string): "badge bg-danger" | "badge bg-success" | "badge bg-warning" | "badge bg-info"; /** * Gets the grouped invoice items filtered and sorted based on the current tab. * @returns An array of grouped invoice items, filtered and sorted by date. * For the "netpaymentsandforeclosure" tab, returns only net payments and foreclosures. * For the "monthlypayments" tab, returns only monthly payments like tax, union etc. * Returns empty array if no grouped items exist or for unknown tabs. */ getGroupedItems(): GroupedItem[]; /** * Toggles the sort mode between ascending and descending. * This affects the order of grouped items when displayed. */ changeSortMode(): void; /** * Updates the grouped items based on the provided invoice list items. * Groups net payments and foreclosures by payroll or calculation. * Groups monthly payments (tax, union, unemployment, pension) by month. * @param items List of invoice items to group */ updategroupedItems(items: InvoiceListItem[], updateSpecificInvoices?: boolean): void; /** * Loads all invoices from the server. * @returns Promise of all invoices */ loadAllInvoices(idsToUpdate?: string[] | null): Promise; /** Filter function for angularjs filter used in template */ filterInvoices: (invoice: InvoiceListItem) => boolean; /** * Shows a dialog for a single invoice. * @param item Invoice item. */ showInvoiceDialog(item: InvoiceListItem): void; /** * Returns PDF url for a single invoice. * @param item Invoice list item. */ getPdfUrl(item: InvoiceListItem): string; /** * Retrieves the QR code for the specified invoice item. * If the QR code is not already cached, it generates the QR code and caches it for future use. * @param item - The invoice item for which to retrieve the QR code. * @returns The QR code string. */ getQrCode(item: InvoiceListItem): string; /** * Calculates barcode value for the invoice item. * @param item Invoice list item. */ getBarcodeValue(item: InvoiceListItem): string; /** * Retrieves the barcode for the invoice recipient's IBAN. * If the IBAN does not start with "fi" or is not provided, an empty string is returned. * The barcode is generated using the Barcodes.createBarcode function. * @returns The barcode as a string, wrapped in an HTML trust object. */ getBarcode(item: InvoiceListItem): string; /** Hides bar code for forecast and preview invoice statuses*/ hideBarCode(item: InvoiceListItem): boolean; /** * Copies the barcode to clipboard. * @param item Invoice list item. */ copyBarcode(item: InvoiceListItem): void; /** Gets and avatar image for a payment channel */ getChannelAvatar(channel: PaymentChannel): Avatar_2 | undefined; /** Data reader for one item. */ getGroupItemDataReader: (item: InvoiceListItem, status: InvoiceStatus, fileTypeId?: null) => { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; getSepaData: (arr: Invoice[]) => Promise; getFinvoiceData: (arr: Invoice[]) => Promise; getPdfData: (arr: Invoice[]) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; }; private getInvoice; private getPdfData; private getFinvoiceData; private getSepaData; private download; private getEprWarning; private generateQrCodeSvgForInvoice; } /** InvoicePaymentType enumeration */ declare enum InvoicePaymentType { Default = "default", Salary = "salary", SalaryInPast = "salaryInPast" } /** * Shows a print-like preview for an invoice. * @example * ```html * * ``` */ export declare class InvoicePreview extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the InvoiceCrudController */ controller: typeof InvoiceCrudController; /** The default template for the component. */ defaultTemplate: string; } /** 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). */ declare interface InvoicePreview_2 { /** 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. */ 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; } /** * Shows the report for the given invoice. * @example * ```html * * ``` */ export declare class InvoiceReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The invoice for the report. */ invoice: string; /** If true, uses the current style of the site. The default value is false. */ applySiteStyles: string; /** The language for report*/ lang: string; }; /** Uses the InvoiceReportController */ controller: typeof InvoiceReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Renders a invoice report for the given invoice. * Uses Handlebars templates (@salaxy/reports). */ export declare class InvoiceReportController implements angular_2.IController { private templates; private $sce; private $timeout; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Invoice for the report */ invoice: Invoice; /** If true applies table-html classes and uses only invoice table */ applySiteStyles: boolean; /** Boolean indicating if the refresh is in progress. */ refreshInprogress: boolean; /**Selected report language */ lang: Language; private renderedInvoice; private renderedLang; private renderedApplySiteStyles; private htmlData; private reportOptions; private reportData; /** * Creates a new InvoiceReportController * @ignore */ constructor(templates: Templates, $sce: angular_2.ISCEService, $timeout: angular_2.ITimeoutService, sessionService: SessionService); /** * Implement IController */ $onInit(): void; /** Bindable and trusted html. */ get html(): any; /** Checks if invoice is preview */ isPreviewInvoice(): boolean; /** * Refresh invoice report data. */ private refresh; private getDocumentAndSvgNode; private getDefaultLanguage; } /** Row for the invoice */ 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. */ 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; /** * Saving invoices is not supported. * @param _item Invoice item (not used) * @throws Error indicating operation is not supported */ save(_item: any): any; /** * 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; /** * Retrieves the content (PDF) for an invoice by ID. * @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). * @returns A Promise that resolves to a Blob containing the invoice PDF */ getContent(id: string, inline?: boolean): Promise; /** * Retrieves the content (PDF) for an invoice object. * @param invoice - The Invoice object * @param inline - If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). * @returns A Promise that resolves to a Blob containing the invoice PDF */ getContent(invoice: Invoice, inline?: boolean): Promise; /** * Gets the URL for downloading a SEPA file for the specified invoices. * @param idsOrInvoices - Array of invoice IDs or Invoice objects to include in the SEPA file * @param payerIbanNumber - Optional IBAN number of the payer * @param bankPartyId - Optional bank party ID of the payer * @param inline - If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). Defaults to false. * @returns The complete URL for downloading the SEPA file, including server address and access token */ getSepaUrl(idsOrInvoices: string[] | Invoice[], payerIbanNumber?: string, bankPartyId?: string, inline?: boolean): string; /** * Retrieves a SEPA file for the specified invoice IDs. * @param ids - Array of invoice IDs to include in the SEPA file * @param payerIbanNumber - Optional IBAN number of the payer * @param bankPartyId - Optional bank party ID of the payer * @param inline - If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). * @returns A Promise that resolves to a Blob containing the SEPA file content */ getSepa(ids: string[], payerIbanNumber?: string, bankPartyId?: string, inline?: boolean): Promise; /** * Retrieves a SEPA file for the specified invoice objects. * @param invoices - Array of Invoice objects to include in the SEPA file * @param payerIbanNumber - Optional IBAN number of the payer * @param bankPartyId - Optional bank party ID of the payer * @param inline - If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). * @returns A Promise that resolves to a Blob containing the SEPA file content */ getSepa(invoices: Invoice[], payerIbanNumber?: string, bankPartyId?: string, inline?: boolean): Promise; /** * Gets the URL for downloading a finvoice file for an invoice. * @param id - The ID of the invoice to get the finvoice URL for. * @param inline - If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). * @returns The complete URL for downloading the finvoice file, including server address and access token. */ getFinvoiceUrl(id: string, inline?: boolean): string; /** * Gets a finvoice file for an invoice using the invoice ID. * @param id - The ID of the invoice to get the finvoice for * @param inline - If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). * @returns A Promise that resolves to a Blob containing the finvoice file */ getFinvoice(id: string, inline?: boolean): Promise; /** * Gets a finvoice file by posting the invoice object. * @param invoice - The Invoice object to generate the finvoice for * @param inline - If true, returns the content as inline (disposition) in browser. * If false, the content is returned as an attachment (download). * @returns A Promise that resolves to a Blob containing the finvoice file */ getFinvoice(invoice: Invoice, inline?: boolean): Promise; /** * Sends an e-invoice for an invoice. * @param id - The ID of the invoice to send the e-invoice for * @param receiver - The receiver of the e-invoice * @param intermediator - The intermediator of the e-invoice * @returns A Promise that resolves to the result of the e-invoice sending process */ sendEInvoice(id: string, receiver: string, intermediator: string): Promise; } /** * Shows a view for creating invoices: PaymentChannel selection, validation errors if necessary, * Payment channel selection and button for creating invoices for Payroll or Calculation. * If pointed to a paid calculation, shows the invoices that were already created or legacy payment method. * @example * ```html * * ``` */ export declare class InvoicesCreate extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the InvoicesCreateController */ controller: typeof InvoicesCreateController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for the new Payment button and other functionality: * Creating (recreating) Invoices based on Calculations and Payrolls. */ export declare class InvoicesCreateController implements angular_2.IController { private invoicesApi; private invoicesService; private calculationsApi; private sessionService; protected uiHelpers: UiHelpers; private $location; private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Defines the binding mode of the component. * Currently, only "model" is supported (Calculation or PayrollDetails), * but we might support e.g. id in the future. */ bindingMode: "model" | "null"; /** * Collection of invoices if the channel and model have been set. * Null if the collection is being fetched. */ invoices: InvoicePreview_2[]; /** User canceled the process. */ userCanceled: boolean; private _current; private _model; private _primaryCalcNetInvoicePreview; private _primaryCalcTaxInvoicePreview; constructor(invoicesApi: Invoices, invoicesService: InvoicesService, calculationsApi: Calculations, sessionService: SessionService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, ajax: Ajax); /** * Implement IController by providing onInit method. * We currently do nothing here, but if you override this function, * you should call this method in base class for future compatibility. */ $onInit(): void; /** * Set the Current selected item (the model). * Currently, only Calculation or PayrollDetails is supported, * but we will probably support controller and url in the future. */ set model(value: Calculation | PayrollDetails_2 | "url" | string | ApiCrudObjectController | ApiCrudObjectController); /** Gets the Current selected item (the model). */ get model(): Calculation | PayrollDetails_2 | "url" | string | ApiCrudObjectController | ApiCrudObjectController; /** Changes the channel */ set channel(value: PaymentChannel); /** The current payment channel for user interface purposes. */ get channel(): PaymentChannel; /** Gets the enabled channels. */ get allChannels(): InputEnumOption[]; /** Gets the text for the Primary submit button. Null for hiding the button. */ getOkBtn(): string; /** * Intro text for the dialog. */ get intro(): string; /** Title for the dialog */ get title(): string; /** Gets the Current selected item. */ get current(): Calculation | PayrollDetails_2; /** * Returns true if the invoices have been created => the payment process has been started. * It may have been completed (paid), canceled or rejected. */ get isStarted(): boolean; /** * Gets the payment status of the invoices. * * - unknown: The invoices have not been loaded from the server yet. * - preview: The invoices have not yet been created * - inProgress: Any of the invoices is in progress (WaitingPalkkaus,Unread, Read, WaitingConfirmation, PaymentStarted) * OR some invoices have been paid, some not (default state). * - canceled: One of the invoices is canceled. * - exceptions: Any of the invoices have exceptions (Undefined, Error) * - paid: All the invoices have been paid * * This is ready only after the invoices have been loaded by Preview (may be already created invoices). */ get paymentStatus(): "unknown" | "preview" | "inProgress" | "exceptions" | "canceled" | "paid"; /** Gets the type of current. */ get currentType(): "Calculation" | "PayrollDetails" | null; /** Returns true if the calculations are valid for payment. */ get isValid(): boolean; /** Gets and avatar image for a payment channel */ getChannelAvatar(option: InputEnumOption): Avatar_2 | undefined; /** Reloads the preview invoices from the server. */ reload(): void; /** Gets the part of the UI that should be visible. */ get uiStatus(): "invalid" | "loading" | "created" | "supportedChannel" | "unsupported" | "userCanceled" | "undefined"; /** Returns current salary date kind */ get salaryDateKind(): SalaryDateKind; /** * Starts the invoices creation process from the current channel and model. * This method is used when controller is used first as previe and then creating invoices. */ createInvoices(closeFunc?: (action: any) => any): void; /** * Create invoices for calculation: Immediate execution without preview. Used in PRO and other advanced UI. * Shows a loader dialog, saves changes if necessary, creates invoices and reloads the controller. * @param calcController Controller that contains the calculation that should be paid. May have save changes. * @param channel Payment channel that is used for payment. */ createInvoicesForCalculation(calcController: CalculationCrudController, channel: PaymentChannel): Promise; /** * Create invoices for payroll: Immediate execution without preview. Used in PRO and other advanced UI. * Shows a loader dialog, saves changes if necessary, creates invoices and reloads the controller. * @param payrollController Controller that contains the calculation that should be paid. May have save changes. * @param channel Payment channel that is used for payment. */ createInvoicesForPayroll(payrollController: PayrollCrudController, channel: PaymentChannel): Promise; /** Gets text for preview invoice */ getPreviewText(item: InvoicePreview_2): string; /** Gets text for estimation invoice */ getEstimationText(item: InvoicePreview_2): string; /** Gets the type of the calculation for display purposes. */ getDueDateType(item: InvoicePreview_2): "default" | "estimation" | "forecast" | "preview" | "zero" | "unknown" | "paid" | "canceled" | "inProgress"; /** * Returns the net invoice preview for current calculation. */ get primaryCalcNetInvoicePreview(): InvoicePreview_2; /** * Returns the ysc invoice preview for current calculation. */ get primaryCalcTaxInvoicePreview(): InvoicePreview_2; private getNetInvoiceId; private showInvoiceSuccessAlert; } /** * Extends the InvoiceCrudController to provide * SEPA payment management functionality. */ export declare class InvoiceSepaController extends InvoiceCrudController { private invService; private sepaAjax; private session; private $http; private $timeout; private $sce; /** * For NG-dependency injection */ static $inject: string[]; /** URL for the OData list service, null for preventing automatic initial load */ get odataServiceUrl(): string; /** List items grouped by owner, invoiceType, status and dueDate */ groupedItems: Array; /** Year for invoices query */ queryYear: string; /** Status filters for invoices */ invoiceEntityTypes: { label: string; value: string; }[]; /** Invoice entity type used in filtering */ invoiceEntityType: { label: string; value: string; } | undefined; /** The current status filter. "waitingConfirmation" is the default. */ statusFilter: InputEnumOption | undefined; /** Default sepa channel */ sepaChannel: PaymentChannel; private _allChannels; private qrCodesCache; constructor(invoicesFullApi: Invoices, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, invService: InvoicesService, sepaAjax: Ajax, session: SessionService, $http: angular_2.IHttpService, $timeout: angular_2.ITimeoutService, $sce: angular_2.ISCEService); /** Intitializes the controller */ $onInit(): void; /** * Loads the data for the controller. */ loadData(): void; /** * Loads all invoices from the server. * @returns Promise of all invoices */ loadAllInvoices(): Promise; /** * Shows a dialog for a group of invoices. * @param group Group of invoices as defined in groupedItems. */ showGroupDialog(group: any): void; /** * Shows a dialog for a single invoice. * @param item Invoice item. */ showInvoiceDialog(item: InvoiceListItem): void; /** Filter function for angularjs filter used in template */ invoiceFilter: (value: InvoiceListItem | any) => boolean; /** Gets the grouped items, creating them if necessary. */ getGroupedItems(): GroupedItem_2[]; /** * Checks if a group contains any duplicate invoices based on their IDs. * Iterates through each invoice in the group and checks if there are multiple invoices * with the same ID across all grouped items. * @param group - The group of invoices to check for duplicates. * @returns {boolean} - Returns true if any duplicate invoice IDs are found, otherwise false. */ groupHasDuplicateInvoices(group: GroupedItem_2): boolean; /** Updates the grouped items based on the ODataQueryController. */ updateGroupedItems(items: InvoiceListItem[]): void; /** Data reader for one item. */ getGroupDataReader: (group: { /** invoices */ invoices: InvoiceListItem[]; }, status: InvoiceStatus) => { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; getSepaData: (arr: Invoice[]) => Promise; getFinvoiceData: (arr: Invoice[]) => Promise; getPdfData: (arr: Invoice[]) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** Data reader for one item. */ getGroupItemDataReader: (item: InvoiceListItem, status: InvoiceStatus) => { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; getSepaData: (arr: Invoice[]) => Promise; getFinvoiceData: (arr: Invoice[]) => Promise; getPdfData: (arr: Invoice[]) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** * Returns PDF url for a single invoice. * @param item Invoice list item. */ getPdfUrl(item: InvoiceListItem): string; /** * Retrieves the QR code for the specified invoice item. * If the QR code is not already cached, it generates the QR code and caches it for future use. * @param item - The invoice item for which to retrieve the QR code. * @returns The QR code string. */ getQrCode(item: InvoiceListItem): string; /** * Calculates barcode value for the invoice item. * @param item Invoice list item. */ getBarcodeValue(item: InvoiceListItem): string; /** * Retrieves the barcode for the invoice recipient's IBAN. * If the IBAN does not start with "fi" or is not provided, an empty string is returned. * The barcode is generated using the Barcodes.createBarcode function. * @returns The barcode as a string, wrapped in an HTML trust object. */ getBarcode(item: InvoiceListItem): string; /** Hides bar code for forecast and preview invoice statuses*/ hideBarCode(item: InvoiceListItem): boolean; /** * Copies the barcode to clipboard. * @param item Invoice list item. */ copyBarcode(item: InvoiceListItem): void; /** Gets and avatar image for a payment channel */ getChannelAvatar(channel: PaymentChannel): Avatar_2 | undefined; /** Update status of invoices in group using the group data reader. */ updateInvoiceGroupStatus(group: { /** invoices */ invoices: InvoiceListItem[]; }, status: InvoiceStatus): void; /** Update status of single invoice using the group data reader. */ updateInvoiceGroupItemStatus(item: InvoiceListItem, status: InvoiceStatus): void; /** * Gets all channels as avatars for drop-down. */ getAllChannels(): Avatar_2[]; /** * Summs payment fields of InvoiceListImte array * @returns summed values */ sumInvoicePayments(invoices: Array): number; private getInvoice; private getPdfData; private getFinvoiceData; private getSepaData; private download; private getEprWarning; /** Checks if the Epr report is delayed. */ private isDelayed; private generateQrCodeSvgForInvoice; } /** Settings related to invoices that are sent to customers. */ 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. */ 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; } /** Implements the user interface logic for new Invoices: Salary and side-cost payments. */ export declare class InvoicesService { private invoicesApi; private sessionService; private uiHelpers; private settingsService; private ajax; private $location; private $timeout; private calculations; private onboardingService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private _defaultSepaChannel; private _defaultPaymentListChannel; constructor(invoicesApi: Invoices, sessionService: SessionService, uiHelpers: UiHelpers, settingsService: SettingsService, ajax: Ajax, $location: angular_2.ILocationService, $timeout: angular_2.ITimeoutService, calculations: Calculations, onboardingService: OnboardingService); /** Gets the default SEPA payment channel. */ get defaultSepaChannel(): PaymentChannel; set defaultSepaChannel(value: PaymentChannel); /** Gets the default payment channel. */ get defaultPaymentListChannel(): PaymentChannel; set defaultPaymentListChannel(value: PaymentChannel); /** * Application level setting of the default payment channel. */ get defaultChannel(): PaymentChannel; /** * Gets the enabled payment channels as avatars for the current session. */ get channels(): Avatar_2[]; /** * Gets the enabled payment channels as input enum options for the current session. */ get channelEnumOptions(): InputEnumOption[]; /** * Shows the paymment page as dialog. * @param paymentObject - The object to pay: Either Calculation or Payroll */ showPaymentDialog(paymentObject: Calculation | PayrollDetails_2): void; /** * Shows the payment invoice inspection page as dialog. * @param paymentObject - Paid calculation */ showPalkkausPersonalInvoicesDialog(paymentObject: Calculation): void; /** * Querys item and opens paymentdialog * @param item InvoiceListItem used to query calculation */ showPaymentDialogForCalculation(item: InvoiceListItem): void; /** * Shows an alert if the signature is missing. */ showMissingSignatureAlert(): void; /** * Checks if the company's KYC (Know Your Customer) is completed and not expired for payment. * @returns {boolean} Returns true if the KYC is completed and not expired, otherwise false. */ checkKycForPayment(): boolean; /** * Shows an alert if the kyc is missing. */ showMissingKycAlert(): void; /** * Returns true if the current authenticated user has * required verification for the payment. */ checkAccountVerificationForPayment(): boolean; /** Returns warning message text for the invoice if reported late.*/ getEprWarningForPayment(salaryDate: string): string; /** Returns warning message text for the invoice if reported late.*/ getEprWarningForCancellation(salaryDate: string, isPaid: boolean): string; /** * Checks the salary date validity before payment. * @param paymentObject - The object to pay: Either Calculation or Payroll */ checkChangedSalaryDate(paymentObject: Calculation | PayrollDetails_2): boolean; /** * Shows an alert for invalid salary date. */ showChangedSalaryDateAlert(): void; /** Checks if the Epr report is delayed. */ private isDelayed; private createCfaInvoice; private createPalkkausCfaPaytrailInvoice; private createPalkkausPersonalInvoice; private textToRows; } /** InvoiceStatus enumeration */ 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. */ 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; /** Invoice/payment status in the external system. */ externalStatusAt?: string | null; /** External status of the invoice in the external system. */ externalStatus?: string | null; } /** * Shows the export tools for the invoices. * @example * ```html * * ``` */ export declare class InvoiceTools extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Reference to the data reader object. */ reader: string; }; /** Uses the InvoiceToolsController */ controller: typeof InvoiceToolsController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality to export invoices in various formats. */ export declare class InvoiceToolsController implements angular_2.IController { private ajax; private $http; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Export format */ fileTypeId: string; /** Supported export formats */ fileTypes: { /** File type id */ id: string; /** File type label */ label: string; /** Workflow message after export */ workflowMessage: any; /** Icon */ icon: string; }[]; /** Filetype Enum Options for filetype select element*/ get fileTypeOptions(): null; /** * Object with read function to call for retrieving the invoice data. * Function has the following argument: arr, which is an array of invoices into which the result will be appended. */ reader: { /** Function for reading invoices into given array. */ read: ( /** Array for invoices */ arr: Invoice[], /** Message for workflow (loading) */ message: string) => Promise; /** Function for getting sepa data for invoices */ getSepaData?: ( /** Array for invoices */ arr: Invoice[]) => Promise; /** Function for getting finvoice data for invoices */ getFinvoiceData?: ( /** Array for invoices */ arr: Invoice[]) => Promise; /** Function for getting pdf data for invoices */ getPdfData?: ( /** Array for invoices */ arr: Invoice[]) => Promise; /** Optional label for data export */ exportLabel?: string; /** Indicates if the export is not possible */ disabled: () => boolean; }; private _fileTypeOptions; constructor(ajax: Ajax, $http: angular_2.IHttpService, uiHelpers: UiHelpers); /** * Initialize controller values. */ $onInit(): void; /** Set visible filetypes. Sets the first file type as default. */ setFileTypes(fileTypes: string[]): void; /** Exports data in defined format. */ export(reader?: { /** Function for reading data into given array. */ read: ( /** Array for invoices */ arr: Invoice[], /** Workflow loading message */ message: string) => Promise; /** Function for getting sepa data for invoices */ getSepaData?: ( /** Array for invoices */ arr: Invoice[]) => Promise; /** Function for getting finvoice data for invoices */ getFinvoiceData?: ( /** Array for invoices */ arr: Invoice[]) => Promise; /** Function for getting pdf data for invoices */ getPdfData?: ( /** Array for invoices */ arr: Invoice[]) => Promise; /** Optional label for data export */ exportLabel?: string; /** Indicates if the export is not possible */ disabled: () => boolean; }, /** If true, does not show loading indicator. Default is false. */ hideLoading?: boolean, /** If true, does not return any content. */ withoutContent?: boolean, /** Prefer zip. If true creates zips for one content file too. */ preferZip?: boolean): Promise; /** * Create single invoice. * @param channel Payment channel. * @param invoiceType Invoice type. * @returns New/updated invoice. */ createSingleInvoice(channel: PaymentChannel, invoiceType: InvoiceType): Promise; /** * Returns the file type definition * @param fileTypeId File type id. */ getFileType(fileTypeId: string): { /** File type id */ id: string; /** File type label */ label: string; /** Workflow message after export */ workflowMessage: any; /** Icon */ icon: string; } | undefined; private getFileName; private getZipFileName; private getWorkflowMessage; private getPdfData; private getFinvoiceData; private getSepaData; private download; } /** InvoiceType enumeration */ 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. */ 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; } declare interface IrCodeIncomeReportRow { workerAvatar: Avatar_2; workerId: string; employmentId: string; rows: IrReportRow[]; } /** IR Delivery settings. */ declare interface IrDelivery { /** Official id of the sender. */ senderOfficialId?: string | null; /** Contact persons for the IR records */ contactPersons?: ContactPerson[] | null; } /** * IR delivery settings. * @example * ```html * * ``` */ export declare class IrDeliverySettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** Reporting details to Incomes registry (Tulorekisteri). */ 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; } /** * Shows a user interface for Earnings Payment Report ("Tulorekisteri-ilmoitus"). * Currently, the UI is read-only, but it may later be extended to be editable * for purposes of corrections. * @example * ```html * * ``` */ export declare class IrEarningsPayment extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** * Alternative model binding. * Instead of model="EarningsPaymentId", you may specify calculation-id="calculationId" */ calculationId: string; /** * Alternative model binding. * Instead of model="EarningsPaymentId", you may specify calculation="calculation" */ calculation: string; /** * Alternative model binding. * In this case, you should set both the model (using model) and the calculation (using calculationFor) */ calculationFor: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the EarningsPaymentReportController */ controller: typeof IrEarningsPaymentCrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for user interface of Earnings Payment Report ("Tulorekisteri-ilmoitus"). */ export declare class IrEarningsPaymentCrudController extends ApiCrudObjectController { private fullApi; private calcApi; private absencesApi; private session; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Calculation controller */ calcController: Calculator2019Controller; private _calculation; private _calculationId; private _hasCalculationFor; constructor(fullApi: IrEarningsPayments, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, calcApi: Calculations, absencesApi: Absences, session: SessionService); /** * Initializes the controller */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Gets calculation */ get calculation(): Calculation; /** * Sets calculation and if it is different then starts the loading of the EarningsPayment object to that calculation. */ set calculation(value: Calculation); /** Gets calculation */ get calculationId(): string; /** * Sets calculation and if it is different then starts the loading of the EarningsPayment object to that calculation. */ set calculationId(value: string); /** Used for setting the calculation with the model, without epr reload. */ set calculationFor(value: Calculation); /** Returns true if the report can be canceled. */ get isCancellable(): boolean; /** Returns true if the item is read-only */ get isReadOnly(): boolean; /** Save resource */ saveChanges(): Promise; /** Send to incomes register. */ sendToIncomesRegister(startAt: Date): Promise; /** Get latest incomes register report log entry */ private getLatestNonErrorReportLogEntry; /** Sends cancel request to incomes register */ cancelToIncomesRegister(): Promise; /** Opens sheculing dialog and sends scheduling after successful dialog close */ openSetScheduleDialog(): Promise; /** Remove Incomes register queue item */ removeIrQueueItem(): Promise; /** Opens a dialog for importing absences. */ importAbsences(): void; /** Checks if the IR report is modified. */ isIrModified(item: ApiListItem): boolean; /** Checks if the Epr is delayed. */ isDelayed(item: ApiListItem): boolean; private reloadFromServer; private getUnpaidAbsenceCauseCode; private getPaidAbsenceCauseCode; } /** * Shows a list of earnings payments. * @example * ```html * * ``` */ export declare class IrEarningsPaymentList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the AccountingReportCrudController */ controller: typeof IrEarningsPaymentCrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides CRUD access for authenticated user to access a his/her own Earnings Payments objects */ 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; } declare namespace irepr { /** Object that stores National Incomes Register Earnings Payment Reports. */ 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 */ 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 */ 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. */ 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. */ 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. */ interface WorkflowData { /** Workflow events for the item. */ events?: WorkflowEvent[] | null; } /** Employer Identifier */ 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. */ 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; } 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 */ 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 */ 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 */ 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. */ 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 */ 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 */ 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 */ 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 */ interface SubOrg { /** Suborganisation’s identifier type */ type?: PayerSubOrgType | null; /** Suborganisation identifier */ code?: string | null; } /** Other payer details */ 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. */ 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 */ 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 */ 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 */ 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 */ 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 */ interface StayPeriodsInFinland { /** Report contains no stay periods in Finland */ noStayPeriods?: boolean | null; /** Stay periods */ period?: StayPeriod[] | null; } /** Work period in Finland */ 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 */ 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. */ 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 */ 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 */ 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 */ 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 */ 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. */ 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 */ 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. */ 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. */ interface AccidentInsurance { /** Occupational accident insurance company identifier */ accInsProvId?: Id | null; /** Occupational accident insurance policy number */ accInsPolicyNo?: string | null; } /** International situations */ 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; } 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 */ 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 */ interface TransactionInclusion { /** Insurance information type */ insuranceCode?: InsuranceCode | null; /** Grounds for insurance contribution */ included?: boolean | null; } /** Earnings period */ 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 */ 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. */ 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 */ interface MealBenefit { /** Reimbursement for a meal benefit corresponds to taxable value */ taxValue?: boolean | null; } /** Seafarer's income */ 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 */ 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 */ interface KmAllowance { /** Number of kilometres */ kilometers?: number | null; } /** Six-month rule */ 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 */ 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. */ interface FinServiceRecipient { /** Employer identifiers */ finServiceRecipientIds?: Id[] | null; } /** Stay period */ 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 */ 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 */ interface ServiceRecipient { /** Principal identifiers */ serviceRecipientIds?: Id[] | null; /** Principal's name */ name?: string | null; /** Principal's address */ serviceRecipientAddress?: ServiceRecipientAddress | null; } /** Time of employment */ 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 */ interface UnpaidAbsence { /** Absence periods */ unpaidAbsencePeriods?: UnpaidAbsencePeriod[] | null; } /** Paid absence */ 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. */ 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 */ 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 */ 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 */ 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; } 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 */ 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 */ 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 */ 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 */ 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. */ 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. */ 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; } 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. */ 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. */ 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. */ 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; } 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 */ 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; } 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 */ interface ErrorInfo { /** Error code */ errorCode?: string | null; /** Error code description */ errorMessage?: string | null; /** Error details */ errorDetails?: string | null; } /** ActionCode enumeration */ enum ActionCode { NewReport = "newReport", ReplacementReport = "replacementReport" } /** AddressType enumeration */ enum AddressType { AddressInHomeCountry = "addressInHomeCountry", AddressInTheCountryOfWork = "addressInTheCountryOfWork" } /** AgeGroupCode enumeration */ enum AgeGroupCode { A = "a", B = "b", C = "c", U = "u" } /** AllowanceCode enumeration */ enum AllowanceCode { MealAllowance = "mealAllowance", PartialDailyAllowance = "partialDailyAllowance", FullDailyAllowance = "fullDailyAllowance", InternationalDailyAllowance = "internationalDailyAllowance", TaxExemptReimbursementsAbroad = "taxExemptReimbursementsAbroad" } /** ApiValidationErrorType enumeration */ enum ApiValidationErrorType { General = "general", Required = "required", Invalid = "invalid", Warning = "warning" } /** BenefitCode enumeration */ enum BenefitCode { AccommodationBenefit = "accommodationBenefit", TelephoneBenefit = "telephoneBenefit", MealBenefit = "mealBenefit", OtherBenefits = "otherBenefits" } /** CalcGroup enumeration */ enum CalcGroup { Undefined = "undefined", BaseSalary = "baseSalary", SalaryAdditions = "salaryAdditions", Benefits = "benefits", Expenses = "expenses", Deductions = "deductions", OtherNoPayment = "otherNoPayment", Totals = "totals", Disabled = "disabled" } /** CarBenefitCode enumeration */ enum CarBenefitCode { LimitedCarBenefit = "limitedCarBenefit", FullCarBenefit = "fullCarBenefit" } /** DeliveryDataType enumeration */ 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 */ enum EarningsPaymentReportStatus { New = "new", Scheduled = "scheduled", Succeeded = "succeeded", Canceled = "canceled", Error = "error", Invalid = "invalid" } /** EmploymentCode enumeration */ enum EmploymentCode { FullTime = "fullTime", PartTime = "partTime", NotAvailable = "notAvailable" } /** EmploymentEndingCode enumeration */ enum EmploymentEndingCode { EmployeesResignation = "employeesResignation", Other = "other", TerminationGroundsRelatedToEmployeesPerson = "terminationGroundsRelatedToEmployeesPerson", FinancialAndProductionRelatedGrounds = "financialAndProductionRelatedGrounds", JointAgreement = "jointAgreement", Retirement = "retirement", TerminationOfaFixedTermEmployment = "terminationOfaFixedTermEmployment" } /** EmploymentEndingType enumeration */ enum EmploymentEndingType { KevaCodes = "kevaCodes", BankOfFinlandCodes = "bankOfFinlandCodes", IncomesRegisterCodes = "incomesRegisterCodes" } /** EmploymentRegType enumeration */ enum EmploymentRegType { KevasGroundsForRegistration = "kevasGroundsForRegistration", BankOfFinlandsGroundsForRegistration = "bankOfFinlandsGroundsForRegistration" } /** ExceptionCode enumeration */ 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 */ enum FaultyControl { OnlyInvalidItems = "onlyInvalidItems", EntireRecordIsRejected = "entireRecordIsRejected" } /** Gender enumeration */ enum Gender { Male = "male", Female = "female" } /** IdType enumeration */ enum IdType { BusinessId = "businessId", PersonalIdentificationNumber = "personalIdentificationNumber", Vat = "vat", Giin = "giin", TaxIdentificationNumber = "taxIdentificationNumber", FinnishTradeRegistrationNumber = "finnishTradeRegistrationNumber", ForeignBusinessRegistrationNumber = "foreignBusinessRegistrationNumber", ForeignPersonalIdentificationNumber = "foreignPersonalIdentificationNumber", Other = "other" } /** IncomeEarnerType enumeration */ 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 */ enum IrScheduleAction { Send = "send", Cancel = "cancel" } /** InsuranceCode enumeration */ enum InsuranceCode { SubjectToSocialInsuranceContributions = "subjectToSocialInsuranceContributions", SubjectToEarningsRelatedPensionInsuranceContribution = "subjectToEarningsRelatedPensionInsuranceContribution", SubjectToHealthInsuranceContribution = "subjectToHealthInsuranceContribution", SubjectToUnemploymentInsuranceContribution = "subjectToUnemploymentInsuranceContribution", SubjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution = "subjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution" } /** Language enumeration */ enum Language { Fi = "fi", Sv = "sv", En = "en" } /** PaidAbsenceCauseCode enumeration */ 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 */ enum PayerSubOrgType { KevasSubmitterCodes = "kevasSubmitterCodes", PayersOwnCodes = "payersOwnCodes", GovernmentAgencyIdentifier = "governmentAgencyIdentifier" } /** PayerType enumeration */ enum PayerType { PublicSector = "publicSector", Household = "household", TemporaryEmployer = "temporaryEmployer", ForeignEmployer = "foreignEmployer", State = "state", UnincorporatedStateEnterpriseOrGovernmentalInstitution = "unincorporatedStateEnterpriseOrGovernmentalInstitution", SpecialisedAgency = "specialisedAgency", ForeignGroupCompany = "foreignGroupCompany", PoolOfHouseholdEmployers = "poolOfHouseholdEmployers" } /** PaymentType enumeration */ enum PaymentType { Monthly = "monthly", Hourly = "hourly", ContractPay = "contractPay" } /** PensionActCode enumeration */ enum PensionActCode { EmployeesEarningsRelatedPensionInsurance = "employeesEarningsRelatedPensionInsurance", PensionInsuranceForFarmers = "pensionInsuranceForFarmers", PensionInsuranceForTheSelfEmployed = "pensionInsuranceForTheSelfEmployed" } /** PensionProvIdCode enumeration */ 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 */ enum ProfessionType { StatisticsFinland = "statisticsFinland", Keva = "keva", BankOfFinland = "bankOfFinland", Trafi = "trafi" } /** RefPaymentType enumeration */ enum RefPaymentType { EarningsRelatedPensionProvider = "earningsRelatedPensionProvider" } /** ReimbPaymentType enumeration */ enum ReimbPaymentType { KelaDailyAllowanceApplication = "kelaDailyAllowanceApplication", KelaFamilyLeaveCompensation = "kelaFamilyLeaveCompensation" } /** RemunerationCode enumeration */ enum RemunerationCode { DailyAllowance = "dailyAllowance", AccommodationBenefit = "accommodationBenefit", CarBenefit = "carBenefit", OtherBenefit = "otherBenefit" } /** ReportLogEventType enumeration */ enum ReportLogEventType { Undefined = "undefined", Sent = "sent", Canceled = "canceled", Error = "error" } /** ResponsibilityCode enumeration */ enum ResponsibilityCode { ContentIssues = "contentIssues", TechnicalIssues = "technicalIssues" } /** TermCode enumeration */ enum TermCode { UntilFurtherNotice = "untilFurtherNotice", FixedTerm = "fixedTerm" } /** TransactionCode enumeration */ 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 */ 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 */ enum WageUnitCode { Hour = "hour", Day = "day", Week = "week", Period = "period" } enum EarningsPaymentReportExtensionsPaymentChannel { Undefined = "undefined", Test = "test", ZeroPayment = "zeroPayment", External = "external", PalkkausManual = "palkkausManual", PalkkausWS = "palkkausWS", PalkkausPSD = "palkkausPSD", 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" } enum AvatarEntityType { Undefined = "undefined", Person = "person", Company = "company", PersonCreatedByEmployer = "personCreatedByEmployer", Partner = "partner" } enum AvatarPictureType { Icon = "icon", Uploaded = "uploaded", Gravatar = "gravatar" } enum WorkflowEventUi { Default = "default", Primary = "primary", Success = "success", Info = "info", Warning = "warning", Danger = "danger" } enum Features { None = "none", IsActive = "isActive", IsEditable = "isEditable", IsRemovable = "isRemovable", IsOnHold = "isOnHold" } enum InternationalDataPostedCertCode { FromFinlandA1CertificateOrAgreement = "fromFinlandA1CertificateOrAgreement", ToFinlandA1CertificateOrAgreement = "toFinlandA1CertificateOrAgreement", NonEUEEACountryOrNonSocialSecurityAgreementCountry = "nonEUEEACountryOrNonSocialSecurityAgreementCountry" } enum WorkForm { NT1 = "nT1", NT2 = "nT2", EmployersReportOnPeriodsOfStayInFinland = "employersReportOnPeriodsOfStayInFinland", EmployeeLeasingNotice = "employeeLeasingNotice" } enum EarningsPaymentDataPaymentChannel { Undefined = "undefined", Test = "test", ZeroPayment = "zeroPayment", External = "external", PalkkausManual = "palkkausManual", PalkkausWS = "palkkausWS", PalkkausPSD = "palkkausPSD", 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" } enum StatusResponseDeliveryDataStatus { Unknown = "unknown", Received = "received", InProcess = "inProcess", Valid = "valid", RejectedAtReception = "rejectedAtReception", RejectedDuringProcessing = "rejectedDuringProcessing", Cancelled = "cancelled" } } /** IrFlags enumeration */ declare enum IrFlags { NoMoney = "noMoney", OneOff = "oneOff", UnjustEnrichment = "unjustEnrichment" } /** IrInsuranceExceptions enumeration */ 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 */ 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; } /** * Shows a user interface for Payer Summary Report ("Erillisilmoitus"). * Currently, the UI is read-only, but it may later be extended to be editable * for purposes of corrections. * @example * ```html * * ``` */ export declare class IrPayerSummary extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the IrPayerSummaryCrudController */ controller: typeof IrPayerSummaryCrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for user interface of Payer Summary Report ("Tulorekisteri-ilmoitus"). */ export declare class IrPayerSummaryCrudController extends ApiCrudObjectController { private fullApi; private session; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(fullApi: IrPayerSummaries, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, session: SessionService); /** * Initializes the controller */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Returns true if the report can be canceled. */ get isCancellable(): boolean; /** Returns true if the item is read-only */ get isReadOnly(): boolean; /** Send to incomes register */ sendToIncomesRegister(startAt: Date): Promise; /** Get latest incomes register report log entry */ private getLatestNonErrorReportLogEntry; /** Sends cancel request to incomes register */ cancelToIncomesRegister(): Promise; /** Opens sheculing dialog and sends scheduling after successful dialog close */ openSetScheduleDialog(): Promise; /** Remove Incomes register queue item */ removeIrQueueItem(): Promise; /** Checks if the IR report is modified. */ isIrModified(item: ApiListItem): boolean; /** Checks if the Psr is delayed. */ isDelayed(item: ApiListItem): boolean; private reloadFromServer; } /** * Shows a list of payer summaries. * @example * ```html * * ``` */ export declare class IrPayerSummaryList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the AccountingReportCrudController */ controller: typeof IrPayerSummaryCrudController; /** The default template for the component. */ defaultTemplate: string; } declare namespace irpsr { /** Object that stores National Incomes Register Payer Summary Reports. */ 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 */ 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 */ 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. */ 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. */ 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. */ interface WorkflowData { /** Workflow events for the item. */ events?: WorkflowEvent[] | null; } /** Employer Identifier */ 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; } 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 */ 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 */ interface Report { /** Service data */ reportData?: ReportData | null; /** Reporting period */ paymentMonth?: PaymentMonth | null; /** Income types */ transactions?: Transaction[] | null; } /** Validation errors used in API output. */ 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 */ 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 */ 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 */ 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 */ interface SubOrg { /** Suborganisation’s identifier type */ type?: PayerSubOrgType | null; /** Suborganisation identifier */ code?: string | null; } /** Other payer details */ interface PayerOther { /** Payer types */ payerTypes?: PayerType[] | null; } /** Earnings-related pension insurances */ 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. */ interface AccidentInsurance { /** Occupational accident insurance company identifier */ accInsProvId?: Id | null; /** Occupational accident insurance policy number */ accInsPolicyNo?: string | null; } /** Service data */ 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 */ interface PaymentMonth { /** Payment month */ month?: number | null; /** Payment year */ year?: number | null; } /** Income type data */ interface Transaction { /** General details on the income type */ transactionBasic?: TransactionBasic | null; } /** General details on the income type */ 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 */ 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. */ 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. */ 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 */ 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; } 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. */ 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. */ 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. */ 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; } 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 */ 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; } 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 */ interface ErrorInfo { /** Error code */ errorCode?: string | null; /** Error code description */ errorMessage?: string | null; /** Error details */ errorDetails?: string | null; } /** ActionCode enumeration */ enum ActionCode { NewReport = "newReport", ReplacementReport = "replacementReport" } /** AddressType enumeration */ enum AddressType { AddressInHomeCountry = "addressInHomeCountry", AddressInTheCountryOfWork = "addressInTheCountryOfWork" } /** AgeGroupCode enumeration */ enum AgeGroupCode { A = "a", B = "b", C = "c", U = "u" } /** AllowanceCode enumeration */ enum AllowanceCode { MealAllowance = "mealAllowance", PartialDailyAllowance = "partialDailyAllowance", FullDailyAllowance = "fullDailyAllowance", InternationalDailyAllowance = "internationalDailyAllowance", TaxExemptReimbursementsAbroad = "taxExemptReimbursementsAbroad" } /** ApiValidationErrorType enumeration */ enum ApiValidationErrorType { General = "general", Required = "required", Invalid = "invalid", Warning = "warning" } /** BenefitCode enumeration */ enum BenefitCode { AccommodationBenefit = "accommodationBenefit", TelephoneBenefit = "telephoneBenefit", MealBenefit = "mealBenefit", OtherBenefits = "otherBenefits" } /** CarBenefitCode enumeration */ enum CarBenefitCode { LimitedCarBenefit = "limitedCarBenefit", FullCarBenefit = "fullCarBenefit" } /** DeliveryDataType enumeration */ 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 */ enum EmploymentCode { FullTime = "fullTime", PartTime = "partTime", NotAvailable = "notAvailable" } /** EmploymentEndingCode enumeration */ enum EmploymentEndingCode { EmployeesResignation = "employeesResignation", Other = "other", TerminationGroundsRelatedToEmployeesPerson = "terminationGroundsRelatedToEmployeesPerson", FinancialAndProductionRelatedGrounds = "financialAndProductionRelatedGrounds", JointAgreement = "jointAgreement", Retirement = "retirement", TerminationOfaFixedTermEmployment = "terminationOfaFixedTermEmployment" } /** EmploymentEndingType enumeration */ enum EmploymentEndingType { KevaCodes = "kevaCodes", BankOfFinlandCodes = "bankOfFinlandCodes", IncomesRegisterCodes = "incomesRegisterCodes" } /** ExceptionCode enumeration */ 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 */ enum FaultyControl { OnlyInvalidItems = "onlyInvalidItems", EntireRecordIsRejected = "entireRecordIsRejected" } /** Gender enumeration */ enum Gender { Male = "male", Female = "female" } /** IdType enumeration */ enum IdType { BusinessId = "businessId", PersonalIdentificationNumber = "personalIdentificationNumber", Vat = "vat", Giin = "giin", TaxIdentificationNumber = "taxIdentificationNumber", FinnishTradeRegistrationNumber = "finnishTradeRegistrationNumber", ForeignBusinessRegistrationNumber = "foreignBusinessRegistrationNumber", ForeignPersonalIdentificationNumber = "foreignPersonalIdentificationNumber", Other = "other" } /** InsuranceCode enumeration */ enum InsuranceCode { SubjectToSocialInsuranceContributions = "subjectToSocialInsuranceContributions", SubjectToEarningsRelatedPensionInsuranceContribution = "subjectToEarningsRelatedPensionInsuranceContribution", SubjectToHealthInsuranceContribution = "subjectToHealthInsuranceContribution", SubjectToUnemploymentInsuranceContribution = "subjectToUnemploymentInsuranceContribution", SubjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution = "subjectToAccidentInsuranceAndOccupationalDiseaseInsuranceContribution" } /** IrScheduleAction enumeration */ enum IrScheduleAction { Send = "send", Cancel = "cancel" } /** Language enumeration */ enum Language { Fi = "fi", Sv = "sv", En = "en" } /** PaidAbsenceCauseCode enumeration */ 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 */ enum PayerType { PublicSector = "publicSector", Household = "household", TemporaryEmployer = "temporaryEmployer", ForeignEmployer = "foreignEmployer", State = "state", UnincorporatedStateEnterpriseOrGovernmentalInstitution = "unincorporatedStateEnterpriseOrGovernmentalInstitution", SpecialisedAgency = "specialisedAgency", ForeignGroupCompany = "foreignGroupCompany", PoolOfHouseholdEmployers = "poolOfHouseholdEmployers" } /** PayerSubOrgType enumeration */ enum PayerSubOrgType { KevasSubmitterCodes = "kevasSubmitterCodes", PayersOwnCodes = "payersOwnCodes", GovernmentAgencyIdentifier = "governmentAgencyIdentifier" } /** PayerSummaryReportStatus enumeration */ enum PayerSummaryReportStatus { New = "new", Scheduled = "scheduled", Succeeded = "succeeded", Canceled = "canceled", Error = "error", Invalid = "invalid" } /** PaymentType enumeration */ enum PaymentType { Monthly = "monthly", Hourly = "hourly", ContractPay = "contractPay" } /** PensionActCode enumeration */ enum PensionActCode { EmployeesEarningsRelatedPensionInsurance = "employeesEarningsRelatedPensionInsurance", PensionInsuranceForFarmers = "pensionInsuranceForFarmers", PensionInsuranceForTheSelfEmployed = "pensionInsuranceForTheSelfEmployed" } /** PensionProvIdCode enumeration */ 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 */ enum ProfessionType { StatisticsFinland = "statisticsFinland", Keva = "keva", BankOfFinland = "bankOfFinland", Trafi = "trafi" } /** RefPaymentType enumeration */ enum RefPaymentType { EarningsRelatedPensionProvider = "earningsRelatedPensionProvider" } /** ReimbPaymentType enumeration */ enum ReimbPaymentType { KelaDailyAllowanceApplication = "kelaDailyAllowanceApplication", KelaFamilyLeaveCompensation = "kelaFamilyLeaveCompensation" } /** RemunerationCode enumeration */ enum RemunerationCode { DailyAllowance = "dailyAllowance", AccommodationBenefit = "accommodationBenefit", CarBenefit = "carBenefit", OtherBenefit = "otherBenefit" } /** ReportLogEventType enumeration */ enum ReportLogEventType { Undefined = "undefined", Sent = "sent", Canceled = "canceled", Error = "error" } /** ResponsibilityCode enumeration */ enum ResponsibilityCode { ContentIssues = "contentIssues", TechnicalIssues = "technicalIssues" } /** SummaryTransactionCode enumeration */ enum SummaryTransactionCode { Undefined = "undefined", NoWagesPayable = "noWagesPayable", EmployersHealthInsuranceContribution = "employersHealthInsuranceContribution", DeductionsToBeMadeFromTheEmployersHealthInsuranceContribution = "deductionsToBeMadeFromTheEmployersHealthInsuranceContribution" } /** TermCode enumeration */ enum TermCode { UntilFurtherNotice = "untilFurtherNotice", FixedTerm = "fixedTerm" } /** TransactionCode enumeration */ 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 */ 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 */ enum WageUnitCode { Hour = "hour", Day = "day", Week = "week", Period = "period" } enum WorkflowEventUi { Default = "default", Primary = "primary", Success = "success", Info = "info", Warning = "warning", Danger = "danger" } enum Features { None = "none", IsActive = "isActive", IsEditable = "isEditable", IsRemovable = "isRemovable", IsOnHold = "isOnHold" } enum AvatarEntityType { Undefined = "undefined", Person = "person", Company = "company", PersonCreatedByEmployer = "personCreatedByEmployer", Partner = "partner" } enum AvatarPictureType { Icon = "icon", Uploaded = "uploaded", Gravatar = "gravatar" } enum StatusResponseDeliveryDataStatus { Unknown = "unknown", Received = "received", InProcess = "inProcess", Valid = "valid", RejectedAtReception = "rejectedAtReception", RejectedDuringProcessing = "rejectedDuringProcessing", Cancelled = "cancelled" } } declare interface IrReportRow { code: number; key: string; total: number; label: string; isCount: boolean; } /** Business level modeling corresponding to WageReportsToIRTypes Transaction. Also contains additional data for accounting and integration purposes. */ 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_2 | 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_2 | 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). */ 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 */ declare enum IrRowSourceType { Manual = "manual", Usecase = "usecase", UsecaseV02 = "usecaseV02" } /** * Interfacce for the legacy service model: Stores the edited items in browser session context. * Most new implementations should use the new API CRUD model instead. * However, this service model may still be the right choice in certain circumstances where the editable data should be * cached or is already in session (like account data). */ export declare interface IService { /** List of items in the repository */ list: T[]; /** Currently selected item in the repository */ current: T; /** * Creates a copy of a given item. * This method does not yet set the item as current. * @param copySource Item to copy as new. */ copyAsNew(copySource: T): T; /** * Gets a new blank object with default values, suitable for UI binding. * This is a synchronous method - does not go to the server and it is not 100% reliable in that way. * However, it shoud provide a basic object, good enough for most views. */ getBlank?(): T; /** Reloads the list from the server - called e.g. after delete and add new */ reloadList(): Promise; /** * Sets the current repository item. * If not loaded, starts loading from the server to the current. * @param id - Identifier of the calculation */ setCurrentId(id: string): void; /** * Sets the current calculation * @param item - Item to set as current */ setCurrent(item: T): void; /** * Creates a new item and sets it as current for editing and saving. * The item is not yet sent to server and thus it is not in the list, nor does it have an identifier. */ newCurrent?(): void; /** Saves changes to the current item. */ saveCurrent(): Promise; /** * Adds or updates a given item. * Operation is determined based on id: null/''/'new' adds, other string values update. */ save(item: T): Promise; /** Deletes the given item from repository if possible */ delete?(id: any): Promise; /** * Subscribe to changes with given callback. */ onChange(scope: any, callback: any): void; } /** Provides information about a new issued certificate. */ 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. */ 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. */ 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_2 | 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; } /** * JSON Diff component that compares two JSON objects and displays differences in a table format. * Uses json-diff-ts package for comparison. * */ export declare class JsonDiff extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** JSON object to compare */ json: string; /** JSON object to compare to */ compareTo: string; /** exclude paths from the diff */ excludePaths: string; /** URL for the Open API document that contains the definition for the type. */ openApi: string; /** The type of the item to diff */ itemType: string; }; /** Uses the JsonDiffController */ controller: typeof JsonDiffController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for JSON Diff component that compares two JSON objects and displays differences. * Uses json-diff-ts package for comparison. */ export declare class JsonDiffController implements angular_2.IController { private $timeout; private jsonSchemaService; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** First JSON object to compare */ json: any; /** Second JSON object to compare */ compareTo: any; /** Exclude paths from the diff */ excludePaths: string[]; /** * URL for the Open API document that contains the definition for the type. * The url can be an absolute url, relative url or an url with salaxy-secure/ -prefix. * The salaxy-secure/ -prefix will be replaced in runtime with the salaxy api server url of the curren environment. */ openApi: string; /** The type of the item to diff */ itemType: string; /** If true, the schema loading is ready. */ isLoading: boolean; /** Ref to used SxyTable */ $sxyTable: SxyTableController; /** References a schema document directly: the schema document is not fetched from the UI */ openApiDoc: any; /** The schema model */ schemaModel: OpenAPIV3.SchemaObject; private options; private include; private diffTableConfig; /** * Creates a new instance of the controller. */ constructor($timeout: angular_2.ITimeoutService, jsonSchemaService: JsonSchemaService, uiHelpers: UiHelpers); /** * Angular lifecycle hook called on controller initialization. * Loads the OpenAPI schema document and finds the schema model for the specified itemType. * Sets the loading state while fetching the schema. * If itemType is not provided, does nothing. * @returns {Promise} */ $onInit(): Promise; /** * Returns the configuration object for the diff table, including options, columns, and data. * - If either `json` or `compareTo` is not set, resets the diffTableConfig to null values. * - If the input objects have changed (deep comparison), recomputes the diff and updates the config. * - Triggers a table refresh after updating the config. * @returns { options: SxyTableOptions, include: ColumnDefinition[], data: any[] } * The configuration object for the SxyTable, or null if inputs are missing. */ get tableConfig(): { options: SxyTableOptions; include: ColumnDefinition[]; data: any[]; }; private computeDiff; private processDiffItem; private getDisplayPath; private getSchemaProperty; private createJsonFormatter; private handleJsonCellClick; private isValidJsonObject; } /** * Shows a JavaScript object JSON as formatted HTML. * Open attribute accepts a number that indicated how many levels JSON should be open. * Based on http://azimi.me/json-formatter/demo/demo.html * @example * ```html * * * ``` */ export declare class JsonFormatter extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The JavaScript object that should be displayed. */ json: string; /** If true json is compared to compare-to value. */ compare: string; /** The original JavaScript to which to show DIFF (show changes in data). */ compareTo: string; /** When displaying children, sets the property / key name for json */ key: string; /** Number that indicated how many levels JSON should be open */ open: string; /** * Set to "dialog" if you want to show a button that opens the JSON in dialog. * Otherwise, an inline tree view is shown. */ type: string; /** Optional button class for the dialog button. Default is "btn btn-default btn-xs" */ btnClass: string; }; /** Uses the JsonFormatterController */ controller: typeof JsonFormatterController; /** The default template for the component. */ defaultTemplate: string; /** Rendered HTML replaces the original element */ replace: true; } /** * Provides user interface for the JSON Formatter UI that shows JSON as collapsible * tree view for debugging purposes. */ export declare class JsonFormatterController implements angular_2.IController { private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Data that is shown in the component. * This property is being watched for changes in each $digest cycle so it needs to be cached */ json: any; /** If true json is compared to compare-to value. */ compare: boolean; /** The original JavaScript to which to show DIFF (show changes in data). */ compareTo: any; /** Key of the property that is shown in the component */ key: string; /** User interface type. Default is inline tree view. Dialog shows a button for a dialog. */ type: "default" | "dialog"; /** * Number of children that are currently open. * Null sets the default value 1. Set zero for 0. */ open: number | null; /** If true, the node is currently open */ isOpen: boolean; /** If true, the current value (string) is interpreted as date */ isDate: boolean; /** If true, the current value (string) is interpreted as URL */ isUrl: boolean; /** Gets the changes object. Null if no changes or change detection is not enabled. */ changes: any; /** JavaScript type for the object */ jsonType: string; /** Keys that existed in compareTo, but are no longer present in json. */ deletedKeys: string[]; /** Component configuration */ config: { hoverPreviewEnabled: boolean; hoverPreviewArrayCount: number; hoverPreviewFieldCount: number; }; /** * Creates a new instance of the directive. */ constructor(uiHelpers: UiHelpers); /** * Initialize default values. */ $onInit(): void; /** Escapes quotation marks in text */ escapeString(str: any): any; /** From http://stackoverflow.com/a/332429 */ getObjectName(object: any): any; /** Gets the object type as string */ getType(object: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null"; /** Gets the value preview text. */ getValuePreview(value: any): any; /** Gets a preview of the object. */ getPreview(object: any): string; /** Returns true, if json is an array */ isArray(): any; /** Returns true, if json is an object (including an array). */ isObject(): any; /** Gets the keys for the object. Only returns keys whgere showKey is true. */ getKeys(): string[]; /** Hides keys like $$hashKey */ showKey(key: string): boolean; /** If true, the current JSON has a key */ get hasKey(): boolean; /** Gets the constructor name */ getConstructorName(): any; /** Returns true if the the object is an empty object. */ isEmptyObject(): boolean; /** Opens / closes the node */ toggleOpen(): void; /** Returns the number of open levels for immediate children (this open - 1, but not less than 0). */ childrenOpen(): number; /** Opens the link in a new window. */ openLink(isUrl: any): void; /** Parses value (gets a preview) */ parseValue(value: any): any; /** Shows the current JSON as dialog. */ showDialog(): void; /** Returns true if the thumbnail should be shown */ showThumbnail(): any; /** Gets the thumbnail value. */ getThumbnail(): string; /** Gets the keys that are not in the current, but are in the original. */ private getDeletedKeys; /** Gets the changes compared to the original element */ private getChanges; } /** Possible input types bases on JSON Schema generation. */ declare type JsonInputType = OpenAPIV3.NonArraySchemaObjectType | OpenAPIV3.ArraySchemaObjectType | "error"; /** * Implemenatation of cache of resolved schemas and methods on reading their structure. */ 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 | undefined; /** * 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! */ 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. */ 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; } /** * Service for caching JSON schemas and creating user interfaces based on them. */ export declare class JsonSchemaService { private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private cache; constructor(ajax: AjaxNg1); /** Gets the currently loaded schema documents. */ getSchemas(): JsonSchemaCacheItem[]; /** Gets the raw schema cache, mainly for injecting to other classes that may need it. */ getCache(): JsonSchemaCache; /** * 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; /** * Adds a schema document to cache * TODO: Reconsider the signature. */ addSchemaDocument(openApiUrl: string, doc: OpenAPIV3.Document): OpenAPIV3.Document; /** * 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 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 name Name of the schema (data model) */ findSchema(openApiUrl: string, name: string): OpenAPIV3.SchemaObject | null; /** * Gets a property from a schema document. Supports single property names or longer property paths. * @param openApiUrl URL to the open API document. * @param schemaName The root type from which the property is found. * @param path Property path starting with the root schema. */ getProperty(openApiUrl: string, schemaName: string, path: string): JsonSchemaProperty; /** * Registers a new custom input for type/format combination * @param type JSON type * @param format Format in the JSON schema * @param template Template for the type/foramt combination. * Special key "sxy" can be used to set default templates based on type/format, * e.g. ("boolean", "default", "sxy") => "salaxy-components/sxy-form/boolean/default.html". */ registerInput(type: JsonInputType, format: "default" | string, template: "sxy" | string): void; /** Gets the AngularJS tempalte for the input. */ getTemplate(input: InputMetadata): string; /** Gets the registered inputs */ getRegisteredInputs(): { [key: string]: { [key: string]: any; }; }; /** * Maps the types and formats to templates. */ private _registeredInputs; } /** Language enumeration */ declare enum Language { Default = "default", Fi = "fi", Sv = "sv", En = "en" } /** * Shows a language selection control. * @example * ```html * * ``` */ export declare class LanguageSelector extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } 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 */ 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. */ 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. */ 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; } /** LegalEntityType enumeration */ declare enum LegalEntityType { Undefined = "undefined", Person = "person", Company = "company", PersonCreatedByEmployer = "personCreatedByEmployer", Partner = "partner" } /** * Base class for list controllers that edit a list of items within a parent object (parent property). * Abstract class implementation defines the location of list with items of type TListItem. * Typically, the list items do not have ID's, they and all operations are synchronous. * Save operation is currently done to the parent, it may be later connected also to this controller. */ export declare abstract class ListControllerBase implements angular_2.IController { protected uiHelpers: UiHelpers; /** * Original parent value for reset. This value is set when the controller is created. */ original: TParent; /** * Event that is fired by the list controller if the user interface indicates that * the changes made by the list controller should be committed. * Typically this would result to saving of the object. * @example */ onCommit: (eventData: { /** The parent object that contains the list (typically the one that is saved). */ parent: TParent; /** The list that was modified by the control */ list: TListItem[]; }) => void; /** * Event that is fired by the list controller if the user interface indicates that * the changes made by the list controller should be reset (canceled). * Typically this would result to just closing the control, but some changes to the parent object may be necessary. * @example */ onReset: (eventData: { /** The parent object that contains the list (typically the one that is reset). */ parent: TParent; }) => void; /** * Event that is fired by the list controller if the user switches from read-only mode to edit. * Not all components support read-only vs. edit modes. * Typically there is no action needed, but e.g. external menu items may be modified. * @example */ onStartEdit: (eventData: { /** The parent object that contains the list (typically the one that is reset). */ parent: TParent; }) => void; /** * The edit mode of the component: * * - edit: Editable, if the calculation is editable. * - read-edit: first read-only, but there is an edit button if the calculation is editable. * - read-only: Always read-only. * * Note that not all components support the mode attribute. Also, the default depends on the component logic. */ mode: "edit" | "read-edit" | "read-only"; /** Parent object to which the component is bound. */ private _parent; protected _isInEdit: boolean; /** * Creates a new ListControllerBase. * @param uiHelpers - Salaxy ui helpers service for dialogs etc. */ constructor(uiHelpers: UiHelpers); /** * Implement IController by providing onInit method. * We currently do nothing here, but if you override this function, * you should call this method in base class for future compatibility. */ $onInit(): void; /** * Gets or sets the parent object that contains the list that is being edited. * Typically this parent object is an ApiCrudObject. */ get parent(): TParent; set parent(value: TParent); /** * When overriding the abstract class, you should provide the list within the parent that is edited / viewed. * If the parent object is not provided or list is not otherwise available, you should provide null. */ abstract get list(): TListItem[]; /** The template URL for the edit dialog. Set to null if you do not want an edit dialog */ abstract getEditDialogTemplateUrl(): string; /** * Possiblity to define additional logic that is passed to the edit dialog as $ctrl.logic. * This may contain additional metadata as well as functions. */ getEditDialogLogic(): any; /** When overriding the abstract class, provide her the factory method that creates a new list item. */ abstract getBlank(): TListItem; /** View should call this method if there is a UI component that fires commit (typically save) to the parent. */ commit(): void; /** View should call this method if there is a UI component that fires reset / cancel to the parent. */ reset(): void; /** * Returns true if the parent can be edited by this component. * Takes into account parent being null, isReadOnly and the "read-only" mode of the component. */ get isEditable(): boolean; /** * Gets or sets the flag telling whether the component is in edit or read-only mode. * This is restricted by the mode and isReadOnly of the parent calculation. */ get isInEdit(): boolean; set isInEdit(value: boolean); /** * View should call this method if the component is changed from read-only mode to edit mode. * Not all components support read-only vs. edit modes. */ startEdit(): void; /** * Deletes an item from list (no confirm etc.) * The method shows the "Please wait..." loader, but does not call onDelete * or move the browser to listUrl. The caller should take care * of the UX actions after delete if necessary. * @param item Item to delete. * @returns Promise that resolves to true (never false). Fails if the deletion fails. */ delete(item: TListItem): TListItem[]; /** * Shows the edit dialog. * @param item Item to edit or string "new" for creating a new one. * @param isNew Optional way of specifying that the item is a new item (with default values, not yet added to the list). * If item is string "new", this parameter will have no effect (will always be true). */ showEditDialog(item: TListItem | "new", isNew?: boolean): void; } /** * Bindings for the component which uses ListControllerBase. */ export declare class ListControllerBaseBindings { /** * Parent object that contains the list that is being edited. * Typically this parent object is an ApiCrudObject. */ parent: string; /** * Event that is fired by the list controller if the user interface indicates that * the changes made by the list controller should be committed. * Typically this would result to saving of the object. * @example */ onCommit: string; /** * Event that is fired by the list controller if the user interface indicates that * the changes made by the list controller should be reset (canceled). * Typically this would result to just closing the control, but some changes to the parent object may be necessary. * @example */ onReset: string; /** * Event that is fired by the list controller if the user switches from read-only mode to edit (within the component). * Typically there is no action needed, but e.g. external menu items may be modified. * Not all components support read-only vs. edit modes. * @example */ onStartEdit: string; /** * Sets the component edit mode (true/false). * This is typically subject to isReadOnly (i.e. if isReadOnly is true on parent, true value is ignored). * Edit mode depends on the component UI logic and not all components support editable or non-editable modes. */ isInEdit: string; /** * The edit mode of the component: * * - edit: Editable, if the calculation is editable. * - read-edit: first read-only, but there is an edit button if the calculation is editable. * - read-only: Always read-only. * * Note that not all components support the mode attribute. * Also, the default depends on the component logic and component may offer additional modes (e.g. calendar). */ mode: string; } /** * Loading indicator directive. * Toggles class "salaxy-loading" on an element. Toggling is based on "salaxy-loader-show" and "salaxy-loader-hide" events from the * LoaderInterceptor which intercepts http calls. * @example * ```html *
*
*
*
*
* ``` */ export declare class LoaderDirective implements angular_2.IDirective { /** * Factory for the directive creation. * @ignore */ static salaxyLoader(): { (): LoaderDirective; $inject: any[]; }; /** * Directive restrictions. * @ignore */ restrict: string; /** * Creates a new instance of the directive. */ constructor(); /** * Link function for the directive. * @ignore */ link(scope: any, element: any, attrs: any): void; } /** * Interceptor for monitoring $http-service calls. */ export declare class LoaderInterceptor { private $q; private $rootScope; /** * Factory method for creating the interceptor. */ static factory(): { ($q: angular.IQService, $rootScope: angular.IRootScopeService): LoaderInterceptor; $inject: string[]; }; /** * Singleton */ private static instance; private loadingCount; /** * Constructor creating a new interceptor. * @param $q - $q service. * @param $rootScope - Angular root scope. */ private constructor(); /** * Intercepting method for request. * @param config - $http request. */ request: (config: angular.IRequestConfig) => any; /** * Intercepting method for response. * @param response - $http response. */ response: (response: angular.IHttpPromiseCallbackArg) => any; /** * Intercepting method for response error. * @param rejection - $http error. */ responseError: (rejection: any) => any; } /** Local Tapiola insurance order API object. */ 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 */ 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. */ declare interface LocalTapiolaInsuranceOrderCompanyContactPerson { /** The authorization type of for the contact person. */ authorizationType?: LocalTapiolaInsuranceOrderAuthorizationType | null; /** Avatar for the account */ avatar?: Avatar_2 | 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. */ 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. */ declare interface LocalTapiolaInsuranceOrderOccupation { /** Occupation code. */ occupationCode?: string | null; /** Occupation name. */ occupationName?: string | null; /** Estimated annual salary income. */ estimatedIncome?: number | null; } /** LocalTapiolaInsuranceOrderStatus enumeration */ declare enum LocalTapiolaInsuranceOrderStatus { Draft = "draft", WaitingApproval = "waitingApproval", Checked = "checked", Sent = "sent", Handled = "handled", Canceled = "canceled" } /** LocalTapiolaInsuranceOrderType enumeration */ declare enum LocalTapiolaInsuranceOrderType { NewWorkerInsurance = "newWorkerInsurance", MoveWorkerInsurance = "moveWorkerInsurance", NewEntrepreneurInsurance = "newEntrepreneurInsurance", MoveEntrepreneurInsurance = "moveEntrepreneurInsurance", Other = "other" } /** Information required with a Local Tapiola worker accident insurance order. */ 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; } /** * Renders a Login / Logout -button. * When anonymous, the button shows the login button. * When loggen in shows: Logout and links to Palkkaus Account and User Account pages. * @example * ```html * * ``` */ export declare class LoginButton extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** URL to which the user should be redirected. When you specify string, use quotes. */ redirectUrl: string; /** If specified, sets the login text. Default is "SALAXY.UI_Terms.login" */ loginText: string; /** If specified, sets the button class. Default is "btn-default". */ btnClass: string; }; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } /** * Markdown editor component * @example * ```html * * ``` */ export declare class MarkdownEditor extends ComponentBase { /** ng-model containing markdown */ require: { model: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the MarkdownEditorController */ controller: typeof MarkdownEditorController; /** The default template for the component. */ defaultTemplate: string; } /** Markdown Editor */ export declare class MarkdownEditorController extends InputController { private $element; private $scope; private $attrs; private $timeout; private _value; private editor; static $inject: string[]; /** * Creates a new MarkdownEditorController * @ignore */ constructor($element: JQLite, $scope: angular.IScope, $attrs: angular.IAttributes, $timeout: angular.ITimeoutService); /** Init */ $onInit: () => void; /** Value initialization */ onInitValue(): void; /** New value */ changeValue(newValue: string): void; } /** * Markdown viewer component * @example * ```html * * ``` */ export declare class MarkdownViewer extends ComponentBase { /** ng-model containing markdown */ require: { model: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; }; /** Uses the MarkdownViewerController */ controller: typeof MarkdownViewerController; /** The default template for the component. */ defaultTemplate: string; } /** Markdown Editor */ export declare class MarkdownViewerController extends InputController { private $element; private $scope; private $attrs; private $timeout; private editor; static $inject: string[]; /** * Creates a new MarkdownEditorController * @ignore */ constructor($element: JQLite, $scope: angular.IScope, $attrs: angular.IAttributes, $timeout: angular.ITimeoutService); /** Init */ $onInit: () => void; /** Value initialization */ onInitValue(): void; /** New value */ changeValue(newValue: string): void; } /** A message within a messaging thread. */ 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. */ 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 */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** * Edit and create new user interface for message thread. * @example * ```html * * ``` */ export declare class MessageThread extends ComponentBase { /** * Allows injecting HTML within the component. */ transclude: { /** A "header" element can be used to add HTML on top of the message thread (where the header is now). */ header: string; /** A "header-new" element overrides the default text for new message thread. */ headerNew: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** Role of the current user: typically "owner" (default) or "otherParty" */ role: string; /** Salaxy ID (IBAN format) for the other party (besides the message thread owner) */ otherParty: string; /** * If set, shows a drop-down for these options using the enum component. * Typically, use object with string key-value pairs. */ otherPartyOptions: string; /** * If set, the controller will mark a message thread as open once it has been loaded. * If the value is true, the message is marked as read immediately. * If the value is number, the controller waits the given amount of seconds before marking the item as read. */ markAsRead: string; /** * URL for the approval view. */ approvalUrl: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the EmailMessageController */ controller: typeof MessageThreadCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Messages thread groups togehter a set of related messages and/or attachments. */ declare interface MessageThread_2 { /** 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_2 | 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_2 | 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; } /** * User interface logic for a set of messages and/or attachments * that are grouped together as messages thread. */ export declare class MessageThreadCrudController extends ApiCrudObjectController { private messageApi; protected uploadService: UploadService; private $anchorScroll; private $timeout; private sessionService; private calculations; private payrolls; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** New message that is edited / to be added to the thread. */ newMessage: Message; /** If true, the message is currently in edit mode. */ isInEdit: boolean; /** Role of the current user. Owner is default. */ role: MessageFrom; /** Once message thread loaded, create a calculation based on the rows. */ createCalc: boolean; /** Calculation that is created / updated based on the message thread rows. */ calc: Calculation; /** Approval page url. */ approvalUrl: string; /** * If set, the controller will mark a message thread as open once it has been loaded. * If the value is true, the message is marked as read immediately. * If the value is number, the controller waits the given amount of seconds before marking the item as read. */ private _markAsRead; private _otherParty; private _otherPartyOptions; private markAsReadTimeout; constructor(messageApi: MessageThreads, uiHelpers: UiHelpers, uploadService: UploadService, $location: angular_2.ILocationService, $routeParams: any, $anchorScroll: angular_2.IAnchorScrollService, $timeout: angular_2.ITimeoutService, sessionService: SessionService, calculations: Calculations, payrolls: Payrolls); /** * Initialization code. */ $onInit(): void; /** * Cleaning the timeout. */ $onDestroy: () => void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; approvalUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * If true, this is a new unsaved object. * Adds "new-for-calc" and "new-for-payroll" actions as new item. */ isNew(): boolean; /** * Overrides the isReadOnly with workflow cases */ get isReadOnly(): boolean; /** * If set, the controller will mark a message thread as open once it has been loaded. * If the value is true, the message is marked as read immediately. * If the value is number, the controller waits the given amount of seconds before marking the item as read. */ get markAsRead(): number | true; set markAsRead(value: number | true); /** * Salaxy ID (IBAN format) for the other party (besides the message thread owner). * Supports special values: "partner" for payment partner. */ get otherParty(): string; set otherParty(value: string); /** * If set, shows a drop-down for these options using the enum component. * Keys may have special values: "partner": payment partner. */ get otherPartyOptions(): { [key: string]: string; }; set otherPartyOptions(value: { [key: string]: string; }); /** * Returns true if the other-party is 'partner' or partner's ID. */ get isOtherPartyPartner(): boolean; /** * Adds a text message (from the textarea / this.newMessage) to the current thread. */ sendMessage(): Promise; /** Sets the type of the message to be added / edited */ setType(type: ThreadedMessageType): void; /** * Sends an email notification to the thread owner. */ sendNotification(): Promise; /** Overrides the save to assure that the other party is defined (can be set in component properties). */ save(): Promise | undefined; /** Selects a calculation as current calculation. */ selectCalc(): void; /** Updates the calculation based on rows in the message. */ updateCalc(): void; /** Recalculates the calculation based on the rows in the message. */ recalculate(): Promise; /** Saves the current calculation. */ saveCalc(): Promise; /** * Starts the reload process depending on the bindingMode. * Overrides a different load process for "new-for-calc" and "new-for-payroll". * Overrides the reload to send the browser to the bottom */ reload(): Promise; /** * Marks all messages as read by a given party. * The command is immediately sent to the server and the current message is updated incrementally (just the read/unread info). * @param readBy The party for which the messages are marked as read. * If not specified, uses the current role or the controller. * @returns The entire thread with the messages marked as read. */ markAllAsRead(readBy?: MessageFrom): Promise; /** * Marks a message / attachment as read/unread also changing all messages before that message. * The role of the read/unread is determined by the message: It is the opposite of fromParty (owner (default)/otherParty). * The changes are made only to the current message, not Saved to the server. * @param message The message that is marked as read/unread (with the messages before that). * @param readByValue Possibility to force whether the flag is set to read or unread. * If null, the flag is set to the opposite of the current. */ markItemAsRead(message: Message, readByValue?: boolean): void; /** * Gets the time when a message was read. * The time is dependent of the fromParty of the message: There are separate times for owner and other party. * If time is null, the message has not been read. * @param message Message for which the readTime is fetched. * If not set, uses the last message for the current party. * @returns If fromParty is "otherParty", then readByOwner is returned, otherwise readByOtherParty is returned. * The value should be ISO date (string) or null if the item has not been read yet. */ getReadTime(message?: Message): string | null; /** temp upload progress */ uploadProgress: number; /** * Uploads the files to the server * @param files The files collection from the upload component * @example * */ uploadFiles(files: any[]): void; /** * Gets the file display related information. * @param message Message that contains the file. */ getFileInfo(message: Message): { isImage: boolean; previewUrl: null; downloadUrl: null; icon: null; }; /** * Opens the list of calculations into a dialog window for selection and then adds them to payroll * @param category Either "paid": Read-only, a copy is added ... or "draft": Editable, moved with status changed. */ addExistingCalc(category?: "paid" | "draft"): void; /** * Opens the list of payrolls into a dialog window for selection and then adds them to payroll * @param category Either "paid": Read-only, a copy is added ... or "draft": Editable, moved with status changed. */ addExistingPayroll(category?: "paid" | "draft"): void; /** * Navigates to the business object details page * @param item The message item. * @param defaultMessageDetailsUrl The URL for the default message details page. */ navigateToBusinessObject(item: MessageListItem, defaultMessageDetailsUrl: string): Promise; /** Deletes a message from the message list (must be saved still) */ deleteMessage(item: Message): void; private getCalculationListItem; private getPayrollListItem; } /** * Shows a list of messages. * @example * ```html * * ``` */ export declare class MessageThreadList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Max count of threads to show in the list. */ limitTo: string; /** If readOnly is true, create buttons from the list view are hidden if readOnly property is supported */ readOnly: string; /** * URL for the approval view. */ approvalUrl: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides CRUD access for Message threads. */ 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_2; /** * 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 */ declare enum MessageThreadStatus { Draft = "draft", Active = "active", Approved = "approved", Rejected = "rejected", Archived = "archived", Template = "template" } /** Defines workflow actions for a message thread. */ 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; } /** Settings related to Messaging */ 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; } /** * Controller for alert, confirm and loading dialogs. */ export declare class ModalGenericDialogController { data: any; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(data: any); } /** Holiday Accrual for a calendar month in releation to a calculation. */ 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; } /** * Helps listing current account tax cards (latest and previous ones) * and also the employers that are using the latest taxcards. */ export declare class MyTaxcardsController implements angular_2.IController { private taxcards; private uiCrudHelpers; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The data after it has been loaded. Null if nothing is loaded yet. */ current: WorkerCurrentTaxcards; /** The current active tab. */ currentTab: string; /** Creates a new MyTaxcardsController */ constructor(taxcards: Taxcards, uiCrudHelpers: UiCrudHelpers, uiHelpers: UiHelpers); /** Initializes the controller. */ $onInit: () => void; /** Reloads the data from the server. */ reload(): void; /** * Removes a taxcard from the list and does a refresh. * @param id Taxcard id. */ deleteTaxCard(id: string): void; /** * Sets the users automatic shared taxcard as ON or if already set refreshes the taxcard from tax authorities. */ setSharedAutoForSelf(): void; /** * Gets the chart type that should be shown. */ get chartType(): "full" | "pie" | "none"; /** * Gets main chart configuration for * @param taxcard current taxcard */ getMainChartConfig(taxcard: Taxcard): any; /** * Gets pie chart configuration for * @param taxcard current taxcard */ getPieChartConfig(taxcard: Taxcard): any; } /** * Helper controller to generate navigation components and views: * Top- and side-menus, paths and controls that show the current title. * These controls take the navigation logic from an object (sitemap) and are aware of current node / open page on that sitemap. * * NOTE: This is just an optional helper to make creating simple demo sites easier. * There is no need to use NaviService, NaviController or components in your custom site! * You can use something completely different. */ export declare class NaviController implements angular_2.IController { private naviService; private sessionService; private userSettingsService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Display mode of the sitemap / navi: "default", "accordion" or "horizontal" * default: Shows full two levels of the tree. Typically used as sitemap in the content area. * accordion: Shows first level of the navi tree and second level only it is in the current path. Typically used in left menu navigation. * horizontal: Full navi on top bar. Second tier in dropdowns. * 3-levels: Accordion with 3 levels. */ mode: "default" | "accordion" | "horizontal" | "3-levels"; /** * - layout: "default" or "iframe" * - default: Basic layout with full navigation (left sidebar or horizontal). * - iframe: Layout without first tier navigation on left sidebar. Second tier navigation items are under dropdown in top bar / header if mode is default. * On horizontal mode full navigation is on top bar. */ layout: "default" | "iframe"; /** * Creates a new NaviController * @param naviService - Service that stores the navigation state. * @ignore */ constructor(naviService: NaviService, sessionService: SessionService, userSettingsService: UserSettingsService); /** * Implement IController */ $onInit: () => void; /** * Contains information about the current sitemap node (if resoved) and other data related to route. * This property takes into account that the current node may not be found, * i.e. current.node may be null, current.path may be []. * However, the "route" as an object should never be null. * All the other properties in this controller use first node as default for historical reasons. */ get route(): CurrentRoute; /** * Returns the main sitemap object that is used in rendering the navigation. * Set the sitemap by setting the angular constant or object "SITEMAP" */ get sitemap(): SitemapNode[]; /** * If true, the layout should show a full-page loader instead of normal pages. * Controllers in normal pages should be destoyed (e.g. using ng-if) so that this can also * be used in reloading the AngularJS user interface without full Browser reload. */ get showFullPageLoader(): boolean; /** * Gets the user-specific setting (service), stored in the local storage. */ get userSettings(): UserSettingsService; /** * Temporary visibility helper for the new Payroll 4 version. */ get newPayrollVersion(): { /** If true, the switch for selecting version 4 is shown to the user. */ show: boolean; /** If true the new version is in use. */ use: boolean; }; /** New payroll version use */ get newPayrollVersionUse(): boolean; /** * New payroll version use */ set newPayrollVersionUse(value: boolean); /** * Returns route for the given path * @param path Page URL path for the node. * @returns Route for the path. */ getRoute(path?: string): CurrentRoute; /** * Retuns the identifier of the currently selected section. * If nothing else is selected, it will return the first section, by convention called 'home'. */ getSectionId(): string | undefined; /** * Gets the navi URL from a sitemap node. * Currently, removes "*" at the end if url ends with "/*", but may be used for additional logic in the future. */ getUrl(node: SitemapNode): string; /** Toggles the isNaviOpen property */ toggleNavi(): void; /** * True if the navigation (e.g. left sidebar) is open. * Typically, this property is used only in narrow (mobile) view, otherwise the sidebar is always shown. */ get isNaviOpen(): boolean; set isNaviOpen(value: boolean); /** Toggles the isSidebarOpen property */ toggleSidebar(): void; /** * True if the secondary sidebar (e.g. right sidebar) is open. */ get isSidebarOpen(): boolean; set isSidebarOpen(value: boolean); /** * Gets the current section: The first level node in the sitemap * @returns Section filtered by the roles. */ getSection(): SitemapNode; /** * Returns true if the node should be hidden in the navi. * @param node Node to check. If null, the current node is checked (not defaulted to first node). */ getHidden(node?: SitemapNode): boolean; /** * Gets the visibility:disabled flag for the current node OR any node in the path */ getDisabled(): boolean; /** * Returns true if the node has non-hidden children. * @param node Node to check */ hasChildren(node: SitemapNode): boolean; /** * Filters away the hidden nodes from node array. * @param nodes Node array. */ filterHidden(nodes: SitemapNode[]): SitemapNode[]; /** * Returns true if the given node is the currently selected node. */ isCurrent(siteMapNode: SitemapNode): boolean; /** * Returns true if the given node is the currently selected node. */ isCurrentSection(section: SitemapNode): boolean; /** * In test environment, returns true if the sitemap node has role "test" and it is visible only because of that role. * @param siteMapNode Node in the sitemap. */ isTest(siteMapNode: SitemapNode): boolean; /** * Navigate to given path * @param path - Path to navigate. * @param checkSession - If true, triggers session refresh */ navigateTo(path: string, checkSession?: boolean): void; /** Returns the page / node title */ get title(): string; /** Gets the currently selected node. */ get current(): SitemapNode; /** Current path from root to the current node. */ get currentPath(): SitemapNode[]; /** Returns true if the current window is in an IFrame */ get isInIframe(): boolean; /** Returns current year. Used for example in copyright texts in footers */ getCurrentYear(): number; /** * Determines whether to show the KYC (Know Your Customer) information. * @returns A boolean value indicating whether to show the KYC information. */ get showKyc(): boolean; /** Returns current application */ get applicationId(): string; } /** * Helper service to generate navigation controls: * Top- and side-menus, paths and controls that show the current title. * These controls take the navigation logic from an object (sitemap) and are aware of current node / open page on that sitemap. * NOTE: This is just an optional helper to make creating simple demo sites easier. * There is no need to use NaviService, NaviController or components in your custom site! * You can use something completely different. */ export declare class NaviService { private $location; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Contains information about the current sitemap node (if resoved) and other data related to route. * This property takes into account that the current node may not be found, * i.e. current.node may be null, current.path may be []. * However, the "route" as an object should never be null. * Most other properties in NaviService use first node as default for historical reasons. */ current: CurrentRoute; /** * Section where the current node is located. * If current node cannot be resolved, this property defaults to first Sitemap node. */ currentSection: SitemapNode; /** * Currently selected sitemap node. * If current node cannot be resolved, this property defaults to first Sitemap node. */ currentNode: SitemapNode; /** * Current path from root to the current node. * If current node cannot be resolved, this property defaults to first Sitemap node. */ currentPath: SitemapNode[]; /** * Title of the section (first level in the sitemap). * If current node cannot be resolved, this property defaults to first Sitemap node. */ sectionTitle: string; /** * Title of the current sitemap node. * If current node cannot be resolved, this property defaults to first Sitemap node. */ title: string; /** * True if the navigation (e.g. left sidebar) is open. * Typically, this property is used only in narrow (mobile) view, otherwise the sidebar is always shown. */ isNaviOpen: boolean; /** * True if the secondary sidebar (e.g. right sidebar) is open. */ isSidebarOpen: boolean; /** Sitemap that describes the structure of this application: For all roles. */ private sitemapForAllRoles; /** Sitemap filtered for the roles of the current user. */ private sitemapInRole; /** Cache for whether the system is using test data. */ private isTest; constructor($rootScope: angular_2.IRootScopeService, $location: angular_2.ILocationService, sessionService: SessionService, $injector: angular_2.auto.IInjectorService); /** * Gets the current sitemap. * @returns Sitemap filtered for the roles of the current user. */ getSitemap(): SitemapNode[]; /** * Sets the sitemap any time during the application lifecycle. * Alternative way is to set angular constant "SITEMAP", but that must be done before config. * @param newSitemap New sitemap to use. */ setSitemap(newSitemap: SitemapNode[]): void; /** * Gets the current section: The first level node in the sitemap * @returns Section filtered by the roles. */ getCurrentSection(): SitemapNode; /** Determines if a given node is the current node */ isCurrent(siteMapNode: SitemapNode): boolean; /** Determines if a given section is the current section */ isCurrentSection(section: SitemapNode): boolean; /** * Get sitemap node using path. * @param path - Page URL path for the node. * @returns - Node if exists, otherwise null. */ getNodeByPath(path: string): SitemapNode | null; /** * Get sitemap nodes using path. * @param path - Page URL path for the node. * @returns - Nodes path if exists, otherwise null. */ getNodesByPath(path: string): SitemapNode[] | null; /** * Filters the sitemap using the role-restrictions in the sitemap * @param session - Optional explicitely given session for filtering the sitemap. * @param appStatus - Optional explicitely given appStatus for filtering the sitemap. This must be given with explicitely given session. */ updateSitemapInRole(session?: UserSession, appStatus?: AppStatus): void; /** * Resolve current node from location path */ resolveAndSetCurrentNode(): void; /** * Navigate to given path * @param path - Path to navigate. * @param checkSession - If true, triggers session refresh */ navigateTo(path: string, checkSession?: boolean): void; /** * Evaluates wildcard string. * @param nodeUrl - URL in the sitemap file (e.g. "filename.html#/this/is/nodeUrl"). From this, we take only the hash part ("#/this/is/nodeUrl"). * @param pathUrl - URL to evaluate - this is the hash path (e.g. "#/this/is/pathUrl") * @returns Boolean whether the path url resides within the given node url. */ private checkUrl; /** * Evaluates wildcard string * @param rule - Wildcard rule * @param str - String to evaluate * @returns Boolean whether the string matches the given wildcard rule. */ private wildCardMatch; /** * Recursive resolver for any depth of sitemap nodes. * @param url Url to check for. * Note that in AngularJS paths, this should be the NG path starting with "#". * @param nodes Nodes to check (typically the whole sitemap). * @returns The path to current node or null if the current node cannot be resolved. */ private resolveCurrent; /** * Filters a node tree bases on user roles. * @param nodes - Array of nodes to filter * @param session - Optional explicitely given session for filtering the sitemap. * @param appStatus - Optional explicitely given appStatus for filtering the sitemap. This must be given with explicitely given session. * @returns Filtered list of nodes. */ private filterSitemapSectionsByRole; private findNode; private findParentNode; } /** * Helper component to generate navigation components and views: * Top- and side-menus, paths and controls that show the current title. * These controls take the navigation logic from an object (sitemap) and are aware of current node / open page on that sitemap. * * * NOTE: This is just an optional helper to make creating simple demo sites easier. * There is no need to use NaviService, NaviController or components in your custom site! * You can use something completely different. * @example * ```html * * ``` */ export declare class NaviSitemap extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * - mode: "default", "accordion" or "horizontal" * - default: shows full two levels of the tree. Typically used as sitemap in the content area. * - accordion: shows first level of the navi tree and second level only if is in the current path. * Typically used in left menu navigation. * - horizontal: Full navi on top bar. Second tier in dropdowns. * - 3-levels: Accordion with 3 levels. */ mode: string; }; /** Uses the NaviController */ controller: typeof NaviController; /** The default template for the component. */ defaultTemplate: string; } /** * Helper component to easily create a web site that is responsive and usable. * The starter contains: * * - Customizable Header with title * - Left menu with logo, authentication info / login button and sitemap * - Mobile version with simple header: Title + Hamburger button that shows the menu, which is hidden by default. * - Loader message / animation * - Content area as ng-view * - Alert container * * * NOTE: This is just an optional helper to make creating simple (demo) sites easier. * There is no need to use NaviStarterLayout, NaviService, NaviController or components in your custom site! * You can use something completely different. * @example * ```html * *
* Your html here: {{ navi.title }} *
*
*
*
*
* ``` */ export declare class NaviStarterLayout extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * - mode: "default", "accordion" or "horizontal" * - default: shows full two levels of the tree. Typically used as sitemap in the content area. * - accordion: shows first level of the navi tree and second level only if is in the current path. * - horizontal: Full navi on top bar. Second tier in dropdowns. * Typically used in left menu navigation. */ mode: string; /** * - layout: "default" or "iframe" * - default: Basic layout with full navigation (left sidebar or horizontal). * - iframe: Layout without first tier navigation on left sidebar. Second tier navigation items are under dropdown in top bar / header if mode is default. On horizontal mode full navigation is on top bar. */ layout: string; }; /** * Component may contain header and main tags to * override the default rendering of the header (non-mobile) and main content area respectively. */ transclude: { /** Header part of the page. Note that mobile header is defined separately. */ header: string; /** Main content part of the page */ main: string; /** The main navigation: By default: left sidebar. */ nav: string; }; /** Uses the NaviController */ controller: typeof NaviController; /** The default template for the component. */ defaultTemplate: string; } /** * New payment controller for Salaxy Pay */ export declare class NewPaymentController implements angular_2.IController { private sessionService; private calculations; private uiHelpers; private $location; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(sessionService: SessionService, calculations: Calculations, uiHelpers: UiHelpers, $location: angular_2.ILocationService); /** * Text for the payment button * This is typically customized in custom payment scenarios. */ getPaymentButtonText(label: string): string; /** * Opens the Salaxy Pay payment for a Calculation or PayrollDetails item. * If the model is a Calculation, it will first save the calculation before proceeding. * Generates a URL for Salaxy Pay and opens it in a new window. * @param model - The Calculation or PayrollDetails to pay. * @param step - Optional step number to navigate to in the payment wizard. */ openSalaxyPay(model: Calculation | PayrollDetails_2, step?: number): void; /** * Resolves the base URL for Salaxy Pay based on the current environment. * @returns The base URL for the payment service. */ private resolveBaseUrl; /** * Validates required parameters for opening payment. * @param baseUrl - The base URL for the payment service. * @param accessToken - The access token for authentication. * @param businessObjectType - The type of business object. * @param businessObjectId - The ID of the business object. * @throws Error if any required parameter is missing. */ private validatePaymentParams; /** * Opens payment for a calculation, saving it first if needed. * @param calculation - The calculation to pay. * @param step - Optional step number to navigate to in the payment wizard. */ private openPaymentForCalculation; /** * Opens payment for a payroll (assumes payroll is already saved). * @param payroll - The payroll to pay. * @param step - Optional step number to navigate to in the payment wizard. */ private openPaymentForPayroll; /** * Opens the payment window with validated parameters. * @param businessObjectId - The ID of the business object. * @param businessObjectType - The type of business object. * @param loading - Optional loading indicator with dismiss method. * @param loading.dismiss - Dismiss the loading indicator. * @param step - Optional step number to navigate to in the payment wizard. */ private openPayment; } /** OAuthSalaxyAuthorizeMode enumeration */ declare enum OAuthSalaxyAuthorizeMode { Undefined, Sign_in, Sign_up } /** * Renders the search box and export/import functions within OdataTable. * Requires salaxy-odata-table component as parent. */ export declare class OdataActions extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Default locale for data exports/imports. */ localeId: string; /** Flag indicating if the export options are visible. */ showExport: string; }; /** Attribute must be used within salaxy-odata-table component to access the common ODataQueryController */ require: { $odata: string; }; /** Actions */ transclude: boolean; /** Uses the ODataActionsController */ controller: typeof ODataActionsController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller that provides export and import for odata tables and API crud objects. */ export declare class ODataActionsController implements angular_2.IController { private fileService; private jsonSchemaService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The API crud object controller. */ $crud: ApiCrudObjectController; /** Enclosing ODataQueryController */ $odata: ODataQueryController; private calculationsUrl; /** * Constructor for Dependency Injection. */ constructor(fileService: FileService, jsonSchemaService: JsonSchemaService); /** * Returns Exportable api for the used crud. * @returns Exportable api. */ getExportable(): Exportable; } /** * Renders the footer within OdataTable. * Requires salaxy-odata-table component as parent. * TODO: Example */ export declare class OdataFooter extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Type of paging */ paging: string; /** * Manually defined URL for the nextPageLink. * Browser is directed to this URL instead of loading more data from nextPageLink. */ nextPageUrl: string; }; /** Attribute must be used within salaxy-odata-table component to access the common ODataQueryController */ require: { $odata: string; }; /** Uses the ODataHelperController */ controller: typeof ODataHelperController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller that provides helper methods in components inside ODataQueryController. */ export declare class ODataHelperController implements angular_2.IController { private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Signals that the component should render a table column header with orderby (OData sort) */ orderby: string; /** * Manually defined URL for the nextPageLink. * Browser is directed to this URL instead of loading more data from nextPageLink. */ nextPageUrl: string; /** The parent ODataQueryController that contains the list and all the methods. */ $odata: ODataQueryController; constructor(ajax: AjaxNg1); /** * Implement IController */ $onInit: () => void; /** * Gets the "No items" message if there is no items to show. * Null, if there are rows to show. * The message changesdepending on the situation: No items, Not initiated, Authentication required. */ getNoItemsMessage(): "SALAXY.UI_Terms.loading" | "SALAXY.NG1.ODataFooterComponent.getNoItemsMessage.anon" | "OData Service not initialized: Set url property or call setUrl()." | "SALAXY.NG1.ODataFooterComponent.getNoItemsMessage.loadError" | "SALAXY.NG1.ODataFooterComponent.getNoItemsMessage.noItems" | null; /** Gets the CSS classes for No items message */ getNoItemsCssClass(): "" | "alert alert-danger" | "alert alert-default"; /** Gets the paging view to show */ getPagingView(): "clientLimit" | "nextPageLink" | "url" | "allVisible"; } /** * User interface logic for making and displaying an OData query and displaying its results as list. */ export declare class ODataQueryController implements angular_2.IController { protected cacheService: CacheService; private ajax; private $timeout; private $scope; private $controller; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * CRUD controller that implements Delete and potentially other methods about the object. * If you wish to use this in the view use "as $controllerName" syntax * @example * */ crudController: string; /** * Optional bindings for the CRUD controller. All properties are set to crudController before calling init. * @example * */ crudBindings: { [key: string]: any; }; /** OData endpoint URL */ url: string; /** The status of the data loading */ _status: "noInit" | "initialLoading" | "loaded" | "reloading" | "loadError"; /** * If true, the items collection has data. * This means that items is not null. It may be an empty array though if there is nothing coming from data source. */ hasData: boolean; /** Query options for the next query */ options: ODataQueryOptions; /** Items once loaded from the server. This is an empty array when the loading starts. */ items: any[]; /** Total count of the items (server-side/storage) if updated in the previous query. */ count: number | null; /** Link for the next page if available in the previous query */ nextPageLink: string; /** Data passed from the parent to the component / view */ data: any; /** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */ readOnly: any; /** Selected search items */ selectedItems: any[]; /** If set, uses caching to store cache result between controller loads. */ cacheKey: string; /** Time in milliseconds when the data was loaded. */ loadedAt: number; /** Optional OData reader. Defaults to AjaxNg1.getJSON -method */ reader: { /** Gets a JSON-message from server using the API */ getJSON: (method: string) => Promise; }; /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selections (single and multi). Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items. * @example */ onListSelect: (params: { /** In multi-select mode, the value may be true (selected) or false (unselected). */ value: true | false; /** Item that was last selected / deselected. */ item: any; /** All items that are currently selected. */ allItems: any[]; }) => void; /** Function that is called when the data has been loaded and set as values of the items. */ onDataLoaded: (params: { /** If true, the load was append to previous values. */ append: boolean; /** The resulted data */ result: ODataResult; }) => void; /** * When list is used as selection (dialog) specifies whether the selection is single or multiple. * NOTE: Currently only affects select all buttons. Later implementations may use to implement single/multiple selections. */ selectMode: "multiselect" | "select"; /** Used in the searchChanged function if the searchType is "other" (potentially some other special searches in the future). */ rawSearchStringOther: string; /** Used in the searchChanged function if the searchType is "owner" (potentially some other special searches in the future). */ rawSearchStringOwner: string; /** HACK: Extract interface */ private $crudController; private filterTimeout; /** * Creates a new controller instance * @ignore */ constructor(cacheService: CacheService, ajax: AjaxNg1, $timeout: angular_2.ITimeoutService, $scope: angular_2.IScope, $controller: angular_2.IControllerService, uiHelpers: UiHelpers); /** * Implement IController */ $onInit: () => void; /** * Cleaning the timeout. */ $onDestroy: () => void; /** * Gets the status of the data if it is being loaded from a remote server. */ get status(): "noInit" | "initialLoading" | "loaded" | "reloading" | "loadError"; /** * Set the URL and start reload. * @param url OData enndpoint * @param queryOptions Optional initial query options. */ setUrl(url: string, queryOptions?: ODataQueryOptions): void; /** * Sets query options. Does not trigger reload. * @param queryOptions Query options. */ setQueryOptions(queryOptions?: ODataQueryOptions): void; /** * Method to set the sort by for a column * @param column Column to sort by * @param direction Optional direction is either "asc" for ascending or "desc" for descending. * If direction is not set, will reverse the sort order or ascending being the default. */ orderBy(column: string, direction?: "asc" | "desc"): void; /** * Sets a column filter and reloads the data set. * @param column Name of the column. * Set the column name as null, if you want to clear all filters. * @param value Value of the filter. Null clears the filter (not filter-by-null). * TODO: This could potententially be a comma separated value if requirement comes up. * @param operation Possibility to negate the equality. * @param andFilters If set, adds these additional filters (with and) to the new primary filter. * @param valueType Type for the value. Default is string, other option is date */ setFilter(column: string | null, value: string, operation?: "eq" | "ne", andFilters?: string, valueType?: string): void; /** * Gets the text indicating the time that has passed since the data was loaded. */ getLoadedTime(unit?: "min" | "10sec" | "sec"): number; /** Clears the cache and reloads from the server. */ refresh(): void; /** Clears the entire cache - all keys and reloads. */ refreshClearAll(): void; /** * Sets an item as selected. * @param item Item to set as selected * @param value Selected true / false or "toggle" to toggle to other value. */ setSelected(item: any, value?: true | false | "toggle"): void; /** * Returns true if the item is selected. * @param item Item to check for selected value. */ isSelected(item: any): boolean; /** Unselect all */ unselectAll(): void; /** Select all */ selectAll(): void; /** * Gets a column ordering for the specified column. * @param columnName Name of the column * @returns Column order "asc" or "desc" if column is being sorted. Otherwise null. */ getColumnOrder(columnName: string): "asc" | "desc" | null; /** * Loads items on next page * @param append If true, appends the data of the next page link to the current set of items */ loadNextPage(append: boolean): void; /** * Called by the view when the search text changes * @param searchType If "owner" or "other", the search is performed as owner:search or other:search and the search string is taken from rawSearchString. * By default, the search string should be bound to options.$search or options.fullSearch. */ searchChanged(searchType?: "default" | "owner" | "other" | "both"): void; /** * Starts the reload process. * @param delay Loading occurs asyncronously after the specified delay */ reloadWithDelay(delay: number): void; /** * Starts the reload process. * @returns A promise of OData result as returned by setValues() method. */ reload(): Promise>; /** Gets the URL for the server request using the current url and queryOptions */ getUrl(): string | null; /** If true, the component is in the middle of loading data. */ get isLoading(): boolean; /** * Gets the CSS classes for OData table container. * Main function is to get the `salaxy-loading class`. * Also renders `salaxy-component salaxy-odata-table` for convenience */ getCssClass(): string; /** * Sets the values to items from an OData result. * @param data Data as returned from the Ajax component. This is expected being either ODataResult or array of items. * @param append If true, appends the result to existing values. Used particularly with nextPageLink if this is used fo "Load more", not "Next page". * @returns The data harmonized as OData result. */ setValues(data: any, append?: boolean): ODataResult; /** * Calls a promise updating the status on the controller. * @param loadAction The promise that executes the loading from server. */ setStatus(loadAction: Promise>): Promise>; /** * Returns the current crud api. */ getApi(): CrudApiBase; /** * Export items. Does not update cache or current items. * @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 using the current $filter and $search. * - ```n``` Where n is any positive number, returns the given number of items. Should be more than 50 (default page size). * @param notify - function for notifying progress. */ exportItems(maxCount: number, notify?: progressNotification): Promise; /** * Makes a http call to server using the curre * @param options - Options based on which the OData query is created. * @param append - If true, appends the result to the data. * @returns A promise of OData result as returned by setValues() method. */ protected loadData(options: ODataQueryOptions, append?: boolean): Promise>; } /** Defines the query options of OData */ 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 */ 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; } /** * Helper for rendering an OData service based table / grid. */ export declare class OdataTable extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** OData query options */ options: string; /** URL to the OData service. */ url: string; /** Data passed from the parent to the component / view */ data: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Current list of items. */ items: string; /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selections (single and multi). Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items. * @example */ onListSelect: string; /** Function that is called when the data has been loaded and set as values of the items. */ onDataLoaded: string; /** * CRUD controller that typically defines the values for url template and * @example * */ crudController: string; /** * Optional bindings for the CRUD controller. All properties are set to crudController before calling init. * @example * */ crudBindings: string; /** Defines the cache key. A non-null value also means that the caqche is enabled. */ cacheKey: string; /** Optional reader component for OData. Uses the given url and reads data from the OData source. */ reader: string; /** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */ readOnly: string; /** Logic object for component */ logic: string; /**Select mode for component */ selectMode: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; /** Rendered HTML replaces the original element */ replace: true; } /** * Controller for Omapalkka integration. */ export declare class OmapalkkaController implements angular_2.IController { private ajax; private sessionService; private $sce; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private _url; private _urlInProgress; /** * Creates a new ContactInfoController * @ignore */ constructor(ajax: Ajax, sessionService: SessionService, $sce: angular_2.ISCEService); /** * Implement IController */ $onInit: () => void; /** Gets the URL to the Omapalkka server with Google Firebase token. */ get url(): null; } /** 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. */ 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. */ declare interface OnboardingContactVerification { /** Given pin code. */ pin?: string | null; } /** Contact verification object for onboarding. */ 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. */ 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; } /** * 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. */ 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 | null): string; } /** * Manages the onboarding process where an account is created. */ export declare class OnboardingService { private $rootScope; private $sce; private onboardingsApi; private sessionService; private uiHelpers; private ajax; private $location; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The current onboarding model */ model: Onboarding; /** Unique identifier of the onboarding data in storage */ id: string; /** Server address for onboarding pages etc. */ serverAddress: string; private lastPdfPreviewUrl; constructor($rootScope: angular_2.IRootScopeService, $sce: angular_2.ISCEService, onboardingsApi: Onboardings, sessionService: SessionService, uiHelpers: UiHelpers, ajax: Ajax, $location: angular_2.ILocationService); /** Gets / refreshes the onboarding data from the server */ getOnboardingData(id?: string): Promise; /** * Get the onboarding object for given account. * @param accountId - Account id for existing account. */ getOnboardingDataForAccount(accountId: string): Promise; /** * Saves the current onboarding to database. * @returns A Promise with result data (Onboarding) */ save(): Promise; /** * Commits current onboarding and creates/changes the account. * @returns A Promise with result data (Onboarding) */ commit(): Promise; /** * Return the new URL for digital signature: Telia and Singicat * @param authService Select the signature service (bank / mobile auth). * This is only supported for Telia / Persons (not companies Signicat) * @param signerPersonalId Possibility to override the signer personal Id. * @param testSignerPersonalId Signer personal id for test. * @param successUrl Optional success url for the signature. * Leaving this empty will return the brower to the current page (path, not query params / hash) * @param cancelUrl Optional cancel / error url for the signature. Default is successUrl. */ getDigitalSignUrl(authService?: string, signerPersonalId?: string, testSignerPersonalId?: string, successUrl?: null, cancelUrl?: null): string; /** * Gets the PDF preview address taking into account potential changes in the model. * @param asUntrusted - Boolean indicating if the return url should be returned as untrusted (not wrapped). * By default, the url is returned as trusted url. * @returns Url address */ getPdfPreviewAddress(asUntrusted?: boolean): string; /** * Controllers can subscribe to changes in service data using this method. * Read more about the pattern in: http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/ * @param scope Controller scope for the subscribing controller (or directive etc.) * @param callback The event listener function. See $on documentation for details */ subscribe(scope: angular_2.IScope, callback: (event: angular_2.IAngularEvent, ...args: any[]) => any): void; /** * Opens customer wizard as modal dialog. * @param accountId - Optional accountId for existing company. */ launchCustomerOnboarding(accountId: string): Promise; /** * Shows the current customer invitation as modal dialog. * @param accountId - AccountId for existing company. */ showCustomerInvitation(accountId: string): Promise; /** * Opens a generic wizard as modal dialog. * If account type is known, opens the the wizard for that type. * @param id - Optional onboarding id for existing onboarding. * @param isModelLoaded - If true, the method does not load the model from backend any more. */ launchGenericOnboarding(id?: string, isModelLoaded?: boolean): void; /** * Launches an onboarding of a type if type is specific. * @param role Role that is evaluated: Launched if it matches one of the specific roles. * Does not start onboarding if role is None / null etc. * @param id Identifier of onboarding object. * @param isModelLoaded If true, the model is already loaded. * @returns True if the dialog is launched. */ launchOnboardingOfType(role: WebSiteUserRole, id?: string, isModelLoaded?: boolean): boolean; /** * Opens worker wizard as modal dialog. * @param id - Optional onboarding id for existing worker. * @param isModelLoaded - If true, the method does not load the model from backend any more. */ launchWorkerOnboarding(id?: string, isModelLoaded?: boolean): Promise; /** * Opens company wizard as modal dialog. * @param id - Optioanl onboarding id for existing company. * @param isModelLoaded - If true, the method does not load the model from backend any more. */ launchCompanyOnboarding(id?: string, isModelLoaded?: boolean): Promise; /** * Opens household wizard as modal dialog. * @param id - Optioanl onboarding id for existing company. * @param isModelLoaded - If true, the method does not load the model from backend any more. */ launchHouseholdOnboarding(id?: string, isModelLoaded?: boolean): Promise; /** * Opens a simple signature page for federation (currently for Raksa / Palkkamylly only) * @param id - Optioanl onboarding id for existing person. * @param isModelLoaded - If true, the method does not load the model from backend any more. */ launchFederateSign(id?: string, isModelLoaded?: boolean): Promise; private launchOnboarding; private notify; private getServerAddress; /** * Continues based on returnUrl parameter from the current url. */ private launchReturnUrlOnboarding; private getReturnUrlOnboardingParameters; private readTokenFromUrl; private init; } /** OnboardingStatus enumeration */ declare enum OnboardingStatus { Created = "created", Open = "open", Error = "error", Cancel = "cancel", Done = "done", Expired = "expired" } /** Stores data for the onboarding user interface. */ 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; } declare namespace OpenAPIV2 { 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; } interface TagObject { name: string; description?: string; externalDocs?: ExternalDocumentationObject; } interface SecuritySchemeObjectBase { type: 'basic' | 'apiKey' | 'oauth2'; description?: string; } interface SecuritySchemeBasic extends SecuritySchemeObjectBase { type: 'basic'; } interface SecuritySchemeApiKey extends SecuritySchemeObjectBase { type: 'apiKey'; name: string; in: string; } type SecuritySchemeOauth2 = SecuritySchemeOauth2Implicit | SecuritySchemeOauth2AccessCode | SecuritySchemeOauth2Password | SecuritySchemeOauth2Application; interface ScopesObject { [index: string]: any; } interface SecuritySchemeOauth2Base extends SecuritySchemeObjectBase { type: 'oauth2'; flow: 'implicit' | 'password' | 'application' | 'accessCode'; scopes: ScopesObject; } interface SecuritySchemeOauth2Implicit extends SecuritySchemeOauth2Base { flow: 'implicit'; authorizationUrl: string; } interface SecuritySchemeOauth2AccessCode extends SecuritySchemeOauth2Base { flow: 'accessCode'; authorizationUrl: string; tokenUrl: string; } interface SecuritySchemeOauth2Password extends SecuritySchemeOauth2Base { flow: 'password'; tokenUrl: string; } interface SecuritySchemeOauth2Application extends SecuritySchemeOauth2Base { flow: 'application'; tokenUrl: string; } type SecuritySchemeObject = SecuritySchemeBasic | SecuritySchemeApiKey | SecuritySchemeOauth2; interface SecurityDefinitionsObject { [index: string]: SecuritySchemeObject; } interface SecurityRequirementObject { [index: string]: string[]; } interface ReferenceObject { $ref: string; } type Response = ResponseObject | ReferenceObject; interface ResponsesDefinitionsObject { [index: string]: ResponseObject; } type Schema = SchemaObject | ReferenceObject; interface ResponseObject { description: string; schema?: Schema; headers?: HeadersObject; examples?: ExampleObject; } interface HeadersObject { [index: string]: HeaderObject; } interface HeaderObject extends ItemsObject { } interface ExampleObject { [index: string]: any; } interface ResponseObject { description: string; schema?: Schema; headers?: HeadersObject; examples?: ExampleObject; } 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; interface ResponsesObject { [index: string]: Response | any; default?: Response; } type Parameters = (ReferenceObject | Parameter)[]; type Parameter = InBodyParameterObject | GeneralParameterObject; interface InBodyParameterObject extends ParameterObject { schema: Schema; } interface GeneralParameterObject extends ParameterObject, ItemsObject { allowEmptyValue?: boolean; } interface PathItemObject { $ref?: string; get?: OperationObject; put?: OperationObject; post?: OperationObject; del?: OperationObject; delete?: OperationObject; options?: OperationObject; head?: OperationObject; patch?: OperationObject; parameters?: Parameters; } interface PathsObject { [index: string]: PathItemObject | any; } interface ParametersDefinitionsObject { [index: string]: ParameterObject; } interface ParameterObject { name: string; in: string; description?: string; required?: boolean; [index: string]: any; } type MimeTypes = string[]; interface DefinitionsObject { [index: string]: SchemaObject; } 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; }; } interface ExternalDocumentationObject { [index: string]: any; description?: string; url: string; } 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; } interface XMLObject { [index: string]: any; name?: string; namespace?: string; prefix?: string; attribute?: boolean; wrapped?: boolean; } interface InfoObject { title: string; description?: string; termsOfService?: string; contact?: ContactObject; license?: LicenseObject; version: string; "x-salaxy-model-namespace"?: string; "x-salaxy-enum-namespace"?: string; } interface ContactObject { name?: string; url?: string; email?: string; } interface LicenseObject { name: string; url?: string; } } declare namespace OpenAPIV3 { 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; } interface InfoObject { title: string; description?: string; termsOfService?: string; contact?: ContactObject; license?: LicenseObject; version: string; "x-salaxy-model-namespace"?: string; "x-salaxy-enum-namespace"?: string; } interface ContactObject { name?: string; url?: string; email?: string; } interface LicenseObject { name: string; url?: string; } interface ServerObject { url: string; description?: string; variables?: { [variable: string]: ServerVariableObject; }; } interface ServerVariableObject { enum?: string[]; default: string; description?: string; } interface PathsObject { [pattern: string]: PathItemObject | undefined; } 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)[]; } 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; interface ExternalDocumentationObject { description?: string; url: string; } interface ParameterObject extends ParameterBaseObject { name: string; in: string; } interface HeaderObject extends ParameterBaseObject { } 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; }; } type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer'; type ArraySchemaObjectType = 'array'; type SchemaObject = ArraySchemaObject | NonArraySchemaObject; interface ArraySchemaObject extends BaseSchemaObject { type: ArraySchemaObjectType; items: ReferenceObject | SchemaObject; } interface NonArraySchemaObject extends BaseSchemaObject { type?: NonArraySchemaObjectType; } 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; } interface DiscriminatorObject { propertyName: string; mapping?: { [value: string]: string; }; } interface XMLObject { name?: string; namespace?: string; prefix?: string; attribute?: boolean; wrapped?: boolean; } interface ReferenceObject { $ref: string; } interface ExampleObject { summary?: string; description?: string; value?: any; externalValue?: string; } interface MediaTypeObject { schema?: ReferenceObject | SchemaObject; example?: any; examples?: { [media: string]: ReferenceObject | ExampleObject; }; encoding?: { [media: string]: EncodingObject; }; } interface EncodingObject { contentType?: string; headers?: { [header: string]: ReferenceObject | HeaderObject; }; style?: string; explode?: boolean; allowReserved?: boolean; } interface RequestBodyObject { description?: string; content: { [media: string]: MediaTypeObject; }; required?: boolean; } interface ResponsesObject { [code: string]: ReferenceObject | ResponseObject; } interface ResponseObject { description: string; headers?: { [header: string]: ReferenceObject | HeaderObject; }; content?: { [media: string]: MediaTypeObject; }; links?: { [link: string]: ReferenceObject | LinkObject; }; } interface LinkObject { operationRef?: string; operationId?: string; parameters?: { [parameter: string]: any; }; requestBody?: any; description?: string; server?: ServerObject; } interface CallbackObject { [url: string]: PathItemObject; } interface SecurityRequirementObject { [name: string]: string[]; } 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; }; } type SecuritySchemeObject = HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme; interface HttpSecurityScheme { type: 'http'; description?: string; scheme: string; bearerFormat?: string; } interface ApiKeySecurityScheme { type: 'apiKey'; description?: string; name: string; in: string; } 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; }; }; }; } interface OpenIdSecurityScheme { type: 'openIdConnect'; description?: string; openIdConnectUrl: string; } interface TagObject { name: string; description?: string; externalDocs?: ExternalDocumentationObject; } } /** * Adds the OData $orderby functionality to table column header. * Primary design is for thead > tr > th element or for span / div within that tag. * Requires salaxy-odata-table component as parent. * @example * ```html * * * Title *
other text * * Section * ``` */ export declare class OrderbyDirective implements angular_2.IDirective { /** * Factory for directive registration. * @ignore */ static sxyOrderby(): { (): OrderbyDirective; $inject: any[]; }; /** * Applies to attributes only. * @ignore */ restrict: string; /** The view replaces the original element */ replace: boolean; /** Contents of the tag is transcluded: HTML can be used as input. */ transclude: boolean; /** Set isolate scope */ scope: boolean; /** Attribute must be used within salaxy-odata-table component to access the common ODataQueryController */ require: { $odata: string; }; /** * Creates a new instance of the directive. */ constructor(); /** * Template is based on the original tag. */ template(element: any, attrs: any): string; /** * Links the directive: Access to scope, element and attrs. * @ignore */ link: (scope: any, element: any, attrs: any, controllers: any) => void; } /** * Methods for testing the API. * Note that getWelcomeDataWorker() is currently used in Wecome component. * TODO: Remove getWelcomeDataWorker() and then remove the entire class. */ 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. */ declare interface OwnedCompanyInfo { /** Total count of shares. */ totalNumberOfShares?: number | null; } /** * User interfaces for Owner and Beneficiary lists. * @example * ```html * * ``` */ export declare class OwnerSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Sets the isReadOnlyForced status. */ isReadOnlyForced: string; }; /** Uses the OwnerSettingsController */ controller: typeof OwnerSettingsController; /** Default template is the view */ defaultTemplate: string; } /** * Handles user interfaces for Owner and Beneficiary lists */ export declare class OwnerSettingsController implements angular_2.IController { private beneficialOwnersApi; private $timoeut; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Mode */ mode: "byPercent" | "byAmount"; /** Current owners. */ current: BeneficialOwners; /** If true, current item is read only */ isReadOnlyForced: "<"; private saves; constructor(beneficialOwnersApi: BeneficialOwnersApi, $timoeut: angular_2.ITimeoutService); /** * Controller initializations */ $onInit: () => void; /** * Total amount of user input shares */ getTotalAmount(): number; /** * Total percentage of user input shares */ getTotalPercent(): number; /** * Calculates percentage from the given share amount */ getPercentFromAmount(numberOfShares: number): number; /** * Calculates share amount from the given share percentage */ getAmountFromPercent(percentOfShares: number): number; /** * update */ recalculateShares(): void; /** Saves the current owners and beneficiaries to backend. */ save(target: "owners" | "beneficiaries"): void; /** Indicates the progress of save operation. */ isSaving(target: "owners" | "beneficiaries"): boolean; } 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; } /** * Wizard for creating personal payment. */ export declare class PalkkausPersonalPaymentOverviewController extends WizardController { private invoices; private editDialogParameters; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Used calculation */ model: Calculation; /** * Creates a new WizardController with dependency injection. * @ignore */ constructor($scope: angular_2.IScope, invoices: InvoicesService, editDialogParameters: EditDialogParameters, wizardService: WizardService); /** * Initialization of the controller */ $onInit(): void; /** Worker wizard configuration */ getWizardSteps(): WizardStep[]; /** Returns true if user can go forward in the wizard */ get canGoNext(): boolean; /** * Navigates to the next step if possible. * Override adds the taxcard if personalId is there and resets it if personalId has changed. */ goNext(): void; /** * Checks if user can navigate to previuous step */ get canGoPrevious(): boolean; /** * Return EPR payment warning to template */ get eprPaymentWarning(): string; /** * Return EPR cancel warning to template */ get eprCancelWarning(): string; } /** Information about a Customer account for a Partner */ 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_2 | 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; } /** * User interface logic for brand selection, */ export declare class PartnerController implements angular_2.IController { private partnerService; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, the all partners all shown */ private showAll; /** * Creates a new PartnerController using dependency injection. * @ignore */ constructor(partnerService: PartnerService, sessionService: SessionService); /** Controller initialization. */ $onInit: () => void; /** Shows the skin that is currently in use: "default" for the real skin or overriden preview skin for preview purposes. */ get skin(): string; /** * Shows the Brand ID that should be used for preview purposes: Either real service model or temporary override ID. * Note that the service model may also be null, if there is no partner */ get brandId(): string | null | undefined; /** * Shows a dialog for brand selection. */ showSwitchCss(): void; /** * Temporary method only used in development * Shows a dialog for brand selection. */ showSwitchCssDev(): void; /** * Gets the URL for the login screen. Mainly for testing / preview purposes. */ getLoginUrl(): string; /** * Gets the URL for the onboarding screen. Mainly for testing / preview purposes. */ getOnboardingUrl(): string; } /** * Provides methods for managing the Primary partner, * which is primary source of service in payroll matters. * Typically, this would be customer's primary Accounting company. */ export declare class PartnerService { private sessionService; private uiHelpers; /** * For NG-dependency injection. * @ignore */ static $inject: string[]; /** Skin that is currently in use as a temporary override (for preview purposes) or null if default skin is used. */ overrideSkin: string; /** Partner id that is currently in use as a temporary override (for preview purposes) or null if real id used. */ overridePartnerId: string; /** * Creates a new instance of the PartnerService with dependency injection. */ constructor(sessionService: SessionService, uiHelpers: UiHelpers); /** * Shows a dialog for brand selection. * The result may be "ok" for selected brand or "set-default" for reset to original brand. */ showBrandSelection(): Promise>; /** * Shows a dialog for switching the CSS. */ showSwitchCss(): void; /** * Temporary method only used in development * Shows a dialog for switching the CSS. */ showSwitchCssDev(): void; } /** Defines how the primary partner services the customer TODO: To be designed, see G:\My Drive\Tech\Phase 7\Settings\Palvelumallit.pptx */ 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. */ 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; } /** * Renders a Payment -button or Payment Channel selection dropdown or both for the Calculation or Payroll * @example * ```html * * ``` */ export declare class PayButton extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * The current business item that is being paid: Either Calculation or PayrollDetails. * Currently only supports direct reference. May later support 'url' etc. like CRUD controllers. */ model: string; /** Expression for ng-disabled of the input. */ disabled: string; /** * Additional class / classes for button. Can also be used to override default btn-primary class styles. * (i.e. ) */ buttonClass: string; /** * Text for the payment button. * This is typically customized in custom payment scenarios. */ label: string; /** Mode is either "pay-button" (default), "channel-select", "button-and-channel" or "button-and-channel-horizontal" */ mode: string; /** Called when the payment channel has been changed. */ onPaymentChannelChange: string; }; /** * Uses the PaymentController * This is on purpose not typed. This is because we want the injection to be active for possible customer * specific overrides. */ controller: string; /** The default template for the component. */ defaultTemplate: string; } /** * Shows a wizard for creating a pay certificate for a worker. * @example * ```html * * ``` */ export declare class PayCertificate extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the PayCertificateController */ controller: typeof PayCertificateController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides methods for generating pay certificates. */ export declare class PayCertificateController extends WizardController { private reports; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Worker for the report */ worker: ApiListItem; /** Selected workers */ selectedWorkers: ApiListItem[]; /** Period calculations */ periodCalculations: ApiListItem[]; /** Validation for the report. */ validation: ApiValidation; /** Pay certificate wizard configuration */ wizardSteps: WizardStep[]; constructor($scope: angular_2.IScope, wizardService: WizardService, reports: Reports); /** * Initialization of the controller */ $onInit(): void; /** Returns true if goNext is enabled */ get canGoNext(): boolean; /** * Navigates to the next step if possible */ goNext(): void; /** Selects the worker and advances the workflow */ selectWorker(worker: ApiListItem, isSelected: boolean): void; /** Selects calculations from the period */ selectCalculations(items: ApiListItem[], weeks: number): void; /** Selects calculations from the period */ unselectCalculations(): void; /** * Returns the url for downloading pdf. * @param inline If true will open the pdf. The default is false: download as attachment. * @returns URL for downloading the report. */ getDownloadPdfUrl(inline?: boolean): string; /** * Validates the report server side. */ validate(): void; /** * Start new wizard */ startNew(): void; } /** PaymentChannel enumeration */ declare enum PaymentChannel { Undefined = "undefined", Test = "test", ZeroPayment = "zeroPayment", External = "external", PalkkausManual = "palkkausManual", PalkkausWS = "palkkausWS", PalkkausPersonal = "palkkausPersonal", PalkkausInvoices = "palkkausInvoices", PalkkausPSD = "palkkausPSD", 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", TalenomManual = "talenomManual", Hausvise = "hausvise" } declare type PaymentChannelConfig = { /** Optional function that returns an action for handling multiple selected invoices. */ multiSelectAction?: () => { text: string; onClick: () => void; }; /** Optional function that returns an array of actions for handling individual invoice items. */ rowActions?: (item: InvoiceListItem) => { text: string; onClick: (invoice: InvoiceListItem) => Promise; }[]; groupingFunction: (items: InvoiceListItem[]) => GroupedItem[]; rowGroupActions?: (group: GroupedItem) => { text: string; onClick: (group: GroupedItem) => Promise; }[]; hasExternalSystemMessagesEnabled: boolean; }; /** * Provides access for a payment channel to access invoices * that were sent to that channel and also the calculations etc. related to those invoices. * Only a Partner with registered Payment Channel can use this Controller. * Please contact Palkkaus.fi support for more information. */ export declare class PaymentChannelController extends ApiCrudObjectController { private ajax; private sessionService; private $scope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Status notification data for UI binding to update status. */ statusData: InvoiceStatusNotification; private _channel; private _initialOwner; private unread; constructor(ajax: AjaxNg1, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, $scope: angular_2.IScope); /** * Initialization code. */ $onInit(): void; /** Name/key of the channel on which the controller operates. */ get channel(): PaymentChannel; set channel(value: PaymentChannel); /** Gets the full items for unread objects. */ get unreadInvoices(): Invoice[]; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Returns content url for the invoice. */ getContentUrl(id: string, inline?: boolean): string; /** * Updates the status of the invoice. * @param data Status data. If not set, uses the statusData property of the controller. */ updateStatus(data?: InvoiceStatusNotification): Promise; /** Resets the status data according to current Invoice. */ resetStatusData(): void; /** Gets and avatar image for a payment channel */ getChannelAvatar(): Avatar_2 | undefined; /** Data reader for selected items. */ selectionDataReader: { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; /** Optional label for data export */ exportLabel: string; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** * Data reader for one item. * TODO: Should add interface for the reader. */ getItemDataReader: (item: { /** List item id */ id: string; /** List item owner */ owner: string; }) => { /** Function to read data into given array */ read: (arr: Invoice[], message: string) => Promise; /** Optional label for data export */ exportLabel: null; /** Indicates if the export is not possible */ disabled: () => boolean; }; /** Unselect all */ unselectAll(): void; /** Select all */ selectAll(): void; /** * Updates the invoice. Only valid in the test environment. */ save(): Promise; private get paymentChannelApi(); } /** * Shows a print-like preview for an invoice. * @example * ```html * * ``` */ export declare class PaymentChannelInvoicePreview extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the PaymentChannelController */ controller: typeof PaymentChannelController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows and modifies Payment Settings related to Payment Channels * @example * ```html * * ``` */ export declare class PaymentChannelSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the AccountController */ controller: typeof PaymentChannelSettingsController; /** Default template is the view */ defaultTemplate: string; } /** Channel-specific payment settings */ declare interface PaymentChannelSettings_2 { /** 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; } /** * Handles user interfaces for specifying settings for Payment Channels (and other payment related settings). */ export declare class PaymentChannelSettingsController implements angular.IController { private settingsService; private uiHelpers; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private lastPaymentChannelWindow; private _siteChannels; constructor(settingsService: SettingsService, uiHelpers: UiHelpers, sessionService: SessionService); /** * Controller initializations */ $onInit: () => void; /** * Gets the current settings object as soon as it is loaded. * Note that this is null until the settings have been loaded from server. */ get current(): CompanyAccountSettings; /** * If the channels are set site specific (e.g. custom sites), the settings cannot be saved. * Site specific changes are done to session, and exposed by InvoicesService */ get isReadOnly(): boolean; /** Returns true, if the settings are site specific. */ get isSiteSpecific(): boolean; /** * Gets the payment channel. * @param type Type of the channel to list: * * - enabled: Enabled channels * - available: Available channels that can be enabled (have not yet been enabled). * - unavailable: Unavailable channels (cannot be enabled) * - all: Really all channels, even the technical ones that cannot be enabled. */ getPaymentChannels(type: "all" | "available" | "enabled" | "unavailable"): PaymentChannelSettings_2[]; /** Gets the visual representation and language versioned UI texts of the payment channel */ getAvatar(channel: PaymentChannel): Avatar_2; /** Gets the default channel. */ get defaultChannel(): PaymentChannel | null | undefined; /** Opens the channel setup dialog in a new window. */ openChannelSetupDialog(channel: PaymentChannel): void; } /** * Contains functionality for executing payments for payrolls or calculations. */ export declare class PaymentController implements angular_2.IController { private invoicesService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * The current business item that is being paid: Either Calculation or PayrollDetails. * Currently only supports direct reference. May later support 'url' etc. like CRUD controllers. */ model: Calculation | PayrollDetails_2; /** Button text set from the element */ label: string; /** Mode is either "pay-button" (default), "channel-select" "button-and-channel" or "button-and-channel-horizontal" */ mode: "pay-button" | "channel-select" | "button-and-channel" | "button-and-channel-horizontal"; /** * Function that is called when the payment channel has been chagned * Function has the following locals: * paymentChannel: the selected payment channel. * businessObject: the current business object which has been changed. */ onPaymentChannelChange: (params: { /** Selected payment channel */ paymentChannel: PaymentChannel; /** The current business object which has been changed. */ businessObject: Calculation | PayrollDetails_2; }) => void; constructor(invoicesService: InvoicesService); /** * Initializes the controller */ $onInit(): void; /** * Text for the payment button * This is typically customized in custom payment scenarios. */ getPaymentButtonText(): string; /** * Shows the payment process first page in a dialog (the invoice create process). */ goToInvoices(): void; /** Returns current business object */ get businessObject(): Calculation | PayrollDetails_2; /** * Returns true if there is a selected channel for the business object. */ get isChannelDefined(): boolean; /** Gets the current channel avatar. */ get currentChannel(): Avatar_2; /** Sets the payment channel and starts recalculation. */ setPaymentChannel(newChannel: PaymentChannel): void; /** Gets the enabled channels. */ get allChannels(): Avatar_2[]; private getCurrentChannel; } /** * Overall settings needed for starting salary payment. * @example * ```html * * ``` */ export declare class PaymentSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Array of section ids to show * By default: ['pensionContracts','insuranceContracts','incomesRegister'] * All options: * 'pensionContracts': Pension related settings * 'insuranceContracts' : Insureance contract related settings * 'incomesRegister': Tax reporting related settings * 'eInvoice': EInvoice related settings * 'sepa' : Sepa payments related settings * 'taxAndSocialSecuritySelfHandling': Settings for tax payments * 'pensionSelfHandling': Settings for pension payments * 'workerSelfHandling': Settings for net salary payments * 'unemploymentSelfHandling' Settings for unemployment payments */ sections: string; /** Sets the isReadOnlyForced status. */ isReadOnlyForced: string; }; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** Payment related settings. */ declare interface PaymentSettings_2 { /** 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_2[] | null; } /** 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. */ 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; } /** * AI payroll assistant functionality. */ export declare class Payroll4AssistantController implements angular_2.IController { private $timeout; private employments; private uiHelpers; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * The current payroll (PayrollDetails) to assist. */ current: PayrollDetails_2; /** Current page */ page: { current: number; total: number; items: CalculationListItem[]; calcs: Calculation[]; originalCalcs: Calculation[]; calcRange: string; totalCalcCount: number; } | undefined; /** Messages */ messages: any[]; /** Loading indicator */ loading: boolean; /** Current message */ content: string; private _openAiAvatar; private openai; private key; constructor($timeout: angular_2.ITimeoutService, employments: Employments, uiHelpers: UiHelpers, sessionService: SessionService); /** * Initializes the controller */ $onInit(): Promise; /** Company avatar */ get myAvatar(): Avatar_2; /** Open AI avatar */ get openAiAvatar(): Avatar_2; /** Chat */ chatForPayroll(): Promise; /** Chat */ chatForAdvise(): Promise; /** Chat */ chatForReport(): Promise; /** Shows the selected report */ showReport(message: { content: string; }): void; /** * Reads the xls file * @param file Selected file */ readFile(file: File): Promise; /** Modify payroll rows */ private modifyPayroll; private generateInitialMessages; private payrollToRows; } /** * v4 version of the Payrolls CRUD Controller. */ export declare class Payroll4CrudController extends ApiCrudObjectController { private payrollsApi; private calcsApi; private employmentsApi; private invoicesService; private $timeout; private userSettingsService; private sessionService; private taxcardsApi; private uiCrudHelpers; private $rootScope; private $scope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Current calculation ID if one is selected. */ calcId: string | undefined; /** Current calculation if on is selected and loaded. */ calc: Calculation | undefined; /** Original calculation */ originalCalc: Calculation | undefined; /** Current calc list item*/ calcListItem: CalculationListItem | undefined; /** Active tab for single calculation. */ calcTab: string; /** Flags to indicate if the request is in progress */ loaders: any; /** Flag for showing the header dialog */ showHeader: boolean; /** Calculations for the reports. */ reportCalcs: CalculationListItem[]; /** Tab buttons component controller, to programmatically change tabs. */ private tabButtonsCtrl; /** * Action buttons that are visible in the user interface. * Default is "copy", "cancel". If read only is forced neither is included. * TODO: Current implementation is for read-only view only. */ actions: ("none" | "copy" | "pay" | "cancel")[]; /** order field */ orderField: string; /** order direction */ orderReverse: boolean; /** Page size */ pageSize: number; /** List of employments data for the calcs. */ employments: { [key: string]: IApiListItem; }; /** Page size options */ pageSizeOptions: { "10": string; "20": string; "30": string; "40": string; "50": string; }; /** AI assistant */ private _openAiKey; /** Column filter choices that affect the backend query. */ private columnFilters; constructor(payrollsApi: Payrolls4, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, calcsApi: Calculations, employmentsApi: Employments, invoicesService: InvoicesService, $timeout: angular_2.ITimeoutService, userSettingsService: UserSettingsService, sessionService: SessionService, taxcardsApi: Taxcards, uiCrudHelpers: UiCrudHelpers, $rootScope: angular_2.IRootScopeService, $scope: angular_2.IScope); /** * Initialization code. */ $onInit(): void; /** Catched the return of reload to update values. */ reload(): Promise; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Page size */ get pageSizeOption(): string; /** Page size */ set pageSizeOption(value: string); /** Check assistant key */ get hasAssistantKey(): boolean; /** Returns true for AI Demo approval case */ get isAiDemoWaitingApproval(): boolean; /** Returns true for AI Demo approval case */ get isAiDemoEditable(): boolean; /** Shows dummy dialog for AI demo approval */ showAiDemoApproval(): void; /** * Selects and shows a tab in the payroll details view */ selectTab(tab: string): void; /** * Returns true, if the given action button should be shown * @param action One of the action values: See actions field type for supported values. */ showAction(action: string): boolean; /** * If true, the form controls should be read-only (no control at all). */ get isReadOnly(): boolean; /** Returns true if the period of a calculation is different than the period of the Payroll. */ isDateDifferent(calc: CalculationListItem): boolean; /** Save changes to the payroll as well as to changed calculations */ save(options?: { applyEmploymentDefaultRows: boolean; }): Promise; /** Recalculate and save worktimes of all calculations. */ saveWorktimes(): Promise; /** * Calculates the total amount of days for the given period type. * @param calc Calculation to calculate days for. * @param periodType Period type to calculate days for. * @returns Sum of days for the given period type. */ calculatePeriodDays(calc: Calculation, periodType: "absencesDays" | "leavesDays" | "paidAbsencesDays" | "accruedDays"): number; /** * Returns true if the accruals are accumulated. * @param calc Calculation. * @returns Returns true if the accruals are accumulated. */ showAccruals(calc: Calculation): boolean; /** * Creates a copy of a payroll * This is a synchronous method that should basically convert a saved item to a new item. * @param copySource Item (container item) to copy as new. */ copyItem(copySource: PayrollDetails_2): PayrollDetails_2; /** Close the header dialog */ closeHeader(): void; /** * Sets the current calculation ID * @param calcId The ID of the calculation to set. * Set as undefined to hide the current calculation. */ setCalc(calcId: string | undefined): void; private _canvasInfo; /** * Returns true if the canvas should be shown. */ shouldShowCanvas(canvas: "calc" | "header", truly: any): boolean; /** * Advances to next calc. */ goToCalc(previous?: boolean): Promise | undefined; /** * Checks if the current calcs has changes. */ get hasCalcChange(): boolean; /** * Checks if the current employment has changes. */ get hasEmploymentChange(): boolean; /** * Toggles the current calculation ID * @param calcId The ID of the calculation to set. */ toggleCalc(calcId: string | undefined): void; /** * Saves the calculation and reloads the payroll. */ saveCalc(calcToSave: Calculation, applyWorktime?: boolean, applyEmploymentDefaultRows?: boolean): Promise; /** * Refreshes the calculation by removing the specified calculation from the current page's * calculations and original calculations, then reloads the data. */ refreshCalc(calc: Calculation): angular_2.IPromise; /** * Refreshes the calculation after a workflow event by: * 1. Fetching the latest version of the calculation from the API * 2. Updating the local calc and originalCalc copies * 3. Triggering a refresh of the calculation in the list * @returns Promise that resolves with the updated PayrollDetails */ refreshAfterWorkflow(): Promise; /** * Adds salary defaults to the current calculation by saving it with the addSalaryDefaults flag. * @returns Promise that resolves with the updated PayrollDetails after saving */ addSalaryDefaultsToCalc(): Promise; /** Saves the employment and updates the calcs rows optionally */ saveEmployment(employment: Employment, updateRows?: boolean): Promise; private _calcs; /** * Gets the list items of the calculations of the current payroll. * HACK: This is temporary dev version => Need to consider different apprroaches for the final version. */ get calcs(): CalculationListItem[] | undefined; /** * Filters the rows based on column header selection. * @param column The name of the column in question. * @param value Filtering value string. */ setColumnFilter(column: string, value?: string): void; /** Fetches and returns all employment list items related to all calcs in payroll. */ getEmployments(): void; private _pages; /** Returns current calc page. */ get page(): { current: number; total: number; items: CalculationListItem[]; calcs: Calculation[]; originalCalcs: Calculation[]; calcRange: string; totalCalcCount: number; } | undefined; /** Set page items. */ setPageItems(): void; /** Returns current calc page. */ getPageCalc(item: CalculationListItem): Calculation | undefined; /** * Saves the calculation and reloads the payroll. */ savePageCalcs(): Promise; /** * Checks if the current page calcs have changes. * Returns the number of changed calcs. */ get numOfChangedPageCalcs(): number; /** Gets calculation validity from the calc table entry */ getCalcValidity(row: CalculationListItem): ApiListItemValidation; /** * Advances to next page. */ goToPage(previous?: boolean): Promise | undefined; /** * Opens a list of workers in to a dialog window. * Creates a new calculation for the selected worker and current payroll. */ addEmployments(): void; /** * Opens the list of calculations into a dialog window for selection and then adds them to payroll * @param category Either "paid": Read-only, a copy is added ... or "draft": Editable, moved with status changed. * @param isMerge If true, the operation merges the calculations to the current payroll. * @param removeAllRows If true, the merge operation removes all the rows from the calculation. * @param applyEmploymentDefaultRows If true, the merge operation adds the employment default rows to the calculations. */ addCalcs(category?: "paid" | "shared" | "draft", isMerge?: boolean, removeAllRows?: boolean, applyEmploymentDefaultRows?: boolean): void; /** * Deletes the calculation * @param unlink If true, will not delete the actual calculation, but instead unlinks it as a separate calculation outside this payroll. */ deleteCalc(unlink?: boolean): void; /** * Opens a list of payrolls for merging the payroll calculations to the current payroll. * @param removeAllRows If true, the operation removes all the rows from the calculation. * @param applyEmploymentDefaultRows If true, the operation applies the employment default rows to the new calculations. */ mergePayroll(removeAllRows?: boolean, applyEmploymentDefaultRows?: boolean): Promise; /** * Shows a confirm dialog if payroll has any calculations. * Returns true if a user clicks OK -button. Otherwise (cancel or close) returns false. * @returns True if the user confirmed the operation. */ importEmploymentDataAll(): Promise; /** * Adds salary defaults to all calculations in the current payroll. * Shows a confirmation dialog before proceeding. * If there are no calculations in the payroll, shows an alert and returns false. * Otherwise shows a confirmation dialog: * If user confirms, processes all calculations in batches of 20: * 1. Saves the calculations with salary defaults via payrollsApi * 2. Updates the local calcs list with the returned results * 3. Reloads the payroll data * 4. Returns true on success * If user cancels, returns false * @returns Promise - True if salary defaults were successfully added, false if cancelled or no calculations */ addSalaryDefaultsToAllCalcs(): Promise; /** * Show confirm dialog and export employment data from calculation to Employment relation. * If the calculation has unmodified changes, the calculation is saved. * @returns True if the user confirmed the operation. */ exportEmploymentData(): Promise; /** Free reports */ clearReports(): void; /** Refreshses the reports for the payroll. */ refreshReports(): Promise; /** Disable function for the salary date picker. */ isDisabledSalaryDate: (date: any) => boolean; /** Shows the paymentd dialog / the invoices UI. */ showPaymentDialog(): void; /** * Cancels the payment or invoice processing for the current payroll. */ cancelInvoices(): Promise; /** * Gets the user-specific setting (service), stored in the local storage. */ get userSettings(): UserSettingsService; private _info; /** Get calculated header info. */ get info(): { calcCount: { actual: number; original: number; exception: boolean; }; totalGrossSalary: { actual: number; original: number; exception: boolean; }; totalPayment: { actual: number; original: number; exception: boolean; }; }; /** Returns exception style. */ getExceptionStyle(hasException: boolean): { "text-decoration": string; } | { "text-decoration"?: undefined; }; /** Returns true, if a warning should be indicated in a row. */ rowStatusWarning(row: CalculationListItem): boolean; /** Copy current calc */ copyCalc(): Promise; /** Returns true if the curren payroll has cfa payment channel. */ get isCfa(): boolean; /** Pay current calc */ payCalc(): void; /** * Sends a payroll with messaging system and sets * @param $msg The MessageThreadCrudController that is used for creating the message thread. */ sendPayrollMessage($msg: MessageThreadCrudController): Promise; /** * Opens the workflow for the payroll. * @param $msg The MessageThreadCrudController that is used for creating the message thread. */ openWorkflowForpayroll($msg: MessageThreadCrudController): Promise; /** * Gets the message title for the action. */ getMessageTitle(action: string): string; /** * Available actions for the message. * TODO: This could be replaced by enums or it may come from Service model. */ messageActions: InputEnumOption[]; /** * Deletes a linked message: Both the message thread and msg id in this payroll. * @param $msg The MessageThreadCrudController that contains the current message. */ deleteMessage($msg: MessageThreadCrudController): void; /** Show add new taxcard dialog */ showAddNewTaxcard($event: angular_2.IAngularEvent, item: CalculationListItem): Promise; /** Sets the ordering for the rows. */ orderBy(field: string): void; rowsImportParams: { title: string; personalId: string; employmentType: string; payrollId: string; period: { start: string; end: string; daysCount: number; }; }; /** Initializes the UI parameters for the rows import data. */ initRowsImportParams(): void; /** Copies the rows import data to the clipboard. */ copyRowsImportData(): void; /** Ordering filter */ private getOrderBy; private getHeaderChangeInfo; private orderCalcs; } /** * AI assitant for payroll. * @example * ```html * * ``` */ export declare class PayrollAssistant extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Current payroll to assist */ current: string; /** Current page */ page: string; }; /** Uses the PayrollCrudController */ controller: typeof Payroll4AssistantController; /** The default template for the component. */ defaultTemplate: string; } /** Save options for the payroll calculations. */ declare interface PayrollCalculationsSaveOptions { /** If true, the included calculations should be merged into the existing calculations. */ isMerge?: boolean | null; /** Merging option for the rows. */ rowMergeOption?: RowMergeOption | null; /** Source id for the merged rows. Please note that if the RowMergeOption is RemoveImportedRows and the source ID is set, only the rows with the given source ID will be removed, otherwise if the source ID is not set, all rows with any source ID will be removed. */ sourceId?: string | null; /** If true, any calculation should be added with the default rows from the employment. */ applyEmploymentDefaultRows?: boolean | null; /** If true, resolves, recalculates and updates holidays and absences to the given calculations. */ applyWorktime?: boolean | null; } /** * 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 class PayrollCrudController extends ApiCrudObjectController { private payrollsApi; private uiCrudHelpers; private calcsApi; private reportsService; private sessionService; private invoicesService; private calendarEvents; private employmentsApi; private $timeout; private taxcardsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Index of the active tab in the combined edit view. */ activeTab: string; /** Flags to indicate if the request is in progress */ loaders: any; /** * Action buttons that are visible in the user interface. * Default is "copy", "cancel". If read only is forced neither is included. * TODO: Current implementation is for read-only view only. */ actions: ("none" | "copy" | "pay" | "cancel")[]; /** All employment list items related to all calcs in payroll. */ private _employments; /** TODO: Items to refactor before going to production. */ /** Cache for changedCalcCount so that it is called only once within on $digest loop. */ protected changedCalcCountCache: any; /** User interface related properties. */ private calcUiProperties; /** * Reference to the latest calculation result */ private _calcsResult; /** * Reference to empty calculation array. * Prevents infinite $digest iterations, when the reference to empty array does not change. */ private emptyCalcList; /** Available channels */ private _availableChannels; constructor(payrollsApi: Payrolls, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, calcsApi: Calculations, reportsService: ReportsService, sessionService: SessionService, invoicesService: InvoicesService, calendarEvents: CalendarEvents, employmentsApi: Employments, $timeout: angular_2.ITimeoutService, taxcardsApi: Taxcards); /** * Initialization code. */ $onInit(): void; /** Catched the return of reload to update values. */ reload(): Promise; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Returns true, if the given action button should be shown * @param action One of the action values: See actions field type for supported values. */ showAction(action: string): boolean; /** Returns true if any calculations have been added to the Payroll */ get hasCalculations(): boolean; /** Save changes to the payroll as well as to changed calculations */ save(): Promise; /** Recalculate and save worktimes of all calculations. */ recalculateWorktimes(): Promise; /** * Calculates the total amount of days for the given period type. * @param calc Calculation to calculate days for. * @param periodType Period type to calculate days for. * @returns Sum of days for the given period type. */ calculatePeriodDays(calc: Calculation, periodType: "absencesDays" | "leavesDays" | "paidAbsencesDays" | "accruedDays"): number; /** * Returns true if the accruals are accumulated. * @param calc Calculation. * @returns Returns true if the accruals are accumulated. */ showAccruals(calc: Calculation): boolean; /** * Creates a copy of a payroll * This is a synchronous method that should basically convert a saved item to a new item. * @param copySource Item (container item) to copy as new. */ copyItem(copySource: PayrollDetails_2): PayrollDetails_2; /** * Reloads the validations and info for the current item. * These are constructed based on calculations data and if changed, will update the Payroll in storage. */ reloadValidation(): void; /** Gets a validation object for a calculation */ getValidation(calc: Calculation): ApiListItemValidation; /** UI related data and texts about the taxcard. */ getTaxUi(calc: Calculation): TaxcardUiInfo; /** Show add new taxcard dialog */ showAddNewTaxcard(calc: Calculation): Promise; /** * Returns true if the date is overdue (smaller than today). * @param date Date to compare to today. */ isOverdue(date: string): boolean; /** Gets the list of calculations in this payroll object */ get calcs(): Calculation[]; /** Returns the constantly updating info component from the open calculations (without round-trip to server) */ get info(): Payroll03Info; /** Summarized CalculationResult for all calculations in the payroll. */ get calcsResult(): CalculationResult; /** Returns true if there is no net salary payment to worker at all. */ get isCurrentZeroPayment(): boolean; /** Disable function for the salary date picker. */ isDisabledSalaryDate: (date: any) => boolean; /** * Checks if user is in one of the given roles. * @param roles A comma separated list of roles, potentially with exlamation mark */ isInSomeRole(roles: string): boolean; /** Gets the UI properties for a calculation */ getUi(calc: Calculation): { /** Calculation ID */ id: string; /** If true, the calc is in edit mode. */ isInEdit: boolean; /** If true, the calculation is in collabsed mode (not showing the details) */ isCollapsed: boolean; }; /** * Set calculation rows editable */ setRowsEditable(calc: Calculation | "all"): void; /** * Sets a UI property for all calculations. * @param prop Name of the property to set. * @param value New value for the property. */ setUiForAll(prop: "isCollapsed" | "isInEdit", value: boolean): void; /** * Recalculates and saves calculation to the server. * @param calc Calculation to save. * @param noReloadValidation If true, the parent should call reloadValidation(). * @param forceSave If true, changes are saved even when there are no changes. */ commitCalc(calc: Calculation, noReloadValidation?: boolean, forceSave?: boolean): Promise<{ /** Calculation (after save, if saved) */ calc: Calculation; /** True, if the calculation was saved. Unchanged calculations are not saved. */ isSaved: boolean; }>; /** Sets the calculation after round-trip from the server. */ setCalc: (newCalc: Calculation) => { calc: Calculation; isSaved: boolean; }; /** * Reset any modifications to a calculation. * @param calc Calculation that was edited. */ resetCalc(calc: Calculation): void; /** Gets the count of changed calculations. */ get changedCalcCount(): any; /** Returns true if a calculation has changes to its original. */ hasCalcChanges(calc: Calculation): boolean; /** * Commits changes to all calculations that are in edit mode. * @returns A promise with the number of saved (changed) calculations. */ commitAllCalcs(): Promise; /** Resets all calculations to their unsaved state. */ resetAllCalcs(): void; /** * Opens DateRange component in modal dialog. * If daterange is changed asks whether all calculations should be changed to a new period. * Saves changes to server. */ showDateRange(): void; /** * Shows a DateRange edit component for a single calculation. * @param calc Calculation to modify. */ showDateRangeForCalculation(calc: Calculation): void; /** * Shows the calculation in a new dialog. * @param calc Calculation to modify / view in dialog. */ showEditCalcDialog(calc: Calculation, dialog?: "default" | "ir"): Promise; /** * Shows a dialog for editing an existing worker. * @param calc - Calculation that should be edited */ showEditWorkerDialog(calc: Calculation): void; /** * Opens a list of workers in to a dialog window. * Edits the calculation for the selected worker and current payroll. */ showAddWorkerDialog(calc: Calculation): void; /** * Shows a dialog during the check of auto taxcard. */ showRefreshAutoTaxcardDialog(calc: Calculation): void; /** * Shows a confirm dialog if payroll has any calculations. * Returns true if a user clicks OK -button. Otherwise (cancel or close) returns false. * @returns True if the user confirmed the operation. */ importEmploymentDataAll(): Promise; /** * Adds default rows (SalaryDefault) from employment information to calculation. * Also saves the calculation * @param calc The calculation to update. */ importEmploymentData(calc: Calculation): Promise<{ /** Calculation (after save, if saved) */ calc: Calculation; /** True, if the calculation was saved. Unchanged calculations are not saved. */ isSaved: boolean; }>; /** * Show confirm dialog and export employment data from calculation to Employment relation. * If the calculation has unmodified changes, the calculation is saved. * @param calc Calculation that should be exported to Employment. * @returns True if the user confirmed the operation. */ exportEmploymentData(calc: Calculation): Promise; /** * Deletes the calculation * @param calc Calculation to delete * @param unlink If true, will not delete the actual calculation, but instead unlinks it as a separate calculation outside this payroll. */ deleteCalc(calc: Calculation, unlink?: boolean): void; /** * Gets the URL for a payroll pdf. * If report has not been saved (ID is null), returns null. * @returns Url for specified report */ getPdfUrl(): string | null; /** * Shows a report for the payroll calculation using a modal dialog. * @param reportType - Type of report to show * @param calculation - Calculation for the report */ showReport(reportType: calcReportType, calculation: Calculation): void; /** * Opens a list of workers in to a dialog window. * Creates a new calculation for the selected worker and current payroll. */ createNewCalc(): void; /** * Opens the list of calculations into a dialog window for selection and then adds them to payroll * @param category Either "paid": Read-only, a copy is added ... or "draft": Editable, moved with status changed. */ addExistingCalc(category?: "paid" | "draft"): void; /** * Opens a list of payrolls for merging the payroll calculations to the current payroll. * @param removeImportedRows If true, the operation removes all the imported rows, * meaning all the rows in the target Payroll calcs that have a sourceId. */ mergePayroll(removeImportedRows?: boolean): Promise; /** Returns true if the period of a calculation is different than the period of the Payroll. */ isDateDifferent(calc: Calculation): boolean; /** * If true, the form controls should be read-only (no control at all). */ get isReadOnly(): boolean; /** * Exports employment data from calculation to Employment relation. * If the calculation has unmodified changes, the calculation is saved. * @param calc Calculation that should be exported to Employment. */ private exportEmploymentDataNoConfirm; /** * Sends a payroll with messaging system and sets * @param $msg The MessageThreadCrudController that is used for creating the message thread. */ sendPayroll($msg: MessageThreadCrudController): Promise; /** * Gets the message title for the action. * TODO: This could be replaced by enums. */ getTitle(action: string): string; /** * Available actions for the message. * TODO: This could be replaced by enums or it may come from Service model. */ messageActions: InputEnumOption[]; /** * Deletes a linked message: Both the message thread and msg id in this payroll. * @param $msg The MessageThreadCrudController that contains the current message. */ deleteMessage($msg: MessageThreadCrudController): void; /** Shows the paymentd dialog / the invoices UI. */ showPaymentDialog(): void; private setPaymentChannel; /** * Sends the payroll from company to PRO. * @param message Message to the accountant */ sendToPro(message: string): void; /** * Cancels the payment or invoice processing for the current payroll. */ cancel(): Promise; /** Fetches and returns all employment list items related to all calcs in payroll. */ get employments(): { [key: string]: IApiListItem; }; } /** Payroll specific business data for index. */ 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; /** The requested salary date. */ inputSalaryDate?: string | null; /** Defines the re-setting of the salary date in the calculation re-calculation. */ salaryDateKind?: SalaryDateKind | null; } /** * EXPERIMENTAL new version of the Payroll Details component. * 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. * Payroll can also be started from scratch either by just writing salaries from * e.g. an e-mail or by uploading an Excel sheet. * @example * ```html * * ``` */ export declare class PayrollDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** The action buttons shown by the component */ actions: string; /** Currently selected tab in the Payroll */ payrollDetailsCurrentTab: string; /** Custom default tab. */ defaultTab: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the PayrollCrudController */ controller: typeof Payroll4CrudController; /** The default template for the component. */ defaultTemplate: string; } /** 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. */ declare interface PayrollDetails_2 { /** 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; /** 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; } /** * EXPERIMENTAL new version of the Payroll Details component. * 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. * Payroll can also be started from scratch either by just writing salaries from * e.g. an e-mail or by uploading an Excel sheet. * @example * ```html * * ``` */ export declare class PayrollDetailsList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** * Option to hide New payroll button. * Set this true if the site has action buttons configured elsewhere. */ hideButton: string; /** * Mode of the payroll. Supports "service" or default. * In "service" mode the payroll has less funtionality and payment is disabled. */ mode: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ }; /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ transclude: { header: string; }; /** Uses the PayrollCrudController */ controller: typeof Payroll4CrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Shows a list of calculations * @example * ```html * * ``` */ export declare class PayrollDetailsSelectList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Filters list by given field:value */ filter: string; /** Max count of calculations to show in the list. */ limitTo: string; /** Status category for the list. Possible categories: draft, paid. Default is paid */ category: string; /** * List of statuses to include in the list. * WARNING: This may be depricated in v03: Use category and/or $filter instead. */ statusList: string; /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selections (single and multi). Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items. * @example */ onListSelect: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Type of the view. Currently supports "default", "panel" and "select" */ mode: string; /** OData query options */ options: string; /** URL to the OData service. */ url: string; /** Data passed from the parent to the component / view */ data: string; /** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */ readOnly: string; /** * CRUD controller that implements Delete and potentially other methods about the object. * If you wish to use this in the view use "as $controllerName" syntax * @example * */ crudController: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * 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. * Payroll can also be started from scratch either by just writing salaries from * e.g. an e-mail or by uploading an Excel sheet. * @example * ```html * * ``` */ export declare class PayrollEdit extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** The action buttons shown by the component */ actions: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the PayrollCrudController */ controller: typeof PayrollCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Input that user defines about the Payroll */ 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_2 | 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; } /** * 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. * Payroll can also be started from scratch either by just writing salaries from * e.g. an e-mail or by uploading an Excel sheet. * @example * ```html * * ``` */ export declare class PayrollList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** * Option to hide New payroll button. * Set this true if the site has action buttons configured elsewhere. */ hideButton: string; /** * Mode of the payroll. Supports "service" or default. * In "service" mode the payroll has less funtionality and payment is disabled. */ mode: string; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** * Header is mainly meant for buttons (Usually at least "Add new"). * These are positioned to the right side of the table header (thead). */ transclude: { header: string; }; /** Uses the PayrollCrudController */ controller: typeof PayrollCrudController; /** The default template for the component. */ defaultTemplate: string; } /** 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** * Payroll logic that is independent from UI log (AngularJS). * TODO: Move to @salaxy/core */ export declare class PayrollLogic { /** * Gets the Payroll03Info object based on current data (without going to server). * @param payroll Payroll object, where info may be outdated. * @param calcs Calculations that may be loaded from the server. */ static getInfo(payroll: PayrollDetails_2, calcs: Calculation[]): Payroll03Info; /** * Returns true if there is no net salary payment to worker at all. * @param calcs - Calculation objects */ static isZeroPayment(calcs: Calculation[]): boolean; } /** * Provides CRUD access for authenticated user to access a his/her own PayrollDetails objects */ 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_2): Promise; /** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */ getBlank(): PayrollDetails_2; /** 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_2): 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_2, 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_2, 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_2, 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_2, 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!! */ 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_2, options?: { applyEmploymentDefaultRows: boolean; } | undefined): Promise; /** Client-side (synchronous) method for getting a new Payroll object as bases for UI binding. */ getBlank(): PayrollDetails_2; /** * 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. * @param applyEmploymentDefaultRows If true, adds the employment default rows to the given calculations. * @param removeAllRows If true, removes all rows from the calculation before applying employment defaults. * @returns Added or updated calculations as list items. */ saveCalculations(id: string, calcsOrIds: Calculation[], applyWorktime?: boolean, applyEmploymentDefaultRows?: boolean, removeAllRows?: 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. * @param applyEmploymentDefaultRows If true, adds the employment default rows to the given calculations. * @param removeAllRows If true, removes all rows from the calculation before applying employment defaults. * @returns Added or updated calculations as list items. */ saveCalculations(id: string, calcsOrIds: string[], applyWorktime?: boolean, applyEmploymentDefaultRows?: boolean, removeAllRows?: 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 removeAllRows If true, removes all rows 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[], removeAllRows?: 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; } /** * Shows a list of calculations * @example * ```html * * ``` */ export declare class PayrollSelectList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Filters list by given field:value */ filter: string; /** Max count of calculations to show in the list. */ limitTo: string; /** Status category for the list. Possible categories: draft, paid. Default is paid */ category: string; /** * List of statuses to include in the list. * WARNING: This may be depricated in v03: Use category and/or $filter instead. */ statusList: string; /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selections (single and multi). Not when there is a link to details view in a link list. * Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items. * @example */ onListSelect: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Type of the view. Currently supports "default", "panel" and "select" */ mode: string; /** OData query options */ options: string; /** URL to the OData service. */ url: string; /** Data passed from the parent to the component / view */ data: string; /** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */ readOnly: string; /** * CRUD controller that implements Delete and potentially other methods about the object. * If you wish to use this in the view use "as $controllerName" syntax * @example * */ crudController: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** PayrollStatus enumeration */ declare enum PayrollStatus { Draft = "draft", PaymentStarted = "paymentStarted", PaymentSucceeded = "paymentSucceeded", PaymentCanceled = "paymentCanceled", PaymentError = "paymentError", PaymentAllowed = "paymentAllowed", WaitingApproval = "waitingApproval", WaitingPartnerApproval = "waitingPartnerApproval", Handled = "handled", Template = "template" } /** Report for containing all the result data and rules for the pay stats calculation. */ declare interface PayStatsCalculationReportData { /** Detailed calculation data with rows on which the pay stats calculation is based. */ results?: PayStatsCalculationReportDataResult[] | null; } /** Detailed calculation data with rows on which the pay stats calculation is based. */ declare interface PayStatsCalculationReportDataCalc { /** 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; /** Total salary in the calculation which is calculated into the pay stats type. */ salary?: number | null; /** Total hours in the calculation which is calculated into the pay stats type. */ workingTime?: number | null; /** Detailed row data on which the pay stats calculation is based. */ rows?: PayStatsCalculationReportDataCalcRow[] | null; } /** Detailed row data on which the pay stats calculation is based. */ declare interface PayStatsCalculationReportDataCalcRow { /** 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. */ workingTimeType?: string | null; /** Total salary which is calculated into the pay stats type. */ salary?: number | null; /** Total working time which is calculated into the pay stats type. */ workingTime?: number | null; } /** Report for containing all the result data and rules for the pay stats calculation. */ declare interface PayStatsCalculationReportDataResult { /** Detailed calculation data with rows on which the pay statistics calculation is based. */ calculations?: PayStatsCalculationReportDataCalc[] | null; /** Settings for the type of the pay statistics. */ type?: PayStatsTypeDefinition | null; /** Start date (included) of the period */ start?: string | null; /** End date (included) of the period. */ end?: string | null; /** Total salary in the calculation which is calculated into the pay statistics type. */ salary?: number | null; /** Total working time in the calculation which is calculated into the pay statistics type. */ workingTime?: number | null; /** Total result of the pay statistics calculation, e.g. average hourly pay for the period. */ result?: number | null; /** Last time the result was created/updated. */ updatedAt?: string | null; } /** PayStatsKind enumeration */ declare enum PayStatsKind { Undefined = "undefined", AverageHourlyPay = "averageHourlyPay", Script = "script" } /** PayStatsPeriodLength enumeration */ declare enum PayStatsPeriodLength { Undefined = "undefined", Year = "year", HalfYear = "halfYear", Quarter = "quarter", Month = "month", LastPayPeriod = "lastPayPeriod", Other = "other" } /** * Shows pay statistics report for the employment. * @example * ```html * * ``` */ export declare class PayStatsReportQuery extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Optional employment id if not given in url */ employmentId: string; }; /** Uses the PayStatsReportQueryController */ controller: typeof PayStatsReportQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality for building ad hoc holiday pay reports. */ export declare class PayStatsReportQueryController implements angular_2.IController { private reportsApi; private uiHelpers; private $routeParams; private $compile; private $scope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Raw report from api */ data: Array<{ type: PayStatsTypeDefinition; results: PayStatsCalculationReportDataResult[]; }>; /** Current employment id */ employmentId: string; /** Flag for indicating query in progress. */ isQuerying: boolean; /** Report configuration settings. */ reportInclude: any; reportOptions: any; reportData: any; constructor(reportsApi: Reports, uiHelpers: UiHelpers, $routeParams: angular_2.route.IRouteParamsService, $compile: angular_2.ICompileService, $scope: angular_2.IScope); /** Controller initialization */ $onInit(): void; /** Queries the report data. */ query(): void; /** * Generates column headers for the table. * @returns array of headers and their settings. */ private generateHeaders; /** * Formats value with a badge component (InputPayStatsRowType.ts). * @param cell Cell data. * @param rowVal Row value type name for AngularJS component. * @returns DOM Node for Tabulator. */ private getBadgeFormatter; /** * Generates report data for multiple nested rows. * @param data Report data. * @returns Report data in nested rows for Tabulator. */ private generateReportData; /** Returns label for the ir row. */ getRowLabel(irRow: IrRow): string; /** Returns label for type or result. */ getTypeLabel(type: PayStatsTypeDefinition): string; } /** * Settings for pay statistics calculations. * @example * ```html * * ``` */ export declare class PayStatsSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** Settings for the calculation of pay statistics. */ declare interface PayStatsSettings_2 { /** If true, the service model is not applied to this feature. */ denyServiceModel?: boolean | null; /** Settings for different types of pay statistics. */ types?: PayStatsTypeDefinition[] | null; } /** Settings for different types of pay statistics. */ declare interface PayStatsTypeDefinition { /** Id for the pay statistics type. */ id?: string | null; /** Description for the pay statistics type, e.g. "Average hourly pay for the period". */ description?: string | null; /** The pay statistics type. */ kind?: PayStatsKind | null; /** Applicable collective agreement */ cbaCode?: number | null; /** Employee group. */ employeeGroup?: string | null; /** Flag for disabling the definition. */ disabled?: boolean | null; /** If specified, defines the start date for the settings. If in the future, the the settings is inactive. Null (default) means the settings is valid indefinetely from the past. */ startDate?: string | null; /** If specified, defines the end date for the settings. Date is inclusive meaning that if EndDate is 31.12., settings is valid until end-of-year: Valid on 31.12. and invalid 1.1. If in the past, the the settings is inactive. Null (default) means the settings is valid indefinetely to future. */ endDate?: string | null; /** Period type for the pay statistics calculation. Please note that currently this is on purpose a different enum than the {Palkkaus.Model.Common.PeriodType} which is used for retrieving accounting reports etc. */ periodLength?: PayStatsPeriodLength | null; /** Date kind for the period. */ periodDateKind?: PeriodDateKind | null; /** RowTypes, WageTypes or IncomeTypes that are used in the statistics calculation. */ workingTimeTypes?: string[] | null; /** Minimum working time required for the statistics calculation. */ minWorkingTime?: number | null; /** RowTypes, WageTypes or IncomeTypes that are used in the statistics calculation and which accumulate salary. */ salaryTypes?: string[] | null; /** Script for the pay statistics calculation. Used if {Palkkaus.Model.Settings.PayStats.PayStatsTypeDefinition.Kind} is {Palkkaus.Model.Settings.PayStats.PayStatsKind.Script}. */ script?: string | null; } /** PensionCalculation enumeration */ 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 */ 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. */ 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; } 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. */ 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 */ declare enum PensionRule { Default = "default", MonthlyLowerLimit = "monthlyLowerLimit" } /** PeriodDateKind enumeration */ declare enum PeriodDateKind { PaidAtDate = "paidAtDate", SalaryDate = "salaryDate", WorkDate = "workDate", WorkDateStart = "workDateStart", WorkDateEnd = "workDateEnd" } /** PeriodType enumeration */ declare enum PeriodType { Month = "month", Quarter = "quarter", Year = "year", Custom = "custom" } /** An account for a Person - can be both Employer and Worker */ 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_2 | 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; } /** Controller for editing contact, avatar etc. information on Person accounts (Worker or Household). */ export declare class PersonAccountController implements angular_2.IController { private accounts; private sessionService; private uploadService; private uiHelpers; private $location; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Yearly sidecosts */ sideCosts: YearlySideCosts | null | undefined; /** Current person account being edited. */ current: PersonAccount; /** Current tab in initialization. If not set, will be fetched from url hash. */ private _currentTab; /** Constructor for dependency injection */ constructor(accounts: Accounts, sessionService: SessionService, uploadService: UploadService, uiHelpers: UiHelpers, $location: angular_2.ILocationService); /** * Implement IController */ $onInit(): void; /** * Switches the current web site usage role between household and worker. * TODO: This functionality will be removed * @param role - household or worker. * @returns A Promise with result data (new role as string) */ switchRole(role: "worker" | "household"): Promise<"household" | "worker">; /** Updates the person */ saveCurrent: () => Promise; /** Gets the language of the user (person) */ getAccountLanguage(): Language | null | undefined; /** * Uploads avatar image file to the server. * @param avatar - selected file */ uploadAvatarImage(avatar: any): void; /** Called when avatar changes */ emailForAvatarChanged(): void; /** Called when avatar changes */ typeForAvatarChanged(): void; /** * For the tab UI control, returns the current tab, if defined in the path * or set explicitly. Defaults to "default". */ get currentTab(): "default" | "contact" | "avatar" | "insurance" | "identity" | "taxcard"; set currentTab(value: "default" | "contact" | "avatar" | "insurance" | "identity" | "taxcard"); /** * Adds/updates the workflow event for the current using API. * @param wfEvent - Workflow event to add/update. * @returns - Reloaded item. */ saveWorkflowEvent(wfEvent: WorkflowEvent): Promise; /** * Deletes the given event or all events with given type using API. * @param wfIdOrType Id or type of the workflow event. * @returns - Reloaded item. */ deleteWorkflowEvent(wfIdOrType: string): Promise; /** * Gets a single workflow event for the item. * @param wfId Id the workflow event. * @returns - Workflow event. */ getWorkflowEvent(wfId: string): Promise; } /** Sitemap for the Palkkaus.fi personal web site (Household and Worker) */ export declare class PersonalWebSiteMap { /** The sitemap */ static sitemap: SitemapNode[]; } 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 */ 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; } /** Customer specific preferences. */ declare interface Preference { /** Name for the configuration. */ name?: string | null; /** Type of the configuration data. It can be a value type or object type. */ dataType?: string | null; /** Configuration data. */ data?: any | null; /** Last time the preference was created/updated. */ updatedAt?: string | null; /** User who last updated the configuration. */ updatedBy?: string | null; } /** PricingModel enumeration */ declare enum PricingModel { PalkkausFee = "palkkausFee", NoFee = "noFee", FixedFee = "fixedFee" } /** Defines the pricing partner, service model and pricing model. */ 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; } /** Settings related to the primary partner, service model and settings */ 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; } /** * 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. */ declare type progressNotification = (message?: string, index?: number, count?: number, data?: TData) => void; /** * Polyfill which replaces ES6 promises with $q. * This is required, for example if Promise.resolve -methods are used. * They are not correctly digested using ES6 promises only. */ export declare class PromisePolyfill { /** * For NG-dependency injection * @ignore */ /** Dependencies */ static $inject: string[]; constructor($q: angular_2.IQService, $window: angular_2.IWindowService); } /** * All settings * @example * ```html * * ``` */ export declare class ProSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the CompanySettingsController */ controller: typeof CompanySettingsController; /** Default template is the view */ defaultTemplate: string; } /** 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; } /** Record specific business data for index. */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** * UI for records of the entity . * @example * ```html * * ``` */ export declare class Records extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Binding to entity type */ entityType: string; /** Expression for the api controller . */ apiCtrl: string; /** Binding to read only state */ readOnly: string; }; /** Uses the WorkerRecordsController */ controller: typeof RecordsController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides CRUD access to records. */ declare class Records_2 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 | undefined): 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 | undefined): string; } /** * Base controller for records management. */ export declare class RecordsController implements angular_2.IController { protected api: Records_2; protected uiHelpers: UiHelpers; protected uploadService: UploadService; protected workflowService: WorkflowService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Current records. */ records: Record_2[]; /** Readonly binding */ readOnly: boolean; /** API CRUD controller for the workflow object.*/ apiCtrl: ApiCrudObjectController; /** Entity type */ entityType: string; /** Loding indicator */ isLoading: boolean; private _wfType; private _events; constructor(api: Records_2, uiHelpers: UiHelpers, uploadService: UploadService, workflowService: WorkflowService); /** * Loads the records for the entity. */ $onInit(): void; /** * Reloads data */ reload(): void; /** Returns events for the record. */ getEvents(item: Record_2): WorkflowEvent[]; /** Returns single event for the record. */ getSingleEvent(item: Record_2): WorkflowEvent; /** * Shows the edit dialog. * @param item Item to edit or to create. * @param index Current index. -1 for new. */ showEditRecord(item: Record_2, index?: number): void; /** * Deletes one record * @param item Item to delete. * @param index Current index. */ deleteRecord(item: Record_2, index?: number): Promise | undefined; /** Returns file icon for the attachment. */ getAttachmentIcon(attachment: Attachment): string; /** Returns download url for the attachment. */ getAttachmentDownloadUrl(attachment: Attachment): string; /** Returns the upload url for the attachment */ getAttachmentUploadUrl(): string; /** * Uploads the attachments to the server, and adds them to the attchment collection. * @param files The files collection from the upload component * @param attachments The attachment collection for the results. */ private uploadAttachments; private deleteWorkflowEvent; private saveWorkflowEvent; private cleanWorkflowEvents; private get entityId(); private get events(); private modifyArray; } /** 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. */ 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; } /** * FOR TESTING OR DEVELOPMENT USE ONLY - NOT FOR PRODUCTION USE. * ============================================================= * Provides UI logic for viewing and adding new (modifying) 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 ReferenceObjectCrudController extends ApiCrudObjectController { isSaving: boolean; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(api: ReferenceObjects, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; } declare interface ReferenceObjectData { } /** A single event in the collection of events for the reference object. Contains typical row specific data of various types. */ 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. */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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. */ 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; } /** 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; } /** Defines the settings for producing reports: Mainly PDF's but also HTMl previews. */ 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; } /** * Shows a list of reports * @example * ```html * * ``` */ declare class ReportList_2 extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * - report-type: Type of the report (string, see reportType enumeration) that is shown in the list. * Also supports value null/"current" for showing reports defined by reportsService.currentReportType. */ reportType: string; /** * -title * Heading of the list. Supports translation keys. * Default is reportType based enumeration translation. */ heading: string; }; /** Uses the ReportsController */ controller: typeof ReportsController; /** The default template for the component. */ defaultTemplate: string; } export { ReportList_2 as ReportList } /** Report options that would be editable by partner / customer. */ declare interface ReportOptions { /** * HTML template for the print header. * Should add following handlebars tags to inject values into them: * - `{{ 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; /** * HTML template for the print footer. * Should add following handlebars tags to inject values into them: * - `{{ 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; /** Content margins, defaults to none. */ margin?: { /** Top margin. */ top?: string | number; /** Right margin. */ right?: string | number; /** Bottom margin. */ bottom?: string | number; /** Left margin. */ left?: string | number; }; /** * Additional CSS that is used to customize the layout of the report. * @example .salaxy-component div.salaxy-rpt .document { font-size: 15px; } */ css?: string; /** * Print background graphics if such are added to the report using css property above. * @default false */ printBackground?: boolean; /** * Main logo image as embedded SVG or image (HTML). * This should preferably be an SVG or alternatively an image tag with data uri. * @example * * * Red dot */ logo?: string; /** * 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. * @example * * * Red dot */ img2?: string; } /** * Report partials that are available as HTML for developers to create their own * reporting views */ declare type reportPartial = "employer" | "employerPage2" | "worker" | "workerPage2" | "payments"; /** * Provides access to HTML reports on calculations */ 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. * @param createdFrom Optional minimum creation date for the calculation included in the report. * @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, createdFrom?: 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 | null): 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; /** * Returns the calculated pay statistics for the given employment relation. * @param employmentId The employment relation for which to calculate the statistics values. * @returns A Promise with result data containing pay stats calculation report data. */ getPayStatsCalculationReportData(employmentId: string): Promise; /** * Gets a calculation report in PDF format. * @param calculations - The calculations to generate the report for * @param reportType - The type of report to generate. Can be one of: * - "salarySlip" - Salary slip report * - "employerReport" - Employer report * - "paymentReport" - Payment report * - "paymentSummaryReport" - Payment summary report * - "accountingReport" - Accounting report * - "totalsReport" - Totals report * - "rowsReport" - Rows report * - "irRows" - IR rows report * @param employerLang - The language to use for employer-specific content * @param reportLang - The language to use for worker-specific content * @returns Promise resolving to an object containing: * - data: Blob - The PDF report data * - response: any - The full response object */ getCalculationReport(calculations: Calculation[], reportType: calcReportType, employerLang: Language, reportLang: Language): Promise<{ data: Blob; headers: { [key: string]: string; }; }>; } /** * Handles user interaction for fetching, showing and later generating Reports */ export declare class ReportsController implements angular_2.IController { private reportsService; private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Current report type for this controller. Default for the getReports() method. */ reportType: ReportType; /** * When using getReportHtmlById(), the HTML is set here. * Also contains a spinner for loading and sets an alert if there is a problem. */ reportHtml: any; /** * Static instance of getReportTypes() to avoid a $digest problem that occured when calling getReportTypes() directly from the view. * HACK: This may not work in a scenario where Controller is created before the Session. */ types: any; constructor(reportsService: ReportsService, sessionService: SessionService); /** * Implement IController */ $onInit: () => void; /** * Gets a list of reports (metadata only) filtered by a report type. * @param type - Type of report. See type (string enumeration) for possible values. Default is the property reportType. */ getReports(type?: ReportType): Report_2[] | Promise; /** * Gets a list of available report types for the current user. * TODO: This method is still under construction. */ getReportTypes(): any; /** * Gets an HTML report based on Calculation ID, runs it through $sce * and sets it as reportHtml. * @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 - already run through $sce. */ getReportHtmlById(reportType: reportPartial, calculationId: string): Promise; } /** * Methods for viewing and later also generating different reports. */ export declare class ReportsService { private sessionService; private uiHelpers; private reportsApi; private $sce; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Convenience property for navigation controls to set a current report type. * Checked, when getReports is called with null or "current" */ currentReportType: ReportType; /** Cache for reports-by-type as generated on the server */ private reportMetadataCache; /** * Creates a new instance of ReportsService * @param $rootScope - Angular rootscope. * @param sessionService - Session service notifies when the user is known to be authenticated. * @param uiHelpers - Salaxy ui helpers service. * @param reportsApi - The Reports API that is used to communicating with the server. * @param $sce - $sce is a service that provides Strict Contextual Escaping services to AngularJS */ constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, uiHelpers: UiHelpers, reportsApi: Reports, $sce: angular_2.ISCEService); /** * Clear metadata cache. */ refresh(): void; /** * Gets a list of reports (metadata only) filtered by a report type. * @param type - Type of report. See type (string enumeration) for possible values. * Also supports value "current" for showing reports defined by currentReportType. * @returns A Promise with result data ( | Report_2[]; /** * Gets a link URL for a yearly report. This is a full link with token and absolute URL. * @param type - Type of the report must be one of the yearly reports * @param year - Year for the report * @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 * @returns Yearly report URL string */ getYearlyReportUrl(type: ReportType, year: number, id?: string, id2?: string): string; /** * Gets a. URL for a calculation pdf. * If report has not been saved (ID is null), returns null. * @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. * @returns Url for specified report */ getPdfUrlForCalc(reportType: calcReportType, calcId: string, inline?: boolean): string; /** * Gets an URL for pdf report for one or more calculations. * @param type - Type of report * @param ids - Identifiers of the calculations. This method requires that the calculations have been saved. * @param inline - If true, the Content-Disposition header is returned with inline parameter. * @returns Url for specified report */ getPdfUrlForCalcs(type: "salarySlip" | "employerReport" | "paymentReport", ids: string[], inline?: boolean): string; /** * Show a report modal (a preview modal dialog) for a given calculation. * The calculation may not be stored to backend. I.e. this reporting method is available also to * non-authenticated users unlike the more resource intensive methods that generate PDF-files and require CRUD rights. * @param reportType - Type of the report to show. * @param calculation - Calculation to show in the report. * @param view - The default view shown in the UI: "page1" (default), "partial" or "full". * @param preview - If true, adds the preview watermark to the report. */ showReportModalForCalc(reportType: calcReportType, calculation: any, view?: "partial" | "page1" | "full", preview?: boolean): void; /** * 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 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). */ getAccountingReportTableForPeriod(refDate: string, tableType?: AccountingReportTableType, periodType?: PeriodType, endDate?: string): Promise; /** * Experimental: Gets the accounting report based on given set of calculations. * @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. * @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; /** * Gets an HTML report based on Calculation ID and runs it through $sce. * @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 - already run through $sce. */ getReportHtmlById(reportType: reportPartial, calculationId: string): Promise; } /** ReportType enumeration */ 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 */ 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_2 | null; /** Accounting related data for the row. */ accounting?: RowAccounting | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } declare interface ResultRow_2 { employment: EmploymentListItem; data: AccountingHolidayPayDebtReportDataYear; holidayYearReportRow: HolidayYearReportRow; } declare interface ResultRow_3 { employmentId: string; avatar: Avatar_2; workerId: string; calculations: Calculation[]; irCodeIncomeReportRow: IrCodeIncomeReportRow; summaryReportRow: SummaryReportRow; } /** Role enumeration */ declare enum Role { Undefined = "undefined", Accountant = "accountant", TrustedPartner = "trustedPartner", AccountantCandidate = "accountantCandidate", PricingPartner = "pricingPartner", SepaPartner = "sepaPartner", SalaxyPay = "salaxyPay" } /** Helps creating Salaxy standard routing. */ export declare class RouteHelperProvider implements angular_2.IServiceProvider { private $routeProvider; /** * For NG-dependency injection * @ignore */ protected static $inject: string[]; /** The root folder that contains the custom views. Default is "./views" */ customSectionRoot: string; /** * TODO: Consider implementing the IServiceProvider interface */ $get: (string | (($rootScope: any) => string))[]; constructor($routeProvider: angular_2.route.IRouteProvider); /** * Adds a routing section where views are coming by default from custom folder. * @param section Navigation section in routing. * Also used as default for views folder. * @param defaultViews Exceptions to the rule: Individual views / pages that should be mapped * to default views stored in ng1 library under "salaxy-components/pages/". * @param defaultViewsFolder The name of the default views folder if not the same as section. * If not specified, the folder is "salaxy-components/pages/[section]". * If the paths starts with "salaxy-components", "/" or ".", the path is assumed being a full path. * Otherwise the "salaxy-components/pages/" is added before defaultViewsFolder. So typically this can be just a folder / section name (e.g. "calc"). * @param customViewsFolder If specified, this is the path to the custom folder where the views are. * If NOT specified, "[customSectionRoot]/[section]" is used. * If the paths starts with "/" or ".", the path is assumed being a full path. * Otherwise the customSectionRoot (default "./views/") is added before customViewsFolder. So typically this can be just a folder / section name (e.g. "calc"). * @example * RouteHelperProvider.customSection("calc", ["details"]). * // Adds a route as "/calc/:viewName?/:crudItemId*?" where all views are located in "./views/calc/[:viewName].html", * // except "/calc/details/:crudItemId*?", which is mapped to "salaxy-components/pages/calc/details.html" */ customSection(section: string, defaultViews?: string[], defaultViewsFolder?: string, customViewsFolder?: string): RouteHelperProvider; /** * Adds a routing section where views are coming by default from the product ng1 library compiled to "salaxy-components/pages/". * @param section Section for the views, e.g. "calc" for "salaxy-components/pages/calc" * @param customViews Exceptions to the rule: * Individual views that should be mapped to custom folder under customSectionRoot. * @param customViewsFolder The name of the custom views folder if not the same as section. * If the paths starts with "/" or ".", the path is assumed being a full path. * Otherwise the customSectionRoot (default "./views/") is added before customViewsFolder. So typically this can be just a folder / section name (e.g. "calc"). * @param defaultViewsFolder The name of the default views folder if not the same as section. * If not specified, the folder is "salaxy-components/pages/[section]". * If the paths starts with "salaxy-components", "/" or ".", the path is assumed being a full path. * Otherwise the "salaxy-components/pages/" is added before defaultViewsFolder. So typically this can be just a folder / section name (e.g. "calc"). * @example * RouteHelperProvider.defaultSection("calc", ["details"], "ng1/calc"). * // Adds a route as "/calc/:viewName?/:crudItemId*?" where all views are located in "salaxy-components/pages/calc/" folder * // except "/calc/details/:crudItemId*?", which is mapped to "./views/ng1/calc/details.html". */ defaultSection(section: string, customViews?: string[], customViewsFolder?: string, defaultViewsFolder?: string): RouteHelperProvider; /** * Fluid syntax for setting customSectionRoot. * @param customSectionRoot Root folder for the custom views. * You can use null to set the customSection to default "./views", empty string to none. * No trailing dashes i.e. "./views", not "./views/". */ setCustomSectionRoot(customSectionRoot: string | null): RouteHelperProvider; /** * Adds the standard index/home pages: "/", "/index" and "/welcome". * May later contain special pages like standard error etc. * NOTE: If any of the sections already exists, will not add them. * @param customViewsFolder if set, uses the given custom folder. Otherwise, sets the paths from library. */ homeDefault(customViewsFolder?: string): RouteHelperProvider; /** * For backward compatibility only: Use commit() instead. * @deprecated For backward compatibility only: Use commit() instead. */ otherwiseDefault(): void; /** * Equivalent for calling $routeProvider.when(): Adds a new route definition to the $route service. * Call commit() method for these configurations to have an effect. * @param path Route path (matched against $location.path). If $location.path contains redundant trailing slash or is missing one, the route will still match and the $location.path will be updated to add or drop the trailing slash to exactly match the route definition. * * - path can contain named groups starting with a colon: e.g. :name. All characters up to the next slash are matched and stored in $routeParams under the given name when the route matches. * - path can contain named groups starting with a colon and ending with a star: e.g.:name*. All characters are eagerly stored in $routeParams under the given name when the route matches. * - path can contain optional named groups with a question mark: e.g.:name?. * * For example, routes like /color/:color/largecode/:largecode*\/edit will match /color/brown/largecode/code/with/slashes/edit and extract: color: brown and largecode: code/with/slashes. * @param route Mapping information to be assigned to $route.current on route match. * @param section identifies the section for later evaluating whether a certain section has been defined or not: * This is used in adding the deafults at the commit(): If section is found, it is not filled with defaults * E.g. for path "/calc/details" this would be "calc" and "/", it would be "". * Please note that in the "calc" case you would need to make sure all the other "calc section" routes are handled, * typically by calling defaultSection("calc") or customSection("calc") within the router config. */ when(path: string, route: angular_2.route.IRoute, section: string): RouteHelperProvider; /** * Equivalent for calling $routeProvider.otherwise(): * Sets route definition that will be used on route change when no other route definition is matched. * Call commit() method for these configurations to have an effect. * @param params information to be assigned to $route.current. */ otherwise(params: angular_2.route.IRoute | string): RouteHelperProvider; /** * Used in Development and PRO sites to add the Person (Worker/Household) related routes. * Typically, sites that target Person accounts are specialized and will not use this method. */ addPersonRoutes(): RouteHelperProvider; /** * Commits the intermediary routeModel to the AngularJS $routeProvider. * If skipDefault is not set to true, will set the defaults by calling * homeDefault(), defaultSection for each product section and otherwiseDefault * if the corresponding sections have not already been defined. * @param skipDefaults By default, the method first adds all the product-defined * default routes to the routeModel. If true, will not add the default routes. */ commit(skipDefaults?: boolean): void; /** Stores the route definition until Commit is being called. */ routeModel: routeProviderModel; /** * Returns true if the sction is already defined in the route model. * @param section Section for the views, e.g. "calc" for "salaxy-components/pages/calc" */ sectionExists(section: string): boolean; /** * Calls the defaultSection(section), but only if the sectrion has not been defined with custom values. */ addIfNotExists(section: string): boolean; } /** Defines a model that sotres the route until Commit is called to really register the route to Angular. */ export declare interface routeProviderModel { /** Array of when statements that make up the route */ when: { /** Identifies the section as simple string (e.g. 'calc'). */ section: string; /** * Route path (matched against $location.path). If $location.path contains redundant trailing slash or is missing one, the route will still match and the $location.path will be updated to add or drop the trailing slash to exactly match the route definition. * * - path can contain named groups starting with a colon: e.g. :name. All characters up to the next slash are matched and stored in $routeParams under the given name when the route matches. * - path can contain named groups starting with a colon and ending with a star: e.g.:name*. All characters are eagerly stored in $routeParams under the given name when the route matches. * - path can contain optional named groups with a question mark: e.g.:name?. * * For example, routes like /color/:color/largecode/:largecode*\/edit will match /color/brown/largecode/code/with/slashes/edit and extract: color: brown and largecode: code/with/slashes. */ path: string; /** Mapping information to be assigned to $route.current on route match. */ route: angular_2.route.IRoute; }[]; /** The deafult route (otherwise) */ otherwise?: angular_2.route.IRoute | string; /** True if the route has been committed to Angular. */ isCommitted?: boolean; } /** Provides row specific data for accounting (both cost and financial accounting). */ 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; /** Row accounting entries for overriding standard accounting logic. */ entry?: RowAccountingEntry | null; } /** Row accounting entry for overriding standard accounting logic. */ declare interface RowAccountingEntry { /** Debit Account number. If given will override the system resolved debit account number. */ debitAccountNumber?: string | null; /** Credit Account number. If given will override the system resolved credit account number. */ creditAccountNumber?: string | null; } /** RowMergeOption enumeration */ declare enum RowMergeOption { Undefined = "undefined", RemoveAllRows = "removeAllRows", RemoveImportedRows = "removeImportedRows" } /** Extends the UserDefinedRow by adding the configuration: How the row type should behave and and how to show it in the UI. */ declare interface RowTypeDefinition { /** Configuration for the row type. */ config?: CalcRowConfig | 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; /** 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_2 | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** * Interface representing the structure of row type documentation * @interface RowTypeDocumentation */ declare interface RowTypeDocumentation { /** The type identifier for the row */ type: string; /** Optional description of the row type */ description?: string; /** Optional array of sample configurations */ samples?: Array<{ /** Description of the sample */ description: string; /** The specific kind/variant of the sample */ kind: string; /** Code sample */ code: string; }>; } /** Defines a matcher that matches a row type in source system to target system */ declare interface RowTypeMatch { /** * A string or regular expression that matches the row type in source system. */ search: string | RegExp | undefined; /** * 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; } /** * Provides access to the row types including the company specific custom row types. */ export declare class RowTypeService { private settingsService; private session; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** A key that signals when the settings were last updated => Used by downstream caches to refresh. */ timestamp: string; /** Cached version of the CalcRowsLogic */ private _logic?; /** * Creates a new instance of RowTypeService */ constructor(settingsService: SettingsService, session: SessionService); /** * Gets a cached version of CalcRowsLogic with current settings (if available). */ get logic(): CalcRowsLogic; /** Clears the cache and reloads the row types (from settings service singleton, not all the way from the server). */ refresh(): void; /** * If true, the custom row types (currently in settings) have been loaded from the server. */ get isReady(): boolean; /** * Gets a filtered list of row types configs * @param group If specified, filters the configs by group (builtIn, custom). */ getConfigs(group?: "builtIn" | "custom", categories?: CalculationRowCategories[]): CalcRowConfig[]; private listCache; /** Gets a cached list of all configs (even the ones that should typically be hidden from the list by role or because they are obsolete). */ get configs(): CalcRowConfig[]; /** Gets the editble rows collection. */ get allCustomRows(): RowTypeDefinition[]; /** * Gets the configuration for a row: May be built-in or custom row type.. * @param row Row for which to get the configuration. * @returns A configuration if found, otherwise undefined. */ getConfig(row: UserDefinedRow): CalcRowConfig | undefined; /** * Deletes an item in the allCustomRows collection. * This does not yet save the changes or even refresh the cache. */ deleteRow(row: RowTypeDefinition): void; /** Saves the current, potentitally modified set of custom rows. */ save(): Promise; /** * Call this method when a new row is created to apply the default values. */ applyDefaultsToNewRow(row: UserDefinedRow, salaryDate: string): void; private specialKnownRowTypesAtSalaryDate; } /** * Settings editor for Row types (Palkkalajit) * @example * ```html * * ``` */ export declare class RowTypesSettings extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Defines the type of rows editor: "builtIn" for built-in rows, * "custom" for custom rows, "prices" company specific default prices per row type. */ mode: string; /** * Set this property if you want to explicitly set the model. * If undefinded, the component binds to company settings. */ model: string; }; /** Uses the AccountController */ controller: typeof RowTypesSettingsController; /** Default template is the view */ defaultTemplate: string; } /** * Controller for editing the row types in settings (Palkkalajit) */ export declare class RowTypesSettingsController implements angular_2.IController { private rowTypeService; private uiHelpers; private $timeout; private $element; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Set this property if you want to explicitly set the model (currently only Employment). * If undefinded, the component binds to company settings. */ model?: Employment; /** * Defines the type of rows editor: "builtIn" for built-in rows, * "custom" for custom rows, "prices" company specific default prices per row type, * "copy" for rows that should be copied to the calculation. */ mode: "builtIn" | "custom" | "prices" | "copy"; /** If set, filters the rows based on categories (plus rowTypes if set) */ categories: CalculationRowCategory[]; /** Search text that is potentially input by the user. */ searchText: string; private listCache; constructor(rowTypeService: RowTypeService, uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService, $element: JQLite); /** New empty row for databinding when creating a new row. */ newRow: RowTypeDefinition; /** Sets the default values in init. */ $onInit(): void; /** Saves the changes to row types. */ save(): void; /** * Gets the current object: Either the rows collection from settings as soon as it is loaded or an employment relation. */ get current(): RowTypeDefinition[] | Employment | undefined; /** * List of items to edit: In settings or Employment relation. */ get list(): RowTypeDefinition[]; /** * Gets the price rows in the current modeel. */ get pricesList(): RowTypeDefinition[]; /** * Gets the copy rows in the current model. */ get copyRowsList(): RowTypeDefinition[]; /** * Gets the default rows from the current model */ get defaultsList(): RowTypeDefinition[]; /** * Gets the list of company specific rows, always in settings even if the bound model is employment. */ get settingsList(): RowTypeDefinition[]; /** * Gets the configuration object for a row definition. * @param row Row for which the configuration is fetched. * @returns The configuration for the row. */ getConfig(row: RowTypeDefinition): CalcRowConfig; /** Creating of a new item. */ getBlank(): RowTypeDefinition; /** * Gets the search as cached item: Can be bound to ng-repeat. * @param searchText The search text. If null or empty, returns the full list. */ getCachedSearch(searchText: string): InputEnumOption[]; /** * Searches the row types. * @param searchText The search text. If null or empty, returns the full list. */ search(searchText: string, group: "builtIn" | "custom" | undefined): InputEnumOption[]; /** * Opens an edit dialog for price or default row => Opening just a normal dialog. * @param row Row to edit: This should be a price row or default row: Not a custom row. */ showEdit(row: RowTypeDefinition): void; /** * Deletes a row. This does not save changes. * @param row Row to delete. */ delete(row: RowTypeDefinition): void; /** Copies the given text to clipboard. */ copyToClipboard(text: string): void; /** * Commits the new row in newRow property and adds it to the rows list. * Updates usecase and sets the newRow as new blank row. */ commitNewRow(source: CalculationRowSource | "price" | "copy", showEdit?: boolean): RowTypeDefinition; /** * Shows a dialog for editing the row-type or that shows information about the row-type if read-only. * @param rowType The row type to show information about. */ showRowTypeDetails(rowType: InputEnumOption): void; private getDialogLogic; /** * Creates a new custom row type. * @param rowType Base row type for the custom type. */ createCustomRowType(rowType: InputEnumOption): Promise; /** * Deletes a custom row type. * @param rowType The row type to delete. */ deleteCustomRowType(rowType: InputEnumOption): void; /** * Returns placeholder text for row * NOTE: Copied from CalcRows2019Controller - This will be refactored into a logic class! * @param row used row * @returns row message as string */ getMessagePlaceholderText(row: UserDefinedRow): string; /** * Gets the list of row types. Method filters based on rowTypes and categories, * the texts are language versioned. */ private getRowTypes; } /** * 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. */ 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_2; /** Salary for foreclosure is salaryAfterTax minus pension and unemploymentInsurance. */ foreclosureSalary?: number; /** Total taxable income. */ totalTaxable?: number; /** Employer official id */ employerOfficialId?: string | null; /** Worker official id */ workerOfficialId?: string | null; } export declare const RRuleFinnish: { /** Names of days */ dayNames: string[]; /** Names of months */ monthNames: string[]; /** Tokens for natural language parsing (NOT IN USE!) */ tokens: { [k: string]: RegExp; }; /** The key texts that are used by the gettext method. */ texts: { [k: string]: string; }; }; /** Defines the main salary that is the bases for the calculation */ 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 mapping of salary bases (e.g. from a timesheet software) to calculations and other items * (e.g. payroll, employment relation, holiday years or absences). */ declare interface SalaryBases { /** The import source using the generic import logic and mapping. */ src?: ImportResult; /** The rows of salary bases. */ rows?: SalaryBasesRow[]; } /** * Controller for employer and worker charts using angular-chart */ export declare class SalaryBasesController implements angular_2.IController { private employmentsApi; private uiCrudHelpers; private uiHelpers; private ajax; private jsonSchemaService; private datasetsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Source data that is mapped to salary bases suitable to creating calculations etc. */ current: SalaryBases; /** Full set of employments for binding to data. */ employments: Employment[]; /** Datasets that define the import pattern / settings. */ datasets: DatasetListItem[]; /** Current dataset that contains the definition data for the import. */ dataset: Dataset; /** Payroll controller that contains the payroll that is being edited. */ payrollController: PayrollCrudController; importController: ImportController; /** Active tab: set by the import operations. */ currentTab: string; /** TODO: Move to enum, also add descriptions */ matchTypes: { row: string; hourlyRow: string; monthlySalary: string; ignore: string; warning: string; error: string; }; /** * Creates a new SalaryBasesController * @ignore */ constructor(employmentsApi: Employments, uiCrudHelpers: UiCrudHelpers, uiHelpers: UiHelpers, ajax: AjaxNg1, jsonSchemaService: JsonSchemaService, datasetsApi: Datasets); /** Initializes the controller. */ $onInit(): void; /** * Loads the given dataset. * @param datasetToLoad List item for which the whole dataset should be loaded. */ loadDataset(datasetToLoad: DatasetListItem): void; /** The row types mapper from the dataset */ getRowTypeMapper(): RowTypeMatch[]; /** Fetches the employment relations for operations on this UI. */ getEmployments(): void; /** Gets the importable interface for importing the SalaryBasesRows */ getImportable(): Importable; /** Saves the dataset. */ save(): void; /** Processes the import */ processImport(): void; /** Saves the rows to the given payroll */ saveToPayroll(): void; /** Shows a dialog box for editing the employment. */ editEmployment(row: Employment): void; } /** A row of Salary bases: Data that is used to build Salary Calculations with salary rows typically grouped to Payroll objects. */ 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 */ declare enum SalaryDateKind { Default = "default", InPast = "inPast" } /** * Renders a Salary Date Kind selection -button for the Calculation or Payroll * @example * ```html * * ``` */ export declare class SalaryDateKindButton extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * The current object containing salaryDateKind -field: Either Calculation or PayrollDetails. */ model: string; /** Expression for ng-disabled of the input. */ disabled: string; /** * Additional class / classes for button. Can also be used to override default btn-primary class styles. * (i.e. ) */ buttonClass: string; /** Called when the salary date kind has been changed. */ onSalaryDateKindChange: string; }; /** * Uses the SalaryDateKindController */ controller: typeof SalaryDateKindController; /** The default template for the component. */ defaultTemplate: string; } /** * Contains functionality for switching between salary date kinds for payrolls or calculations. */ export declare class SalaryDateKindController implements angular_2.IController { private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * The current business item that is being paid: Either Calculation or PayrollDetails. */ model: Calculation | PayrollDetails_2; /** * Function that is called when the salary date kind has been chagned * Function has the following locals: * paymentChannel: the selected payment channel. * businessObject: the current business object which has been changed. */ onSalaryDateKindChange: (params: { /** Selected payment channel */ salaryDateKind: SalaryDateKind; /** The current business object which has been changed. */ businessObject: Calculation | PayrollDetails_2; }) => void; salaryDateKinds: { value: SalaryDateKind; text: string; avatar: { color: string | undefined; icon: string; }; }[]; constructor(uiHelpers: UiHelpers); /** * Initializes the controller */ $onInit(): void; /** Gets the current salary date kind object. */ get currentSalaryDateKind(): { value: SalaryDateKind; text: string; avatar: { color: string | undefined; icon: string; }; }; /** Sets the salary date kind and starts recalculation. */ setSalaryDateKind(newSalaryDateKind: SalaryDateKind): void; /** Shows the salary date kind dialog */ private showCalculationSalaryDateKindSelection; /** Shows the salary date kind dialog */ private showPayrollSalaryDateKindSelection; private static getSalaryDateKinds; } /** SalaryKind enumeration */ declare enum SalaryKind { Undefined = "undefined", FixedSalary = "fixedSalary", HourlySalary = "hourlySalary", MonthlySalary = "monthlySalary", Compensation = "compensation", TotalWorkerPayment = "totalWorkerPayment", TotalEmployerPayment = "totalEmployerPayment" } /** * The new ApiCrudObject type of CRUD controller for the calculation reports. * Note that SalaryRepots does not have separate CRUD methods, but instead * the CRUD structure is based on Calculations (extends CalculationCrudController). */ export declare class SalaryReportCrudController extends CalculationCrudController { protected invoicesService: InvoicesService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Default query options for panel */ panelQueryOptions: { $filter: string; $top: number; $orderby: string; }; /** Default query options for full list view */ queryOptions: { $filter: string; $top: number; $orderby: string; }; constructor(calculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService); /** * Initializes the controller */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** Unselect all */ unselectAll(): void; /** Select all */ selectAll(): void; } /** * Shows a list of salary reports. * @example * ```html * * ``` */ export declare class SalaryReportList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * list view 'mode'. * If undefined, defaults to full list. * Use panel for dashboards etc. */ mode: string; }; /** Uses the AccountingReportCrudController */ controller: typeof SalaryReportCrudController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides functionality to export salary slip(s) as pdf or zipped pdf. */ export declare class SalarySlipDownloadController implements angular_2.IController { private $http; private ajax; private uiHelpers; private reportsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor($http: angular_2.IHttpService, ajax: Ajax, uiHelpers: UiHelpers, reportsApi: Reports); /** * Export items * One item is exported as pdf and multiple items are exported as zip containg pdfs. */ export(items: any[]): Promise; } /** * Bootstrap templates compiled to JavaScript * @ignore */ export declare const SalaxyNg1BootstrapTemplatesModule: any; /** * Components contain the user interface element (the view) on top of the controller logic. * This is the Angular2 compatible alternative to Directives introduced in Angular 1.5. * * Registers the salaxy.ng1.components.all module that contains the entire * Palkkaus.fi Angular stack * @example * angular.module("myAngularApplication", ["salaxy.ng1.components.all"]) * @ignore */ export declare const SalaxyNg1ComponentsModule: any; 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 calculation related settings. */ calc?: ServiceModelCalculation | 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; /** Settings related to the pay statistics calculations. */ payStats?: ServiceModelPayStats | 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 */ 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_2[] | null; } /** Service model branding settings: logo, css etc. */ declare interface ServiceModelBranding { /** Url to logo. */ logo?: string | null; /** Css path. */ skin?: string | null; } /** Settings related to Calculation */ declare interface ServiceModelCalculation { /** IR report delivery settings. */ irDelivery?: IrDelivery | null; } /** Settings related to Cost Accounting */ declare interface ServiceModelCostAccounting { /** Cost accounting dimensions */ dimensions?: CostAccountingDimensionDefinition[] | null; } /** * UI logic for viewing and adding new (modifying) service models * Service models define service models */ export declare class ServiceModelCrudController extends ApiCrudObjectController { private fullApi; isSaving: boolean; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(fullApi: ServiceModels, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Event handler for accounting target selection. * @param current Settings object to edit/create. * @param logic Logic object passed to the dialog controller. * @param logic.isReadOnly Read-only flag in logic. * @param value Boolean indicating if the item is selected or not. * @param item The selected item. * @param allItems All selected items. */ onAccountingTargetSelect(current: AccountingTargetSettings_2, logic: { isReadOnly: boolean; }, value: boolean, item: AccountingTargetListItem, allItems: AccountingTargetListItem[]): void; /** * Event handler for usecase selection. * @param current Settings object to edit/create. * @param logic Logic object passed to the dialog controller. * @param logic.isReadOnly Read-only flag in logic. * @param value Boolean indicating if the item is selected or not. * @param item The selected item. * @param allItems All selected items. */ onUsecaseSelect(current: Usecase, logic: { isReadOnly: boolean; }, value: boolean, item: UsecaseListItem, allItems: UsecaseListItem[]): void; /** * Return Avatar from current.payment.channels ENUM * @returns Avatar */ /** * Created InputEnumOption [] from current.accounting.targets * @returns InputEnumOption [] for template */ getSelectableAccountingTargets(): InputEnumOption[]; /** * Created InputEnumOption [] from all payment channels * @returns InputEnumOption [] for template */ getSelectablePaymentChannels(): InputEnumOption[]; /** Returns all payment channels. */ getAllPaymentChannels(): InputEnumOption[]; /** * Save service model */ saveServiceModel(): void; /********************** * Sitemap functionality **********************/ private _sitemap; private _currentSitemapNode; /** Current instance of Translations. */ private translations; /** Clean dictionary for reloading the translations */ private cleanDictionary; /** Gets the editable version of the sitemap */ get sitemap(): SitemapNode[]; /** Resets all sitemap changes */ resetSitemapChanges(): void; /** * Show / hide all nodes in the sitemap. * @param open If true open / show all nodes. Default is close all nodes. */ showHideAll(open: boolean): void; /** Currently edited sitemap node */ get currentSitemapNode(): SitemapNode; set currentSitemapNode(value: SitemapNode); /** Commits the changes of the current sitemap node to current service model (no save to server.) */ commitSitemapNode(): void; /** * Resets all changes for the current sitemap node. * @param resetCommitted If true, also resets the values that are committed to the * original values from in the library */ resetSitemapNode(resetCommitted: boolean): void; /** * Returns true, if the node has test role set. * @param node Node to evaluate. */ getIsTest(node: SitemapNode): boolean; /** * Gets all roles except "test" (which is displayed by getIsTest) as comma separated string. * @param node Node to evaluate. */ getRoles(node: SitemapNode): string; /** Gets the params schema from the sitemap (service model). */ getSitemapParamsSchema(): OpenAPIV3.Document; /** Field to export / import the current object (shown in code editor). */ json: string; /** Exports the current object as json to property this.json. */ exportJson(): void; /** Sets current object from the JSON (this.json shown in code editor). */ importJson(): void; private addNodeParamSchemas; private defaultParamsSchema; /** * Translates the given key to current language with the translations in the current service model * @param key The translation key */ translate(key: string): string; /** Initializes the Translations instance (loads the language and sets the current language). */ private initLanguage; } /** Service model specific business data for index. */ 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; } /** * Provides UI for modifying service model. * @example * ```html * * ``` */ export declare class ServiceModelDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the AccountController */ controller: typeof ServiceModelCrudController; /** Default template is the view */ defaultTemplate: string; } /** Service model features, which can be swithced on/off. */ declare interface ServiceModelFeatures { /** If true, IR reporting uses given certificate. */ irDelivery?: boolean | null; /** 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; /** If true, the service model pay statistics settings override company settings. */ payStats?: boolean | null; } /** Settings related to the calculation data delivery by forms. */ declare interface ServiceModelForms { } /** Settings related to Holiday */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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. */ 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. */ declare interface ServiceModelPayments { /** The default channel when making payments. */ defaultChannel?: PaymentChannel | null; /** Channel specific settings. */ channels?: PaymentChannelSettings_2[] | null; } /** Settings related to pay statistics calculations. */ declare interface ServiceModelPayStats { /** Settings for different types of pay statistics. */ types?: PayStatsTypeDefinition[] | null; } /** Service model specific pricing settings for customers. */ 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. */ 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 */ 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. */ 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. */ declare interface ServiceModelUsecase { /** Available usecases for the current account. */ usecases?: UsecaseInSettings[] | null; } /** * Provides read-only access to the current user session */ 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 | null, role?: string | null, partnerSite?: string | null, mode?: OAuthSalaxyAuthorizeMode | null, urlPostfix?: string | null): string; } /** * User interaction with the current session: UserCredentials, Current Account(s) and Login/Logout. */ export declare class SessionController implements angular_2.IController { private sessionService; private $location; private ajax; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Default redirect URL for signIn and register if not specified by the method */ redirectUrl: string; constructor(sessionService: SessionService, $location: angular_2.ILocationService, ajax: Ajax, uiHelpers: UiHelpers); /** * Implement IController */ $onInit: () => void; /** If true, the session has been checked from theserver - i.e. isAuthenticated = false means that the user really cannot be authenticated. */ get isSessionChecked(): boolean; /** If true, the session check call is progressing. */ get isSessionChecking(): boolean; /** If true, the user is authenticated */ get isAuthenticated(): boolean; /** Avatar to show in the login screen */ get avatar(): any; /** The full session objcet */ get session(): any; /** The company account if the current account is company - and if the full account info is fetched */ get company(): any; /** The person account if the current account is person - and if the full account info is fetched */ get person(): any; /** * Opens the login form for the current user * @param redirectUrl - The URL where the user is taken after a successfull login. * @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users * @param partnerSite Identifier of the partner or service model from which the login UI is fetched. * @param urlPostfix Additional string that is added to the OAuth2 URL. * Used in adding other parameters to the URL, e.g. "&salaxy_language=en" */ signIn(redirectUrl?: string, role?: string, partnerSite?: string, urlPostfix?: string): void; /** * Opens the login dialog with signUp / register functionality * @param redirectUrl - The URL where the user is taken after a successfull login * @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users * @param partnerSite Identifier of the certified partner which should be granted access rights in account creation. * Also sets register dialog and onboarding wizard UI skin. * @param urlPostfix Additional string that is added to the OAuth2 URL. * Used in adding other parameters to the URL, e.g. "&salaxy_language=en" */ register(redirectUrl?: string, role?: string, partnerSite?: string, urlPostfix?: string): void; /** If false, the current authenticated user has not signed the contract. */ get isAccountVerified(): boolean; /** * Sends the user to the Sign-out page * @param redirectUrl - URL where user is redirected after log out. * Must be absolute URL. Default is the root of the current server. */ signOut(redirectUrl?: string): void; /** * Switches the current web site usage role between household and worker. * @param role - household or worker. * @returns A Promise with result data (new role as string) */ switchRole(role: "worker" | "household"): Promise<"household" | "worker">; /** * When called, will show the login screen if the user is not logged in */ checkAuthenticated(): void; /** * Checks whether the user is in a given role * @param role - One of the known roles */ isInRole(role: SystemRole): boolean; /** * Set the language for UI in the current session. * @param lang - Language to select: fi, en, sv. */ setLanguage(lang: Language): void; /** * Get the current language for UI in the current session. */ getLanguage(): "fi" | "en" | "sv"; /** * Switches the CSS link to partner-specific CSS. * @param cssUrl URL for the CSS file. */ switchCss(cssUrl: string): void; /** Sign in error */ get signInError(): string; /** Sign in error description */ get signInErrorDescription(): string; /** Sign in error page url */ get signInErrorPageUrl(): string; /** Returns current token if exists. */ get currentToken(): string; /** Returns the url to the authorization pdf. */ get authorizationPdfUrl(): string; /** Returns owned payment channel for current account */ get ownedPaymentChannel(): PaymentChannel; /** get kyc state */ get kycState(): "ignored" | "valid" | "expired" | "missing"; /** returns latest update date for kyc. */ get kycUpdatedAt(): string; /** returns expiration date for kyc. */ get kycExpiresAt(): string; } /** * Helps in managing the login process and provides information of the current session */ export declare class SessionService { private $rootScope; private sessionApi; private accountApi; private $window; private $location; private ajax; private $timeout; private alertService; private workers; private $locale; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, the user is authenticated */ isAuthenticated: boolean; /** If true, the session has been checked from the server */ isSessionChecked: boolean; /** If true, the session call is progressing */ isSessionChecking: boolean; /** Avatar to show in the login screen */ avatar: Avatar_2; /** The full session objcet */ session: UserSession; /** The person account object if the currently selected account is a person */ personAccount: PersonAccount; /** The company account object if the currently selected account is a company */ companyAccount: CompanyAccount; /** Sign in error */ signInError: string; /** Sign in error description */ signInErrorDescription: string; /** Sign in error page url */ signInErrorUrl: string; /** Partner site */ partnerSite: string; /** * Application specific roles that are set on the client (browser code) * as opposed to normal server-side defined roles. */ clientRoles: string[]; private _isLoading; workerLangs: { [key: string]: Language; }; private static SKIN_SESSION_STORAGE; constructor($rootScope: angular_2.IRootScopeService, sessionApi: Session, accountApi: Accounts, $window: angular_2.IWindowService, $location: angular_2.ILocationService, ajax: Ajax, $timeout: angular_2.ITimeoutService, alertService: AlertService, workers: Workers, $locale: any); /** * Initializes the session service. * Note that the session loading will currently begin already in constructor. */ init(): void; /** * Controllers can subscribe to changes in service data using this method. * Read more about the pattern in: http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/ * @param scope - Controller scope for the subscribing controller (or directive etc.) * @param callback - The event listener function. See $on documentation for details */ subscribe(scope: angular_2.IScope, callback: (event: angular_2.IAngularEvent, ...args: any[]) => any): void; /** * Services can subscribe to this event to be notified when it is known that there is an authenticated session * (as opposed to anonymous session). Uses the same pattern as subscribe. * @param scope - Controller scope for the subscribing controller (or directive etc.) * @param callback - The event listener function. See $on documentation for details */ onAuthenticatedSession(scope: angular_2.IScope, callback: (event: angular_2.IAngularEvent, ...args: any[]) => any): void; /** * If true, the session is loading: Session, i18n files, service model or something else * that may break the entire user interface is (re)loading: User interface should show a loader. * Note that isSessionChecking overrides the set value in getter. */ get isLoading(): boolean; set isLoading(value: boolean); /** If true, the user is authenticated */ getIsAuthenticated(): boolean; /** If true, the session has been checked from the server */ getIsSessionChecked(): boolean; /** If true, the session call is progressing */ getIsSessionChecking(): boolean; /** Avatar to show in the login screen */ getAvatar(): Avatar_2; /** The full session objcet */ getSession(): UserSession; /** Gets either the Company account or PErson account depending of the type of the current account. */ getCurrentAccount(): AccountBase; /** Get the person account object if the currently selected account is a person */ getPersonAccount(): PersonAccount; /** The company account object if the currently selected account is a company */ getCompanyAccount(): CompanyAccount; /** Gets the address for the API server where the session is connected */ getServerAddress(): string; /** * Returns current access token */ getCurrentToken(): string; /** * Checks whether the user is in a given role * @param role - One of the known roles or role from server. * You can also use exclamation mark for negative (e.g. "!test") * @returns True if user is in the given role, * or if given roles is null/empty. */ isInRole(role: SystemRole | Role | string): boolean; /** * Checks if the user is in ANY of the roles. * @param commaSeparatedRolesList - Array of roles or comma separated string containing role names. * @returns True if user is in one of the given roles, * or if given roles is null or an empty array. */ isInSomeRole(commaSeparatedRolesList: (SystemRole | Role | string)[] | string): any; /** * Tests if the current account has ALL the given roles. * @param accountRoles - Array of roles. * @returns Returns true if the account has all the given roles, * or if given roles is null or an empty array. */ isInAllRoles(accountRoles: (SystemRole | Role | string)[]): boolean; /** Posts a message to the parent window. The message is sent as salaxySessionEvent */ postMessageToParent(message: string): void; /** * Checks the current session from the server if user has token (either in-memory or in cookie) * @returns A Promise with result data (UserSession) */ checkSession(): Promise; /** * Sets the session to a session object that has already been fetched from the server. * Note that the caller should also set the token to Ajax. * @param session - Session object to set as current session. */ setSession(session: UserSession | undefined): UserSession; /** * Switches the current web site usage role and refreshes the session. * @param role - household or worker. * @returns A Promise with result data (new role as string) */ switchRole(role: "household" | "worker"): Promise<"household" | "worker">; /** * Sends the browser to standard Sign-in page on Salaxy API server. * @param redirectUrl - The URL where the user is taken after a successfull login * @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users * @param partnerSite Identifier of the partner or service model from which the login UI is fetched. * @param urlPostfix Additional string that is added to the OAuth2 URL. * Used in adding other parameters to the URL, e.g. "&salaxy_language=en" */ signIn(redirectUrl?: string, role?: string, partnerSite?: string, urlPostfix?: string): void; /** * Sends the browser to standard signUp / register page on Salaxy API server. * @param redirectUrl - The URL where the user is taken after a successfull login * @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users * @param partnerSite Identifier of the certified partner which should be granted access rights in account creation. * Also sets SignIn dialog and onboarding wizard UI skin. * @param urlPostfix Additional string that is added to the OAuth2 URL. * Used in adding other parameters to the URL, e.g. "&salaxy_language=en" */ register(redirectUrl?: string, role?: string, partnerSite?: string, urlPostfix?: string): void; /** * Sends the user to the Sign-out page * @param redirectUrl - URL where user is redirected after log out. * Must be absolute URL. Default is the root of the current server. */ signOut(redirectUrl?: string): void; /** * Returns true if the current authenticated user has signed the contract. */ isSigningOk(): boolean; /** * Returns true if the current authenticated user has signed the contract * OR if the user does not have session OR if user is anonymous. */ checkAccountVerification(): boolean; /** * Gets the application status that supports the UserSession object by providing additional * information about the status of fetching the session, data, expiration etc. */ getAppStatus(): AppStatus; /** * TODO: Encapsulate this functionality to Ui-customization service. MJ * * Switches the CSS link to partner-specific CSS. * @param cssUrl URL for the CSS file. Typically, "css/skins/${skin}.css" * @param useDevelopmentFolder If true, uses the local css file (development environment only). * By default, uses the CDN. */ switchCss(cssUrl: string, useDevelopmentFolder?: boolean): void; /** * Resolves current css cdn url with following priority: * 1. Url (https://test-yritys.palkkaus.fi/embedded.html?skin=emu#/) * 2. Token (Token.parsePayload(token)) * @returns cdn url to css */ resolveCss(): string; /** * Parses name of current skin from cdn url * @returns name of current skin */ getCurrentCss(): string; /** * Get report lang * @param workerId optional workerId to get worker * @returns report lang */ getReportLang(workerId?: null): Promise; /** Returns the owned payment channel for the current account. */ getOwnedPaymentChannel(): PaymentChannel; /** * Does a "soft refresh" of the AngularJS user interface by setting isLoading flag to * true and then false after digest loop has run. Layouts should implement this in a way * that all views are destroyed and then recreated. */ refreshUi(): void; /** * Sets the language of the session for the given language. * Also loads the dictionary for the language if not already loaded. * @param lang Language to set. */ setLanguage(lang: Language): void; /** Parses origin url from $location*/ getOrigin(): string; /** * Determines whether the customer is a cfa customer. * @returns A boolean value indicating whether the customer is a cfa customer. */ get isCfaCustomer(): boolean; /** get kyc state */ get kycState(): "ignored" | "valid" | "expired" | "missing"; /** returns last updated at for kyc. */ get kycUpdatedAt(): string; /** returns expiration date for kyc. */ get kycExpiresAt(): string; /** * Parsers given roles from the access token. * Returns the first found role from the list in order. * @param roles Comma separated list of roles or array of roles. */ private parseRoleFromAccessToken; private notify; private notifyAuthenticatedSession; /** * Sends the browser to standard Sign-in page on Salaxy API server. * @param redirectUrl The URL where the user is taken after a successfull login. * @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" or "sign_up". * @param urlPostfix Additional string that is added to tha URL. * Used in adding other parameters to the URL, e.g. "&salaxy_language=en" */ private authorize; private readTokenFromUrl; private checkSessionFromUrl; private subscribeToLocationChange; /** * Temporary fix to replace old skin paths "ng1/css/something.css" with the new monorepo * style "/skins/css/something.css" until the skin paths are fixed at the source. */ private convertSkinPath; private setLanguageForSession; } /** Extends the Usecase */ export declare interface SessionUsecase extends Usecase { /** * Indicates that the usecase definition is loaded OR that there is no current usecase. * If false, the definition is still being loaded from server. */ isLoaded?: boolean; /** If true, the usecase exists / current has access to it. */ exists?: boolean; /** Stores the default view for the usecase for the current application / role. */ defaultView?: string; } /** Represents a user credential in session: This credential is typically based on Claims and is availble without going to database. */ 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_2 | 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; } declare type SettingsSection = "pensionContracts" | "yelPensionContracts" | "insuranceContracts" | "incomesRegister" | "eInvoice" | "sepa" | "taxAndSocialSecuritySelfHandling" | "workerSelfHandling" | "unemploymentSelfHandling" | "payslip" | "omapalkka"; /** * Provides singleton for the full editable settings object: * Mainly for editing, but may also be used by other parts that require access to settings. * This implementation is for Company employers. There may be a specialized Household employers and/or Worker, Pro version later. */ export declare class SettingsService { private sessionService; private accountSettings; private uiHelpers; private ajax; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * The current settings object or null if the object is still being loaded. * The loading starts as soon as the settings service is loaded in the first controller. */ current: CompanyAccountSettings; private reportOptions; private _reportOptionsLoading; constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, accountSettings: AccountSettings, uiHelpers: UiHelpers, ajax: Ajax, $timeout: angular_2.ITimeoutService); /** Saves the session and does the refresh, but not a complete sessionService.checkSession() as in default save(). */ saveWithoutSessionCheck(): Promise; /** Refreshes the current settings from the server. */ refresh(): Promise | undefined; /** Saves the current settings back to storage. */ save(): Promise; /** * Creates a new IR certificate. * @param transferId Transfer ID for the IR certificate. * @param transferPassword One time transfer password for the IR certificate. * @returns Information about the created IR certificate. */ createIrCertificate(transferId: string, transferPassword: string): Promise; /** * Renews an existing IR certificate. * @returns Information about the created IR certificate. */ renewIrCertificate(): Promise; /** * Gets the detials of the existing IR certificate or null if no certificate exists. * @returns Information about the current IR certificate. */ getIrCertificate(): Promise; /** Sets the eInvoice address using a dialog */ selectEInvoiceAddress(address: { eInvoiceReceiver?: string; eInvoiceIntermediator?: string; }): Promise>; /** * Gets ReportOptions * @returns returns tempalte ReportOptions */ getReportOptions(): Promise; } /** SettingsStatus enumeration */ declare enum SettingsStatus { Undefined = "undefined", Checked = "checked", Pending = "pending" } /** 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. */ declare interface Shareholder { /** Name of the shareholder. */ name?: string | null; } /** SharingUriType enumeration */ declare enum SharingUriType { Undefined = "undefined", Url = "url", Employer = "employer" } /** * Handles user interaction for Digital Signature */ export declare class SignatureController implements angular_2.IController { private signatureService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new SignatureController * @param signatureService - Service that handles the communication to the server * @ignore */ constructor(signatureService: SignatureService); /** * Implement IController */ $onInit: () => void; /** * Legacy list of supported Visma Sign Signature methods. */ get methods(): SignatureMethod[]; /** * List of supported Signature methods * @param methodGroup - Method group "telia" for Telia Tunnistus and "tupas" for Visma Sign. Default is "tupas". */ getMethods(methodGroup?: "tupas" | "telia"): SignatureMethod[]; /** * Returns the SignatureMethod for given value. * @param value - value for SignatureMethod, e.g. tupas-nordea. */ getMethod(value: string): SignatureMethod; } 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; } /** * Defines a supported signature method. */ export declare class SignatureMethod { /** Title for the signing method. */ title?: string; /** Name for the signing method. */ name: string; /** Id for the signing method. */ value: string; /** Image url for the signing method. */ img: string; /** Boolean to indicate that the method is popular and should be shown among first methods. */ isPopular?: boolean; } /** * Handles Digital Signature scenarios to Onnistuu.fi-service. */ export declare class SignatureService { private $rootScope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private tupasMethods; private teliaMethods; /** * Creates a new instance of SignatureService * @param $rootScope - Angular root scope. Used for event routing */ constructor($rootScope: angular_2.IRootScopeService); /** * Gets a list of available signature methods. Use img-property to show. * @param methodGroup - Method group "telia" for Telia Tunnistus and "tupas" for Visma Sign. Default is "tupas". */ getMethods(methodGroup?: "tupas" | "telia"): SignatureMethod[]; } /** Data about the Signicat process. */ 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; } /** * Shows the signature for the current account for signing. * @example * ```html * *
* Signature is OK => Show the rest of the page *
* ``` */ export declare class Signing extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to controller implementation */ bindings: { /** If true, shows the component even if the Signing is already OK. */ showAlways: string; /** If true, component shows success popup */ showInPopup: string; }; /** Uses the SessionController */ controller: typeof SigningController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for showing the signing user interface for unsigned account. */ export declare class SigningController implements angular_2.IController { private $scope; private onboardingService; private sessionService; private signatureService; private $sce; private uiHelpers; private ajax; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true (typically default), the signing person is also the contact person for the company */ isContactPersonSigner: boolean; /** If true, shows the component even if the Signing is already OK. Typically used only in test. */ showAlways: boolean; /** If true, component shows success popup */ showInPopup: boolean; /** * Will be true if the component has done authentication and determines that signature is already OK * If true, the component is not shown to the end user unless showAlways is set true. */ isSigningOk: boolean; /** True when the session is available (auth) AND the signature is required. */ isSigningRequired: boolean; /** URL for the PDF preview. Changes when saved, to assure that PDF is not cached. */ pdfPreviewUrl: string; /** Binding for button, which calls startDigitalSignature(). */ isSigninStarted: boolean; constructor($scope: angular_2.IScope, onboardingService: OnboardingService, sessionService: SessionService, signatureService: SignatureService, $sce: angular_2.ISCEService, uiHelpers: UiHelpers, ajax: Ajax, $timeout: angular_2.ITimeoutService); /** * Implement IController */ $onInit: () => void; /** Saves the current onboarding model. */ save(): Promise; /** * The onboarding model is provided by the onboarding service. */ get model(): Onboarding; /** Returns the PDF preview address for the authorization pdf. */ getPdfPreviewAddress(): string; /** * Starts Visma sign * If this.showInPopup is false, saves the model and starts the signature. * If this.showInPopup is true, saves the model, starts the signature and then opens success dialog. * @param authMethod Method of authentication (bank selection). * Only used for Persons (Telia methods), ignored for companies. */ startDigitalSignature(authMethod: string): void; /** List of supported Signature methods */ get methods(): SignatureMethod[]; /** * Returns the SignatureMethod for given value. * @param value - value for SignatureMethod, e.g. tupas-nordea. */ getMethod(value: string): SignatureMethod; /** * Signs the authorization contract for the current user. * Creates a partner contract authorization and updates the session. * @returns Promise that resolves when the contract is signed and session is updated * @throws Error if the contract signing fails */ signPartnerContract(): Promise; private init; } /** * Base class for APIs that return only one item (not a list as in CRUD). */ 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; } /** * Helper for managing standard web sitemaps in navigation. */ export declare class SitemapHelper { constructor(); /** * Gets logical visibility, as used in the views an UI logic, i.e.: * * - hidden: Node is null or visibility is Hidden, HiddenReadOnly or Disabled. * - readOnly: Node is null or visibility is ReadOnly, HiddenReadOnly. * - disabled: Visibility is Disabled. * - Visible: Visibility is Visible or null, node is not null. * - isFullWidth: The node has an isFullWidth boolean flag set to true. * Supports exclamation mark (!) in the beginning to denote negation (true <=> false). * @param node Node to evaluate * @param evaluateFor The visibility value to evaluate for. */ static getVisibility(node: SitemapNode, evaluateFor: SitemapVisibility | "isFullWidth" | string): boolean; /** * Gets the standard company sitemap for Company web sites. */ static getCompanySiteMap(): SitemapNode[]; /** * Gets the editable version of the sitemap: Full ID's etc. * @param site The Site as customized in the Service model. * @param nodes Root nodes to start from. If null, a copy of the baseTree is used. * @param parentId Identifier of the parent. Used in recursive calls to add fully qualified ID's to all nodes. * @returns An editable sitemap. */ static getEditableSitemap(site: ServiceModelSite, nodes?: SitemapNode[], parentId?: string): SitemapNode[]; /** * Applies custom properties from service model to set of sitemap nodes. * Also does backward compatibility from old SalaxySitemapNode format to current SitemapNode. * @param session User session that potentially contains the service model. * If null or no partner.serviceModel.sitemap, the method does nothing. * @param nodes Nodes that are being updated. * @param parentId Identifier of the parent. Used in recursive calls to add fully qualified ID's to all nodes. */ static setCustomProperties(session: UserSession, nodes: SitemapNode[], parentId?: string): void; /** This just to get snowpack working. */ snowpackHack(): string; /** * Gets the combined sitemap that contains the structure for both company * and personal (Worker, Household). this is used mainly in development and PRO service: * typically, company and personal sites are separate and this tree is not used. */ static getAllRolesSiteMap(): SitemapNode[]; /** * Sets the titles for each node in given sitemap based on node id from the given tranlsation. * @param sitemap Selected sitemap to add titles to * @param currentPath Current node in sitemap object * @param i18Prefix Translation key prefix (defaults to SALAXY.NG1_Sitemap) */ static setSitemapTitles(sitemap: SitemapNode[], currentPath?: string, i18Prefix?: string): SitemapNode[]; /** * Removes a section based on id. * @param sitemap Sitemap from which the section is removed. * @param sectionId Identifier for finding the section to remove. */ static removeSection(sitemap: SitemapNode[], sectionId: string): void; /** * Gets a section based on id. * @param sitemap Sitemap from which the section is fetched. * @param sectionId Identifier for finding the section to remove. */ static getSection(sitemap: SitemapNode[], sectionId: string): SitemapNode; /** * Gets a node (subpage) based on id. * @param sitemap Sitemap from which the section is fetched. * @param sectionId Identifier for finding the section. * @param nodeId Identifier for finding the node (subpage to modify or hide). */ static getNode(sitemap: SitemapNode[], sectionId: string, nodeId: string): SitemapNode; /** * Gets a JSON schema of a sitemap node using the params property. * NOTE: Advanced properties (i18n, children and params) are not included in this schema. Add if needed. */ static getSchema(node: SitemapNode): OpenAPIV3.SchemaObject; } /** * 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. */ 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. */ 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" } /** * Component for performing basic smoke test about salaxy libraries: * Are all the libraries and dependencies loaded and functional in the package. */ export declare class SmokeTest implements angular_3.IComponentOptions { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to controller implementation */ bindings: { /** Defines the view / set of tests: "core" or "ng1" */ mode: string; }; /** Uses the SalaxySmokeTestController */ controller: typeof SmokeTestController; /** Teh template URL */ templateUrl: string; } /** * Helps in performing basic smoke test about salaxy libraries: * Are all the libraries and dependencies loaded and functional in the package. */ export declare class SmokeTestController implements angular_2.IController { sessionSrv: SessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Defines the view / set of tests: "core" or "ng1" */ mode: "core" | "ng1"; reportsTests: { loaded: boolean; mapper: boolean; handlebars: boolean; }; constructor(sessionSrv: SessionService); /** * Controller initialization */ $onInit(): void; /** Gets number 1 from @salaxy/core library. */ getNumber(): 1 | number; /** Gets a date formatted with Dates library: "20.02.2020" */ getADate(): "20.02.2020" | string; /** Returns true if the code can read the token usin Base64 library. */ readToken(): boolean; /** Runs smoke tests related to Reports library. */ runReportTests(): void; /** Shows a saveAs dialog for text file ("Hello, world!"). */ saveAs(): void; /** Gets a text from json file. */ getJson(): any; /** Test chart with annotations */ chartData: any; private isCalcMapperWorking; /** * Tests that handlebars templates including nested partials and helpers are working correctly. * @returns Returns true if templates are working and otherwise false. */ private isHbsTemplatesWorking; } /** * Spinner as a UI component * @example * ```html * * ``` */ export declare class Spinner extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** If true, the spinner is shown full screen. */ fullScreen: string; /** * Heading is the larger text under the spinner. * The text is translated. */ heading: string; /** * Small text - use pre for line breaks. * The text is translated. */ text: string; }; /** Uses the SpinnerController */ controller: typeof SpinnerController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller rendering a Spinner (please wait) user interfaces. */ export declare class SpinnerController implements angular_2.IController { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** If true, the spinner is shown full screen. */ fullScreen: boolean; /** * Heading is the larger text under the spinner. * The text is translated. * Also, if language dictionaries are not available, SALAXY.UI_Terms.loading and .loginInProgress are * resolved to Finnish terms "Ladataan..." and "Kirjaudutaan..." */ heading: string; /** * Small text - use pre for line breaks. * The text is translated. */ text: string; /** * Creates a new SpinnerController * @ignore */ constructor(); /** * Implement IController */ $onInit: () => void; /** * Gets the header with default Finnish texts for "SALAXY.UI_Terms.loading" and "SALAXY.UI_Terms.loginInProgress". * Other untranslated language terms (starting with "SALAXY.") return an empty text. Other texts are printed as is. */ getHeading(): string | null; } /** Connector for a single service in the staging API. */ 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. * @returns The list of items after reload. */ reloadList(): Promise; /** 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; } /** Row containing summary data for the summary report. */ 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. */ declare interface SummaryCalculationRows { /** Summary rows. */ rows?: SummaryCalculationRow[] | null; /** Total sum of rows. */ total?: number | null; } /** * Shows the summary reports for the given data. * @example * ```html * * ``` */ export declare class SummaryReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The data for the report. */ data: string; }; /** Uses the SummaryReportController */ controller: typeof SummaryReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Renders a summary report or a calculation summary report for the given calculation(s). * Uses Handlebars templates (@salaxy/reports). */ export declare class SummaryReportController implements angular_2.IController { private templates; private $sce; private settingsService; private $timeout; private $http; private uiHelpers; private sessionService; private ajax; data: SummaryReportData; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Template for the report */ templateName: string; /** Boolean indicating if the refresh is in progress. */ refreshInprogress: boolean; /**Selected report language */ lang: Language; private renderedData; private renderedLang; private htmlData; private reportOptions; private reportTemplate; private reportData; private _reportLang; /** * Creates a new CalcReportController * @ignore */ constructor(templates: Templates, $sce: angular_2.ISCEService, settingsService: SettingsService, $timeout: angular_2.ITimeoutService, $http: angular_2.IHttpService, uiHelpers: UiHelpers, sessionService: SessionService, ajax: Ajax); /** * Implement IController */ $onInit(): void; /** * Get _reportLang */ get reportLang(): Language; /** * Set _reportLang & lang */ set reportLang(lang: Language); /** * Return languge text to ui */ get languageText(): "SALAXY.ENUM.Language.fi.label" | "SALAXY.ENUM.Language.en.label" | "SALAXY.ENUM.Language.sv.label" | "SALAXY.NG1.CalcReportsComponent.reportLanguageCompany"; /** Bindable and trusted html. */ get html(): any; private refresh; /** * Shows a download dialog for the given summary report. * @param inline - If true, the download link opens the pdf into a new web page. */ showDownloadDialog(inline?: boolean): void; private getDefaultReportOptions; /** * Handles pdf request * @param url post url * @param inline inline pdf * @param data business object */ private handlePdfRequest; } /** A summary report for an employer for a specific period (typically month or year). */ declare interface SummaryReportData { statistics?: CalculationResultStatistics | null; /** Finnish Business Identifier (Y-tunnus) for the company. */ businessId?: string | null; /** Employer avatar */ employer?: Avatar_2 | 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; } /** * Handles user interaction for displaying summary report */ export declare class SummaryReportDisplayController implements angular_2.IController { private uiHelpers; private reports; static $inject: string[]; /** * Creates a new instance of SummaryReportDisplayController * @param uiHelpers - Salaxy ui helpers service. */ constructor(uiHelpers: UiHelpers, reports: Reports); /** * Display Summary report * @param refDate date * @param type report type */ display(refDate: string, type: string): void; private getPeriodType; } /** * Shows summary report of selected period. * @example * ```html * * ``` */ export declare class SummaryReportQuery extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the SummaryReportQueryController */ controller: typeof SummaryReportQueryController; /** The default template for the component. */ defaultTemplate: string; } /** * Component for displaying summary report of selected period. */ export declare class SummaryReportQueryController implements angular_2.IController { private reports; private uiHelpers; private employments; private uiCrudHelpers; private sessionService; private $timeout; /** Parameters related to report query*/ queryOptions: { /** Period type for the query. */ periodType: PeriodType; /** Ref date for the period. */ refDate?: string; /** End date for the custom period. */ endDate?: string; /** Period date kind */ periodDateKind: PeriodDateKind; }; /** Result rows */ resultRows: ResultRow_3[]; /** Current tab. */ currentTab: "incomereport" | "salarypaymentreport"; irReportRows: IrCodeIncomeReportRow[]; entrepreneurSummaryReportResults: SummaryReportRowResult[]; workerSummaryReportResults: SummaryReportRowResult[]; totalSummaryReportResults: SummaryReportRowResult[]; private summaryReportData; reportLang: string; costCenterReportCalculations: any; unionPaymentExcelRows: any[]; reportConfig: any; /** Ref to used SxyTable */ $sxyTable: SxyTableController; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(reports: Reports, uiHelpers: UiHelpers, employments: Employments, uiCrudHelpers: UiCrudHelpers, sessionService: SessionService, $timeout: angular_2.ITimeoutService); /** Controller initialization */ $onInit(): void; /** Return query info text */ getQueryInfoText(): string; /** * Shows the period selection dialog and makes the search. */ showPeriodSelection(): void; /** * Shows an edit dialog for the employment. * @param row Row that contains field employmentId (Identifier for the employment). * @param row.employmentId The row must contain the employment identifier. */ showEditEmploymentDialog(row: { employmentId: string; }): void; /** * Filters zero rows off * @returns IrCodeIncomeReportRow[] containing not zero rows */ getIrReportRows(): IrCodeIncomeReportRow[]; /** * Groups each result rows summary report entrepreneur results * @returns array of grouped entrepreneur results */ getEntrepreneurSummaryReportResults(): SummaryReportRowResult[]; /** * Groups each result rows summary report worker results * @returns array of grouped worker results */ getWorkerSummaryReportResults(): SummaryReportRowResult[]; /** * Export totalRows to excel */ exportToExcel(): void; private query; private generateResults; /** * Creates Union payment report data - for browser and excel export. */ private createUnionPaymentReportData; /** * Creates Cost center report data - for browser and excel export. */ private createCostCenterReportData; private createIrReportRows; private createSummaryReportRows; private createSummaryReportRowResult; private getLabel; private getKind; private getBlankResultRow; private getBlankIrCodeIncomeReportRow; private getBlankSummaryReportRow; private getBlankSummaryReportRowResult; } declare interface SummaryReportResult { workerResult?: SummaryReportRowResult; entrepreneurResult?: SummaryReportRowResult; totalResult?: SummaryReportRowResult; } declare interface SummaryReportRow { result: SummaryReportResult; } declare interface SummaryReportRowResult { avatar: Avatar_2; workerId: string; employmentId: string; totalGrossSalary: number; totalRowCategory: number; benefits: number; irCode: number; totalTaxable: number; tax: number; pension: number; unemploymentInsurance: number; unionPayment: number; foreclosure: number; otherDeductions: number; totalExpenses: number; totalWorkerPayment: number; totalPayment: number; palkkaus: number; service: number; socialSecurity: number; totalPensions: number; employerPension: number; unemployment: number; employerUnemployment: number; } /** * Shows an alert with type "error" or one of the bootstrap styles: "danger", "info", "warning", "success". * @example * ```html * NOTE: Here is a primary message to user. * * ``` */ export declare class SxyAlert extends ComponentBase { /** Inner content is the message. */ transclude: boolean; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Possibility to speicfy a font-awesome icon. * Setting "none", will show no icon. * If not set, it is determined by type. */ icon: string; /** Type of the alert is the Bootstrap style: Note that also "primary" and "default" are supported. */ type: string; /** * Translation key to HTML that should be the main message of the alert. * You can alternatively provide html as main element (transclude). */ msg: string; /** * Alert main content as simple text. * You can alternatively provide html as main element. */ text: string; /** * Optional Details part of the alert. * Will automatically show "Read more" button. */ aside: string; }; /** Uses the SxyFormElementController */ controller: typeof SxyFormElementController; /** The default template for the component. */ defaultTemplate: string; } /** * Code editor can be used in editing JSON, Schema and even JavaScript and HTML. * The system uses external code editor (https://code-editor.salaxy.com / https://test-code-editor.salaxy.com) if available or falls back to textarea when not available. * @example * ```html * * ``` */ export declare class SxyCodeEditor extends ComponentBase { /** Components contents can be used to set the initial code. */ transclude: boolean; /** ng-model may be used to binding the code to a string in an object. */ require: { model: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Type of user interface to render: "monaco" (default) or "basic" HTML (textarea/pre) */ mode: string; /** If true, the component is read-only */ readOnly: string; /** * Language of the code, e.g. "javascript" (default), "html", "json" or "css". * Currently only affects the Monaco editor. */ lang: string; /** * Type of the main object that is called "item" in the code. * Type should be one of @salaxy/core types (e.g. "Calculation") or supported * native types (currently ["any", "string", "[]"]). Default is any. */ itemType: string; /** The height of the editor as CSS, (e.g. "calc(100vh - 600px)"). Default is "400px" */ height: string; /** * Type of the editor to use: "monaco" (default), "sample" or "formula". */ editor: string; }; /** Uses the SxyInputController */ controller: typeof SxyCodeEditorController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for code editing user interfaces: JSON Schema, JSON, JavaScript and HTML. */ export declare class SxyCodeEditorController implements angular_2.IController { private $transclude; private $element; private $sce; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Type of user interface to render: code-editor or basic HTML (textarea/pre) */ mode: "monaco" | "basic"; /** If true, the component is read-only */ readOnly: boolean; /** * Type of the main object that is called "item" in the code. * Type should be one of @salaxy/core types (e.g. "Calculation") or supported * native types (currently ["any", "string", "[]"]). Default is any. */ itemType: string; /** * Language of the code, e.g. "javascript" (default), "html", "json" or "css". * Currently only affects the externalcodeeditor. */ lang: string; /** The model that is bound to the input */ model: angular_2.INgModelController; /** The height of the editor as CSS, (e.g. "calc(100vh - 600px)"). Default is "400px" */ height: string; /** Type of the editor to use: "monaco" (default), "sample" or "formula". */ editor: "monaco" | "sample" | "formula"; /** * Raw value field, mainly used in direct AngularJS NgModel data binding and as internal storage. * Typically, you should use get/set code for display and setting of the value. */ value: string; /** salaxy code-editor URL */ codeEditorUrl: string; private targetOrigin; /** * IFrame element that hosts the external code editor. * Only set after the window has loaded and sent the initialization message (external code editor is ready). */ codeEditorIFrame: HTMLIFrameElement; constructor($transclude: angular_2.ITranscludeFunction, $element: JQLite, $sce: angular_2.ISCEService); /** Initializes the controller */ $onInit(): void; /** Clears the window event hooks */ $onDestroy(): void; /** The code that is shown in editor. */ get code(): string; set code(value: string); /** On change of the value, do preventive operations and set value to model. */ protected onChange(): void; private registerCodeEditorWindow; private onEditorMessage; private registerTransclude; } /** * Shows a fieldset based on a given object in form * @example * ```html * * ``` */ export declare class SxyFieldset extends ComponentBase { /** sxy-form is required */ require: { form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { model: string; label: string; type: string; format: string; readOnly: string; disable: string; require: string; minimum: string; maximum: string; multipleOf: string; include: string; exclude: string; }; /** Uses the SxyInputController */ controller: typeof SxyInputController; /** The default template for the component. */ defaultTemplate: string; } /** * The sxy-form component encapsulates the data binding and auto-generation logic for editable models using JSON schema. * @example * ```html * * ``` */ export declare class SxyForm extends ComponentBase { /** * Inner DIV element may be transclude. * Future implementations will probably contain header, footer etc. */ transclude: { div: string; }; /** Component bindings. */ bindings: { /** Data object that is being edited by the fieldset. */ model: string; /** The data type that describes the object and creates the user interface. */ type: string; /** * URL for the Open API document that contains the definition for the type. * The url can be an absolute url, relative url or an url with salaxy-secure/ -prefix. * The salaxy-secure/ -prefix will be replaced in runtime with the salaxy api server url of the curren environment. */ openApi: string; /** Direct reference to internal document object. */ openApiDoc: string; /** * The translation code for the label/legend/title. * Default is "SALAXY.MODEL.[type].title"] or if not available, just the type text. */ label: string; /** * If true, the form is auto-generated from the type and inner HTML is ignored. * If false (default), the inner HTML is used to show the form. */ autoGen: string; /** If true, shows the form debugger */ debugger: string; /** Sets the entire form as read-only. Individual field may still be set read-only=false to make it editable. */ readOnly: string; }; /** Uses the SxyFormController */ controller: typeof SxyFormController; /** The default template for the component. */ defaultTemplate: string; } /** * Sxy form contains the definition for an editor used interface that * typically corresponds to an HTML form. */ export declare class SxyFormController implements angular_2.IController { private jsonSchemaService; private $rootScope; private uiHelpers; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The model that is being edited. */ model: any; /** The schema model */ schemaModel: OpenAPIV3.SchemaObject; /** * The translation code for the label / title. * Default is "SALAXY.MODEL.[type].title"] or if not available, just the type text. */ label: string; /** * Sets the entire form as read-only. The value is true/1. * Default value false/0, has no real effect: The behavior comes from either input or schema. * Individual field may still be set read-only=false/1 to make it editable. */ readOnly: string; /** If true, the schema loading is ready: The form can be rendered. */ isReady: boolean; /** * URL for the Open API document that contains the definition for the type. * The url can be an absolute url, relative url or an url with salaxy-secure/ -prefix. * The salaxy-secure/ -prefix will be replaced in runtime with the salaxy api server url of the curren environment. */ openApi: string; /** References a schema document directly: the schema document is not fetched from the UI */ openApiDoc: any; /** If true, shows the debugger view for the form. */ debugger: boolean; /** Unique id for the form. Init assures that this is unique in the AngularJs root scope. */ id: string; /** The angular form with validation etc. */ ngForm: angular_2.IFormController; /** If true, the inner for is auto-generated. */ autoGen: boolean; private lastUniqueId; private _info; _type: string; constructor(jsonSchemaService: JsonSchemaService, $rootScope: angular_2.IRootScopeService, uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService); /** Initializes the controller */ $onInit(): void; /** * Type of the model: Bases for the user interface. * This may be either a TypeScript typename or OpenApi schema component name. */ get type(): string; set type(value: string); /** Initializes or re-initializes the data model. */ init(): void; /** * Registers an input (control) to a data point in the form. * @param path Data path that the input registers to. * This should be either "form" to register to the root of the form or * more typically "form.prop.perhapsSubProperty" to register to a property. */ registerInput(path: string, type?: JsonInputType, format?: string): { /** Description of the property or if path is "form" the data model of the form. */ prop: JsonSchemaProperty; /** True, if the element is the form root. Otherwise this is a property. */ isRoot: boolean; /** Unique ID within the form */ id: string; /** AngularJS template for rendering the input. */ templateUrl: string; /** Metadata that can be used for rendering the input */ input: InputMetadata; }; /** * Gets the model for a property that an invidual input within the form can bind to. * @param path Property path, currently always starting with "form.", * e.g. "form.id" or "form.employer.accountId" */ getProperty(path: string): JsonSchemaProperty; /** * Sets a value in the model using property path. * @param path Property path, currently always starting with "form.", * e.g. "form.id" or "form.owner.id" * @param value Value to set to model. * @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). */ setValue(path: string, value: any): boolean; /** * Gets a value from the model using property path. * @param path Property path, currently always starting with "form.", * e.g. "form.id" or "form.owner.id" */ getValue(path: string): any; /** Gets the validation based on the current form. */ getValidation(): ApiValidation; /** Returns the namespace for the current openApi model, the default is SALAXY.MODEL */ getModelNamespace(): string; /** Returns the namespace for the current openApi enums, the default is SALAXY.ENUM */ getEnumNamespace(): string; protected registeredInputs: { [key: string]: JsonSchemaProperty; }; private getFormPath; /** Gets a unique id to form components / inputs. This may later further track the inputs. */ private getUniqueId; } /** * Controller for misc form elements that are not inputs: * These are not bound to models, but handle misc. form layout and grouping tasks. */ export declare class SxyFormElementController implements angular.IController { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** * Typing depending on the component. * * - sxy-alert: "default" | "primary" | "success" | "info" | "warning" | "danger" */ type: "default" | "primary" | "success" | "info" | "warning" | "danger" | string; /** * For sxy-fieldset, defines the model that the fieldset should generate fields for. * Should be "form" to refer to the current form or property path starting * with "form", e.g. "form.result.employerCalc" */ model: string; /** * For alerts, possibility to speicfy a font-awesome icon. * Setting "none", will show no icon. * If not set, it is determined by type. */ icon: "none" | string; constructor(); /** Initializes the controller */ $onInit(): void; /** For alert component, gets the classes that format the alert. */ getAlertClasses(): string; /** Returns the icon based on the type. */ getAlertIcon(): string | null; } /** * Shows a grid component for view / edit of arrays. * @example * ```html * * ``` */ export declare class SxyGrid extends ComponentBase { /** sxy-form is optional */ require: { form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { schemaDef: string; doc: string; schema: string; data: string; include: string; exclude: string; }; /** Uses the SxyGridController */ controller: typeof SxyGridController; /** The default template for the component. */ defaultTemplate: string; } /** Provides Grid UI for viewing and editing arrays. */ export declare class SxyGridController implements angular_2.IController { private jsonSchemaService; private uiHelpers; private $element; private $timeout; private fileService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Default bindings to the components */ static bindings: { /** * The schema definition that defines the structure of the grid. */ schemaDef: string; /** * URL of the schema document that contains the schemaDef. * If set with schema in init, loads the document. */ doc: string; /** * Key of schemaDef in doc. * If set with doc in init, will load the schema document from server and set the schemaDef. */ schema: string; /** Data that is rendered / edited in the grid. */ data: string; /** * List of columns to include in the grid. Raw field names - may be a property tree. */ include: string; /** * List of columns to exclude from the grid. * This property is currenlty used only if include property is undefined, i.e. in default * rendering, which will render the first-level properties. As such, exclude does not really support property paths. */ exclude: string; }; /** * URL of the schema document that contains the schemaDef. * If set with schema in init, loads the document. */ doc: string; /** * Key of schemaDef in doc. * If set with doc in init (and schemaDef not set), * will load the schema document from server and set the schemaDef. */ schema: string; /** Data that is rendered / edited in the grid. */ data: any[]; /** * List of columns to include in the grid. Raw field names - may be a property tree. */ include: string | string[]; /** * List of columns to exclude from the grid. * This property is currenlty used only if include property is undefined, i.e. in default * rendering, which will render the first-level properties. As such, exclude does not really support property paths. */ exclude: string | string[]; /** Array of items that is selected in the grid. These are grid nodes, not data items. */ selection: any[]; /** * The grid options * TODO: Consider adding at least some typing. */ private gridOptions; private isInitDone; _schemaDef: OpenAPIV3.NonArraySchemaObject; constructor(jsonSchemaService: JsonSchemaService, uiHelpers: UiHelpers, $element: JQLite, $timeout: angular_2.ITimeoutService, fileService: FileService); /** Initializes the controller */ $onInit(): void; /** * The schema definition that defines the structure of each item in the grid. */ get schemaDef(): OpenAPIV3.NonArraySchemaObject; set schemaDef(value: OpenAPIV3.NonArraySchemaObject); /** * Adds an empty row to the grid. * @param rowData Data to add to the grid. Array of of objects. * @param index Index position. If null, will add to the end. */ addRow(rowData?: any[], index?: null): void; /** Delete the selected rows from the grid. */ deleteSelectedRows(): void; /** Clears all rows in the grid. Sets the data to an empty array. */ clear(): void; /** Commits the changes in the grid to the source data. */ commit(): void; /** * Validates a single item based on the schema. * @param item Item to validate */ validateItem(item: any): ApiValidation; /** * Takes an input object with string based data and maps to correct typing or empty objects. * E.g. "2" => 2, "True" = true. Original data is not changed and only data in schema is returned. * Keep the method in sync with validateItem. * @param item Item to convert as typed item. * @returns Typed item */ convertTypes(item: any): any; /** Gets the exportable for the current data model. */ getExportable(): Exportable; /** Gets the importable for the current data model. */ getImportable(): Importable; /** Available object mapper for import based on the current schema. */ private getMapper; private initModel; /** Gets the fields based on include OR exclude and schema defs definitions. */ private getFields; private renderGrid; } /** * Shows an input control with label, validation error, info etc. * @example * ```html * * ``` */ export declare class SxyInput extends ComponentBase { /** sxy-form is required */ require: { form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { model: string; label: string; type: string; format: string; readOnly: string; disable: string; require: string; minimum: string; maximum: string; multipleOf: string; include: string; exclude: string; }; /** * Transclude optional templates for input parts. * Currently supports form, but may later support header, footer etc. */ transclude: { /** Defines the inner form of Array dialogs and later potentially other dialogs and sub-forms */ form: string; }; /** Uses the SxyIptController */ controller: typeof SxyInputController; /** The default template for the component. */ defaultTemplate: string; } /** Handles user interface logic for different form inputs components (including select etc.) */ export declare class SxyInputController implements angular_2.IController { private uiHelpers; private $transclude; private $element; private fileService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Default bindings to the components */ static bindings: { /** * Model in the form. Currently always starts with "form." to bind to main data object of the form. * For fieldset, this may also be just "form" to bind to main model in form (not a property). */ model: string; /** Possibility to override the label. */ label: string; /** * Type of the input component as one of JSON schema types: * 'boolean', 'object', 'number', 'string', 'integer' or 'array'. * Typically, this will be inferred from the model, but you may set it explicitly if the property is not yet in the model. */ type: string; /** * Format of the input component as JSON schema format: * Examples include "multiline", "date" (string) and "radio", "checkbox" (boolean). */ format: string; /** * True or false forces the read-only mode on the input regardless of the default value. * This "read-only" attribute behaves differently than the HTML "readonly" attribute: * The value is boolean (true/1 or false/0). Non existent attribute or empty/null uses * the default value from metadata (API model) or from the form. * Also, the input will become fully read-only view without any form control. */ readOnly: string; /** * True or false forces the disabled mode on the input. * This "disable" attribute behaves differently than the HTML "disabled" attribute: * The value is boolean (true/1 or false/0). Non existent attribute or empty/null * uses the default value: Currently always false, but may later come from metadata. */ disable: string; /** * True or false forces the required mode on the input. * This "require" attribute behaves differently than the HTML "required" attribute: * The value is boolean (true/1 or false/0). Non existent attribute or empty/null * uses the default value from metadata (API model). */ require: string; /** * Minimum value of the field */ minimum: string; /** * Maximum value of the field */ maximum: string; /** * Multiple of (step) of the value */ multipleOf: string; /** * For arrays, fieldsets and other components that enumerate children, * defines which children are shown (taken to inputs collection). * Comma separated list of property names. */ include: string; /** * For arrays, fieldsets and other components that enumerate children, * defines which children are hidden (excluded from inputs collection). * Comma separated list of property names. */ exclude: string; }; /** Auto-generated unique id of the input */ id: string; /** * Auto-generated name of the input. * Currently, the same as ID, but this may change in the future. * E.g. to make it more compatible with form POST (no id numbers etc.). */ name: string; /** Model in the form. Currently always starts with "form." to bind to main data object of the form. */ model: string; /** * Possibility to override the label (default is "SALAXY.MODEL.[TypeName].[propName].title"). * Translated by default, if translation not found, shown as is. * If starts with dot, will be interpreted as just the last part of the key, * e.g. ".specialLabel" will fetch key "SALAXY.MODEL.[TypeName].[propName].specialLabel". */ label: string; /** Schema of the property */ schemaModel: OpenAPIV3.SchemaObject | null; /** Name of the parent schema (data model). Used in language keys. */ parentSchemaName: string; /** Name of the property to which this input is bound in the parentSchema. */ propertyName: string; /** SxyForm component that holds the data model and submit / reset logic etc. */ form: SxyFormController; /** * Type of the input component as one of JSON schema types: * 'boolean', 'object', 'number', 'string', 'integer' or 'array'. * Typically, this will be inferred from the model, but you may set it explicitly if the property is not yet in the model. */ type: JsonInputType; /** * Format of the input component as JSON schema format: * Examples include "multiline", "date" (string) and "radio", "checkbox" (boolean). */ format: string; /** * The read-only value as the user set it in the "read-only" attribute * True or false forces the read-only mode on the input regardless of the default value or * the read-only attribute set in the sxy-form level. * This "read-only" attribute behaves differently than the HTML "readonly" attribute: * The value is boolean (true/1 or false/0). Non existent attribute or empty/null uses * the default value from metadata (API model) or from the form. * Also, the input will become fully read-only view without any form control. */ readOnly: string; /** * True or false forces the disabled mode on the input. * This "disable" attribute behaves differently than the HTML "disabled" attribute: * The value is boolean (true/1 or false/0). Non existent attribute or empty/null * uses the default value: Currently always false, but may later come from metadata. */ disable: string; /** * True or false forces the disabled mode on the input. * This "require" attribute behaves differently than the HTML "required" attribute: * The value is boolean (true/1 or false/0). Non existent attribute or empty/null * uses the default value from metadata (API model). */ require: string; /** * Minimum value */ minimum: number | null; /** * Maximum value */ maximum: number | null; /** * Multiple of (step) of the value */ multipleOf: number | null; /** Template URl that is used for rendering the input. */ templateUrl: string; /** Input metadata from the schema resolving process. */ input: InputMetadata; /** * For arrays, fieldsets and other components that enumerate children, * defines which children are shown (taken to inputs collection). * Comma separated list of property names. */ include: string | string[]; /** * For arrays, fieldsets and other components that enumerate children, * defines which children are hidden (excluded from inputs collection). * Comma separated list of property names. */ exclude: string | string[]; constructor(uiHelpers: UiHelpers, $transclude: angular_2.ITranscludeFunction, $element: JQLite, fileService: FileService); /** Initializes the controller */ $onInit(): void; /** * Gets the formatted value for the input depending on the data type. * @param childName For object arrays, gets the value for the specified child input. * @param index For object the index of the item in the array. * May later support other child scenarios. */ formatValue(childName?: string, index?: number): any; /** * Gets the label for the input. * Default is "SALAXY.MODEL.[TypeName].[propName].title" in the dictionary. * @param childName For object arrays, gets the label for the specified child input. * May later support other child scenarios. */ getLabel(childName?: string): string; /** Gets the description for the input */ getDescr(): string; /** Gets the read-only value based on defaults and explicit values. */ getReadOnly(): boolean; /** Gets the minimum value */ getMinimum(): number; /** Gets the maximum value */ getMaximum(): number; /** Gets the multipleOf value */ getMultipleOf(): number; /** Gets the minimum length value for string input */ getMinLength(): number; /** Gets the maximum length value for string input */ getMaxLength(): number; /** Gets the minimum length value for string input */ getPattern(): string; /** Gets the require value based on defaults and explicit values. */ getRequire(): boolean; /** Gets the disable value based on defaults and explicit values. */ getDisable(): boolean; /** Gets or sets the value in the model */ get value(): any; set value(value: any); /** * For datatype "object", gets the inputs for child properties. * For datatype "array", gets the inputs for items. * For other types, gets an array with single input for that type * (TODO: Does this make sense? It is essentially the same as parent). * @param defaultTop Returns top n children. * If include is specified (fields are hand-picked), this proeprty is ignored. */ getChildInputs(defaultTop: number): InputMetadata[]; /** * Shows an edit dialog for item. * @param item Item to edit * @param index Index of the item in the current model array if available. */ edit(item: any, index: number): Promise>; /** * Deletes an item (currently no "Are you sure?") * @param item Item to delete * @param index Index of the item in the current model array. This is currently required. */ delete(item: any, index: number): void; /** * Move an item in the array up one position. * @param index Index of the item in the current model array. */ moveUp(index: number): void; /** * Move an item in the array down one position. * @param index Index of the item in the current model array. */ moveDown(index: number): void; /** * Creates a new item to the current array. * @param item Item to add. If not specified (default), shows an edit dialog for creating the item. */ createNew(item?: any): Promise>; /** * Gets an array total for view purposes * @param field Name of the field for which the total is calculated * @param type Type of calculation. Currently only sum is supported, but others may be added (e.g. "avg"). */ getTotal(field: string, type?: "sum"): number; /** * Gets the options for enumerations based on schema. * For an array, gets the options for item enumeration. */ getEnumOptions(): InputEnumOption[]; /** * Gets the format assuring that it is of supported type. * Currently, there is only special logic for enums. */ getFormat(): string; /** Gets the exportable for the current data model: For exporting an array. */ getExportable(): Exportable; private initModel; } /** * Open API schema editor: Used for editing schemas is usecases. * @example * ```html * * ``` */ export declare class SxySchemaEditor extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { model: string; }; /** Uses the SxyInputController */ controller: typeof SxySchemaEditorController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for schema editing user interfaces. Current implementation is OpenAPI V3 schema editing. */ export declare class SxySchemaEditorController implements angular_2.IController { private jsonSchemaService; private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Schema object that is being edited. */ model: OpenAPIV3.SchemaObject; types: (InputEnumOption & { formats: InputEnumOption[]; })[]; constructor(jsonSchemaService: JsonSchemaService, uiHelpers: UiHelpers); /** Initializes the controller */ $onInit(): void; /** Adds a new property to the current schema */ addProperty(): void; /** Deletes a property from the schema. */ deleteProperty(key: any): void; /** Gets the formats for given type */ getFormats(type: string): InputEnumOption[]; } /** * Renders a read-only table based on a schema and ata. * @example */ export declare class SxyTable extends ComponentBase { /** Component bindings. */ bindings: { /** The schema definition that defines the structure of the grid. */ schemaDef: string; /** URL of the schema document that contains the schemaDef. If set with schema in init, loads the document.*/ doc: string; /** Key of schemaDef in doc. If set with doc in init, will load the schema document from server and set the schemaDef.*/ schema: string; /** Data that is rendered / edited in the grid. This is either an array or an object that implements getTabulatorConfig() method for ajax data.*/ data: string; /** * List of columns to include in the grid. * This may be an array or comma separated string of field names (or a property tree, e.g. "owner.avatar.displayName"). * Alternatively, the entries in the array may be be full Tabulator column definitions, where `field` propererty defines the * data item and fetches the default properties from the schema. */ include: string; /** * List of columns to exclude from the grid. * This property is currenlty used only if include property is undefined, i.e. in default * rendering, which will render the first-level properties. As such, exclude does not really support property paths. */ exclude: string; /** Additional configuration for the table in init. */ options: string; /** After init, exposes the Tabulator for calling methods. */ tabulator: string; /** * Gets the state of filters or sets the initial state of filters. * By default, the filters are not shown before showFilters() function is called. * If the property / attribute is set to true before initial render, the filters are shown. * Use showFilters() function to show or hide the filters after initial render. */ filters: string; }; /** Uses the SxyTableController */ controller: typeof SxyTableController; /** The default template for the component. */ defaultTemplate: string; } /** * Sxy form contains the definition for an editor used interface that * typically corresponds to an HTML form. */ export declare class SxyTableController implements angular_2.IController { private jsonSchemaService; private $element; protected $timeout: angular_2.ITimeoutService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * The schema definition that defines the structure of the grid. */ schemaDef?: OpenAPIV3.NonArraySchemaObject; /** * URL of the schema document that contains the schemaDef. * If set with schema in init, loads the document. */ doc?: string; /** * Key of schemaDef in doc. * If set with doc in init, will load the schema document from server and set the schemaDef. */ schema?: string; /** * Data that is rendered / edited in the grid. * This is either an array or an object that implements getTabulatorConfig() method for ajax data. */ data?: any[] | { getTabulatorConfig: () => Options; }; /** * List of columns to include in the grid. * This may be an array or comma separated string of field names (or a property tree, e.g. "owner.avatar.displayName"). * Alternatively, the entries in the array may be be full Tabulator column definitions, where `field` propererty defines the * data item and fetches the default properties from the schema. */ include?: string | (string | ColumnDefinition)[]; /** * List of columns to exclude from the grid. * This property is currenlty used only if include property is undefined, i.e. in default * rendering, which will render the first-level properties. As such, exclude does not really support property paths. */ exclude?: string | string[]; /** Additional configuration for the table in init. */ options?: SxyTableOptions; /** After init, exposes the Tabulator for calling methods. */ tabulator?: TabulatorFull; /** * Gets the state of filters or sets the initial state of filters. * By default, the filters are not shown before showFilters() function is called. * If the property / attribute is set to true before initial render, the filters are shown. * Use showFilters() function to show or hide the filters after initial render. */ filters: boolean; /** * By default, the header filters are not shown before showFilters() function is called. * This is the place where the filter definitions are stored in the mean time. */ filterDefinitions: { [key: string]: Editor; }; private tableConfigCache; constructor(jsonSchemaService: JsonSchemaService, $element: JQLite, $timeout: angular_2.ITimeoutService); /** Initializes the controller */ $onInit(): void; /** Intialises settings */ init(): Promise; /** * Method used to refresh table if data, include, exclude or options changes */ refresh(): void; private renderTable; private assureArray; private getFields; private setDefaultFormatter; } /** * Configuration object for SxyTable: * Extends Tabulator Options with events and potentially some SxyTables specific options in the future. */ export declare interface SxyTableOptions extends Options { /** Event handlers that are added to Tabulator after it has been created. */ events?: Partial; } /** * 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. */ 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", /** Local environment */ EnvLocal = "envLocal", /** Test environment */ EnvTest = "envTest", /** Demo environment */ EnvDemo = "envDemo", /** Production environment */ EnvProd = "envProd", /** Release candidate environment */ EnvRc = "envRc" } /** * Component for a single tab pane in the tabs control. * Shows a navigation header and a tab pane. * Contains salaxy-tab-heading element for the tab header. * Contains salaxy-tab-content element for the tab pane content. * The disable attribute can be used to disable the tab. * The index attribute can be used to name the tab. The index * is used in setting the active tab in the salaxy-tabs element using the active attribute. * @example * ```html * * * Tab number one * *

Tab one content

*
*
* * Tab number two * *

Tab two content

*
*
* * *

Tab three content

*
*
*
* ``` */ export declare class Tab extends ComponentBase { /** Require salaxy-tabs */ require: { tabsCtrl: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Index/name for the tab. */ index: string; /** Disable tab attribute. */ disable: string; /** Text heading. */ heading: string; /** Selection event handler */ onSelect: string; }; /** Uses the TabController */ controller: typeof TabController; /** The default template for the component. */ defaultTemplate: string; /** Transclusion */ transclude: { content: string; heading: string; }; } /** * Component for tab buttons selectors. * Shows a navigation header. * The disable attribute can be used to disable the tab. * @example * ```html * * * ``` */ export declare class TabButtons extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { currentTab: string; options: string; tabsId: string; defaultTab: string; updateTabParam: string; }; /** Uses the TabButtonsController */ controller: typeof TabButtonsController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for the tab buttons control. */ export declare class TabButtonsController implements angular_2.IController { private $location; private $timeout; private $scope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Tab Options: * - `value`: Unique identifier for the tab. * - `label`: The text displayed for the tab in the UI. * - `isDefault`: If `true`, this tab will be selected by default. * - `hidden`: If `true`, the tab will be hidden based on certain conditions or parameters. */ options: { value: string; label: string; isDefault?: boolean; hidden?: boolean; }[]; currentTab: string; tabsId: string; defaultTab: string; updateTabParam: boolean; elemDefaultTab: string; /** * Creates a new TabButtonsController. * @ignore */ constructor($location: angular_2.ILocationService, $timeout: angular_2.ITimeoutService, $scope: angular_2.IScope); /** Sets default tab value on component initialization. If default tab is not manually set, defaults to the first tab in the options list. */ $onInit(): void; /** * Shows a tab programmatically. * @param tabValue Tab's id text value. */ showTab(tabValue: string): void; /** * Updates url value of selected tab. * @param tabValue Selected tab. */ private updateUrlTab; /** * Clears previously selected tabs (removes classes). */ private clearSelection; /** * Return the text value for tab button, either a translation or numerical value. * @param tabText Tab text value to be returned. * @returns Tab button text. */ getTabText(tabText: any): string | number; } /** * Controller for a single tab pane in the tabs control. */ export declare class TabController implements angular_2.IController { private $element; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Tabs controller */ tabsCtrl: TabsController; /** Selected tab flag. */ selected: boolean; /** Flag to disable tab. */ disable: boolean; /** Unique name/id for the tab. */ index: any; /** Text heading for the tab */ heading: string; /** Selection event handler */ onSelect: (args: { /** Selection event. */ $event: angular_2.IAngularEvent; }) => void; /** Heading DOM node for the tab. */ headingElement: null; /** Content DOM node for the tab. */ contentElement: null; /** Sorting field */ sort: number; /** * Creates a new TabController. * @ignore */ constructor($element: any); /** * Change event handler. Re-sets the one-way bound fields. * This is needed, because the parent scope cannot detect the changes without the re-set. */ $onChanges(changes: any): void; /** * Registers this tab to the tabs controller. * Passes the heading DOM element to be displayed in the header. */ $onInit(): void; /** * De-registers this tab from the tabs controller. */ $onDestroy(): void; /** * Tries to find the element with ng-transclude='heading' attribute. * @param el - Element to check. */ private findTranscludeElement; private getPosition; private findParentTag; private findChildren; } /** File format for a table. */ declare enum TableFormat { /** Tab separated table. */ Txt = "txt", /** Comma separated table. */ Csv = "csv", /** Excel formatted table. */ Xlsx = "xlsx" } /** * Component for a tabs control. * Shows navigation headers and tab panes. * Contains one or more salaxy-tab elements, each for one tab. * The active-attribute shows/sets the current active tab. * @example * ```html * * * Tab number one * *

Tab one content

*
*
* * Tab number two * *

Tab two content

*
*
* * *

Tab three content

*
*
*
* ``` */ export declare class Tabs extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Expression for active tab in the tabset */ active: string; }; /** Uses the TabsController */ controller: typeof TabsController; /** The default template for the component. */ defaultTemplate: string; /** Transclusion */ transclude: boolean; } /** * Controller for the tabs control. */ export declare class TabsController implements angular_2.IController { /** * For NG-dependency injection * @ignore */ static $inject: never[]; /** Tabs array. Contains all registered tabs. */ tabs: TabController[]; active: string; /** * Creates a new TabsController. * @ignore */ constructor(); /** Set the values and defaults on init */ $onInit(): void; /** * Registers a single tab to this controller. * @param tab - Tab to register. */ register(tab: TabController): any; /** * De-registers a single tab from this controller. * @param tab - Tab to de-register. */ deregister(tab: TabController): void; /** * Sets the selected tab as selected. * @param selectedTab - Selected tab. */ select(selectedTab: TabController, evt?: angular_2.IAngularEvent): void; private findIndex; private setSortOrder; } /** The information about tax at source, typically from non-resident taxcard (lähdeverokortti) for non-residents. */ 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; } /** 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. */ declare interface Taxcard { /** The Worker, whose salaries are paid based on this tax card. */ worker?: Avatar_2 | 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; } /** TaxcardApiIncomeType enumeration */ 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" } /** * UI logic for viewing, adding new and editing taxcards. * You can edit a single taxcard (model to object, id or parent controller). * Note that creating a new taxcards requires setting Personal ID. * You can create a new one by setting the model as "new" (full add new UI) as well as null (quick buttons). */ export declare class TaxcardCrudController extends ApiCrudObjectController { private fullApi; private uiCrudHelpers; private uploadService; private sessionService; private $timeout; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Mode is either "pro" (for admin / PRO-ui) or "default" */ mode: "pro" | "default"; /** * True if the taxcard is uploaded for the current Worker account (as opposed to Worker of an Employer) . * This should typically not be set: It will be set by init (if current account is Worker) and personalId (if 'self' or personal id matches). */ isSelf: boolean; /** The upload progress 0-100 */ uploadProgress: number; /** Edit taxcard form: Used for checking the validity. */ editForm: angular_2.IFormController; /** * Today is explicitly defined, so that it can be changed in testing. */ today: string; /** Settings / instructions for the "Create new" UI (show/hide inputs, formatting etc). */ addNewUi: any; /** If true, does not show the save / current buttons - the parent must show them. */ hideButtons: boolean; /** Type of employment taxcard */ employmentRelationTaxcardType: EmploymentRelationTaxcard; /** Possible taxcard kinds that should be available for current role to select. */ kindSelection: string; /** * Event that is called when a taxcard is saved and the parent UI probably needs to be refreshed. * @example */ onSave: (eventData: { /** The selected item. */ item: Taxcard; }) => void; /** Flags to indicate if the request is in progress */ loaders: any; private _personalId; private currentChartConfig; constructor(fullApi: Taxcards, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, uploadService: UploadService, sessionService: SessionService, $timeout: angular_2.ITimeoutService); /** * Implement IController */ $onInit(): void; /** * Either a valid Finnish Personal ID or "self" for the current Worker account. * Required for creating a new taxcard: The personal ID is used for setting the connection to Worker account or self. * The personal id is used when binding is null (buttons for create new) or "new" (actual new UI). */ get personalId(): string | "self"; set personalId(value: string | "self"); /** Returns true if one of the edit forms is shown ad if it is valid. */ get isFormValid(): any; /** * Gets the chart type that should be shown. * Type "preview" means no chart: Only show the preview image of the card. */ get chartType(): "preview" | "full" | "pie" | "none"; /** * Gets a row for data binding of external salaries paid outside Salaxy system. * Will create the row if it does not exist. The save method will remove any empty rows. */ get previousSalariesRow(): TaxCardIncome | null | undefined; /** * Starts the reload process depending on the bindingMode: */ reload(): Promise; /** Gets the user interface mode: The UI view that is shown by the component. */ getMode(): "pro" | "new" | "default" | "null" | "no-personal-id"; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string | null; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Shows the detail view for the item. * Typically, this takes the user to a new page with the ID. * @param item Item may be either Container or list item. */ showDetails(item: Taxcard | IUserObjectIndex | TaxcardListItem): angular_2.ILocationService; /** Save changes to the current item and then calls the on-save event. */ save(): Promise; /** * Saves the taxcard and checks the diff after save: * If there are paid calculations that should be added to the taxcards, shows a dialog for that. */ saveCheckDiff(): Promise; /** * Starts the "Add new" process for the tax card. * By default we do not allow modifying taxcards to the end-user (only allowed for PRO-users). * Instead, they will always add a new taxcard. * Note: This method breaks the existing model binding of the controller and binds model="'new'". */ showAddNew(): void; /** * Sets auto taxcard and saves it */ setAuto(): Promise; /** Shows the user interface for editing the minimum percent. */ editTaxPercentMin(): void; taxcardKindOptions: { auto: string; defaultYearly: string; replacement: string; noTaxCard: string; noWithholdingHousehold: string; }; taxcardKindOptionsV2: { defaultYearly: string; replacement: string; noTaxCard: string; noWithholdingHousehold: string; }; /** Edit income log. */ editIncomeLog(): void; /** * Resets the current taxcard as new. * @param kind If specified, reset the taxcard to the given type. */ resetAsNew(kind?: TaxcardKind): void; /** Handles change of the year in the years dropdown. */ yearChanged(): void; /** * Returns the url where to download the tax card * @param taxCard Taxcard or if null, the current is used. */ getTaxcardDownloadUrl(taxCard?: Taxcard): string; /** * Returns the url where to preview the tax card * @param taxCard Taxcard or if null, the current is used. */ getTaxcardPreviewUrl(taxCard?: Taxcard): string; /** * Returns the url where to preview the tax card in upload scenario. * When uploading (adding a new taxcard) the taxcard is not necessarily saved so the preview cannot be fetched based on taxcard id. * On the other hand we are always in current user context (current user is the file owner), so we can use previewUri directly * @param taxCard Taxcard or if null, the current is used. */ getUploadPreviewUrl(taxCard?: Taxcard): string; /** * Uploads tax card to the server. * @param file - selected file */ uploadTaxCard(file: any): void; /** * Gets main chart configuration for * @param taxcard current taxcard */ getMainChartConfig(taxcard: Taxcard): any; /** * Gets pie chart configuration for * @param taxcard current taxcard */ getPieChartConfig(taxcard: Taxcard): any; /** * Checks if the tax card is expired * A tax card still valid in the next year's January */ isTaxCardExpired(taxCard: Taxcard): boolean; /** * Gets a language versioned error description ng-file-upload invalidFile errors (client-side before actual upload). * @param invalidFile Invalid file of ng-file-upload component. */ getInvalidFileDescription(invalidFile: any): string; /** * Adds a new taxcard for list item and after adding updates the current list without going to server. * This is needed because refreshing of the list may not provide the correct results as search is asynchronous. */ showTaxCardAddDialogForTaxCardsList(listItem: TaxcardListItem): void; /** Commits the DIFF's to storage: synchs the taxcard to actual paid calculations. */ commitDiff(): void; /** * Shows a dialog during the check of auto taxcard. */ showRefreshAutoTaxcardDialog(): void; /** Defines which fields to show/hide, require etc. in the view */ private updateUISettings; } /** Tax card specific business data for index. */ 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; } /** * Shows the editor for a taxcard. * @example * ```html * * ``` */ export declare class TaxcardDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** Mode is either "pro" (for admin / PRO-ui) or "default" */ mode: string; /** * Either a valid Finnish Personal ID or "self" for the current Worker account. * Required for creating a new taxcard: The personal ID is used for setting the connection to Worker account or self. */ personalId: string; /** * Event that is called when a taxcard is saved and the parent UI probably needs to be refreshed. * @example */ onSave: string; /** If true, does not show the save / current buttons - the parent must show them. */ hideButtons: string; /** Type of employment taxcard */ employmentRelationTaxcardType: string; detailsUrl: string; listUrl: string; model: string; /** Type of employment taxcard */ isReadOnlyForced: string; }; /** Uses the TaxcardCrudController */ controller: typeof TaxcardCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Defines income that is recorded in a Taxcard: A paid salary calulation, income from previous employers or other salaries that affect the income calculation. */ 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; } /** * Shows view / editor table for the income log of taxcard. * @example * ```html * * ``` */ export declare class TaxcardIncomeLog extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: TaxcardIncomeLogBindings; /** Uses the TaxcardIncomeLogController */ controller: typeof TaxcardIncomeLogController; /** The default template for the component. */ defaultTemplate: string; } declare class TaxcardIncomeLogBindings extends ListControllerBaseBindings { /** If true, the list can be edited, by default it is read-only. */ editable: string; } /** * Handles user interface logic for viewing and editing the income log within a taxcard. */ export declare class TaxcardIncomeLogController extends ListControllerBase { protected uiHelpers: UiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** If true, the list can be edited, by default it is read-only. */ editable: boolean; /** * Creates a new TaxcardIncomeLogController. */ constructor(uiHelpers: UiHelpers); /** List that is edited */ get list(): TaxCardIncome[]; /** * Shows the edit dialog. * @param item Item to edit or string "new" for creating a new one. * @param isNew Optional way of specifying that the item is a new item (with default values, not yet added to the list). * If item is string "new", this parameter will have no effect (will always be true). */ showEditDialog(item: TaxCardIncome | "new", isNew?: boolean): null | undefined; /** Gets the URL for the log entry edit dialog. */ getEditDialogTemplateUrl(): string; /** Gets a new blank entry with default values. */ getBlank(): TaxCardIncome; /** Returns true, if the calculations paid are different than the calculations in the income log. */ get hasDiff(): boolean; /** Gets a sum from the list */ getSum(field: "tax" | "income"): number; /** Returns true if the row is read-only */ isReadOnly(row: TaxCardIncome): boolean; } /** TaxCardIncomeType enumeration */ 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. */ 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_2 | 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 */ declare enum TaxcardKind { Undefined = "undefined", NoTaxCard = "noTaxCard", Auto = "auto", DefaultYearly = "defaultYearly", Replacement = "replacement", NoWithholdingHousehold = "noWithholdingHousehold", Others = "others", Historical = "historical" } /** * Shows a list of taxcards * @example * ```html * * ``` */ export declare class TaxcardList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * Function that is called when user selects an item in the list. * Note that the event is called only in the selections (single and multi). * Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items. * @example */ onListSelect: string; /** Selected items for the case where the list is used as a select list (as opposed to link list). */ selectedItems: string; /** Type of the view. Currently supports "default", "panel" and "select" */ mode: string; /** OData query options */ options: string; }; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** List item of taxcard searches. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** * Shows a UI for editing a manual taxcard. * Typically, this is only used for adding a new tacard: You should not edit existing taxcards except in very limited scenarios (admin/pro). * @example * ```html * * * ``` */ export declare class TaxcardManualEdit extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The taxcard that is being edited */ current: string; }; /** Uses the ODataQueryController */ controller: typeof TaxcardManualEditController; /** The default template for the component. */ defaultTemplate: string; } /** * UI logic for adding new manual taxcards. * Designed to be used in a modal dialog: You must pass personal ID for the Worker in EditDialogParameters. */ export declare class TaxcardManualEditController { private sessionService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The current taxcard that is being edited. */ current: Taxcard; /** Edit taxcard form: Used for checking the validity. */ editForm: angular_2.IFormController; /** * Today is explicitly defined, so that it can be changed in testing. */ today: string; /** If true, shows the today edit box (in test only) */ showToday: boolean; /** Settings / instructions for the "Create new" UI (show/hide inputs, formatting etc). */ addNewUi: { /** If true, shown the 1st tax percent */ showTaxPercent: boolean; /** If true, shown the income limit AND 2nd tax pecent. */ showIncomeLimit: boolean; /** If true, the require the income limit AND 2nd tax percent (default yearly). */ requireIncomeLimit: boolean; /** If true, shows input for previous salaries paid. */ showPreviousSalariesPaid: boolean; /** If true, the tax percents etc. cannot be edited (no taxcard household or 60%).*/ readonly: boolean; /** Options for the start date: currently min and max dates. */ startDateOptions: { minDate: string; maxDate: string; } | null; /** * Years that are allowed in the year selection: * Current year + next year in December, previous year in January. */ yearsAllowed: number[] | null; }; constructor(sessionService: SessionService); /** * Implement IController */ $onInit(): void; /** Returns true if one of the edit forms is shown ad if it is valid. */ get isFormValid(): any; /** * Gets a row for data binding of external salaries paid outside Salaxy system. * Will create the row if it does not exist. The save method will remove any empty rows. */ get previousSalariesRow(): TaxCardIncome | null | undefined; /** Taxcard kinds that should be allowed for the new manual taxcard. */ taxcardKindOptions: { defaultYearly: string; replacement: string; noTaxCard: string; noWithholdingHousehold: string; }; /** * Resets the current taxcard as new (when the kind changes). * @param kind If specified, reset the taxcard to the given type. */ resetAsNew(kind?: TaxcardKind): void; /** Handles change of the year in the years dropdown. */ yearChanged(): void; /** Sets the current item value keeping the original reference. */ private setCurrent; /** Defines which fields to show/hide, require etc. in the view */ private updateUISettings; } /** Provides the results of the tax card calculation and business logic. */ 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. */ 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. */ 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 | null): 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 | null, 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 | null; /** * 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 | null; /** * 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 | null): Promise>; } /** * Shows a list of workers and their taxcards * @example * ```html * * ``` */ export declare class TaxCardsList extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the ODataQueryController */ controller: typeof ODataQueryController; /** The default template for the component. */ defaultTemplate: string; } /** Basic information about the taxcard: This object has the information printed in SalarySlip etc. but not the full salaries paid to the taxcard etc. */ 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_2 | 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 */ 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. */ 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 | null; } /** TaxcardValidity enumeration */ 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. */ 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_2 | 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 */ 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. */ 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 */ declare enum TaxReportHandling { Default = "default", NoZeroSalaryReport = "noZeroSalaryReport", NoMonthlyReport = "noMonthlyReport", Always = "always" } /** Report template */ declare interface Template { /** Template id */ id: string; /** Owner of the template */ owner: string; /** Template label */ label: string; /** Template configuration*/ config: { columnState?: any; filterModel?: any; columnGroupState?: any; isPivotMode?: boolean; }; /** Boolean indicating if the template is a user template */ isReadOnly: boolean; /** Owners avatar */ avatar?: Avatar_2; } /** Represents a template that can be used to create new business objects or parts of them. */ declare interface Template_2 { /** Short name of the template. */ name?: string | null; /** Longer description of the template. */ description?: string | null; /** Contents of the template. */ packages?: ContentPackage[] | 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; } /** * Controller for template management. */ export declare class TemplateCrudController extends ApiCrudObjectController { isSaving: boolean; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(api: BusinessTemplates, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Select template. */ selectTemplate(): Promise; } /** Template specific business data for index. */ declare interface TemplateData { /** Longer description of the template. */ description?: string | null; } /** * Interceptor for enabling non-cached views. * The interceptor adds a 'v'-query parameter to the template path. * The value of the v-parameter is a timestamp formatted by the given format. */ export declare class TemplateInterceptor { private views; private format; /** * Factory method for creating the interceptor. * Interceptor for enabling non-cached views. * The interceptor adds a 'v'-query parameter to the template path. * The value of the v-parameter is a timestamp formatted by the given format. * @param views - Regex for views folders (template paths), default is /views\// * @param format - DayJs format for the current time based timestamp. default is "YYYYMMDDHH" */ static factory(views?: RegExp, format?: string): { (): TemplateInterceptor; $inject: any[]; }; /** * Constructor for creating a new interceptor. */ private constructor(); /** * Intercepting method for request. * @param config - $http request. */ request: (config: angular.IRequestConfig) => angular.IRequestConfig; } /** Represents a single item in a list of templates in the user interface. */ declare interface TemplateListItem { /** 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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?: TemplateData | 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 helper methods for Handlebars templating. */ declare class Templates { /** * Creates a new instance of the service. */ constructor(); /** * Gets the HTML using the Handlebars template. * @param templateName Name of the template to render. * @param data Data for the template. * @param lang Translation language * @returns HTML as string */ getHtml(templateName: string, data?: any, lang?: string): string; /** * Gets HTML from provided templateContent and data * @param templateContent Template as handlebars HTML / string. * @param data Data for the rendering. * @param lang Translation language * @returns HTML as string */ getHtmlDynamic(templateContent: string, data?: any, lang?: string): string; /** * Register helpers. */ private registerHelpers; private readValue; private runHelper; private readValueOrConstant; private readValueOrConstantOrHelper; private getHelperArgs; private getHelperOptions; private splitParameters; } /** Captures the collection of parameters that different Framework agreements (TES) have. */ 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 */ declare enum TesSubtype { NotSelected = "notSelected", ConstructionCarpenter = "constructionCarpenter", ConstructionFloor = "constructionFloor", ConstructionOther = "constructionOther", ConstructionFreeContract = "constructionFreeContract" } /** * Methods for testing the API. */ 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 */ declare interface TestAccountInfo { /** Bearer token for authentication. */ token?: string | null; /** The current user credentials. */ userCredential?: SessionUserCredential | null; } /** TestEnum enumeration */ 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. */ 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; } /** * Shows a textarea control with label, validation error, info etc. * @example * ```html * * ``` */ export declare class Textarea extends ComponentBase { /** ng-model is required, form tag is optionally used for validation and disabled/readonly */ require: { model: string; form: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; /** The rows property of the textarea. Default is 3. */ disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** Minimum length for the text value, default is 0 (form validation) */ minlength: string; /** Maximum length for the text value, default is 1024 (form validation) */ maxlength: string; /** Regular expression pattern for validation (form validation) */ pattern: string; /** The rows property of the textarea. Default is 3. */ rows: string; }; /** Uses the InputController */ controller: typeof InputController; /** The default template for the component. */ defaultTemplate: string; } /** * Directive for binding text for the element. * The attribute sxy-text should contain the translation key for the text content. * This directive should be used to replace AngularJS expression and translation pipe filter. * Small additions to the beginning and end can be added with pre and ps attributes. * Interpolation parameters for translation can be given using params -attribute. * @example * ```html *
* ``` */ export declare class TextDirective implements angular_2.IDirective { /** * Factory method for the directive creation. * @ignore */ static sxyText(): any; /** * Directive restrictions. * @ignore */ restrict: string; /** * Compile function for the directive. * @ignore */ compile(cElement: any, cAttr: any): any; } /** ThreadedMessageType enumeration */ 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" } /** * Component for timer usecase * @example * ```html * * ``` */ export declare class Timer extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: TimerBindings; /** Uses the WorkerTimerController */ controller: typeof WorkerTimerController; /** The default template for the component. */ defaultTemplate: string; } declare class TimerBindings extends ListControllerBaseBindings { /** The calculation that the component edits (shows in read-only mode). */ timerMode: string; /** * CRUD controller that typically defines the values for url template and */ crudController: string; } /** DEMO / PROTO ONLY: UI prototype for worker side of new Timesheet and usecases functionality. */ export declare class TimesheetWorkerDemoController extends MessageThreadCrudController { private msgApi; private $interval; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** List of entries: This should be stored in local storage. */ entries: never[]; /** Current entry in the entry or editable entry */ currentEntry: { start: Date; end?: Date; total: Date; project?: string; comment?: string; isStarted: boolean; }; projects: { "1234": string; "2345": string; "1345": string; }; private timer; /** Constructor for dependency injection */ constructor(msgApi: MessageThreads, uiHelpers: UiHelpers, uploadService: UploadService, $location: angular_2.ILocationService, $routeParams: any, $anchorScroll: angular_2.IAnchorScrollService, $timeout: angular_2.ITimeoutService, sessionService: SessionService, calculations: Calculations, payrolls: Payrolls, $interval: angular_2.IIntervalService); /** * Implement IController */ $onInit(): void; /** Called when controller is destroyed */ $onDestroy: () => void; /** Resets the timer to zero value */ resetTimer(): void; /** Starts the timer. */ startTimer(): void; /** Starts the timer. */ stopTimer(): void; /** Gets the project text for a project */ getProjectText(key: string): string; /** Gets the total of the timesheets logged today */ getTotal(): Date; private roundDate; private stopTechnicalTimer; calendarDemoData: ({ day: string; date: string; hours: string; isHoliday?: undefined; } | { day: string; date: string; hours: null; isHoliday?: undefined; } | { day: string; date: string; hours: null; isHoliday: boolean; })[]; /** Sets the usecase to a new message thread */ setUsecase(newUsecase: any): void; /** Gets the usecases available for the current Worker-Employer combination. */ getUsecases(): { id: string; icon?: string; pic?: string; title: string; descr: string; }[]; } /** * The ToggleButtons component provides a set of toggle buttons bound to a model. * For each given value string, a unique toggle button is created. Wraps them all inside a group element. * Type can be "block", "row" or "inline". Each is styled differently. * @example * ```html * * ``` */ export declare class ToggleButtons extends ComponentBase { require: { model: string; }; /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { name: string; label: string; required: string; require: string; readOnly: string; readonly: string; disabled: string; labelType: string; labelCols: string; placeholder: string; tooltipHtml: string; tooltipPlacement: string; disableValidationErrors: string; inputMode: string; onSelectFunction: string; inputFormatter: string; getOptions: string; } & { /** The options to be displayed in the toggle buttons. For each given value, a new button is created. */ options: string; /** Display type of toggle buttons: "row", "inline" or "block" */ type: string; /** Type "row" toggle button has an image on top of the the text. */ imgSrc: string; }; /** Uses the ToggleButtonsController */ controller: typeof ToggleButtonsController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for (radio button-like) toggle buttons. */ export declare class ToggleButtonsController implements angular_2.IController { model: angular_2.INgModelController; /** The options to be displayed in the toggle buttons. For each given value, a new button is created. */ options: { value: string; label: string; }[]; /** Types supported: "row" - toggle buttons visualized as blocks with an image, "inline" - text-only blocks in a row, "block" - text-only blocks on top of each other. */ type: string; /** Toggle button's optional image. */ imgSrc: string; constructor(); /** * Handles the click event for the toggle button. * @param {string} value - The value to set for the ngModel. */ onClick(value: string): void; } /** Calculates the total numbers - the ones that are common to Employer and worker. */ 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; } /** TransactionCode enumeration */ 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" } /** Extends UiHelpers methods with business logic (typically save, load etc.) */ export declare class UiCrudHelpers { private uiHelpers; private taxcards; private employments; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new UiCrudHelpers with dependency injection. */ constructor(uiHelpers: UiHelpers, taxcards: Taxcards, employments: Employments); /** * Shows a dialog for editing an existing employment. * If user clicks OK, the changes are saved. * @param employmentId - Identifier of the Workers employment. * @param buttonTypes "default" shows standard save button, * "updateCalc" shows two buttons "ok" for full calc update and "ok-no-rows" update without touching default rows. * @param initialTab - Tab to open. * @returns Dialog result. Note that OK result may be either "ok" or "ok-no-rows". * The latter means that for calculation only worker info should be updated, not the default rows. */ openEditEmploymentDialog(employmentId: string, buttonTypes: "default" | "updateCalc", initialTab?: EmploymentDetailsTabs): Promise>; /** * Opens a wizard dialog for creating a new Employment relation and potentially a manual Taxcard. * If user commits at the end, the changes are saved to both items. * @returns Result only has the Employment item (not taxcard - add if necessary). */ createNewEmployment(): Promise>; /** * Shows the add new taxcard dialog. * If user commits at the end, the changes are saved and the ite is the stored taxcard from server. * @param personalId Worker personal id is required. */ createNewTaxcard(personalId: string): Promise>; /** * Refreshes the automatic taxcard. * @param taxcardId Automatic taxcard id to refresh. * @param salaryDate Salary date for the taxcard. */ refreshAutoTaxcard(taxcardId: string, salaryDate?: DatelyObject): Promise; } /** * Provides misc. user interface helper methods that are related to AngularJS. * Please note that these methods do NOT connect to API (load/save) to separate UI logic from business logic: * The business logic is in separate UiCrudHelpers class. */ export declare class UiHelpers { private $uibModal; private $location; private $rootScope; private $window; private $timeout; private sessionService; private $uibModalStack; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new UiHelpers with dependency injection. */ constructor($uibModal: angular_2.ui.bootstrap.IModalService, $location: angular_2.ILocationService, $rootScope: angular_2.IRootScopeService, $window: angular_2.IWindowService, $timeout: angular_2.ITimeoutService, sessionService: SessionService, $uibModalStack: angular_2.ui.bootstrap.IModalStackService); /** * Shows an edit dialog - typically for a list item, but potentially for some other editable item. * Alternatively, you may use showDialog() if you wish to specify your own controller (with more logic) * @param templateUrl - Template url. * @param item - The item that is being edited. The logic will support change tracking and reset on this item. * @param logic - Additional logic: Helper functions, metadata etc. that view can use to contruct the UI. * @param size - Optional size parameter: sm, lg, xl or ''. Default is empty string (normal size). * @param controller Optional controller for the modal instance. * The item and logic are passed to controller with dependency injection name "EditDialogParameters". * @param options Rarely used dialog options. * @param options.template If set, ignores the templateUrl and uses this inline HTML template instead. * @returns A promise that resolves to the result from the dialog. * @example * this.uiHelpers.showDialog("salaxy-components/modals/account/AuthorizedAccountAdd.html", "AccountAuthorizationController") */ openEditDialog(templateUrl: string, item: TItem, logic: any, size?: "sm" | "lg" | "xl" | "", controller?: string, options?: { template?: string; }): Promise>; private externalWindows; /** * Shows an external dialog that may be in an untrusted domain. * Enables cross-site communication using postMessage events. * @param name Name of the unique window * @param url Url to show in the Window * @param item The item that is being edited. The logic will support change tracking and reset on this item. * @param config Configuration of the opened window. * @param resolver Optional function for checking if the promise is resolved. */ showExternalDialog(name: string, url: string, item: TData, config?: ExternalDialogConfig, resolver?: (ev: { /** The object passed from the other window. */ data: ExternalDialogData; /** The origin of the window that sent the message at the time postMessage was called. */ origin: string; /** A reference to the window object that sent the message */ source: MessageEventSource | null; }) => boolean, /** Optional callback function to hide any loading indicator shown while opening the external dialog. */ hideExternalDialogLoader?: () => void): Promise & { event?: any; }>; /** * Shows a custom dialog using the given controller and templateUrl. * Optionally injects the given data into the controller as 'data'. * NOTE: There is an alternative - more simple - modal dialog pattern openEditDialog() if you do not need a custom controller or windowTemplateUrl. * @param templateUrl - Template url. * @param controller - Controller for the dialog. * @param data - Optional data to inject into the controller. * @param windowTemplateUrl - Optional template url for the window. Defaults to 'salaxy-components/modals/ui/DialogWindow.html'. If "none", no window is used. * @param size - Optional size parameter: sm, lg or ''. * @param backdrop - Optional. Controls the presence of a backdrop. Allowed value true, false (no backdrop) 'static' (default) backdrop is present but modal window is not closed when clicking outside of the modal window. * @returns A promise that resolves to the result from the dialog. * @example * this.uiHelpers.showDialog("salaxy-components/modals/account/AuthorizedAccountAdd.html", "AccountAuthorizationController") */ showDialog(templateUrl: string, controller?: string | any, data?: any, windowTemplateUrl?: string, size?: "sm" | "lg" | "landscape" | "xl" | "", backdrop?: string | boolean): Promise; /** * Close all existing modals from modal stack */ dismissAllModals(): void; /** * Shows a customized loading component (spinner) with an optional message. * Returns an object with a dismiss function to call for closing the dialog. * Note that there is a separate generic directive 'salaxy-loader' for indicating * http-traffic. * @param heading Translation key for heading text for the loader. * Default text is "SALAXY.UI_Terms.loading", but you may set this to null for just the spinner. * @param text Optional translation key for additional text paragraph describing what is happening. * @returns An object with dismiss function to close the dialog. * @example * ```ts * const loader = this.uiHelper.showLoading("SALAXY.UI_Terms.isSaving", "SALAXY.UI_Terms.pleaseWait"); * setTimeout(() => { * loader.dismiss(); * }, 2000); * ``` */ showLoading(heading?: string, text?: string, staticBackdrop?: boolean): { /** Closes the dialog */ dismiss: () => void; /** Changes the heading text after opening */ setHeading: (heading: string) => void; /** Changes the text after opening */ setText: (text: string) => void; }; /** * Shows a confirm dialog. Like window.confirm() in JavaScript. * Returns true if a user clicks OK -button. Otherwise (cancel or close) returns false. * @param heading Heading text of the confirm question as translation key. * @param text Optional additional text paragraph describing what is happening. * @param okText Possibility to override the OK button text. The given text is run through translation. * @param cancelText Possibility to override the Cancel button text. The given text is run through translation. * @param html Optional HTML content to show in the dialog. If provided, text parameter is ignored. * @returns A promise that resolves to true if user clicks OK, otherwise false. * @example * ```ts * this.uiHelpers * .showConfirm("SALAXY.UI_Terms.areYouSure", "SALAXY.UI_Terms.sureToDeleteRecord") * .then((result) => { this.uiHelpers.showAlert("result", result); }) * ``` */ showConfirm(heading: string, text?: string, okText?: string, cancelText?: string, html?: string): Promise; /** * Shows a date range dialog that modifies the date range of the given object. * @param target Target object, currently both DateRange and Calculation are supported. * Please note that the resulting EditDialogResult is always a DateRange though. * @param title Title text for the dialog * @param okText Possibility to override the button text. The given text is run through translation. * @param cancelText Possibility to override the button text. The given text is run through translation. * @returns EditDialogResult with the edited DateRange. Note that this is DateRange even if the object to edit is Calculation. */ showDateRange(target: DateRange_2 | Calculation, title: string, okText?: string, cancelText?: string): Promise>; /** * Shows an alert dialog. Like window.alert() in JavaScript. * @param heading Heading text as translation key * @param text Optional additional text paragraph describing what is happening. * @param okText Possibility to override the button text. The given text is run through translation. * @returns A promise with boolean: True if OK button was clicked, false if the dialog is closed / dismissed in another way. * @example this.uiHelpers.showAlert("Please note", "There is this thing that we want to tell you."); */ showAlert(heading: string, text?: string, okText?: string): Promise; /** * Shows a dialog for editing an existing employment. * NOTE: This method does not Save the Worker: The caller must do it separately. * @param employment - Worker Employment edited in dialog. * @param initialTab - Tab to open. * @param buttonTypes "default" shows standard save button, * "updateCalc" shows two buttons "ok" for full calc update and "ok-no-rows" update without touching default rows. * @returns Dialog result. Note that OK result may be either "ok" or "ok-no-rows". * The latter means that for calculation only worker info should be updated, not the default rows. */ openEditEmploymentDialog(employment: Employment, initialTab?: EmploymentDetailsTabs, buttonTypes?: "default" | "updateCalc"): Promise>; /** * Opens wizard for creating a new employment relation in a modal dialog. * NOTE: This method does not Save the Employment relation: The caller must do it separately. * @returns Dialog result with the new employment relation data and potential Taxcard (if manual) that should be created. * Only create if action is "ok". */ openNewEmploymentWizard(): Promise>; /** * Opens a new dialog for adding a new taxcard. * @param personalId Worker personal id is required. */ openNewTaxcardDialog(personalId: string): Promise>; /** * Opens a dialog for editing a calendar event. * @param calEvent The calendar event that should be created / edited. * @param title Title for the dialog. * @param template Template to use in create / editing. * Simplified is designed for adding scheduling to Calculation / Payroll. * @returns Standard dialog result for calendar event. */ openEditCalendarEvent(calEvent: CalendarEvent, title: string, template?: "default" | "simplified"): Promise>; /** * Opens the list of calculations into a dialog window for selecting a set of them. * NOTE: If necessary, add functionality to select only one. * @param category Either "paid": Read-only or "draft": Editable or "shared": Shared for approval. * @param title Title for the dialog. */ openSelectCalcs(category?: "paid" | "draft" | "shared", title?: string): Promise>; /** * Opens the list of employment relations into a dialog window for selecting a set of them. * @param title Title for the dialog * @returns A set of selected item in dialog result. */ openSelectEmployments(title?: string): Promise>; /** * Opens a search list of specified payload and returns one item. * @param title Title for the dialog * @returns Selected item or null if none was selected */ openSelect(title?: string): Promise; /** * Caches data to controller: This is needed to avoid $digest loops in AngularJS controllers. * NOTE: Default data diff method uses angular.equals(), so it will not recognize difference in properties starting with "$" - most notably OData options. * @param controller Controller that is used for caching. A property $salaxyCache is added for caching if not there already. * @param cacheKey Name for the object that is being cached. Must be unique within the controller scope. * @param dataMethod Method that gets the data that is being cached. * @param dataDiffMethod Optional method that is used for determining whether the data has changed. * If not specified, the dataMethod is used for diff. Should be used if dataMethod returns a lot of data or if it is resource intensive. */ cache(controller: angular_2.IController, cacheKey: string, dataMethod: () => T, dataDiffMethod?: () => any): T; /** * Download provide file * @param file File blob * @param fileName downloaded file name */ downloadFile(file: Blob, fileName: string): void; /** * Opens browser internally generated Blob url * @param file File blob */ openFile(file: Blob): void; /** * Shows a dialog for running a batch process. * @param header Header text for the dialog * @param list List of items for the batch process: The method is run to each of these items. * @param method Method that is run for each of the items. * @param batchParamsTemplateUrl Template for user input of data about the action: The parameters for the batch process. * @param data Usecase specific data that is bound in the controller and can be used in the template and method. * @param columns Columns shown from the list may be specified here. Leave null for default columns. * @param chunkSize Optional chunk size for the batch process. This is used if the method supports arrays. * @param autoStart Optional. If true, the batch process starts immediately after the dialog is opened. * @param autoClose Optional. If true, the batch process dialog closes automatically after the process is done. * @param silent Optional. If autoStart and autoClose are true, the dialog is not shown if the list size is smaller than the chunk size. * This Tabulator configuration. */ showBatchProcessDialog(header: string, list: T[], method: ( /** Single item or array (for supporting chunks) in the list that is being processed. */ itemOrArray: T | T[], /** Usecase specific data that is bound in the controller and can be used in the template and method. */ data: any) => Promise<{ message: string; result: any; }[]>, batchParamsTemplateUrl?: string, data?: any, columns?: Array, chunkSize?: number, autoStart?: boolean, autoClose?: boolean, silent?: boolean): Promise<({ done: boolean; results: { message: string; result: any; }[]; })>; /** * Converts bytes to blob. * @param bytes Bytes encoded in base64. * @param mimeType Mime type for the blob. */ bytes2Blob(bytes: string, mimeType: string): Blob; /** * Waits for a specified delay before resolving the promise. * Can be used with index related issues. */ wait(delay?: number): Promise; /** * Shows a dialog based on returnUrl parameter from the current url. */ private showReturnUrlDialog; private getReturnUrlParameters; private init; } /** * User interface for translating user interfaces * @example * ```html * * ``` */ export declare class UiTranslator extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** User interface mode for the component: "table" (default) or "fieldset" */ mode: string; /** * Beginning of the full key that is used to filtering the dictionary items (allKeyValues filter). * The value may be a string, array or comma separated string of values. */ filter: string; /** Texts from serviceModel that are being edited */ texts: string; }; /** Uses the UiTranslatorController */ controller: typeof UiTranslatorController; /** The default template for the component. */ defaultTemplate: string; } /** * Tool that allows translate user interfaces. */ export declare class UiTranslatorController implements angular_2.IController { private uiHelpers; private $timeout; private uiTranslatorService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** User interface mode for the component. */ mode: "table" | "fieldset"; /** Array of dictionary items shown in the component (the original unedited values). */ allKeyValues: Array; /** Local variable used to store texts that have been edited. */ serviceModelTexts: Array<{ fullKey: string; fi?: string; en?: string; sv?: string; }>; /** Contains boolean values to indicate whether columns should be shown or not. */ showCols: UiTranslatorDictionaryItem; /** AngularJS filter for the translator table: rows filtering. */ listFilter: UiTranslatorDictionaryItem; /** Show spinner if the data is loading. */ isLoading: boolean; /** * Texts from serviceModel that are being edited * This is 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). */ texts: { [key: string]: string; }; private _filter; /** * Creates a new UiTranslatorController * @ignore */ constructor(uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService, uiTranslatorService: UiTranslatorService); /** Init */ $onInit: () => void; /** * Beginning of the full key that is used to filtering the dictionary items (allKeyValues filter). * The value may be a string, array or comma separated string of values. */ get filter(): string | string[]; set filter(value: string | string[]); /** Updates this.text and keeps reference to parent */ updateTexts(): void; /** * Check if key exists in serviceModelTexts for specified language. * @param fullkey Dictionary key * @param lang Language that is checked. * @returns True if the provided key exists */ checkIfExistsInTexts(fullkey: string, lang: string): boolean; /** * Check if item can be deleted from serviceModelTexts * @param fullKey dictionary key * @returns True if the item can be deleted. */ canDeleteFromText(fullKey: string): boolean; /** * Finds and return item from serviceModelTexts * @param fullkey search value * @returns serviceModelTexts item */ getEditableText(fullkey: string): { fullKey: string; fi?: string; en?: string; sv?: string; }; /** * Adds item to serviceModelTexts * @param fullKey fullKey to be added */ addToTexts(fullKey: string, lang: string): void; /** * Remove item from serviceModelTexts * @param fullKey fullKey search value */ removeFromTexts(fullKey: string): void; /** * Save current diff to JSON file */ downloadTexts(): void; private initTranslationTable; private initTexts; private fromTexts; private toTexts; private updateAllKeyValues; private createKeyValues; private getDiffDictionary; } /** Defines an item in the language dictionary when mapped to an editable and filterable array. */ export declare interface UiTranslatorDictionaryItem { /** The full property path of a dictionary item. E.g. "SALAXY.ENUM.ApiItemType.calculation" */ fullKey?: string; /** File name (second part of the full path), e.g. "ENUM". */ fileName?: string; /** The component part, e.g. "ApiItemType". */ keyComponent?: string; /** * The fourth level of the full path, e.g. "calculation". This may be the same as shortKey, * when there is no additional grouping, e.g. with the enumerations. * However there may be multiple level of grouping between keyValue and shortKey. */ keyValue?: string; /** * The last key which typically describes the term, e.g. "calculation". * See keyValue for difference between keyValue and shortKey. */ shortKey?: string; /** Finnish translation*/ fi?: string; /** English translation*/ en?: string; /** Swedish translation*/ sv?: string; } /** * Stores the state of editable i18n dictionary and related translation methods. */ export declare class UiTranslatorService { private dictionary; /** * Get dictionary * @returns UiTranslatorDictionaryItem array */ getDictionary(): UiTranslatorDictionaryItem[]; /** * Adds item to dictionary * @param item item to be added to dictionary */ addToDictionary(item: UiTranslatorDictionaryItem): void; } /** Settings related to unemployment insurance. */ 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 */ declare enum UnemploymentPayrollLimitStatus { Default = "default", Higher = "higher" } /** Product that helps employer to handle the mandatory unemployment insurance reports and payments. */ 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; } /** UnionPaymentType enumeration */ declare enum UnionPaymentType { NotSelected = "notSelected", RaksaNormal = "raksaNormal", RaksaUnemploymentOnly = "raksaUnemploymentOnly", Other = "other" } /** Unit enumeration */ declare enum Unit { Undefined = "undefined", Hours = "hours", Days = "days", Weeks = "weeks", Period = "period", One = "one", Count = "count", Percent = "percent", Kilometers = "kilometers", Euro = "euro" } /** Abstracts the Upload process to a helper class instead of using upload directly. */ export declare class UploadService { private angularUpload; private ajax; private $q; private files; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(angularUpload: angular.angularFileUpload.IUploadService, ajax: AjaxNg1, $q: angular.IQService, files: Files); /** * Standard upload method that uploads data as form POST (multipart/form-data) * @param url Service URL that receives the upload. * @param data The form data (including the files) that is sent to the server. * @param notify Optional function that is called for upload notifications: Progress and error. * @returns Message from server as defined by IReturnType. */ upload(url: string, data: any, notify?: ( /** Upload progress is a number between 0-100 */ progress: number, /** In the case of error, the english error message is returned here and progress is null. */ error?: string) => any): angular.IPromise; /** * Gets a the URL (with token) for a stream of given uploaded file. * @param fileId Identifier of the file. */ getFileUrl(fileId: string): string; /** * Gets a preview URL (with token) for a given uploaded file. * @param fileId Identifier of the file. */ getPreviewUrl(fileId: string): string; /** * Gets a language versined error description ng-file-upload invalidFile errors (client-side before actual upload). * @param invalidFile Invalid file of ng-file-upload component. * @param invalidFile.$error Error key, e.g. 'pattern', minSize' or 'maxSize' * @param invalidFile.$errorParam Additional error param, e.g. '50KB' or '10MB' for file sizes. */ getInvalidFileDescription(invalidFile: { $error: string; $errorParam: string; }): string; /** * Gets a font-awesome icon for supported file types. * @param fileName The extension of the file name is used for determining the icon. */ getFileIcon(fileName: string): string; } /** Usecase definition */ 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; } 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 */ declare enum UsecaseActionType { ClientScript = "clientScript", ClientScriptAsync = "clientScriptAsync", ServerScript = "serverScript", ServerScriptAsync = "serverScriptAsync", WebServiceCall = "webServiceCall", PowerAutomateFlow = "powerAutomateFlow" } /** Defines the common properties for ApiCrudObject that may have a usecase specified. */ export declare interface UsecaseApiCrudObject { /** * 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; } /** 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. */ 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; } /** * Provides UI for viewing and editing usecase. * @example * ```html * * ``` */ export declare class UsecaseDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the UsecasesCrudController */ controller: typeof UsecasesCrudController; /** Default template is the view */ defaultTemplate: string; } /** Usecase definition. */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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. */ 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; } /** * Provides CRUD access for Service Models */ 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; } /** * Usecases controller. */ export declare class UsecasesCrudController extends ApiCrudObjectController { private usecasesService; private sessionService; private ajax; private $timeout; private calculations; private payrolls; private datasets; private $templateCache; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Action executor for the current action. */ currentExecutor: ActionExecutor; /** The current item that is being executed on. If not set, will be set to blank. */ currentItem: UsecaseApiCrudObject; /** * Current view */ private _currentView; /** Temporary collection of items: Will be replaced by OData query and/or settings. */ localStorageItems: Usecase[]; private _currentAction; private _currentSchema; private _list; /** * Creates a new UsecasesCrudController * @ignore */ constructor(usecases: Usecases, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, usecasesService: UsecasesService, sessionService: SessionService, ajax: AjaxNg1, $timeout: angular_2.ITimeoutService, calculations: Calculations, payrolls: Payrolls, datasets: Datasets, $templateCache: angular_2.ITemplateCacheService); /** * Implement IController */ $onInit(): void; /** Gets the type name of item type, i.e. "Calculation" for "calculation" enumeration. */ get itemType(): string; /** * Shows the detail view for the item. * Supports viewing public items from other users as read-only. * @param item Item may be either Container or list item. */ showDetails(item: UsecaseListItem | Usecase): angular_2.ILocationService; /** * Gets the activity type of usecase from the settings. * @param item List item to check. * @returns Information on whether the usecase is active or not - or default usecase (also active). */ getActive(item: UsecaseListItem): UsecaseStatus; /** * Gets the activity bg-color of usecase from the settings. * @param status Status for color. * @returns Bg color for the status. */ getStatusBgColor(status: UsecaseStatus): string; /** * Gets the order of usecase from the settings. * @param item List item to get the order. * @returns Order number for the usecase, 0 if not set. */ getOrder: (item: UsecaseListItem) => number; private toLowerCamelCase; /** * Shows the detail view with a new item that is a copy of the given item. * Supports copying public items from other users. * @param item Item may be either Container or list item. */ showCopyAsNew(item: UsecaseListItem | Usecase): angular_2.ILocationService; /** The data container in the current business object */ get usecase(): Usecase; /** The data part of the usecase: Used in data binding. */ get data(): any; /** * Gets a list of usecases for the current account. * First get will start the load process and then the list is cached to controller scope. */ get list(): UsecaseListItem[]; /** * Checks if the given schema is defined in the current usecase: Exists and has any properties. * @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. */ isDefined(...schemaNames: string[]): boolean; /** Returns the whole Open API schema document as editable string. */ get editableSchema(): string; /** Parses the schema from the given string. */ set editableSchema(value: string); /** Sets the current editable schema (one of the schemas within the Open API document). */ setCurrentSchema(key: string): void; /** Gets the current editable schema (one of the schemas within the Open API document). */ get currentSchema(): any; /** Gets the property name / key of the current editable schema (one of the schemas within the Open API document). */ get currentSchemaKey(): string; /** Creates a new current editable schema (one of the schemas within the Open API document). */ createSchema(): void; /** Removes an schema from this usecase. */ deleteSchema(key: string): void; /** The currently selected editable action (script). */ get currentAction(): UsecaseAction; set currentAction(value: UsecaseAction); /** * Current editable view. */ get currentView(): any; set currentView(value: any); /** Overrides the save for clear cache. */ save(): Promise; /** Create a new action / script to this usecase. */ createAction(): void; /** Creates a new view and sets it as current. */ createView(): void; /** Overrides the default reload for clearing the cache. */ reload(): Promise; /** * Refreshes the current usecase to cache: Used in preview. */ refreshCurrentInCache(): void; /** Removes an action from this usecase. */ deleteAction(action: UsecaseAction): void; /** * Removes a view from this usecase. */ deleteView(view: UsecaseView): void; /** Executes the current action with the current item. */ executeAction(action?: UsecaseAction): Promise; /** * Opens a dialog for selecting the current item for which to execute a usecase. * @param type Type of item to select: Select from dialog, new or null/empty. */ selectItem(type: "select" | "new" | null): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; } /** Usecase related settings. */ 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; } /** Provides caching for usecases and resolves them to business objects. */ export declare class UsecasesService { private usecases; private sessionService; private $sce; /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(usecases: Usecases, sessionService: SessionService, $sce: angular_2.ISCEService); /** * Gets active usecases that are shown in listings (selection of usecase) * including type-specific default usecases (applied if no other usecase is defined). */ getActiveUsecases(type?: ApiItemType, defaultOnly?: boolean): UsecaseInSettings[]; /** * Gets the active items as list items. The list of all usecases is cached. * @param type Type of items to fetch. * TODO: The method currently supports max 50 active usecases (of all types). */ getActiveUsecaseListItems(type?: ApiItemType): Promise; private cachedActiveListItems; /** * Gets the activity type of usecase from the settings. * @param uri Usecase URI * @returns Information on whether the usecase is active or not - or default usecase (also active). */ getActive(uri: string): UsecaseStatus; /** * Gets the order of usecase from the settings. * @param uri Usecase URI * @returns Order number for the usecase, 0 if not set. */ getOrder(uri: string): number; /** * Assures that the usecase model is fetched and data model is initialized according to usecase. * @param type Type of business object * @param item Business object to initialize. * @param defaultUri Usecase uri if passed by the calling component (e.g. in URL or component attribute). * @returns The usecase with session / role related data or null if none is set. */ assureUsecase(type: ApiItemType, item: UsecaseApiCrudObject, defaultUri: string): Promise; /** * Gets a usecase definition based on business object (that has usecase data item). * @param type Business object type * @param item The business objec to evaluate. * @param defaultUri Usecase uri if passed by the calling component (e.g. in URL or component attribute). * @returns The usecase with session / role related data or null if none is set. */ getUsecaseForObject(type: ApiItemType, item: UsecaseApiCrudObject, defaultUri: string): Promise; /** Clears the usecase cache: Will be fetched from the server in next getUsecase(). */ clearCache(): void; /** * Adds abilitity to set the contents of a usecase in cache. * This is used in dynamic preview in edit usecase scenarios. * @param newVersion A version of the usecase that is set into usecases cache. */ setToCache(newVersion: Usecase): void; /** * Gets a usecase based on URI using the session cache. * @param uri Uri of the usecase * @returns The usecase, typically cached in session. */ getUsecase(uri: string): Promise; private cachedUsecases; } /** UsecaseStatus enumeration */ declare enum UsecaseStatus { Undefined = "undefined", Active = "active", Default = "default", Inactive = "inactive" } /** Client-side validation message for a usecase input. */ declare interface UsecaseValidationMessage { /** Message text */ msg?: string; /** Type of the message. */ type: "default" | "error"; } /** Customized user interface view. */ 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. */ 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_2 | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** * Simple presentation of Salaxy user info: employer and/or worker data * @example * ```html * * ``` */ export declare class UserInfo extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the SessionController */ controller: typeof SessionController; /** The default template for the component. */ defaultTemplate: string; } /** Passes the data about the authorization that is the bases for callin the services that require user authorization. */ 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_2 | 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; } /** * Manages user-specific settings which are currently stored in the local storage (browser). * User settigns are mostly UI, such as default selections, filters, column orders, etc. * Later implementations may store the settings in the server do that they transfer from one browser to another * within the same user. */ export declare class UserSettingsService { private settings; /** * Returns an object with one property "val" that is bound to the given key. * Used for easier data binding in AngularJS models. * @param key Key for the property. * @returns An object with one property "val" that is bound to the given key (getter and setter). * @example * */ ng1Binder(key: string): { /** Property the is bound to the given key. */ val: any; }; /** * Gets a setting value from local storage * @param key String key for the value * @returns The value */ get(key: string): T; /** * Sets a setting value to local sotrage * @param key String key for the value * @param value The value. */ set(key: string, value: T): void; private getAll; private setAll; } /** * Shows a validation summary user interface. * Currently, this component is used for showing the status of server-side validation, * but the idea is that later implementation may enable it for using also with client-side validation. * @example * ```html * * Everything is OK! * * ``` */ export declare class ValidationSummary extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The server-side API-validation object that is displayed by this component. */ apiValidation: string; /** HTML that should be shown when the bound validation data is null. */ loadingHtml: string; /** Layout of the validation html. Use "minimal" for easy customizing*/ layout: string; }; /** Inner HTML is shown in case object is valid. */ transclude: boolean; /** Uses the ValidationSummaryController */ controller: typeof ValidationSummaryController; /** The default template for the component. */ defaultTemplate: string; } /** * Handles user interaction for viewing and modifying the current account data * including the products that are enabled for the current account and their properties. */ export declare class ValidationSummaryController implements angular_2.IController { private uiHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** The server-side API-validation object that is displayed by this controller. */ apiValidation: ApiValidation; /** HTML that should be shown when the bound validation data is null */ loadingHtml: "SALAXY.NG1.ValidationSummaryComponent.loadingHtml"; /** Layout of the validation html. Use "minimal" for easy customizing */ layout: "default" | "minimal"; constructor(uiHelpers: UiHelpers); /** * Implement IController */ $onInit: () => void; /** If false, there is no validation object bound to the component. */ get hasValidation(): boolean; /** If true, the validation has no errors. */ get isValid(): boolean; /** If false, has empty required fields. These are shown separately from other errors. */ get hasAllRequiredFields(): boolean; /** If true, there is no errors, but there are some warnings. */ get hasWarningsOnly(): boolean; /** If true, has other errors than missing required fiels. */ get hasValidationOrGeneralErrors(): boolean; /** * Gets the errors, optionally filtered by a type. * @param type Type of the error: "general", "required", "invalid" or null. * If null, all errors are returned. * Also supports negation: "!general", "!required" or "!invalid". */ getErrors(type?: ApiValidationErrorType | string): ApiValidationError[]; /** * Returns the label for the validation result. * The label is translated using the key: `SALAXY.VALIDATION.[error.code].label` * If the translation does not exist the `error.msg` is returned. * @param error - Error in validation. */ getLabel(error: ApiValidationError): string; /** * Returns the description for the validation result. * The label is translated using the key: `SALAXY.VALIDATION.[error.code].description` * If the translation does not exist the `null` is returned. * @param error - Error in validation. */ getDescription(error: ApiValidationError): string; /** * Returns true if the translation for the key `SALAXY.VALIDATION.[error.code].description` exists. * @param error - Error in validation. */ hasDescription(error: ApiValidationError): boolean; /** Shows details of the errors. */ showDetails(): void; private getValidation; } /** * Validator directives for different form inputs. * See mthods for examples of use. */ export declare class ValidatorFunctions { /** * Tax percent validator. * @example * ```html * * ``` */ static sxyTaxPercent(): () => any; /** * Currency value validator. * @example * ```html * * ``` */ static sxyCurrency(): () => any; /** * Iban validator. * @example * ```html * * ``` */ static sxyIban(): () => any; /** * Email validator. * @example * ```html * * ``` */ static sxyEmail(): () => any; /** * Mobile phone validator. * @example * ```html * * ``` */ static sxyMobilePhone(): () => any; /** * Finnish personal id validator. * @example * ```html * * ``` */ static sxyPersonalIdFi(): () => any; /** * Finnish company id validator. * @example * ```html * * ``` */ static sxyCompanyIdFi(): () => any; /** * Finnish official id validator. Official ID may be either company id orr personal id. * @example * ```html * * ``` */ static sxyOfficialIdFi(): () => any; /** * Finnish postal code validator. * @example * ```html * * ``` */ static sxyPostalCodeFi(): () => any; /** * Number validator. * @example * ```html * * ``` */ static sxyNumber(): () => any; /** * Pension contract number validator. * @example * ```html * * ``` */ static sxyPensionContractNumber(): () => any; /** * Integer validator. * @example * ```html * * ``` */ static sxyInteger(): () => any; /** * Maximum value validator * */ static sxyMin(): () => any; /** * Maximum value validator * */ static sxyMax(): () => any; /** * Multiple of value validator * */ static sxyMultipleOf(): () => any; /** * Finnish bank reference number validator. * @example * ```html * * ``` */ static sxyBankReferenceFi(): () => any; /** * Validator for values which should not be considered as valid in the UI (i.e. unknown, none) */ static sxyExcludeUnknowns(): () => any; private static directive; private static parserAndFormatterDirective; private static setValidator; private static setParserAndFormatter; } /** * Varma banner component for displaying Varma popup * @example * ```html * * ``` */ export declare class VarmaBanner extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Current calculation */ calc: string; }; /** Uses the VarmaBannerController */ controller: typeof VarmaBannerController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides methods for profiled Welcome messages to the end user. */ export declare class VarmaBannerController implements angular_2.IController { private sessionService; private settingsService; private uiHelpers; private $sce; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Current calculation */ calc: Calculation; /** Pension Company*/ pensionCompany: PensionCompany; /** Varma banner/popup flags */ private _varmaPensionBanners; /** Varma pop up dismissed flags */ private _dismissed; /** * Creates a new VarmaBannerController * @ignore */ constructor(sessionService: SessionService, settingsService: SettingsService, uiHelpers: UiHelpers, $sce: angular_2.ISCEService); /** * Implement IController */ $onInit(): void; /** * Show the popup */ showVarmaPopup(): void; /** Gets the flags that indicate which popup to show. */ get varmaPensionBanners(): { /** if true, banner is ready to be shown */ isReady: boolean; /** If true, shows popup that offers to get employee pension contract from Varma */ showGetTyel: boolean; /** If true, shows popup that offrs to move employee pension contract from other company to Varma */ showMoveTyel: boolean; /** If true, shows popup that offers to get entrepreneur pension contract from Varma */ showGetYel: boolean; }; /** Get link to Varma pension contract shop with language parameter */ getVarmaShopLink(): string; /** Adds dismissed to local storage to prevent the display of the popups again */ private dismiss; /** Checks if the banner as been dismissed earlier */ private get dismissed(); /** Logic for determing the pension is for employee */ private get isTyelCalculation(); /** Logic for determing the pension is for entrepreneur */ private get isYelCalculation(); } /** Contains order data for Varma pensions (TyEL, YEL) and required operations. */ 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 */ declare enum VarmaPensionOrderAction { Undefined = "undefined", NewYel = "newYel", NewTyel = "newTyel", Move = "move" } /** Varma pension order TyEL details. */ 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. */ 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 */ declare enum VarmaPensionOrderYelPayer { Undefined = "undefined", Entrepreneur = "entrepreneur", Company = "company" } /** * Varma pension service. Contains methods for getting order template, validating the order * and sending the order. */ export declare class VarmaPensionService { private sessionService; private partnerServicesApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Current order */ private current; constructor(sessionService: SessionService, partnerServicesApi: PartnerServices); /** Lazy loading of current pension order template */ getCurrent(): VarmaPensionOrder; /** * Sends order for processing. */ send(): Promise; /** * Validates the order. */ validate(): Promise; /** * Resets the current order. */ reset(): void; } /** For VAT breakdown of a receipt (ALV-erittely) represents a single VAT rate and the revenue and tax with that rate. */ 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 */ declare enum VatRate { Undefined = "undefined", None = "none", Vat0000 = "vat0000", Vat1000 = "vat1000", Vat1350 = "vat1350", Vat1400 = "vat1400", Vat2400 = "vat2400", Vat2550 = "vat2550", Other = "other" } /** Version information for the API object. */ 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_2 | null; } /** For Visma Sign V01, data that is stored within the onboarding object. */ 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 */ declare enum WageBasis { Undefined = "undefined", Monthly = "monthly", Hourly = "hourly", PerformanceBased = "performanceBased", Other = "other" } /** WebSiteUserRole enumeration */ declare enum WebSiteUserRole { None = "none", Household = "household", Worker = "worker", Company = "company" } declare interface Weekday { dayName: string; date: string; displayDate: string; isCollapsed: boolean; } /** * Shows a detail a Welcome message depending on the user profile. * Typically the first component on the front page. * @example * ```html * * ``` */ export declare class Welcome extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** * If set to true, the settings are handled by proxy: * we do not ask the user to change the settings in * the Welcome screen (mainly Pension or Insurance). */ settingsByProxy: string; }; /** Uses the WelcomeController */ controller: typeof WelcomeController; /** The default template for the component. */ defaultTemplate: string; } /** * Provides methods for profiled Welcome messages to the end user. */ export declare class WelcomeController implements angular_2.IController { private session; private workers; private settingsService; private $location; private uiCrudHelpers; private $rootScope; private taxcards; private overview; private uiHelpers; private reportsService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * If set to true, the settings are handled by proxy: * we do not ask the user to change the settings in * the Welcome screen (mainly Pension or Insurance). */ settingsByProxy: any; /** Worker home page UI properties */ workerUI: { isReady?: boolean; /** If true, worker has added taxcard. */ taxCardAdded?: boolean; }; /** Welcome page (timeline) data forr the Worker role */ workerDataNew: WelcomeDataWorker; workerList: WorkerListItem[]; /** Start date for filtering list of calculations with status "PaymentStarted". Displayed on front page */ paymentStartedWarningStartDate: string; /** End date for filtering list of calculations with status "PaymentStarted". Displayed on front page */ paymentStartedWarningEndDate: string | undefined; private workerListStatus; private initialOwner; /** * Creates a new WelcomeController * @ignore */ constructor(session: SessionService, workers: Workers, settingsService: SettingsService, $location: angular_2.ILocationService, uiCrudHelpers: UiCrudHelpers, $rootScope: angular_2.IRootScopeService, taxcards: Taxcards, overview: Overview, uiHelpers: UiHelpers, reportsService: ReportsService); /** * Implement IController */ $onInit: () => void; /** * Gets a preview URL for the image. * Currently only for a taxcard, but may later support other items. */ getPreviewUrl(item: ApiListItem): null; /** * Returns the url where to download the tax card * @param taxCard Taxcard or if null, the current is used. */ getTaxcardDownloadUrl(taxCard: any): string; /** * Moves the browser to create-new calculation screen * @param employmentId Identifier for the Employment relation for which to create the calculation. */ createNewCalculationFor: (employmentId: string) => void; /** Gets the current pension product or empty object */ getPension(): PensionContract; /** Gets the current insurance product or empty object */ getInsurance(): InsuranceContract; /** * Loads the welcome data from the server. */ loadWelcomeData(): void; /** Loads the Worker role data and UI. */ loadWorkerData(): void; /** Loads worker list initially */ loadWorkers(): Promise; /** Loads the welcome data from the server for Company role */ loadCompanyData(): void; /** * Gets the URL for a calculation pdf. * If report has not been saved (ID is null), returns null. * @param calc - Calculation. This method requires that the calculation has been saved. * @param inline - if false, downloads the pdf file * @returns Url for specified report */ getPdfUrl(calc: Calculation, inline?: boolean): string | null; /** * Gets the chart data for taxcard, labels, colors and other settings. * Uses chartCache to avoid $digest loop. */ get taxcardChartData(): { config: any; limits: { type: TaxcardKind; percent: number; hasLimit: boolean; fractionOfLimit: number; }; } | null; /** * Gets the chart data for taxcard, labels, colors and other settings. * Uses chartCache to avoid $digest loop. */ get taxcardMobileChartData(): any; /** Calls the Worker wizard and if a Worker is added, starts a calculation for that worker. */ launchEmploymentWizard(): void; /** Gets the flags that indicate which tutorials to show. */ get tutorials(): { /** If true, shows info box that the site is runnin in anonymous mode. */ showAnon: boolean; /** If true, should direct the user to create the first Worker */ showAddWorker: boolean; /** If true, should direct user to create a new calculation. */ showAddCalculation: boolean; /** If true, should ask the user for digital signature. */ showSign: boolean; /** If true, should ask the user to fill in the Pension contract information. */ showPension: boolean; /** If true, should ask the user to fill in the Accident Insurance contract information. */ showInsurance: boolean; /** If true, should promote Payroll feature. */ showTryPayroll: boolean; /** If true, should promote new features. */ showNewFeatures: boolean; }; /** * Returns system alert html. */ get systemAlertHtml(): string; /** * Returns true if system alert exists. */ get hasSystemAlert(): boolean; /** * Filters preloaded workers. * Avatar values are formatted and ID is employment ID insteead of worker ID. */ filterWorkers: (searchString: string) => any[]; /** Gets the display name for the selected worker. */ getWorkerName: (avatarId: string) => string; /** * Searches all workers and checks if manual/auto taxcard is enabled */ showAutoTaxcardInfobox(): boolean; private getAvatar; } /** Data that is used for displaying the welcome page for the Worker account. */ 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; } /** * A generic Wizard controller for rendering the Wizard UI */ export declare class WizardController implements angular_2.IController { protected $scope: angular_2.IScope; protected wizardService: WizardService; protected data: any; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Styling classes for columns. */ colWidthClasses: string[]; /** Path for the view that is shown in the wizard */ viewPath: string; /** Path to the buttons view that is shown in the footer of the wizard */ buttonsView?: string; /** * Creates a new WizardController * @param $scope - The Angular scope * @param wizardService - Maintains the state of the wizard * @param data - Any data to the controller * @ignore */ constructor($scope: angular_2.IScope, wizardService: WizardService, data?: any); /** * Implement IController */ $onInit(): void; /** Gets all the steps in the Wizard */ get steps(): WizardStep[]; /** Gets the number of the currently active step */ get step(): number; /** Sets the number of the currently active step */ set step(stepNumber: number); /** The currently selected step object */ get currentStep(): WizardStep; /** Active styling properties */ get style(): { colWidthClass: string; }; /** Returns true if goNext is enabled */ get canGoNext(): boolean; /** Returns true if goNext is enabled */ get canGoPrevious(): boolean; /** * Navigates to the next step if possible */ goNext(): void; /** Navigates to the previous step if possible */ goPrevious(): void; } /** * Manages the state and pages of a Wizard that potentially has multiple * controllers views etc. in it. */ export declare class WizardService { private $rootScope; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private steps; private activeStep; /** * Creates a new instance of WizardService * @param $rootScope - Angular root scope. Used for event routing */ constructor($rootScope: angular_2.IRootScopeService, newSteps: WizardStep[]); /** Gets the Wizard steps as collection */ getSteps(): WizardStep[]; /** * Sets the Wizard steps * @param newSteps - the new collection of steps for the wizard. * @param skipNotify - If true will not send the the Notify event to Subscribed controllers. */ setSteps(newSteps?: WizardStep[], skipNotify?: boolean): void; /** Gets the number of the currently active step */ get activeStepNumber(): number; /** Sets the number of the currently active step */ set activeStepNumber(stepNumber: number); /** * Gets the current step object */ getCurrentStepObject(): WizardStep; /** * Controllers can subscribe to changes in service data using this method. * Read more about the pattern in: http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/ * @param scope - Controller scope for the subscribing controller (or directive etc.) * @param callback - The event listener function. See $on documentation for details */ subscribe(scope: angular_2.IScope, callback: (event: angular_2.IAngularEvent, ...args: any[]) => any): void; private notify; } /** * Defines a step in wizard */ export declare interface WizardStep { /** A number for the step, typically set by the counter */ number?: number; /** Short title that is displayed with the Wizard buttons */ title: string; /** If true, the step is active/selected. Typically, there is only one step active at any given time. */ active?: boolean; /** If true, the step cannot be clicked/activated */ disabled?: boolean; /** Path to the view that is shown in the wizard */ view?: string; /** Path to the buttons view that is shown in the footer of the wizard */ buttonsView?: string; /** Heading for the step */ heading?: string; /** Intro text at the top of the wizard */ intro?: string; } /** Describes the work that is being performed - mainly for Employment relation purposes. */ 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; } /** * UI for absences of a single worker / employment relation. * @example * ```html * * ``` */ export declare class WorkerAbsences extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** * Alternative model binding. * Instead of model="absenceObjectId", you may specify employment-id="employmentId" */ employmentId: string; detailsUrl: string; /** * Alternative model binding. * Instead of model="absenceObjectId", you may specify employment-id="employmentId" */ listUrl: string; /** The default template for the component. */ model: string; isReadOnlyForced: string; }; /** Uses the WorkerAbsencesCrudController */ controller: typeof WorkerAbsencesCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Absences for a single Worker. */ declare interface WorkerAbsences_2 { /** 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_2 | 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; } /** * Plain CRUD controller for WorkerAbsences. */ export declare class WorkerAbsencesCrudController extends ApiCrudObjectController { private fullApi; private uiCrudHelpers; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** UI view that is shown */ viewType: "overview" | "list"; /** * Years that are available in the drop-down selection. * Currently, only affects the calendar, but will probably also affect the lists etc. * Currently, starting from 2019 until this year. */ years: number[]; /** Contains all the absences, once getAbsences() has been called. */ allAbsences: WorkerAbsences_2[]; /** Current year: Currently, affects only the chart */ currentYear: number; /** * The date for which the UI is rendered. Default is today. * For employment holiday years (WorkerHolidays or CalcWorktime), set this to salary period begin * => Specifies the the holiday year to choose by default from all holiday years that Worker has: * If the date is Jan-April will show the previous year, May-Dec will show the current year. */ forDate: string; /** Parameters related to holiday report (lomalista). */ reportParams: { /** Today's date: Set this for testing how user interface is rendered (which view is presented) at different times of year. */ today: string; /** Start date of the view: Can be get/set directly by the view */ start: string; /** Start date of the view: Can be get/set directly by the view */ end: string; /** Underlying field of reportView */ _view: "thisYear" | "lastYear" | "lastMonth" | "thisMonth" | "all"; }; private _employmentId; constructor(fullApi: Absences, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, uiCrudHelpers: UiCrudHelpers); /** * Implement IController */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; /** * Sets the employment ID and if it is different then starts the loading of the Absences object to that employment ID. */ set employmentId(value: string); /** Gets the employment ID */ get employmentId(): string; /** * Gets or sets the report view that is currently shown. */ get reportView(): "thisYear" | "lastYear" | "lastMonth" | "thisMonth" | "all"; set reportView(value: "thisYear" | "lastYear" | "lastMonth" | "thisMonth" | "all"); /** * Maps an array of Absences to array of calendar series * @param source Absences to map. */ mapToCalendar: (source: WorkerAbsences_2[]) => CalendarSeries[]; /** * Filter that is applied to the list * @param value Item in the list */ filter: (value: AbsencePeriod) => boolean; /** * Saves a the Worker absences based on calendar input and updates the value in allAbsences property. * @param itemToSave A Worker absences object. */ saveAbsences(itemToSave: WorkerAbsences_2): Promise; /** * Show an edit dialog for the absences. * @param absences The Worker absences to update. */ showEditDialog(absences: WorkerAbsences_2): void; /** * Shows the add worker dialog: A */ showAddWorker(): void; /** * Gets the full absence objects for all Workers. */ getAbsences(): void; /** * Returns true, if two objects are different. * @param obj1 First object to compare * @param obj2 Second object to compare */ isChanged(obj1: any, obj2: any): boolean; /** * Gets a calculated value based on filtered absence periods. * TODO: Consider moving to core (there is the same code in AbsencePeriodsController) * @param absences Worker absences object. * @param type Type of calculation */ getPeriodCalculation(absences: WorkerAbsences_2, type?: "all" | "length" | "firstPeriod" | "lastPeriod" | "absencesPaid" | "absencesUnpaid" | "absencesHolidayAccrual" | "absencesNoHolidayAccrual"): number | DateRange_2; } /** Account data that is relevant for a Worker. */ 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_2 | 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; } /** * LEGACY: This used to be the controller for viewing and editing Worker AND Employment details, but now the EmploymentCrudController is used instead. * @deprecated Use EmploymentCrudController instead. */ export declare class WorkerAccountCrudController extends ApiCrudObjectController { /** * For NG-dependency injection * @ignore */ static $inject: string[]; constructor(fullApi: Workers, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any); /** * Initialization code. */ $onInit(): void; /** Implements the getDefaults of ApiCrudObjectController */ getDefaults(): { listUrl: string; detailsUrl: string; oDataTemplateUrl: string; oDataOptions: {}; }; } /** Employment Relation as it is shown as part of WorkerAccount. */ 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; /** Applicable collective agreement */ cbaCode?: number | null; /** Employee group. */ employeeGroup?: string | 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; } /** * DEPRECATED: Being used by an isolated partner(s) that have special access. * => Remove in a next major release. * Alternative component for adding Worker accounts. * Uses the AssureWorkerAccount API service that is currently reserved for partner access. * @deprecated Being used by an isolated partner(s) that have special access. => Remove in a next major release. * @example * ```html * * ``` */ export declare class WorkerAssure extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the WorkerAssureController */ controller: typeof WorkerAssureController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for creating stand-alone worker accounts. */ export declare class WorkerAssureController implements angular_2.IController { private uiHelpers; private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Data binding field for submitAssureWorkerAccount() method */ assureWorkerAccountReq: { officialId: null; firstName: null; lastName: null; email: null; telephone: null; bankAccountIban: null; startDate: null; endDate: null; }; /** * Creates a new WorkerAssureController * @param uiHelpers - Salaxy ui helpers service. * @param ajax - Salaxy ajax service. * @ignore */ constructor(uiHelpers: UiHelpers, ajax: Ajax); /** Controller initialization */ $onInit(): void; /** * Calls the AssureWorkerAccount method in the API with the data defined in assureWorkerAccountReq */ submitAssureWorkerAccount(detailsCtrl: EmploymentCrudController, listCtrl: ODataQueryController): Promise; /** * Resets assure worker account model. */ resetAssureWorkerAccount(): void; /** Gets an empty assureWorkerAccountReq - used for reset. */ private getEmptyAssureWorkerAccountReq; } /** The Worker side of the calculation. SalarySlip is largely written based on this calculation. */ 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. */ 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. */ 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. */ 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; } /** * LEGACY: Shows a view of a single worker account, which may have one or several Employments Relations. * This used to be the main way of viewing and editing Worker AND Employment details, but now the Employment view is used instead. * @deprecated Use EmploymentDetails instead. */ export declare class WorkerDetails extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: ApiCrudObjectControllerBindings; /** Uses the WorkerAccountCrudController */ controller: typeof WorkerAccountCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Controller handles expense usecases*/ export declare class WorkerExpenseReportController extends ListControllerBase { /** Bindings for components that use this controller */ static bindings: WorkerExpenseReportControllerBindings; /** Type of the timesheet. Options are hourlyReport and timeReport */ reportType: "expense" | "travel"; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private _rowTypes; /** Constructor for dependency injection */ constructor(uiHelpers: UiHelpers); /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; /** * Creating of a new item */ getBlank(): Message; /** * List of items */ get list(): Message[]; /** * Ensure that atleast one message exists */ getCalcRowMessage(): Message; /** * Get rowTypes based on report type */ getRowTypes(): string[] | undefined; } declare class WorkerExpenseReportControllerBindings extends ListControllerBaseBindings { /** Type of the timesheet. Options are hourlyReport and timeReport */ reportType: string; /** * CRUD controller that typically defines the values for url template and */ crudController: string; } /** * Viewing and modifying of Worker holidays (holiday years and related settings). * @example * ```html * * ``` */ export declare class WorkerHolidays extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { [boundProperty: string]: string; /** * Alternative model binding. * Instead of model="holidayYearId", you may specify employment-id="employmentId". * This loads all the holiday years to HolidayYearCrudController.employmentHolidayYears */ employmentId: string; /** * Setting this value (iso date) will specify the the holiday year: * If the date is Jan-April will show the previous year, May-Dec will show the current year. * Default is today. */ forDate: string; /** * If true, the view is for accruals (not for paid holidays or holiday planning). */ isAccrualView: "<"; detailsUrl: string; listUrl: string; model: string; isReadOnlyForced: string; }; /** Uses the HolidayYearCrudController */ controller: typeof HolidayYearCrudController; /** The default template for the component. */ defaultTemplate: string; } /** Controller handles timebased usecases (timer, hourlyreport) */ export declare class WorkerHourlyReportController extends ListControllerBase { private sessionService; /** Bindings for components that use this controller */ static bindings: WorkerHourlyReportControllerBindings; /** Binded crud controller */ crudController: any; /** Date of today */ currentDate: string; firstDayOfCurrentWeekFormatted: string; /** Last day of current week, formatted to MM/dd/YYYY - format */ lastDayOfCurrentWeekFormatted: string; /** first of current week, used to determine week range */ firstDayOfCurrentWeek: string; /** Lastday of current week, used to determine week range */ lastDayOfCurrentWeek: string; /** Currentweek dataset */ currentWeek: Weekday[]; /** Currently supported Report type, mostly affects to ui */ reportType: ThreadedMessageType.HourlyReport | ThreadedMessageType.TimeReport; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Constructor for dependency injection */ constructor(uiHelpers: UiHelpers, sessionService: SessionService); /** * Implement IController */ $onInit(): void; /** * List of items */ get list(): Message[]; /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; /** * Creating of a new item */ getBlank(): Message; /** Logic used in ListControlerBase showEditDialog */ getEditDialogLogic(): any; /** Sums daily total time */ countDailyHours(date: string): number; /** Sum weekly totalTime */ get weeklyHours(): number; /** Sets current week for ui */ setCurrentWeek(): void; /** Gets the project text for a project */ getDimensionOptionText(value: string): string; /** * Controlls visibility of dates messages * @param date Used to find correct date from currentWeek */ setHourlyRecordsVisible(date: string): void; /** Change current week and reload week data */ changeWeek(next: boolean): void; /** Get current weeknumber */ get currentWeekNumber(): number; /** * Check if provided date is saturday or sunday or not workday * @param date Used date to determine if saturday or sunday * @returns Boolean if date is saturday or sunday */ isHoliday(date: string): boolean; /** * Checks if expand button should be visible * @param date used to search correct objects * @returns Boolean that indicates if expand chevron should be visible */ showExpandButton(date: string): boolean; /** * Get blank message object for edit dialog * @param date is used to create start date * @returns Blank message object */ getEditDialogItem(date: string): Message; /** * Get button style for date. Handles dirrerent styles for workday, today, holiday * @param date Day used to figure date * @returns button class as string */ getDateStyle(date: string): "bg-info" | "bg-primary" | "btn btn-default"; /** * Override for ListControllerBase showEditDialog * @param item Item to edit or string "new" for creating a new one. * @param isNew Optional way of specifying that the item is a new item (with default values, not yet added to the list). * If item is string "new", this parameter will have no effect (will always be true). */ showEditDialog(item: Message | "new", isNew?: boolean): void; } declare class WorkerHourlyReportControllerBindings extends ListControllerBaseBindings { /** Type of the timesheet. Options are hourlyReport and timeReport */ reportType: string; /** * CRUD controller that typically defines the values for url template and */ crudController: string; } /** * User interface for worker mass loading. * @example * ```html * * ``` */ export declare class WorkerImport extends DataImportComponentBase { /** Uses the WorkerImportController */ controller: typeof WorkerImportController; } /** API worker import object. The API uses this object for mass operations for creating or assuring the worker employment relations in the system. */ declare interface WorkerImport_2 { /** 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; } /** * Controller for worker imports. */ export declare class WorkerImportController extends DataImportControllerBase { private importsApi; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Boolean indicating if the worker validation is in progress. */ isValidating: boolean; private getTargetKey; private getSourceKey; private getCheckTargetKey; private getCheckSourceKey; private extraValidator; /** * Creates a new WorkerImportController * @ignore */ constructor(importsApi: Imports, jsonSchemaService: JsonSchemaService, $timeout: angular_2.ITimeoutService); /** * Implement IController */ $onInit(): Promise; /** Import data */ import(): Promise; /** Help */ help(): Promise; /** Returns extra validator */ getExtraValidators(): Array<{ validate: () => void; buttonLabel: string; }>; protected getImportMapper(): Promise>; /** Import data */ private validateWorkers; } /** * Type for a single worker import row. */ 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. */ 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; /** Last date of modification of the object. The modification can be produced by the end user or by the system. */ timestamp?: 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; } /** * Wizard for Creating a new Palkkaus.fi-account (worker) */ export declare class WorkerOnboardingController extends WizardController { private onboardingService; private sessionService; private uiHelpers; private signatureService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Worker wizard configuration */ wizardSteps: WizardStep[]; /** * Field to expose forms validity state. */ formDataValidity: boolean; /** If true, step is proceeding */ isStepProceeding: boolean; signatureMethods: any[]; constructor($scope: angular_2.IScope, wizardService: WizardService, onboardingService: OnboardingService, sessionService: SessionService, uiHelpers: UiHelpers, signatureService: SignatureService); /** * Implement IController */ $onInit(): void; /** * Navigates to the next step if possible and saves the data. */ goNext(): Promise; /** Returns true if user can go forward in wizard */ get canGoNext(): boolean; /** Runs a check function before going forward */ goNextIf(checkFunction: (goNext: () => Promise) => void): void; /** * Navigates to the previous step if possible and saves the data. */ goPrevious(): void; /** * Saves the data to server */ save(): Promise; /** * Returns signing url. */ get vismaSignUrl(): string; /** * The onboarding model is provided by the onboarding service. */ get model(): Onboarding; /** Returns the PDF preview address for the authorization pdf. */ getPdfPreviewAddress(): string; /** * Returns validation error for key if exists. * @param key - Validation error key. */ getValidationError(key: string): ApiValidationError; /** * Resets validation error for key if exists. * @param key - Validation error key. */ removeValidationError(key: string): void; /** * Checks if the given string is other identifier than Finnish Personal Identification Number * @param ssn given social security number */ isOtherIdentifier(ssn: string): boolean; /** * Launches the wizard. * @param id Optional onboarding id. */ launch(id?: string): Promise; private getSignatureMethods; } /** * Shows the worker report. * @example * ```html * * ``` */ export declare class WorkerReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: {}; /** Uses the WorkerReportController */ controller: typeof WorkerReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Employer report. */ export declare class WorkerReportController implements angular_2.IController { private ajax; /** * For NG-dependency injection * @ignore */ static $inject: string[]; private _yearOptions; private _currentReport; private _selectedYear; constructor(ajax: Ajax); /** * Controller initializations */ $onInit: () => void; /** Return year options for the year select control. */ get yearOptions(): null; /** * Returns the currently loaded report data. */ get currentReport(): any; /** * Returns the currently selected reporting year. */ get selectedYear(): any; /** * Sets the currently selected reporting year and reloads the data. */ set selectedYear(year: any); /** * Returns the worker email address from a report object otherwise null or undefined. * @param report The report object to search for worker email. * @returns Returns the email address or null/undefined. */ employerEmailFrom(report: any): string; /** * Checks if the selected reporting year is before incomes registry was established and/or * implemented. * @returns Returns true if selected year is before and false otherwise. */ get isSelectedYearBeforeIncomesRegistry(): boolean; /** * Returns avatar data based on the given url. * @param url Avatar url. * @returns Avatar data. */ avatarFrom(url: string): any; /** * Returns the authorization token for the current user. */ get token(): string; /** * Returns the api server address. */ get apiServerAddress(): string; private avatarDataFromIcon; private avatarDataFromUrl; private refreshData; } /** * Provides CRUD access to Workers (employees) created by the employer * or to whom the employer has paid salaries. */ 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 */ declare enum WorkerSalaryNotification { Always = "always", Silent = "silent" } /** WorkerSalarySlipDeliveryMethod enumeration */ declare enum WorkerSalarySlipDeliveryMethod { Default = "default", Payslip = "payslip", Omapalkka = "omapalkka" } /** * Shows the summary reports for the given data. * @example * ```html * * ``` */ export declare class WorkerSummaryReport extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** The data for the report. */ data: string; }; /** Uses the WorkerSummaryReportController */ controller: typeof WorkerSummaryReportController; /** The default template for the component. */ defaultTemplate: string; } /** * Renders a worker summary report or a calculation summary report for the given calculation(s). * Uses Handlebars templates (@salaxy/reports). */ export declare class WorkerSummaryReportController implements angular_2.IController { private templates; private $sce; private settingsService; private $timeout; private $http; private uiHelpers; private sessionService; private ajax; data: WorkerSummaryReportData; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Template for the report */ templateName: string; /** Boolean indicating if the refresh is in progress. */ refreshInprogress: boolean; /**Selected report language */ lang: Language; private renderedData; private renderedLang; private htmlData; private reportOptions; private reportTemplate; private reportData; private _reportLang; /** * Creates a new CalcReportController * @ignore */ constructor(templates: Templates, $sce: angular_2.ISCEService, settingsService: SettingsService, $timeout: angular_2.ITimeoutService, $http: angular_2.IHttpService, uiHelpers: UiHelpers, sessionService: SessionService, ajax: Ajax); /** * Implement IController */ $onInit(): void; /** * Get _reportLang */ get reportLang(): Language; /** * Set _reportLang & lang */ set reportLang(lang: Language); /** * Return languge text to ui */ get languageText(): "SALAXY.ENUM.Language.fi.label" | "SALAXY.ENUM.Language.en.label" | "SALAXY.ENUM.Language.sv.label" | "SALAXY.NG1.CalcReportsComponent.reportLanguageCompany"; /** Bindable and trusted html. */ get html(): any; private refresh; /** * Shows a download dialog for the given summary report. * @param inline - If true, the download link opens the pdf into a new web page. */ showDownloadDialog(inline?: boolean): void; private getDefaultReportOptions; /** * Handles pdf request * @param url post url * @param inline inline pdf * @param data business object */ private handlePdfRequest; } /** A summary report for a worker for a specific period (typically month or year) and selected employer. */ declare interface WorkerSummaryReportData { statistics?: CalculationResultStatistics | null; /** Worker avatar */ worker?: Avatar_2 | 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_2 | 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; } /** * Handles user interaction for displaying worker summary report */ export declare class WorkerSummaryReportDisplayController implements angular_2.IController { private uiHelpers; private reports; static $inject: string[]; /** * Creates a new instance of WorkerSummaryReportDisplayController * @param uiHelpers - Salaxy ui helpers service. */ constructor(uiHelpers: UiHelpers, reports: Reports); /** * Parses workerId from report url * @param reportUrl url to be parsed * @returns workerId */ parseWorkerID(reportUrl: string): string; /** * Query WorkerSummaryReportData and display it in dialog * @param refDate date */ display(refDate: string, workerId: string, employerId: string): void; } /** Additional result data for the worker summary report. */ declare interface WorkerSummaryResult { /** Cash salary row details. */ cashSalary?: SummaryCalculationRows | null; /** Benefits details. */ benefitsInKind?: SummaryCalculationRows | null; /** Expense details. */ expenses?: SummaryCalculationRows | null; } /** Controller handles Timer usecases */ export declare class WorkerTimerController extends ListControllerBase { private $interval; private sessionService; /** Binded crud controller */ crudController: any; /** User interface mode: "mini" is the front page card UI without the list and "edit" is just the editable list of entries. */ timerMode: "mini" | "edit" | ""; private timer; private _newTimerMessage; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** Constructor for dependency injection */ constructor($interval: angular_2.IIntervalService, uiHelpers: UiHelpers, sessionService: SessionService); /** * Controller initializations */ $onInit(): void; /** * Stop timer on destroy */ $onDestoy(): void; /** * Returns true if the message indicates that the timer should be on. */ get isTimerOn(): any; /** * Returns true if the message indicates that the timer should be on. */ get isTimerOnFromDayBefore(): any; /** * Ensure that atleast one message exists */ getTimerMessage(): Message; /** * List of items */ get list(): Message[]; /** Template for edit UI that is shown in a modal dialog. */ getEditDialogTemplateUrl(): string; /** * Creating of a new item */ getBlank(): Message; /** Starts the timer. */ startTimer(): void; /** Stops the timer. */ stopTimer(): void; /** * Formats time as minutes or seconds. * TODO: implement this as filter. * @param total Total number of minutes or seconds * @param unit Unit: seconds or minutes * @returns Formatted time */ formatTime(total: number, unit?: "minutes" | "seconds"): string; /** * Gets the total of the timesheets logged in messageThread. */ getAndFormatTotal(): string; /** * Override for ListControllerBase showEditDialog * @param item Item to edit or string "new" for creating a new one. * @param isNew Optional way of specifying that the item is a new item (with default values, not yet added to the list). * If item is string "new", this parameter will have no effect (will always be true). */ showEditDialog(item: Message | "new", isNew?: boolean): void; /** Gets the project text for a project */ getDimensionOptionText(value: string): string; private startTechnicalTimer; private calculateAndSetTotals; private stopTechnicalTimer; /** Overlapping timer log entries validation */ private validateEntries; } /** * Shows the workflow badge for object or list item. * @example * ```html * * ``` */ export declare class WorkflowBadge extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Expression for the api controller . */ apiCtrl: string; /** Object or list item which contains workflow message data. */ model: string; /** Comma separated list of types to show the badge for. */ wfTypes: string; /** Visual mode of the component: horizontal or vertical (default). */ mode: string; }; /** Uses the WorkflowBadgeController */ controller: typeof WorkflowBadgeController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for implementing workflow badge logic. */ export declare class WorkflowBadgeController implements angular_2.IController { private uiHelpers; private records; private uploadService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * API CRUD controller for the object. */ apiCtrl: ApiCrudObjectController; /** * wfTypes to show as badges. */ wfTypes: string[]; /** Bound model: ApiListItem or object with WorkflowData */ model: ApiListItem | WorkflowPayload | null; /** Visual mode of the component: horizontal or vertical (default). */ mode: "horizontal" | "vertical"; private _events; /** * Creates a new WorkflowBadgeController * @ignore */ constructor(uiHelpers: UiHelpers, records: Records_2, uploadService: UploadService); /** * Implement IController */ $onInit(): void; /** Workflow events for ui. */ get events(): WorkflowEvent[]; /** Opens a display for workflow event details */ showEventDetails(original: WorkflowEvent): void; /** Returns file icon for the attachment. */ private getAttachmentIcon; /** Returns download url for the attachment. */ private getAttachmentDownloadUrl; private toWorkflowEvent; private modifyArray; } /** * Renders a workflow buttons in the toolbar for assign, issue, close. * @example * ```html * * ``` */ export declare class WorkflowButtons extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Expression for the api controller . */ apiCtrl: string; /** Optional binding for enabling/disabling the controls */ disabled: string; /** on-change event */ onChange: string; /** Option to show/hide workflow assign control. Default is true */ showWorkflowAssign: string; }; /** Uses the WorkflowController */ controller: typeof WorkflowController; /** The default template for the component. */ defaultTemplate: string; } /** * Controller for implementing workflow logic. */ export declare class WorkflowController implements angular_2.IController { protected workflowService: WorkflowService; protected uiHelpers: UiHelpers; protected sessionService: SessionService; protected credentialService: CredentialService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * API CRUD controller for the object. */ apiCtrl: ApiCrudObjectController; showWorkflowAssign: boolean; /** * Single wfType to show. */ wfType: string; /** Returns true if the update is in progress */ isUpdating: boolean; /** * Function that is called when a new workflow action has happened.. * Function has the following locals: item: the parent item for workflow, isDelete: true/false if the workflow action was a removal of the event. */ onChange: (params: { /** Item details after change */ item: any; /** Delete/creation information */ isDelete: boolean; }) => void; /** Read only flag */ readOnly: boolean; private _events; /** * Creates a new WorkflowController * @ignore */ constructor(workflowService: WorkflowService, uiHelpers: UiHelpers, sessionService: SessionService, credentialService: CredentialService); /** * Implement IController */ $onInit(): void; /** Returns the events of given type. */ get events(): WorkflowEvent[]; /** * Returns the current workflow event of the given type. * @param wfType Event type of the workflow event. * @returns Returns the current workflow event of the given type. */ getWorkflowEvent(wfType: string): WorkflowEvent; /** * Returns true if the workflow of the current item has an event of the given type. * @param wfType Event type of the workflow event. * @returns Returns true if the current item contains an event of the given type. */ hasWorkflowEvent(wfType: string): boolean; /** * Adds/updates the workflow event for the current item. * @param wfEvent Workflow event to add/update. * @returns Reloaded item. */ saveWorkflowEvent(wfEvent: WorkflowEvent): Promise; /** * Deletes the given event or all events with given type. * @param wfIdOrType Id or type of the workflow event. * @returns - Reloaded item. */ deleteWorkflowEvent(wfIdOrType: string): Promise; /** * Shows a workflow editor for the given event. * Saves the event and reloads the item. * @param config Configuration for the worklow editor. * @param wfEvent Workflow event for the editor. * @returns - Reloaded item. */ showWorkflowEventEditor(config: WorkflowEditorConfig, wfEvent: WorkflowEvent): Promise; /** Returns avatar for the given credential. */ getCredential(credentialId: string): SessionUserCredential; /** Gets the credetial of the current assigned-to person or undefined if there is no assignment. */ getAssignedTo(): SessionUserCredential | undefined; /** Returns credentials for the current account. */ get credentials(): SessionUserCredential[]; /** Returns the credential for current session */ get self(): SessionUserCredential; /** * Responds to button click with appropriate UI logic. * @param type The button that was clicked. * @param credential The credential to assign to. Only for type "assign". Use undefined to remove assignment. */ buttonClick(type: "close" | "assign" | "issue", credential?: SessionUserCredential): void; private modifyArray; private getSingleWorkflowEvent; } /** Defines the data that IWorkflowItem must provide. */ declare interface WorkflowData { /** Workflow events for the item. */ events?: WorkflowEvent[] | null; } /** Interface for workflow dialog configuration object. */ export declare interface WorkflowEditorConfig { /** Title text for the dialog */ title: string; /** If true, shows the control for the ui -property. */ showUi: boolean; } /** Event in the workflow */ 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 */ declare enum WorkflowEventFeatures { None = "none", IsActive = "isActive", IsEditable = "isEditable", IsRemovable = "isRemovable", IsOnHold = "isOnHold" } declare type WorkflowPayload = ApiCrudObject & { workflowData: WorkflowData; }; /** * Renders a workflow re-open control. * @example * ```html * * ``` */ export declare class WorkflowReopen extends ComponentBase { /** * The following component properties (attributes in HTML) are bound to the Controller. * For detailed functionality, refer to [controller](#controller) implementation. */ bindings: { /** Expression for the api controller . */ apiCtrl: string; /** Optional binding for enabling/disabling the control */ disabled: string; /** Called when workflow action has been taken */ onChange: string; }; /** Uses the WorkflowController */ controller: typeof WorkflowController; /** The default template for the component. */ defaultTemplate: string; } /** * Service for workflow logic. * For implementation specific workflows you shoud extend this class * and inject the extended class as a WorkflowService. */ export declare class WorkflowService { protected sessionService: SessionService; protected credentialService: CredentialService; /** * For NG-dependency injection * @ignore */ static $inject: string[]; /** * Creates a new instance of WorkflowService. */ constructor(sessionService: SessionService, credentialService: CredentialService); /** * Returns credentials for the current account. * Override this in the pro environment. */ get credentials(): SessionUserCredential[]; /** * Returns the credential for current session. * Override this in the pro environment. */ get self(): SessionUserCredential; /** * Adds/updates the workflow event for the current item. * @param apiCtrl API CRUD object controller for the item. * @param wfEvent Workflow event to add/update. * @returns Reloaded item. */ saveWorkflowEvent(apiCtrl: ApiCrudObjectController, wfEvent: WorkflowEvent): Promise; /** * Deletes the given event or all events with given type. * @param apiCtrl API CRUD object controller for the item. * @param wfIdOrType Id or type of the workflow event. * @returns - Reloaded item. */ deleteWorkflowEvent(apiCtrl: ApiCrudObjectController, wfIdOrType: string): Promise; } /** Connects to Worktime service in the staging server */ declare class WorktimeApiConnector extends StagingApiConnector { /** The current rows filtered by current payroll */ filteredRows: WorktimeImportRow[] | undefined; /** Manually editable rows */ editableRows: WorktimeImportRow[] | undefined; /** Number of rows that are outside the already created Payrolls. */ rowsOutsidePayrollCount: number; /** * List of payrolls (metadata) available in the system. * Undefined if the payrolls have not yet been fetched. */ payrolls: InputEnumOption[] | undefined; private _detailsPayrollId; constructor(serviceUrl: string, ajax: Ajax); /** * Current payroll id in the details view (typically employment relations specific, but may carry out from one employment to another when swtiching). * This is different from payrollId which is the payroll id in the list view. */ get detailsPayrollId(): string | undefined; set detailsPayrollId(value: string | undefined); /** * Gets the current payroll (metadata) in details view based on the detailsPayrollId. * @returns The payroll metadata if found or undefined. */ get detailsPayroll(): InputEnumOption | undefined; /** Current calc is the main preview calculation if available. */ get currentCalc(): Calculation | undefined; /** * Gets the worktime imports filtered by payroll. * @param payrollId - The payroll id to filter by. * @returns The filtered list of worktime imports. */ getFilteredList(payrollId: string | undefined): WorktimeImportInStagingListItem[]; /** * Fetches all payrolls and stores them in the payrolls property. * The calling components should typically call this method in init. * It is not in the constructor because AngularJS needs to get the promise and call timeout to get the UI to update. */ fetchAllPayrolls(): Promise; /** * 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; /** * Moves the selected rows to the given payroll. * @param rows - The rows to move. * @param payrollId - The payroll id to move to. * @returns The updated worktime import. */ moveToPayroll(rows: WorktimeImportRow[], payrollId: string): 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; /** * 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 setFiltersForDetailsPayroll; } /** Worktime Import is a shortcut to import worktime data from external sources to Payroll, Calculations, Ebsences and Holidays. */ 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; /** Monthly holiday accruals or accrued days off, which are registered for the employment. */ accruals?: WorktimeImportAccrual[] | 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; } /** Monthly holiday accruals or accrued days off, which are registered for the employment. */ declare interface WorktimeImportAccrual { /** 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; /** Logical period for the accrued amount of time. For example for the monthly holiday accrual, this is the month's period. */ period?: DateRange_2 | null; /** Accrued amount of time */ amount?: number | null; /** Unit of accrued time. */ unit?: WorktimeImportAccrualUnit | null; /** Kind of the accrual. Addition/subtraction or starting saldo. */ kind?: WorktimeImportAccrualKind | null; /** Type of the accrual. For example Holiday accrual or accrued days off. */ type?: WorktimeImportAccrualType | null; } /** Kind of accrued time. */ declare enum WorktimeImportAccrualKind { /** Register addition/subtraction */ Default = "default", /** Current saldo for the total accruing period. For example, start saldo for the holiday year. */ Saldo = "saldo" } /** Type of accrued time. */ declare enum WorktimeImportAccrualType { /** Holiday accrual. Typically registered for a month. */ HolidayAccrual = "holidayAccrual", /** Employees earn paid time off as 'accrued days off'*/ AccruedDaysOff = "accruedDaysOff" } /** Unit of accrued time. */ declare enum WorktimeImportAccrualUnit { /** Hours */ Hours = "hours", /** Days */ Days = "days" } /** 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. */ 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. */ 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. */ 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_2; /** 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. */ 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 used to be a simplified version => Now a full @salaxy/core Avatar is used. */ avatar: Avatar_2; /** 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; } /** Contains a Preview of objects that would be created / updated in the import. */ 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_2[] | 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_2[] | 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. */ declare class WorktimeImportPreviewMetadata { /** Period for the calculation */ period: DateRange_2; /** 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. */ 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_2 | null; /** Usecase specific data */ data?: { [key: string]: any; } | null; } /** WorktimeImportStatus enumeration */ declare enum WorktimeImportStatus { Uploaded = "uploaded", Parsed = "parsed", Processing = "processing", Processed = "processed", Error = "error", Archived = "archived" } /** 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. */ 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; } /** Encapsulates yearly side costs into one class. */ 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; } /** The details of company data as provided by the Finnish Business Infromation System (YTJ/BIS) */ 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 */ 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", BusinessPartnership = "businessPartnership", 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. */ 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. */ 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; } export { }