@twin.org/standards-unece 0.0.3-next.42 → 0.0.3-next.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/es/helpers/unLocodes.js +2 -6
  2. package/dist/es/helpers/unLocodes.js.map +1 -1
  3. package/dist/es/schemas/UneceAcademicQualification.json +1 -2
  4. package/dist/es/schemas/UneceAccountingAccount.json +1 -2
  5. package/dist/es/schemas/UneceAccreditation.json +1 -2
  6. package/dist/es/schemas/UneceAcknowledgementDocument.json +1 -2
  7. package/dist/es/schemas/UneceAdvancePayment.json +1 -2
  8. package/dist/es/schemas/UneceAgriculturalApplication.json +1 -2
  9. package/dist/es/schemas/UneceAgriculturalCertificate.json +1 -2
  10. package/dist/es/schemas/UneceAgriculturalCharacteristic.json +1 -2
  11. package/dist/es/schemas/UneceAgriculturalProcess.json +1 -2
  12. package/dist/es/schemas/UneceAgriculturalZoneArea.json +1 -2
  13. package/dist/es/schemas/UneceAirFlowUnitMeasureType.json +1 -2
  14. package/dist/es/schemas/UneceAllergy.json +1 -2
  15. package/dist/es/schemas/UneceAmountType.json +1 -2
  16. package/dist/es/schemas/UneceAnimalBatch.json +1 -2
  17. package/dist/es/schemas/UneceAnimalCertificate.json +1 -2
  18. package/dist/es/schemas/UneceAnimalCertification.json +1 -2
  19. package/dist/es/schemas/UneceAnimalHoldingEvent.json +1 -2
  20. package/dist/es/schemas/UneceAnimalIdentity.json +1 -2
  21. package/dist/es/schemas/UneceAppliedAllowanceCharge.json +1 -2
  22. package/dist/es/schemas/UneceAppliedChemicalTreatment.json +1 -2
  23. package/dist/es/schemas/UneceAppliedTax.json +1 -2
  24. package/dist/es/schemas/UneceArea.json +0 -1
  25. package/dist/es/schemas/UneceAssertion.json +1 -2
  26. package/dist/es/schemas/UneceAssessment.json +1 -2
  27. package/dist/es/schemas/UneceAssociatedTransportEquipment.json +1 -2
  28. package/dist/es/schemas/UneceAttachedTransportEquipment.json +1 -2
  29. package/dist/es/schemas/UneceAuthentication.json +1 -2
  30. package/dist/es/schemas/UneceAuthoritativeSignatoryPerson.json +1 -2
  31. package/dist/es/schemas/UneceAvailablePeriod.json +1 -2
  32. package/dist/es/schemas/UneceBasicWorkItem.json +1 -2
  33. package/dist/es/schemas/UneceBinaryFile.json +1 -2
  34. package/dist/es/schemas/UneceBirthAddress.json +1 -2
  35. package/dist/es/schemas/UneceBooking.json +1 -2
  36. package/dist/es/schemas/UneceBotanicalCrop.json +1 -2
  37. package/dist/es/schemas/UneceBranchFinancialInstitution.json +1 -2
  38. package/dist/es/schemas/UneceBreakdownStatement.json +1 -2
  39. package/dist/es/schemas/UneceCalculatedPrice.json +1 -2
  40. package/dist/es/schemas/UneceCalibratedMeasurement.json +1 -2
  41. package/dist/es/schemas/UneceCancellationStatus.json +1 -2
  42. package/dist/es/schemas/UneceCargo.json +1 -2
  43. package/dist/es/schemas/UneceCargoInsurance.json +1 -2
  44. package/dist/es/schemas/UneceCarriedEquipment.json +1 -2
  45. package/dist/es/schemas/UneceCash.json +1 -2
  46. package/dist/es/schemas/UneceChemical.json +1 -2
  47. package/dist/es/schemas/UneceCheque.json +1 -2
  48. package/dist/es/schemas/UneceCircle.json +1 -2
  49. package/dist/es/schemas/UneceClassification.json +1 -2
  50. package/dist/es/schemas/UneceClause.json +1 -2
  51. package/dist/es/schemas/UneceColour.json +1 -2
  52. package/dist/es/schemas/UneceCommunication.json +1 -2
  53. package/dist/es/schemas/UneceCommunicationEvent.json +1 -2
  54. package/dist/es/schemas/UneceComplexDescription.json +1 -2
  55. package/dist/es/schemas/UneceConformanceCertificate.json +1 -2
  56. package/dist/es/schemas/UneceConsignment.json +1 -2
  57. package/dist/es/schemas/UneceConsignmentItem.json +1 -2
  58. package/dist/es/schemas/UneceContactPerson.json +1 -2
  59. package/dist/es/schemas/UneceContract.json +1 -2
  60. package/dist/es/schemas/UneceControlSettingParameter.json +1 -2
  61. package/dist/es/schemas/UneceConvoy.json +1 -2
  62. package/dist/es/schemas/UneceCooperatingOrganization.json +1 -2
  63. package/dist/es/schemas/UneceCoordinateReferenceSystem.json +1 -2
  64. package/dist/es/schemas/UneceCoordinateSourceSystem.json +1 -2
  65. package/dist/es/schemas/UneceCorrectiveAction.json +1 -2
  66. package/dist/es/schemas/UneceCorrectiveEvent.json +1 -2
  67. package/dist/es/schemas/UneceCountry.json +1 -2
  68. package/dist/es/schemas/UneceCountrySubDivision.json +1 -2
  69. package/dist/es/schemas/UneceCreditorFinancialAccount.json +1 -2
  70. package/dist/es/schemas/UneceCreditorFinancialInstitution.json +1 -2
  71. package/dist/es/schemas/UneceCropMixtureConstituent.json +1 -2
  72. package/dist/es/schemas/UneceCropProduceBatch.json +1 -2
  73. package/dist/es/schemas/UneceCropProtectionTreatment.json +1 -2
  74. package/dist/es/schemas/UneceCurrencyExchange.json +1 -2
  75. package/dist/es/schemas/UneceCustomerClass.json +1 -2
  76. package/dist/es/schemas/UneceCustomsValuation.json +1 -2
  77. package/dist/es/schemas/UneceDangerousGoods.json +1 -2
  78. package/dist/es/schemas/UneceDebtorFinancialAccount.json +1 -2
  79. package/dist/es/schemas/UneceDebtorFinancialInstitution.json +1 -2
  80. package/dist/es/schemas/UneceDelimitedPeriod.json +1 -2
  81. package/dist/es/schemas/UneceDeliveryAdjustment.json +1 -2
  82. package/dist/es/schemas/UneceDeliveryInstructions.json +1 -2
  83. package/dist/es/schemas/UneceDeliverySchedule.json +1 -2
  84. package/dist/es/schemas/UneceDeliveryTerms.json +1 -2
  85. package/dist/es/schemas/UneceDigitalMethod.json +1 -2
  86. package/dist/es/schemas/UneceDirectPosition.json +1 -2
  87. package/dist/es/schemas/UneceDisability.json +1 -2
  88. package/dist/es/schemas/UneceDisposalInstructions.json +1 -2
  89. package/dist/es/schemas/UneceDocument.json +1 -2
  90. package/dist/es/schemas/UneceDocumentCharacteristic.json +1 -2
  91. package/dist/es/schemas/UneceDocumentContextParameter.json +1 -2
  92. package/dist/es/schemas/UneceDocumentHandlingInstructions.json +1 -2
  93. package/dist/es/schemas/UneceDocumentLineDocument.json +1 -2
  94. package/dist/es/schemas/UneceDocumentStatus.json +1 -2
  95. package/dist/es/schemas/UneceDurationUnitMeasureType.json +1 -2
  96. package/dist/es/schemas/UneceEmission.json +1 -2
  97. package/dist/es/schemas/UneceEmployerIdentity.json +1 -2
  98. package/dist/es/schemas/UneceEnvelope.json +1 -2
  99. package/dist/es/schemas/UneceEquipment.json +1 -2
  100. package/dist/es/schemas/UneceError.json +1 -2
  101. package/dist/es/schemas/UneceEventElement.json +1 -2
  102. package/dist/es/schemas/UneceExchangedDeclaration.json +1 -2
  103. package/dist/es/schemas/UneceExchangedDocument.json +1 -2
  104. package/dist/es/schemas/UneceExchangedDocumentContext.json +1 -2
  105. package/dist/es/schemas/UneceExperienceEvent.json +1 -2
  106. package/dist/es/schemas/UneceExperienceFacility.json +1 -2
  107. package/dist/es/schemas/UneceExperienceItem.json +1 -2
  108. package/dist/es/schemas/UneceExperienceProduct.json +1 -2
  109. package/dist/es/schemas/UneceExperienceProgramAction.json +1 -2
  110. package/dist/es/schemas/UneceFieldCrop.json +1 -2
  111. package/dist/es/schemas/UneceFileSizeUnitMeasureType.json +1 -2
  112. package/dist/es/schemas/UneceFinancialAdjustment.json +1 -2
  113. package/dist/es/schemas/UneceFinancialCard.json +1 -2
  114. package/dist/es/schemas/UneceFinancialIdentity.json +1 -2
  115. package/dist/es/schemas/UneceFinancialInstitutionAddress.json +1 -2
  116. package/dist/es/schemas/UneceFinancingFinancialAccount.json +1 -2
  117. package/dist/es/schemas/UneceFinancingRequestDocument.json +1 -2
  118. package/dist/es/schemas/UneceFinancingRequestResultDocument.json +1 -2
  119. package/dist/es/schemas/UneceFinancingStatus.json +1 -2
  120. package/dist/es/schemas/UneceFinancingSummaryDocument.json +1 -2
  121. package/dist/es/schemas/UneceFoodChoice.json +1 -2
  122. package/dist/es/schemas/UneceForecastTerms.json +1 -2
  123. package/dist/es/schemas/UneceFuel.json +1 -2
  124. package/dist/es/schemas/UneceGeographicalArea.json +1 -2
  125. package/dist/es/schemas/UneceGeographicalCoordinate.json +1 -2
  126. package/dist/es/schemas/UneceGeographicalFeature.json +1 -2
  127. package/dist/es/schemas/UneceGeographicalGrid.json +1 -2
  128. package/dist/es/schemas/UneceGeographicalLine.json +1 -2
  129. package/dist/es/schemas/UneceGeographicalMultiCurve.json +1 -2
  130. package/dist/es/schemas/UneceGeographicalMultiPoint.json +1 -2
  131. package/dist/es/schemas/UneceGeographicalMultiSurface.json +1 -2
  132. package/dist/es/schemas/UneceGeographicalObjectCharacteristic.json +1 -2
  133. package/dist/es/schemas/UneceGeographicalPoint.json +1 -2
  134. package/dist/es/schemas/UneceGeographicalSurface.json +1 -2
  135. package/dist/es/schemas/UneceGeopoliticalRegion.json +1 -2
  136. package/dist/es/schemas/UneceGoodsCharacteristic.json +1 -2
  137. package/dist/es/schemas/UneceGovernmentRegistration.json +1 -2
  138. package/dist/es/schemas/UneceGroupedWorkItem.json +1 -2
  139. package/dist/es/schemas/UneceGuarantee.json +1 -2
  140. package/dist/es/schemas/UneceGuestArrival.json +1 -2
  141. package/dist/es/schemas/UneceGuestHealthIndication.json +1 -2
  142. package/dist/es/schemas/UneceGuestPerson.json +1 -2
  143. package/dist/es/schemas/UneceHandlingInstructions.json +1 -2
  144. package/dist/es/schemas/UneceHaulageInstructions.json +1 -2
  145. package/dist/es/schemas/UneceHazardousMaterial.json +1 -2
  146. package/dist/es/schemas/UneceHeaderBalanceOut.json +1 -2
  147. package/dist/es/schemas/UneceHeaderTradeAgreement.json +1 -2
  148. package/dist/es/schemas/UneceHeaderTradeDelivery.json +1 -2
  149. package/dist/es/schemas/UneceHeaderTradeSettlement.json +1 -2
  150. package/dist/es/schemas/UneceIOTDevice.json +1 -2
  151. package/dist/es/schemas/UneceIdentifiedFault.json +1 -2
  152. package/dist/es/schemas/UneceIllness.json +1 -2
  153. package/dist/es/schemas/UneceIndividualTTAnimal.json +1 -2
  154. package/dist/es/schemas/UneceInformationSource.json +1 -2
  155. package/dist/es/schemas/UneceIngredientRangeMeasurement.json +1 -2
  156. package/dist/es/schemas/UneceInspectionEvent.json +1 -2
  157. package/dist/es/schemas/UneceInspectionInstructions.json +1 -2
  158. package/dist/es/schemas/UneceInspectionNote.json +1 -2
  159. package/dist/es/schemas/UneceInspectionPerson.json +1 -2
  160. package/dist/es/schemas/UneceInspectionReference.json +1 -2
  161. package/dist/es/schemas/UneceInspectionResult.json +1 -2
  162. package/dist/es/schemas/UneceInspectionResultCharacteristic.json +1 -2
  163. package/dist/es/schemas/UneceInspectionStatus.json +1 -2
  164. package/dist/es/schemas/UneceInstalmentPayment.json +1 -2
  165. package/dist/es/schemas/UneceInstalmentPlan.json +1 -2
  166. package/dist/es/schemas/UneceInstructedTemperature.json +1 -2
  167. package/dist/es/schemas/UneceIssue.json +1 -2
  168. package/dist/es/schemas/UneceKeyword.json +1 -2
  169. package/dist/es/schemas/UneceLaboratoryObservationAnalysisMethod.json +1 -2
  170. package/dist/es/schemas/UneceLaboratoryObservationContact.json +1 -2
  171. package/dist/es/schemas/UneceLaboratoryObservationInstructions.json +1 -2
  172. package/dist/es/schemas/UneceLaboratoryObservationNote.json +1 -2
  173. package/dist/es/schemas/UneceLaboratoryObservationParty.json +1 -2
  174. package/dist/es/schemas/UneceLaboratoryObservationReference.json +1 -2
  175. package/dist/es/schemas/UneceLanguageProficiency.json +1 -2
  176. package/dist/es/schemas/UneceLegalOrganization.json +1 -2
  177. package/dist/es/schemas/UneceLegalRegistration.json +1 -2
  178. package/dist/es/schemas/UneceLicence.json +1 -2
  179. package/dist/es/schemas/UneceLineTradeAgreement.json +1 -2
  180. package/dist/es/schemas/UneceLineTradeDelivery.json +1 -2
  181. package/dist/es/schemas/UneceLineTradeSettlement.json +1 -2
  182. package/dist/es/schemas/UneceLineTradeTransaction.json +1 -2
  183. package/dist/es/schemas/UneceLinearRing.json +1 -2
  184. package/dist/es/schemas/UneceLinearUnitMeasureType.json +1 -2
  185. package/dist/es/schemas/UneceLocation.json +1 -2
  186. package/dist/es/schemas/UneceLocationParty.json +1 -2
  187. package/dist/es/schemas/UneceLogisticsLabel.json +1 -2
  188. package/dist/es/schemas/UneceLogisticsLocation.json +1 -2
  189. package/dist/es/schemas/UneceLogisticsPackaging.json +1 -2
  190. package/dist/es/schemas/UneceLogisticsStatus.json +1 -2
  191. package/dist/es/schemas/UneceLogisticsTransportEquipment.json +1 -2
  192. package/dist/es/schemas/UneceLogisticsTransportMeans.json +1 -2
  193. package/dist/es/schemas/UneceMDHHealthIndication.json +1 -2
  194. package/dist/es/schemas/UneceMachine.json +1 -2
  195. package/dist/es/schemas/UneceMarketplace.json +1 -2
  196. package/dist/es/schemas/UneceMarking.json +1 -2
  197. package/dist/es/schemas/UneceMeasureCode.json +1 -2
  198. package/dist/es/schemas/UneceMeasureType.json +1 -2
  199. package/dist/es/schemas/UneceMeasurement.json +1 -2
  200. package/dist/es/schemas/UneceMembership.json +1 -2
  201. package/dist/es/schemas/UneceMetricCharacteristic.json +1 -2
  202. package/dist/es/schemas/UneceNegotiationContext.json +1 -2
  203. package/dist/es/schemas/UneceNegotiationExchange.json +1 -2
  204. package/dist/es/schemas/UneceNote.json +1 -2
  205. package/dist/es/schemas/UneceObject.json +1 -2
  206. package/dist/es/schemas/UneceObservation.json +1 -2
  207. package/dist/es/schemas/UneceObservationObjectiveParameter.json +1 -2
  208. package/dist/es/schemas/UneceObservationResult.json +1 -2
  209. package/dist/es/schemas/UneceObservationResultCharacteristic.json +1 -2
  210. package/dist/es/schemas/UneceOperationalParameter.json +1 -2
  211. package/dist/es/schemas/UneceOrganizationCharacteristic.json +1 -2
  212. package/dist/es/schemas/UneceOrganizationalCertificate.json +1 -2
  213. package/dist/es/schemas/UneceOrganizationalCertification.json +1 -2
  214. package/dist/es/schemas/UnecePackage.json +1 -2
  215. package/dist/es/schemas/UnecePackagingInstructions.json +1 -2
  216. package/dist/es/schemas/UnecePairing.json +1 -2
  217. package/dist/es/schemas/UnecePayload.json +1 -2
  218. package/dist/es/schemas/UnecePayloadInstance.json +1 -2
  219. package/dist/es/schemas/UnecePaymentBalanceOut.json +1 -2
  220. package/dist/es/schemas/UnecePaymentDiscountTerms.json +1 -2
  221. package/dist/es/schemas/UnecePaymentFinancialAccount.json +1 -2
  222. package/dist/es/schemas/UnecePaymentFinancialInstitution.json +1 -2
  223. package/dist/es/schemas/UnecePaymentMeans.json +1 -2
  224. package/dist/es/schemas/UnecePaymentPenaltyTerms.json +1 -2
  225. package/dist/es/schemas/UnecePaymentTerms.json +1 -2
  226. package/dist/es/schemas/UnecePaymentTradeSettlement.json +1 -2
  227. package/dist/es/schemas/UnecePersonIdentity.json +1 -2
  228. package/dist/es/schemas/UnecePersonalEffects.json +1 -2
  229. package/dist/es/schemas/UnecePetAnimal.json +1 -2
  230. package/dist/es/schemas/UnecePicture.json +1 -2
  231. package/dist/es/schemas/UnecePlot.json +1 -2
  232. package/dist/es/schemas/UnecePolicy.json +1 -2
  233. package/dist/es/schemas/UnecePolygon.json +1 -2
  234. package/dist/es/schemas/UnecePortMovementEvent.json +1 -2
  235. package/dist/es/schemas/UnecePreference.json +1 -2
  236. package/dist/es/schemas/UnecePreventiveAction.json +1 -2
  237. package/dist/es/schemas/UnecePrint.json +1 -2
  238. package/dist/es/schemas/UneceProcessCertificate.json +1 -2
  239. package/dist/es/schemas/UneceProcessCertification.json +1 -2
  240. package/dist/es/schemas/UneceProcessCharacteristic.json +1 -2
  241. package/dist/es/schemas/UneceProcessWorkItem.json +1 -2
  242. package/dist/es/schemas/UneceProduce.json +1 -2
  243. package/dist/es/schemas/UneceProduct.json +1 -2
  244. package/dist/es/schemas/UneceProductBatch.json +1 -2
  245. package/dist/es/schemas/UneceProductBatchCertificate.json +1 -2
  246. package/dist/es/schemas/UneceProductBatchCertification.json +1 -2
  247. package/dist/es/schemas/UneceProductBatchCharacteristic.json +1 -2
  248. package/dist/es/schemas/UneceProductCertificate.json +1 -2
  249. package/dist/es/schemas/UneceProductCharacteristic.json +1 -2
  250. package/dist/es/schemas/UneceProductCharacteristicCondition.json +1 -2
  251. package/dist/es/schemas/UneceProductFinishingTreatment.json +1 -2
  252. package/dist/es/schemas/UneceProductGroup.json +1 -2
  253. package/dist/es/schemas/UneceProductHandlingProcess.json +1 -2
  254. package/dist/es/schemas/UneceProductInstance.json +1 -2
  255. package/dist/es/schemas/UneceProductLabel.json +1 -2
  256. package/dist/es/schemas/UneceProduction.json +1 -2
  257. package/dist/es/schemas/UneceProductionCycle.json +1 -2
  258. package/dist/es/schemas/UneceProductionDevice.json +1 -2
  259. package/dist/es/schemas/UneceProductionFacility.json +1 -2
  260. package/dist/es/schemas/UneceProductionProcess.json +1 -2
  261. package/dist/es/schemas/UneceProductionUnit.json +1 -2
  262. package/dist/es/schemas/UneceProductionWasteMaterial.json +1 -2
  263. package/dist/es/schemas/UneceProductionWasteMaterialComponent.json +1 -2
  264. package/dist/es/schemas/UneceProductionWasteRecoveryDisposalProcess.json +1 -2
  265. package/dist/es/schemas/UneceProject.json +1 -2
  266. package/dist/es/schemas/UneceProprietaryIdentity.json +1 -2
  267. package/dist/es/schemas/UneceProtectionMeans.json +1 -2
  268. package/dist/es/schemas/UneceQuantityAnalysis.json +1 -2
  269. package/dist/es/schemas/UneceQuantityCode.json +1 -2
  270. package/dist/es/schemas/UneceQuantityType.json +1 -2
  271. package/dist/es/schemas/UneceQuarantineInstructions.json +1 -2
  272. package/dist/es/schemas/UneceRadioactiveIsotope.json +1 -2
  273. package/dist/es/schemas/UneceRadioactiveMaterial.json +1 -2
  274. package/dist/es/schemas/UneceRadionuclide.json +1 -2
  275. package/dist/es/schemas/UneceRange.json +1 -2
  276. package/dist/es/schemas/UneceRecordedStatus.json +1 -2
  277. package/dist/es/schemas/UneceReferencePrice.json +1 -2
  278. package/dist/es/schemas/UneceRegisteredTax.json +1 -2
  279. package/dist/es/schemas/UneceRegulatedGoods.json +1 -2
  280. package/dist/es/schemas/UneceRegulatoryProcedure.json +1 -2
  281. package/dist/es/schemas/UneceRepresentativePerson.json +1 -2
  282. package/dist/es/schemas/UneceRequestingParty.json +1 -2
  283. package/dist/es/schemas/UneceRequirement.json +1 -2
  284. package/dist/es/schemas/UneceResponse.json +1 -2
  285. package/dist/es/schemas/UneceReturnableAssetInstructions.json +1 -2
  286. package/dist/es/schemas/UneceRiskAnalysisResult.json +1 -2
  287. package/dist/es/schemas/UneceSanitaryMeasure.json +1 -2
  288. package/dist/es/schemas/UneceSchedule.json +1 -2
  289. package/dist/es/schemas/UneceSeal.json +1 -2
  290. package/dist/es/schemas/UneceSection.json +1 -2
  291. package/dist/es/schemas/UneceSecurityTag.json +1 -2
  292. package/dist/es/schemas/UneceSegment.json +1 -2
  293. package/dist/es/schemas/UneceSensor.json +1 -2
  294. package/dist/es/schemas/UneceService.json +1 -2
  295. package/dist/es/schemas/UneceServiceCharge.json +1 -2
  296. package/dist/es/schemas/UneceShippingMarks.json +1 -2
  297. package/dist/es/schemas/UneceSource.json +1 -2
  298. package/dist/es/schemas/UneceSpatialDimension.json +1 -2
  299. package/dist/es/schemas/UneceSpecialQuery.json +1 -2
  300. package/dist/es/schemas/UneceSpeciesTTAnimal.json +1 -2
  301. package/dist/es/schemas/UneceSpecificationQuery.json +1 -2
  302. package/dist/es/schemas/UneceSpecifiedAction.json +1 -2
  303. package/dist/es/schemas/UneceSpecifiedCertificate.json +1 -2
  304. package/dist/es/schemas/UneceSpecifiedCertification.json +1 -2
  305. package/dist/es/schemas/UneceSpecifiedChemicalTreatment.json +1 -2
  306. package/dist/es/schemas/UneceSpecifiedCondition.json +1 -2
  307. package/dist/es/schemas/UneceSpecifiedDeclaration.json +1 -2
  308. package/dist/es/schemas/UneceSpecifiedFault.json +1 -2
  309. package/dist/es/schemas/UneceSpecifiedFeature.json +1 -2
  310. package/dist/es/schemas/UneceSpecifiedInspection.json +1 -2
  311. package/dist/es/schemas/UneceSpecifiedLocation.json +1 -2
  312. package/dist/es/schemas/UneceSpecifiedMaterial.json +1 -2
  313. package/dist/es/schemas/UneceSpecifiedMethod.json +1 -2
  314. package/dist/es/schemas/UneceSpecifiedNote.json +1 -2
  315. package/dist/es/schemas/UneceSpecifiedParameter.json +1 -2
  316. package/dist/es/schemas/UneceSpecifiedPeriod.json +1 -2
  317. package/dist/es/schemas/UneceSpecifiedQualification.json +1 -2
  318. package/dist/es/schemas/UneceSpecifiedRoute.json +1 -2
  319. package/dist/es/schemas/UneceSpecifiedTemperature.json +1 -2
  320. package/dist/es/schemas/UneceStandard.json +1 -2
  321. package/dist/es/schemas/UneceStoresItemInventory.json +1 -2
  322. package/dist/es/schemas/UneceStowaway.json +1 -2
  323. package/dist/es/schemas/UneceSubordinateLineTradeAgreement.json +1 -2
  324. package/dist/es/schemas/UneceSubordinateLineTradeDelivery.json +1 -2
  325. package/dist/es/schemas/UneceSubordinateLineTradeSettlement.json +1 -2
  326. package/dist/es/schemas/UneceSubordinateLocation.json +1 -2
  327. package/dist/es/schemas/UneceSubordinateSubordinateLocation.json +1 -2
  328. package/dist/es/schemas/UneceSubordinateTradeLineItem.json +1 -2
  329. package/dist/es/schemas/UneceSupplyChainEvent.json +1 -2
  330. package/dist/es/schemas/UneceSupplyChainInventory.json +1 -2
  331. package/dist/es/schemas/UneceSupplyChainPackaging.json +1 -2
  332. package/dist/es/schemas/UneceSupplyChainReference.json +1 -2
  333. package/dist/es/schemas/UneceSupplyChainTradeLineItem.json +1 -2
  334. package/dist/es/schemas/UneceSupplyChainTradeTransaction.json +1 -2
  335. package/dist/es/schemas/UneceSupplyPlan.json +1 -2
  336. package/dist/es/schemas/UneceSustainabilityCharacteristic.json +1 -2
  337. package/dist/es/schemas/UneceSustainabilityInspection.json +1 -2
  338. package/dist/es/schemas/UneceTTAggregationEvent.json +1 -2
  339. package/dist/es/schemas/UneceTTAnimal.json +1 -2
  340. package/dist/es/schemas/UneceTTExchangedDocument.json +1 -2
  341. package/dist/es/schemas/UneceTTLocation.json +1 -2
  342. package/dist/es/schemas/UneceTTObjectEvent.json +1 -2
  343. package/dist/es/schemas/UneceTTParty.json +1 -2
  344. package/dist/es/schemas/UneceTTTradeTransaction.json +1 -2
  345. package/dist/es/schemas/UneceTTTransactionEvent.json +1 -2
  346. package/dist/es/schemas/UneceTTTransformationEvent.json +1 -2
  347. package/dist/es/schemas/UneceTaxRegistration.json +1 -2
  348. package/dist/es/schemas/UneceTechnicalCharacteristic.json +1 -2
  349. package/dist/es/schemas/UneceTemperatureSettingInstructions.json +1 -2
  350. package/dist/es/schemas/UneceTemperatureUnitMeasureType.json +1 -2
  351. package/dist/es/schemas/UneceTestSpecificationReport.json +1 -2
  352. package/dist/es/schemas/UneceTolerance.json +1 -2
  353. package/dist/es/schemas/UneceTradeAddress.json +1 -2
  354. package/dist/es/schemas/UneceTradeAllowanceCharge.json +1 -2
  355. package/dist/es/schemas/UneceTradeContact.json +1 -2
  356. package/dist/es/schemas/UneceTradeLocation.json +1 -2
  357. package/dist/es/schemas/UneceTradeParty.json +1 -2
  358. package/dist/es/schemas/UneceTradePrice.json +1 -2
  359. package/dist/es/schemas/UneceTradeProduct.json +1 -2
  360. package/dist/es/schemas/UneceTradeProductCertification.json +1 -2
  361. package/dist/es/schemas/UneceTradeProductFeature.json +1 -2
  362. package/dist/es/schemas/UneceTradeSettlementHeaderMonetarySummation.json +1 -2
  363. package/dist/es/schemas/UneceTradeSettlementLineMonetarySummation.json +1 -2
  364. package/dist/es/schemas/UneceTradeSettlementMonetarySummation.json +1 -2
  365. package/dist/es/schemas/UneceTradeSettlementPayment.json +1 -2
  366. package/dist/es/schemas/UneceTradeSettlementPaymentMonetarySummation.json +1 -2
  367. package/dist/es/schemas/UneceTradeTax.json +1 -2
  368. package/dist/es/schemas/UneceTransportEvent.json +1 -2
  369. package/dist/es/schemas/UneceTransportInstructions.json +1 -2
  370. package/dist/es/schemas/UneceTransportMeans.json +1 -2
  371. package/dist/es/schemas/UneceTransportMovement.json +1 -2
  372. package/dist/es/schemas/UneceTransportPerson.json +1 -2
  373. package/dist/es/schemas/UneceTransportRoute.json +1 -2
  374. package/dist/es/schemas/UneceTransportServiceLocation.json +1 -2
  375. package/dist/es/schemas/UneceTransportSettingTemperature.json +1 -2
  376. package/dist/es/schemas/UneceTransportationHealth.json +1 -2
  377. package/dist/es/schemas/UneceTransportationWasteMaterial.json +1 -2
  378. package/dist/es/schemas/UneceTransportationWasteMaterialComponent.json +1 -2
  379. package/dist/es/schemas/UneceTransportationWasteRecoveryDisposalProcess.json +1 -2
  380. package/dist/es/schemas/UneceUnitMeasureType.json +1 -2
  381. package/dist/es/schemas/UneceUsageCondition.json +1 -2
  382. package/dist/es/schemas/UneceValidationStatus.json +1 -2
  383. package/dist/es/schemas/UneceVersion.json +1 -2
  384. package/dist/es/schemas/UneceVolumeUnitMeasureType.json +1 -2
  385. package/dist/es/schemas/UneceVoucher.json +1 -2
  386. package/dist/es/schemas/UneceWasteMaterialRecoveryDisposalProcess.json +1 -2
  387. package/dist/es/schemas/UneceWasteOriginProcess.json +1 -2
  388. package/dist/es/schemas/UneceWeightUnitMeasureType.json +1 -2
  389. package/dist/es/schemas/UneceWorkItemDimension.json +1 -2
  390. package/dist/es/schemas/UneceWorkflowObject.json +1 -2
  391. package/dist/es/schemas/UneceXHEContext.json +1 -2
  392. package/dist/es/schemas/UneceXHEDocument.json +1 -2
  393. package/dist/es/schemas/UneceXHEIdentity.json +1 -2
  394. package/dist/es/schemas/UneceXHEParameter.json +1 -2
  395. package/dist/es/schemas/UneceXHEParty.json +1 -2
  396. package/dist/es/schemas/UneceXHEReference.json +1 -2
  397. package/docs/changelog.md +14 -0
  398. package/package.json +1 -1
