@twin.org/standards-gs1 0.0.3-next.54 → 0.0.3-next.55

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 (67) hide show
  1. package/dist/es/dataTypes/epcisDataTypes.js +5 -0
  2. package/dist/es/dataTypes/epcisDataTypes.js.map +1 -1
  3. package/dist/es/models/epcis20/IEpcisEvent.js.map +1 -1
  4. package/dist/es/models/epcis20/epcisContextType.js.map +1 -1
  5. package/dist/es/schemas/EpcisAggregationEvent.json +17 -99
  6. package/dist/es/schemas/EpcisAssociationEvent.json +17 -99
  7. package/dist/es/schemas/EpcisContextType.json +30 -0
  8. package/dist/es/schemas/EpcisDocument.json +3 -49
  9. package/dist/es/schemas/EpcisObjectEvent.json +17 -99
  10. package/dist/es/schemas/EpcisQueryDocument.json +3 -49
  11. package/dist/es/schemas/EpcisTransactionEvent.json +16 -98
  12. package/dist/es/schemas/EpcisTransformationEvent.json +18 -100
  13. package/dist/types/models/epcis20/IEpcisEvent.d.ts +2 -1
  14. package/dist/types/models/epcis20/epcisContextType.d.ts +2 -9
  15. package/docs/changelog.md +7 -0
  16. package/docs/reference/classes/EpcisDataTypes.md +2 -2
  17. package/docs/reference/classes/Gs1DataTypes.md +1 -1
  18. package/docs/reference/classes/Gs1Identifiers.md +1 -1
  19. package/docs/reference/classes/Gs1IdentifiersValidation.md +7 -7
  20. package/docs/reference/classes/Gs1Is.md +2 -2
  21. package/docs/reference/classes/Gs1Location.md +15 -15
  22. package/docs/reference/classes/Gs1Validation.md +1 -1
  23. package/docs/reference/interfaces/IEPCClassUri.md +3 -3
  24. package/docs/reference/interfaces/IEpcisAggregationEvent.md +21 -21
  25. package/docs/reference/interfaces/IEpcisAssociationEvent.md +21 -21
  26. package/docs/reference/interfaces/IEpcisAttribute.md +2 -2
  27. package/docs/reference/interfaces/IEpcisBizTransaction.md +2 -2
  28. package/docs/reference/interfaces/IEpcisDestination.md +2 -2
  29. package/docs/reference/interfaces/IEpcisDocument.md +10 -10
  30. package/docs/reference/interfaces/IEpcisErrorDeclaration.md +3 -3
  31. package/docs/reference/interfaces/IEpcisEvent.md +9 -9
  32. package/docs/reference/interfaces/IEpcisHeader.md +1 -1
  33. package/docs/reference/interfaces/IEpcisLocation.md +1 -1
  34. package/docs/reference/interfaces/IEpcisObjectEvent.md +22 -22
  35. package/docs/reference/interfaces/IEpcisPersistentDisposition.md +2 -2
  36. package/docs/reference/interfaces/IEpcisQuantity.md +3 -3
  37. package/docs/reference/interfaces/IEpcisQueryDocument.md +6 -6
  38. package/docs/reference/interfaces/IEpcisQueryDocumentBody.md +1 -1
  39. package/docs/reference/interfaces/IEpcisQueryResults.md +3 -3
  40. package/docs/reference/interfaces/IEpcisQueryResultsBody.md +2 -2
  41. package/docs/reference/interfaces/IEpcisSensorElement.md +2 -2
  42. package/docs/reference/interfaces/IEpcisSensorMetadata.md +8 -8
  43. package/docs/reference/interfaces/IEpcisSensorReport.md +24 -24
  44. package/docs/reference/interfaces/IEpcisSource.md +2 -2
  45. package/docs/reference/interfaces/IEpcisTransactionEvent.md +21 -21
  46. package/docs/reference/interfaces/IEpcisTransformationEvent.md +24 -24
  47. package/docs/reference/interfaces/IEpcisVocabulary.md +2 -2
  48. package/docs/reference/interfaces/IEpcisVocabularyElement.md +3 -3
  49. package/docs/reference/type-aliases/EpcisContextType.md +1 -1
  50. package/docs/reference/variables/EpcisActionTypes.md +3 -3
  51. package/docs/reference/variables/EpcisBizStepTypes.md +41 -41
  52. package/docs/reference/variables/EpcisBizTransactionTypes.md +13 -13
  53. package/docs/reference/variables/EpcisComponentTypes.md +14 -14
  54. package/docs/reference/variables/EpcisContexts.md +4 -4
  55. package/docs/reference/variables/EpcisDispositionTypes.md +33 -33
  56. package/docs/reference/variables/EpcisErrorReasonTypes.md +2 -2
  57. package/docs/reference/variables/EpcisEventTypes.md +5 -5
  58. package/docs/reference/variables/EpcisMeasurementTypes.md +72 -72
  59. package/docs/reference/variables/EpcisSensorAlertTypes.md +2 -2
  60. package/docs/reference/variables/EpcisSourceDestTypes.md +3 -3
  61. package/docs/reference/variables/GS1Contexts.md +2 -2
  62. package/docs/reference/variables/Gs1IdTypes.md +20 -20
  63. package/docs/reference/variables/Gs1IdentifierTypes.md +4 -4
  64. package/docs/reference/variables/Gs1SubSiteAttributes.md +33 -33
  65. package/docs/reference/variables/Gs1SubSiteTypes.md +16 -16
  66. package/docs/reference/variables/Gs1Types.md +1 -1
  67. package/package.json +1 -1
