-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- изменение MetaType на Union из строк - добавление срезов полей сущностей для преобразований с Expand и Patch - описание точек доступа API по методам - доработка Expand - изменение Patch на более простую структуру - прочие доработки и тестирование
- Loading branch information
Showing
58 changed files
with
1,140 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type { FinanceIn, FinanceInPatch } from './FinanceIn' | ||
|
||
export type CashIn = FinanceIn<'cashin'> | ||
|
||
export type CashInPatch = FinanceInPatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type { FinanceOut, FinanceOutPatch } from './FinanceOut' | ||
|
||
export type CashOut = FinanceOut<'cashout'> | ||
|
||
export type CashOutPatch = FinanceOutPatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
import type { EntityRef } from './EntityRef' | ||
import type { HasVat } from './HasVat' | ||
import type { MetaType } from './MetaType' | ||
import type { Order, OrderExpand } from './Order' | ||
import type { TaxSystem } from './TaxSystem' | ||
import type { | ||
EntityRef, | ||
HasVat, | ||
Order, | ||
OrderExpand, | ||
OrderPatch, | ||
TaxSystem | ||
} from '.' | ||
|
||
export type CustomerOrder = Order<MetaType.CustomerOrder> & | ||
HasVat & { | ||
taxSystem?: TaxSystem | ||
export type CustomerOrderFields = HasVat & { | ||
taxSystem?: TaxSystem | ||
|
||
readonly reservedSum: number | ||
readonly reservedSum: number | ||
|
||
purchaseOrders?: EntityRef<MetaType.PurchaseOrder>[] | ||
purchaseOrders?: EntityRef<'purchaseorder'>[] | ||
|
||
// TODO Проверить связи (нет в документации?) | ||
// TODO Проверить связи (нет в документации?) | ||
|
||
readonly shippedSum: number | ||
demands?: EntityRef<MetaType.Demand>[] | ||
readonly shippedSum: number | ||
demands?: EntityRef<'demand'>[] | ||
|
||
readonly invoicedSum: number | ||
invoicesOut?: EntityRef<MetaType.InvoiceOut>[] | ||
readonly invoicedSum: number | ||
invoicesOut?: EntityRef<'invoiceout'>[] | ||
|
||
readonly payedSum: number | ||
payments?: EntityRef<MetaType.PaymentOut | MetaType.PaymentIn>[] | ||
} | ||
readonly payedSum: number | ||
payments?: EntityRef<'paymentout' | 'paymentin'>[] | ||
} | ||
|
||
export type CustomerOrder = Order<'customerorder'> & CustomerOrderFields | ||
|
||
export type CustomerOrderExpand = Pick< | ||
CustomerOrder, | ||
'purchaseOrders' | 'demands' | 'invoicesOut' | 'payments' | ||
> & | ||
OrderExpand<MetaType.CustomerOrder> | ||
OrderExpand<'customerorder'> | ||
|
||
export type CustomerOrderPatch = OrderPatch<'customerorder'> & | ||
Partial<Pick<CustomerOrderFields, 'taxSystem'>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
import type { MetaType } from './MetaType' | ||
import type { Position } from './Position' | ||
import type { Position, PositionPatch } from './Position' | ||
|
||
export interface CustomerOrderPosition | ||
extends Position<MetaType.CustomerOrderPosition> { | ||
export type CustomerOrderPositionFields = { | ||
/** | ||
* НДС | ||
*/ | ||
vat: number | ||
|
||
shipped: number | ||
|
||
/** | ||
* Зарезервированное кол-во товара в позиции | ||
*/ | ||
reserve: number | ||
} | ||
|
||
export type CustomerOrderPosition = Position<'customerorderposition'> & | ||
CustomerOrderPositionFields | ||
|
||
export type CustomerOrderPositionPatch = PositionPatch<'customerorderposition'> & | ||
Partial<Pick<CustomerOrderPositionFields, 'vat' | 'reserve' | 'shipped'>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { DocumentWithPositions, HasVat, MetaType } from '.' | ||
|
||
export type Demand = DocumentWithPositions<MetaType.Demand> & HasVat | ||
export type Demand = DocumentWithPositions<'demand'> & HasVat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.