diff --git a/app-config.json b/app-config.json index 0a43e4e3..f476166b 100644 --- a/app-config.json +++ b/app-config.json @@ -46,7 +46,7 @@ "type": ["Product"], "id": "https://example.com/01/09359502000034", "name": "EcoCharge Lithium-Ion Battery", - "registeredId": "095201234", + "registeredId": "09359502000034", "idScheme": { "type": ["IdentifierScheme"], "id": "https://id.gs1.org/01/", @@ -651,6 +651,721 @@ "name": "CustomButton", "type": "Submit", "props": {} + }, + { + "name": "BarcodeGenerator", + "type": "Result", + "props": { + "dataPath": { + "primary": { + "ai": "01", + "path": "/decodedEnvelopedVC/credentialSubject/registeredId" + }, + "qualifiers": [ + { + "ai": "10", + "path": "/decodedEnvelopedVC/credentialSubject/batchNumber" + } + ] + } + } + } + ], + "services": [ + { + "name": "processDPP", + "parameters": [ + { + "vckit": { + "vckitAPIUrl": "http://localhost:3332/v2", + "issuer": { + "id": "did:web:uncefact.github.io:project-vckit:test-and-development", + "name": "Orchard Facility" + }, + "headers": { + "Authorization": "Bearer test123" + } + }, + "dpp": { + "context": ["https://vocabulary.uncefact.org/untp/dpp/0.5.0/"], + "renderTemplate": [ + { + "template": "
PRODUCT PASSPORT
{{this}}
The circularity Scorecard provides a simple high level summary of circularity performance of the product.
Recyclable content
Recycled content
Utility factor
Material circularity*
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
{{credentialSubject.emissionsScorecard.carbonFootprint}}{{credentialSubject.emissionsScorecard.declaredUnit}}
Co2Eq
{{credentialSubject.emissionsScorecard.operationalScope}}
{{credentialSubject.emissionsScorecard.primarySourcedRatio}}% primary sources
{{credentialSubject.emissionsScorecard.reportingStandard.issueDate}}
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
{{#each credentialSubject.productCategory}}{{name}}{{#unless @last}},{{/unless}} {{/each}}
{{credentialSubject.productionDate}}
{{credentialSubject.countryOfProduction}}
Weight: {{credentialSubject.dimensions.weight.value}}{{credentialSubject.dimensions.weight.unit}} Length: {{credentialSubject.dimensions.length.value}}{{credentialSubject.dimensions.length.unit}} Width: {{credentialSubject.dimensions.width.value}}{{credentialSubject.dimensions.width.unit}} Height: {{credentialSubject.dimensions.height.value}}{{credentialSubject.dimensions.height.unit}} Volume: {{credentialSubject.dimensions.volume.value}}{{credentialSubject.dimensions.volume.unit}}
Product composition
A complete list of materials that make up the composition of this product.
{{massFraction}}%
{{massAmount.value}}{{massAmount.unit}} {{name}}
Recycled {{recycledAmount}}%
Hazard {{#if hazardous}}Yes{{else}}No{{/if}}
History
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
{{issuer.name}}
{{validFrom}}
{{validUntil}}
{{credentialSubject.description}}
{{#each credentialSubject.furtherInformation}}The circularity Scorecard provides a simple high level summary of circularity performance of the product.
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
Co2Eq
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
Score: {{score}} | Accuracy {{accuracy}}
The Product Composition List details the materials and components used in the product, providing transparency on the origin and nature of each element.
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
This Digital Product Passport (DPP) is a digital record of the product’s sustainability and environmental performance, ensuring transparency and accountability in line with UNTP standards. The DPP can be verified at any time using the QR code or visiting www.untp-certification.org with the passport ID.
Parent: {{parentItem.epc}}
ID: {{transactionId}}
PRODUCT PASSPORT
{{this}}
The circularity Scorecard provides a simple high level summary of circularity performance of the product.
Recyclable content
Recycled content
Utility factor
Material circularity*
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
{{credentialSubject.emissionsScorecard.carbonFootprint}}{{credentialSubject.emissionsScorecard.declaredUnit}}
Co2Eq
{{credentialSubject.emissionsScorecard.operationalScope}}
{{credentialSubject.emissionsScorecard.primarySourcedRatio}}% primary sources
{{credentialSubject.emissionsScorecard.reportingStandard.issueDate}}
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
{{#each credentialSubject.productCategory}}{{name}}{{#unless @last}},{{/unless}} {{/each}}
{{credentialSubject.productionDate}}
{{credentialSubject.countryOfProduction}}
Weight: {{credentialSubject.dimensions.weight.value}}{{credentialSubject.dimensions.weight.unit}} Length: {{credentialSubject.dimensions.length.value}}{{credentialSubject.dimensions.length.unit}} Width: {{credentialSubject.dimensions.width.value}}{{credentialSubject.dimensions.width.unit}} Height: {{credentialSubject.dimensions.height.value}}{{credentialSubject.dimensions.height.unit}} Volume: {{credentialSubject.dimensions.volume.value}}{{credentialSubject.dimensions.volume.unit}}
Product composition
A complete list of materials that make up the composition of this product.
{{massFraction}}%
{{massAmount.value}}{{massAmount.unit}} {{name}}
Recycled {{recycledAmount}}%
Hazard {{#if hazardous}}Yes{{else}}No{{/if}}
History
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
{{issuer.name}}
{{validFrom}}
{{validUntil}}
{{credentialSubject.description}}
{{#each credentialSubject.furtherInformation}}The circularity Scorecard provides a simple high level summary of circularity performance of the product.
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
Co2Eq
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
Score: {{score}} | Accuracy {{accuracy}}
The Product Composition List details the materials and components used in the product, providing transparency on the origin and nature of each element.
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
This Digital Product Passport (DPP) is a digital record of the product’s sustainability and environmental performance, ensuring transparency and accountability in line with UNTP standards. The DPP can be verified at any time using the QR code or visiting www.untp-certification.org with the passport ID.
PRODUCT PASSPORT
{{this}}
The circularity Scorecard provides a simple high level summary of circularity performance of the product.
Recyclable content
Recycled content
Utility factor
Material circularity*
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
{{credentialSubject.emissionsScorecard.carbonFootprint}}{{credentialSubject.emissionsScorecard.declaredUnit}}
Co2Eq
{{credentialSubject.emissionsScorecard.operationalScope}}
{{credentialSubject.emissionsScorecard.primarySourcedRatio}}% primary sources
{{credentialSubject.emissionsScorecard.reportingStandard.issueDate}}
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
{{#each credentialSubject.productCategory}}{{name}}{{#unless @last}},{{/unless}} {{/each}}
{{credentialSubject.productionDate}}
{{credentialSubject.countryOfProduction}}
Weight: {{credentialSubject.dimensions.weight.value}}{{credentialSubject.dimensions.weight.unit}} Length: {{credentialSubject.dimensions.length.value}}{{credentialSubject.dimensions.length.unit}} Width: {{credentialSubject.dimensions.width.value}}{{credentialSubject.dimensions.width.unit}} Height: {{credentialSubject.dimensions.height.value}}{{credentialSubject.dimensions.height.unit}} Volume: {{credentialSubject.dimensions.volume.value}}{{credentialSubject.dimensions.volume.unit}}
Product composition
A complete list of materials that make up the composition of this product.
{{massFraction}}%
{{massAmount.value}}{{massAmount.unit}} {{name}}
Recycled {{recycledAmount}}%
Hazard {{#if hazardous}}Yes{{else}}No{{/if}}
History
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
{{issuer.name}}
{{validFrom}}
{{validUntil}}
{{credentialSubject.description}}
{{#each credentialSubject.furtherInformation}}The circularity Scorecard provides a simple high level summary of circularity performance of the product.
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
Co2Eq
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
Score: {{score}} | Accuracy {{accuracy}}
The Product Composition List details the materials and components used in the product, providing transparency on the origin and nature of each element.
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
This Digital Product Passport (DPP) is a digital record of the product’s sustainability and environmental performance, ensuring transparency and accountability in line with UNTP standards. The DPP can be verified at any time using the QR code or visiting www.untp-certification.org with the passport ID.
{{credentialSubject.name}}
{{credentialSubject.description}}
Level of independent assurance:
Type of authority endorsement:
Type of the attestation credential:
The list of specific assessments made within this conformity attestation.
{{conformityTopic}}
Industry average {{metricName}} is {{metricValue.value}}{{metricValue.unit}}.
{{name}}
{{credentialSubject.description}}
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
PRODUCT PASSPORT
{{this}}
The circularity Scorecard provides a simple high level summary of circularity performance of the product.
Recyclable content
Recycled content
Utility factor
Material circularity*
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
{{credentialSubject.emissionsScorecard.carbonFootprint}}{{credentialSubject.emissionsScorecard.declaredUnit}}
Co2Eq
{{credentialSubject.emissionsScorecard.operationalScope}}
{{credentialSubject.emissionsScorecard.primarySourcedRatio}}% primary sources
{{credentialSubject.emissionsScorecard.reportingStandard.issueDate}}
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
{{#each credentialSubject.productCategory}}{{name}}{{#unless @last}},{{/unless}} {{/each}}
{{credentialSubject.productionDate}}
{{credentialSubject.countryOfProduction}}
Weight: {{credentialSubject.dimensions.weight.value}}{{credentialSubject.dimensions.weight.unit}} Length: {{credentialSubject.dimensions.length.value}}{{credentialSubject.dimensions.length.unit}} Width: {{credentialSubject.dimensions.width.value}}{{credentialSubject.dimensions.width.unit}} Height: {{credentialSubject.dimensions.height.value}}{{credentialSubject.dimensions.height.unit}} Volume: {{credentialSubject.dimensions.volume.value}}{{credentialSubject.dimensions.volume.unit}}
Product composition
A complete list of materials that make up the composition of this product.
{{massFraction}}%
{{massAmount.value}}{{massAmount.unit}} {{name}}
Recycled {{recycledAmount}}%
Hazard {{#if hazardous}}Yes{{else}}No{{/if}}
History
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
{{issuer.name}}
{{validFrom}}
{{validUntil}}
{{credentialSubject.description}}
{{#each credentialSubject.furtherInformation}}The circularity Scorecard provides a simple high level summary of circularity performance of the product.
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
Co2Eq
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
Score: {{score}} | Accuracy {{accuracy}}
The Product Composition List details the materials and components used in the product, providing transparency on the origin and nature of each element.
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
This Digital Product Passport (DPP) is a digital record of the product’s sustainability and environmental performance, ensuring transparency and accountability in line with UNTP standards. The DPP can be verified at any time using the QR code or visiting www.untp-certification.org with the passport ID.
PRODUCT PASSPORT
{{this}}
The circularity Scorecard provides a simple high level summary of circularity performance of the product.
Recyclable content
Recycled content
Utility factor
Material circularity*
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
{{credentialSubject.emissionsScorecard.carbonFootprint}}{{credentialSubject.emissionsScorecard.declaredUnit}}
Co2Eq
{{credentialSubject.emissionsScorecard.operationalScope}}
{{credentialSubject.emissionsScorecard.primarySourcedRatio}}% primary sources
{{credentialSubject.emissionsScorecard.reportingStandard.issueDate}}
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
{{#each credentialSubject.productCategory}}{{name}}{{#unless @last}},{{/unless}} {{/each}}
{{credentialSubject.productionDate}}
{{credentialSubject.countryOfProduction}}
Weight: {{credentialSubject.dimensions.weight.value}}{{credentialSubject.dimensions.weight.unit}} Length: {{credentialSubject.dimensions.length.value}}{{credentialSubject.dimensions.length.unit}} Width: {{credentialSubject.dimensions.width.value}}{{credentialSubject.dimensions.width.unit}} Height: {{credentialSubject.dimensions.height.value}}{{credentialSubject.dimensions.height.unit}} Volume: {{credentialSubject.dimensions.volume.value}}{{credentialSubject.dimensions.volume.unit}}
Product composition
A complete list of materials that make up the composition of this product.
{{massFraction}}%
{{massAmount.value}}{{massAmount.unit}} {{name}}
Recycled {{recycledAmount}}%
Hazard {{#if hazardous}}Yes{{else}}No{{/if}}
History
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
{{issuer.name}}
{{validFrom}}
{{validUntil}}
{{credentialSubject.description}}
{{#each credentialSubject.furtherInformation}}The circularity Scorecard provides a simple high level summary of circularity performance of the product.
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
Co2Eq
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
Score: {{score}} | Accuracy {{accuracy}}
The Product Composition List details the materials and components used in the product, providing transparency on the origin and nature of each element.
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
This Digital Product Passport (DPP) is a digital record of the product’s sustainability and environmental performance, ensuring transparency and accountability in line with UNTP standards. The DPP can be verified at any time using the QR code or visiting www.untp-certification.org with the passport ID.
PRODUCT PASSPORT
{{this}}
The circularity Scorecard provides a simple high level summary of circularity performance of the product.
Recyclable content
Recycled content
Utility factor
Material circularity*
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
{{credentialSubject.emissionsScorecard.carbonFootprint}}{{credentialSubject.emissionsScorecard.declaredUnit}}
Co2Eq
{{credentialSubject.emissionsScorecard.operationalScope}}
{{credentialSubject.emissionsScorecard.primarySourcedRatio}}% primary sources
{{credentialSubject.emissionsScorecard.reportingStandard.issueDate}}
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
{{#each credentialSubject.productCategory}}{{name}}{{#unless @last}},{{/unless}} {{/each}}
{{credentialSubject.productionDate}}
{{credentialSubject.countryOfProduction}}
Weight: {{credentialSubject.dimensions.weight.value}}{{credentialSubject.dimensions.weight.unit}} Length: {{credentialSubject.dimensions.length.value}}{{credentialSubject.dimensions.length.unit}} Width: {{credentialSubject.dimensions.width.value}}{{credentialSubject.dimensions.width.unit}} Height: {{credentialSubject.dimensions.height.value}}{{credentialSubject.dimensions.height.unit}} Volume: {{credentialSubject.dimensions.volume.value}}{{credentialSubject.dimensions.volume.unit}}
Product composition
A complete list of materials that make up the composition of this product.
{{massFraction}}%
{{massAmount.value}}{{massAmount.unit}} {{name}}
Recycled {{recycledAmount}}%
Hazard {{#if hazardous}}Yes{{else}}No{{/if}}
History
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
{{issuer.name}}
{{validFrom}}
{{validUntil}}
{{credentialSubject.description}}
{{#each credentialSubject.furtherInformation}}The circularity Scorecard provides a simple high level summary of circularity performance of the product.
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
Co2Eq
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
Score: {{score}} | Accuracy {{accuracy}}
The Product Composition List details the materials and components used in the product, providing transparency on the origin and nature of each element.
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
This Digital Product Passport (DPP) is a digital record of the product’s sustainability and environmental performance, ensuring transparency and accountability in line with UNTP standards. The DPP can be verified at any time using the QR code or visiting www.untp-certification.org with the passport ID.
PRODUCT PASSPORT
{{this}}
The circularity Scorecard provides a simple high level summary of circularity performance of the product.
Recyclable content
Recycled content
Utility factor
Material circularity*
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
{{credentialSubject.emissionsScorecard.carbonFootprint}}{{credentialSubject.emissionsScorecard.declaredUnit}}
Co2Eq
{{credentialSubject.emissionsScorecard.operationalScope}}
{{credentialSubject.emissionsScorecard.primarySourcedRatio}}% primary sources
{{credentialSubject.emissionsScorecard.reportingStandard.issueDate}}
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
{{metricName}} is {{metricValue.value}}{{metricValue.unit}}
Score: {{score}} | Accuracy {{accuracy}}
{{#each credentialSubject.productCategory}}{{name}}{{#unless @last}},{{/unless}} {{/each}}
{{credentialSubject.productionDate}}
{{credentialSubject.countryOfProduction}}
Weight: {{credentialSubject.dimensions.weight.value}}{{credentialSubject.dimensions.weight.unit}} Length: {{credentialSubject.dimensions.length.value}}{{credentialSubject.dimensions.length.unit}} Width: {{credentialSubject.dimensions.width.value}}{{credentialSubject.dimensions.width.unit}} Height: {{credentialSubject.dimensions.height.value}}{{credentialSubject.dimensions.height.unit}} Volume: {{credentialSubject.dimensions.volume.value}}{{credentialSubject.dimensions.volume.unit}}
Product composition
A complete list of materials that make up the composition of this product.
{{massFraction}}%
{{massAmount.value}}{{massAmount.unit}} {{name}}
Recycled {{recycledAmount}}%
Hazard {{#if hazardous}}Yes{{else}}No{{/if}}
History
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
{{issuer.name}}
{{validFrom}}
{{validUntil}}
{{credentialSubject.description}}
{{#each credentialSubject.furtherInformation}}The circularity Scorecard provides a simple high level summary of circularity performance of the product.
*The Material Circularity Indicator provides an overall circularity score which is a function of all three of the earlier measures.
The Emissions Scorecard gives a clear snapshot of the product's greenhouse gas (GHG) emissions performance, providing a single indicator to assess its overall environmental impact.
Co2Eq
The Primary Sourced Ratio shows the percentage of scope 3 emissions data that is directly collected from actual sources, rather than being based on estimates.
{{referenceRegulation.name}} administered in {{referenceRegulation.jurisdictionCountry}} by {{referenceRegulation.administeredBy.name}}
{{referenceStandard.name}} issued by {{referenceStandard.issuingParty.name}}
Score: {{score}} | Accuracy {{accuracy}}
The Product Composition List details the materials and components used in the product, providing transparency on the origin and nature of each element.
{{credentialSubject.traceabilityInformation.valueChainProcess}}
Verified ratio {{credentialSubject.traceabilityInformation.verifiedRatio}}
This Digital Product Passport (DPP) is a digital record of the product’s sustainability and environmental performance, ensuring transparency and accountability in line with UNTP standards. The DPP can be verified at any time using the QR code or visiting www.untp-certification.org with the passport ID.
Render dpp template
', '@type': 'WebRenderingTemplate2022' }], dlrLinkTitle: 'Aggregation Event', - dlrIdentificationKeyType: linkResolverService.IdentificationKeyType.gtin, dlrVerificationPage: 'http://exampleUI.com/verify', dlrQualifierPath: '', }, @@ -64,14 +61,14 @@ describe('processAggregationEvent', () => { jest .spyOn(validateContext, 'validateTraceabilityEventContext') .mockReturnValueOnce({ ok: true, value: context } as unknown as ResultRender dpp template
', '@type': 'WebRenderingTemplate2022' }], type: ['DigitalProductPassport'], dlrLinkTitle: 'Livestock Passport', - dlrIdentificationKeyType: 'nlis', dlrVerificationPage: 'https://web.example.com/verify', }, dlr: { @@ -223,7 +222,6 @@ export const traceabilityEventContext = { '@type': 'WebRenderingTemplate2022', }, ], - dlrIdentificationKeyType: 'gtin', dlrLinkTitle: 'Object Event', dlrVerificationPage: 'https://verify.example.com', }, @@ -252,7 +250,6 @@ export const digitalIdentityAnchorContext = { renderTemplate: [{ template: 'Render dpp template
', '@type': 'WebRenderingTemplate2022' }], type: ['DigitalIdentityAnchor'], dlrLinkTitle: 'DigitalIdentityAnchor', - dlrIdentificationKeyType: 'gtin', dlrVerificationPage: 'https://web.example.com/verify', }, dlr: { @@ -280,7 +277,6 @@ export const digitalFacilityRecordContext = { renderTemplate: [{ template: 'Render dpp template
', '@type': 'WebRenderingTemplate2022' }], type: ['DigitalFacilityRecord'], dlrLinkTitle: 'DigitalFacilityRecord', - dlrIdentificationKeyType: 'gln', dlrVerificationPage: 'https://web.example.com/verify', }, dlr: { @@ -308,7 +304,6 @@ export const digitalConformityCredentialContext = { renderTemplate: [{ template: 'Render dcc template
', '@type': 'WebRenderingTemplate2022' }], type: ['DigitalConformityCredential'], dlrLinkTitle: 'DigitalConformityCredential', - dlrIdentificationKeyType: 'gtin', dlrVerificationPage: 'https://web.example.com/verify', }, dlr: { diff --git a/packages/services/src/__tests__/processDPP.test.ts b/packages/services/src/__tests__/processDPP.test.ts index 517010ed..0f07a5b6 100644 --- a/packages/services/src/__tests__/processDPP.test.ts +++ b/packages/services/src/__tests__/processDPP.test.ts @@ -1,7 +1,8 @@ import { processDPP } from '../processDPP.service'; import { issueVC, contextDefault, decodeEnvelopedVC } from '../vckit.service'; import { uploadData } from '../storage.service'; -import { registerLinkResolver, IdentificationKeyType, LinkType } from '../linkResolver.service'; +import { registerLinkResolver, LinkType } from '../linkResolver.service'; +import * as identifierSchemeServices from '../identifierSchemes/identifierSchemeServices'; import { contextDPP, dataDPP } from './mocks/constants'; jest.mock('../vckit.service', () => ({ @@ -16,11 +17,6 @@ jest.mock('../storage.service', () => ({ jest.mock('../linkResolver.service', () => ({ registerLinkResolver: jest.fn(), - IdentificationKeyType: { - gtin: 'gtin', - nlisid: 'nlisid', - }, - getLinkResolverIdentifier: jest.fn(() => ({ identifier: '9359502000010', qualifierPath: '/10/ABC123' })), LinkType: { verificationLinkType: 'gs1:verificationService', certificationLinkType: 'gs1:certificationInfo', @@ -64,10 +60,21 @@ describe('processDPP', () => { return `${url}/${dataDPP.data.herd.identifier}`; }); + jest.spyOn(identifierSchemeServices, 'constructIdentifierData').mockReturnValue({ + primary: { ai: '01', value: '9359502000010' }, + qualifiers: [ + { + ai: '10', + value: 'ABC123', + }, + ], + }); + jest.spyOn(identifierSchemeServices, 'constructQualifierPath').mockReturnValue('/10/ABC123'); + (registerLinkResolver as jest.Mock).mockImplementation( ( url, - identificationKeyType: IdentificationKeyType, + identificationKeyType: string, identificationKey: string, linkTitle, verificationPage, @@ -84,13 +91,7 @@ describe('processDPP', () => { decodedEnvelopedVC: { credentialSubject: { id: 'https://example.com/123' }, }, - linkResolver: - contextDPP.dpp.dlrVerificationPage + - '/' + - contextDPP.dpp.dlrIdentificationKeyType + - '/' + - dataDPP.data.herd.identifier + - '?linkType=all', + linkResolver: 'https://web.example.com/verify/01/9359502000010?linkType=all', }); expect(uploadData).toHaveBeenCalled(); expect(registerLinkResolver).toHaveBeenCalled(); @@ -99,7 +100,7 @@ describe('processDPP', () => { const dlrContext = contextDPP.dlr; expect(registerLinkResolver).toHaveBeenCalledWith( expect.any(String), - dppContext.dlrIdentificationKeyType, + '01', dataDPP.data.herd.identifier, dppContext.dlrLinkTitle, LinkType.certificationLinkType, @@ -126,10 +127,16 @@ describe('processDPP', () => { return `${url}/${dataDPP.data.herd.identifier}`; }); + jest.spyOn(identifierSchemeServices, 'constructIdentifierData').mockReturnValue({ + primary: { ai: '01', value: '0123456789' }, + qualifiers: [], + }); + jest.spyOn(identifierSchemeServices, 'constructQualifierPath').mockReturnValue('/'); + (registerLinkResolver as jest.Mock).mockImplementation( ( url, - identificationKeyType: IdentificationKeyType, + identificationKeyType: string, identificationKey: string, linkTitle, verificationPage, @@ -169,6 +176,11 @@ describe('processDPP', () => { it('should throw error when data is empty', async () => { try { + jest.spyOn(identifierSchemeServices, 'constructIdentifierData').mockReturnValue({ + primary: { ai: '', value: '' }, + qualifiers: [], + }); + await processDPP({ data: { herd: '' } }, contextDPP); } catch (error: any) { expect(error.message).toEqual('Identifier not found'); diff --git a/packages/services/src/__tests__/processDigitalConformityCredential.test.ts b/packages/services/src/__tests__/processDigitalConformityCredential.test.ts index a4a5a304..e5c10bd8 100644 --- a/packages/services/src/__tests__/processDigitalConformityCredential.test.ts +++ b/packages/services/src/__tests__/processDigitalConformityCredential.test.ts @@ -1,6 +1,7 @@ import * as vckitService from '../vckit.service'; import { uploadData } from '../storage.service'; import * as linkResolverService from '../linkResolver.service'; +import * as identifierSchemeServices from '../identifierSchemes/identifierSchemeServices'; import { Result } from '../types/validateContext'; import * as validateContext from '../validateContext'; import { IDigitalConformityCredentialContext } from '../types'; @@ -17,7 +18,6 @@ jest.mock('../storage.service', () => ({ jest.mock('../linkResolver.service', () => ({ registerLinkResolver: jest.fn(), createLinkResolver: jest.fn(), - IdentificationKeyType: jest.fn(), getLinkResolverIdentifier: jest.fn(), getLinkResolverIdentifierFromURI: jest.fn(), LinkType: { @@ -46,9 +46,11 @@ describe('processDigitalConformityCredential', () => { jest .spyOn(validateContext, 'validateDigitalConformityCredentialContext') .mockReturnValueOnce({ ok: true, value: context } as unknown as Result