@twin.org/standards-gs1 0.0.3-next.9 → 0.9.0
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/dist/es/dataTypes/epcisDataTypes.js +69 -0
- package/dist/es/dataTypes/epcisDataTypes.js.map +1 -0
- package/dist/es/dataTypes/gs1DataTypes.js +3 -3
- package/dist/es/dataTypes/gs1DataTypes.js.map +1 -1
- package/dist/es/entities/gs1Location.js +2 -3
- package/dist/es/entities/gs1Location.js.map +1 -1
- package/dist/es/index.js +26 -7
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisAggregationEvent.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisAssociationEvent.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisAttribute.js +2 -0
- package/dist/es/models/epcis20/IEpcisAttribute.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisBizTransaction.js +0 -2
- package/dist/es/models/epcis20/IEpcisBizTransaction.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisDestination.js +0 -2
- package/dist/es/models/epcis20/IEpcisDestination.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisDocument.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisErrorDeclaration.js +2 -0
- package/dist/es/models/epcis20/IEpcisErrorDeclaration.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisEvent.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisHeader.js +2 -0
- package/dist/es/models/epcis20/IEpcisHeader.js.map +1 -0
- package/dist/es/models/epcis20/{IEpcisSimpleLocation.js → IEpcisIlmd.js} +1 -1
- package/dist/es/models/epcis20/IEpcisIlmd.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisLocation.js +4 -0
- package/dist/es/models/epcis20/IEpcisLocation.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisObjectEvent.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisPersistentDisposition.js +2 -0
- package/dist/es/models/epcis20/IEpcisPersistentDisposition.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisQuantity.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisQuery.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisQueryDocument.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisQueryDocumentBody.js +2 -0
- package/dist/es/models/epcis20/IEpcisQueryDocumentBody.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisQueryResults.js +2 -0
- package/dist/es/models/epcis20/IEpcisQueryResults.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisQueryResultsBody.js +2 -0
- package/dist/es/models/epcis20/IEpcisQueryResultsBody.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisSensorElement.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisSensorMetadata.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisSensorReport.js +0 -2
- package/dist/es/models/epcis20/IEpcisSensorReport.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisSource.js +0 -2
- package/dist/es/models/epcis20/IEpcisSource.js.map +1 -1
- package/dist/es/models/epcis20/IEpcisTransactionEvent.js +2 -0
- package/dist/es/models/epcis20/IEpcisTransactionEvent.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisTransformationEvent.js +2 -0
- package/dist/es/models/epcis20/IEpcisTransformationEvent.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisVocabulary.js +2 -0
- package/dist/es/models/epcis20/IEpcisVocabulary.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisVocabularyElement.js +2 -0
- package/dist/es/models/epcis20/IEpcisVocabularyElement.js.map +1 -0
- package/dist/es/models/epcis20/epcisActionTypes.js +7 -4
- package/dist/es/models/epcis20/epcisActionTypes.js.map +1 -1
- package/dist/es/models/epcis20/epcisBizStepTypes.js +140 -2
- package/dist/es/models/epcis20/epcisBizStepTypes.js.map +1 -1
- package/dist/es/models/epcis20/epcisBizTransactionTypes.js +75 -0
- package/dist/es/models/epcis20/epcisBizTransactionTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisComponentTypes.js +77 -0
- package/dist/es/models/epcis20/epcisComponentTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisContextType.js +2 -0
- package/dist/es/models/epcis20/epcisContextType.js.map +1 -0
- package/dist/es/models/epcis20/epcisContexts.js +27 -0
- package/dist/es/models/epcis20/epcisContexts.js.map +1 -0
- package/dist/es/models/epcis20/epcisDispositionTypes.js +112 -2
- package/dist/es/models/epcis20/epcisDispositionTypes.js.map +1 -1
- package/dist/es/models/epcis20/epcisErrorReasonTypes.js +20 -0
- package/dist/es/models/epcis20/epcisErrorReasonTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisEventTypes.js +6 -6
- package/dist/es/models/epcis20/epcisEventTypes.js.map +1 -1
- package/dist/es/models/epcis20/epcisEvents.js +2 -0
- package/dist/es/models/epcis20/epcisEvents.js.map +1 -0
- package/dist/es/models/epcis20/epcisMeasurementTypes.js +301 -0
- package/dist/es/models/epcis20/epcisMeasurementTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisSensorAlertTypes.js +19 -0
- package/dist/es/models/epcis20/epcisSensorAlertTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisSourceDestTypes.js +26 -0
- package/dist/es/models/epcis20/epcisSourceDestTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisTypes.js +37 -0
- package/dist/es/models/epcis20/epcisTypes.js.map +1 -0
- package/dist/es/models/gs1/gs1Contexts.js +8 -2
- package/dist/es/models/gs1/gs1Contexts.js.map +1 -1
- package/dist/es/schemas/EpcisAggregationEvent.json +102 -0
- package/dist/es/schemas/EpcisAssociationEvent.json +103 -0
- package/dist/es/schemas/EpcisContextType.json +30 -0
- package/dist/es/schemas/EpcisDocument.json +68 -0
- package/dist/es/schemas/EpcisObjectEvent.json +106 -0
- package/dist/es/schemas/EpcisQueryDocument.json +38 -0
- package/dist/es/schemas/EpcisTransactionEvent.json +103 -0
- package/dist/es/schemas/EpcisTransformationEvent.json +119 -0
- package/dist/es/utils/gs1Is.js +3 -2
- package/dist/es/utils/gs1Is.js.map +1 -1
- package/dist/types/dataTypes/epcisDataTypes.d.ts +13 -0
- package/dist/types/dataTypes/gs1DataTypes.d.ts +1 -1
- package/dist/types/entities/gs1Location.d.ts +2 -3
- package/dist/types/index.d.ts +26 -7
- package/dist/types/models/epcis20/IEpcisAggregationEvent.d.ts +75 -4
- package/dist/types/models/epcis20/IEpcisAssociationEvent.d.ts +74 -4
- package/dist/types/models/epcis20/IEpcisAttribute.d.ts +15 -0
- package/dist/types/models/epcis20/IEpcisBizTransaction.d.ts +11 -5
- package/dist/types/models/epcis20/IEpcisDestination.d.ts +12 -5
- package/dist/types/models/epcis20/IEpcisDocument.d.ts +33 -6
- package/dist/types/models/epcis20/IEpcisErrorDeclaration.d.ts +24 -0
- package/dist/types/models/epcis20/IEpcisEvent.d.ts +22 -21
- package/dist/types/models/epcis20/IEpcisHeader.d.ts +17 -0
- package/dist/types/models/epcis20/IEpcisIlmd.d.ts +7 -0
- package/dist/types/models/epcis20/IEpcisLocation.d.ts +11 -0
- package/dist/types/models/epcis20/IEpcisObjectEvent.d.ts +72 -12
- package/dist/types/models/epcis20/IEpcisPersistentDisposition.d.ts +16 -0
- package/dist/types/models/epcis20/IEpcisQuantity.d.ts +13 -5
- package/dist/types/models/epcis20/IEpcisQuery.d.ts +2 -1
- package/dist/types/models/epcis20/IEpcisQueryDocument.d.ts +8 -29
- package/dist/types/models/epcis20/IEpcisQueryDocumentBody.d.ts +11 -0
- package/dist/types/models/epcis20/IEpcisQueryResults.d.ts +19 -0
- package/dist/types/models/epcis20/IEpcisQueryResultsBody.d.ts +16 -0
- package/dist/types/models/epcis20/IEpcisSensorElement.d.ts +12 -8
- package/dist/types/models/epcis20/IEpcisSensorMetadata.d.ts +36 -10
- package/dist/types/models/epcis20/IEpcisSensorReport.d.ts +121 -8
- package/dist/types/models/epcis20/IEpcisSource.d.ts +11 -5
- package/dist/types/models/epcis20/IEpcisTransactionEvent.d.ts +78 -0
- package/dist/types/models/epcis20/IEpcisTransformationEvent.d.ts +96 -0
- package/dist/types/models/epcis20/IEpcisVocabulary.d.ts +15 -0
- package/dist/types/models/epcis20/IEpcisVocabularyElement.d.ts +20 -0
- package/dist/types/models/epcis20/epcisActionTypes.d.ts +9 -5
- package/dist/types/models/epcis20/epcisBizStepTypes.d.ts +144 -3
- package/dist/types/models/epcis20/epcisBizTransactionTypes.d.ts +74 -0
- package/dist/types/models/epcis20/epcisComponentTypes.d.ts +76 -0
- package/dist/types/models/epcis20/epcisContextType.d.ts +8 -0
- package/dist/types/models/epcis20/epcisContexts.d.ts +27 -0
- package/dist/types/models/epcis20/epcisDispositionTypes.d.ts +117 -3
- package/dist/types/models/epcis20/epcisErrorReasonTypes.d.ts +19 -0
- package/dist/types/models/epcis20/epcisEventTypes.d.ts +7 -7
- package/dist/types/models/epcis20/epcisEvents.d.ts +11 -0
- package/dist/types/models/epcis20/epcisMeasurementTypes.d.ts +303 -0
- package/dist/types/models/epcis20/epcisSensorAlertTypes.d.ts +19 -0
- package/dist/types/models/epcis20/epcisSourceDestTypes.d.ts +26 -0
- package/dist/types/models/epcis20/epcisTypes.d.ts +37 -0
- package/dist/types/models/gs1/gs1Contexts.d.ts +8 -2
- package/dist/types/utils/gs1Is.d.ts +3 -2
- package/docs/changelog.md +535 -60
- package/docs/examples.md +58 -1
- package/docs/reference/classes/EpcisDataTypes.md +37 -0
- package/docs/reference/classes/Gs1DataTypes.md +5 -2
- package/docs/reference/classes/Gs1Identifiers.md +1 -1
- package/docs/reference/classes/Gs1IdentifiersValidation.md +7 -7
- package/docs/reference/classes/Gs1Is.md +8 -4
- package/docs/reference/classes/Gs1Location.md +34 -32
- package/docs/reference/classes/Gs1Validation.md +1 -1
- package/docs/reference/index.md +40 -15
- package/docs/reference/interfaces/IEPCClassUri.md +3 -3
- package/docs/reference/interfaces/IEpcisAggregationEvent.md +219 -0
- package/docs/reference/interfaces/IEpcisAssociationEvent.md +218 -0
- package/docs/reference/interfaces/IEpcisAttribute.md +23 -0
- package/docs/reference/interfaces/IEpcisBizTransaction.md +27 -0
- package/docs/reference/interfaces/IEpcisDestination.md +28 -0
- package/docs/reference/interfaces/IEpcisDocument.md +60 -8
- package/docs/reference/interfaces/IEpcisErrorDeclaration.md +36 -0
- package/docs/reference/interfaces/IEpcisEvent.md +37 -33
- package/docs/reference/interfaces/IEpcisHeader.md +23 -0
- package/docs/reference/interfaces/IEpcisIlmd.md +8 -0
- package/docs/reference/interfaces/IEpcisLocation.md +16 -0
- package/docs/reference/interfaces/IEpcisObjectEvent.md +224 -0
- package/docs/reference/interfaces/IEpcisPersistentDisposition.md +24 -0
- package/docs/reference/interfaces/IEpcisQuantity.md +34 -0
- package/docs/reference/interfaces/IEpcisQuery.md +6 -2
- package/docs/reference/interfaces/IEpcisQueryDocument.md +17 -43
- package/docs/reference/interfaces/IEpcisQueryDocumentBody.md +15 -0
- package/docs/reference/interfaces/IEpcisQueryResults.md +31 -0
- package/docs/reference/interfaces/IEpcisQueryResultsBody.md +23 -0
- package/docs/reference/interfaces/IEpcisSensorElement.md +26 -0
- package/docs/reference/interfaces/IEpcisSensorMetadata.md +80 -0
- package/docs/reference/interfaces/IEpcisSensorReport.md +224 -0
- package/docs/reference/interfaces/IEpcisSource.md +27 -0
- package/docs/reference/interfaces/IEpcisTransactionEvent.md +216 -0
- package/docs/reference/interfaces/IEpcisTransformationEvent.md +245 -0
- package/docs/reference/interfaces/IEpcisVocabulary.md +23 -0
- package/docs/reference/interfaces/IEpcisVocabularyElement.md +32 -0
- package/docs/reference/type-aliases/EpcisActionTypes.md +2 -1
- package/docs/reference/type-aliases/EpcisBizStepTypes.md +4 -1
- package/docs/reference/type-aliases/EpcisBizTransactionTypes.md +5 -0
- package/docs/reference/type-aliases/EpcisComponentTypes.md +5 -0
- package/docs/reference/type-aliases/EpcisContextType.md +6 -0
- package/docs/reference/type-aliases/EpcisContexts.md +5 -0
- package/docs/reference/type-aliases/EpcisDispositionTypes.md +5 -1
- package/docs/reference/type-aliases/EpcisErrorReasonTypes.md +5 -0
- package/docs/reference/type-aliases/EpcisEventTypes.md +1 -1
- package/docs/reference/type-aliases/EpcisEvents.md +6 -0
- package/docs/reference/type-aliases/EpcisMeasurementTypes.md +8 -0
- package/docs/reference/type-aliases/EpcisSensorAlertTypes.md +6 -0
- package/docs/reference/type-aliases/EpcisSourceDestTypes.md +6 -0
- package/docs/reference/variables/EpcisActionTypes.md +10 -7
- package/docs/reference/variables/EpcisBizStepTypes.md +140 -43
- package/docs/reference/variables/EpcisBizTransactionTypes.md +98 -0
- package/docs/reference/variables/EpcisComponentTypes.md +102 -0
- package/docs/reference/variables/EpcisContexts.md +33 -0
- package/docs/reference/variables/EpcisDispositionTypes.md +112 -35
- package/docs/reference/variables/EpcisErrorReasonTypes.md +21 -0
- package/docs/reference/variables/EpcisEventTypes.md +11 -11
- package/docs/reference/variables/EpcisMeasurementTypes.md +442 -0
- package/docs/reference/variables/EpcisSensorAlertTypes.md +20 -0
- package/docs/reference/variables/EpcisSourceDestTypes.md +29 -0
- package/docs/reference/variables/GS1Contexts.md +11 -3
- package/docs/reference/variables/Gs1IdTypes.md +20 -20
- package/docs/reference/variables/Gs1IdentifierTypes.md +4 -4
- package/docs/reference/variables/Gs1SubSiteAttributes.md +33 -33
- package/docs/reference/variables/Gs1SubSiteTypes.md +16 -16
- package/docs/reference/variables/Gs1Types.md +1 -1
- package/package.json +9 -9
- package/dist/es/models/epcis20/IEpcisBaseAggregationEvent.js +0 -2
- package/dist/es/models/epcis20/IEpcisBaseAggregationEvent.js.map +0 -1
- package/dist/es/models/epcis20/IEpcisEventDetails.js +0 -2
- package/dist/es/models/epcis20/IEpcisEventDetails.js.map +0 -1
- package/dist/es/models/epcis20/IEpcisSimpleLocation.js.map +0 -1
- package/dist/es/models/epcis20/epcisErrorTypes.js +0 -11
- package/dist/es/models/epcis20/epcisErrorTypes.js.map +0 -1
- package/dist/es/models/epcis20/epcisEventUnionType.js +0 -2
- package/dist/es/models/epcis20/epcisEventUnionType.js.map +0 -1
- package/dist/types/models/epcis20/IEpcisBaseAggregationEvent.d.ts +0 -19
- package/dist/types/models/epcis20/IEpcisEventDetails.d.ts +0 -35
- package/dist/types/models/epcis20/IEpcisSimpleLocation.d.ts +0 -9
- package/dist/types/models/epcis20/epcisErrorTypes.d.ts +0 -11
- package/dist/types/models/epcis20/epcisEventUnionType.d.ts +0 -7
- package/docs/reference/interfaces/IAggregationEvent.md +0 -223
- package/docs/reference/interfaces/IAssociationEvent.md +0 -223
- package/docs/reference/interfaces/IBizTransaction.md +0 -19
- package/docs/reference/interfaces/IDestination.md +0 -19
- package/docs/reference/interfaces/IEpcisEventDetails.md +0 -167
- package/docs/reference/interfaces/IObjectEvent.md +0 -211
- package/docs/reference/interfaces/IQuantity.md +0 -19
- package/docs/reference/interfaces/ISensorElement.md +0 -19
- package/docs/reference/interfaces/ISensorMetadata.md +0 -35
- package/docs/reference/interfaces/ISensorReport.md +0 -27
- package/docs/reference/interfaces/ISimpleLocation.md +0 -11
- package/docs/reference/interfaces/ISource.md +0 -19
- package/docs/reference/type-aliases/EpcisErrorTypes.md +0 -5
- package/docs/reference/type-aliases/EpcisEventUnionType.md +0 -5
- package/docs/reference/variables/EpcisErrorTypes.md +0 -15
package/docs/examples.md
CHANGED
|
@@ -1 +1,58 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Standards GS1 Examples
|
|
2
|
+
|
|
3
|
+
These snippets cover identifier checks, helper extraction methods, validation utilities, and schema registration.
|
|
4
|
+
|
|
5
|
+
## Gs1IdentifiersValidation
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import type { IValidationFailure } from '@twin.org/core';
|
|
9
|
+
import { Gs1IdentifiersValidation } from '@twin.org/standards-gs1';
|
|
10
|
+
|
|
11
|
+
const failures: IValidationFailure[] = [];
|
|
12
|
+
const epc = 'urn:epc:id:sgtin:0614141.112345.400';
|
|
13
|
+
|
|
14
|
+
const valid = Gs1IdentifiersValidation.epcId('item.id', epc, failures);
|
|
15
|
+
const gtin = Gs1IdentifiersValidation.extractEpcIdGtin(epc);
|
|
16
|
+
const gln = Gs1IdentifiersValidation.extractEpcIdGln('urn:epc:id:sgln:0614141.12345.0');
|
|
17
|
+
|
|
18
|
+
console.log(valid); // true
|
|
19
|
+
console.log(gtin); // 0614141.112345.400
|
|
20
|
+
console.log(gln); // 0614141.12345.0
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Gs1Validation
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import type { IValidationFailure } from '@twin.org/core';
|
|
27
|
+
import { Gs1Location, Gs1Validation } from '@twin.org/standards-gs1';
|
|
28
|
+
|
|
29
|
+
const failures: IValidationFailure[] = [];
|
|
30
|
+
const location = new Gs1Location();
|
|
31
|
+
location.id = 'urn:epc:id:sgln:0614141.12345.0';
|
|
32
|
+
location.city = 'Rotterdam';
|
|
33
|
+
location.countryCode = 'NL';
|
|
34
|
+
location.latitude = 51.9244;
|
|
35
|
+
location.longitude = 4.4777;
|
|
36
|
+
|
|
37
|
+
const valid = Gs1Validation.locationMasterData('location', location, failures);
|
|
38
|
+
|
|
39
|
+
console.log(valid); // true
|
|
40
|
+
console.log(failures.length); // 0
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Gs1Is And Data Type Registration
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { EpcisDataTypes, Gs1DataTypes, Gs1Identifiers, Gs1Is } from '@twin.org/standards-gs1';
|
|
47
|
+
|
|
48
|
+
EpcisDataTypes.registerRedirects();
|
|
49
|
+
EpcisDataTypes.registerTypes();
|
|
50
|
+
Gs1DataTypes.registerTypes();
|
|
51
|
+
Gs1Identifiers.registerIdentifiers();
|
|
52
|
+
|
|
53
|
+
const isHex = Gs1Is.isEpcHex('3034257BF7194E4000001A85');
|
|
54
|
+
const isGeo = Gs1Is.isGeoUri('geo:51.9244,4.4777');
|
|
55
|
+
|
|
56
|
+
console.log(isHex); // true
|
|
57
|
+
console.log(isGeo); // true
|
|
58
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Class: EpcisDataTypes
|
|
2
|
+
|
|
3
|
+
Handle all the data types for EPCIS.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new EpcisDataTypes**(): `EpcisDataTypes`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`EpcisDataTypes`
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### registerRedirects() {#registerredirects}
|
|
18
|
+
|
|
19
|
+
> `static` **registerRedirects**(): `void`
|
|
20
|
+
|
|
21
|
+
Register the JSON-LD Redirects.
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
`void`
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### registerTypes() {#registertypes}
|
|
30
|
+
|
|
31
|
+
> `static` **registerTypes**(): `void`
|
|
32
|
+
|
|
33
|
+
Register all the data types.
|
|
34
|
+
|
|
35
|
+
#### Returns
|
|
36
|
+
|
|
37
|
+
`void`
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
# Class: Gs1DataTypes
|
|
2
2
|
|
|
3
3
|
Handle all the data types for GS1.
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.gs1.org/voc
|
|
5
8
|
|
|
6
9
|
## Constructors
|
|
7
10
|
|
|
@@ -15,7 +18,7 @@ Vocabulary https://www.gs1.org/voc .
|
|
|
15
18
|
|
|
16
19
|
## Methods
|
|
17
20
|
|
|
18
|
-
### registerTypes()
|
|
21
|
+
### registerTypes() {#registertypes}
|
|
19
22
|
|
|
20
23
|
> `static` **registerTypes**(): `void`
|
|
21
24
|
|
|
@@ -14,7 +14,7 @@ Validation for GS1 identifiers.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### epcId()
|
|
17
|
+
### epcId() {#epcid}
|
|
18
18
|
|
|
19
19
|
> `static` **epcId**(`propertyName`, `value`, `failures`): `value is string`
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ True if the value is valid epc.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### epcIdGtin()
|
|
51
|
+
### epcIdGtin() {#epcidgtin}
|
|
52
52
|
|
|
53
53
|
> `static` **epcIdGtin**(`propertyName`, `value`, `failures`): `value is string`
|
|
54
54
|
|
|
@@ -82,7 +82,7 @@ True if the value is valid epc.
|
|
|
82
82
|
|
|
83
83
|
***
|
|
84
84
|
|
|
85
|
-
### epcIdGln()
|
|
85
|
+
### epcIdGln() {#epcidgln}
|
|
86
86
|
|
|
87
87
|
> `static` **epcIdGln**(`propertyName`, `value`, `failures`): `value is string`
|
|
88
88
|
|
|
@@ -116,7 +116,7 @@ True if the value is valid epc.
|
|
|
116
116
|
|
|
117
117
|
***
|
|
118
118
|
|
|
119
|
-
### epcClass()
|
|
119
|
+
### epcClass() {#epcclass}
|
|
120
120
|
|
|
121
121
|
> `static` **epcClass**(`propertyName`, `value`, `failures`): `value is string`
|
|
122
122
|
|
|
@@ -150,7 +150,7 @@ True if the value is valid epc.
|
|
|
150
150
|
|
|
151
151
|
***
|
|
152
152
|
|
|
153
|
-
### extractEpcIdGtin()
|
|
153
|
+
### extractEpcIdGtin() {#extractepcidgtin}
|
|
154
154
|
|
|
155
155
|
> `static` **extractEpcIdGtin**(`epc`): `string` \| `undefined`
|
|
156
156
|
|
|
@@ -172,7 +172,7 @@ The extracted data or undefined.
|
|
|
172
172
|
|
|
173
173
|
***
|
|
174
174
|
|
|
175
|
-
### extractEpcIdGln()
|
|
175
|
+
### extractEpcIdGln() {#extractepcidgln}
|
|
176
176
|
|
|
177
177
|
> `static` **extractEpcIdGln**(`epc`): `string` \| `undefined`
|
|
178
178
|
|
|
@@ -194,7 +194,7 @@ The extracted data or undefined.
|
|
|
194
194
|
|
|
195
195
|
***
|
|
196
196
|
|
|
197
|
-
### extractEpcClassUri()
|
|
197
|
+
### extractEpcClassUri() {#extractepcclassuri}
|
|
198
198
|
|
|
199
199
|
> `static` **extractEpcClassUri**(`epc`): [`IEPCClassUri`](../interfaces/IEPCClassUri.md) \| `undefined`
|
|
200
200
|
|
|
@@ -14,7 +14,7 @@ Is checks for GS1 data.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### isEpcHex()
|
|
17
|
+
### isEpcHex() {#isepchex}
|
|
18
18
|
|
|
19
19
|
> `static` **isEpcHex**(`value`): `boolean`
|
|
20
20
|
|
|
@@ -36,11 +36,11 @@ True if the value is an epc.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### isGeoUri()
|
|
39
|
+
### isGeoUri() {#isgeouri}
|
|
40
40
|
|
|
41
41
|
> `static` **isGeoUri**(`value`): `boolean`
|
|
42
42
|
|
|
43
|
-
Is the value a valid geo
|
|
43
|
+
Is the value a valid geo URI.
|
|
44
44
|
|
|
45
45
|
#### Parameters
|
|
46
46
|
|
|
@@ -54,4 +54,8 @@ The value to check.
|
|
|
54
54
|
|
|
55
55
|
`boolean`
|
|
56
56
|
|
|
57
|
-
True if the value matches
|
|
57
|
+
True if the value matches the geo URI scheme.
|
|
58
|
+
|
|
59
|
+
#### See
|
|
60
|
+
|
|
61
|
+
https://en.wikipedia.org/wiki/Geo_URI_scheme
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Class: Gs1Location
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
GS1 Location master data entity.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.gs1.org/sites/default/files/docs/epc/CBV-Standard-1-2-1-r-2017-05-05.pdf
|
|
6
8
|
|
|
7
9
|
## Constructors
|
|
8
10
|
|
|
@@ -16,7 +18,7 @@ Section 10.2 .
|
|
|
16
18
|
|
|
17
19
|
## Properties
|
|
18
20
|
|
|
19
|
-
### id
|
|
21
|
+
### id {#id}
|
|
20
22
|
|
|
21
23
|
> **id**: `string`
|
|
22
24
|
|
|
@@ -24,112 +26,112 @@ The GS1 sgln identifier.
|
|
|
24
26
|
|
|
25
27
|
***
|
|
26
28
|
|
|
27
|
-
### site?
|
|
29
|
+
### site? {#site}
|
|
28
30
|
|
|
29
|
-
> `optional` **site
|
|
31
|
+
> `optional` **site?**: `string`
|
|
30
32
|
|
|
31
33
|
Identifies the site in which the location is contained.
|
|
32
34
|
|
|
33
35
|
***
|
|
34
36
|
|
|
35
|
-
### sst?
|
|
37
|
+
### sst? {#sst}
|
|
36
38
|
|
|
37
|
-
> `optional` **sst
|
|
39
|
+
> `optional` **sst?**: [`Gs1SubSiteTypes`](../type-aliases/Gs1SubSiteTypes.md)
|
|
38
40
|
|
|
39
41
|
Sub site type describes the primary business function of the sub site location.
|
|
40
42
|
|
|
41
43
|
***
|
|
42
44
|
|
|
43
|
-
### ssa?
|
|
45
|
+
### ssa? {#ssa}
|
|
44
46
|
|
|
45
|
-
> `optional` **ssa
|
|
47
|
+
> `optional` **ssa?**: [`Gs1SubSiteAttributes`](../type-aliases/Gs1SubSiteAttributes.md)
|
|
46
48
|
|
|
47
49
|
Sub site attribute further qualifies the business function of the sub site location.
|
|
48
50
|
|
|
49
51
|
***
|
|
50
52
|
|
|
51
|
-
### ssd?
|
|
53
|
+
### ssd? {#ssd}
|
|
52
54
|
|
|
53
|
-
> `optional` **ssd
|
|
55
|
+
> `optional` **ssd?**: `string`
|
|
54
56
|
|
|
55
57
|
Sub site detail provides additional proprietary information.
|
|
56
58
|
|
|
57
59
|
***
|
|
58
60
|
|
|
59
|
-
### name?
|
|
61
|
+
### name? {#name}
|
|
60
62
|
|
|
61
|
-
> `optional` **name
|
|
63
|
+
> `optional` **name?**: `string`
|
|
62
64
|
|
|
63
65
|
The name of the location.
|
|
64
66
|
|
|
65
67
|
***
|
|
66
68
|
|
|
67
|
-
### streetAddressOne?
|
|
69
|
+
### streetAddressOne? {#streetaddressone}
|
|
68
70
|
|
|
69
|
-
> `optional` **streetAddressOne
|
|
71
|
+
> `optional` **streetAddressOne?**: `string`
|
|
70
72
|
|
|
71
73
|
The street address line 1.
|
|
72
74
|
|
|
73
75
|
***
|
|
74
76
|
|
|
75
|
-
### streetAddressTwo?
|
|
77
|
+
### streetAddressTwo? {#streetaddresstwo}
|
|
76
78
|
|
|
77
|
-
> `optional` **streetAddressTwo
|
|
79
|
+
> `optional` **streetAddressTwo?**: `string`
|
|
78
80
|
|
|
79
81
|
The street address line 2.
|
|
80
82
|
|
|
81
83
|
***
|
|
82
84
|
|
|
83
|
-
### streetAddressThree?
|
|
85
|
+
### streetAddressThree? {#streetaddressthree}
|
|
84
86
|
|
|
85
|
-
> `optional` **streetAddressThree
|
|
87
|
+
> `optional` **streetAddressThree?**: `string`
|
|
86
88
|
|
|
87
89
|
The street address line 3.
|
|
88
90
|
|
|
89
91
|
***
|
|
90
92
|
|
|
91
|
-
### city?
|
|
93
|
+
### city? {#city}
|
|
92
94
|
|
|
93
|
-
> `optional` **city
|
|
95
|
+
> `optional` **city?**: `string`
|
|
94
96
|
|
|
95
97
|
City.
|
|
96
98
|
|
|
97
99
|
***
|
|
98
100
|
|
|
99
|
-
### state?
|
|
101
|
+
### state? {#state}
|
|
100
102
|
|
|
101
|
-
> `optional` **state
|
|
103
|
+
> `optional` **state?**: `string`
|
|
102
104
|
|
|
103
105
|
State.
|
|
104
106
|
|
|
105
107
|
***
|
|
106
108
|
|
|
107
|
-
### postalCode?
|
|
109
|
+
### postalCode? {#postalcode}
|
|
108
110
|
|
|
109
|
-
> `optional` **postalCode
|
|
111
|
+
> `optional` **postalCode?**: `string`
|
|
110
112
|
|
|
111
113
|
Postal Code.
|
|
112
114
|
|
|
113
115
|
***
|
|
114
116
|
|
|
115
|
-
### countryCode?
|
|
117
|
+
### countryCode? {#countrycode}
|
|
116
118
|
|
|
117
|
-
> `optional` **countryCode
|
|
119
|
+
> `optional` **countryCode?**: `string`
|
|
118
120
|
|
|
119
121
|
Country Code The ISO 3166-1 alpha-2 code specifying the country for the address.
|
|
120
122
|
|
|
121
123
|
***
|
|
122
124
|
|
|
123
|
-
### latitude?
|
|
125
|
+
### latitude? {#latitude}
|
|
124
126
|
|
|
125
|
-
> `optional` **latitude
|
|
127
|
+
> `optional` **latitude?**: `number`
|
|
126
128
|
|
|
127
129
|
The latitude of the location in degrees.
|
|
128
130
|
|
|
129
131
|
***
|
|
130
132
|
|
|
131
|
-
### longitude?
|
|
133
|
+
### longitude? {#longitude}
|
|
132
134
|
|
|
133
|
-
> `optional` **longitude
|
|
135
|
+
> `optional` **longitude?**: `number`
|
|
134
136
|
|
|
135
137
|
The longitude of the location in degrees.
|
package/docs/reference/index.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Classes
|
|
4
4
|
|
|
5
|
+
- [EpcisDataTypes](classes/EpcisDataTypes.md)
|
|
5
6
|
- [Gs1DataTypes](classes/Gs1DataTypes.md)
|
|
6
7
|
- [Gs1Location](classes/Gs1Location.md)
|
|
7
8
|
- [Gs1Identifiers](classes/Gs1Identifiers.md)
|
|
@@ -12,31 +13,49 @@
|
|
|
12
13
|
## Interfaces
|
|
13
14
|
|
|
14
15
|
- [IEPCClassUri](interfaces/IEPCClassUri.md)
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
16
|
+
- [IEpcisAggregationEvent](interfaces/IEpcisAggregationEvent.md)
|
|
17
|
+
- [IEpcisAssociationEvent](interfaces/IEpcisAssociationEvent.md)
|
|
18
|
+
- [IEpcisAttribute](interfaces/IEpcisAttribute.md)
|
|
19
|
+
- [IEpcisBizTransaction](interfaces/IEpcisBizTransaction.md)
|
|
20
|
+
- [IEpcisDestination](interfaces/IEpcisDestination.md)
|
|
19
21
|
- [IEpcisDocument](interfaces/IEpcisDocument.md)
|
|
22
|
+
- [IEpcisErrorDeclaration](interfaces/IEpcisErrorDeclaration.md)
|
|
20
23
|
- [IEpcisEvent](interfaces/IEpcisEvent.md)
|
|
21
|
-
- [
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
+
- [IEpcisHeader](interfaces/IEpcisHeader.md)
|
|
25
|
+
- [IEpcisIlmd](interfaces/IEpcisIlmd.md)
|
|
26
|
+
- [IEpcisLocation](interfaces/IEpcisLocation.md)
|
|
27
|
+
- [IEpcisObjectEvent](interfaces/IEpcisObjectEvent.md)
|
|
28
|
+
- [IEpcisPersistentDisposition](interfaces/IEpcisPersistentDisposition.md)
|
|
29
|
+
- [IEpcisQuantity](interfaces/IEpcisQuantity.md)
|
|
24
30
|
- [IEpcisQuery](interfaces/IEpcisQuery.md)
|
|
25
31
|
- [IEpcisQueryDocument](interfaces/IEpcisQueryDocument.md)
|
|
26
|
-
- [
|
|
27
|
-
- [
|
|
28
|
-
- [
|
|
29
|
-
- [
|
|
30
|
-
- [
|
|
32
|
+
- [IEpcisQueryDocumentBody](interfaces/IEpcisQueryDocumentBody.md)
|
|
33
|
+
- [IEpcisQueryResults](interfaces/IEpcisQueryResults.md)
|
|
34
|
+
- [IEpcisQueryResultsBody](interfaces/IEpcisQueryResultsBody.md)
|
|
35
|
+
- [IEpcisSensorElement](interfaces/IEpcisSensorElement.md)
|
|
36
|
+
- [IEpcisSensorMetadata](interfaces/IEpcisSensorMetadata.md)
|
|
37
|
+
- [IEpcisSensorReport](interfaces/IEpcisSensorReport.md)
|
|
38
|
+
- [IEpcisSource](interfaces/IEpcisSource.md)
|
|
39
|
+
- [IEpcisTransactionEvent](interfaces/IEpcisTransactionEvent.md)
|
|
40
|
+
- [IEpcisTransformationEvent](interfaces/IEpcisTransformationEvent.md)
|
|
41
|
+
- [IEpcisVocabulary](interfaces/IEpcisVocabulary.md)
|
|
42
|
+
- [IEpcisVocabularyElement](interfaces/IEpcisVocabularyElement.md)
|
|
31
43
|
|
|
32
44
|
## Type Aliases
|
|
33
45
|
|
|
34
46
|
- [EpcisActionTypes](type-aliases/EpcisActionTypes.md)
|
|
35
47
|
- [EpcisBizStepTypes](type-aliases/EpcisBizStepTypes.md)
|
|
48
|
+
- [EpcisBizTransactionTypes](type-aliases/EpcisBizTransactionTypes.md)
|
|
49
|
+
- [EpcisComponentTypes](type-aliases/EpcisComponentTypes.md)
|
|
50
|
+
- [EpcisContextType](type-aliases/EpcisContextType.md)
|
|
51
|
+
- [EpcisContexts](type-aliases/EpcisContexts.md)
|
|
36
52
|
- [EpcisDispositionTypes](type-aliases/EpcisDispositionTypes.md)
|
|
37
|
-
- [
|
|
53
|
+
- [EpcisErrorReasonTypes](type-aliases/EpcisErrorReasonTypes.md)
|
|
38
54
|
- [EpcisEventTypes](type-aliases/EpcisEventTypes.md)
|
|
39
|
-
- [
|
|
55
|
+
- [EpcisEvents](type-aliases/EpcisEvents.md)
|
|
56
|
+
- [EpcisMeasurementTypes](type-aliases/EpcisMeasurementTypes.md)
|
|
57
|
+
- [EpcisSensorAlertTypes](type-aliases/EpcisSensorAlertTypes.md)
|
|
58
|
+
- [EpcisSourceDestTypes](type-aliases/EpcisSourceDestTypes.md)
|
|
40
59
|
- [GS1Contexts](type-aliases/GS1Contexts.md)
|
|
41
60
|
- [Gs1IdTypes](type-aliases/Gs1IdTypes.md)
|
|
42
61
|
- [Gs1IdentifierTypes](type-aliases/Gs1IdentifierTypes.md)
|
|
@@ -48,9 +67,15 @@
|
|
|
48
67
|
|
|
49
68
|
- [EpcisActionTypes](variables/EpcisActionTypes.md)
|
|
50
69
|
- [EpcisBizStepTypes](variables/EpcisBizStepTypes.md)
|
|
70
|
+
- [EpcisBizTransactionTypes](variables/EpcisBizTransactionTypes.md)
|
|
71
|
+
- [EpcisComponentTypes](variables/EpcisComponentTypes.md)
|
|
72
|
+
- [EpcisContexts](variables/EpcisContexts.md)
|
|
51
73
|
- [EpcisDispositionTypes](variables/EpcisDispositionTypes.md)
|
|
52
|
-
- [
|
|
74
|
+
- [EpcisErrorReasonTypes](variables/EpcisErrorReasonTypes.md)
|
|
53
75
|
- [EpcisEventTypes](variables/EpcisEventTypes.md)
|
|
76
|
+
- [EpcisMeasurementTypes](variables/EpcisMeasurementTypes.md)
|
|
77
|
+
- [EpcisSensorAlertTypes](variables/EpcisSensorAlertTypes.md)
|
|
78
|
+
- [EpcisSourceDestTypes](variables/EpcisSourceDestTypes.md)
|
|
54
79
|
- [GS1Contexts](variables/GS1Contexts.md)
|
|
55
80
|
- [Gs1IdTypes](variables/Gs1IdTypes.md)
|
|
56
81
|
- [Gs1IdentifierTypes](variables/Gs1IdentifierTypes.md)
|
|
@@ -4,7 +4,7 @@ Interface for EPC class URI.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### companyPrefix
|
|
7
|
+
### companyPrefix {#companyprefix}
|
|
8
8
|
|
|
9
9
|
> **companyPrefix**: `string`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The company prefix.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### itemRefAndIndicator
|
|
15
|
+
### itemRefAndIndicator {#itemrefandindicator}
|
|
16
16
|
|
|
17
17
|
> **itemRefAndIndicator**: `string`
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ The item reference number.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### lot
|
|
23
|
+
### lot {#lot}
|
|
24
24
|
|
|
25
25
|
> **lot**: `string`
|
|
26
26
|
|