@@ -6,6 +6,7 @@ import { EpcisContexts } from "../models/epcis20/epcisContexts.js";
6
6
  import { EpcisTypes } from "../models/epcis20/epcisTypes.js";
7
7
  import AggregationEventSchema from "../schemas/EpcisAggregationEvent.json" with { type: "json" };
8
8
  import AssociationEventSchema from "../schemas/EpcisAssociationEvent.json" with { type: "json" };
9
+ import ContextTypeSchema from "../schemas/EpcisContextType.json" with { type: "json" };
9
10
  import DocumentSchema from "../schemas/EpcisDocument.json" with { type: "json" };
10
11
  import ObjectEventSchema from "../schemas/EpcisObjectEvent.json" with { type: "json" };
11
12
  import QueryDocumentSchema from "../schemas/EpcisQueryDocument.json" with { type: "json" };
@@ -55,6 +56,10 @@ export class EpcisDataTypes {
55
56
  {
56
57
  type: EpcisTypes.TransformationEvent,
57
58
  schema: TransformationEventSchema
59
+ },
60
+ {
61
+ type: "ContextType",
62
+ schema: ContextTypeSchema
58
63
  }
59
64
  ];
60
65
  DataTypeHelper.registerTypes(EpcisContexts.Namespace, EpcisContexts.JsonLdContext, types);