@@ -1,8 +1,6 @@
1
1
  // Copyright 2026 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
3
  import fs from "node:fs/promises";
4
- import path from "node:path";
5
- import { fileURLToPath } from "node:url";
6
4
  import { Compression, CompressionType, Guards, Is, ObjectHelper } from "@twin.org/core";
7
5
  import { UN_LOCODE_COUNTRIES } from "../models/locode/unLocodeCountries.js";
8
6
  import { UN_LOCODE_FUNCTIONS } from "../models/locode/unLocodeFunctions.js";
@@ -260,10 +258,8 @@ export class UnLocodes {
260
258
  return cached;
261
259
  }
262
260
  try {
263
- const thisFilename = fileURLToPath(import.meta.url);
264
- const thisDirname = path.dirname(thisFilename);
265
- const filePath = path.join(thisDirname, `../data/${folder}/`, `${normalized}.json.gz`);
266
- const compressed = await fs.readFile(filePath);
261
+ const fileUrl = new URL(`../data/${folder}/${normalized}.json.gz`, import.meta.url);
262
+ const compressed = await fs.readFile(fileUrl);
267
263
  const jsonBuffer = await Compression.decompress(compressed, CompressionType.Gzip);
268
264
  const records = ObjectHelper.fromBytes(jsonBuffer);
269
265
  cache[normalized] = records.map(record => mapMethod(normalized, record));
@@ -1 +1 @@
1
- {"version":3,"file":"unLocodes.js","sourceRoot":"","sources":["../../../src/helpers/unLocodes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAG5E;;;GAGG;AACH,MAAM,OAAO,SAAS;IACrB;;;OAGG;IACI,MAAM,CAAU,UAAU,eAAuB;IAExD;;;OAGG;IACI,MAAM,CAAU,yBAAyB,GAAG,SAAS,CAAC;IAE7D;;;OAGG;IACI,MAAM,CAAU,0BAA0B,GAAG,QAAQ,CAAC;IAE7D;;;OAGG;IACI,MAAM,CAAU,6BAA6B,GAAG,SAAS,CAAC;IAEjE;;;OAGG;IACI,MAAM,CAAU,0BAA0B,GAAG,S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// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { Compression, CompressionType, Guards, Is, ObjectHelper } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IUnLocodeCountry } from \"../models/IUnLocodeCountry.js\";\nimport type { IUnLocodeCountrySubdivisionRecord } from \"../models/IUnLocodeCountrySubdivisionRecord.js\";\nimport type { IUnLocodeFunction } from \"../models/IUnLocodeFunction.js\";\nimport type { IUnLocodeLocation } from \"../models/IUnLocodeLocation.js\";\nimport type { IUnLocodeLocationRecord } from \"../models/IUnLocodeLocationRecord.js\";\nimport type { IUnLocodeSubdivision } from \"../models/IUnLocodeSubdivision.js\";\nimport { UN_LOCODE_COUNTRIES } from \"../models/locode/unLocodeCountries.js\";\nimport type { UnLocodeCountriesList } from \"../models/locode/unLocodeCountriesList.js\";\nimport { UN_LOCODE_FUNCTIONS } from \"../models/locode/unLocodeFunctions.js\";\nimport type { UnLocodeFunctionsList } from \"../models/locode/unLocodeFunctionsList.js\";\n\n/**\n * A class handling UN/LOCODEs.\n * @see https://vocabulary.uncefact.org/unlocode-about\n */\nexport class UnLocodes {\n\t/**\n\t * The class name.\n\t * @internal\n\t */\n\tpublic static readonly CLASS_NAME = nameof<UnLocodes>();\n\n\t/**\n\t * The URI prefix for UN/LOCODE locations.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_COUNTRY_URI_PREFIX = \"unlcdc:\";\n\n\t/**\n\t * The URI prefix for UN/LOCODE locations.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_LOCATION_URI_PREFIX = \"unlcd:\";\n\n\t/**\n\t * The URI prefix for UN/LOCODE sub-divisions.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_SUBDIVISION_URI_PREFIX = \"unlcds:\";\n\n\t/**\n\t * The URI prefix for UN/LOCODE functions.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_FUNCTION_URI_PREFIX = \"unlcdf:\";\n\n\t/**\n\t * Cache for loaded locations by country code.\n\t * @internal\n\t */\n\tprivate static readonly _locationsByCountry: { [country: string]: IUnLocodeLocation[] } = {};\n\n\t/**\n\t * Cache for loaded subdivisions by country code.\n\t * @internal\n\t */\n\tprivate static readonly _subdivisionsByCountry: { [country: string]: IUnLocodeSubdivision[] } =\n\t\t{};\n\n\t/**\n\t * Get the list of UN/LOCODE countries.\n\t * @see https://vocabulary.uncefact.org/unlocode-countries\n\t * @returns The list of UN/LOCODE countries.\n\t */\n\tpublic static async getCountries(): Promise<IUnLocodeCountry[]> {\n\t\treturn UN_LOCODE_COUNTRIES;\n\t}\n\n\t/**\n\t * Get the country by its uri.\n\t * @param countryUri The country URI.\n\t * @see https://vocabulary.uncefact.org/unlocode-countries\n\t * @returns The country information or undefined if not found.\n\t */\n\tpublic static async getCountryByUri(countryUri: string): Promise<IUnLocodeCountry | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(countryUri), countryUri);\n\n\t\treturn UN_LOCODE_COUNTRIES.find(country => country.uri === countryUri);\n\t}\n\n\t/**\n\t * Get the country by its value.\n\t * @param countryValue The country value.\n\t * @see https://vocabulary.uncefact.org/unlocode-countries\n\t * @returns The country information or undefined if not found.\n\t */\n\tpublic static async getCountryByValue(\n\t\tcountryValue: string\n\t): Promise<IUnLocodeCountry | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(countryValue), countryValue);\n\n\t\treturn UN_LOCODE_COUNTRIES.find(country => country.value === countryValue);\n\t}\n\n\t/**\n\t * Get the list of UN/LOCODE functions.\n\t * @see https://vocabulary.uncefact.org/unlocode-functions\n\t * @returns The list of UN/LOCODE functions.\n\t */\n\tpublic static async getFunctions(): Promise<IUnLocodeFunction[]> {\n\t\treturn UN_LOCODE_FUNCTIONS;\n\t}\n\n\t/**\n\t * Get the function by its uri.\n\t * @param functionUri The function URI.\n\t * @see https://vocabulary.uncefact.org/unlocode-functions\n\t * @returns The function information or undefined if not found.\n\t */\n\tpublic static async getFunctionByUri(\n\t\tfunctionUri: string\n\t): Promise<IUnLocodeFunction | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(functionUri), functionUri);\n\n\t\treturn UN_LOCODE_FUNCTIONS.find(func => func.uri === functionUri);\n\t}\n\n\t/**\n\t * Get the function by its value.\n\t * @param functionValue The function value.\n\t * @see https://vocabulary.uncefact.org/unlocode-functions\n\t * @returns The function information or undefined if not found.\n\t */\n\tpublic static async getFunctionByValue(\n\t\tfunctionValue: string\n\t): Promise<IUnLocodeFunction | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(functionValue), functionValue);\n\n\t\treturn UN_LOCODE_FUNCTIONS.find(func => func.value === functionValue);\n\t}\n\n\t/**\n\t * Get the location by its UN/LOCODE.\n\t * @param unLocode The UN/LOCODE value.\n\t * @see https://vocabulary.uncefact.org/unlocode-about\n\t * @returns The location information or undefined if not found.\n\t */\n\tpublic static async getLocationByCode(unLocode: string): Promise<IUnLocodeLocation | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(unLocode), unLocode);\n\n\t\tconst countryCode = unLocode.slice(0, 2);\n\t\tconst locationCode = unLocode.slice(2);\n\t\tif (!Is.stringValue(countryCode) || !Is.stringValue(locationCode)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst locations = await UnLocodes.getLocations(countryCode);\n\t\treturn locations.find(location => location.locode === unLocode);\n\t}\n\n\t/**\n\t * Get the location by its UN/LOCODE uri.\n\t * @param unLocodeUri The UN/LOCODE URI.\n\t * @see https://vocabulary.uncefact.org/unlocode-about\n\t * @returns The location information or undefined if not found.\n\t */\n\tpublic static async getLocationByUri(\n\t\tunLocodeUri: string\n\t): Promise<IUnLocodeLocation | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(unLocodeUri), unLocodeUri);\n\n\t\tconst normalized = unLocodeUri.replace(UnLocodes.LOCODE_LOCATION_URI_PREFIX, \"\").trim();\n\n\t\treturn UnLocodes.getLocationByCode(normalized);\n\t}\n\n\t/**\n\t * Get the location by its label.\n\t * @param label The location label.\n\t * @see https://vocabulary.uncefact.org/unlocode-about\n\t * @returns The location information or undefined if not found.\n\t */\n\tpublic static async getLocationByLabel(label: string): Promise<IUnLocodeLocation | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(label), label);\n\n\t\tconst normalized = label.trim().toLowerCase();\n\t\tfor (const country of UN_LOCODE_COUNTRIES) {\n\t\t\tconst locations = await UnLocodes.getLocations(country.value);\n\t\t\tconst match = locations.find(\n\t\t\t\tlocation =>\n\t\t\t\t\tlocation.label.toLowerCase() === normalized ||\n\t\t\t\t\tlocation.labelWithDiacritics.toLowerCase() === normalized\n\t\t\t);\n\t\t\tif (match) {\n\t\t\t\treturn match;\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Get the subdivision by its code.\n\t * @param subdivisionCode The subdivision code (e.g., \"AD04\").\n\t * @returns The subdivision information or undefined if not found.\n\t */\n\tpublic static async getSubdivisionByCode(\n\t\tsubdivisionCode: string\n\t): Promise<IUnLocodeSubdivision | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(subdivisionCode), subdivisionCode);\n\n\t\tconst countryCode = subdivisionCode.slice(0, 2);\n\t\tconst code = subdivisionCode.slice(2);\n\t\tif (!Is.stringValue(countryCode) || !Is.stringValue(code)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst subdivisions = await UnLocodes.getSubdivisions(countryCode);\n\t\treturn subdivisions.find(subdivision => subdivision.code === code);\n\t}\n\n\t/**\n\t * Get the subdivision by its URI.\n\t * @param subdivisionUri The subdivision URI (e.g., \"unlcds:AD04\").\n\t * @returns The subdivision information or undefined if not found.\n\t */\n\tpublic static async getSubdivisionByUri(\n\t\tsubdivisionUri: string\n\t): Promise<IUnLocodeSubdivision | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(subdivisionUri), subdivisionUri);\n\n\t\tconst normalized = subdivisionUri.replace(UnLocodes.LOCODE_SUBDIVISION_URI_PREFIX, \"\").trim();\n\n\t\treturn UnLocodes.getSubdivisionByCode(normalized);\n\t}\n\n\t/**\n\t * Get the locations for a given country code.\n\t * @param countryCode The country code.\n\t * @returns The list of locations for the country.\n\t * @throws Error if the country code is invalid or if the data file cannot be loaded.\n\t */\n\tpublic static async getLocations(countryCode: string): Promise<IUnLocodeLocation[]> {\n\t\treturn UnLocodes.loadCompressedFile<IUnLocodeLocationRecord, IUnLocodeLocation>(\n\t\t\t\"countries\",\n\t\t\tcountryCode,\n\t\t\t(normalized, record) => UnLocodes.mapCountryLocation(normalized, record),\n\t\t\tUnLocodes._locationsByCountry\n\t\t);\n\t}\n\n\t/**\n\t * Get the subdivisions for a given country code.\n\t * @param countryCode The country code.\n\t * @returns The list of subdivisions for the country.\n\t * @throws Error if the country code is invalid or if the data file cannot be loaded.\n\t */\n\tpublic static async getSubdivisions(countryCode: string): Promise<IUnLocodeSubdivision[]> {\n\t\treturn UnLocodes.loadCompressedFile<IUnLocodeCountrySubdivisionRecord, IUnLocodeSubdivision>(\n\t\t\t\"subdivisions\",\n\t\t\tcountryCode,\n\t\t\t(normalized, record) => UnLocodes.mapCountrySubdivision(normalized, record),\n\t\t\tUnLocodes._subdivisionsByCountry\n\t\t);\n\t}\n\n\t/**\n\t * Map a country location record to a location object.\n\t * @param countryCode\tThe country code.\n\t * @param record The country location record.\n\t * @returns The mapped location object.\n\t * @internal\n\t */\n\tprivate static mapCountryLocation(\n\t\tcountryCode: string,\n\t\trecord: IUnLocodeLocationRecord\n\t): IUnLocodeLocation {\n\t\tconst locode = `${countryCode}${record.locationCode}`;\n\t\tconst countryCodeUri = UN_LOCODE_COUNTRIES.find(country => country.value === countryCode)?.uri;\n\t\tconst countrySubdivisionUri = Is.stringValue(record.subdivisionCode)\n\t\t\t? `${UnLocodes.LOCODE_SUBDIVISION_URI_PREFIX}${countryCode}${record.subdivisionCode}`\n\t\t\t: \"\";\n\t\tconst functions = record.function\n\t\t\t? record.function.split(\"\").map(code => `${UnLocodes.LOCODE_FUNCTION_URI_PREFIX}${code}`)\n\t\t\t: [];\n\t\tconst location: IUnLocodeLocation = {\n\t\t\tlocode,\n\t\t\tlocodeUri: `${UnLocodes.LOCODE_LOCATION_URI_PREFIX}${locode}`,\n\t\t\tlabel: record.label,\n\t\t\t// If the label with diacritics is not provided, use the regular label as fallback\n\t\t\t// as we don't store them if they are the same\n\t\t\tlabelWithDiacritics: record.labelWithDiacritics ?? record.label,\n\t\t\tcountryCodeUri: countryCodeUri as UnLocodeCountriesList,\n\t\t\tcountrySubdivisionUri,\n\t\t\tfunctions: functions as UnLocodeFunctionsList[]\n\t\t};\n\t\tif (Is.number(record.lat) && Is.number(record.lng)) {\n\t\t\tlocation.geoCoordinates = {\n\t\t\t\tlatitude: record.lat,\n\t\t\t\tlongitude: record.lng\n\t\t\t};\n\t\t}\n\t\treturn location;\n\t}\n\n\t/**\n\t * Map a country subdivision record to a subdivision object.\n\t * @param countryCode The country code.\n\t * @param record The country subdivision record.\n\t * @returns The mapped subdivision object.\n\t * @internal\n\t */\n\tprivate static mapCountrySubdivision(\n\t\tcountryCode: string,\n\t\trecord: IUnLocodeCountrySubdivisionRecord\n\t): IUnLocodeSubdivision {\n\t\tconst countryCodeUri = UN_LOCODE_COUNTRIES.find(country => country.value === countryCode)?.uri;\n\t\tconst subdivision: IUnLocodeSubdivision = {\n\t\t\tcode: record.code,\n\t\t\tsubdivisionUri: `${UnLocodes.LOCODE_SUBDIVISION_URI_PREFIX}${countryCode}${record.code}`,\n\t\t\tlabel: record.label,\n\t\t\tcountryCodeUri,\n\t\t\ttype: record.type\n\t\t};\n\t\treturn subdivision;\n\t}\n\n\t/**\n\t * Load a compressed file.\n\t * @param folder The folder to load (e.g., \"countries\" or \"subdivisions\").\n\t * @param countryCode The country code.\n\t * @return The loaded data as an array of records.\n\t * @throws Error if the file cannot be loaded or decompressed.\n\t * @internal\n\t */\n\tprivate static async loadCompressedFile<R, M>(\n\t\tfolder: string,\n\t\tcountryCode: string,\n\t\tmapMethod: (countryCode: string, record: R) => M,\n\t\tcache: { [country: string]: M[] }\n\t): Promise<M[]> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(countryCode), countryCode);\n\n\t\tconst normalized = countryCode.replace(UnLocodes.LOCODE_COUNTRY_URI_PREFIX, \"\").toUpperCase();\n\t\tconst cached = cache[normalized];\n\t\tif (cached) {\n\t\t\treturn cached;\n\t\t}\n\n\t\ttry {\n\t\t\tconst thisFilename = fileURLToPath(import.meta.url);\n\t\t\tconst thisDirname = path.dirname(thisFilename);\n\t\t\tconst filePath = path.join(thisDirname, `../data/${folder}/`, `${normalized}.json.gz`);\n\t\t\tconst compressed = await fs.readFile(filePath);\n\t\t\tconst jsonBuffer = await Compression.decompress(compressed, CompressionType.Gzip);\n\t\t\tconst records = ObjectHelper.fromBytes<R[]>(jsonBuffer);\n\t\t\tcache[normalized] = records.map(record => mapMethod(normalized, record));\n\t\t} catch {}\n\n\t\treturn cache[normalized] ?? [];\n\t}\n}\n"]}
1
+ {"version":3,"file":"unLocodes.js","sourceRoot":"","sources":["../../../src/helpers/unLocodes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAG5E;;;GAGG;AACH,MAAM,OAAO,SAAS;IACrB;;;OAGG;IACI,MAAM,CAAU,UAAU,eAAuB;IAExD;;;OAGG;IACI,MAAM,CAAU,yBAAyB,GAAG,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AI,EAAE,CAAC;IAChC,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport fs from \"node:fs/promises\";\nimport { Compression, CompressionType, Guards, Is, ObjectHelper } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IUnLocodeCountry } from \"../models/IUnLocodeCountry.js\";\nimport type { IUnLocodeCountrySubdivisionRecord } from \"../models/IUnLocodeCountrySubdivisionRecord.js\";\nimport type { IUnLocodeFunction } from \"../models/IUnLocodeFunction.js\";\nimport type { IUnLocodeLocation } from \"../models/IUnLocodeLocation.js\";\nimport type { IUnLocodeLocationRecord } from \"../models/IUnLocodeLocationRecord.js\";\nimport type { IUnLocodeSubdivision } from \"../models/IUnLocodeSubdivision.js\";\nimport { UN_LOCODE_COUNTRIES } from \"../models/locode/unLocodeCountries.js\";\nimport type { UnLocodeCountriesList } from \"../models/locode/unLocodeCountriesList.js\";\nimport { UN_LOCODE_FUNCTIONS } from \"../models/locode/unLocodeFunctions.js\";\nimport type { UnLocodeFunctionsList } from \"../models/locode/unLocodeFunctionsList.js\";\n\n/**\n * A class handling UN/LOCODEs.\n * @see https://vocabulary.uncefact.org/unlocode-about\n */\nexport class UnLocodes {\n\t/**\n\t * The class name.\n\t * @internal\n\t */\n\tpublic static readonly CLASS_NAME = nameof<UnLocodes>();\n\n\t/**\n\t * The URI prefix for UN/LOCODE locations.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_COUNTRY_URI_PREFIX = \"unlcdc:\";\n\n\t/**\n\t * The URI prefix for UN/LOCODE locations.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_LOCATION_URI_PREFIX = \"unlcd:\";\n\n\t/**\n\t * The URI prefix for UN/LOCODE sub-divisions.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_SUBDIVISION_URI_PREFIX = \"unlcds:\";\n\n\t/**\n\t * The URI prefix for UN/LOCODE functions.\n\t * @internal\n\t */\n\tpublic static readonly LOCODE_FUNCTION_URI_PREFIX = \"unlcdf:\";\n\n\t/**\n\t * Cache for loaded locations by country code.\n\t * @internal\n\t */\n\tprivate static readonly _locationsByCountry: { [country: string]: IUnLocodeLocation[] } = {};\n\n\t/**\n\t * Cache for loaded subdivisions by country code.\n\t * @internal\n\t */\n\tprivate static readonly _subdivisionsByCountry: { [country: string]: IUnLocodeSubdivision[] } =\n\t\t{};\n\n\t/**\n\t * Get the list of UN/LOCODE countries.\n\t * @see https://vocabulary.uncefact.org/unlocode-countries\n\t * @returns The list of UN/LOCODE countries.\n\t */\n\tpublic static async getCountries(): Promise<IUnLocodeCountry[]> {\n\t\treturn UN_LOCODE_COUNTRIES;\n\t}\n\n\t/**\n\t * Get the country by its uri.\n\t * @param countryUri The country URI.\n\t * @see https://vocabulary.uncefact.org/unlocode-countries\n\t * @returns The country information or undefined if not found.\n\t */\n\tpublic static async getCountryByUri(countryUri: string): Promise<IUnLocodeCountry | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(countryUri), countryUri);\n\n\t\treturn UN_LOCODE_COUNTRIES.find(country => country.uri === countryUri);\n\t}\n\n\t/**\n\t * Get the country by its value.\n\t * @param countryValue The country value.\n\t * @see https://vocabulary.uncefact.org/unlocode-countries\n\t * @returns The country information or undefined if not found.\n\t */\n\tpublic static async getCountryByValue(\n\t\tcountryValue: string\n\t): Promise<IUnLocodeCountry | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(countryValue), countryValue);\n\n\t\treturn UN_LOCODE_COUNTRIES.find(country => country.value === countryValue);\n\t}\n\n\t/**\n\t * Get the list of UN/LOCODE functions.\n\t * @see https://vocabulary.uncefact.org/unlocode-functions\n\t * @returns The list of UN/LOCODE functions.\n\t */\n\tpublic static async getFunctions(): Promise<IUnLocodeFunction[]> {\n\t\treturn UN_LOCODE_FUNCTIONS;\n\t}\n\n\t/**\n\t * Get the function by its uri.\n\t * @param functionUri The function URI.\n\t * @see https://vocabulary.uncefact.org/unlocode-functions\n\t * @returns The function information or undefined if not found.\n\t */\n\tpublic static async getFunctionByUri(\n\t\tfunctionUri: string\n\t): Promise<IUnLocodeFunction | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(functionUri), functionUri);\n\n\t\treturn UN_LOCODE_FUNCTIONS.find(func => func.uri === functionUri);\n\t}\n\n\t/**\n\t * Get the function by its value.\n\t * @param functionValue The function value.\n\t * @see https://vocabulary.uncefact.org/unlocode-functions\n\t * @returns The function information or undefined if not found.\n\t */\n\tpublic static async getFunctionByValue(\n\t\tfunctionValue: string\n\t): Promise<IUnLocodeFunction | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(functionValue), functionValue);\n\n\t\treturn UN_LOCODE_FUNCTIONS.find(func => func.value === functionValue);\n\t}\n\n\t/**\n\t * Get the location by its UN/LOCODE.\n\t * @param unLocode The UN/LOCODE value.\n\t * @see https://vocabulary.uncefact.org/unlocode-about\n\t * @returns The location information or undefined if not found.\n\t */\n\tpublic static async getLocationByCode(unLocode: string): Promise<IUnLocodeLocation | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(unLocode), unLocode);\n\n\t\tconst countryCode = unLocode.slice(0, 2);\n\t\tconst locationCode = unLocode.slice(2);\n\t\tif (!Is.stringValue(countryCode) || !Is.stringValue(locationCode)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst locations = await UnLocodes.getLocations(countryCode);\n\t\treturn locations.find(location => location.locode === unLocode);\n\t}\n\n\t/**\n\t * Get the location by its UN/LOCODE uri.\n\t * @param unLocodeUri The UN/LOCODE URI.\n\t * @see https://vocabulary.uncefact.org/unlocode-about\n\t * @returns The location information or undefined if not found.\n\t */\n\tpublic static async getLocationByUri(\n\t\tunLocodeUri: string\n\t): Promise<IUnLocodeLocation | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(unLocodeUri), unLocodeUri);\n\n\t\tconst normalized = unLocodeUri.replace(UnLocodes.LOCODE_LOCATION_URI_PREFIX, \"\").trim();\n\n\t\treturn UnLocodes.getLocationByCode(normalized);\n\t}\n\n\t/**\n\t * Get the location by its label.\n\t * @param label The location label.\n\t * @see https://vocabulary.uncefact.org/unlocode-about\n\t * @returns The location information or undefined if not found.\n\t */\n\tpublic static async getLocationByLabel(label: string): Promise<IUnLocodeLocation | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(label), label);\n\n\t\tconst normalized = label.trim().toLowerCase();\n\t\tfor (const country of UN_LOCODE_COUNTRIES) {\n\t\t\tconst locations = await UnLocodes.getLocations(country.value);\n\t\t\tconst match = locations.find(\n\t\t\t\tlocation =>\n\t\t\t\t\tlocation.label.toLowerCase() === normalized ||\n\t\t\t\t\tlocation.labelWithDiacritics.toLowerCase() === normalized\n\t\t\t);\n\t\t\tif (match) {\n\t\t\t\treturn match;\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Get the subdivision by its code.\n\t * @param subdivisionCode The subdivision code (e.g., \"AD04\").\n\t * @returns The subdivision information or undefined if not found.\n\t */\n\tpublic static async getSubdivisionByCode(\n\t\tsubdivisionCode: string\n\t): Promise<IUnLocodeSubdivision | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(subdivisionCode), subdivisionCode);\n\n\t\tconst countryCode = subdivisionCode.slice(0, 2);\n\t\tconst code = subdivisionCode.slice(2);\n\t\tif (!Is.stringValue(countryCode) || !Is.stringValue(code)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst subdivisions = await UnLocodes.getSubdivisions(countryCode);\n\t\treturn subdivisions.find(subdivision => subdivision.code === code);\n\t}\n\n\t/**\n\t * Get the subdivision by its URI.\n\t * @param subdivisionUri The subdivision URI (e.g., \"unlcds:AD04\").\n\t * @returns The subdivision information or undefined if not found.\n\t */\n\tpublic static async getSubdivisionByUri(\n\t\tsubdivisionUri: string\n\t): Promise<IUnLocodeSubdivision | undefined> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(subdivisionUri), subdivisionUri);\n\n\t\tconst normalized = subdivisionUri.replace(UnLocodes.LOCODE_SUBDIVISION_URI_PREFIX, \"\").trim();\n\n\t\treturn UnLocodes.getSubdivisionByCode(normalized);\n\t}\n\n\t/**\n\t * Get the locations for a given country code.\n\t * @param countryCode The country code.\n\t * @returns The list of locations for the country.\n\t * @throws Error if the country code is invalid or if the data file cannot be loaded.\n\t */\n\tpublic static async getLocations(countryCode: string): Promise<IUnLocodeLocation[]> {\n\t\treturn UnLocodes.loadCompressedFile<IUnLocodeLocationRecord, IUnLocodeLocation>(\n\t\t\t\"countries\",\n\t\t\tcountryCode,\n\t\t\t(normalized, record) => UnLocodes.mapCountryLocation(normalized, record),\n\t\t\tUnLocodes._locationsByCountry\n\t\t);\n\t}\n\n\t/**\n\t * Get the subdivisions for a given country code.\n\t * @param countryCode The country code.\n\t * @returns The list of subdivisions for the country.\n\t * @throws Error if the country code is invalid or if the data file cannot be loaded.\n\t */\n\tpublic static async getSubdivisions(countryCode: string): Promise<IUnLocodeSubdivision[]> {\n\t\treturn UnLocodes.loadCompressedFile<IUnLocodeCountrySubdivisionRecord, IUnLocodeSubdivision>(\n\t\t\t\"subdivisions\",\n\t\t\tcountryCode,\n\t\t\t(normalized, record) => UnLocodes.mapCountrySubdivision(normalized, record),\n\t\t\tUnLocodes._subdivisionsByCountry\n\t\t);\n\t}\n\n\t/**\n\t * Map a country location record to a location object.\n\t * @param countryCode\tThe country code.\n\t * @param record The country location record.\n\t * @returns The mapped location object.\n\t * @internal\n\t */\n\tprivate static mapCountryLocation(\n\t\tcountryCode: string,\n\t\trecord: IUnLocodeLocationRecord\n\t): IUnLocodeLocation {\n\t\tconst locode = `${countryCode}${record.locationCode}`;\n\t\tconst countryCodeUri = UN_LOCODE_COUNTRIES.find(country => country.value === countryCode)?.uri;\n\t\tconst countrySubdivisionUri = Is.stringValue(record.subdivisionCode)\n\t\t\t? `${UnLocodes.LOCODE_SUBDIVISION_URI_PREFIX}${countryCode}${record.subdivisionCode}`\n\t\t\t: \"\";\n\t\tconst functions = record.function\n\t\t\t? record.function.split(\"\").map(code => `${UnLocodes.LOCODE_FUNCTION_URI_PREFIX}${code}`)\n\t\t\t: [];\n\t\tconst location: IUnLocodeLocation = {\n\t\t\tlocode,\n\t\t\tlocodeUri: `${UnLocodes.LOCODE_LOCATION_URI_PREFIX}${locode}`,\n\t\t\tlabel: record.label,\n\t\t\t// If the label with diacritics is not provided, use the regular label as fallback\n\t\t\t// as we don't store them if they are the same\n\t\t\tlabelWithDiacritics: record.labelWithDiacritics ?? record.label,\n\t\t\tcountryCodeUri: countryCodeUri as UnLocodeCountriesList,\n\t\t\tcountrySubdivisionUri,\n\t\t\tfunctions: functions as UnLocodeFunctionsList[]\n\t\t};\n\t\tif (Is.number(record.lat) && Is.number(record.lng)) {\n\t\t\tlocation.geoCoordinates = {\n\t\t\t\tlatitude: record.lat,\n\t\t\t\tlongitude: record.lng\n\t\t\t};\n\t\t}\n\t\treturn location;\n\t}\n\n\t/**\n\t * Map a country subdivision record to a subdivision object.\n\t * @param countryCode The country code.\n\t * @param record The country subdivision record.\n\t * @returns The mapped subdivision object.\n\t * @internal\n\t */\n\tprivate static mapCountrySubdivision(\n\t\tcountryCode: string,\n\t\trecord: IUnLocodeCountrySubdivisionRecord\n\t): IUnLocodeSubdivision {\n\t\tconst countryCodeUri = UN_LOCODE_COUNTRIES.find(country => country.value === countryCode)?.uri;\n\t\tconst subdivision: IUnLocodeSubdivision = {\n\t\t\tcode: record.code,\n\t\t\tsubdivisionUri: `${UnLocodes.LOCODE_SUBDIVISION_URI_PREFIX}${countryCode}${record.code}`,\n\t\t\tlabel: record.label,\n\t\t\tcountryCodeUri,\n\t\t\ttype: record.type\n\t\t};\n\t\treturn subdivision;\n\t}\n\n\t/**\n\t * Load a compressed file.\n\t * @param folder The folder to load (e.g., \"countries\" or \"subdivisions\").\n\t * @param countryCode The country code.\n\t * @return The loaded data as an array of records.\n\t * @throws Error if the file cannot be loaded or decompressed.\n\t * @internal\n\t */\n\tprivate static async loadCompressedFile<R, M>(\n\t\tfolder: string,\n\t\tcountryCode: string,\n\t\tmapMethod: (countryCode: string, record: R) => M,\n\t\tcache: { [country: string]: M[] }\n\t): Promise<M[]> {\n\t\tGuards.stringValue(UnLocodes.CLASS_NAME, nameof(countryCode), countryCode);\n\n\t\tconst normalized = countryCode.replace(UnLocodes.LOCODE_COUNTRY_URI_PREFIX, \"\").toUpperCase();\n\t\tconst cached = cache[normalized];\n\t\tif (cached) {\n\t\t\treturn cached;\n\t\t}\n\n\t\ttry {\n\t\t\tconst fileUrl = new URL(`../data/${folder}/${normalized}.json.gz`, import.meta.url);\n\t\t\tconst compressed = await fs.readFile(fileUrl);\n\t\t\tconst jsonBuffer = await Compression.decompress(compressed, CompressionType.Gzip);\n\t\t\tconst records = ObjectHelper.fromBytes<R[]>(jsonBuffer);\n\t\t\tcache[normalized] = records.map(record => mapMethod(normalized, record));\n\t\t} catch {}\n\n\t\treturn cache[normalized] ?? [];\n\t}\n}\n"]}
@@ -42,6 +42,5 @@
42
42
  },
