@twin.org/standards-unece 0.0.3-next.50 → 0.0.3-next.51
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.
- package/README.md +2 -2
- package/docs/changelog.md +7 -0
- package/docs/examples.md +44 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# TWIN
|
|
1
|
+
# TWIN Standards UNECE
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides data models for [UN/CEFACT semantic vocabularies](https://vocabulary.uncefact.org/), supporting interoperable trade and logistics information exchange.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @twin.org/standards-unece - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.51](https://github.com/twinfoundation/standards/compare/standards-unece-v0.0.3-next.50...standards-unece-v0.0.3-next.51) (2026-03-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **standards-unece:** Synchronize repo versions
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.50](https://github.com/twinfoundation/standards/compare/standards-unece-v0.0.3-next.49...standards-unece-v0.0.3-next.50) (2026-03-09)
|
|
4
11
|
|
|
5
12
|
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Standards UNECE Examples
|
|
2
|
+
|
|
3
|
+
These snippets use location and code list helpers, then register UNECE data type mappings.
|
|
4
|
+
|
|
5
|
+
## UnLocodes
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { UnLocodes } from '@twin.org/standards-unece';
|
|
9
|
+
|
|
10
|
+
const countries = await UnLocodes.getCountries();
|
|
11
|
+
const functions = await UnLocodes.getFunctions();
|
|
12
|
+
const location = await UnLocodes.getLocationByCode('NLRTM');
|
|
13
|
+
const subdivision = await UnLocodes.getSubdivisionByCode('NLZH');
|
|
14
|
+
|
|
15
|
+
console.log(countries.length > 0); // true
|
|
16
|
+
console.log(functions.length > 0); // true
|
|
17
|
+
console.log(location?.locode); // NLRTM
|
|
18
|
+
console.log(subdivision?.code); // ZH
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## UnCodeLists
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { UnCodeLists } from '@twin.org/standards-unece';
|
|
25
|
+
|
|
26
|
+
const descriptions = await UnCodeLists.getDescriptions('unece:transportModeCodeList', 'en');
|
|
27
|
+
const roadDescription = await UnCodeLists.getDescription('unece:transportModeCodeList', '3', 'en');
|
|
28
|
+
const roadLabel = await UnCodeLists.getLabel('unece:transportModeCodeList', '3', 'en');
|
|
29
|
+
|
|
30
|
+
console.log(Object.keys(descriptions).length > 0); // true
|
|
31
|
+
console.log(typeof roadDescription === 'string'); // true
|
|
32
|
+
console.log(typeof roadLabel === 'string'); // true
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## UneceDataTypes
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { UneceDataTypes } from '@twin.org/standards-unece';
|
|
39
|
+
|
|
40
|
+
UneceDataTypes.registerRedirects();
|
|
41
|
+
UneceDataTypes.registerTypes();
|
|
42
|
+
|
|
43
|
+
console.log(typeof UneceDataTypes.registerTypes === 'function'); // true
|
|
44
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/standards-unece",
|
|
3
|
-
"version": "0.0.3-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-next.51",
|
|
4
|
+
"description": "Data models for UN/CEFACT semantic vocabularies.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/twinfoundation/standards.git",
|