@@ -1 +1 @@
1
- {"version":3,"file":"epcisDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/epcisDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAA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YACD;gBACC,IAAI,EAAE,UAAU,CAAC,gBAAgB;gBACjC,MAAM,EAAE,sBAAsB;aAC9B;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,WAAW;gBAC5B,MAAM,EAAE,iBAAiB;aACzB;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,gBAAgB;gBACjC,MAAM,EAAE,sBAAsB;aAC9B;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,mBAAmB;gBACpC,MAAM,EAAE,yBAAyB;aACjC;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAC1F,cAAc,CAAC,aAAa,CAC3B,aAAa,CAAC,mBAAmB,EACjC,aAAa,CAAC,aAAa,EAC3B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAC9D,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { EpcisContexts } from \"../models/epcis20/epcisContexts.js\";\nimport { EpcisTypes } from \"../models/epcis20/epcisTypes.js\";\nimport AggregationEventSchema from \"../schemas/EpcisAggregationEvent.json\" with { type: \"json\" };\nimport AssociationEventSchema from \"../schemas/EpcisAssociationEvent.json\" with { type: \"json\" };\nimport DocumentSchema from \"../schemas/EpcisDocument.json\" with { type: \"json\" };\nimport ObjectEventSchema from \"../schemas/EpcisObjectEvent.json\" with { type: \"json\" };\nimport QueryDocumentSchema from \"../schemas/EpcisQueryDocument.json\" with { type: \"json\" };\nimport TransactionEventSchema from \"../schemas/EpcisTransactionEvent.json\" with { type: \"json\" };\nimport TransformationEventSchema from \"../schemas/EpcisTransformationEvent.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for EPCIS.\n */\nexport class EpcisDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(/https?:\\/\\/ref.gs1.org\\/epcis\\/?/, EpcisContexts.JsonLdContext);\n\t\tconst escapedContext = EpcisContexts.Context.replace(/[$()*+.?[\\\\\\]^{|}]/g, \"\\\\$&\");\n\t\tJsonLdProcessor.addRedirect(new RegExp(`^${escapedContext}$`), EpcisContexts.JsonLdContext);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.EPCISDocument,\n\t\t\t\tschema: DocumentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.EPCISQueryDocument,\n\t\t\t\tschema: QueryDocumentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.AggregationEvent,\n\t\t\t\tschema: AggregationEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.AssociationEvent,\n\t\t\t\tschema: AssociationEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.ObjectEvent,\n\t\t\t\tschema: ObjectEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.TransactionEvent,\n\t\t\t\tschema: TransactionEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.TransformationEvent,\n\t\t\t\tschema: TransformationEventSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(EpcisContexts.Namespace, EpcisContexts.JsonLdContext, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tEpcisContexts.JsonSchemaNamespace,\n\t\t\tEpcisContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: `Epcis${t.type}`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.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { EpcisContexts } from \"../models/epcis20/epcisContexts.js\";\nimport { EpcisTypes } from \"../models/epcis20/epcisTypes.js\";\nimport AggregationEventSchema from \"../schemas/EpcisAggregationEvent.json\" with { type: \"json\" };\nimport AssociationEventSchema from \"../schemas/EpcisAssociationEvent.json\" with { type: \"json\" };\nimport ContextTypeSchema from \"../schemas/EpcisContextType.json\" with { type: \"json\" };\nimport DocumentSchema from \"../schemas/EpcisDocument.json\" with { type: \"json\" };\nimport ObjectEventSchema from \"../schemas/EpcisObjectEvent.json\" with { type: \"json\" };\nimport QueryDocumentSchema from \"../schemas/EpcisQueryDocument.json\" with { type: \"json\" };\nimport TransactionEventSchema from \"../schemas/EpcisTransactionEvent.json\" with { type: \"json\" };\nimport TransformationEventSchema from \"../schemas/EpcisTransformationEvent.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for EPCIS.\n */\nexport class EpcisDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(/https?:\\/\\/ref.gs1.org\\/epcis\\/?/, EpcisContexts.JsonLdContext);\n\t\tconst escapedContext = EpcisContexts.Context.replace(/[$()*+.?[\\\\\\]^{|}]/g, \"\\\\$&\");\n\t\tJsonLdProcessor.addRedirect(new RegExp(`^${escapedContext}$`), EpcisContexts.JsonLdContext);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.EPCISDocument,\n\t\t\t\tschema: DocumentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.EPCISQueryDocument,\n\t\t\t\tschema: QueryDocumentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.AggregationEvent,\n\t\t\t\tschema: AggregationEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.AssociationEvent,\n\t\t\t\tschema: AssociationEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.ObjectEvent,\n\t\t\t\tschema: ObjectEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.TransactionEvent,\n\t\t\t\tschema: TransactionEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: EpcisTypes.TransformationEvent,\n\t\t\t\tschema: TransformationEventSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"ContextType\",\n\t\t\t\tschema: ContextTypeSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(EpcisContexts.Namespace, EpcisContexts.JsonLdContext, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tEpcisContexts.JsonSchemaNamespace,\n\t\t\tEpcisContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: `Epcis${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IEpcisEvent.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IEpcisEvent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { EpcisContextType } from \"./epcisContextType.js\";\nimport type { IEpcisErrorDeclaration } from \"./IEpcisErrorDeclaration.js\";\n\n/**\n * Base EPCIS 2.0 Event carrying shared fields across all event types.\n * @see https://ref.gs1.org/epcis/Event\n */\nexport interface IEpcisEvent {\n\t/**\n\t * JSON-LD @context.\n\t */\n\t\"@context\": EpcisContextType;\n\n\t/**\n\t * Type of Event.\n\t */\n\ttype: string;\n\n\t/**\n\t * URI identifier of a specific EPCIS event (alias of id in JSON or XML).\n\t */\n\teventID?: string;\n\n\t/**\n\t * (Optional) CertificationDetails relevant for Objects, Places and/or\n\t * Organizations mentioned in this Event.\n\t */\n\tcertificationInfo?: string | string[];\n\n\t/**\n\t * Error declaration.\n\t */\n\terrorDeclaration?: IEpcisErrorDeclaration;\n\n\t/**\n\t * The date and time at which the EPCIS Capturing Applications asserts the event\n\t * occurred.\n\t */\n\teventTime: string;\n\n\t/**\n\t * The time zone offset in effect at the time and place the event occurred,\n\t * expressed as an offset from UTC.\n\t */\n\teventTimeZoneOffset: string;\n\n\t/**\n\t * (Optional) The date and time at which this event was recorded by an EPCIS\n\t * Repository; ignored at capture and present on query results.\n\t */\n\trecordTime?: string;\n}\n"]}
1
+ {"version":3,"file":"IEpcisEvent.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IEpcisEvent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { EpcisContextType } from \"./epcisContextType.js\";\nimport type { IEpcisErrorDeclaration } from \"./IEpcisErrorDeclaration.js\";\n\n/**\n * Base EPCIS 2.0 Event carrying shared fields across all event types.\n * @see https://ref.gs1.org/epcis/Event\n */\nexport interface IEpcisEvent {\n\t/**\n\t * JSON-LD @context.\n\t */\n\t\"@context\": EpcisContextType;\n\n\t/**\n\t * Type of Event.\n\t */\n\ttype: string;\n\n\t/**\n\t * URI identifier of a specific EPCIS event (alias of id in JSON or XML).\n\t */\n\teventID?: string;\n\n\t/**\n\t * (Optional) CertificationDetails relevant for Objects, Places and/or\n\t * Organizations mentioned in this Event.\n\t */\n\tcertificationInfo?: ObjectOrArray<string>;\n\n\t/**\n\t * Error declaration.\n\t */\n\terrorDeclaration?: IEpcisErrorDeclaration;\n\n\t/**\n\t * The date and time at which the EPCIS Capturing Applications asserts the event\n\t * occurred.\n\t */\n\teventTime: string;\n\n\t/**\n\t * The time zone offset in effect at the time and place the event occurred,\n\t * expressed as an offset from UTC.\n\t */\n\teventTimeZoneOffset: string;\n\n\t/**\n\t * (Optional) The date and time at which this event was recorded by an EPCIS\n\t * Repository; ignored at capture and present on query results.\n\t */\n\trecordTime?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"epcisContextType.js","sourceRoot":"","sources":["../../../../src/models/epcis20/epcisContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { EpcisContexts } from \"./epcisContexts.js\";\n\n/**\n * Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1\n * context root and optionally augmented with custom entries.\n */\nexport type EpcisContextType =\n\t| typeof EpcisContexts.Context\n\t| [typeof EpcisContexts.Context]\n\t| [\n\t\t\t...IJsonLdContextDefinitionElement[],\n\t\t\ttypeof EpcisContexts.Context,\n\t\t\tIJsonLdContextDefinitionElement\n\t ]\n\t| [\n\t\t\tIJsonLdContextDefinitionElement,\n\t\t\ttypeof EpcisContexts.Context,\n\t\t\t...IJsonLdContextDefinitionElement[]\n\t ];\n"]}
1
+ {"version":3,"file":"epcisContextType.js","sourceRoot":"","sources":["../../../../src/models/epcis20/epcisContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { EpcisContexts } from \"./epcisContexts.js\";\n\n/**\n * Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1\n * context root and optionally augmented with custom entries.\n */\nexport type EpcisContextType =\n\t| typeof EpcisContexts.Context\n\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof EpcisContexts.Context>;\n"]}
@@ -1,115 +1,31 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/gs1-epcis/EpcisAggregationEvent",
4
- "description": "EPCIS 2.0 AggregationEvent describing how child objects are associated with or disassociated from a parent object.",
4
+ "title": "EpcisAggregationEvent",
5
+ "description": "EPCIS 2.0 AggregationEvent describing how child objects are associated with or\ndisassociated from a parent object.",
5
6
  "type": "object",
