diff --git a/agent_api_rest/postman/ssi-agent.postman_collection.json b/agent_api_rest/postman/ssi-agent.postman_collection.json index 925596c8..948a0da9 100644 --- a/agent_api_rest/postman/ssi-agent.postman_collection.json +++ b/agent_api_rest/postman/ssi-agent.postman_collection.json @@ -804,7 +804,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const receivedOfferId = lastItem.received_offer_id;", + " const receivedOfferId = lastItem.id;", "", " if (receivedOfferId) {", " pm.collectionVariables.set(\"RECEIVED_OFFER_ID\", receivedOfferId);", @@ -920,7 +920,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const holderCredentialId = lastItem.holder_credential_id;", + " const holderCredentialId = lastItem.id;", "", " if (holderCredentialId) {", " pm.collectionVariables.set(\"HOLDER_CREDENTIAL_ID\", holderCredentialId);", @@ -991,7 +991,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const presentationId = lastItem.presentation_id;", + " const presentationId = lastItem.id;", "", " if (presentationId) {", " pm.collectionVariables.set(\"PRESENTATION_ID\", presentationId);", @@ -1144,7 +1144,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const connectionId = lastItem.connection_id;", + " const connectionId = lastItem.id;", "", " if (connectionId) {", " pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);", @@ -1197,7 +1197,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const connectionId = lastItem.connection_id;", + " const connectionId = lastItem.id;", "", " if (connectionId) {", " pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);", @@ -1245,7 +1245,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const connectionId = lastItem.connection_id;", + " const connectionId = lastItem.id;", "", " if (connectionId) {", " pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);", @@ -1304,7 +1304,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const connectionId = lastItem.connection_id;", + " const connectionId = lastItem.id;", "", " if (connectionId) {", " pm.collectionVariables.set(\"CONNECTION_ID\", connectionId);", @@ -1445,7 +1445,7 @@ " const lastItem = jsonData[jsonData.length - 1];", "", " if (lastItem && typeof lastItem === 'object') {", - " const serviceId = lastItem.service_id;", + " const serviceId = lastItem.id;", "", " if (serviceId) {", " pm.collectionVariables.set(\"SERVICE_ID\", serviceId);", diff --git a/agent_holder/src/credential/aggregate.rs b/agent_holder/src/credential/aggregate.rs index 5c438743..38d510b1 100644 --- a/agent_holder/src/credential/aggregate.rs +++ b/agent_holder/src/credential/aggregate.rs @@ -17,6 +17,7 @@ pub struct Data { #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Credential { + #[serde(rename = "id")] pub holder_credential_id: String, pub received_offer_id: Option, pub signed: Option, @@ -31,7 +32,7 @@ impl Aggregate for Credential { type Services = Arc; fn aggregate_type() -> String { - "credential".to_string() + "holder_credential".to_string() } async fn handle( diff --git a/agent_holder/src/offer/aggregate.rs b/agent_holder/src/offer/aggregate.rs index a3f667fa..16bed424 100644 --- a/agent_holder/src/offer/aggregate.rs +++ b/agent_holder/src/offer/aggregate.rs @@ -32,6 +32,7 @@ pub struct OfferCredential { #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Offer { + #[serde(rename = "id")] pub received_offer_id: String, pub credential_offer: Option, pub status: Status, @@ -51,7 +52,7 @@ impl Aggregate for Offer { type Services = Arc; fn aggregate_type() -> String { - "offer".to_string() + "received_offer".to_string() } async fn handle(&self, command: Self::Command, services: &Self::Services) -> Result, Self::Error> { diff --git a/agent_holder/src/presentation/aggregate.rs b/agent_holder/src/presentation/aggregate.rs index bcd2a167..3b9524d9 100644 --- a/agent_holder/src/presentation/aggregate.rs +++ b/agent_holder/src/presentation/aggregate.rs @@ -13,6 +13,7 @@ use tracing::info; #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Presentation { + #[serde(rename = "id")] pub presentation_id: String, pub signed: Option, } diff --git a/agent_identity/src/connection/aggregate.rs b/agent_identity/src/connection/aggregate.rs index 6ad490e3..bff961fd 100644 --- a/agent_identity/src/connection/aggregate.rs +++ b/agent_identity/src/connection/aggregate.rs @@ -12,6 +12,7 @@ use super::{command::ConnectionCommand, error::ConnectionError, event::Connectio #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Connection { + #[serde(rename = "id")] pub connection_id: String, pub alias: Option, pub domain: Option, diff --git a/agent_identity/src/document/aggregate.rs b/agent_identity/src/document/aggregate.rs index c8f3e06d..b53ffa04 100644 --- a/agent_identity/src/document/aggregate.rs +++ b/agent_identity/src/document/aggregate.rs @@ -28,7 +28,7 @@ impl Aggregate for Document { type Services = Arc; fn aggregate_type() -> String { - "credential".to_string() + "document".to_string() } async fn handle(&self, command: Self::Command, services: &Self::Services) -> Result, Self::Error> { diff --git a/agent_identity/src/service/aggregate.rs b/agent_identity/src/service/aggregate.rs index dedc2a63..d5a92384 100644 --- a/agent_identity/src/service/aggregate.rs +++ b/agent_identity/src/service/aggregate.rs @@ -32,6 +32,7 @@ pub enum ServiceResource { #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Service { + #[serde(rename = "id")] pub service_id: String, pub service: Option, pub resource: Option, diff --git a/agent_issuance/src/credential/aggregate.rs b/agent_issuance/src/credential/aggregate.rs index f66f136a..1c96469d 100644 --- a/agent_issuance/src/credential/aggregate.rs +++ b/agent_issuance/src/credential/aggregate.rs @@ -38,6 +38,7 @@ pub enum Status { #[derive(Debug, Clone, Serialize, Deserialize, Default, Derivative)] #[derivative(PartialEq)] pub struct Credential { + #[serde(rename = "id")] pub credential_id: String, pub data: Option, pub credential_configuration: CredentialConfigurationsSupportedObject, diff --git a/agent_issuance/src/offer/aggregate.rs b/agent_issuance/src/offer/aggregate.rs index 31932e90..6e7538e1 100644 --- a/agent_issuance/src/offer/aggregate.rs +++ b/agent_issuance/src/offer/aggregate.rs @@ -25,6 +25,7 @@ pub enum Status { #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Offer { + #[serde(rename = "id")] pub offer_id: String, pub credential_offer: Option, pub subject_id: Option,