/** * Copyright 2017–2019, LaborX PTY * Licensed under the AGPL Version 3 license. */ import BigNumber from "bignumber.js"; declare type HexString = string; declare type Address = string; export declare type DataStructureType = "CONTRACT" | "TASK" | "PENALTY" | "TERMINATION"; export declare type ContractType = "JOB" | "DISPUTE"; export declare type PaymentTimeline = "PAY_BY_TASK" | "PAY_BY_PROJECT"; export declare type PaymentValueType = "CURRENCY" | "PERCENT"; export declare type PenaltyApplicationType = "MISS_DEADLINE" | "LATE_PAYMENT"; export declare type TerminationParty = "TERMINATION_EMPLOYER" | "TERMINATION_ASSIGNEE"; /** * Defines contract data that should present. */ export interface ContractData { contractType: ContractType; documentHash: HexString; /** * Specifies a contract identifier that is linked with current contract. * Usually should be non-undefined for dispute contracts, so * it shows for which contract the dispute was opened. * * @type {HexString} * @memberof ContractData */ linkedContractId?: HexString; employer: Address; assignee: Address; /** * Specifies an arbiter address that will be used for a possible dispute. * If it is not specified then no dispute could be opened on current contract. * * @type {Address} * @memberof ContractData */ arbiter?: Address; /** * Specifies a original contract participant for a dispute contract. * When dispute is initiated then the opponent becomes `participant`. * * @type {Address} * @memberof ContractData */ participant?: Address; beginDate: number | BigNumber; paymentCurrencySymbol: HexString; paymentCurrencyAddress: Address; /** * Specifies if **full** contract budget should be deposited * during `signAndDeposit` procedure. * * @type {boolean} * @memberof ContractData */ lockFullBudget: boolean; paymentTimeline: PaymentTimeline; /** * Specifies terms of termination when if tasks that were not completed and * have upfront payment should be calculated and paid upfront returned back to * an employer. * * @type {boolean} * @memberof ContractData */ refundUpfrontOnTermination: boolean; /** * Specifies if it will be allowed to add more tasks after signing a contract. * * @type {boolean} * @memberof ContractData */ allowDynamicTasks: boolean; } export declare type TaskIdentifier = number | BigNumber | string; export interface TaskData { id: TaskIdentifier; hasUpfront: boolean; upfrontValueType: PaymentValueType; upfrontValue: number | BigNumber | string; budget: number | BigNumber | string; deadline: number | BigNumber | string; } export declare type TaskPenaltyIdentifier = number | BigNumber | string; export interface TaskPenaltyData { id: TaskPenaltyIdentifier; taskId: number | BigNumber | string; applicationType: PenaltyApplicationType; valueType: PaymentValueType; value: number | BigNumber | string; } export declare type TerminationIdentifier = number | BigNumber | string; export interface TerminationData { id: TerminationIdentifier; initiatorType: TerminationParty; payToType: TerminationParty; description: HexString; valueType: PaymentValueType; value: number | BigNumber | string; } export {};