UNPKG

fhirbuilder

Version:
32 lines (31 loc) 1.29 kB
import { IAttachment, IElement } from 'fhirtypes/dist/r4'; import { Attachment } from '../../models'; import { IBuildable } from '../base/IBuildable'; import { UnderscoreKeys } from '../base/resource-type-map.interface'; import { ElementBuilder } from '../base/ElementBuilder'; type PrimitiveExtensionFields = keyof Pick<IAttachment, UnderscoreKeys<IAttachment>>; interface IAttachmentBuilder extends IBuildable<Attachment> { setContentType(contentType: string): this; setLanguage(language: string): this; setData(data: string): this; setUrl(url: string): this; setTitle(title: string): this; setCreation(creation: string): this; setHash(hash: string): this; setSize(size: number): this; } export declare class AttachmentBuilder extends ElementBuilder implements IAttachmentBuilder { private readonly attachment; constructor(); addPrimitiveExtension(param: PrimitiveExtensionFields, extension: IElement): this; setContentType(contentType: string): this; setLanguage(language: string): this; setData(data: string): this; setUrl(url: string): this; setSize(size: number): this; setHash(hash: string): this; setTitle(title: string): this; setCreation(creation: string): this; build(): Attachment; } export {};