diff --git a/docs/openapi/components/schemas/credentials/EInvoiceCredential.yml b/docs/openapi/components/schemas/credentials/EInvoiceCredential.yml index 47563e27d..b21cf8104 100644 --- a/docs/openapi/components/schemas/credentials/EInvoiceCredential.yml +++ b/docs/openapi/components/schemas/credentials/EInvoiceCredential.yml @@ -129,8 +129,8 @@ properties: required: - type employee: - title: Certification Manager - description: The employee responsible for this certification. + title: Sales Representative + description: The employee responsible for this invoice type: object properties: type: @@ -200,7 +200,6 @@ properties: - linkedDocuments - buyer - consignee - - itemsShipped type: object properties: type: @@ -214,7 +213,7 @@ properties: type: string enum: - Invoice - linkedDocuments: + relatedDocuments: title: Documents Linked or Referenced description: References to other documents which can be used to support the claims of the current document type: array @@ -238,7 +237,7 @@ properties: documentType: title: Document Type description: The type of the document being referenced - type: enum + enum: - MillTestReport - PurchaseOrder - PackingList @@ -347,113 +346,6 @@ properties: description: >- The two-letter ISO 3166-1 alpha-2 country code. type: string - consignee: - title: Consignee - description: The consignee party for this supply chain consignment. - type: array - items: - type: object - properties: - type: - type: array - readOnly: true - const: - - Organization - default: - - Organization - items: - type: string - enum: - - Organization - id: - title: Identifier - description: Identifier for the consginee. - type: string - name: - title: Name - description: Name of the consginee. - type: string - url: - title: URL - description: URL of the consignee. - type: string - email: - title: Email Address - description: Consignee's primary email address. - type: string - phoneNumber: - title: Phone Number - description: Consignee's contact phone number. - type: string - location: - title: Location - description: Consignee's physical location, such as address or coordinates. - type: object - properties: - type: - type: array - readOnly: true - const: - - Place - default: - - Place - items: - type: string - enum: - - Place - address: - title: Postal Address - description: The postal address for an organization or place. - type: object - properties: - type: - type: array - readOnly: true - const: - - PostalAddress - default: - - PostalAddress - items: - type: string - enum: - - PostalAddress - streetAddress: - title: Street Address - description: >- - The street address expressed as free form text. The street address is - printed on paper as the first lines below the name. For example, the name - of the street and the number in the street or the name of a building. - type: string - addressLocality: - title: Address Locality - description: Text specifying the name of the locality; for example, a city. - type: string - addressRegion: - title: Address Region - description: >- - Text specifying a province or state in abbreviated format; for example, - NJ. - type: string - addressCountry: - title: Address Country - description: >- - The two-letter ISO 3166-1 alpha-2 country code. - type: string - postalCode: - title: Postal Code - description: Text specifying the postal code for an address. - type: string - additionalProperties: false - required: - - type - additionalProperties: false - required: - - type - additionalProperties: false - required: - - type - minItems: 0 - maxItems: 1 itemsShipped: title: Items Shipped description: Itemized list of shipped goods. @@ -513,6 +405,142 @@ properties: - type minItems: 1 maxItems: 1000 + shipment: + title: Shipment + description: Details about the shipment being made + type: object + properties: + type: + type: array + items: + type: object + properties: + type: + type: array + readOnly: true + const: + - Shipment + default: + - Shipment + items: + type: string + enum: + - Shipment + termsOfDelivery: + title: Terms of Delivery + description: The conditions agreed upon between the parties with regard to the delivery of goods and or services. + type: string + shipmentMethod: + title: Shipment Method + description: The method in which the goods in the invoice are being shipped + type: string + shipTo: + title: Ship To (optional) + description: The organization of the party receiving the products (consignee) and their address if different from the buyer + type: array + items: + type: object + properties: + type: + type: array + readOnly: true + const: + - Organization + default: + - Organization + items: + type: string + enum: + - Organization + id: + title: Identifier + description: Identifier for the consginee. + type: string + name: + title: Name + description: Name of the consginee. + type: string + url: + title: URL + description: URL of the consignee. + type: string + email: + title: Email Address + description: Consignee's primary email address. + type: string + phoneNumber: + title: Phone Number + description: Consignee's contact phone number. + type: string + location: + title: Location + description: Consignee's physical location, such as address or coordinates. + type: object + properties: + type: + type: array + readOnly: true + const: + - Place + default: + - Place + items: + type: string + enum: + - Place + address: + title: Postal Address + description: The postal address for an organization or place. + type: object + properties: + type: + type: array + readOnly: true + const: + - PostalAddress + default: + - PostalAddress + items: + type: string + enum: + - PostalAddress + streetAddress: + title: Street Address + description: >- + The street address expressed as free form text. The street address is + printed on paper as the first lines below the name. For example, the name + of the street and the number in the street or the name of a building. + type: string + addressLocality: + title: Address Locality + description: Text specifying the name of the locality; for example, a city. + type: string + addressRegion: + title: Address Region + description: >- + Text specifying a province or state in abbreviated format; for example, + NJ. + type: string + addressCountry: + title: Address Country + description: >- + The two-letter ISO 3166-1 alpha-2 country code. + type: string + postalCode: + title: Postal Code + description: Text specifying the postal code for an address. + type: string + additionalProperties: false + required: + - type + additionalProperties: false + required: + - type + additionalProperties: false + required: + - type + minItems: 0 + maxItems: 1 proof: title: proof description: A JSON Web Signature proof for a credential as defined by the VC data model @@ -550,11 +578,11 @@ example: |- "https://www.w3.org/2018/credentials/v1", "https://w3id.org/traceability/v1" ], - "id": "urn:uuid:5e45f155-c949-4005-a7e5-26ni58b6a59a", "type": [ "VerifiableCredential", "CommercialInvoiceCredential" ], + "id": "urn:uuid:5e45f155-c949-4005-a7e5-26ni58b6a59a", "issuanceDate": "2022-02-23T11:55:00Z", "issuer": { "type": [ @@ -588,15 +616,11 @@ example: |- "phoneNumber": "555-867-5309" } }, - "credentialSchema": { - "id": "https://w3id.org/traceability/openapi/components/schemas/credentials/EInvoiceCredential.yml", - "type": "OpenApiSpecificationValidator2022" - } "credentialSubject": { "type": [ "Invoice" ], - "linkedDocuments" : [ + "relatedDocuments" : [ { "type": "LinkedDocument", "documentId": "a5d1ca6c-2c06-4039-9ff9-a75d7a695c8d", @@ -635,33 +659,9 @@ example: |- } } }, - "consignee": [ - { - "type": [ - "Organization" - ], - "id": "did:web:generic-motors.example.com", - "name": "Generic Motors of America", - "location": { - "type": [ - "Place" - ], - "address": { - "type": [ - "PostalAddress" - ], - "streetAddress": "12 Generic Motors Dr", - "addressLocality": "Detroit", - "addressRegion": "Michigan", - "postalCode": "48232-5170", - "addressCountry": "US" - } - } - } - ], "itemsShipped" : [ { - "type": "TradeLineItem", + "type": ["TradeLineItem"], "name": "Rebar", "description": "Round Rebar used for Construction", "productIdentifier": "rn19082-a", @@ -670,6 +670,41 @@ example: |- "netWeight": 1, "netWeightUnit": "tonne" } - ] + ], + "shipment": { + "type" : [ + "Shipment" + ], + "termsOfDelivery": "full payment before shipment", + "shipmentMethod": "Tailer No. 53103", + "shipTo": [ + { + "type": [ + "Organization" + ], + "id": "did:web:generic-motors.example.com", + "name": "Generic Motors of America", + "location": { + "type": [ + "Place" + ], + "address": { + "type": [ + "PostalAddress" + ], + "streetAddress": "12 Generic Motors Dr", + "addressLocality": "Detroit", + "addressRegion": "Michigan", + "postalCode": "48232-5170", + "addressCountry": "US" + } + } + } + ] + } + }, + "credentialSchema": { + "id": "https://w3id.org/traceability/openapi/components/schemas/credentials/EInvoiceCredential.yml", + "type": "OpenApiSpecificationValidator2022" } } \ No newline at end of file diff --git a/packages/traceability-tests/examples/v2.json b/packages/traceability-tests/examples/v2.json index b0b682f03..60d5a0411 100644 --- a/packages/traceability-tests/examples/v2.json +++ b/packages/traceability-tests/examples/v2.json @@ -9,7 +9,7 @@ }, "examples": [ { - "issued": "eyJpc3MiOiJkaWQ6andrOmV5SnJkSGtpT2lKRlF5SXNJbU55ZGlJNklsQXRNemcwSWl3aVlXeG5Jam9pUlZNek9EUWlMQ0o0SWpvaU9XcHpSbEpXVm1weFNsazFTa2w1U25JMU9HZEZRblZ5YW10emFreHdUVUp2V1ZaRFpUWmxNRUo2VXpoQlV6Tk1RWGx5TjNoTGVGTm5VRTlwVUdOSFRTSXNJbmtpT2lKaWRIUk1YMlpWYTNSa2NpMU1hSGhOWTNwSmFtbDBaRnBXY0c5cGFYcHBVR2xuT0cxbk9ERmlkR1ZVVW0welFtcGFMV3c0ZFU1cWRrcExZV3RuVWpOQ0luMCIsImtpZCI6IiMwIiwiYWxnIjoiRVMzODQiLCJjdHkiOiJ2YytsZCtqc29uIn0.eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vd3d3LnczLm9yZy9ucy9hY3Rpdml0eXN0cmVhbXMiXSwiaWQiOiJ1cm46dXVpZDo0OWRmODliNC03NjYyLTQxOGUtYjIzYi1mYmVmZTgyMWZiMGQiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiQWN0aXZpdHlQdWJBY3RvckNhcmQiXSwiY3JlZGVudGlhbFNjaG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iIsInByZWZlcnJlZFVzZXJuYW1lIjoia2Vuem9pc2hpaSIsIm5hbWUiOiLnn7PkupXlgaXolLUiLCJzdW1tYXJ5Ijoi44GT44Gu5pa544Gv44Gf44Gg44Gu5L6L44Gn44GZIiwiaWNvbiI6WyJodHRwczovL2tlbnpvaXNoaWkuZXhhbXBsZS5jb20vaW1hZ2UvMTY1OTg3YWtscmU0Il19fQ.UZ6CHaJ43KMUvc-3J91fAsKeZVCQdodBnj_6439fHHuH8xlSAWv-naZGpfADakzBXKAOwlkTLzm83EXY2AioxvB8IB4zciFN6_NsNYODjaoMPTCclJLxaTpCgppdu_iR", "verified": { "protectedHeader": { "iss": "did:jwk:eyJrdHkiOiJFQyIsImNydiI6IlAtMzg0IiwiYWxnIjoiRVMzODQiLCJ4IjoiOWpzRlJWVmpxSlk1Skl5SnI1OGdFQnVyamtzakxwTUJvWVZDZTZlMEJ6UzhBUzNMQXlyN3hLeFNnUE9pUGNHTSIsInkiOiJidHRMX2ZVa3Rkci1MaHhNY3pJaml0ZFpWcG9paXppUGlnOG1nODFidGVUUm0zQmpaLWw4dU5qdkpLYWtnUjNCIn0", @@ -22,7 +22,7 @@ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/ns/activitystreams" ], - "id": "urn:uuid:49df89b4-7662-418e-b23b-fbefe821fb0d", + "id": "urn:uuid:c677fca9-c955-413c-aef3-4a38d53302a9", "type": [ "VerifiableCredential", "ActivityPubActorCard"