43
43
  "required": [
44
44
  "type"
45
- ],
46
- "additionalProperties": false
45
+ ]
47
46
  }
@@ -77,6 +77,5 @@
77
77
  },
78
78
  "required": [
79
79
  "type"
80
- ],
81
- "additionalProperties": false
80
+ ]
82
81
  }
@@ -73,6 +73,5 @@
73
73
  },
74
74
  "required": [
75
75
  "type"
76
- ],
77
- "additionalProperties": false
76
+ ]
78
77
  }
@@ -122,6 +122,5 @@
122
122
  },
123
123
  "required": [
124
124
  "type"
125
- ],
126
- "additionalProperties": false
125
+ ]
127
126
  }
@@ -65,6 +65,5 @@
65
65
  "required": [
66
66
  "type",
67
67
  "paidAmount"
68
- ],
69
- "additionalProperties": false
68
+ ]
70
69
  }
@@ -94,6 +94,5 @@
94
94
  },
95
95
  "required": [
96
96
  "type"
97
- ],
98
- "additionalProperties": false
97
+ ]
99
98
  }
@@ -106,6 +106,5 @@
106
106
  },
107
107
  "required": [
108
108
  "type"
109
- ],
110
- "additionalProperties": false
109
+ ]
111
110
  }
@@ -109,6 +109,5 @@
109
109
  },
