UNPKG

@springtree/eva-core

Version:
134 lines (114 loc) 3.1 kB
declare module EVA.Cookbook { export interface CreateAccountingRecipe { Recipe?: string; IsActive: boolean; Name?: string; } export interface CreateAccountingRecipeResponse { ID: number; HasErrors: boolean; Errors: ParseRecipeError[]; Error: EVA.Core.ServiceError; } export interface ParseRecipeError { Type: ParsingErrorType; Message: string; SourceLine: string; SourceLineNumber: number; SourceColumn: number; } export const enum ParsingErrorType { InvalidSyntax = 0, UnknownVariable = 1, InvalidComparison = 2, InvalidOperator = 3, MissingCredit = 4, MissingDebit = 5, AmountMustBeNumerical = 6, InvalidBookOnOrganizationUnit = 7, InvalidEventType = 8, DuplicateVariable = 9, InvalidVariable = 10 } export interface GetAccountingRecipe { ID: number; } export interface GetAccountingRecipeResponse { Recipe: AccountingRecipeDto; Error: EVA.Core.ServiceError; } export interface AccountingRecipeDto { ID: number; Recipe: string; Name: string; EventType: EVA.Core.FinancialEventTypes; IsActive: boolean; } export interface ListAccountingRecipes { IsActive: boolean; Type: EVA.Core.FinancialEventTypes; PageConfig?: EVA.Core.PageConfig; } export interface ListAccountingRecipesResponse { Result: EVA.Core.PagedResult<AccountingRecipeDto>; Error: EVA.Core.ServiceError; } export interface ParseAccountingRecipe { Recipe?: string; } export interface ParseRecipeResponse { HasErrors: boolean; Errors: ParseRecipeError[]; Error: EVA.Core.ServiceError; } export interface PreviewAccountingRecipe { Recipes?: AccountingRecipeToPreview[]; FinancialEventIDs?: number[]; OrderID: number; } export interface AccountingRecipeToPreview { ID: number; Recipe: string; } export interface PreviewAccountingRecipeResponse { BookingPreviewSummaries: AccountBookingPreview[]; Warnings: string[]; BookingPreviewDetails: AccountBookingDetails[]; HasErrors: boolean; Errors: ParseRecipeError[]; Error: EVA.Core.ServiceError; } export interface AccountBookingPreview { Date?: string; BookedOnOrganizationUnitID: number; BookedOnOrganizationUnitName: string; BookedOnAccountID: number; BookedOnAccountNumber: string; BookedOnAccountName: string; Amount?: number; CurrencyID: string; } export interface AccountBookingDetails { Amount?: number; BookedOnOrganizationUnitID: number; BookedOnOrganizationUnitName: string; BookedOnAccountID: number; BookedOnAccountNumber: string; BookedOnAccountName: string; AccountingRecipeID: number; Date?: string; Description: string; CurrencyID: string; } export interface UpdateAccountingRecipe { ID: number; Recipe?: string; IsActive: boolean; Name?: string; } export interface UpdateAccountingRecipeResponse { HasErrors: boolean; Errors: ParseRecipeError[]; Error: EVA.Core.ServiceError; } }