6
7
  "properties": {
7
- "@context": {
8
- "description": "Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1 context root and optionally augmented with custom entries.",
9
- "anyOf": [
10
- {
11
- "type": "string",
12
- "const": "https://ref.gs1.org/epcis"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://ref.gs1.org/epcis"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 2,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://ref.gs1.org/epcis"
30
- },
31
- {
32
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
- }
34
- ],
35
- "items": {
36
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
- }
38
- },
39
- {
40
- "type": "array",
41
- "minItems": 2,
42
- "prefixItems": [
43
- {
44
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
- },
46
- {
47
- "type": "string",
48
- "const": "https://ref.gs1.org/epcis"
49
- }
50
- ],
51
- "items": {
52
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
- }
54
- }
55
- ]
56
- },
57
8
  "type": {
58
- "type": "string",
59
9
  "const": "AggregationEvent",
60
10
  "description": "The type."
61
11
  },
62
- "eventID": {
63
- "type": "string",
64
- "description": "URI identifier of a specific EPCIS event (alias of id in JSON or XML)."
65
- },
66
- "certificationInfo": {
67
- "anyOf": [
68
- {
69
- "type": "string"
70
- },
71
- {
72
- "type": "array",
73
- "items": {
74
- "type": "string"
75
- }
76
- }
77
- ],
78
- "description": "(Optional) CertificationDetails relevant for Objects, Places and/or Organizations mentioned in this Event."
79
- },
80
- "errorDeclaration": {
81
- "$ref": "https://schema.twindev.org/gs1-epcis/EpcisErrorDeclaration",
82
- "description": "Error declaration."
83
- },
84
- "eventTime": {
85
- "type": "string",
86
- "description": "The date and time at which the EPCIS Capturing Applications asserts the event occurred."
87
- },
88
- "eventTimeZoneOffset": {
89
- "type": "string",
90
- "description": "The time zone offset in effect at the time and place the event occurred, expressed as an offset from UTC."
91
- },
92
- "recordTime": {
93
- "type": "string",
94
- "description": "(Optional) The date and time at which this event was recorded by an EPCIS Repository; ignored at capture and present on query results."
95
- },
96
12
  "parentID": {
97
13
  "type": "string",
98
- "description": "(Optional when action is OBSERVE, required otherwise) Identifier of the parent of the aggregation or association; use the pure identity URI when the parent is an EPC."
14
+ "description": "(Optional when action is OBSERVE, required otherwise) Identifier of the parent\nof the aggregation or association; use the pure identity URI when the parent is\nan EPC."
99
15
  },