110
110
  "required": [
111
111
  "type"
112
- ],
113
- "additionalProperties": false
112
+ ]
114
113
  }
@@ -108,6 +108,5 @@
108
108
  },
109
109
  "required": [
110
110
  "type"
111
- ],
112
- "additionalProperties": false
111
+ ]
113
112
  }
@@ -94,6 +94,5 @@
94
94
  "required": [
95
95
  "type",
96
96
  "identifier"
97
- ],
98
- "additionalProperties": false
97
+ ]
99
98
  }
@@ -42,6 +42,5 @@
42
42
  },
43
43
  "required": [
44
44
  "type"
45
- ],
46
- "additionalProperties": false
45
+ ]
47
46
  }
@@ -57,6 +57,5 @@
57
57
  },
58
58
  "required": [
59
59
  "type"
60
- ],
61
- "additionalProperties": false
60
+ ]
62
61
  }
@@ -42,6 +42,5 @@
42
42
  },
43
43
  "required": [
44
44
  "type"
45
- ],
46
- "additionalProperties": false
45
+ ]
47
46
  }
@@ -84,6 +84,5 @@
84
84
  "type",
85
85
  "creationDateTime",
86
86
  "identifier"
87
- ],
88
- "additionalProperties": false
87
+ ]
89
88
  }
