@deboxsoft/accounting-api
Advanced tools
Comparing version 0.1.0-alpha.38 to 0.1.0-alpha.39
@@ -13,7 +13,2 @@ 'use strict'; | ||
}; | ||
const accountValidate = { | ||
code: (value) => accountValidation.code.validate(value), | ||
name: (value) => accountValidation.name.validate(value), | ||
type: (value) => accountValidation.type.validate(value) | ||
}; | ||
const accountValidationSchema = yup.object().shape(accountValidation); | ||
@@ -32,10 +27,2 @@ | ||
}; | ||
const transactionValidate = { | ||
date: (value) => transactionValidation.date.validate(value), | ||
noJournal: (value) => transactionValidation.noJournal.validate(value), | ||
noTransaction: (value) => transactionValidation.noTransaction.validate(value), | ||
type: (value) => transactionValidation.type.validate(value), | ||
total: (value) => transactionValidation.total.validate(value), | ||
accounts: (value) => transactionValidation.accounts.validate(value) | ||
}; | ||
const transactionValidationSchema = yup.object().shape(transactionValidation); | ||
@@ -50,9 +37,2 @@ | ||
}; | ||
const companyValidate = { | ||
name: (value) => companyValidation.name.validate(value) | ||
}; | ||
const companyDivisionValidate = { | ||
code: (value) => companyDivisionValidation.code.validate(value), | ||
name: (value) => companyDivisionValidation.name.validate(value) | ||
}; | ||
const companyValidationSchema = yup.object().shape(companyValidation); | ||
@@ -69,10 +49,2 @@ const companyDivisionValidationSchema = yup.object().shape(companyDivisionValidation); | ||
}; | ||
const bankReconciliationValidate = { | ||
accountBank: (value) => bankReconciliationValidation.accountBank.validate(value), | ||
bank: (value) => bankReconciliationValidation.bank.validate(value), | ||
accountId: (value) => bankReconciliationValidation.accountId.validate(value), | ||
nameAccountBank: (value) => bankReconciliationValidation.nameAccountBank.validate(value), | ||
balance: (value) => bankReconciliationValidation.balance.validate(value), | ||
date: (value) => bankReconciliationValidation.date.validate(value) | ||
}; | ||
const bankReconciliationValidationSchema = yup.object().shape(bankReconciliationValidation); | ||
@@ -85,7 +57,2 @@ | ||
}; | ||
const inventoryValidate = { | ||
name: (value) => inventoryValidation.name.validate(value), | ||
code: (value) => inventoryValidation.code.validate(value), | ||
quantity: (value) => inventoryValidation.quantity.validate(value) | ||
}; | ||
const inventoryValidationSchema = yup.object().shape(inventoryValidation); | ||
@@ -98,7 +65,2 @@ | ||
}; | ||
const stockValidate = { | ||
date: (value) => stockValidation.date.validate(value), | ||
inventoryId: (value) => stockValidation.inventoryId.validate(value), | ||
count: (value) => stockValidation.count.validate(value) | ||
}; | ||
const stockValidationSchema = yup.object().shape(stockValidation); | ||
@@ -123,16 +85,9 @@ | ||
exports.AccountingError = AccountingError; | ||
exports.accountValidate = accountValidate; | ||
exports.accountValidationSchema = accountValidationSchema; | ||
exports.bankReconciliationValidate = bankReconciliationValidate; | ||
exports.bankReconciliationValidationSchema = bankReconciliationValidationSchema; | ||
exports.companyDivisionValidate = companyDivisionValidate; | ||
exports.companyDivisionValidationSchema = companyDivisionValidationSchema; | ||
exports.companyValidate = companyValidate; | ||
exports.companyValidationSchema = companyValidationSchema; | ||
exports.inventoryValidate = inventoryValidate; | ||
exports.inventoryValidationSchema = inventoryValidationSchema; | ||
exports.stockValidate = stockValidate; | ||
exports.stockValidationSchema = stockValidationSchema; | ||
exports.transactionValidate = transactionValidate; | ||
exports.transactionValidation = transactionValidation; | ||
exports.transactionValidationSchema = transactionValidationSchema; |
40
index.js
@@ -9,7 +9,2 @@ import { string, object, number, array, date } from 'yup'; | ||
}; | ||
const accountValidate = { | ||
code: (value) => accountValidation.code.validate(value), | ||
name: (value) => accountValidation.name.validate(value), | ||
type: (value) => accountValidation.type.validate(value) | ||
}; | ||
const accountValidationSchema = object().shape(accountValidation); | ||
@@ -28,10 +23,2 @@ | ||
}; | ||
const transactionValidate = { | ||
date: (value) => transactionValidation.date.validate(value), | ||
noJournal: (value) => transactionValidation.noJournal.validate(value), | ||
noTransaction: (value) => transactionValidation.noTransaction.validate(value), | ||
type: (value) => transactionValidation.type.validate(value), | ||
total: (value) => transactionValidation.total.validate(value), | ||
accounts: (value) => transactionValidation.accounts.validate(value) | ||
}; | ||
const transactionValidationSchema = object().shape(transactionValidation); | ||
@@ -46,9 +33,2 @@ | ||
}; | ||
const companyValidate = { | ||
name: (value) => companyValidation.name.validate(value) | ||
}; | ||
const companyDivisionValidate = { | ||
code: (value) => companyDivisionValidation.code.validate(value), | ||
name: (value) => companyDivisionValidation.name.validate(value) | ||
}; | ||
const companyValidationSchema = object().shape(companyValidation); | ||
@@ -65,10 +45,2 @@ const companyDivisionValidationSchema = object().shape(companyDivisionValidation); | ||
}; | ||
const bankReconciliationValidate = { | ||
accountBank: (value) => bankReconciliationValidation.accountBank.validate(value), | ||
bank: (value) => bankReconciliationValidation.bank.validate(value), | ||
accountId: (value) => bankReconciliationValidation.accountId.validate(value), | ||
nameAccountBank: (value) => bankReconciliationValidation.nameAccountBank.validate(value), | ||
balance: (value) => bankReconciliationValidation.balance.validate(value), | ||
date: (value) => bankReconciliationValidation.date.validate(value) | ||
}; | ||
const bankReconciliationValidationSchema = object().shape(bankReconciliationValidation); | ||
@@ -81,7 +53,2 @@ | ||
}; | ||
const inventoryValidate = { | ||
name: (value) => inventoryValidation.name.validate(value), | ||
code: (value) => inventoryValidation.code.validate(value), | ||
quantity: (value) => inventoryValidation.quantity.validate(value) | ||
}; | ||
const inventoryValidationSchema = object().shape(inventoryValidation); | ||
@@ -94,7 +61,2 @@ | ||
}; | ||
const stockValidate = { | ||
date: (value) => stockValidation.date.validate(value), | ||
inventoryId: (value) => stockValidation.inventoryId.validate(value), | ||
count: (value) => stockValidation.count.validate(value) | ||
}; | ||
const stockValidationSchema = object().shape(stockValidation); | ||
@@ -118,2 +80,2 @@ | ||
export { AccountingError, accountValidate, accountValidationSchema, bankReconciliationValidate, bankReconciliationValidationSchema, companyDivisionValidate, companyDivisionValidationSchema, companyValidate, companyValidationSchema, inventoryValidate, inventoryValidationSchema, stockValidate, stockValidationSchema, transactionValidate, transactionValidation, transactionValidationSchema }; | ||
export { AccountingError, accountValidationSchema, bankReconciliationValidationSchema, companyDivisionValidationSchema, companyValidationSchema, inventoryValidationSchema, stockValidationSchema, transactionValidation, transactionValidationSchema }; |
{ | ||
"name": "@deboxsoft/accounting-api", | ||
"version": "0.1.0-alpha.38", | ||
"version": "0.1.0-alpha.39", | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
@@ -5,0 +5,0 @@ "repository": { |
import type { BaseSchema } from "yup"; | ||
import * as yup from "yup"; | ||
export declare const accountValidate: { | ||
code: (value: any) => Promise<any>; | ||
name: (value: any) => Promise<any>; | ||
type: (value: any) => Promise<any>; | ||
}; | ||
export declare const accountValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"type" | "code" | "name" | "parentId" | "active" | "isParent" | "memo", BaseSchema<any, Record<string, any>, any>>>>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"type" | "code" | "name" | "parentId" | "active" | "isParent" | "memo", BaseSchema<any, Record<string, any>, any>>>>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"type" | "code" | "name" | "parentId" | "active" | "isParent" | "memo", BaseSchema<any, Record<string, any>, any>>>>>>; | ||
export declare const accountValidationSchema: BaseSchema; |
import type { BaseSchema } from "yup"; | ||
import * as yup from "yup"; | ||
export declare const bankReconciliationValidate: { | ||
accountBank: (value: any) => Promise<any>; | ||
bank: (value: any) => Promise<any>; | ||
accountId: (value: any) => Promise<any>; | ||
nameAccountBank: (value: any) => Promise<any>; | ||
balance: (value: any) => Promise<any>; | ||
date: (value: any) => Promise<any>; | ||
}; | ||
export declare const bankReconciliationValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"date" | "accountId" | "bank" | "accountBank" | "nameAccountBank" | "balance", BaseSchema<any, Record<string, any>, any>>>>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"date" | "accountId" | "bank" | "accountBank" | "nameAccountBank" | "balance", BaseSchema<any, Record<string, any>, any>>>>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"date" | "accountId" | "bank" | "accountBank" | "nameAccountBank" | "balance", BaseSchema<any, Record<string, any>, any>>>>>>; | ||
export declare const bankReconciliationValidationSchema: BaseSchema; |
import type { BaseSchema } from "yup"; | ||
import * as yup from "yup"; | ||
export declare const companyValidate: { | ||
name: (value: any) => Promise<any>; | ||
}; | ||
export declare const companyDivisionValidate: { | ||
code: (value: any) => Promise<string>; | ||
name: (value: any) => Promise<string>; | ||
}; | ||
export declare const companyValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"name" | "email" | "address" | "phone" | "divisions", BaseSchema<any, Record<string, any>, any>>>>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"name" | "email" | "address" | "phone" | "divisions", BaseSchema<any, Record<string, any>, any>>>>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"name" | "email" | "address" | "phone" | "divisions", BaseSchema<any, Record<string, any>, any>>>>>>; | ||
export declare const companyDivisionValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, { | ||
code: import("yup/lib/string").RequiredStringSchema<string, Record<string, any>>; | ||
name: import("yup/lib/string").RequiredStringSchema<string, Record<string, any>>; | ||
}>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, { | ||
code: import("yup/lib/string").RequiredStringSchema<string, Record<string, any>>; | ||
name: import("yup/lib/string").RequiredStringSchema<string, Record<string, any>>; | ||
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, { | ||
code: import("yup/lib/string").RequiredStringSchema<string, Record<string, any>>; | ||
name: import("yup/lib/string").RequiredStringSchema<string, Record<string, any>>; | ||
}>>>; | ||
export declare const companyValidationSchema: BaseSchema; | ||
export declare const companyDivisionValidationSchema: BaseSchema; |
import type { BaseSchema } from "yup"; | ||
import * as yup from "yup"; | ||
export declare const inventoryValidate: { | ||
name: (value: any) => Promise<any>; | ||
code: (value: any) => Promise<any>; | ||
quantity: (value: any) => Promise<any>; | ||
}; | ||
export declare const inventoryValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"code" | "name" | "quantity" | "depreciation", BaseSchema<any, Record<string, any>, any>>>>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"code" | "name" | "quantity" | "depreciation", BaseSchema<any, Record<string, any>, any>>>>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"code" | "name" | "quantity" | "depreciation", BaseSchema<any, Record<string, any>, any>>>>>>; | ||
export declare const inventoryValidationSchema: BaseSchema; |
import type { BaseSchema } from "yup"; | ||
import * as yup from "yup"; | ||
export declare const stockValidate: { | ||
date: (value: any) => Promise<any>; | ||
inventoryId: (value: any) => Promise<any>; | ||
count: (value: any) => Promise<any>; | ||
}; | ||
export declare const stockValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"date" | "inventoryId" | "count", BaseSchema<any, Record<string, any>, any>>>>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"date" | "inventoryId" | "count", BaseSchema<any, Record<string, any>, any>>>>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"date" | "inventoryId" | "count", BaseSchema<any, Record<string, any>, any>>>>>>; | ||
export declare const stockValidationSchema: BaseSchema; |
import type { TransactionInput } from "../types"; | ||
import type { BaseSchema } from "yup"; | ||
import * as yup from "yup"; | ||
export declare const transactionValidation: Partial<Record<keyof TransactionInput, BaseSchema | undefined>>; | ||
export declare const transactionValidate: { | ||
date: (value: any) => Promise<any>; | ||
noJournal: (value: any) => Promise<any>; | ||
noTransaction: (value: any) => Promise<any>; | ||
type: (value: any) => Promise<any>; | ||
total: (value: any) => Promise<any>; | ||
accounts: (value: any) => Promise<any>; | ||
}; | ||
export declare const transactionValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"description" | "type" | "noJournal" | "noTransaction" | "date" | "accounts" | "total", BaseSchema<any, Record<string, any>, any>>>>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"description" | "type" | "noJournal" | "noTransaction" | "date" | "accounts" | "total", BaseSchema<any, Record<string, any>, any>>>>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<Record<string, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>, Partial<Record<"description" | "type" | "noJournal" | "noTransaction" | "date" | "accounts" | "total", BaseSchema<any, Record<string, any>, any>>>>>>; | ||
export declare const transactionValidationSchema: BaseSchema; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26091
610