@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.
Files changed (238) hide show
  1. package/README.md +2 -2
  2. package/dist/es/dataTypes/epcisDataTypes.js +69 -0
  3. package/dist/es/dataTypes/epcisDataTypes.js.map +1 -0
  4. package/dist/es/dataTypes/gs1DataTypes.js +3 -3
  5. package/dist/es/dataTypes/gs1DataTypes.js.map +1 -1
  6. package/dist/es/entities/gs1Location.js +2 -3
  7. package/dist/es/entities/gs1Location.js.map +1 -1
  8. package/dist/es/index.js +26 -7
  9. package/dist/es/index.js.map +1 -1
  10. package/dist/es/models/epcis20/IEpcisAggregationEvent.js.map +1 -1
  11. package/dist/es/models/epcis20/IEpcisAssociationEvent.js.map +1 -1
  12. package/dist/es/models/epcis20/IEpcisAttribute.js +2 -0
  13. package/dist/es/models/epcis20/IEpcisAttribute.js.map +1 -0
  14. package/dist/es/models/epcis20/IEpcisBizTransaction.js +0 -2
  15. package/dist/es/models/epcis20/IEpcisBizTransaction.js.map +1 -1
  16. package/dist/es/models/epcis20/IEpcisDestination.js +0 -2
  17. package/dist/es/models/epcis20/IEpcisDestination.js.map +1 -1
  18. package/dist/es/models/epcis20/IEpcisDocument.js.map +1 -1
  19. package/dist/es/models/epcis20/IEpcisErrorDeclaration.js +2 -0
  20. package/dist/es/models/epcis20/IEpcisErrorDeclaration.js.map +1 -0
  21. package/dist/es/models/epcis20/IEpcisEvent.js.map +1 -1
  22. package/dist/es/models/epcis20/IEpcisHeader.js +2 -0
  23. package/dist/es/models/epcis20/IEpcisHeader.js.map +1 -0
  24. package/dist/es/models/epcis20/{IEpcisSimpleLocation.js → IEpcisIlmd.js} +1 -1
  25. package/dist/es/models/epcis20/IEpcisIlmd.js.map +1 -0
  26. package/dist/es/models/epcis20/IEpcisLocation.js +4 -0
  27. package/dist/es/models/epcis20/IEpcisLocation.js.map +1 -0
  28. package/dist/es/models/epcis20/IEpcisObjectEvent.js.map +1 -1
  29. package/dist/es/models/epcis20/IEpcisPersistentDisposition.js +2 -0
  30. package/dist/es/models/epcis20/IEpcisPersistentDisposition.js.map +1 -0
  31. package/dist/es/models/epcis20/IEpcisQuantity.js.map +1 -1
  32. package/dist/es/models/epcis20/IEpcisQuery.js.map +1 -1
  33. package/dist/es/models/epcis20/IEpcisQueryDocument.js.map +1 -1
  34. package/dist/es/models/epcis20/IEpcisQueryDocumentBody.js +2 -0
  35. package/dist/es/models/epcis20/IEpcisQueryDocumentBody.js.map +1 -0
  36. package/dist/es/models/epcis20/IEpcisQueryResults.js +2 -0
  37. package/dist/es/models/epcis20/IEpcisQueryResults.js.map +1 -0
  38. package/dist/es/models/epcis20/IEpcisQueryResultsBody.js +2 -0
  39. package/dist/es/models/epcis20/IEpcisQueryResultsBody.js.map +1 -0
  40. package/dist/es/models/epcis20/IEpcisSensorElement.js.map +1 -1
  41. package/dist/es/models/epcis20/IEpcisSensorMetadata.js.map +1 -1
  42. package/dist/es/models/epcis20/IEpcisSensorReport.js +0 -2
  43. package/dist/es/models/epcis20/IEpcisSensorReport.js.map +1 -1
  44. package/dist/es/models/epcis20/IEpcisSource.js +0 -2
  45. package/dist/es/models/epcis20/IEpcisSource.js.map +1 -1
  46. package/dist/es/models/epcis20/IEpcisTransactionEvent.js +2 -0
  47. package/dist/es/models/epcis20/IEpcisTransactionEvent.js.map +1 -0
  48. package/dist/es/models/epcis20/IEpcisTransformationEvent.js +2 -0
  49. package/dist/es/models/epcis20/IEpcisTransformationEvent.js.map +1 -0
  50. package/dist/es/models/epcis20/IEpcisVocabulary.js +2 -0
  51. package/dist/es/models/epcis20/IEpcisVocabulary.js.map +1 -0
  52. package/dist/es/models/epcis20/IEpcisVocabularyElement.js +2 -0
  53. package/dist/es/models/epcis20/IEpcisVocabularyElement.js.map +1 -0
  54. package/dist/es/models/epcis20/epcisActionTypes.js +7 -4
  55. package/dist/es/models/epcis20/epcisActionTypes.js.map +1 -1
  56. package/dist/es/models/epcis20/epcisBizStepTypes.js +140 -2
  57. package/dist/es/models/epcis20/epcisBizStepTypes.js.map +1 -1
  58. package/dist/es/models/epcis20/epcisBizTransactionTypes.js +75 -0
  59. package/dist/es/models/epcis20/epcisBizTransactionTypes.js.map +1 -0
  60. package/dist/es/models/epcis20/epcisComponentTypes.js +77 -0
  61. package/dist/es/models/epcis20/epcisComponentTypes.js.map +1 -0
  62. package/dist/es/models/epcis20/epcisContextType.js +2 -0
  63. package/dist/es/models/epcis20/epcisContextType.js.map +1 -0
  64. package/dist/es/models/epcis20/epcisContexts.js +27 -0
  65. package/dist/es/models/epcis20/epcisContexts.js.map +1 -0
  66. package/dist/es/models/epcis20/epcisDispositionTypes.js +112 -2
  67. package/dist/es/models/epcis20/epcisDispositionTypes.js.map +1 -1
  68. package/dist/es/models/epcis20/epcisErrorReasonTypes.js +20 -0
  69. package/dist/es/models/epcis20/epcisErrorReasonTypes.js.map +1 -0
  70. package/dist/es/models/epcis20/epcisEventTypes.js +6 -6
  71. package/dist/es/models/epcis20/epcisEventTypes.js.map +1 -1
  72. package/dist/es/models/epcis20/epcisEvents.js +2 -0
  73. package/dist/es/models/epcis20/epcisEvents.js.map +1 -0
  74. package/dist/es/models/epcis20/epcisMeasurementTypes.js +301 -0
  75. package/dist/es/models/epcis20/epcisMeasurementTypes.js.map +1 -0
  76. package/dist/es/models/epcis20/epcisSensorAlertTypes.js +19 -0
  77. package/dist/es/models/epcis20/epcisSensorAlertTypes.js.map +1 -0
  78. package/dist/es/models/epcis20/epcisSourceDestTypes.js +26 -0
  79. package/dist/es/models/epcis20/epcisSourceDestTypes.js.map +1 -0
  80. package/dist/es/models/epcis20/epcisTypes.js +37 -0
  81. package/dist/es/models/epcis20/epcisTypes.js.map +1 -0
  82. package/dist/es/models/gs1/gs1Contexts.js +8 -2
  83. package/dist/es/models/gs1/gs1Contexts.js.map +1 -1
  84. package/dist/es/schemas/EpcisAggregationEvent.json +102 -0
  85. package/dist/es/schemas/EpcisAssociationEvent.json +103 -0
  86. package/dist/es/schemas/EpcisContextType.json +30 -0
  87. package/dist/es/schemas/EpcisDocument.json +68 -0
  88. package/dist/es/schemas/EpcisObjectEvent.json +106 -0
  89. package/dist/es/schemas/EpcisQueryDocument.json +38 -0
  90. package/dist/es/schemas/EpcisTransactionEvent.json +103 -0
  91. package/dist/es/schemas/EpcisTransformationEvent.json +119 -0
  92. package/dist/es/utils/gs1Is.js +3 -2
  93. package/dist/es/utils/gs1Is.js.map +1 -1
  94. package/dist/types/dataTypes/epcisDataTypes.d.ts +13 -0
  95. package/dist/types/dataTypes/gs1DataTypes.d.ts +1 -1
  96. package/dist/types/entities/gs1Location.d.ts +2 -3
  97. package/dist/types/index.d.ts +26 -7
  98. package/dist/types/models/epcis20/IEpcisAggregationEvent.d.ts +75 -4
  99. package/dist/types/models/epcis20/IEpcisAssociationEvent.d.ts +74 -4
  100. package/dist/types/models/epcis20/IEpcisAttribute.d.ts +15 -0
  101. package/dist/types/models/epcis20/IEpcisBizTransaction.d.ts +11 -5
  102. package/dist/types/models/epcis20/IEpcisDestination.d.ts +12 -5
  103. package/dist/types/models/epcis20/IEpcisDocument.d.ts +33 -6
  104. package/dist/types/models/epcis20/IEpcisErrorDeclaration.d.ts +24 -0
  105. package/dist/types/models/epcis20/IEpcisEvent.d.ts +22 -21
  106. package/dist/types/models/epcis20/IEpcisHeader.d.ts +17 -0
  107. package/dist/types/models/epcis20/IEpcisIlmd.d.ts +7 -0
  108. package/dist/types/models/epcis20/IEpcisLocation.d.ts +11 -0
  109. package/dist/types/models/epcis20/IEpcisObjectEvent.d.ts +72 -12
  110. package/dist/types/models/epcis20/IEpcisPersistentDisposition.d.ts +16 -0
  111. package/dist/types/models/epcis20/IEpcisQuantity.d.ts +13 -5
  112. package/dist/types/models/epcis20/IEpcisQuery.d.ts +2 -1
  113. package/dist/types/models/epcis20/IEpcisQueryDocument.d.ts +8 -29
  114. package/dist/types/models/epcis20/IEpcisQueryDocumentBody.d.ts +11 -0
  115. package/dist/types/models/epcis20/IEpcisQueryResults.d.ts +19 -0
  116. package/dist/types/models/epcis20/IEpcisQueryResultsBody.d.ts +16 -0
  117. package/dist/types/models/epcis20/IEpcisSensorElement.d.ts +12 -8
  118. package/dist/types/models/epcis20/IEpcisSensorMetadata.d.ts +36 -10
  119. package/dist/types/models/epcis20/IEpcisSensorReport.d.ts +121 -8
  120. package/dist/types/models/epcis20/IEpcisSource.d.ts +11 -5
  121. package/dist/types/models/epcis20/IEpcisTransactionEvent.d.ts +78 -0
  122. package/dist/types/models/epcis20/IEpcisTransformationEvent.d.ts +96 -0
  123. package/dist/types/models/epcis20/IEpcisVocabulary.d.ts +15 -0
  124. package/dist/types/models/epcis20/IEpcisVocabularyElement.d.ts +20 -0
  125. package/dist/types/models/epcis20/epcisActionTypes.d.ts +9 -5
  126. package/dist/types/models/epcis20/epcisBizStepTypes.d.ts +144 -3
  127. package/dist/types/models/epcis20/epcisBizTransactionTypes.d.ts +74 -0
  128. package/dist/types/models/epcis20/epcisComponentTypes.d.ts +76 -0
  129. package/dist/types/models/epcis20/epcisContextType.d.ts +8 -0
  130. package/dist/types/models/epcis20/epcisContexts.d.ts +27 -0
  131. package/dist/types/models/epcis20/epcisDispositionTypes.d.ts +117 -3
  132. package/dist/types/models/epcis20/epcisErrorReasonTypes.d.ts +19 -0
  133. package/dist/types/models/epcis20/epcisEventTypes.d.ts +7 -7
  134. package/dist/types/models/epcis20/epcisEvents.d.ts +11 -0
  135. package/dist/types/models/epcis20/epcisMeasurementTypes.d.ts +303 -0
  136. package/dist/types/models/epcis20/epcisSensorAlertTypes.d.ts +19 -0
  137. package/dist/types/models/epcis20/epcisSourceDestTypes.d.ts +26 -0
  138. package/dist/types/models/epcis20/epcisTypes.d.ts +37 -0
  139. package/dist/types/models/gs1/gs1Contexts.d.ts +8 -2
  140. package/dist/types/utils/gs1Is.d.ts +3 -2
  141. package/docs/changelog.md +535 -60
  142. package/docs/examples.md +58 -1
  143. package/docs/reference/classes/EpcisDataTypes.md +37 -0
  144. package/docs/reference/classes/Gs1DataTypes.md +5 -2
  145. package/docs/reference/classes/Gs1Identifiers.md +1 -1
  146. package/docs/reference/classes/Gs1IdentifiersValidation.md +7 -7
  147. package/docs/reference/classes/Gs1Is.md +8 -4
  148. package/docs/reference/classes/Gs1Location.md +34 -32
  149. package/docs/reference/classes/Gs1Validation.md +1 -1
  150. package/docs/reference/index.md +40 -15
  151. package/docs/reference/interfaces/IEPCClassUri.md +3 -3
  152. package/docs/reference/interfaces/IEpcisAggregationEvent.md +219 -0
  153. package/docs/reference/interfaces/IEpcisAssociationEvent.md +218 -0
  154. package/docs/reference/interfaces/IEpcisAttribute.md +23 -0
  155. package/docs/reference/interfaces/IEpcisBizTransaction.md +27 -0
  156. package/docs/reference/interfaces/IEpcisDestination.md +28 -0
  157. package/docs/reference/interfaces/IEpcisDocument.md +60 -8
  158. package/docs/reference/interfaces/IEpcisErrorDeclaration.md +36 -0
  159. package/docs/reference/interfaces/IEpcisEvent.md +37 -33
  160. package/docs/reference/interfaces/IEpcisHeader.md +23 -0
  161. package/docs/reference/interfaces/IEpcisIlmd.md +8 -0
  162. package/docs/reference/interfaces/IEpcisLocation.md +16 -0
  163. package/docs/reference/interfaces/IEpcisObjectEvent.md +224 -0
  164. package/docs/reference/interfaces/IEpcisPersistentDisposition.md +24 -0
  165. package/docs/reference/interfaces/IEpcisQuantity.md +34 -0
  166. package/docs/reference/interfaces/IEpcisQuery.md +6 -2
  167. package/docs/reference/interfaces/IEpcisQueryDocument.md +17 -43
  168. package/docs/reference/interfaces/IEpcisQueryDocumentBody.md +15 -0
  169. package/docs/reference/interfaces/IEpcisQueryResults.md +31 -0
  170. package/docs/reference/interfaces/IEpcisQueryResultsBody.md +23 -0
  171. package/docs/reference/interfaces/IEpcisSensorElement.md +26 -0
  172. package/docs/reference/interfaces/IEpcisSensorMetadata.md +80 -0
  173. package/docs/reference/interfaces/IEpcisSensorReport.md +224 -0
  174. package/docs/reference/interfaces/IEpcisSource.md +27 -0
  175. package/docs/reference/interfaces/IEpcisTransactionEvent.md +216 -0
  176. package/docs/reference/interfaces/IEpcisTransformationEvent.md +245 -0
  177. package/docs/reference/interfaces/IEpcisVocabulary.md +23 -0
  178. package/docs/reference/interfaces/IEpcisVocabularyElement.md +32 -0
  179. package/docs/reference/type-aliases/EpcisActionTypes.md +2 -1
  180. package/docs/reference/type-aliases/EpcisBizStepTypes.md +4 -1
  181. package/docs/reference/type-aliases/EpcisBizTransactionTypes.md +5 -0
  182. package/docs/reference/type-aliases/EpcisComponentTypes.md +5 -0
  183. package/docs/reference/type-aliases/EpcisContextType.md +6 -0
  184. package/docs/reference/type-aliases/EpcisContexts.md +5 -0
  185. package/docs/reference/type-aliases/EpcisDispositionTypes.md +5 -1
  186. package/docs/reference/type-aliases/EpcisErrorReasonTypes.md +5 -0
  187. package/docs/reference/type-aliases/EpcisEventTypes.md +1 -1
  188. package/docs/reference/type-aliases/EpcisEvents.md +6 -0
  189. package/docs/reference/type-aliases/EpcisMeasurementTypes.md +8 -0
  190. package/docs/reference/type-aliases/EpcisSensorAlertTypes.md +6 -0
  191. package/docs/reference/type-aliases/EpcisSourceDestTypes.md +6 -0
  192. package/docs/reference/variables/EpcisActionTypes.md +10 -7
  193. package/docs/reference/variables/EpcisBizStepTypes.md +140 -43
  194. package/docs/reference/variables/EpcisBizTransactionTypes.md +98 -0
  195. package/docs/reference/variables/EpcisComponentTypes.md +102 -0
  196. package/docs/reference/variables/EpcisContexts.md +33 -0
  197. package/docs/reference/variables/EpcisDispositionTypes.md +112 -35
  198. package/docs/reference/variables/EpcisErrorReasonTypes.md +21 -0
  199. package/docs/reference/variables/EpcisEventTypes.md +11 -11
  200. package/docs/reference/variables/EpcisMeasurementTypes.md +442 -0
  201. package/docs/reference/variables/EpcisSensorAlertTypes.md +20 -0
  202. package/docs/reference/variables/EpcisSourceDestTypes.md +29 -0
  203. package/docs/reference/variables/GS1Contexts.md +11 -3
  204. package/docs/reference/variables/Gs1IdTypes.md +20 -20
  205. package/docs/reference/variables/Gs1IdentifierTypes.md +4 -4
  206. package/docs/reference/variables/Gs1SubSiteAttributes.md +33 -33
  207. package/docs/reference/variables/Gs1SubSiteTypes.md +16 -16
  208. package/docs/reference/variables/Gs1Types.md +1 -1
  209. package/package.json +9 -9
  210. package/dist/es/models/epcis20/IEpcisBaseAggregationEvent.js +0 -2
  211. package/dist/es/models/epcis20/IEpcisBaseAggregationEvent.js.map +0 -1
  212. package/dist/es/models/epcis20/IEpcisEventDetails.js +0 -2
  213. package/dist/es/models/epcis20/IEpcisEventDetails.js.map +0 -1
  214. package/dist/es/models/epcis20/IEpcisSimpleLocation.js.map +0 -1
  215. package/dist/es/models/epcis20/epcisErrorTypes.js +0 -11
  216. package/dist/es/models/epcis20/epcisErrorTypes.js.map +0 -1
  217. package/dist/es/models/epcis20/epcisEventUnionType.js +0 -2
  218. package/dist/es/models/epcis20/epcisEventUnionType.js.map +0 -1
  219. package/dist/types/models/epcis20/IEpcisBaseAggregationEvent.d.ts +0 -19
  220. package/dist/types/models/epcis20/IEpcisEventDetails.d.ts +0 -35
  221. package/dist/types/models/epcis20/IEpcisSimpleLocation.d.ts +0 -9
  222. package/dist/types/models/epcis20/epcisErrorTypes.d.ts +0 -11
  223. package/dist/types/models/epcis20/epcisEventUnionType.d.ts +0 -7
  224. package/docs/reference/interfaces/IAggregationEvent.md +0 -223
  225. package/docs/reference/interfaces/IAssociationEvent.md +0 -223
  226. package/docs/reference/interfaces/IBizTransaction.md +0 -19
  227. package/docs/reference/interfaces/IDestination.md +0 -19
  228. package/docs/reference/interfaces/IEpcisEventDetails.md +0 -167
  229. package/docs/reference/interfaces/IObjectEvent.md +0 -211
  230. package/docs/reference/interfaces/IQuantity.md +0 -19
  231. package/docs/reference/interfaces/ISensorElement.md +0 -19
  232. package/docs/reference/interfaces/ISensorMetadata.md +0 -35
  233. package/docs/reference/interfaces/ISensorReport.md +0 -27
  234. package/docs/reference/interfaces/ISimpleLocation.md +0 -11
  235. package/docs/reference/interfaces/ISource.md +0 -19
  236. package/docs/reference/type-aliases/EpcisErrorTypes.md +0 -5
  237. package/docs/reference/type-aliases/EpcisEventUnionType.md +0 -5
  238. package/docs/reference/variables/EpcisErrorTypes.md +0 -15