@@ -72,6 +72,5 @@
72
72
  "type",
73
73
  "certificateTypeCode",
74
74
  "identifier"
75
- ],
76
- "additionalProperties": false
75
+ ]
77
76
  }
@@ -64,6 +64,5 @@
64
64
  },
65
65
  "required": [
66
66
  "type"
67
- ],
68
- "additionalProperties": false
67
+ ]
69
68
  }
@@ -69,6 +69,5 @@
69
69
  "type",
70
70
  "occurrenceDateTime",
71
71
  "typeCode"
72
- ],
73
- "additionalProperties": false
72
+ ]
74
73
  }
@@ -58,6 +58,5 @@
58
58
  "identifierLengthNumeric",
59
59
  "issuerPartyName",
60
60
  "legalBasis"
61
- ],
62
- "additionalProperties": false
61
+ ]
63
62
  }
@@ -63,6 +63,5 @@
63
63
  "required": [
64
64
  "type",
65
65
  "chargeIndicator"
66
- ],
67
- "additionalProperties": false
66
+ ]
68
67
  }
@@ -86,6 +86,5 @@
86
86
  },
87
87
  "required": [
88
88
  "type"
89
- ],
90
- "additionalProperties": false
89
+ ]
91
90
  }
@@ -54,6 +54,5 @@
54
54
  },