100
16
  "childEPCs": {
101
17
  "type": "array",
102
18
  "items": {
103
19
  "type": "string"
104
20
  },
105
- "description": "(Optional) Unordered list of contained objects identified at the instance level; AggregationEvents normally include childEPCs or childQuantityList unless action is DELETE."
21
+ "description": "(Optional) Unordered list of contained objects identified at the instance\nlevel; AggregationEvents normally include childEPCs or childQuantityList unless\naction is DELETE."
106
22
  },
107
23
  "childQuantityList": {
108
24
  "type": "array",
109
25
  "items": {
110
26
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisQuantity"
111
27
  },
112
- "description": "Unordered list of one or more QuantityElements identifying contained objects at the class level; may be empty only with action DELETE when disaggregating all children."
28
+ "description": "Unordered list of one or more QuantityElements identifying contained objects\nat the class level; may be empty only with action DELETE when disaggregating\nall children."
113
29
  },
114
30
  "action": {
115
31
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisActionTypes",
@@ -135,7 +51,7 @@
135
51
  "type": "string"
136
52
  }
137
53
  ],
138
- "description": "(Optional) The business condition of the objects associated with the EPCs, presumed to hold true until contradicted by a subsequent event."
54
+ "description": "(Optional) The business condition of the objects associated with the EPCs,\npresumed to hold true until contradicted by a subsequent event."
139
55
  },
