Skip to content

Commit

Permalink
feat(InvoiceOut): add customerOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
wmakeev committed Jul 19, 2021
1 parent 3bdc8ab commit dd01e23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moysklad-api-model",
"version": "0.2.4",
"version": "0.2.5",
"description": "Объектная модель API МойСклад для TypeScript проектов",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down
8 changes: 7 additions & 1 deletion src/model/InvoiceOut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ import type {
HasVat,
HasVatPatch
} from '.'
import type { EntityRef } from './EntityRef'

export type InvoiceOutFields = {
customerOrder?: EntityRef<'customerorder'>
}

export type InvoiceOut = DocumentWithPositions<'invoiceout'> & HasVat

export type InvoiceOutPatch = DocumentWithPositionsPatch<'invoiceout'> &
HasVatPatch
HasVatPatch &
Partial<Pick<InvoiceOutFields, 'customerOrder'>>
5 changes: 3 additions & 2 deletions test/model/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const customerorder: Patch<'customerorder'> = {}

testTypeEqual<number | undefined>(customerorder.positions?.[0].reserve)

const invoicein: Patch<'invoiceout'> = {}
const invoiceOut: Patch<'invoiceout'> = {}

invoicein.positions?.[0].price
invoiceOut.positions?.[0].price
invoiceOut.customerOrder

0 comments on commit dd01e23

Please sign in to comment.