55
55
  "required": [
56
56
  "type"
57
- ],
58
- "additionalProperties": false
57
+ ]
59
58
  }
@@ -35,6 +35,5 @@
35
35
  "required": [
36
36
  "type"
37
37
  ],
38
- "additionalProperties": false,
39
38
  "deprecated": true
40
39
  }
@@ -75,6 +75,5 @@
75
75
  },
76
76
  "required": [
77
77
  "type"
78
- ],
79
- "additionalProperties": false
78
+ ]
80
79
  }
@@ -131,6 +131,5 @@
131
131
  },
132
132
  "required": [
133
133
  "type"
134
- ],
135
- "additionalProperties": false
134
+ ]
136
135
  }
@@ -195,6 +195,5 @@
195
195
  },
196
196
  "required": [
197
197
  "type"
198
- ],
199
- "additionalProperties": false
198
+ ]
200
199
  }
@@ -57,6 +57,5 @@
57
57
  },
58
58
  "required": [
59
59
  "type"
60
- ],
61
- "additionalProperties": false
60
+ ]
62
61
  }
@@ -101,6 +101,5 @@
101
101
  },
102
102
  "required": [
103
103
  "type"
104
- ],
105
- "additionalProperties": false
104
+ ]
106
105
  }
@@ -45,6 +45,5 @@
45
45
  },