140
56
  "readPoint": {
141
57
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
@@ -143,28 +59,28 @@
143
59
  },
144
60
  "bizLocation": {
145
61
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
146
- "description": "(Optional) The business location where the objects associated with the EPCs may be found, until contradicted by a subsequent event."
62
+ "description": "(Optional) The business location where the objects associated with the EPCs\nmay be found, until contradicted by a subsequent event."
147
63
  },
148
64
  "bizTransactionList": {
149
65
  "type": "array",
150
66
  "items": {
151
67
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisBizTransaction"
152
68
  },
153
- "description": "(Optional) An unordered list of business transactions that define the context of this event."
69
+ "description": "(Optional) An unordered list of business transactions that define the context\nof this event."
154
70
  },
155
71
  "sourceList": {
156
72
  "type": "array",
157
73
  "items": {
158
74
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisSource"
159
75
  },
160
- "description": "(Optional) Unordered list of Source elements that provide context about the originating endpoint of a business transfer of which this event is a part."
76
+ "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."
161
77
  },
162
78
  "destinationList": {
163
79
  "type": "array",
164
80
  "items": {
165
81
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisDestination"
166
82
  },
167
- "description": "(Optional) Unordered list of Destination elements that provide context about the terminating endpoint of a business transfer of which this event is a part."
83
+ "description": "(Optional) Unordered list of Destination elements that provide context about the\nterminating endpoint of a business transfer of which this event is a part."
168
84
  },
169
85
  "sensorElementList": {
170
86
  "type": "array",
@@ -175,10 +91,12 @@
175
91
  }
176
92
  },
177
93
  "required": [
178
- "@context",
179
- "action",
180
- "eventTime",
181
- "eventTimeZoneOffset",
182
- "type"
94
+ "type",
95
+ "action"
96
+ ],
97
+ "allOf": [
98
+ {
99
+ "$ref": "https://schema.twindev.org/gs1-epcis/EpcisEvent"
100
+ }
183
101
  ]
184
102
  }
@@ -1,115 +1,31 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/gs1-epcis/EpcisAssociationEvent",
4
- "description": "EPCIS 2.0 AssociationEvent describing membership relationships between parent and child objects without implying physical containment.",
4
+ "title": "EpcisAssociationEvent",
5
+ "description": "EPCIS 2.0 AssociationEvent describing membership relationships between parent\nand child objects without implying physical containment.",
5
6
  "type": "object",
