@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
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/gs1-epcis/EpcisTransformationEvent",
|
|
4
|
+
"title": "EpcisTransformationEvent",
|
|
5
|
+
"description": "EPCIS 2.0 TransformationEvent describing how inputs are transformed into\noutputs during a business process.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"type": {
|
|
9
|
+
"const": "TransformationEvent",
|
|
10
|
+
"description": "Fixed to TransformationEvent."
|
|
11
|
+
},
|
|
12
|
+
"inputEPCList": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"description": "(Optional) Unordered list of one or more EPCs identifying (at the instance\nlevel) objects that were inputs to the transformation."
|
|
18
|
+
},
|
|
19
|
+
"inputQuantityList": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisQuantity"
|
|
23
|
+
},
|
|
24
|
+
"description": "(Optional) Unordered list of one or more QuantityElements identifying\nclass-level inputs; may be omitted subject to the EPCIS quantity-list\nconstraints."
|
|
25
|
+
},
|
|
26
|
+
"outputEPCList": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"description": "(Optional) Unordered list of one or more EPCs naming (at the instance level)\nobjects that were outputs from the transformation."
|
|
32
|
+
},
|
|
33
|
+
"outputQuantityList": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisQuantity"
|
|
37
|
+
},
|
|
38
|
+
"description": "(Optional) Unordered list of one or more QuantityElements identifying\nclass-level outputs; may be omitted subject to the EPCIS quantity-list\nconstraints."
|
|
39
|
+
},
|
|
40
|
+
"transformationID": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "A unique identifier linking TransformationEvents; shared values connect inputs\nand outputs across those events."
|
|
43
|
+
},
|
|
44
|
+
"bizStep": {
|
|
45
|
+
"anyOf": [
|
|
46
|
+
{
|
|
47
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisBizStepTypes"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"description": "(Optional) The business step of which this event was a part."
|
|
54
|
+
},
|
|
55
|
+
"disposition": {
|
|
56
|
+
"anyOf": [
|
|
57
|
+
{
|
|
58
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisDispositionTypes"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "string"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"description": "(Optional) The business condition of the objects associated with the EPCs,\npresumed to hold true until contradicted by a subsequent event."
|
|
65
|
+
},
|
|
66
|
+
"persistentDisposition": {
|
|
67
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisPersistentDisposition",
|
|
68
|
+
"description": "Persistent disposition."
|
|
69
|
+
},
|
|
70
|
+
"readPoint": {
|
|
71
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
|
|
72
|
+
"description": "(Optional) The read point at which the event took place."
|
|
73
|
+
},
|
|
74
|
+
"bizLocation": {
|
|
75
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
|
|
76
|
+
"description": "(Optional) The business location where the objects associated with the EPCs\nmay be found, until contradicted by a subsequent event."
|
|
77
|
+
},
|
|
78
|
+
"bizTransactionList": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": {
|
|
81
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisBizTransaction"
|
|
82
|
+
},
|
|
83
|
+
"description": "An unordered list of business transactions that define the context of this\nevent."
|
|
84
|
+
},
|
|
85
|
+
"sourceList": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisSource"
|
|
89
|
+
},
|
|
90
|
+
"description": "(Optional) Unordered list of Source elements that provide context about the\noriginating endpoint of a business transfer of which this event is a part."
|
|
91
|
+
},
|
|
92
|
+
"destinationList": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisDestination"
|
|
96
|
+
},
|
|
97
|
+
"description": "(Optional) Unordered list of Destination elements that provide context about\nthe terminating endpoint of a business transfer of which this event is a part."
|
|
98
|
+
},
|
|
99
|
+
"sensorElementList": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": {
|
|
102
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisSensorElement"
|
|
103
|
+
},
|
|
104
|
+
"description": "(Optional) Connects event to one or more SensorElements."
|
|
105
|
+
},
|
|
106
|
+
"ilmd": {
|
|
107
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisIlmd",
|
|
108
|
+
"description": "(Optional) Instance/Lot master data that describes the objects created during\nthis event."
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"type"
|
|
113
|
+
],
|
|
114
|
+
"allOf": [
|
|
115
|
+
{
|
|
116
|
+
"$ref": "https://schema.twindev.org/gs1-epcis/EpcisEvent"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
package/dist/es/utils/gs1Is.js
CHANGED
|
@@ -13,9 +13,10 @@ export class Gs1Is {
|
|
|
13
13
|
return /^[\dA-Fa-f]{24}$/.test(value);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Is the value a valid geo
|
|
16
|
+
* Is the value a valid geo URI.
|
|
17
17
|
* @param value The value to check.
|
|
18
|
-
* @returns True if the value matches
|
|
18
|
+
* @returns True if the value matches the geo URI scheme.
|
|
19
|
+
* @see https://en.wikipedia.org/wiki/Geo_URI_scheme
|
|
19
20
|
*/
|
|
20
21
|
static isGeoUri(value) {
|
|
21
22
|
return /^geo:[+-]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[+-]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)($|,)(\d{0,5})?/.test(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gs1Is.js","sourceRoot":"","sources":["../../../src/utils/gs1Is.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,OAAO,KAAK;IACjB;;;;OAIG;IACI,MAAM,CAAC,QAAQ,CAAC,KAAa;QACnC,OAAO,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"gs1Is.js","sourceRoot":"","sources":["../../../src/utils/gs1Is.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,OAAO,KAAK;IACjB;;;;OAIG;IACI,MAAM,CAAC,QAAQ,CAAC,KAAa;QACnC,OAAO,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,QAAQ,CAAC,KAAa;QACnC,OAAO,4GAA4G,CAAC,IAAI,CACvH,KAAK,CACL,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Is checks for GS1 data.\n */\nexport class Gs1Is {\n\t/**\n\t * Is the value an EPC identifier.\n\t * @param value The value to test.\n\t * @returns True if the value is an epc.\n\t */\n\tpublic static isEpcHex(value: string): boolean {\n\t\treturn /^[\\dA-Fa-f]{24}$/.test(value);\n\t}\n\n\t/**\n\t * Is the value a valid geo URI.\n\t * @param value The value to check.\n\t * @returns True if the value matches the geo URI scheme.\n\t * @see https://en.wikipedia.org/wiki/Geo_URI_scheme\n\t */\n\tpublic static isGeoUri(value: string): boolean {\n\t\treturn /^geo:[+-]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?),\\s*[+-]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)($|,)(\\d{0,5})?/.test(\n\t\t\tvalue\n\t\t);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handle all the data types for EPCIS.
|
|
3
|
+
*/
|
|
4
|
+
export declare class EpcisDataTypes {
|
|
5
|
+
/**
|
|
6
|
+
* Register the JSON-LD Redirects.
|
|
7
|
+
*/
|
|
8
|
+
static registerRedirects(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Register all the data types.
|
|
11
|
+
*/
|
|
12
|
+
static registerTypes(): void;
|
|
13
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { Gs1SubSiteAttributes } from "../models/gs1/gs1SubSiteAttributes.js";
|
|
2
2
|
import type { Gs1SubSiteTypes } from "../models/gs1/gs1SubSiteTypes.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Section 10.2 .
|
|
4
|
+
* GS1 Location master data entity.
|
|
5
|
+
* @see https://www.gs1.org/sites/default/files/docs/epc/CBV-Standard-1-2-1-r-2017-05-05.pdf
|
|
7
6
|
*/
|
|
8
7
|
export declare class Gs1Location {
|
|
9
8
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,35 +1,54 @@
|
|
|
1
|
+
export * from "./dataTypes/epcisDataTypes.js";
|
|
1
2
|
export * from "./dataTypes/gs1DataTypes.js";
|
|
2
3
|
export * from "./entities/gs1Location.js";
|
|
3
4
|
export * from "./identifiers/gs1Identifiers.js";
|
|
4
5
|
export * from "./models/epc/IEPCClassUri.js";
|
|
5
6
|
export * from "./models/epcis20/epcisActionTypes.js";
|
|
6
7
|
export * from "./models/epcis20/epcisBizStepTypes.js";
|
|
8
|
+
export * from "./models/epcis20/epcisBizTransactionTypes.js";
|
|
9
|
+
export * from "./models/epcis20/epcisComponentTypes.js";
|
|
10
|
+
export * from "./models/epcis20/epcisContexts.js";
|
|
11
|
+
export * from "./models/epcis20/epcisContextType.js";
|
|
7
12
|
export * from "./models/epcis20/epcisDispositionTypes.js";
|
|
8
|
-
export * from "./models/epcis20/
|
|
9
|
-
export * from "./models/epcis20/
|
|
13
|
+
export * from "./models/epcis20/epcisErrorReasonTypes.js";
|
|
14
|
+
export * from "./models/epcis20/epcisEvents.js";
|
|
10
15
|
export * from "./models/epcis20/epcisEventTypes.js";
|
|
16
|
+
export * from "./models/epcis20/epcisMeasurementTypes.js";
|
|
17
|
+
export * from "./models/epcis20/epcisSensorAlertTypes.js";
|
|
18
|
+
export * from "./models/epcis20/epcisSourceDestTypes.js";
|
|
11
19
|
export * from "./models/epcis20/IEpcisAggregationEvent.js";
|
|
12
20
|
export * from "./models/epcis20/IEpcisAssociationEvent.js";
|
|
21
|
+
export * from "./models/epcis20/IEpcisAttribute.js";
|
|
13
22
|
export * from "./models/epcis20/IEpcisBizTransaction.js";
|
|
14
23
|
export * from "./models/epcis20/IEpcisDestination.js";
|
|
15
24
|
export * from "./models/epcis20/IEpcisDocument.js";
|
|
25
|
+
export * from "./models/epcis20/IEpcisErrorDeclaration.js";
|
|
16
26
|
export * from "./models/epcis20/IEpcisEvent.js";
|
|
17
|
-
export * from "./models/epcis20/
|
|
18
|
-
export * from "./models/epcis20/
|
|
19
|
-
export * from "./models/epcis20/
|
|
27
|
+
export * from "./models/epcis20/IEpcisHeader.js";
|
|
28
|
+
export * from "./models/epcis20/IEpcisIlmd.js";
|
|
29
|
+
export * from "./models/epcis20/IEpcisLocation.js";
|
|
20
30
|
export * from "./models/epcis20/IEpcisObjectEvent.js";
|
|
31
|
+
export * from "./models/epcis20/IEpcisPersistentDisposition.js";
|
|
21
32
|
export * from "./models/epcis20/IEpcisQuantity.js";
|
|
33
|
+
export * from "./models/epcis20/IEpcisQuery.js";
|
|
34
|
+
export * from "./models/epcis20/IEpcisQueryDocument.js";
|
|
35
|
+
export * from "./models/epcis20/IEpcisQueryDocumentBody.js";
|
|
36
|
+
export * from "./models/epcis20/IEpcisQueryResults.js";
|
|
37
|
+
export * from "./models/epcis20/IEpcisQueryResultsBody.js";
|
|
22
38
|
export * from "./models/epcis20/IEpcisSensorElement.js";
|
|
23
39
|
export * from "./models/epcis20/IEpcisSensorMetadata.js";
|
|
24
40
|
export * from "./models/epcis20/IEpcisSensorReport.js";
|
|
25
|
-
export * from "./models/epcis20/IEpcisSimpleLocation.js";
|
|
26
41
|
export * from "./models/epcis20/IEpcisSource.js";
|
|
42
|
+
export * from "./models/epcis20/IEpcisTransactionEvent.js";
|
|
43
|
+
export * from "./models/epcis20/IEpcisTransformationEvent.js";
|
|
44
|
+
export * from "./models/epcis20/IEpcisVocabulary.js";
|
|
45
|
+
export * from "./models/epcis20/IEpcisVocabularyElement.js";
|
|
27
46
|
export * from "./models/gs1/gs1Contexts.js";
|
|
28
47
|
export * from "./models/gs1/gs1IdentifierTypes.js";
|
|
29
48
|
export * from "./models/gs1/gs1IdTypes.js";
|
|
30
|
-
export * from "./models/gs1/gs1Types.js";
|
|
31
49
|
export * from "./models/gs1/gs1SubSiteAttributes.js";
|
|
32
50
|
export * from "./models/gs1/gs1SubSiteTypes.js";
|
|
51
|
+
export * from "./models/gs1/gs1Types.js";
|
|
33
52
|
export * from "./utils/gs1IdentifiersValidation.js";
|
|
34
53
|
export * from "./utils/gs1Is.js";
|
|
35
54
|
export * from "./utils/gs1Validation.js";
|
|
@@ -1,10 +1,81 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EpcisActionTypes } from "./epcisActionTypes.js";
|
|
2
|
+
import type { EpcisBizStepTypes } from "./epcisBizStepTypes.js";
|
|
3
|
+
import type { EpcisDispositionTypes } from "./epcisDispositionTypes.js";
|
|
4
|
+
import type { EpcisTypes } from "./epcisTypes.js";
|
|
5
|
+
import type { IEpcisBizTransaction } from "./IEpcisBizTransaction.js";
|
|
6
|
+
import type { IEpcisDestination } from "./IEpcisDestination.js";
|
|
7
|
+
import type { IEpcisEvent } from "./IEpcisEvent.js";
|
|
8
|
+
import type { IEpcisLocation } from "./IEpcisLocation.js";
|
|
9
|
+
import type { IEpcisQuantity } from "./IEpcisQuantity.js";
|
|
10
|
+
import type { IEpcisSensorElement } from "./IEpcisSensorElement.js";
|
|
11
|
+
import type { IEpcisSource } from "./IEpcisSource.js";
|
|
2
12
|
/**
|
|
3
|
-
*
|
|
13
|
+
* EPCIS 2.0 AggregationEvent describing how child objects are associated with or
|
|
14
|
+
* disassociated from a parent object.
|
|
15
|
+
* @see https://ref.gs1.org/epcis/AggregationEvent
|
|
4
16
|
*/
|
|
5
|
-
export interface
|
|
17
|
+
export interface IEpcisAggregationEvent extends IEpcisEvent {
|
|
6
18
|
/**
|
|
7
19
|
* The type.
|
|
8
20
|
*/
|
|
9
|
-
type:
|
|
21
|
+
type: typeof EpcisTypes.AggregationEvent;
|
|
22
|
+
/**
|
|
23
|
+
* (Optional when action is OBSERVE, required otherwise) Identifier of the parent
|
|
24
|
+
* of the aggregation or association; use the pure identity URI when the parent is
|
|
25
|
+
* an EPC.
|
|
26
|
+
*/
|
|
27
|
+
parentID?: string;
|
|
28
|
+
/**
|
|
29
|
+
* (Optional) Unordered list of contained objects identified at the instance
|
|
30
|
+
* level; AggregationEvents normally include childEPCs or childQuantityList unless
|
|
31
|
+
* action is DELETE.
|
|
32
|
+
*/
|
|
33
|
+
childEPCs?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Unordered list of one or more QuantityElements identifying contained objects
|
|
36
|
+
* at the class level; may be empty only with action DELETE when disaggregating
|
|
37
|
+
* all children.
|
|
38
|
+
*/
|
|
39
|
+
childQuantityList?: IEpcisQuantity[];
|
|
40
|
+
/**
|
|
41
|
+
* How this event relates to the lifecycle of the EPCs named in this event.
|
|
42
|
+
*/
|
|
43
|
+
action: EpcisActionTypes;
|
|
44
|
+
/**
|
|
45
|
+
* (Optional) The business step of which this event was a part.
|
|
46
|
+
*/
|
|
47
|
+
bizStep?: EpcisBizStepTypes | string;
|
|
48
|
+
/**
|
|
49
|
+
* (Optional) The business condition of the objects associated with the EPCs,
|
|
50
|
+
* presumed to hold true until contradicted by a subsequent event.
|
|
51
|
+
*/
|
|
52
|
+
disposition?: EpcisDispositionTypes | string;
|
|
53
|
+
/**
|
|
54
|
+
* (Optional) The read point at which the event took place.
|
|
55
|
+
*/
|
|
56
|
+
readPoint?: IEpcisLocation;
|
|
57
|
+
/**
|
|
58
|
+
* (Optional) The business location where the objects associated with the EPCs
|
|
59
|
+
* may be found, until contradicted by a subsequent event.
|
|
60
|
+
*/
|
|
61
|
+
bizLocation?: IEpcisLocation;
|
|
62
|
+
/**
|
|
63
|
+
* (Optional) An unordered list of business transactions that define the context
|
|
64
|
+
* of this event.
|
|
65
|
+
*/
|
|
66
|
+
bizTransactionList?: IEpcisBizTransaction[];
|
|
67
|
+
/**
|
|
68
|
+
* (Optional) Unordered list of Source elements that provide context about the
|
|
69
|
+
* originating endpoint of a business transfer of which this event is a part.
|
|
70
|
+
*/
|
|
71
|
+
sourceList?: IEpcisSource[];
|
|
72
|
+
/**
|
|
73
|
+
* (Optional) Unordered list of Destination elements that provide context about the
|
|
74
|
+
* terminating endpoint of a business transfer of which this event is a part.
|
|
75
|
+
*/
|
|
76
|
+
destinationList?: IEpcisDestination[];
|
|
77
|
+
/**
|
|
78
|
+
* (Optional) Connects event to one or more SensorElements.
|
|
79
|
+
*/
|
|
80
|
+
sensorElementList?: IEpcisSensorElement[];
|
|
10
81
|
}
|
|
@@ -1,10 +1,80 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EpcisActionTypes } from "./epcisActionTypes.js";
|
|
2
|
+
import type { EpcisBizStepTypes } from "./epcisBizStepTypes.js";
|
|
3
|
+
import type { EpcisDispositionTypes } from "./epcisDispositionTypes.js";
|
|
4
|
+
import type { EpcisTypes } from "./epcisTypes.js";
|
|
5
|
+
import type { IEpcisBizTransaction } from "./IEpcisBizTransaction.js";
|
|
6
|
+
import type { IEpcisDestination } from "./IEpcisDestination.js";
|
|
7
|
+
import type { IEpcisEvent } from "./IEpcisEvent.js";
|
|
8
|
+
import type { IEpcisLocation } from "./IEpcisLocation.js";
|
|
9
|
+
import type { IEpcisQuantity } from "./IEpcisQuantity.js";
|
|
10
|
+
import type { IEpcisSensorElement } from "./IEpcisSensorElement.js";
|
|
11
|
+
import type { IEpcisSource } from "./IEpcisSource.js";
|
|
2
12
|
/**
|
|
3
|
-
*
|
|
13
|
+
* EPCIS 2.0 AssociationEvent describing membership relationships between parent
|
|
14
|
+
* and child objects without implying physical containment.
|
|
15
|
+
* @see https://ref.gs1.org/epcis/AssociationEvent
|
|
4
16
|
*/
|
|
5
|
-
export interface
|
|
17
|
+
export interface IEpcisAssociationEvent extends IEpcisEvent {
|
|
6
18
|
/**
|
|
7
19
|
* Type.
|
|
8
20
|
*/
|
|
9
|
-
type:
|
|
21
|
+
type: typeof EpcisTypes.AssociationEvent;
|
|
22
|
+
/**
|
|
23
|
+
* Identifier of the parent of the aggregation or association; use the pure
|
|
24
|
+
* identity URI when the parent is an EPC.
|
|
25
|
+
*/
|
|
26
|
+
parentID: string;
|
|
27
|
+
/**
|
|
28
|
+
* (Optional) Unordered list of contained objects identified at the instance
|
|
29
|
+
* level; AssociationEvents normally include childEPCs or childQuantityList
|
|
30
|
+
* unless action is DELETE.
|
|
31
|
+
*/
|
|
32
|
+
childEPCs?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* Unordered list of one or more QuantityElements identifying contained objects
|
|
35
|
+
* at the class level; may be empty only with action DELETE when disassociating
|
|
36
|
+
* all children.
|
|
37
|
+
*/
|
|
38
|
+
childQuantityList?: IEpcisQuantity[];
|
|
39
|
+
/**
|
|
40
|
+
* How this event relates to the lifecycle of the EPCs named in this event.
|
|
41
|
+
*/
|
|
42
|
+
action: EpcisActionTypes;
|
|
43
|
+
/**
|
|
44
|
+
* (Optional) The business step of which this event was a part.
|
|
45
|
+
*/
|
|
46
|
+
bizStep?: EpcisBizStepTypes | string;
|
|
47
|
+
/**
|
|
48
|
+
* (Optional) The business condition of the objects associated with the EPCs,
|
|
49
|
+
* presumed to hold true until contradicted by a subsequent event.
|
|
50
|
+
*/
|
|
51
|
+
disposition?: EpcisDispositionTypes | string;
|
|
52
|
+
/**
|
|
53
|
+
* (Optional) The read point at which the event took place.
|
|
54
|
+
*/
|
|
55
|
+
readPoint?: IEpcisLocation;
|
|
56
|
+
/**
|
|
57
|
+
* (Optional) The business location where the objects associated with the EPCs
|
|
58
|
+
* may be found, until contradicted by a subsequent event.
|
|
59
|
+
*/
|
|
60
|
+
bizLocation?: IEpcisLocation;
|
|
61
|
+
/**
|
|
62
|
+
* (Optional) An unordered list of business transactions that define the context
|
|
63
|
+
* of this event.
|
|
64
|
+
*/
|
|
65
|
+
bizTransactionList?: IEpcisBizTransaction[];
|
|
66
|
+
/**
|
|
67
|
+
* (Optional) Unordered list of Source elements that provide context about the
|
|
68
|
+
* originating endpoint of a business transfer of which this event is a part.
|
|
69
|
+
*/
|
|
70
|
+
sourceList?: IEpcisSource[];
|
|
71
|
+
/**
|
|
72
|
+
* (Optional) Unordered list of Destination elements that provide context about
|
|
73
|
+
* the terminating endpoint of a business transfer of which this event is a part.
|
|
74
|
+
*/
|
|
75
|
+
destinationList?: IEpcisDestination[];
|
|
76
|
+
/**
|
|
77
|
+
* (Optional) Connects event to one or more SensorElements.
|
|
78
|
+
*/
|
|
79
|
+
sensorElementList?: IEpcisSensorElement[];
|
|
10
80
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IJsonLdNodePrimitive } from "@twin.org/data-json-ld";
|
|
2
|
+
/**
|
|
3
|
+
* EPCIS 2.0 Vocabulary Attribute describing metadata on vocabulary elements.
|
|
4
|
+
* @see https://ref.gs1.org/epcis/Attribute
|
|
5
|
+
*/
|
|
6
|
+
export interface IEpcisAttribute {
|
|
7
|
+
/**
|
|
8
|
+
* Attribute id.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Attribute value.
|
|
13
|
+
*/
|
|
14
|
+
attribute?: IJsonLdNodePrimitive;
|
|
15
|
+
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import type { EpcisBizTransactionTypes } from "./epcisBizTransactionTypes.js";
|
|
1
2
|
/**
|
|
2
|
-
* EPCIS
|
|
3
|
+
* EPCIS 2.0 BizTransaction element identifying a business document and its type.
|
|
4
|
+
* @see https://ref.gs1.org/epcis/BizTransaction
|
|
3
5
|
*/
|
|
4
|
-
export interface
|
|
6
|
+
export interface IEpcisBizTransaction {
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
8
|
+
* Identifier that indicates the type of BizTransaction document (e.g. Purchase
|
|
9
|
+
* Order, Despatch Advice).
|
|
10
|
+
*
|
|
11
|
+
* Use {@link EpcisBizTransactionTypes} for known values.
|
|
7
12
|
*/
|
|
8
|
-
type
|
|
13
|
+
type?: EpcisBizTransactionTypes | string;
|
|
9
14
|
/**
|
|
10
|
-
*
|
|
15
|
+
* URI identifier of the specific business transaction document (alias of id in
|
|
16
|
+
* JSON or XML).
|
|
11
17
|
*/
|
|
12
18
|
bizTransaction: string;
|
|
13
19
|
}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
import type { EpcisSourceDestTypes } from "./epcisSourceDestTypes.js";
|
|
1
2
|
/**
|
|
2
|
-
* EPCIS Destination
|
|
3
|
+
* EPCIS 2.0 Destination element identifying the terminating endpoint of a
|
|
4
|
+
* business transfer.
|
|
5
|
+
* @see https://ref.gs1.org/epcis/SourceOrDestination
|
|
3
6
|
*/
|
|
4
|
-
export interface
|
|
7
|
+
export interface IEpcisDestination {
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
9
|
+
* Identifier indicating the role of SourceOrDestination in a transfer (Owning
|
|
10
|
+
* Party, Possessing Party, or Location).
|
|
11
|
+
*
|
|
12
|
+
* Use {@link EpcisSourceDestTypes} for known values.
|
|
7
13
|
*/
|
|
8
|
-
type: string;
|
|
14
|
+
type: EpcisSourceDestTypes | string;
|
|
9
15
|
/**
|
|
10
|
-
*
|
|
16
|
+
* Identifier that denotes the specific source or destination of a business
|
|
17
|
+
* transfer; must correlate with the selected type.
|
|
11
18
|
*/
|
|
12
19
|
destination: string;
|
|
13
20
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { EpcisContextType } from "./epcisContextType.js";
|
|
2
|
+
import type { EpcisEvents } from "./epcisEvents.js";
|
|
3
|
+
import type { EpcisTypes } from "./epcisTypes.js";
|
|
4
|
+
import type { IEpcisHeader } from "./IEpcisHeader.js";
|
|
3
5
|
/**
|
|
4
|
-
* EPCIS
|
|
6
|
+
* EPCIS 2.0 capture document containing header metadata and an event list.
|
|
7
|
+
* @see https://ref.gs1.org/epcis/EPCISDocument
|
|
5
8
|
*/
|
|
6
9
|
export interface IEpcisDocument {
|
|
7
10
|
/**
|
|
8
11
|
* The @context.
|
|
9
12
|
*/
|
|
10
|
-
"@context":
|
|
13
|
+
"@context": EpcisContextType;
|
|
11
14
|
/**
|
|
12
15
|
* The JSON-LD document id.
|
|
13
16
|
*/
|
|
@@ -15,7 +18,31 @@ export interface IEpcisDocument {
|
|
|
15
18
|
/**
|
|
16
19
|
* JSON-LD Type.
|
|
17
20
|
*/
|
|
18
|
-
type:
|
|
21
|
+
type: typeof EpcisTypes.EPCISDocument;
|
|
22
|
+
/**
|
|
23
|
+
* Schema version.
|
|
24
|
+
*/
|
|
25
|
+
schemaVersion: string;
|
|
26
|
+
/**
|
|
27
|
+
* Creation Date.
|
|
28
|
+
*/
|
|
29
|
+
creationDate: string;
|
|
30
|
+
/**
|
|
31
|
+
* (Optional) The instance identifier of an EPCISDocument.
|
|
32
|
+
*/
|
|
33
|
+
instanceIdentifier?: string;
|
|
34
|
+
/**
|
|
35
|
+
* (Optional) The sender of an EPCISDocument.
|
|
36
|
+
*/
|
|
37
|
+
sender?: string;
|
|
38
|
+
/**
|
|
39
|
+
* (Optional) The intended receiver of an EPCISDocument.
|
|
40
|
+
*/
|
|
41
|
+
receiver?: string;
|
|
42
|
+
/**
|
|
43
|
+
* EPCIS Header.
|
|
44
|
+
*/
|
|
45
|
+
epcisHeader?: IEpcisHeader;
|
|
19
46
|
/**
|
|
20
47
|
* The EPCIS Body.
|
|
21
48
|
*/
|
|
@@ -23,6 +50,6 @@ export interface IEpcisDocument {
|
|
|
23
50
|
/**
|
|
24
51
|
* The list of events.
|
|
25
52
|
*/
|
|
26
|
-
eventList:
|
|
53
|
+
eventList: EpcisEvents[];
|
|
27
54
|
};
|
|
28
55
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { EpcisErrorReasonTypes } from "./epcisErrorReasonTypes.js";
|
|
2
|
+
/**
|
|
3
|
+
* EPCIS 2.0 ErrorDeclaration describing corrections to previously captured
|
|
4
|
+
* events.
|
|
5
|
+
* @see https://ref.gs1.org/epcis/ErrorDeclaration
|
|
6
|
+
*/
|
|
7
|
+
export interface IEpcisErrorDeclaration {
|
|
8
|
+
/**
|
|
9
|
+
* The date and time at which the declaration of error is made.
|
|
10
|
+
*/
|
|
11
|
+
declarationTime: string;
|
|
12
|
+
/**
|
|
13
|
+
* Reason for the error.
|
|
14
|
+
*
|
|
15
|
+
* Use {@link EpcisErrorReasonTypes} for known values.
|
|
16
|
+
*/
|
|
17
|
+
reason?: EpcisErrorReasonTypes | string;
|
|
18
|
+
/**
|
|
19
|
+
* (Optional) If present, indicates that the events having the specified URIs as
|
|
20
|
+
* the value of their eventID fields are to be considered as "corrections" to
|
|
21
|
+
* the event declared erroneous by this event.
|
|
22
|
+
*/
|
|
23
|
+
correctiveEventIDs?: string[];
|
|
24
|
+
}
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { EpcisContextType } from "./epcisContextType.js";
|
|
3
|
+
import type { IEpcisErrorDeclaration } from "./IEpcisErrorDeclaration.js";
|
|
4
4
|
/**
|
|
5
|
-
* EPCIS Event.
|
|
5
|
+
* Base EPCIS 2.0 Event carrying shared fields across all event types.
|
|
6
|
+
* @see https://ref.gs1.org/epcis/Event
|
|
6
7
|
*/
|
|
7
8
|
export interface IEpcisEvent {
|
|
8
9
|
/**
|
|
9
10
|
* JSON-LD @context.
|
|
10
11
|
*/
|
|
11
|
-
"@context"
|
|
12
|
+
"@context": EpcisContextType;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Type of Event.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
type: string;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* URI identifier of a specific EPCIS event (alias of id in JSON or XML).
|
|
18
19
|
*/
|
|
19
20
|
eventID?: string;
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* (Optional) CertificationDetails relevant for Objects, Places and/or
|
|
23
|
+
* Organizations mentioned in this Event.
|
|
22
24
|
*/
|
|
23
|
-
|
|
25
|
+
certificationInfo?: ObjectOrArray<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Error declaration.
|
|
28
|
+
*/
|
|
29
|
+
errorDeclaration?: IEpcisErrorDeclaration;
|
|
24
30
|
/**
|
|
25
|
-
*
|
|
31
|
+
* The date and time at which the EPCIS Capturing Applications asserts the event
|
|
32
|
+
* occurred.
|
|
26
33
|
*/
|
|
27
34
|
eventTime: string;
|
|
28
35
|
/**
|
|
29
|
-
*
|
|
36
|
+
* The time zone offset in effect at the time and place the event occurred,
|
|
37
|
+
* expressed as an offset from UTC.
|
|
30
38
|
*/
|
|
31
39
|
eventTimeZoneOffset: string;
|
|
32
40
|
/**
|
|
33
|
-
*
|
|
41
|
+
* (Optional) The date and time at which this event was recorded by an EPCIS
|
|
42
|
+
* Repository; ignored at capture and present on query results.
|
|
34
43
|
*/
|
|
35
44
|
recordTime?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Source list. Semantics according to EPCIS standard.
|
|
38
|
-
*/
|
|
39
|
-
sourceList?: ISource[];
|
|
40
|
-
/**
|
|
41
|
-
* Destination list. Semantics according to EPCIS standard.
|
|
42
|
-
*/
|
|
43
|
-
destinationList?: IDestination[];
|
|
44
45
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { IEpcisVocabulary } from "./IEpcisVocabulary.js";
|
|
3
|
+
/**
|
|
4
|
+
* EPCIS 2.0 Header carrying optional master data alongside an EPCIS document.
|
|
5
|
+
* @see https://ref.gs1.org/epcis/EPCISHeader
|
|
6
|
+
*/
|
|
7
|
+
export interface IEpcisHeader {
|
|
8
|
+
/**
|
|
9
|
+
* EPCIS master data.
|
|
10
|
+
*/
|
|
11
|
+
epcisMasterData?: IJsonLdNodeObject & {
|
|
12
|
+
/**
|
|
13
|
+
* Vocabulary list.
|
|
14
|
+
*/
|
|
15
|
+
vocabularyList?: IEpcisVocabulary[];
|
|
16
|
+
};
|
|
17
|
+
}
|