Skip to content

Commit

Permalink
Merge pull request #959 from w3c-ccg/add_monthly_aggregate_delivery_s…
Browse files Browse the repository at this point in the history
…tatements

adds monthly aggregate delivery statement
  • Loading branch information
nissimsan authored Jul 25, 2024
2 parents 7e51d26 + 4fe90ec commit db6bc5b
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/credentials-with-issuer-dependent-terms.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
"type": "MultiModalBillOfLadingCredential",
"count": 0
},
{
"type": "MonthlyAggregateDeliveryStatementCredential",
"count": 4
},
{
"type": "MonthlyAdvanceManifestCredential",
"count": 26
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
$linkedData:
term: MonthlyAggregateDeliveryStatementCredential
'@id': https://w3id.org/traceability#MonthlyAggregateDeliveryStatementCredential
title: Monthly Aggregate Delivery Statement Credential
tags:
- Oil and Gas
description: >-
Credential containing aggregate statements indicating item(s) delivered during the month
type: object
properties:
'@context':
type: array
readOnly: true
const:
- https://www.w3.org/2018/credentials/v1
- https://w3id.org/traceability/v1
default:
- https://www.w3.org/2018/credentials/v1
- https://w3id.org/traceability/v1
items:
type: string
enum:
- https://www.w3.org/2018/credentials/v1
- https://w3id.org/traceability/v1
type:
type: array
readOnly: true
const:
- VerifiableCredential
- MonthlyAggregateDeliveryStatementCredential
default:
- VerifiableCredential
- MonthlyAggregateDeliveryStatementCredential
items:
type: string
enum:
- VerifiableCredential
- MonthlyAggregateDeliveryStatementCredential
id:
type: string
name:
type: string
description:
type: string
issuanceDate:
type: string
issuer:
$ref: ../common/Organization.yml
credentialSchema:
type: object
properties:
id:
title: Id
description: The URL of the schema file to use to validate the shape of the JSON object
type: string
format: uri
example: https://w3id.org/traceability/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatementCredential.yml
default: https://w3id.org/traceability/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatementCredential.yml
readonly: true
type:
title: Type
description: The type of validation to be run against the defined schema
const: OpenApiSpecificationValidator2022
credentialSubject:
properties:
type:
type: array
readOnly: true
const:
- MonthlyAggregateDeliveryStatement
default:
- MonthlyAggregateDeliveryStatement
deliveryStatements:
type: array
readOnly: true
items:
$ref: ../common/DeliveryStatement.yml

proof:
$ref: ../snippets/proof.yml
additionalProperties: false
required:
- '@context'
- type
- id
- issuanceDate
- issuer
- credentialSubject
example: |-
{
"type": [
"VerifiableCredential",
"MonthlyAggregateDeliveryStatementCredential"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"id": "urn:credential:123",
"issuer": {
"type": [
"Organization"
],
"id": "did:web:organization.example.com",
"name": "Everything Garden Stuff"
},
"issuanceDate": "2022-01-13T09:16:46Z",
"credentialSubject": {
"type": [
"MonthlyAggregateDeliveryStatement"
],
"deliveryStatements": [
{
"type": [
"DeliveryStatement"
],
"commodity": {
"type": [
"Commodity"
],
"commodityCode": "2714.10.00.00",
"commodityCodeType": "HTS"
},
"deliveredDate": "2019-12-11T03:50:55Z",
"deliveredVolume": {
"type": [
"MeasuredValue"
],
"value": "8806",
"unitCode": "dth"
},
"observation": [
{
"type": [
"Observation"
],
"property": {
"type": [
"ChemicalProperty"
],
"name": "Heat Content"
},
"measurement": {
"type": [
"MeasuredValue"
],
"value": "50000",
"unitCode": "BTU"
}
}
]
}
]
}
}
12 changes: 12 additions & 0 deletions docs/openapi/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2946,6 +2946,18 @@ paths:
$ref: './components/schemas/credentials/MonthlyAdvanceManifestCredential.yml'


/schemas/credentials/MonthlyAggregateDeliveryStatements.yml:
get:
tags:
- credentials
responses:
'200':
content:
application/yml:
schema:
$ref: './components/schemas/credentials/MonthlyAggregateDeliveryStatements.yml'


/schemas/credentials/MultiModalBillOfLadingCredential.yml:
get:
tags:
Expand Down
4 changes: 2 additions & 2 deletions packages/traceability-tests/examples/v2.json
Original file line number Diff line number Diff line change
Expand Up @@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5yz6D",
"verified": {
"protectedHeader": {
"iss": "did:jwk:eyJrdHkiOiJFQyIsImNydiI6IlAtMzg0IiwiYWxnIjoiRVMzODQiLCJ4IjoiOWpzRlJWVmpxSlk1Skl5SnI1OGdFQnVyamtzakxwTUJvWVZDZTZlMEJ6UzhBUzNMQXlyN3hLeFNnUE9pUGNHTSIsInkiOiJidHRMX2ZVa3Rkci1MaHhNY3pJaml0ZFpWcG9paXppUGlnOG1nODFidGVUUm0zQmpaLWw4dU5qdkpLYWtnUjNCIn0",
Expand All @@ -22,7 +22,7 @@
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/ns/activitystreams"
],
"id": "urn:uuid:c677fca9-c955-413c-aef3-4a38d53302a9",
"id": "urn:uuid:d8660101-1b01-4568-847d-3e070b591fd2",
"type": [
"VerifiableCredential",
"ActivityPubActorCard"
Expand Down

0 comments on commit db6bc5b

Please sign in to comment.