@twin.org/standards-gs1 0.0.3-next.16 → 0.0.3-next.18
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/dist/es/dataTypes/epcisDataTypes.js +3 -1
- package/dist/es/dataTypes/epcisDataTypes.js.map +1 -1
- package/dist/es/models/epcis20/epcisContextType.js.map +1 -1
- package/dist/es/models/epcis20/epcisContexts.js +7 -1
- package/dist/es/models/epcis20/epcisContexts.js.map +1 -1
- 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 +4 -4
- package/dist/es/schemas/EpcisAssociationEvent.json +4 -4
- package/dist/es/schemas/EpcisDocument.json +4 -4
- package/dist/es/schemas/EpcisObjectEvent.json +4 -4
- package/dist/es/schemas/EpcisQueryDocument.json +4 -4
- package/dist/es/schemas/EpcisTransactionEvent.json +4 -4
- package/dist/es/schemas/EpcisTransformationEvent.json +4 -4
- package/dist/types/models/epcis20/epcisContextType.d.ts +3 -3
- package/dist/types/models/epcis20/epcisContexts.d.ts +7 -1
- package/dist/types/models/gs1/gs1Contexts.d.ts +7 -1
- package/docs/changelog.md +14 -0
- package/docs/reference/type-aliases/EpcisContextType.md +1 -1
- package/docs/reference/variables/EpcisContexts.md +9 -1
- package/docs/reference/variables/GS1Contexts.md +9 -1
- package/package.json +1 -1
|
@@ -20,6 +20,8 @@ export class EpcisDataTypes {
|
|
|
20
20
|
*/
|
|
21
21
|
static registerRedirects() {
|
|
22
22
|
JsonLdProcessor.addRedirect(/https?:\/\/ref.gs1.org\/epcis\/?/, EpcisContexts.JsonLdContext);
|
|
23
|
+
const escapedContext = EpcisContexts.Context.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
|
|
24
|
+
JsonLdProcessor.addRedirect(new RegExp(`^${escapedContext}$`), EpcisContexts.JsonLdContext);
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* Register all the data types.
|
|
@@ -55,7 +57,7 @@ export class EpcisDataTypes {
|
|
|
55
57
|
schema: TransformationEventSchema
|
|
56
58
|
}
|
|
57
59
|
];
|
|
58
|
-
DataTypeHelper.registerTypes(EpcisContexts.Namespace, EpcisContexts.
|
|
60
|
+
DataTypeHelper.registerTypes(EpcisContexts.Namespace, EpcisContexts.Context, types);
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
//# sourceMappingURL=epcisDataTypes.js.map
|
|
@@ -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,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,sBAAsB,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjG,OAAO,sBAAsB,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjG,OAAO,cAAc,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjF,OAAO,iBAAiB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACvF,OAAO,mBAAmB,MAAM,oCAAoC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3F,OAAO,sBAAsB,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjG,OAAO,yBAAyB,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,OAAO,cAAc;IAC1B;;OAEG;IACI,MAAM,CAAC,iBAAiB;QAC9B,eAAe,CAAC,WAAW,CAAC,kCAAkC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;
|
|
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,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,sBAAsB,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjG,OAAO,sBAAsB,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjG,OAAO,cAAc,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjF,OAAO,iBAAiB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACvF,OAAO,mBAAmB,MAAM,oCAAoC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3F,OAAO,sBAAsB,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjG,OAAO,yBAAyB,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,OAAO,cAAc;IAC1B;;OAEG;IACI,MAAM,CAAC,iBAAiB;QAC9B,eAAe,CAAC,WAAW,CAAC,kCAAkC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;QAC7F,MAAM,cAAc,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;QACpF,eAAe,CAAC,WAAW,CAAC,IAAI,MAAM,CAAC,IAAI,cAAc,GAAG,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,UAAU,CAAC,aAAa;gBAC9B,MAAM,EAAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,kBAAkB;gBACnC,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,gBAAgB;gBACjC,MAAM,EAAE,sBAAsB;aAC9B;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,OAAO,EAAE,KAAK,CAAC,CAAC;IACrF,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.Context, types);\n\t}\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.
|
|
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"]}
|
|
@@ -6,9 +6,15 @@
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
7
|
export const EpcisContexts = {
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The canonical RDF namespace URI.
|
|
10
10
|
*/
|
|
11
11
|
Namespace: "https://ref.gs1.org/epcis/",
|
|
12
|
+
/**
|
|
13
|
+
* The value to use in JSON-LD context.
|
|
14
|
+
* Note: Context differs from Namespace (no trailing slash) as per GS1 EPCIS standard specification.
|
|
15
|
+
* The EPCIS JSON-LD context URL format does not include a trailing slash.
|
|
16
|
+
*/
|
|
17
|
+
Context: "https://ref.gs1.org/epcis",
|
|
12
18
|
/**
|
|
13
19
|
* The JSON-LD Context URL.
|
|
14
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epcisContexts.js","sourceRoot":"","sources":["../../../../src/models/epcis20/epcisContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,4BAA4B;IAEvC;;OAEG;IACH,aAAa,EAAE,gEAAgE;CACtE,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Canonical EPCIS JSON-LD context IRIs as defined by GS1.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const EpcisContexts = {\n\t/**\n\t * The
|
|
1
|
+
{"version":3,"file":"epcisContexts.js","sourceRoot":"","sources":["../../../../src/models/epcis20/epcisContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,4BAA4B;IAEvC;;;;OAIG;IACH,OAAO,EAAE,2BAA2B;IAEpC;;OAEG;IACH,aAAa,EAAE,gEAAgE;CACtE,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Canonical EPCIS JSON-LD context IRIs as defined by GS1.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const EpcisContexts = {\n\t/**\n\t * The canonical RDF namespace URI.\n\t */\n\tNamespace: \"https://ref.gs1.org/epcis/\",\n\n\t/**\n\t * The value to use in JSON-LD context.\n\t * Note: Context differs from Namespace (no trailing slash) as per GS1 EPCIS standard specification.\n\t * The EPCIS JSON-LD context URL format does not include a trailing slash.\n\t */\n\tContext: \"https://ref.gs1.org/epcis\",\n\n\t/**\n\t * The JSON-LD Context URL.\n\t */\n\tJsonLdContext: \"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld\"\n} as const;\n\n/**\n * Canonical EPCIS JSON-LD context IRIs as defined by GS1.\n */\nexport type EpcisContexts = (typeof EpcisContexts)[keyof typeof EpcisContexts];\n"]}
|
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
7
|
export const GS1Contexts = {
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The canonical RDF namespace URI.
|
|
10
10
|
*/
|
|
11
|
-
Namespace: "https://gs1.org/voc/"
|
|
11
|
+
Namespace: "https://gs1.org/voc/",
|
|
12
|
+
/**
|
|
13
|
+
* The value to use in JSON-LD context.
|
|
14
|
+
* Note: Context differs from Namespace (no trailing slash) as per GS1 standard specification.
|
|
15
|
+
* The GS1 JSON-LD context URL format does not include a trailing slash.
|
|
16
|
+
*/
|
|
17
|
+
Context: "https://gs1.org/voc"
|
|
12
18
|
};
|
|
13
19
|
//# sourceMappingURL=gs1Contexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gs1Contexts.js","sourceRoot":"","sources":["../../../../src/models/gs1/gs1Contexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;OAEG;IACH,SAAS,EAAE,sBAAsB;
|
|
1
|
+
{"version":3,"file":"gs1Contexts.js","sourceRoot":"","sources":["../../../../src/models/gs1/gs1Contexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;OAEG;IACH,SAAS,EAAE,sBAAsB;IAEjC;;;;OAIG;IACH,OAAO,EAAE,qBAAqB;CACrB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of GS1.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const GS1Contexts = {\n\t/**\n\t * The canonical RDF namespace URI.\n\t */\n\tNamespace: \"https://gs1.org/voc/\",\n\n\t/**\n\t * The value to use in JSON-LD context.\n\t * Note: Context differs from Namespace (no trailing slash) as per GS1 standard specification.\n\t * The GS1 JSON-LD context URL format does not include a trailing slash.\n\t */\n\tContext: \"https://gs1.org/voc\"\n} as const;\n\n/**\n * The contexts of GS1.\n */\nexport type GS1Contexts = (typeof GS1Contexts)[keyof typeof GS1Contexts];\n"]}
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "https://ref.gs1.org/epcis
|
|
12
|
+
"const": "https://ref.gs1.org/epcis"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "array",
|
|
16
16
|
"items": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"const": "https://ref.gs1.org/epcis
|
|
18
|
+
"const": "https://ref.gs1.org/epcis"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 1,
|
|
21
21
|
"maxItems": 1
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prefixItems": [
|
|
27
27
|
{
|
|
28
28
|
"type": "string",
|
|
29
|
-
"const": "https://ref.gs1.org/epcis
|
|
29
|
+
"const": "https://ref.gs1.org/epcis"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "string",
|
|
48
|
-
"const": "https://ref.gs1.org/epcis
|
|
48
|
+
"const": "https://ref.gs1.org/epcis"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"items": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "https://ref.gs1.org/epcis
|
|
12
|
+
"const": "https://ref.gs1.org/epcis"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "array",
|
|
16
16
|
"items": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"const": "https://ref.gs1.org/epcis
|
|
18
|
+
"const": "https://ref.gs1.org/epcis"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 1,
|
|
21
21
|
"maxItems": 1
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prefixItems": [
|
|
27
27
|
{
|
|
28
28
|
"type": "string",
|
|
29
|
-
"const": "https://ref.gs1.org/epcis
|
|
29
|
+
"const": "https://ref.gs1.org/epcis"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "string",
|
|
48
|
-
"const": "https://ref.gs1.org/epcis
|
|
48
|
+
"const": "https://ref.gs1.org/epcis"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"items": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "https://ref.gs1.org/epcis
|
|
12
|
+
"const": "https://ref.gs1.org/epcis"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "array",
|
|
16
16
|
"items": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"const": "https://ref.gs1.org/epcis
|
|
18
|
+
"const": "https://ref.gs1.org/epcis"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 1,
|
|
21
21
|
"maxItems": 1
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prefixItems": [
|
|
27
27
|
{
|
|
28
28
|
"type": "string",
|
|
29
|
-
"const": "https://ref.gs1.org/epcis
|
|
29
|
+
"const": "https://ref.gs1.org/epcis"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "string",
|
|
48
|
-
"const": "https://ref.gs1.org/epcis
|
|
48
|
+
"const": "https://ref.gs1.org/epcis"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"items": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "https://ref.gs1.org/epcis
|
|
12
|
+
"const": "https://ref.gs1.org/epcis"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "array",
|
|
16
16
|
"items": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"const": "https://ref.gs1.org/epcis
|
|
18
|
+
"const": "https://ref.gs1.org/epcis"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 1,
|
|
21
21
|
"maxItems": 1
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prefixItems": [
|
|
27
27
|
{
|
|
28
28
|
"type": "string",
|
|
29
|
-
"const": "https://ref.gs1.org/epcis
|
|
29
|
+
"const": "https://ref.gs1.org/epcis"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "string",
|
|
48
|
-
"const": "https://ref.gs1.org/epcis
|
|
48
|
+
"const": "https://ref.gs1.org/epcis"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"items": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "https://ref.gs1.org/epcis
|
|
12
|
+
"const": "https://ref.gs1.org/epcis"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "array",
|
|
16
16
|
"items": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"const": "https://ref.gs1.org/epcis
|
|
18
|
+
"const": "https://ref.gs1.org/epcis"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 1,
|
|
21
21
|
"maxItems": 1
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prefixItems": [
|
|
27
27
|
{
|
|
28
28
|
"type": "string",
|
|
29
|
-
"const": "https://ref.gs1.org/epcis
|
|
29
|
+
"const": "https://ref.gs1.org/epcis"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "string",
|
|
48
|
-
"const": "https://ref.gs1.org/epcis
|
|
48
|
+
"const": "https://ref.gs1.org/epcis"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"items": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "https://ref.gs1.org/epcis
|
|
12
|
+
"const": "https://ref.gs1.org/epcis"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "array",
|
|
16
16
|
"items": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"const": "https://ref.gs1.org/epcis
|
|
18
|
+
"const": "https://ref.gs1.org/epcis"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 1,
|
|
21
21
|
"maxItems": 1
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prefixItems": [
|
|
27
27
|
{
|
|
28
28
|
"type": "string",
|
|
29
|
-
"const": "https://ref.gs1.org/epcis
|
|
29
|
+
"const": "https://ref.gs1.org/epcis"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "string",
|
|
48
|
-
"const": "https://ref.gs1.org/epcis
|
|
48
|
+
"const": "https://ref.gs1.org/epcis"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"items": {
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "https://ref.gs1.org/epcis
|
|
12
|
+
"const": "https://ref.gs1.org/epcis"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "array",
|
|
16
16
|
"items": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"const": "https://ref.gs1.org/epcis
|
|
18
|
+
"const": "https://ref.gs1.org/epcis"
|
|
19
19
|
},
|
|
20
20
|
"minItems": 1,
|
|
21
21
|
"maxItems": 1
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prefixItems": [
|
|
27
27
|
{
|
|
28
28
|
"type": "string",
|
|
29
|
-
"const": "https://ref.gs1.org/epcis
|
|
29
|
+
"const": "https://ref.gs1.org/epcis"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "string",
|
|
48
|
-
"const": "https://ref.gs1.org/epcis
|
|
48
|
+
"const": "https://ref.gs1.org/epcis"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"items": {
|
|
@@ -4,12 +4,12 @@ import type { EpcisContexts } from "./epcisContexts.js";
|
|
|
4
4
|
* Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1
|
|
5
5
|
* context root and optionally augmented with custom entries.
|
|
6
6
|
*/
|
|
7
|
-
export type EpcisContextType = typeof EpcisContexts.
|
|
7
|
+
export type EpcisContextType = typeof EpcisContexts.Context | [typeof EpcisContexts.Context] | [
|
|
8
8
|
...IJsonLdContextDefinitionElement[],
|
|
9
|
-
typeof EpcisContexts.
|
|
9
|
+
typeof EpcisContexts.Context,
|
|
10
10
|
IJsonLdContextDefinitionElement
|
|
11
11
|
] | [
|
|
12
12
|
IJsonLdContextDefinitionElement,
|
|
13
|
-
typeof EpcisContexts.
|
|
13
|
+
typeof EpcisContexts.Context,
|
|
14
14
|
...IJsonLdContextDefinitionElement[]
|
|
15
15
|
];
|
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const EpcisContexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The canonical RDF namespace URI.
|
|
7
7
|
*/
|
|
8
8
|
readonly Namespace: "https://ref.gs1.org/epcis/";
|
|
9
|
+
/**
|
|
10
|
+
* The value to use in JSON-LD context.
|
|
11
|
+
* Note: Context differs from Namespace (no trailing slash) as per GS1 EPCIS standard specification.
|
|
12
|
+
* The EPCIS JSON-LD context URL format does not include a trailing slash.
|
|
13
|
+
*/
|
|
14
|
+
readonly Context: "https://ref.gs1.org/epcis";
|
|
9
15
|
/**
|
|
10
16
|
* The JSON-LD Context URL.
|
|
11
17
|
*/
|
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const GS1Contexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The canonical RDF namespace URI.
|
|
7
7
|
*/
|
|
8
8
|
readonly Namespace: "https://gs1.org/voc/";
|
|
9
|
+
/**
|
|
10
|
+
* The value to use in JSON-LD context.
|
|
11
|
+
* Note: Context differs from Namespace (no trailing slash) as per GS1 standard specification.
|
|
12
|
+
* The GS1 JSON-LD context URL format does not include a trailing slash.
|
|
13
|
+
*/
|
|
14
|
+
readonly Context: "https://gs1.org/voc";
|
|
9
15
|
};
|
|
10
16
|
/**
|
|
11
17
|
* The contexts of GS1.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @twin.org/standards-gs1 - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.18](https://github.com/twinfoundation/standards/compare/standards-gs1-v0.0.3-next.17...standards-gs1-v0.0.3-next.18) (2026-01-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **standards-gs1:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
## [0.0.3-next.17](https://github.com/twinfoundation/standards/compare/standards-gs1-v0.0.3-next.16...standards-gs1-v0.0.3-next.17) (2026-01-21)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* updating the missing packages ([#114](https://github.com/twinfoundation/standards/issues/114)) ([90b03f8](https://github.com/twinfoundation/standards/commit/90b03f8bdcd81506284d74a445840386c2da2d35))
|
|
16
|
+
|
|
3
17
|
## [0.0.3-next.16](https://github.com/twinfoundation/standards/compare/standards-gs1-v0.0.3-next.15...standards-gs1-v0.0.3-next.16) (2026-01-19)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Type Alias: EpcisContextType
|
|
2
2
|
|
|
3
|
-
> **EpcisContextType** = *typeof* [`
|
|
3
|
+
> **EpcisContextType** = *typeof* [`Context`](../variables/EpcisContexts.md#context) \| \[*typeof* [`Context`](../variables/EpcisContexts.md#context)\] \| \[`...IJsonLdContextDefinitionElement[]`, *typeof* [`Context`](../variables/EpcisContexts.md#context), `IJsonLdContextDefinitionElement`\] \| \[`IJsonLdContextDefinitionElement`, *typeof* [`Context`](../variables/EpcisContexts.md#context), `...IJsonLdContextDefinitionElement[]`\]
|
|
4
4
|
|
|
5
5
|
Allowed shapes for an EPCIS 2.0 JSON-LD `@context`, anchored on the GS1
|
|
6
6
|
context root and optionally augmented with custom entries.
|
|
@@ -10,7 +10,15 @@ Canonical EPCIS JSON-LD context IRIs as defined by GS1.
|
|
|
10
10
|
|
|
11
11
|
> `readonly` **Namespace**: `"https://ref.gs1.org/epcis/"` = `"https://ref.gs1.org/epcis/"`
|
|
12
12
|
|
|
13
|
-
The
|
|
13
|
+
The canonical RDF namespace URI.
|
|
14
|
+
|
|
15
|
+
### Context
|
|
16
|
+
|
|
17
|
+
> `readonly` **Context**: `"https://ref.gs1.org/epcis"` = `"https://ref.gs1.org/epcis"`
|
|
18
|
+
|
|
19
|
+
The value to use in JSON-LD context.
|
|
20
|
+
Note: Context differs from Namespace (no trailing slash) as per GS1 EPCIS standard specification.
|
|
21
|
+
The EPCIS JSON-LD context URL format does not include a trailing slash.
|
|
14
22
|
|
|
15
23
|
### JsonLdContext
|
|
16
24
|
|
|
@@ -10,4 +10,12 @@ The contexts of GS1.
|
|
|
10
10
|
|
|
11
11
|
> `readonly` **Namespace**: `"https://gs1.org/voc/"` = `"https://gs1.org/voc/"`
|
|
12
12
|
|
|
13
|
-
The
|
|
13
|
+
The canonical RDF namespace URI.
|
|
14
|
+
|
|
15
|
+
### Context
|
|
16
|
+
|
|
17
|
+
> `readonly` **Context**: `"https://gs1.org/voc"` = `"https://gs1.org/voc"`
|
|
18
|
+
|
|
19
|
+
The value to use in JSON-LD context.
|
|
20
|
+
Note: Context differs from Namespace (no trailing slash) as per GS1 standard specification.
|
|
21
|
+
The GS1 JSON-LD context URL format does not include a trailing slash.
|