46
46
  "required": [
47
47
  "type"
48
- ],
49
- "additionalProperties": false
48
+ ]
50
49
  }
@@ -46,6 +46,5 @@
46
46
  },
47
47
  "required": [
48
48
  "type"
49
- ],
50
- "additionalProperties": false
49
+ ]
51
50
  }
@@ -139,6 +139,5 @@
139
139
  "required": [
140
140
  "type",
141
141
  "identifier"
142
- ],
143
- "additionalProperties": false
142
+ ]
144
143
  }
@@ -94,6 +94,5 @@
94
94
  },
95
95
  "required": [
96
96
  "type"
97
- ],
98
- "additionalProperties": false
97
+ ]
99
98
  }
@@ -46,6 +46,5 @@
46
46
  },
47
47
  "required": [
48
48
  "type"
49
- ],
50
- "additionalProperties": false
49
+ ]
51
50
  }
@@ -46,6 +46,5 @@
46
46
  },
47
47
  "required": [
48
48
  "type"
49
- ],
50
- "additionalProperties": false
49
+ ]
51
50
  }
@@ -54,6 +54,5 @@
54
54
  },
55
55
  "required": [
56
56
  "type"
57
- ],
58
- "additionalProperties": false
57
+ ]
59
58
  }
@@ -46,6 +46,5 @@
46
46
  },