6
7
  "properties": {
7
- "@context": {
8
- "description": "Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1 context root and optionally augmented with custom entries.",
9
- "anyOf": [
10
- {
11
- "type": "string",
12
- "const": "https://ref.gs1.org/epcis"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://ref.gs1.org/epcis"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 2,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://ref.gs1.org/epcis"
30
- },
31
- {
32
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
- }
34
- ],
35
- "items": {
36
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
- }
38
- },
39
- {
40
- "type": "array",
41
- "minItems": 2,
42
- "prefixItems": [
43
- {
44
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
- },
46
- {
47
- "type": "string",
48
- "const": "https://ref.gs1.org/epcis"
49
- }
50
- ],
51
- "items": {
52
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
- }
54
- }
55
- ]
56
- },
57
8
  "type": {
58
- "type": "string",
59
9
  "const": "AssociationEvent",
60
10
  "description": "Type."
61
11
  },
62
- "eventID": {
63
- "type": "string",
64
- "description": "URI identifier of a specific EPCIS event (alias of id in JSON or XML)."
65
- },
66
- "certificationInfo": {
67
- "anyOf": [
68
- {
69
- "type": "string"
70
- },
71
- {
72
- "type": "array",
73
- "items": {
74
- "type": "string"
75
- }
76
- }
77
- ],
78
- "description": "(Optional) CertificationDetails relevant for Objects, Places and/or Organizations mentioned in this Event."
79
- },
80
- "errorDeclaration": {
81
- "$ref": "https://schema.twindev.org/gs1-epcis/EpcisErrorDeclaration",
82
- "description": "Error declaration."
83
- },
84
- "eventTime": {
85
- "type": "string",
86
- "description": "The date and time at which the EPCIS Capturing Applications asserts the event occurred."
87
- },
88
- "eventTimeZoneOffset": {
89
- "type": "string",
90
- "description": "The time zone offset in effect at the time and place the event occurred, expressed as an offset from UTC."
91
- },
92
- "recordTime": {
93
- "type": "string",
94
- "description": "(Optional) The date and time at which this event was recorded by an EPCIS Repository; ignored at capture and present on query results."
95
- },
96
12
  "parentID": {
97
13
  "type": "string",
98
- "description": "Identifier of the parent of the aggregation or association; use the pure identity URI when the parent is an EPC."
14
+ "description": "Identifier of the parent of the aggregation or association; use the pure\nidentity URI when the parent is an EPC."
99
15
  },
100
16
  "childEPCs": {
101
17
  "type": "array",
102
18
  "items": {
103
19
  "type": "string"
104
20
  },
105
- "description": "(Optional) Unordered list of contained objects identified at the instance level; AssociationEvents normally include childEPCs or childQuantityList unless action is DELETE."
21
+ "description": "(Optional) Unordered list of contained objects identified at the instance\nlevel; AssociationEvents normally include childEPCs or childQuantityList\nunless action is DELETE."
106
22
  },
107
23
  "childQuantityList": {
108
24
  "type": "array",
109
25
  "items": {
110
26
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisQuantity"
111
27
  },
112
- "description": "Unordered list of one or more QuantityElements identifying contained objects at the class level; may be empty only with action DELETE when disassociating all children."
28
+ "description": "Unordered list of one or more QuantityElements identifying contained objects\nat the class level; may be empty only with action DELETE when disassociating\nall children."
113
29
  },
114
30
  "action": {
115
31
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisActionTypes",
@@ -135,7 +51,7 @@
135
51
  "type": "string"
136
52
  }
137
53
  ],
138
- "description": "(Optional) The business condition of the objects associated with the EPCs, presumed to hold true until contradicted by a subsequent event."
54
+ "description": "(Optional) The business condition of the objects associated with the EPCs,\npresumed to hold true until contradicted by a subsequent event."
139
55
  },
140
56
  "readPoint": {
141
57
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
@@ -143,28 +59,28 @@
143
59
  },
