UNPKG

moysklad-api-model

Version:

Объектная модель API МойСклад для TypeScript проектов

6 lines (5 loc) 391 B
import type { DocumentMetaType, DocumentWithPositionsMetaType, EntityByMetaType, Expand } from '..'; /** * Шаблон нового документа `/entity/{type}/new` */ export type PrefilledDocument<T extends DocumentMetaType> = Omit<T extends DocumentWithPositionsMetaType ? Expand<EntityByMetaType[T], 'positions'> : EntityByMetaType[T], 'meta' | 'id' | 'accountId' | 'updated'>;