47
47
  "required": [
48
48
  "type"
49
- ],
50
- "additionalProperties": false
49
+ ]
51
50
  }
@@ -136,6 +136,5 @@
136
136
  "defaultLanguageCode",
137
137
  "identifier",
138
138
  "name"
139
- ],
140
- "additionalProperties": false
139
+ ]
141
140
  }
@@ -52,6 +52,5 @@
52
52
  },
53
53
  "required": [
54
54
  "type"
55
- ],
56
- "additionalProperties": false
55
+ ]
57
56
  }
@@ -73,6 +73,5 @@
73
73
  },
74
74
  "required": [
75
75
  "type"
76
- ],
77
- "additionalProperties": false
76
+ ]
78
77
  }
@@ -50,6 +50,5 @@
50
50
  },
51
51
  "required": [
52
52
  "type"
53
- ],
54
- "additionalProperties": false
53
+ ]
55
54
  }
@@ -50,6 +50,5 @@
50
50
  },
51
51
  "required": [
52
52
  "type"
53
- ],
54
- "additionalProperties": false
53
+ ]
55
54
  }
@@ -50,6 +50,5 @@
50
50
  },
51
51
  "required": [
52
52
  "type"
53
- ],
54
- "additionalProperties": false
53
+ ]
55
54
  }
@@ -64,6 +64,5 @@
64
64
  },
65
65
  "required": [
66
66
  "type"
67
- ],
68
- "additionalProperties": false
67
+ ]
69
68
  }
@@ -57,6 +57,5 @@
57
57
  },
58
58
  "required": [
59
59
  "type"
60
- ],
61
- "additionalProperties": false
60
+ ]
62
61
  }
@@ -141,6 +141,5 @@
141
141
  },
142
142
  "required": [
143
143
  "type"
144
- ],
145
- "additionalProperties": false
144
+ ]
146
145
  }
@@ -93,6 +93,5 @@
93
93
  },
94
94
  "required": [
95
95
  "type"
96
- ],
97
- "additionalProperties": false
96
+ ]
98
97
  }
@@ -54,6 +54,5 @@
54
54
  "required": [
55
55
  "type",
56
56
  "associatedGeographicalObjectCharacteristic"
57
- ],
58
- "additionalProperties": false
57
+ ]
59
58
  }
@@ -88,6 +88,5 @@
88
88
  },
89
89
  "required": [
90
90
  "type"
91
- ],
92
- "additionalProperties": false
91
+ ]
93
92
  }
@@ -60,6 +60,5 @@
60
60
  },
61
61
  "required": [
62
62
  "type"
63
- ],
64
- "additionalProperties": false
63
+ ]
65
64
  }
@@ -129,6 +129,5 @@
129
129
  },
130
130
  "required": [
131
131
  "type"
132
- ],
133
- "additionalProperties": false
132
+ ]
134
133
  }
@@ -90,6 +90,5 @@
90
90
  },
91
91
  "required": [
92
92
  "type"
93
- ],
94
- "additionalProperties": false
93
+ ]
95
94
  }
@@ -84,6 +84,5 @@
84
84
  },
85
85
  "required": [
86
86
  "type"
87
- ],
88
- "additionalProperties": false
87
+ ]
89
88
  }
@@ -64,6 +64,5 @@
64
64
  },
65
65
  "required": [
66
66
  "type"
67
- ],
68
- "additionalProperties": false
67
+ ]
69
68
  }
@@ -54,6 +54,5 @@
54
54
  },
55
55
  "required": [
56
56
  "type"
57
- ],
58
- "additionalProperties": false
57
+ ]
59
58
  }
@@ -941,6 +941,5 @@
941
941
  },
942
942
  "required": [
943
943
  "type"
944
- ],
945
- "additionalProperties": false
944
+ ]
946
945
  }
@@ -402,6 +402,5 @@
402
402
  },
403
403
  "required": [
404
404
  "type"
405
- ],
406
- "additionalProperties": false
405
+ ]
407
406
  }
@@ -150,6 +150,5 @@
150
150
  },
151
151
  "required": [
152
152
  "type"
153
- ],
154
- "additionalProperties": false
153
+ ]
155
154
  }