UNPKG

nav-connect

Version:
129 lines (128 loc) 4.83 kB
/** * This file contains TypeScript interfaces generated from the NAV NTCA Common XML schema * Original schema: http://schemas.nav.gov.hu/NTCA/1.0/common */ /** * Atomic string types */ type AtomicStringType100 = string; type AtomicStringType1024 = string; type AtomicStringType128 = string; type AtomicStringType15 = string; type AtomicStringType16 = string; type AtomicStringType2 = string; type AtomicStringType200 = string; type AtomicStringType2048 = string; type AtomicStringType255 = string; type AtomicStringType256 = string; type AtomicStringType32 = string; type AtomicStringType4 = string; type AtomicStringType4000 = string; type AtomicStringType50 = string; type AtomicStringType512 = string; type AtomicStringType64 = string; type AtomicStringType8 = string; /** * Generic types */ type GenericDateType = string; type GenericDecimalType = number; type GenericTimestampType = string; /** * Special string types with patterns */ type SHA256Type = string; type SHA512Type = string; type SimpleText100NotBlankType = string; type SimpleText1024NotBlankType = string; type SimpleText15NotBlankType = string; type SimpleText200NotBlankType = string; type SimpleText255NotBlankType = string; type SimpleText50NotBlankType = string; type SimpleText512NotBlankType = string; /** * Business catalog elements */ type BankAccountNumberType = string; type CommunityVatNumberType = string; type CountryCodeType = string; type CountyCodeType = string; type CurrencyType = string; type PlateNumberType = string; type PostalCodeType = string; type TaxpayerIdType = string; type VatCodeType = "1" | "2" | "3" | "4" | "5"; /** * Common API types */ type BusinessResultCodeType = "ERROR" | "WARN" | "INFO"; /** 1-30 characters, alphanumeric with + and _ */ type EntityIdType = string; type FunctionCodeType = "OK" | "ERROR"; type LoginType = string; type RequestPageType = number; type ResponsePageType = number; type TechnicalResultCodeType = "CRITICAL" | "ERROR"; /** * Complex types */ interface BasicHeaderType { requestId: EntityIdType; timestamp: GenericTimestampType; requestVersion: "3.0"; headerVersion: "1.0"; } interface BasicRequestType { "@_xmlns": "http://schemas.nav.gov.hu/OSA/3.0/api"; "@_xmlns:common": "http://schemas.nav.gov.hu/NTCA/1.0/common"; header: BasicHeaderType; user: UserHeaderType; } interface BasicResponseType { header: BasicHeaderType; result: BasicResultType; } interface BasicResultType { funcCode: FunctionCodeType; errorCode?: SimpleText50NotBlankType; message?: SimpleText1024NotBlankType; notifications?: NotificationsType; } interface CryptoType { value: SimpleText512NotBlankType; cryptoType: "SHA-512" | "SHA3-512"; } interface GeneralErrorHeaderResponseType extends BasicResponseType { } interface NotificationsType { notification: NotificationType[]; } interface NotificationType { notificationCode: SimpleText100NotBlankType; notificationText: SimpleText1024NotBlankType; } interface TechnicalValidationResultType { validationResultCode: TechnicalResultCodeType; validationErrorCode?: SimpleText100NotBlankType; message?: SimpleText1024NotBlankType; } interface UserHeaderType { login: LoginType; passwordHash: { "@_cryptoType": "SHA-512"; "#text": SimpleText512NotBlankType; }; taxNumber: TaxpayerIdType; requestSignature: { "@_cryptoType": "SHA3-512"; "#text": SimpleText512NotBlankType; }; } /** * Element types */ interface GeneralErrorHeaderResponse extends GeneralErrorHeaderResponseType { } interface GeneralExceptionResponse extends BasicResultType { } export { AtomicStringType100, AtomicStringType1024, AtomicStringType128, AtomicStringType15, AtomicStringType16, AtomicStringType2, AtomicStringType200, AtomicStringType2048, AtomicStringType255, AtomicStringType256, AtomicStringType32, AtomicStringType4, AtomicStringType4000, AtomicStringType50, AtomicStringType512, AtomicStringType64, AtomicStringType8, GenericDateType, GenericDecimalType, GenericTimestampType, SHA256Type, SHA512Type, SimpleText100NotBlankType, SimpleText1024NotBlankType, SimpleText15NotBlankType, SimpleText200NotBlankType, SimpleText255NotBlankType, SimpleText50NotBlankType, SimpleText512NotBlankType, BankAccountNumberType, CommunityVatNumberType, CountryCodeType, CountyCodeType, CurrencyType, PlateNumberType, PostalCodeType, TaxpayerIdType, VatCodeType, BusinessResultCodeType, EntityIdType, FunctionCodeType, LoginType, RequestPageType, ResponsePageType, TechnicalResultCodeType, BasicHeaderType, BasicRequestType, BasicResponseType, BasicResultType, CryptoType, GeneralErrorHeaderResponseType, NotificationsType, NotificationType, TechnicalValidationResultType, UserHeaderType, GeneralErrorHeaderResponse, GeneralExceptionResponse, };