144
60
  "bizLocation": {
145
61
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
146
- "description": "(Optional) The business location where the objects associated with the EPCs may be found, until contradicted by a subsequent event."
62
+ "description": "(Optional) The business location where the objects associated with the EPCs\nmay be found, until contradicted by a subsequent event."
147
63
  },
148
64
  "bizTransactionList": {
149
65
  "type": "array",
150
66
  "items": {
151
67
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisBizTransaction"
152
68
  },
153
- "description": "(Optional) An unordered list of business transactions that define the context of this event."
69
+ "description": "(Optional) An unordered list of business transactions that define the context\nof this event."
154
70
  },
155
71
  "sourceList": {
156
72
  "type": "array",
157
73
  "items": {
158
74
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisSource"
159
75
  },
160
- "description": "(Optional) Unordered list of Source elements that provide context about the originating endpoint of a business transfer of which this event is a part."
76
+ "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."
161
77
  },
162
78
  "destinationList": {
163
79
  "type": "array",
164
80
  "items": {
165
81
  "$ref": "https://schema.twindev.org/gs1-epcis/EpcisDestination"
166
82
  },
167
- "description": "(Optional) Unordered list of Destination elements that provide context about the terminating endpoint of a business transfer of which this event is a part."
83
+ "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."
168
84
  },
169
85
  "sensorElementList": {
170
86
  "type": "array",
@@ -175,11 +91,13 @@
175
91
  }
176
92
  },
177
93
  "required": [
178
- "@context",
179
- "action",
180
- "eventTime",
181
- "eventTimeZoneOffset",
94
+ "type",
182
95
  "parentID",
183
- "type"
96
+ "action"
97
+ ],
98
+ "allOf": [
99
+ {
100
+ "$ref": "https://schema.twindev.org/gs1-epcis/EpcisEvent"
101
+ }
184
102
  ]
185
103
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/gs1-epcis/EpcisContextType",
4
+ "title": "EpcisContextType",
5
+ "description": "Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1\ncontext root and optionally augmented with custom entries.",
6
+ "anyOf": [
7
+ {
8
+ "const": "https://ref.gs1.org/epcis"
9
+ },
10
+ {
11
+ "type": "array",
12
+ "items": {
13
+ "anyOf": [
14
+ {
15
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
16
+ },
17
+ {
18
+ "const": "https://ref.gs1.org/epcis"
19
+ }
20
+ ]
21
+ },
22
+ "contains": {
23
+ "const": "https://ref.gs1.org/epcis"
24
+ },
25
+ "minContains": 1,
26
+ "maxContains": 1,
27
+ "minItems": 1
28
+ }
29
+ ]
30
+ }
@@ -1,65 +1,19 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/gs1-epcis/EpcisDocument",
4
+ "title": "EpcisDocument",
4
5
  "description": "EPCIS 2.0 capture document containing header metadata and an event list.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
- "description": "Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1 context root and optionally augmented with custom entries.",
9
- "anyOf": [
10
- {
11
- "type": "string",
12
- "const": "https://ref.gs1.org/epcis"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://ref.gs1.org/epcis"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 2,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://ref.gs1.org/epcis"
30
- },
31
- {
32
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
- }
34
- ],
35
- "items": {
36
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
- }
38
- },
39
- {
40
- "type": "array",
41
- "minItems": 2,
42
- "prefixItems": [
43
- {
44
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
- },
46
- {
47
- "type": "string",
48
- "const": "https://ref.gs1.org/epcis"
49
- }
50
- ],
51
- "items": {
52
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
- }
54
- }
55
- ]
9
+ "$ref": "https://schema.twindev.org/gs1-epcis/EpcisContextType",
10
+ "description": "The"
56
11
  },
57
12
  "id": {
58
13
  "type": "string",
59
14
  "description": "The JSON-LD document id."
60
15
  },
61
16
  "type": {
62
- "type": "string",
63
17
  "const": "EPCISDocument",
64
18
  "description": "JSON-LD Type."
65
19
  },