UNPKG

internetmarke

Version:

A node implementation to use the Internetmarke web service of Deutsche Post.

49 lines (48 loc) 1.29 kB
export declare enum DinPaper { DinA0 = "A0", DinA1 = "A1", DinA2 = "A2", DinA3 = "A3", DinA4 = "A4", DinA5 = "A5", DinA6 = "A6", DinA7 = "A7", DinA8 = "A8", DinA9 = "A9", DinA10 = "A10" } export declare enum DinEnvelope { DinB4 = "B4", DinB5 = "B5", DinB6 = "B6", DinC4 = "C4", DinC5 = "C5", DinC6 = "C6", DinLang = "DL", None = "NONE" } export declare type DinFormat = DinPaper | DinEnvelope; export declare type MeasurementSystem = 'METRIC' | 'IMPERIAL'; export declare type LengthUnit = 'mm' | 'in'; export declare type WeightUnit = 'g' | 'oz' | 'g/m²'; export interface Dimension { size: number[]; unit: LengthUnit; } export interface Weight { value: number; unit: WeightUnit; } export interface PaperDetailOptions { /** The paper strength in g/m². Defaults to 80 for paper, 90 for envelopes and 150 for postcards. */ grammage?: number; /** The applied measurement system for the ouput. Defaults to 'METRIC'. */ system?: MeasurementSystem; } export interface PaperDetails { format: DinFormat; dimensions: Dimension; weight: Weight; grammage: Weight; } export declare const getPaperDetails: (format: DinFormat, options?: PaperDetailOptions) => PaperDetails | null;