/** * @author Roman Vottner * @copyright 2020 Roman Vottner * @license Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { HttpClient } from '../httpClient'; import type { MessageType } from '../tracker'; import { type ComponentValueEntry, Dictionary, type ElementEntry, type SegmentEntry } from '../validator'; export interface EdifactMessageSpecification { readonly messageType: string; readonly version: string; readonly release: string; readonly controllingAgency: string; readonly componentValueTable: Dictionary; /** * Contains the available segments as key and the respective elements * a segment contains as well as the mandatory count as value */ readonly segmentTable: Dictionary; /** * Contains the actual message structure generatedby this parser */ readonly messageStructureDefinition: MessageType[]; type(): string; versionAbbr(): string; } export declare class EdifactMessageSpecificationImpl implements EdifactMessageSpecification { messageType: string; version: string; release: string; controllingAgency: string; segmentTable: Dictionary; elementTable: Dictionary; componentValueTable: Dictionary; messageStructureDefinition: MessageType[]; constructor(messageType: string, version: string, release: string, controllingAgency: string); type(): string; versionAbbr(): string; } export type ParsingResultType = { specObj: EdifactMessageSpecification; promises: Promise[]; }; export interface MessageStructureParser { loadTypeSpec(): Promise; } export declare class UNECEMessageStructureParser implements MessageStructureParser { readonly version: string; readonly type: string; readonly httpClient: HttpClient; constructor(version: string, type: string); private extractTextValue; protected loadPage(page: string): Promise; protected formatComponentName(name?: string): string | undefined; protected parseComponentDefinitionPage(component: string, page: string, definition: EdifactMessageSpecification): Promise; protected parseSegmentDefinitionPage(segment: string, page: string, definition: EdifactMessageSpecification): Promise; private parseMessagePage; loadTypeSpec(): Promise; } //# sourceMappingURL=messageStructureParser.d.ts.map