@@ -0,0 +1,7 @@
1
+ /**
2
+ * EPCIS 2.0 Instance/Lot Master Data (ILMD) container for event-level master
3
+ * data extensions.
4
+ * @see https://ref.gs1.org/epcis/ILMD
5
+ */
6
+ export interface IEpcisIlmd {
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * EPCIS 2.0 Location reference (readPoint/bizLocation) that wraps a location
3
+ * identifier.
4
+ * @see https://ref.gs1.org/epcis/ReadPoint
5
+ */
6
+ export interface IEpcisLocation {
7
+ /**
8
+ * The location identifier (URI/IRI per EPCIS schema and SHACL).
9
+ */
10
+ id: string;
11
+ }
@@ -1,25 +1,85 @@
1
- import type { IEpcisEventDetails } from "./IEpcisEventDetails.js";
2
- import type { IQuantity } from "./IEpcisQuantity.js";
3
- import type { ISensorElement } from "./IEpcisSensorElement.js";
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 { IEpcisIlmd } from "./IEpcisIlmd.js";
9
+ import type { IEpcisLocation } from "./IEpcisLocation.js";
10
+ import type { IEpcisPersistentDisposition } from "./IEpcisPersistentDisposition.js";
11
+ import type { IEpcisQuantity } from "./IEpcisQuantity.js";
12
+ import type { IEpcisSensorElement } from "./IEpcisSensorElement.js";
13
+ import type { IEpcisSource } from "./IEpcisSource.js";
4
14
  /**
5
- * Defines an EPCIS 2.0 Object Event.
15
+ * EPCIS 2.0 ObjectEvent describing one or more objects (instance- or class-level)
16
+ * observed at a point in the business process.
6
17
  *
18
+ * @see https://ref.gs1.org/epcis/ObjectEvent
7
19
  */
8
- export interface IObjectEvent extends IEpcisEventDetails {
20
+ export interface IEpcisObjectEvent extends IEpcisEvent {
9
21
  /**
10
22
  * Fixed to ObjectEvent.
11
23
  */
12
- type: "ObjectEvent";
24
+ type: typeof EpcisTypes.ObjectEvent;
13
25
  /**
14
- * List of EPCs involved.
26
+ * (Optional) Unordered list of one or more EPCs naming specific objects to which
27
+ * the event pertained.
15
28
  */
16
- epcList: string[];
29
+ epcList?: string[];
17
30
  /**
18
- * Quantity in case of class-level event visibility data.
31
+ * Unordered list of one or more QuantityElements identifying contained objects at
32
+ * the class level.
19
33
  */
20
- quantityList?: IQuantity[];
34
+ quantityList?: IEpcisQuantity[];
21
35
  /**
22
- * Sensor element list.
36
+ * How this event relates to the lifecycle of the EPCs named in this event.
23
37
  */
24
- sensorElementList?: ISensorElement[];
38
+ action: EpcisActionTypes;
39
+ /**
40
+ * (Optional) The business step of which this event was a part.
41
+ */
42
+ bizStep?: EpcisBizStepTypes | string;
43
+ /**
44
+ * (Optional) The business condition of the objects associated with the EPCs,
45
+ * presumed to hold true until contradicted by a subsequent event.
46
+ */
47
+ disposition?: EpcisDispositionTypes | string;
48
+ /**
49
+ * Persistent disposition.
50
+ */
51
+ persistentDisposition?: IEpcisPersistentDisposition;
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 may
58
+ * be found, until contradicted by a subsequent event.
59
+ */
60
+ bizLocation?: IEpcisLocation;
61
+ /**
62
+ * (Optional) Unordered list of business transactions that define the context of
63
+ * 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 the
73
+ * 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[];
80
+ /**
81
+ * (Optional) Instance/Lot master data that describes the objects created during
82
+ * this event.
83
+ */
84
+ ilmd?: IEpcisIlmd;
25
85
  }
@@ -0,0 +1,16 @@
1
+ import type { EpcisDispositionTypes } from "./epcisDispositionTypes.js";
2
+ /**
3
+ * EPCIS 2.0 PersistentDisposition indicating business conditions to set or unset
4
+ * independently of event disposition.
5
+ * @see https://ref.gs1.org/epcis/PersistentDisposition
6
+ */
7
+ export interface IEpcisPersistentDisposition {
8
+ /**
9
+ * (Optional) List of persistentDisposition URI values to be set.
10
+ */
11
+ set?: (EpcisDispositionTypes | string)[];
12
+ /**
13
+ * (Optional) List of persistentDisposition URI values to be unset (revoked).
14
+ */
15
+ unset?: (EpcisDispositionTypes | string)[];
16
+ }
@@ -1,13 +1,21 @@
1
1
  /**
2
- * EPCIS Quantity.
2
+ * EPCIS 2.0 QuantityElement defining class-level identifiers and amounts.
3
+ * @see https://ref.gs1.org/epcis/QuantityElement
3
4
  */
4
- export interface IQuantity {
5
+ export interface IEpcisQuantity {
5
6
  /**
6
- * EPC Class.
7
+ * A class-level identifier for the class to which the specified quantity of
8
+ * objects belongs.
7
9
  */
8
10
  epcClass: string;
9
11
  /**
10
- * Quantity.
12
+ * (Optional) A number that specifies how many or how much of the specified
13
+ * EPCClass is denoted by this QuantityElement.
11
14
  */
12
- quantity: number;
15
+ quantity?: number;
16
+ /**
17
+ * (Optional) Unit of measure by which the specified value(s) of the property
18
+ * specified by type should be interpreted.
19
+ */
20
+ uom?: string;
13
21
  }
@@ -1,5 +1,6 @@
1
1
  /**
2
- * EPCIS Query type.
2
+ * EPCIS 2.0 Query key/value parameter map used in query documents.
3
+ * @see https://ref.gs1.org/epcis/Query
3
4
  */
4
5
  export interface IEpcisQuery {
5
6
  [key: string]: string;
@@ -1,13 +1,15 @@
1
- import type { IJsonLdContextDefinition } from "@twin.org/data-json-ld";
2
- import type { IEpcisEvent } from "./IEpcisEvent.js";
1
+ import type { EpcisContextType } from "./epcisContextType.js";
2
+ import type { EpcisTypes } from "./epcisTypes.js";
3
+ import type { IEpcisQueryDocumentBody } from "./IEpcisQueryDocumentBody.js";
3
4
  /**
4
- * EPCIS Query Document.
5
+ * EPCIS 2.0 QueryDocument used to submit queries to an EPCIS repository.
6
+ * @see https://ref.gs1.org/epcis/EPCISQueryDocument
5
7
  */
6
8
  export interface IEpcisQueryDocument {
7
9
  /**
8
10
  * The @context.
9
11
  */
10
- "@context": IJsonLdContextDefinition;
12
+ "@context": EpcisContextType;
11
13
  /**
12
14
  * The JSON-LD document id.
13
15
  */
@@ -15,7 +17,7 @@ export interface IEpcisQueryDocument {
15
17
  /**
16
18
  * JSON-LD Type.
17
19
  */
18
- type: string;
20
+ type: typeof EpcisTypes.EPCISQueryDocument;
19
21
  /**
20
22
  * Schema version.
21
23
  */
@@ -27,28 +29,5 @@ export interface IEpcisQueryDocument {
27
29
  /**
28
30
  * The EPCIS Body.
29
31
  */
30
- epcisBody: {
31
- /**
32
- * The results of the query.
33
- */
34
- queryResults: {
35
- /**
36
- * The concerned subscription.
37
- */
38
- subscriptionID?: string;
39
- /**
40
- * The concerned query.
41
- */
42
- queryName: string;
43
- /**
44
- * And now the results.
45
- */
46
- resultsBody: {
47
- /**
48
- * The list of events.
49
- */
50
- eventList: IEpcisEvent[];
51
- };
52
- };
53
- };
32
+ epcisBody: IEpcisQueryDocumentBody;
54
33
  }
@@ -0,0 +1,11 @@
1
+ import type { IEpcisQueryResults } from "./IEpcisQueryResults.js";
2
+ /**
3
+ * EPCIS 2.0 QueryDocumentBody wrapper that carries query results.
4
+ * @see https://ref.gs1.org/epcis/QueryDocumentBody
5
+ */
6
+ export interface IEpcisQueryDocumentBody {
7
+ /**
8
+ * The results of the query.
9
+ */
10
+ queryResults: IEpcisQueryResults;
11
+ }
@@ -0,0 +1,19 @@
1
+ import type { IEpcisQueryResultsBody } from "./IEpcisQueryResultsBody.js";
2
+ /**
3
+ * EPCIS 2.0 QueryResults payload returned from a repository query.
4
+ * @see https://ref.gs1.org/epcis/QueryResults
5
+ */
6
+ export interface IEpcisQueryResults {
7
+ /**
8
+ * The concerned subscription.
9
+ */
10
+ subscriptionID?: string;
11
+ /**
12
+ * The concerned query.
13
+ */
14
+ queryName: string;
15
+ /**
16
+ * The query results payload.
17
+ */
18
+ resultsBody: IEpcisQueryResultsBody;
19
+ }
@@ -0,0 +1,16 @@
1
+ import type { EpcisEvents } from "./epcisEvents.js";
2
+ import type { IEpcisVocabulary } from "./IEpcisVocabulary.js";
3
+ /**
4
+ * EPCIS 2.0 QueryResultsBody containing events and optional master data.
5
+ * @see https://ref.gs1.org/epcis/QueryResultsBody
6
+ */
7
+ export interface IEpcisQueryResultsBody {
8
+ /**
9
+ * The list of events.
10
+ */
11
+ eventList: EpcisEvents[];
12
+ /**
13
+ * Optional master data.
14
+ */
15
+ vocabularyList?: IEpcisVocabulary[];
16
+ }
@@ -1,15 +1,19 @@
1
- import type { ISensorMetadata } from "./IEpcisSensorMetadata.js";
2
- import type { ISensorReport } from "./IEpcisSensorReport.js";
1
+ import type { IEpcisSensorMetadata } from "./IEpcisSensorMetadata.js";
2
+ import type { IEpcisSensorReport } from "./IEpcisSensorReport.js";
3
3
  /**
4
- * EPCIS SensorElement.
4
+ * EPCIS 2.0 SensorElement grouping metadata and one or more SensorReport
5
+ * entries.
6
+ * @see https://ref.gs1.org/epcis/SensorElement
5
7
  */
6
- export interface ISensorElement {
8
+ export interface IEpcisSensorElement {
7
9
  /**
8
- * Sensor metadata.
10
+ * (Optional) Element containing metadata attributes applicable to all
11
+ * sensorReport entries within this sensorElement.
9
12
  */
10
- sensorMetadata?: ISensorMetadata;
13
+ sensorMetadata?: IEpcisSensorMetadata;
11
14
  /**
12
- * Sensor report.
15
+ * An element containing one or several attributes that pertain to a specific
16
+ * sensor observation.
13
17
  */
14
- sensorReport: ISensorReport[];
18
+ sensorReport: IEpcisSensorReport[];
15
19
  }
@@ -1,21 +1,47 @@
1
1
  /**
2
- * EPCIS Sensor metadata.
2
+ * EPCIS 2.0 SensorMetadata describing timing, device, and processing details for
3
+ * sensor observations.
4
+ * @see https://ref.gs1.org/epcis/SensorMetadata
3
5
  */
4
- export interface ISensorMetadata {
6
+ export interface IEpcisSensorMetadata {
5
7
  /**
6
- * Time.
8
+ * (Optional) The actual point in time of an observation as transmitted by a
9
+ * sensor device.
7
10
  */
8
- time: string;
11
+ time?: string;
9
12
  /**
10
- * Device ID.
13
+ * (Optional) Device from which the sensor data originates.
11
14
  */
12
- deviceID: string;
15
+ deviceID?: string;
13
16
  /**
14
- * Device Metadata.
17
+ * (Optional) Storage location of an electronic document accommodating metadata
18
+ * of the device from which the sensor data originates.
15
19
  */
16
- deviceMetadata: string;
20
+ deviceMetadata?: string;
17
21
  /**
18
- * Raw data.
22
+ * (Optional) Storage/service location of the raw sensor data on which the
23
+ * aggregated/business-oriented data contained in the sensorElement is based.
19
24
  */
20
- rawData: string;
25
+ rawData?: string;
26
+ /**
27
+ * (Optional) The lowest (earliest) value of a given observation period as
28
+ * transmitted by a sensor device.
29
+ */
30
+ startTime?: string;
31
+ /**
32
+ * (Optional) The highest (most recent) value of a given observation period, as
33
+ * transmitted by a sensor device.
34
+ */
35
+ endTime?: string;
36
+ /**
37
+ * (Optional) Storage location of an electronic document accommodating the data
38
+ * processing method of the contained sensor data, if applicable.
39
+ */
40
+ dataProcessingMethod?: string;
41
+ /**
42
+ * (Optional) Storage location of an electronic document accommodating product- or
43
+ * application-specific business rules on which basis the EPCIS event was
44
+ * triggered.
45
+ */
46
+ bizRules?: string;
21
47
  }
@@ -1,17 +1,130 @@
1
+ import type { EpcisComponentTypes } from "./epcisComponentTypes.js";
2
+ import type { EpcisMeasurementTypes } from "./epcisMeasurementTypes.js";
3
+ import type { EpcisSensorAlertTypes } from "./epcisSensorAlertTypes.js";
1
4
  /**
2
- * EPCIS SensorReport.
5
+ * EPCIS 2.0 SensorReport containing measurement values and related sensor
6
+ * observation details.
7
+ * @see https://ref.gs1.org/epcis/SensorReport
3
8
  */
4
- export interface ISensorReport {
9
+ export interface IEpcisSensorReport {
5
10
  /**
6
- * Type.
11
+ * Identifier indicating what kind of measurement the SensorReport pertains to
12
+ * (e.g. Length, Mass, Temperature).
13
+ *
14
+ * Use {@link EpcisMeasurementTypes} for known values.
7
15
  */
8
- type: string;
16
+ type: EpcisMeasurementTypes | string;
9
17
  /**
10
- * Value.
18
+ * A sensor alert value (alarm condition or error condition); extra details may
19
+ * be provided via booleanValue or uriValue.
20
+ *
21
+ * Use {@link EpcisSensorAlertTypes} for known values.
11
22
  */
12
- value: number;
23
+ exception?: EpcisSensorAlertTypes | string;
13
24
  /**
14
- * Unit of measurement.
25
+ * (Optional) Device from which the sensor data originates.
15
26
  */
16
- uom: string;
27
+ deviceID?: string;
28
+ /**
29
+ * (Optional) Storage location of an electronic document accommodating metadata
30
+ * of the device from which the sensor data originates.
31
+ */
32
+ deviceMetadata?: string;
33
+ /**
34
+ * (Optional) Storage/service location of the raw sensor data on which the
35
+ * aggregated/business-oriented data contained in the sensorElement is based.
36
+ */
37
+ rawData?: string;
38
+ /**
39
+ * (Optional) Storage location of an electronic document accommodating the data
40
+ * processing method of the contained sensor data, if applicable.
41
+ */
42
+ dataProcessingMethod?: string;
43
+ /**
44
+ * (Optional) Storage location of an electronic document accommodating product- or
45
+ * application-specific business rules on which basis the EPCIS event was
46
+ * triggered.
47
+ */
48
+ bizRules?: string;
49
+ /**
50
+ * (Optional) The actual point in time of an observation as transmitted by a
51
+ * sensor device.
52
+ */
53
+ time?: string;
54
+ /**
55
+ * (Optional) Identifies a specific microorganism species; SHALL NOT be present
56
+ * if chemicalSubstance is included.
57
+ */
58
+ microorganism?: string;
59
+ /**
60
+ * (Optional) Identifies a specific chemical substance; SHALL NOT be present
61
+ * together with microorganism.
62
+ */
63
+ chemicalSubstance?: string;
64
+ /**
65
+ * (Optional) A URI identifying the Coordinate Reference System; if omitted,
66
+ * WGS-84 is assumed.
67
+ */
68
+ coordinateReferenceSystem?: string;
69
+ /**
70
+ * (Optional) Value of the property specified by the type; if a time field is
71
+ * present, it pertains to that time, otherwise to the eventTime.
72
+ */
73
+ value?: number;
74
+ /**
75
+ * (Optional) Vector component identifier for measurements with magnitude and
76
+ * direction (e.g. force, pressure); repeat SensorReport per component.
77
+ */
78
+ component?: EpcisComponentTypes | string;
79
+ /**
80
+ * (Optional) The String value of the property specified by the type as part of
81
+ * the sensorReport element.
82
+ */
83
+ stringValue?: string;
84
+ /**
85
+ * (Optional) Similar to stringValue, for Boolean value.
86
+ */
87
+ booleanValue?: boolean;
88
+ /**
89
+ * (Optional) Similar to stringValue, for HexBinary value.
90
+ */
91
+ hexBinaryValue?: string;
92
+ /**
93
+ * (Optional) Similar to stringValue, for a URI value.
94
+ */
95
+ uriValue?: string;
96
+ /**
97
+ * (Optional) Minimum quantitative value of the property specified by type, as
98
+ * part of the sensorReport element.
99
+ */
100
+ minValue?: number;
101
+ /**
102
+ * (Optional) Similar to minValue, for the maximum quantitative value.
103
+ */
104
+ maxValue?: number;
105
+ /**
106
+ * (Optional) The arithmetic mean of the values of the property specified by the
107
+ * type as part of the sensorReport element.
108
+ */
109
+ meanValue?: number;
110
+ /**
111
+ * (Optional) Standard deviation of the values of the property specified by type,
112
+ * as part of the sensorReport element.
113
+ */
114
+ sDev?: number;
115
+ /**
116
+ * (Optional) Percentile rank, signifying the percentage of observations in a
117
+ * frequency distribution that are equal to or lower than it.
118
+ */
119
+ percRank?: number;
120
+ /**
121
+ * (Optional) The percentile value, at or below which a given percentage of
122
+ * observations may be found.
123
+ */
124
+ percValue?: number;
125
+ /**
126
+ * (Optional) Unit of measure by which the specified value(s) of the property
127
+ * specified by type should be interpreted.
128
+ */
129
+ uom?: string;
17
130
  }
@@ -1,13 +1,19 @@
1
+ import type { EpcisSourceDestTypes } from "./epcisSourceDestTypes.js";
1
2
  /**
2
- * EPCIS Biz Transaction.
3
+ * EPCIS 2.0 Source element identifying the origin of a business transfer.
4
+ * @see https://ref.gs1.org/epcis/SourceOrDestination
3
5
  */
4
- export interface ISource {
6
+ export interface IEpcisSource {
5
7
  /**
6
- * Type.
8
+ * Identifier indicating the role of SourceOrDestination in a transfer (Owning
9
+ * Party, Possessing Party, or Location).
10
+ *
11
+ * Use {@link EpcisSourceDestTypes} for known values.
7
12
  */
8
- type: string;
13
+ type: EpcisSourceDestTypes | string;
9
14
  /**
10
- * The source.
15
+ * Identifier that denotes the specific source or destination of a business
16
+ * transfer; must correlate with the selected type.
11
17
  */
12
18
  source: string;
13
19
  }
@@ -0,0 +1,78 @@
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";
12
+ /**
13
+ * EPCIS 2.0 TransactionEvent relating objects or quantities to one or more
14
+ * business transactions, optionally with a parent identifier.
15
+ * @see https://ref.gs1.org/epcis/TransactionEvent
16
+ */
17
+ export interface IEpcisTransactionEvent extends IEpcisEvent {
18
+ /**
19
+ * Fixed to TransactionEvent.
20
+ */
21
+ type: typeof EpcisTypes.TransactionEvent;
22
+ /**
23
+ * Business transaction list (required by schema).
24
+ */
25
+ bizTransactionList: IEpcisBizTransaction[];
26
+ /**
27
+ * (Optional when action is OBSERVE, required otherwise) Identifier of the parent
28
+ * of the aggregation or association; use the pure identity URI when the parent is
29
+ * an EPC.
30
+ */
31
+ parentID?: string;
32
+ /**
33
+ * (Optional) An unordered list of one or more EPCs naming specific objects to
34
+ * which the event pertained.
35
+ */
36
+ epcList?: string[];
37
+ /**
38
+ * An unordered list of one or more QuantityElements identifying (at the class
39
+ * level) contained objects.
40
+ */
41
+ quantityList?: IEpcisQuantity[];
42
+ /**
43
+ * How this event relates to the lifecycle of the EPCs named in this event.
44
+ */
45
+ action: EpcisActionTypes;
46
+ /**
47
+ * (Optional) The business step of which this event was a part.
48
+ */
49
+ bizStep?: EpcisBizStepTypes | string;
50
+ /**
51
+ * (Optional) The business condition of the objects associated with the EPCs,
52
+ * presumed to hold true until contradicted by a subsequent event.
53
+ */
54
+ disposition?: EpcisDispositionTypes | string;
55
+ /**
56
+ * (Optional) The read point at which the event took place.
57
+ */
58
+ readPoint?: IEpcisLocation;
59
+ /**
60
+ * (Optional) The business location where the objects associated with the EPCs
61
+ * may be found, until contradicted by a subsequent event.
62
+ */
63
+ bizLocation?: IEpcisLocation;
64
+ /**
65
+ * (Optional) Unordered list of Source elements that provide context about the
66
+ * originating endpoint of a business transfer of which this event is a part.
67
+ */
68
+ sourceList?: IEpcisSource[];
69
+ /**
70
+ * (Optional) Unordered list of Destination elements that provide context about the
71
+ * terminating endpoint of a business transfer of which this event is a part.
72
+ */
73
+ destinationList?: IEpcisDestination[];
74
+ /**
75
+ * (Optional) Connects event to one or more SensorElements.
76
+ */
77
+ sensorElementList?: IEpcisSensorElement[];
78
+ }