diff --git a/acapy_controller/model_base.py b/acapy_controller/model_base.py index 4079224..55f30a1 100644 --- a/acapy_controller/model_base.py +++ b/acapy_controller/model_base.py @@ -18,9 +18,9 @@ class BaseModel(PydanticBaseModel): def serialize(self): """Serialize the model to a dictionary.""" - return self.dict(by_alias=True, exclude_unset=True, exclude_none=True) + return self.model_dump(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def deserialize(cls: Type[T], value: Mapping[str, Any]) -> T: """Deserialize a dictionary to a model.""" - return cls.parse_obj(value) + return cls.model_validate(value) diff --git a/acapy_controller/models.py b/acapy_controller/models.py index ba9acf3..2812dc2 100644 --- a/acapy_controller/models.py +++ b/acapy_controller/models.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/hyperledger/aries-cloudagent-python/main/open-api/openapi.json -# timestamp: 2024-04-10T22:09:19+00:00 +# filename: openapi.json +# timestamp: 2024-07-06T22:02:03+00:00 from __future__ import annotations @@ -16,18 +16,17 @@ ) # END import check -from datetime import datetime from typing import Any, Dict, List, Literal, Optional -from pydantic import Field +from pydantic import AwareDatetime, ConfigDict, Field, RootModel from acapy_controller.model_base import BaseModel class AMLRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) aml: Optional[Dict[str, str]] = None aml_context: Optional[str] = Field(None, alias="amlContext") version: Optional[str] = None @@ -35,15 +34,15 @@ class Config: class ActionMenuModulesResult(BaseModel): pass - - class Config: - allow_population_by_field_name = True + model_config = ConfigDict( + populate_by_name=True, + ) class AdminConfig(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) config: Dict[str, Any] = Field(..., description="Configuration settings") @@ -52,9 +51,9 @@ class AdminMediationDeny(ActionMenuModulesResult): class AdminModules(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) result: Optional[List[str]] = Field(None, description="List of admin modules") @@ -67,9 +66,9 @@ class AdminShutdown(ActionMenuModulesResult): class AdminStatus(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) conductor: Optional[Dict[str, Any]] = Field( None, description="Conductor statistics" ) @@ -79,23 +78,25 @@ class Config: class AdminStatusLiveliness(BaseModel): - class Config: - allow_population_by_field_name = True - - alive: Optional[bool] = Field(None, description="Liveliness status", example=True) + model_config = ConfigDict( + populate_by_name=True, + ) + alive: Optional[bool] = Field( + None, description="Liveliness status", examples=[True] + ) class AdminStatusReadiness(BaseModel): - class Config: - allow_population_by_field_name = True - - ready: Optional[bool] = Field(None, description="Readiness status", example=True) + model_config = ConfigDict( + populate_by_name=True, + ) + ready: Optional[bool] = Field(None, description="Readiness status", examples=[True]) class AnonCredsSchema(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) attr_names: Optional[List[str]] = Field( None, alias="attrNames", description="Schema attribute names" ) @@ -103,42 +104,42 @@ class Config: None, alias="issuerId", description="Issuer Identifier of the credential definition or schema", - example="WgWxqztrNooG92RXvxSTWv", + examples=["WgWxqztrNooG92RXvxSTWv"], ) name: Optional[str] = Field( - None, description="Schema name", example="Example schema" + None, description="Schema name", examples=["Example schema"] ) - version: Optional[str] = Field(None, description="Schema version", example="1.0") + version: Optional[str] = Field(None, description="Schema version", examples=["1.0"]) class AttachDecoratorDataJWSHeader(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) kid: str = Field( ..., description="Key identifier, in W3C did:key or DID URL format", - example="did:sov:LjgpST2rjsoxYegQDRm7EL#keys-4", - regex="^did:(?:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+|sov:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}(;.*)?(\\?.*)?#.+)$", + examples=["did:sov:LjgpST2rjsoxYegQDRm7EL#keys-4"], + pattern="^did:(?:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+|sov:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}(;.*)?(\\?.*)?#.+)$", ) class AttachmentDef(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( - None, description="Attachment identifier", example="attachment-0" + None, description="Attachment identifier", examples=["attachment-0"] ) type: Optional[Literal["credential-offer", "present-proof"]] = Field( - None, description="Attachment type", example="present-proof" + None, description="Attachment type", examples=["present-proof"] ) class AttributeMimeTypesResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[Dict[str, str]] = None @@ -147,9 +148,9 @@ class BasicMessageModuleResponse(ActionMenuModulesResult): class ClaimFormat(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) jwt: Optional[Dict[str, Any]] = None jwt_vc: Optional[Dict[str, Any]] = None jwt_vp: Optional[Dict[str, Any]] = None @@ -158,22 +159,22 @@ class Config: ldp_vp: Optional[Dict[str, Any]] = None -class PurgeItem(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class PurgeItem(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Credential revocation identifier", - example="12345", - regex="^[1-9][0-9]*$", + examples=["12345"], + pattern="^[1-9][0-9]*$", ) class ClearPendingRevocationsRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) purge: Optional[Dict[str, List[PurgeItem]]] = Field( None, description="Credential revocation ids by revocation registry id: omit for all, specify null or empty list for all pending per revocation registry", @@ -181,164 +182,166 @@ class Config: class ConfigurableWriteLedgers(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) write_ledgers: Optional[List[str]] = Field( None, description="List of configurable write ledgers identifiers" ) class ConnRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) accept: Optional[Literal["manual", "auto"]] = Field( - None, description="Connection acceptance: manual or auto", example="auto" + None, description="Connection acceptance: manual or auto", examples=["auto"] ) alias: Optional[str] = Field( None, description="Optional alias to apply to connection for later use", - example="Bob, providing quotes", + examples=["Bob, providing quotes"], ) connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) connection_protocol: Optional[ Literal["connections/1.0", "didexchange/1.0", "didexchange/1.1"] - ] = Field(None, description="Connection protocol used", example="connections/1.0") + ] = Field( + None, description="Connection protocol used", examples=["connections/1.0"] + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) error_msg: Optional[str] = Field( None, description="Error message", - example="No DIDDoc provided; cannot connect to public DID", + examples=["No DIDDoc provided; cannot connect to public DID"], ) inbound_connection_id: Optional[str] = Field( None, description="Inbound routing connection id to use", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) invitation_key: Optional[str] = Field( None, description="Public key for connection", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) invitation_mode: Optional[Literal["once", "multi", "static"]] = Field( - None, description="Invitation mode", example="once" + None, description="Invitation mode", examples=["once"] ) invitation_msg_id: Optional[str] = Field( None, description="ID of out-of-band invitation message", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) my_did: Optional[str] = Field( None, description="Our DID for connection", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) request_id: Optional[str] = Field( None, description="Connection request identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) rfc23_state: Optional[str] = Field( - None, description="State per RFC 23", example="invitation-sent" + None, description="State per RFC 23", examples=["invitation-sent"] ) state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) their_did: Optional[str] = Field( None, description="Their DID for connection", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) their_label: Optional[str] = Field( - None, description="Their label for connection", example="Bob" + None, description="Their label for connection", examples=["Bob"] ) their_public_did: Optional[str] = Field( None, description="Other agent's public DID for connection", - example="2cpBmR3FqGKWi5EyUbpRY8", + examples=["2cpBmR3FqGKWi5EyUbpRY8"], ) their_role: Optional[Literal["invitee", "requester", "inviter", "responder"]] = ( Field( None, description="Their role in the connection protocol", - example="requester", + examples=["requester"], ) ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) -class RecipientKey(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class RecipientKey(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Recipient public key", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) -class RoutingKey(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class RoutingKey(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Routing key", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) class ConnectionInvitation(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) did: Optional[str] = Field( None, description="DID for connection invitation", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) image_url: Optional[str] = Field( None, alias="imageUrl", description="Optional image URL for connection invitation", - example="http://192.168.56.101/img/logo.jpg", + examples=["http://192.168.56.101/img/logo.jpg"], ) label: Optional[str] = Field( - None, description="Optional label for connection invitation", example="Bob" + None, description="Optional label for connection invitation", examples=["Bob"] ) recipient_keys: Optional[List[RecipientKey]] = Field( None, alias="recipientKeys", description="List of recipient keys" @@ -350,30 +353,30 @@ class Config: None, alias="serviceEndpoint", description="Service endpoint at which to reach this agent", - example="http://192.168.56.101:8020", + examples=["http://192.168.56.101:8020"], ) class ConnectionList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: List[ConnRecord] = Field(..., description="List of connection records") class ConnectionMetadata(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[Dict[str, Any]] = Field( None, description="Dictionary of metadata associated with connection." ) class ConnectionMetadataSetRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) metadata: Dict[str, Any] = Field( ..., description="Dictionary of metadata to set for connection." ) @@ -384,28 +387,28 @@ class ConnectionModuleResponse(ActionMenuModulesResult): class ConnectionStaticRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) alias: Optional[str] = Field(None, description="Alias to assign to this connection") my_did: Optional[str] = Field( None, description="Local DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) my_seed: Optional[str] = Field(None, description="Seed to use for the local DID") their_did: Optional[str] = Field( None, description="Remote DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) their_endpoint: Optional[str] = Field( None, description="URL endpoint for other party", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) their_label: Optional[str] = Field( None, description="Other party's label for this connection" @@ -417,58 +420,58 @@ class Config: class ConnectionStaticResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) my_did: str = Field( ..., description="Local DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) my_endpoint: str = Field( ..., description="My URL endpoint", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) my_verkey: str = Field( ..., description="My verification key", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) record: ConnRecord their_did: str = Field( ..., description="Remote DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) their_verkey: str = Field( ..., description="Remote verification key", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) class CreateInvitationRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) mediation_id: Optional[str] = Field( None, description="Identifier for active mediation record to be used", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - regex="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + pattern="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", ) metadata: Optional[Dict[str, Any]] = Field( None, description="Optional metadata to attach to the connection created with the invitation", ) my_label: Optional[str] = Field( - None, description="Optional label for connection invitation", example="Bob" + None, description="Optional label for connection invitation", examples=["Bob"] ) recipient_keys: Optional[List[RecipientKey]] = Field( None, description="List of recipient keys" @@ -477,53 +480,53 @@ class Config: None, description="List of routing keys" ) service_endpoint: Optional[str] = Field( - None, description="Connection endpoint", example="http://192.168.56.102:8020" + None, description="Connection endpoint", examples=["http://192.168.56.102:8020"] ) class CreateWalletRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) extra_settings: Optional[Dict[str, Any]] = Field( None, description="Agent config key-value pairs" ) image_url: Optional[str] = Field( None, - description="Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", - example="https://aries.ca/images/sample.png", + description="Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", + examples=["https://aries.ca/images/sample.png"], ) key_management_mode: Optional[Literal["managed"]] = Field( None, description="Key management method to use for this wallet.", - example="managed", + examples=["managed"], ) label: Optional[str] = Field( None, - description="Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", - example="Alice", + description="Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", + examples=["Alice"], ) wallet_dispatch_type: Optional[Literal["default", "both", "base"]] = Field( None, - description="Webhook target dispatch type for this wallet. default - Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets.", - example="default", + description="Webhook target dispatch type for this wallet. default: Dispatch only to webhooks associated with this wallet. base: Dispatch only to webhooks associated with the base wallet. both: Dispatch to both webhook targets.", + examples=["default"], ) wallet_key: Optional[str] = Field( None, description="Master key used for key derivation.", - example="MySecretKey123", + examples=["MySecretKey123"], ) wallet_key_derivation: Optional[Literal["ARGON2I_MOD", "ARGON2I_INT", "RAW"]] = ( - Field(None, description="Key derivation", example="RAW") + Field(None, description="Key derivation", examples=["RAW"]) ) wallet_name: Optional[str] = Field( - None, description="Wallet name", example="MyNewWallet" + None, description="Wallet name", examples=["MyNewWallet"] ) wallet_type: Optional[Literal["askar", "askar-anoncreds", "in_memory", "indy"]] = ( Field( None, description="Type of the wallet to create. Must be same as base wallet.", - example="askar", + examples=["askar"], ) ) wallet_webhook_urls: Optional[List[str]] = Field( @@ -532,14 +535,14 @@ class Config: class CreateWalletResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) key_management_mode: Literal["managed", "unmanaged"] = Field( ..., description="Mode regarding management of wallet key" @@ -548,84 +551,88 @@ class Config: None, description="Settings for this wallet." ) state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) token: Optional[str] = Field( None, description="Authorization token to authenticate wallet requests", - example="eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + examples=[ + "eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk" + ], ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) wallet_id: str = Field( ..., description="Wallet record ID", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) class CreateWalletTokenRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) wallet_key: Optional[str] = Field( None, - description="Master key used for key derivation. Only required for unamanged wallets.", - example="MySecretKey123", + description="Master key used for key derivation. Only required for unmanaged wallets.", + examples=["MySecretKey123"], ) class CreateWalletTokenResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) token: Optional[str] = Field( None, description="Authorization token to authenticate wallet requests", - example="eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + examples=[ + "eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk" + ], ) class CredAttrSpec(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) mime_type: Optional[str] = Field( None, alias="mime-type", description="MIME type: omit for (null) default", - example="image/jpeg", + examples=["image/jpeg"], ) - name: str = Field(..., description="Attribute name", example="favourite_drink") + name: str = Field(..., description="Attribute name", examples=["favourite_drink"]) value: str = Field( ..., description="Attribute value: base64-encode if MIME type is present", - example="martini", + examples=["martini"], ) class CredDefPostOptions(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) create_transaction_for_endorser: Optional[bool] = Field( None, - description="\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign.", - example=False, + description="Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.", + examples=[False], ) endorser_connection_id: Optional[str] = Field( None, - description="\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection.", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) revocation_registry_size: Optional[int] = Field( None, description="Maximum number of credential revocations per registry", - example=1000, + examples=[1000], ) support_revocation: Optional[bool] = Field( None, description="Support credential revocation" @@ -633,51 +640,63 @@ class Config: class CredDefValuePrimarySchemaAnoncreds(BaseModel): - class Config: - allow_population_by_field_name = True - - n: Optional[str] = Field(None, example="0", regex="^[0-9]*$") + model_config = ConfigDict( + populate_by_name=True, + ) + n: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") r: Optional[Dict[str, Any]] = None - rctxt: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - s: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - z: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - + rctxt: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + s: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + z: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") -class CredDefValueRevocation1(BaseModel): - class Config: - allow_population_by_field_name = True - g: Optional[str] = Field(None, example="1 1F14F&ECB578F 2 095E45DDF417D") +class CredDefValueRevocation(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + g: Optional[str] = Field(None, examples=["1 1F14F&ECB578F 2 095E45DDF417D"]) g_dash: Optional[str] = Field( - None, example="1 1D64716fCDC00C 1 0C781960FA66E3D3 2 095E45DDF417D" + None, examples=["1 1D64716fCDC00C 1 0C781960FA66E3D3 2 095E45DDF417D"] ) - h: Optional[str] = Field(None, example="1 16675DAE54BFAE8 2 095E45DD417D") - h0: Optional[str] = Field(None, example="1 21E5EF9476EAF18 2 095E45DDF417D") - h1: Optional[str] = Field(None, example="1 236D1D99236090 2 095E45DDF417D") - h2: Optional[str] = Field(None, example="1 1C3AE8D1F1E277 2 095E45DDF417D") + h: Optional[str] = Field(None, examples=["1 16675DAE54BFAE8 2 095E45DD417D"]) + h0: Optional[str] = Field(None, examples=["1 21E5EF9476EAF18 2 095E45DDF417D"]) + h1: Optional[str] = Field(None, examples=["1 236D1D99236090 2 095E45DDF417D"]) + h2: Optional[str] = Field(None, examples=["1 1C3AE8D1F1E277 2 095E45DDF417D"]) h_cap: Optional[str] = Field( - None, example="1 1B2A32CF3167 1 2490FEBF6EE55 1 0000000000000000" + None, examples=["1 1B2A32CF3167 1 2490FEBF6EE55 1 0000000000000000"] ) - htilde: Optional[str] = Field(None, example="1 1D8549E8C0F8 2 095E45DDF417D") + htilde: Optional[str] = Field(None, examples=["1 1D8549E8C0F8 2 095E45DDF417D"]) pk: Optional[str] = Field( - None, example="1 142CD5E5A7DC 1 153885BD903312 2 095E45DDF417D" + None, examples=["1 142CD5E5A7DC 1 153885BD903312 2 095E45DDF417D"] ) u: Optional[str] = Field( - None, example="1 0C430AAB2B4710 1 1CB3A0932EE7E 1 0000000000000000" + None, examples=["1 0C430AAB2B4710 1 1CB3A0932EE7E 1 0000000000000000"] ) y: Optional[str] = Field( - None, example="1 153558BD903312 2 095E45DDF417D 1 0000000000000000" + None, examples=["1 153558BD903312 2 095E45DDF417D 1 0000000000000000"] ) -class CredDefValueRevocationSchemaAnoncreds(CredDefValueRevocation1): +class CredDefValueRevocationSchemaAnoncreds(CredDefValueRevocation): pass -class CredRevIndyRecordsResult(BaseModel): - class Config: - allow_population_by_field_name = True +class CredDefValueSchemaAnoncreds(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + primary: Optional[CredDefValuePrimarySchemaAnoncreds] = Field( + None, description="Primary value for credential definition" + ) + revocation: Optional[CredDefValueRevocationSchemaAnoncreds] = Field( + None, description="Revocation value for credential definition" + ) + +class CredRevIndyRecordsResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) rev_reg_delta: Optional[Dict[str, Any]] = Field( None, description="Indy revocation registry delta" ) @@ -688,274 +707,274 @@ class CredRevIndyRecordsResultSchemaAnoncreds(CredRevIndyRecordsResult): class CredRevokedResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) revoked: Optional[bool] = Field( None, description="Whether credential is revoked on the ledger" ) class CredentialDefinitionSendRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) revocation_registry_size: Optional[int] = Field( - None, description="Revocation registry size", example=1000, ge=4, le=32768 + None, description="Revocation registry size", examples=[1000], ge=4, le=32768 ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) support_revocation: Optional[bool] = Field( None, description="Revocation supported flag" ) tag: Optional[str] = Field( - None, description="Credential definition identifier tag", example="default" + None, description="Credential definition identifier tag", examples=["default"] ) class CredentialDefinitionSendResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) credential_definition_id: str = Field( ..., description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) -class CredentialDefinitionId(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class CredentialDefinitionId(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Credential definition identifiers", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) class CredentialDefinitionsCreatedResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) credential_definition_ids: Optional[List[CredentialDefinitionId]] = None class CredentialPreview(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) type: Optional[str] = Field( None, alias="@type", description="Message type identifier", - example="issue-credential/1.0/credential-preview", + examples=["issue-credential/1.0/credential-preview"], ) attributes: List[CredAttrSpec] class CredentialProposal(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) comment: Optional[str] = Field(None, description="Human-readable comment") cred_def_id: Optional[str] = Field( None, - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) credential_proposal: Optional[CredentialPreview] = None issuer_did: Optional[str] = Field( None, - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_id: Optional[str] = Field( None, - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) schema_issuer_did: Optional[str] = Field( None, - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_name: Optional[str] = None - schema_version: Optional[str] = Field(None, example="1.0", regex="^[0-9.]+$") + schema_version: Optional[str] = Field(None, examples=["1.0"], pattern="^[0-9.]+$") class CredentialStatusOptions(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) type: str = Field( ..., description="Credential status method type to use for the credential. Should match status method registered in the Verifiable Credential Extension Registry", - example="CredentialStatusList2017", + examples=["CredentialStatusList2017"], ) class DID(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) did: str = Field( ..., description="DID of interest", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) key_type: Literal["ed25519", "bls12381g2"] = Field( - ..., description="Key type associated with the DID", example="ed25519" + ..., description="Key type associated with the DID", examples=["ed25519"] ) metadata: Optional[Dict[str, Any]] = Field( None, description="Additional metadata associated with the DID" ) method: str = Field( - ..., description="Did method associated with the DID", example="sov" + ..., description="Did method associated with the DID", examples=["sov"] ) posture: Literal["public", "posted", "wallet_only"] = Field( ..., description="Whether DID is current public DID, posted to ledger but not current public DID, or local to the wallet", - example="wallet_only", + examples=["wallet_only"], ) verkey: str = Field( ..., description="Public verification key", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) -class DIDCreateOptions1(BaseModel): - class Config: - allow_population_by_field_name = True - +class DIDCreateOptions(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) did: Optional[str] = Field( None, description="Specify final value of the did (including did:: prefix)if the method supports or requires so.", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) key_type: Literal["ed25519", "bls12381g2"] = Field( ..., description="Key type to use for the DID keypair. Validated with the chosen DID method's supported key types.", - example="ed25519", + examples=["ed25519"], ) class DIDEndpoint(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) did: str = Field( ..., description="DID of interest", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) endpoint: Optional[str] = Field( None, description="Endpoint to set (omit to delete)", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) class DIDEndpointWithType(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) did: str = Field( ..., description="DID of interest", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) endpoint: Optional[str] = Field( None, description="Endpoint to set (omit to delete)", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) endpoint_type: Optional[Literal["Endpoint", "Profile", "LinkedDomains"]] = Field( None, description="Endpoint type to set (default 'Endpoint'); affects only public or posted DIDs", - example="Endpoint", + examples=["Endpoint"], ) class DIDList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[DID]] = Field(None, description="DID list") class DIDResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) result: Optional[DID] = None class DIDRotateRequestJSON(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) to_did: str = Field( ..., description="The DID the rotating party is rotating to", - example="did:web:example.com", + examples=["did:web:example.com"], ) class DIDXRejectRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) reason: Optional[str] = Field( None, description="Reason for rejecting the DID Exchange", - example="Request rejected", + examples=["Request rejected"], ) -class FieldIdItem(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class FieldIdItem(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="FieldID", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - regex="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + pattern="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", ) class DIFHolder(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) directive: Optional[Literal["required", "preferred"]] = Field( None, description="Preference" ) @@ -963,44 +982,46 @@ class Config: class DIFOptions(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) challenge: Optional[str] = Field( None, description="Challenge protect against replay attack", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - regex="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + pattern="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", ) domain: Optional[str] = Field( - None, description="Domain protect against replay attack", example="4jt78h47fh47" + None, + description="Domain protect against replay attack", + examples=["4jt78h47fh47"], ) class Date(BaseModel): - class Config: - allow_population_by_field_name = True - - expires_time: datetime = Field( - ..., description="Expiry Date", example="2021-03-29T05:22:19Z" + model_config = ConfigDict( + populate_by_name=True, + ) + expires_time: AwareDatetime = Field( + ..., description="Expiry Date", examples=["2021-03-29T05:22:19Z"] ) class Disclosures(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) disclosures: List[Dict[str, Any]] = Field( ..., description="List of protocol or goal_code descriptors" @@ -1008,35 +1029,35 @@ class Config: class EndorserInfo(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) endorser_did: str = Field(..., description="Endorser DID") endorser_name: Optional[str] = Field(None, description="Endorser Name") class EndpointsResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) my_endpoint: Optional[str] = Field( None, description="My endpoint", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) their_endpoint: Optional[str] = Field( None, description="Their endpoint", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) class Filter(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) const: Optional[Dict[str, Any]] = Field(None, description="Const") enum: Optional[List[Dict[str, Any]]] = None exclusive_maximum: Optional[Dict[str, Any]] = Field( @@ -1047,105 +1068,105 @@ class Config: ) format: Optional[str] = Field(None, description="Format") max_length: Optional[int] = Field( - None, alias="maxLength", description="Max Length", example=1234 + None, alias="maxLength", description="Max Length", examples=[1234] ) maximum: Optional[Dict[str, Any]] = Field(None, description="Maximum") min_length: Optional[int] = Field( - None, alias="minLength", description="Min Length", example=1234 + None, alias="minLength", description="Min Length", examples=[1234] ) minimum: Optional[Dict[str, Any]] = Field(None, description="Minimum") - not_: Optional[bool] = Field(None, alias="not", description="Not", example=False) + not_: Optional[bool] = Field(None, alias="not", description="Not", examples=[False]) pattern: Optional[str] = Field(None, description="Pattern") type: Optional[str] = Field(None, description="Type") class Generated(BaseModel): - class Config: - allow_population_by_field_name = True - - master_secret: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - number: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - remainder: Optional[str] = Field(None, example="0", regex="^[0-9]*$") + model_config = ConfigDict( + populate_by_name=True, + ) + master_secret: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + number: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + remainder: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") class GetCredDefsResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) credential_definition_ids: Optional[List[str]] = None class GetDIDEndpointResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) endpoint: Optional[str] = Field( None, description="Full verification key", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) class GetDIDVerkeyResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) verkey: Optional[str] = Field( None, description="Full verification key", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) class GetNymRoleResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) role: Optional[ Literal[ "STEWARD", "TRUSTEE", "ENDORSER", "NETWORK_MONITOR", "USER", "ROLE_REMOVE" ] - ] = Field(None, description="Ledger role", example="ENDORSER") + ] = Field(None, description="Ledger role", examples=["ENDORSER"]) class GetSchemaResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) resolution_metadata: Optional[Dict[str, Any]] = None schema_: Optional[AnonCredsSchema] = Field(None, alias="schema") schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], ) schema_metadata: Optional[Dict[str, Any]] = None class GetSchemasResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) schema_ids: Optional[List[str]] = None class Hangup(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) @@ -1153,48 +1174,63 @@ class HolderModuleResponse(ActionMenuModulesResult): pass -class IndyCredInfo(BaseModel): - class Config: - allow_population_by_field_name = True +class IndyAttrValue(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + encoded: str = Field( + ..., + description="Attribute encoded value", + examples=["-1"], + pattern="^-?[0-9]*$", + ) + raw: str = Field(..., description="Attribute raw value") + +class IndyCredInfo(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) attrs: Optional[Dict[str, str]] = Field( None, description="Attribute names and value" ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) cred_rev_id: Optional[str] = Field( None, description="Credential revocation identifier", - example="12345", - regex="^[1-9][0-9]*$", + examples=["12345"], + pattern="^[1-9][0-9]*$", ) referent: Optional[str] = Field( None, description="Wallet referent", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) rev_reg_id: Optional[str] = Field( None, description="Revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) class IndyCredRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) blinded_ms: Dict[str, Any] = Field(..., description="Blinded master secret") blinded_ms_correctness_proof: Dict[str, Any] = Field( ..., description="Blinded master secret correctness proof" @@ -1202,28 +1238,31 @@ class Config: cred_def_id: str = Field( ..., description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) nonce: str = Field( - ..., description="Nonce in credential request", example="0", regex="^[0-9]*$" + ..., + description="Nonce in credential request", + examples=["0"], + pattern="^[0-9]*$", ) prover_did: str = Field( ..., description="Prover DID/Random String/UUID", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) class IndyCredential(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: str = Field( ..., description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) rev_reg: Optional[Dict[str, Any]] = Field( None, description="Revocation registry state" @@ -1231,41 +1270,43 @@ class Config: rev_reg_id: Optional[str] = Field( None, description="Revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) schema_id: str = Field( ..., description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) signature: Dict[str, Any] = Field(..., description="Credential signature") signature_correctness_proof: Dict[str, Any] = Field( ..., description="Credential signature correctness proof" ) - values: Dict[str, Any] = Field(..., description="Credential attributes") + values: Dict[str, IndyAttrValue] = Field(..., description="Credential attributes") witness: Optional[Dict[str, Any]] = Field( None, description="Witness for revocation proof" ) class IndyEQProof(BaseModel): - class Config: - allow_population_by_field_name = True - - a_prime: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - e: Optional[str] = Field(None, example="0", regex="^[0-9]*$") + model_config = ConfigDict( + populate_by_name=True, + ) + a_prime: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + e: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") m: Optional[Dict[str, str]] = None - m2: Optional[str] = Field(None, example="0", regex="^[0-9]*$") + m2: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") revealed_attrs: Optional[Dict[str, str]] = None - v: Optional[str] = Field(None, example="0", regex="^[0-9]*$") + v: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") class IndyGEProofPred(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) attr_name: Optional[str] = Field( None, description="Attribute name, indy-canonicalized" ) @@ -1276,138 +1317,145 @@ class Config: class IndyKeyCorrectnessProof(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) c: str = Field( - ..., description="c in key correctness proof", example="0", regex="^[0-9]*$" + ..., + description="c in key correctness proof", + examples=["0"], + pattern="^[0-9]*$", ) xr_cap: List[List[str]] = Field(..., description="xr_cap in key correctness proof") xz_cap: str = Field( ..., description="xz_cap in key correctness proof", - example="0", - regex="^[0-9]*$", + examples=["0"], + pattern="^[0-9]*$", ) class IndyNonRevocProof(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) c_list: Optional[Dict[str, str]] = None x_list: Optional[Dict[str, str]] = None class IndyNonRevocationInterval(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) from_: Optional[int] = Field( None, alias="from", description="Earliest time of interest in non-revocation interval", - example=1640995199, + examples=[1640995199], ge=0, le=18446744073709551615, ) to: Optional[int] = Field( None, description="Latest time of interest in non-revocation interval", - example=1640995199, + examples=[1640995199], ge=0, le=18446744073709551615, ) class IndyPresAttrSpec(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: Optional[str] = Field( None, - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) mime_type: Optional[str] = Field( None, alias="mime-type", description="MIME type (default null)", - example="image/jpeg", + examples=["image/jpeg"], ) - name: str = Field(..., description="Attribute name", example="favourite_drink") + name: str = Field(..., description="Attribute name", examples=["favourite_drink"]) referent: Optional[str] = Field( - None, description="Credential referent", example="0" + None, description="Credential referent", examples=["0"] + ) + value: Optional[str] = Field( + None, description="Attribute value", examples=["martini"] ) - value: Optional[str] = Field(None, description="Attribute value", example="martini") class IndyPresPredSpec(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) - name: str = Field(..., description="Attribute name", example="high_score") + name: str = Field(..., description="Attribute name", examples=["high_score"]) predicate: Literal["<", "<=", ">=", ">"] = Field( - ..., description="Predicate type ('<', '<=', '>=', or '>')", example=">=" + ..., description="Predicate type ('<', '<=', '>=', or '>')", examples=[">="] ) threshold: int = Field(..., description="Threshold value") class IndyPresPreview(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) type: Optional[str] = Field( None, alias="@type", description="Message type identifier", - example="https://didcomm.org/present-proof/1.0/presentation-preview", + examples=["https://didcomm.org/present-proof/1.0/presentation-preview"], ) attributes: List[IndyPresAttrSpec] predicates: List[IndyPresPredSpec] class IndyProofIdentifier(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) rev_reg_id: Optional[str] = Field( None, description="Revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) timestamp: Optional[int] = Field( None, description="Timestamp epoch", - example=1640995199, + examples=[1640995199], ge=0, le=18446744073709551615, ) -class IndyProofProofAggregatedProof1(BaseModel): - class Config: - allow_population_by_field_name = True - +class IndyProofProofAggregatedProof(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) c_hash: Optional[str] = Field(None, description="c_hash value") c_list: Optional[List[List[int]]] = Field(None, description="c_list value") @@ -1425,31 +1473,31 @@ class IndyProofRequestNonRevoked1(IndyNonRevocationInterval): class IndyProofRequestedProofPredicate(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) sub_proof_index: Optional[int] = Field(None, description="Sub-proof index") class IndyProofRequestedProofRevealedAttr(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) encoded: Optional[str] = Field( - None, description="Encoded value", example="-1", regex="^-?[0-9]*$" + None, description="Encoded value", examples=["-1"], pattern="^-?[0-9]*$" ) raw: Optional[str] = Field(None, description="Raw value") sub_proof_index: Optional[int] = Field(None, description="Sub-proof index") class IndyRequestedCredsRequestedAttr(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_id: str = Field( ..., description="Wallet credential identifier (typically but not necessarily a UUID)", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) revealed: Optional[bool] = Field( None, description="Whether to reveal attribute in proof (default true)" @@ -1457,46 +1505,48 @@ class Config: class IndyRequestedCredsRequestedPred(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_id: str = Field( ..., description="Wallet credential identifier (typically but not necessarily a UUID)", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) timestamp: Optional[int] = Field( None, description="Epoch timestamp of interest for non-revocation proof", - example=1640995199, + examples=[1640995199], ge=0, le=18446744073709551615, ) class IndyRevRegDefValuePublicKeysAccumKey(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) z: Optional[str] = Field( - None, description="Value for z", example="1 120F522F81E6B7 1 09F7A59005C4939854" + None, + description="Value for z", + examples=["1 120F522F81E6B7 1 09F7A59005C4939854"], ) -class IndyRevRegEntryValue1(BaseModel): - class Config: - allow_population_by_field_name = True - +class IndyRevRegEntryValue(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) accum: Optional[str] = Field( None, description="Accumulator value", - example="21 11792B036AED0AAA12A4 4 298B2571FFC63A737", + examples=["21 11792B036AED0AAA12A4 4 298B2571FFC63A737"], ) prev_accum: Optional[str] = Field( None, alias="prevAccum", description="Previous accumulator value", - example="21 137AC810975E4 6 76F0384B6F23", + examples=["21 137AC810975E4 6 76F0384B6F23"], ) revoked: Optional[List[int]] = Field( None, description="Revoked credential revocation identifiers" @@ -1504,48 +1554,48 @@ class Config: class InnerCredDef(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) issuer_id: str = Field( ..., alias="issuerId", description="Issuer Identifier of the credential definition", - example="WgWxqztrNooG92RXvxSTWv", + examples=["WgWxqztrNooG92RXvxSTWv"], ) schema_id: str = Field( ..., alias="schemaId", description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], ) - tag: str = Field(..., description="Credential definition tag", example="default") + tag: str = Field(..., description="Credential definition tag", examples=["default"]) class InnerRevRegDef(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: Optional[str] = Field( None, alias="credDefId", description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], ) issuer_id: Optional[str] = Field( None, alias="issuerId", description="Issuer Identifier of the credential definition or schema", - example="WgWxqztrNooG92RXvxSTWv", + examples=["WgWxqztrNooG92RXvxSTWv"], ) max_cred_num: Optional[int] = Field( None, alias="maxCredNum", description="Maximum number of credential revocations per registry", - example=777, + examples=[777], ) tag: Optional[str] = Field( - None, description="tag for revocation registry", example="default" + None, description="tag for revocation registry", examples=["default"] ) @@ -1554,16 +1604,16 @@ class IntroModuleResponse(ActionMenuModulesResult): class InvitationCreateRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) accept: Optional[List[str]] = Field( None, description="List of mime type in order of preference that should be use in responding to the message", - example=["didcomm/aip1", "didcomm/aip2;env=rfc19"], + examples=[["didcomm/aip1", "didcomm/aip2;env=rfc19"]], ) alias: Optional[str] = Field( - None, description="Alias for connection", example="Barry" + None, description="Alias for connection", examples=["Barry"] ) attachments: Optional[List[AttachmentDef]] = Field( None, description="Optional invitation attachments" @@ -1571,19 +1621,19 @@ class Config: goal: Optional[str] = Field( None, description="A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message", - example="To issue a Faber College Graduate credential", + examples=["To issue a Faber College Graduate credential"], ) goal_code: Optional[str] = Field( None, description="A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message", - example="issue-vc", + examples=["issue-vc"], ) handshake_protocols: Optional[List[str]] = None mediation_id: Optional[str] = Field( None, description="Identifier for active mediation record to be used", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - regex="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + pattern="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", ) metadata: Optional[Dict[str, Any]] = Field( None, @@ -1592,19 +1642,19 @@ class Config: my_label: Optional[str] = Field( None, description="Label for connection invitation", - example="Invitation to Barry", + examples=["Invitation to Barry"], ) protocol_version: Optional[str] = Field( - None, description="OOB protocol version", example="1.1" + None, description="OOB protocol version", examples=["1.1"] ) use_did: Optional[str] = Field( - None, description="DID to use in invitation", example="did:example:123" + None, description="DID to use in invitation", examples=["did:example:123"] ) use_did_method: Optional[Literal["did:peer:2", "did:peer:4"]] = Field( - None, description="DID method to use in invitation", example="did:peer:2" + None, description="DID method to use in invitation", examples=["did:peer:2"] ) use_public_did: Optional[bool] = Field( - None, description="Whether to use public DID in invitation", example=False + None, description="Whether to use public DID in invitation", examples=[False] ) @@ -1613,19 +1663,19 @@ class InvitationRecordResponse(ActionMenuModulesResult): class InvitationResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) invitation: ConnectionInvitation invitation_url: str = Field( ..., description="Invitation URL", - example="http://192.168.56.101:8020/invite?c_i=eyJAdHlwZSI6Li4ufQ==", + examples=["http://192.168.56.101:8020/invite?c_i=eyJAdHlwZSI6Li4ufQ=="], ) @@ -1634,25 +1684,25 @@ class IssueCredentialModuleResponse(ActionMenuModulesResult): class IssuerCredRevRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) cred_ex_id: Optional[str] = Field( None, description="Credential exchange record identifier at credential issue", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_ex_version: Optional[str] = Field( None, description="Credential exchange version" @@ -1660,40 +1710,44 @@ class Config: cred_rev_id: Optional[str] = Field( None, description="Credential revocation identifier", - example="12345", - regex="^[1-9][0-9]*$", + examples=["12345"], + pattern="^[1-9][0-9]*$", ) record_id: Optional[str] = Field( None, description="Issuer credential revocation record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) rev_reg_id: Optional[str] = Field( None, description="Revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) state: Optional[str] = Field( - None, description="Issue credential revocation record state", example="issued" + None, + description="Issue credential revocation record state", + examples=["issued"], ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) class IssuerCredRevRecordSchemaAnoncreds(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier" @@ -1701,7 +1755,7 @@ class Config: cred_ex_id: Optional[str] = Field( None, description="Credential exchange record identifier at credential issue", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_ex_version: Optional[str] = Field( None, description="Credential exchange version" @@ -1712,31 +1766,33 @@ class Config: record_id: Optional[str] = Field( None, description="Issuer credential revocation record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) rev_reg_id: Optional[str] = Field( None, description="Revocation registry identifier" ) state: Optional[str] = Field( - None, description="Issue credential revocation record state", example="issued" + None, + description="Issue credential revocation record state", + examples=["issued"], ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) class JWSCreate(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) did: Optional[str] = Field( None, description="DID of interest", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) headers: Optional[Dict[str, Any]] = None payload: Dict[str, Any] @@ -1744,26 +1800,30 @@ class Config: None, alias="verificationMethod", description="Information used for proof verification", - example="did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", - regex="\\w+:(\\/?\\/?)[^\\s]+", + examples=[ + "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL" + ], + pattern="\\w+:(\\/?\\/?)[^\\s]+", ) class JWSVerify(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) jwt: Optional[str] = Field( None, - example="eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", - regex="^[a-zA-Z0-9_-]+\\.[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]+$", + examples=[ + "eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk" + ], + pattern="^[a-zA-Z0-9_-]+\\.[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]+$", ) class JWSVerifyResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) error: Optional[str] = Field(None, description="Error text") headers: Dict[str, Any] = Field(..., description="Headers from verified JWT.") kid: str = Field(..., description="kid of signer") @@ -1772,117 +1832,172 @@ class Config: class KeylistQueryFilterRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) filter: Optional[Dict[str, Any]] = Field( None, description="Filter for keylist query" ) -class KeylistQueryPaginate1(BaseModel): - class Config: - allow_population_by_field_name = True - +class KeylistQueryPaginate(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) limit: Optional[int] = Field( - None, description="Limit for keylist query", example=30 + None, description="Limit for keylist query", examples=[30] + ) + offset: Optional[int] = Field( + None, description="Offset value for query", examples=[0] ) - offset: Optional[int] = Field(None, description="Offset value for query", example=0) class KeylistUpdateRule(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) action: Literal["add", "remove"] = Field( - ..., description="Action for specific key", example="add" + ..., description="Action for specific key", examples=["add"] ) recipient_key: str = Field( ..., description="Key to remove or add", - example="did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH", - regex="^did:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$|^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"], + pattern="^did:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$|^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) -class LedgerConfigInstance(BaseModel): - class Config: - allow_population_by_field_name = True - - genesis_file: Optional[str] = Field(None, description="genesis_file") - genesis_transactions: Optional[str] = Field( - None, description="genesis_transactions" +class LDProofVCOptions(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - genesis_url: Optional[str] = Field(None, description="genesis_url") - id: Optional[str] = Field(None, description="ledger_id") - is_production: Optional[bool] = Field(None, description="is_production") - - -class LedgerConfigList(BaseModel): - class Config: - allow_population_by_field_name = True - - ledger_config_list: List[LedgerConfigInstance] - - -class LedgerModulesResult(ActionMenuModulesResult): - pass - - -class LinkedDataProof(BaseModel): - class Config: - allow_population_by_field_name = True - challenge: Optional[str] = Field( None, - description="Associates a challenge with a proof, for use with a proofPurpose such as authentication", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="A challenge to include in the proof. SHOULD be provided by the requesting party of the credential (=holder)", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - created: str = Field( - ..., - description="The string value of an ISO8601 combined date and time string generated by the Signature Algorithm", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + created: Optional[str] = Field( + None, + description="The date and time of the proof (with a maximum accuracy in seconds). Defaults to current system time", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) - domain: Optional[str] = Field( + credential_status: Optional[CredentialStatusOptions] = Field( None, - description="A string value specifying the restricted domain of the signature.", - example="https://example.com", - regex="\\w+:(\\/?\\/?)[^\\s]+", + alias="credentialStatus", + description="The credential status mechanism to use for the credential. Omitting the property indicates the issued credential will not include a credential status", + ) + domain: Optional[str] = Field( + None, + description="The intended domain of validity for the proof", + examples=["example.com"], + ) + proof_purpose: Optional[str] = Field( + None, + alias="proofPurpose", + description="The proof purpose used for the proof. Should match proof purposes registered in the Linked Data Proofs Specification", + examples=["assertionMethod"], + ) + proof_type: Optional[str] = Field( + None, + alias="proofType", + description="The proof type used for the proof. Should match suites registered in the Linked Data Cryptographic Suite Registry", + examples=["Ed25519Signature2018"], + ) + verification_method: Optional[str] = Field( + None, + alias="verificationMethod", + description="The verification method to use for the proof. Should match a verification method in the wallet", + examples=["did:example:123456#key-1"], + ) + + +class LedgerConfigInstance(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + genesis_file: Optional[str] = Field(None, description="genesis_file") + genesis_transactions: Optional[str] = Field( + None, description="genesis_transactions" + ) + genesis_url: Optional[str] = Field(None, description="genesis_url") + id: Optional[str] = Field(None, description="ledger_id") + is_production: Optional[bool] = Field(None, description="is_production") + + +class LedgerConfigList(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + ledger_config_list: List[LedgerConfigInstance] + + +class LedgerModulesResult(ActionMenuModulesResult): + pass + + +class LinkedDataProof(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + challenge: Optional[str] = Field( + None, + description="Associates a challenge with a proof, for use with a proofPurpose such as authentication", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + created: str = Field( + ..., + description="The string value of an ISO8601 combined date and time string generated by the Signature Algorithm", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + domain: Optional[str] = Field( + None, + description="A string value specifying the restricted domain of the signature.", + examples=["https://example.com"], + pattern="\\w+:(\\/?\\/?)[^\\s]+", ) jws: Optional[str] = Field( None, description="Associates a Detached Json Web Signature with a proof", - example="eyJhbGciOiAiRWREUc2UsICJjcml0IjogWyJiNjQiXX0..lKJU0Df_keblRKhZAS9Qq6zybm-HqUXNVZ8vgEPNTAjQ1Ch6YBKY7UBAjg6iBX5qBQ", + examples=[ + "eyJhbGciOiAiRWREUc2UsICJjcml0IjogWyJiNjQiXX0..lKJU0Df_keblRKhZAS9Qq6zybm-HqUXNVZ8vgEPNTAjQ1Ch6YBKY7UBAjg6iBX5qBQ" + ], ) nonce: Optional[str] = Field( None, description="The nonce", - example="CF69iO3nfvqRsRBNElE8b4wO39SyJHPM7Gg1nExltW5vSfQA1lvDCR/zXX1To0/4NLo==", + examples=[ + "CF69iO3nfvqRsRBNElE8b4wO39SyJHPM7Gg1nExltW5vSfQA1lvDCR/zXX1To0/4NLo==" + ], ) proof_purpose: str = Field( ..., alias="proofPurpose", description="Proof purpose", - example="assertionMethod", + examples=["assertionMethod"], ) proof_value: Optional[str] = Field( None, alias="proofValue", description="The proof value of a proof", - example="sy1AahqbzJQ63n9RtekmwzqZeVj494VppdAVJBnMYrTwft6cLJJGeTSSxCCJ6HKnRtwE7jjDh6sB2z2AAiZY9BBnCD8wUVgwqH3qchGRCuC2RugA4eQ9fUrR4Yuycac3caiaaay", + examples=[ + "sy1AahqbzJQ63n9RtekmwzqZeVj494VppdAVJBnMYrTwft6cLJJGeTSSxCCJ6HKnRtwE7jjDh6sB2z2AAiZY9BBnCD8wUVgwqH3qchGRCuC2RugA4eQ9fUrR4Yuycac3caiaaay" + ], ) type: str = Field( ..., description="Identifies the digital signature suite that was used to create the signature", - example="Ed25519Signature2018", + examples=["Ed25519Signature2018"], ) verification_method: str = Field( ..., alias="verificationMethod", description="Information used for proof verification", - example="did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", - regex="\\w+:(\\/?\\/?)[^\\s]+", + examples=[ + "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL" + ], + pattern="\\w+:(\\/?\\/?)[^\\s]+", ) @@ -1899,61 +2014,61 @@ class MediationDeny(Hangup): class MediationGrant(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) endpoint: Optional[str] = Field( None, description="endpoint on which messages destined for the recipient are received.", - example="http://192.168.56.102:8020/", + examples=["http://192.168.56.102:8020/"], ) routing_keys: Optional[List[str]] = None class MediationIdMatchInfo(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) mediation_id: str = Field( ..., description="Mediation record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) -class RoutingKey2(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class RoutingKey2(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., - example="did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH", - regex="^did:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$", + examples=["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"], + pattern="^did:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$", ) class MediationRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) connection_id: str created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) endpoint: Optional[str] = None mediation_id: Optional[str] = None @@ -1962,37 +2077,37 @@ class Config: role: str routing_keys: Optional[List[RoutingKey2]] = None state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) class MenuFormParam(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) default: Optional[str] = Field( - None, description="Default parameter value", example="0" + None, description="Default parameter value", examples=["0"] ) description: Optional[str] = Field( None, description="Additional descriptive text for menu form parameter", - example="Delay in seconds before starting", + examples=["Delay in seconds before starting"], ) - name: str = Field(..., description="Menu parameter name", example="delay") + name: str = Field(..., description="Menu parameter name", examples=["delay"]) required: Optional[bool] = Field( - None, description="Whether parameter is required", example=False + None, description="Whether parameter is required", examples=[False] ) title: str = Field( - ..., description="Menu parameter title", example="Delay in seconds" + ..., description="Menu parameter title", examples=["Delay in seconds"] ) type: Optional[str] = Field( - None, description="Menu form parameter input type", example="int" + None, description="Menu form parameter input type", examples=["int"] ) @@ -2001,136 +2116,198 @@ class MultitenantModuleResponse(ActionMenuModulesResult): class PerformRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - name: Optional[str] = Field(None, description="Menu option name", example="Query") + model_config = ConfigDict( + populate_by_name=True, + ) + name: Optional[str] = Field( + None, description="Menu option name", examples=["Query"] + ) params: Optional[Dict[str, str]] = Field(None, description="Input parameter values") class PingRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) comment: Optional[str] = Field(None, description="Comment for the ping message") class PingRequestResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) thread_id: Optional[str] = Field(None, description="Thread ID of the ping message") -class PresentationProposal(BaseModel): - class Config: - allow_population_by_field_name = True +class Presentation(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + context: List[Dict[str, Any]] = Field( + ..., + alias="@context", + description="The JSON-LD context of the presentation", + examples=[["https://www.w3.org/2018/credentials/v1"]], + ) + holder: Optional[Dict[str, Any]] = Field( + None, + description="The JSON-LD Verifiable Credential Holder. Either string of object with id field.", + examples=["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"], + ) + id: Optional[str] = Field( + None, + description="The ID of the presentation", + examples=["http://example.edu/presentations/1872"], + pattern="\\w+:(\\/?\\/?)[^\\s]+", + ) + proof: Optional[LinkedDataProof] = Field( + None, + description="The proof of the presentation", + examples=[ + { + "created": "2019-12-11T03:50:55", + "jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0JiNjQiXX0..lKJU0Df_keblRKhZAS9Qq6zybm-HqUXNVZ8vgEPNTAjQKBhQDxvXNo7nvtUBb_Eq1Ch6YBKY5qBQ", + "proofPurpose": "assertionMethod", + "type": "Ed25519Signature2018", + "verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", + } + ], + ) + type: List[str] = Field( + ..., + description="The JSON-LD type of the presentation", + examples=[["VerifiablePresentation"]], + ) + verifiable_credential: Optional[List[Dict[str, Any]]] = Field( + None, alias="verifiableCredential" + ) + +class PresentationProposal(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) comment: Optional[str] = Field(None, description="Human-readable comment") presentation_proposal: IndyPresPreview class ProfileSettings(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) settings: Optional[Dict[str, Any]] = Field( None, description="Profile settings dict", - example={ - "debug.invite_public": True, - "log.level": "INFO", - "public_invites": False, - }, + examples=[ + {"debug.invite_public": True, "log.level": "INFO", "public_invites": False} + ], ) class ProtocolDescriptor(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) pid: str roles: Optional[List[str]] = Field(None, description="List of roles") +class ProvePresentationRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + options: Optional[LDProofVCOptions] = None + presentation: Optional[Presentation] = None + + class Rrid2cridItem(PurgeItem): pass -class PublishRevocationsOptions(BaseModel): - class Config: - allow_population_by_field_name = True +class PublishRevocations(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + rrid2crid: Optional[Dict[str, List[Rrid2cridItem]]] = Field( + None, description="Credential revocation ids by revocation registry id" + ) + +class PublishRevocationsOptions(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) create_transaction_for_endorser: Optional[bool] = Field( None, - description="\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign.", - example=False, + description="Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.", + examples=[False], ) endorser_connection_id: Optional[str] = Field( None, - description="\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection.", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) -class PublishRevocationsResult(BaseModel): - class Config: - allow_population_by_field_name = True +class PublishRevocationsResultSchemaAnoncreds(PublishRevocations): + pass + +class PublishRevocationsSchemaAnoncreds(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + options: Optional[PublishRevocationsOptions] = None rrid2crid: Optional[Dict[str, List[Rrid2cridItem]]] = Field( None, description="Credential revocation ids by revocation registry id" ) -class PublishRevocationsSchemaAnoncreds(PublishRevocationsResult): - pass - - class PurposeResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) controller: Optional[Dict[str, Any]] = None error: Optional[str] = None valid: Optional[bool] = None class Query(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) comment: Optional[str] = None query: str class QueryItem(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) feature_type: Literal["protocol", "goal-code"] = Field( ..., alias="feature-type", description="feature type" ) @@ -2138,11 +2315,11 @@ class Config: class RawEncoded(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) encoded: Optional[str] = Field( - None, description="Encoded value", example="-1", regex="^-?[0-9]*$" + None, description="Encoded value", examples=["-1"], pattern="^-?[0-9]*$" ) raw: Optional[str] = Field(None, description="Raw value") @@ -2152,35 +2329,35 @@ class RoutingKey3(RoutingKey): class ReceiveInvitationRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) did: Optional[str] = Field( None, description="DID for connection invitation", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) image_url: Optional[str] = Field( None, alias="imageUrl", description="Optional image URL for connection invitation", - example="http://192.168.56.101/img/logo.jpg", + examples=["http://192.168.56.101/img/logo.jpg"], ) label: Optional[str] = Field( - None, description="Optional label for connection invitation", example="Bob" + None, description="Optional label for connection invitation", examples=["Bob"] ) recipient_keys: Optional[List[RecipientKey]] = Field( None, alias="recipientKeys", description="List of recipient keys" @@ -2192,56 +2369,51 @@ class Config: None, alias="serviceEndpoint", description="Service endpoint at which to reach this agent", - example="http://192.168.56.101:8020", + examples=["http://192.168.56.101:8020"], ) -class RemoveWalletRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - wallet_key: Optional[str] = Field( - None, - description="Master key used for key derivation. Only required for unmanaged wallets.", - example="MySecretKey123", - ) +class RemoveWalletRequest(CreateWalletTokenRequest): + pass class ResolutionResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) did_document: Dict[str, Any] = Field(..., description="DID Document") metadata: Dict[str, Any] = Field(..., description="Resolution metadata") class RevList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) current_accumulator: Optional[str] = Field( None, alias="currentAccumulator", - description="The current accumalator value", - example="21 118...1FB", + description="The current accumulator value", + examples=["21 118...1FB"], ) issuer_id: Optional[str] = Field( None, alias="issuerId", description="Issuer Identifier of the credential definition or schema", - example="WgWxqztrNooG92RXvxSTWv", + examples=["WgWxqztrNooG92RXvxSTWv"], ) rev_reg_def_id: Optional[str] = Field( None, alias="revRegDefId", description="The ID of the revocation registry definition", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], ) revocation_list: Optional[List[int]] = Field( None, alias="revocationList", description="Bit list representing revoked credentials", - example=[0, 1, 1, 0], + examples=[[0, 1, 1, 0]], ) timestamp: Optional[int] = Field( None, description="Timestamp at which revocation list is applicable" @@ -2252,18 +2424,26 @@ class RevListOptions(PublishRevocationsOptions): pass -class RevRegCreateRequest(BaseModel): - class Config: - allow_population_by_field_name = True +class RevListState(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + revocation_list: Optional[RevList] = Field(None, description="revocation list") + state: Optional[Literal["finished", "failed", "action", "wait"]] = None + +class RevRegCreateRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) credential_definition_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) max_cred_num: Optional[int] = Field( - None, description="Revocation registry size", example=1000, ge=4, le=32768 + None, description="Revocation registry size", examples=[1000], ge=4, le=32768 ) @@ -2272,31 +2452,37 @@ class RevRegDefOptions(PublishRevocationsOptions): class RevRegDefValue(BaseModel): - class Config: - allow_population_by_field_name = True - - max_cred_num: Optional[int] = Field(None, alias="maxCredNum", example=777) + model_config = ConfigDict( + populate_by_name=True, + ) + max_cred_num: Optional[int] = Field(None, alias="maxCredNum", examples=[777]) public_keys: Optional[Dict[str, Any]] = Field( - None, alias="publicKeys", example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" + None, + alias="publicKeys", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], ) tails_hash: Optional[str] = Field( - None, alias="tailsHash", example="7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P" + None, + alias="tailsHash", + examples=["7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P"], ) tails_location: Optional[str] = Field( None, alias="tailsLocation", - example="https://tails-server.com/hash/7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P", + examples=[ + "https://tails-server.com/hash/7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P" + ], ) class RevRegIssuedResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) result: Optional[int] = Field( None, description="Number of credentials issued against revocation registry", - example=0, + examples=[0], ge=0, ) @@ -2306,20 +2492,22 @@ class RevRegIssuedResultSchemaAnoncreds(RevRegIssuedResult): class RevRegUpdateTailsFileUri(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) tails_public_uri: str = Field( ..., description="Public URI to the tails file", - example="http://192.168.56.133:6543/revocation/registry/WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0/tails-file", + examples=[ + "http://192.168.56.133:6543/revocation/registry/WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0/tails-file" + ], ) class RevRegWalletUpdatedResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) accum_calculated: Optional[Dict[str, Any]] = Field( None, description="Calculated accumulator for phantom revocations" ) @@ -2335,22 +2523,24 @@ class RevRegWalletUpdatedResultSchemaAnoncreds(RevRegWalletUpdatedResult): pass -class RevRegId(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class RevRegId(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Revocation registry identifiers", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) class RevRegsCreated(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) rev_reg_ids: Optional[List[RevRegId]] = None @@ -2367,29 +2557,29 @@ class RevocationModuleResponse(ActionMenuModulesResult): class RevokeRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) comment: Optional[str] = Field( None, description="Optional comment to include in revocation notification" ) connection_id: Optional[str] = Field( None, description="Connection ID to which the revocation notification will be sent; required if notify is true", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - regex="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + pattern="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", ) cred_ex_id: Optional[str] = Field( None, description="Credential exchange identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - regex="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + pattern="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", ) cred_rev_id: Optional[str] = Field( None, description="Credential revocation identifier", - example="12345", - regex="^[1-9][0-9]*$", + examples=["12345"], + pattern="^[1-9][0-9]*$", ) notify: Optional[bool] = Field( None, description="Send a notification to the credential recipient" @@ -2405,8 +2595,10 @@ class Config: rev_reg_id: Optional[str] = Field( None, description="Revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) thread_id: Optional[str] = Field( None, @@ -2419,70 +2611,70 @@ class RevokeRequestSchemaAnoncreds(RevokeRequest): class Rotate(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) to_did: str = Field( ..., description="The DID the rotating party is rotating to", - example="did:example:newdid", + examples=["did:example:newdid"], ) class RouteRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) connection_id: Optional[str] = None created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) recipient_key: str record_id: Optional[str] = None role: Optional[str] = None state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) wallet_id: Optional[str] = None -class NonSdListItem(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field(..., example="", regex="[a-z0-9:\\[\\]_\\.@?\\(\\)]") +class NonSdListItem(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field(..., examples=[""], pattern="[a-z0-9:\\[\\]_\\.@?\\(\\)]") class SDJWSCreate(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) did: Optional[str] = Field( None, description="DID of interest", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) headers: Optional[Dict[str, Any]] = None non_sd_list: Optional[List[NonSdListItem]] = None @@ -2491,36 +2683,42 @@ class Config: None, alias="verificationMethod", description="Information used for proof verification", - example="did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", - regex="\\w+:(\\/?\\/?)[^\\s]+", + examples=[ + "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL" + ], + pattern="\\w+:(\\/?\\/?)[^\\s]+", ) class SDJWSVerify(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) sd_jwt: Optional[str] = Field( None, - example="eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk~WyJEM3BUSFdCYWNRcFdpREc2TWZKLUZnIiwgIkRFIl0~WyJPMTFySVRjRTdHcXExYW9oRkd0aDh3IiwgIlNBIl0~WyJkVmEzX1JlTGNsWTU0R1FHZm5oWlRnIiwgInVwZGF0ZWRfYXQiLCAxNTcwMDAwMDAwXQ", - regex="^[a-zA-Z0-9_-]+\\.[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]+(?:~[a-zA-Z0-9._-]+)*~?$", + examples=[ + "eyJhbGciOiJFZERTQSJ9.eyJhIjogIjAifQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk~WyJEM3BUSFdCYWNRcFdpREc2TWZKLUZnIiwgIkRFIl0~WyJPMTFySVRjRTdHcXExYW9oRkd0aDh3IiwgIlNBIl0~WyJkVmEzX1JlTGNsWTU0R1FHZm5oWlRnIiwgInVwZGF0ZWRfYXQiLCAxNTcwMDAwMDAwXQ" + ], + pattern="^[a-zA-Z0-9_-]+\\.[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]+(?:~[a-zA-Z0-9._-]+)*~?$", ) class SDJWSVerifyResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) disclosures: Optional[List[List[Dict[str, Any]]]] = Field( None, description="Disclosure arrays associated with the SD-JWT", - example=[ - ["fx1iT_mETjGiC-JzRARnVg", "name", "Alice"], + examples=[ [ - "n4-t3mlh8jSS6yMIT7QHnA", - "street_address", - {"_sd": ["kLZrLK7enwfqeOzJ9-Ss88YS3mhjOAEk9lr_ix2Heng"]}, - ], + ["fx1iT_mETjGiC-JzRARnVg", "name", "Alice"], + [ + "n4-t3mlh8jSS6yMIT7QHnA", + "street_address", + {"_sd": ["kLZrLK7enwfqeOzJ9-Ss88YS3mhjOAEk9lr_ix2Heng"]}, + ], + ] ], ) error: Optional[str] = Field(None, description="Error text") @@ -2531,41 +2729,43 @@ class Config: class Schema(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) attr_names: Optional[List[str]] = Field( None, alias="attrNames", description="Schema attribute names" ) id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + ) + name: Optional[str] = Field( + None, description="Schema name", examples=["schema_name"] ) - name: Optional[str] = Field(None, description="Schema name", example="schema_name") seq_no: Optional[int] = Field( - None, alias="seqNo", description="Schema sequence number", example=10, ge=1 + None, alias="seqNo", description="Schema sequence number", examples=[10], ge=1 ) ver: Optional[str] = Field( - None, description="Node protocol version", example="1.0", regex="^[0-9.]+$" + None, description="Node protocol version", examples=["1.0"], pattern="^[0-9.]+$" ) version: Optional[str] = Field( - None, description="Schema version", example="1.0", regex="^[0-9.]+$" + None, description="Schema version", examples=["1.0"], pattern="^[0-9.]+$" ) class SchemaGetResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) schema_: Optional[Schema] = Field(None, alias="schema") class SchemaInputDescriptor(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) required: Optional[bool] = Field(None, description="Required") uri: Optional[str] = Field(None, description="URI") @@ -2575,75 +2775,92 @@ class SchemaPostOption(PublishRevocationsOptions): class SchemaPostRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) options: Optional[SchemaPostOption] = None schema_: Optional[AnonCredsSchema] = Field(None, alias="schema") class SchemaSendRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) attributes: List[str] = Field(..., description="List of schema attributes") - schema_name: str = Field(..., description="Schema name", example="prefs") + schema_name: str = Field(..., description="Schema name", examples=["prefs"]) schema_version: str = Field( - ..., description="Schema version", example="1.0", regex="^[0-9.]+$" + ..., description="Schema version", examples=["1.0"], pattern="^[0-9.]+$" ) -class SchemaState(BaseModel): - class Config: - allow_population_by_field_name = True +class SchemaSendResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + schema_: Optional[Schema] = Field( + None, alias="schema", description="Schema definition" + ) + schema_id: str = Field( + ..., + description="Schema identifier", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + ) + +class SchemaState(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) schema_: Optional[AnonCredsSchema] = Field(None, alias="schema") schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], ) state: Optional[Literal["finished", "failed", "action", "wait"]] = None -class SchemaId(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class SchemaId(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Schema identifiers", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) class SchemasCreatedResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) schema_ids: Optional[List[SchemaId]] = None class SchemasInputDescriptorFilter(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) oneof_filter: Optional[bool] = Field(None, description="oneOf") uri_groups: Optional[List[List[SchemaInputDescriptor]]] = None class SendMessage(BaseModel): - class Config: - allow_population_by_field_name = True - - content: Optional[str] = Field(None, description="Message content", example="Hello") + model_config = ConfigDict( + populate_by_name=True, + ) + content: Optional[str] = Field( + None, description="Message content", examples=["Hello"] + ) class ServiceDecorator(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) recipient_keys: List[RecipientKey] = Field( ..., alias="recipientKeys", description="List of recipient keys" ) @@ -2654,22 +2871,22 @@ class Config: ..., alias="serviceEndpoint", description="Service endpoint at which to reach this agent", - example="http://192.168.56.101:8020", + examples=["http://192.168.56.101:8020"], ) class SignResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) error: Optional[str] = Field(None, description="Error text") signed_doc: Optional[Dict[str, Any]] = Field(None, description="Signed document") class SignatureOptions(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) challenge: Optional[str] = None domain: Optional[str] = None proof_purpose: str = Field(..., alias="proofPurpose") @@ -2677,57 +2894,66 @@ class Config: verification_method: str = Field(..., alias="verificationMethod") -class SubmissionRequirements(BaseModel): - class Config: - allow_population_by_field_name = True +class SignedDoc(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + proof: SignatureOptions = Field(..., description="Linked data proof") + - count: Optional[int] = Field(None, description="Count Value", example=1234) +class SubmissionRequirements(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + count: Optional[int] = Field(None, description="Count Value", examples=[1234]) from_: Optional[str] = Field(None, alias="from", description="From") from_nested: Optional[List[SubmissionRequirements]] = None - max: Optional[int] = Field(None, description="Max Value", example=1234) - min: Optional[int] = Field(None, description="Min Value", example=1234) + max: Optional[int] = Field(None, description="Max Value", examples=[1234]) + min: Optional[int] = Field(None, description="Min Value", examples=[1234]) name: Optional[str] = Field(None, description="Name") purpose: Optional[str] = Field(None, description="Purpose") rule: Optional[Literal["all", "pick"]] = Field(None, description="Selection") class TAAAccept(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) mechanism: Optional[str] = None text: Optional[str] = None version: Optional[str] = None class TAAAcceptance(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) mechanism: Optional[str] = None - time: Optional[int] = Field(None, example=1640995199, ge=0, le=18446744073709551615) + time: Optional[int] = Field( + None, examples=[1640995199], ge=0, le=18446744073709551615 + ) class TAARecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) digest: Optional[str] = None text: Optional[str] = None version: Optional[str] = None class TailsDeleteResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) message: Optional[str] = None class TransactionJobs(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) transaction_my_job: Optional[ Literal["TRANSACTION_AUTHOR", "TRANSACTION_ENDORSER", "reset"] ] = Field(None, description="My transaction related job") @@ -2737,49 +2963,51 @@ class Config: class TransactionRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) type: Optional[str] = Field( - None, alias="_type", description="Transaction type", example="101" + None, alias="_type", description="Transaction type", examples=["101"] ) connection_id: Optional[str] = Field( None, - description="The connection identifier for thie particular transaction record", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="The connection identifier for this particular transaction record", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) endorser_write_txn: Optional[bool] = Field( None, description="Request Endorser to write the ledger transaction, this parameter is deprecated and no longer supported.", - example=False, + examples=[False], ) formats: Optional[List[Dict[str, str]]] = None messages_attach: Optional[List[Dict[str, Any]]] = None meta_data: Optional[Dict[str, Any]] = Field( None, - example={ - "context": {"param1": "param1_value", "param2": "param2_value"}, - "post_process": [{"topic": "topic_value", "other": "other_value"}], - }, + examples=[ + { + "context": {"param1": "param1_value", "param2": "param2_value"}, + "post_process": [{"topic": "topic_value", "other": "other_value"}], + } + ], ) signature_request: Optional[List[Dict[str, Any]]] = None signature_response: Optional[List[Dict[str, Any]]] = None state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) thread_id: Optional[str] = Field( None, description="Thread Identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) timing: Optional[Dict[str, Any]] = Field( - None, example={"expires_time": "2020-12-13T17:29:06+0000"} + None, examples=[{"expires_time": "2020-12-13T17:29:06+0000"}] ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -2787,62 +3015,111 @@ class Config: transaction_id: Optional[str] = Field( None, description="Transaction identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) -class UpdateProfileSettings(BaseModel): - class Config: - allow_population_by_field_name = True +class TxnOrCredentialDefinitionSendResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + sent: Optional[CredentialDefinitionSendResult] = None + txn: Optional[TransactionRecord] = Field( + None, description="Credential definition transaction to endorse" + ) + + +class TxnOrPublishRevocationsResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + sent: Optional[PublishRevocations] = None + txn: Optional[TransactionRecord] = Field( + None, description="Revocation registry revocations transaction to endorse" + ) + + +class TxnOrRegisterLedgerNymResponse(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + success: Optional[bool] = Field( + None, description="Success of nym registration operation", examples=[True] + ) + txn: Optional[TransactionRecord] = Field( + None, description="DID transaction to endorse" + ) + +class TxnOrSchemaSendResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + sent: Optional[SchemaSendResult] = Field(None, description="Content sent") + txn: Optional[TransactionRecord] = Field( + None, description="Schema transaction to endorse" + ) + + +class UpdateProfileSettings(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) extra_settings: Optional[Dict[str, Any]] = Field( None, description="Agent config key-value pairs", - example={ - "ACAPY_INVITE_PUBLIC": True, - "log-level": "INFO", - "public-invites": False, - }, + examples=[ + {"ACAPY_INVITE_PUBLIC": True, "log-level": "INFO", "public-invites": False} + ], ) class UpdateWalletRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) extra_settings: Optional[Dict[str, Any]] = Field( None, description="Agent config key-value pairs" ) image_url: Optional[str] = Field( None, - description="Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", - example="https://aries.ca/images/sample.png", + description="Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", + examples=["https://aries.ca/images/sample.png"], ) label: Optional[str] = Field( None, - description="Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", - example="Alice", + description="Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", + examples=["Alice"], ) wallet_dispatch_type: Optional[Literal["default", "both", "base"]] = Field( None, - description="Webhook target dispatch type for this wallet. default - Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets.", - example="default", + description="Webhook target dispatch type for this wallet. default: Dispatch only to webhooks associated with this wallet. base: Dispatch only to webhooks associated with the base wallet. both: Dispatch to both webhook targets.", + examples=["default"], ) wallet_webhook_urls: Optional[List[str]] = Field( None, description="List of Webhook URLs associated with this subwallet" ) -class V10CredentialConnFreeOfferRequest(BaseModel): - class Config: - allow_population_by_field_name = True +class V10CredentialBoundOfferRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + counter_proposal: Optional[CredentialProposal] = Field( + None, description="Optional counter-proposal" + ) + +class V10CredentialConnFreeOfferRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) auto_issue: Optional[bool] = Field( None, description="Whether to respond automatically to credential requests, creating and issuing requested credentials", @@ -2855,8 +3132,8 @@ class Config: cred_def_id: str = Field( ..., description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) credential_preview: CredentialPreview trace: Optional[bool] = Field( @@ -2865,9 +3142,9 @@ class Config: class V10CredentialCreate(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -2876,33 +3153,33 @@ class Config: cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) credential_proposal: CredentialPreview issuer_did: Optional[str] = Field( None, description="Credential issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) schema_issuer_did: Optional[str] = Field( None, description="Schema issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_name: Optional[str] = Field( - None, description="Schema name", example="preferences" + None, description="Schema name", examples=["preferences"] ) schema_version: Optional[str] = Field( - None, description="Schema version", example="1.0", regex="^[0-9.]+$" + None, description="Schema version", examples=["1.0"], pattern="^[0-9.]+$" ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -2910,9 +3187,9 @@ class Config: class V10CredentialExchangeAutoRemoveRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -2920,9 +3197,9 @@ class Config: class V10CredentialFreeOfferRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_issue: Optional[bool] = Field( None, description="Whether to respond automatically to credential requests, creating and issuing requested credentials", @@ -2935,13 +3212,13 @@ class Config: connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_def_id: str = Field( ..., description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) credential_preview: CredentialPreview trace: Optional[bool] = Field( @@ -2950,23 +3227,23 @@ class Config: class V10CredentialIssueRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) comment: Optional[str] = Field(None, description="Human-readable comment") class V10CredentialProblemReportRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) description: str class V10CredentialProposalRequestMand(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -2975,38 +3252,38 @@ class Config: connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) credential_proposal: CredentialPreview issuer_did: Optional[str] = Field( None, description="Credential issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) schema_issuer_did: Optional[str] = Field( None, description="Schema issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_name: Optional[str] = Field( - None, description="Schema name", example="preferences" + None, description="Schema name", examples=["preferences"] ) schema_version: Optional[str] = Field( - None, description="Schema version", example="1.0", regex="^[0-9.]+$" + None, description="Schema version", examples=["1.0"], pattern="^[0-9.]+$" ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -3014,9 +3291,9 @@ class Config: class V10CredentialProposalRequestOpt(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -3025,38 +3302,38 @@ class Config: connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) credential_proposal: Optional[CredentialPreview] = None issuer_did: Optional[str] = Field( None, description="Credential issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) schema_issuer_did: Optional[str] = Field( None, description="Schema issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_name: Optional[str] = Field( - None, description="Schema name", example="preferences" + None, description="Schema name", examples=["preferences"] ) schema_version: Optional[str] = Field( - None, description="Schema version", example="1.0", regex="^[0-9.]+$" + None, description="Schema version", examples=["1.0"], pattern="^[0-9.]+$" ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -3064,9 +3341,9 @@ class Config: class V10CredentialStoreRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) credential_id: Optional[str] = None @@ -3079,9 +3356,9 @@ class V10PresentationProblemReportRequest(V10CredentialProblemReportRequest): class V10PresentationProposalRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_present: Optional[bool] = Field( None, description="Whether to respond automatically to presentation requests, building and presenting requested proof", @@ -3094,18 +3371,18 @@ class Config: connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) presentation_proposal: IndyPresPreview trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) class V10PresentationSendRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -3122,14 +3399,14 @@ class Config: ..., description="Self-attested attributes to build into proof" ) trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) class V10PresentationSendRequestToProposal(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -3137,10 +3414,10 @@ class Config: auto_verify: Optional[bool] = Field( None, description="Verifier choice to auto-verify proof presentation", - example=False, + examples=[False], ) trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) @@ -3148,10 +3425,10 @@ class V20CredAttrSpec(CredAttrSpec): pass -class V20CredExRecordByFormat1(BaseModel): - class Config: - allow_population_by_field_name = True - +class V20CredExRecordByFormat(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) cred_issue: Optional[Dict[str, Any]] = None cred_offer: Optional[Dict[str, Any]] = None cred_proposal: Optional[Dict[str, Any]] = None @@ -3159,29 +3436,29 @@ class Config: class V20CredExRecordIndy(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) cred_ex_id: Optional[str] = Field( None, description="Corresponding v2.0 credential exchange record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_ex_indy_id: Optional[str] = Field( None, description="Record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_id_stored: Optional[str] = Field( None, description="Credential identifier stored in wallet", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_request_metadata: Optional[Dict[str, Any]] = Field( None, description="Credential request metadata for indy holder" @@ -3189,111 +3466,113 @@ class Config: cred_rev_id: Optional[str] = Field( None, description="Credential revocation identifier within revocation registry", - example="12345", - regex="^[1-9][0-9]*$", + examples=["12345"], + pattern="^[1-9][0-9]*$", ) rev_reg_id: Optional[str] = Field( None, description="Revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) class V20CredExRecordLDProof(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) cred_ex_id: Optional[str] = Field( None, description="Corresponding v2.0 credential exchange record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_ex_ld_proof_id: Optional[str] = Field( None, description="Record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) cred_id_stored: Optional[str] = Field( None, description="Credential identifier stored in wallet", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) -class V20CredFilterIndy1(BaseModel): - class Config: - allow_population_by_field_name = True - +class V20CredFilterIndy(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) issuer_did: Optional[str] = Field( None, description="Credential issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) schema_issuer_did: Optional[str] = Field( None, description="Schema issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) schema_name: Optional[str] = Field( - None, description="Schema name", example="preferences" + None, description="Schema name", examples=["preferences"] ) schema_version: Optional[str] = Field( - None, description="Schema version", example="1.0", regex="^[0-9.]+$" + None, description="Schema version", examples=["1.0"], pattern="^[0-9.]+$" ) class V20CredFormat(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) attach_id: str = Field( ..., description="Attachment identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) format: str = Field( ..., description="Attachment format specifier", - example="aries/ld-proof-vc-detail@v1.0", + examples=["aries/ld-proof-vc-detail@v1.0"], ) @@ -3306,22 +3585,22 @@ class V20CredIssueRequest(V10CredentialIssueRequest): class V20CredPreview(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) type: Optional[str] = Field( None, alias="@type", description="Message type identifier", - example="issue-credential/2.0/credential-preview", + examples=["issue-credential/2.0/credential-preview"], ) attributes: List[V20CredAttrSpec] class V20CredRequestRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -3329,7 +3608,7 @@ class Config: holder_did: Optional[str] = Field( None, description="Holder DID to substitute for the credentialSubject.id", - example="did:key:ahsdkjahsdkjhaskjdhakjshdkajhsdkjahs", + examples=["did:key:ahsdkjahsdkjhaskjdhakjshdkajhsdkjahs"], ) @@ -3341,28 +3620,28 @@ class V20IssueCredentialModuleResponse(ActionMenuModulesResult): pass -class V20PresExRecordByFormat1(BaseModel): - class Config: - allow_population_by_field_name = True - +class V20PresExRecordByFormat(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) pres: Optional[Dict[str, Any]] = None pres_proposal: Optional[Dict[str, Any]] = None pres_request: Optional[Dict[str, Any]] = None class V20PresFormat(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) attach_id: str = Field( ..., description="Attachment identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) format: str = Field( ..., description="Attachment format specifier", - example="dif/presentation-exchange/submission@v1.0", + examples=["dif/presentation-exchange/submission@v1.0"], ) @@ -3378,22 +3657,22 @@ class V20PresentationSendRequestToProposal(V10PresentationSendRequestToProposal) pass -class Context(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class Context(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Context", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) class VCRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) contexts: Optional[List[Context]] = None cred_tags: Optional[Dict[str, str]] = None cred_value: Optional[Dict[str, Any]] = Field( @@ -3403,76 +3682,218 @@ class Config: given_id: Optional[str] = Field( None, description="Credential identifier", - example="http://example.edu/credentials/3732", + examples=["http://example.edu/credentials/3732"], ) issuer_id: Optional[str] = Field( - None, description="Issuer identifier", example="https://example.edu/issuers/14" + None, + description="Issuer identifier", + examples=["https://example.edu/issuers/14"], ) proof_types: Optional[List[str]] = None record_id: Optional[str] = Field( None, description="Record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) schema_ids: Optional[List[str]] = None subject_ids: Optional[List[str]] = None class VCRecordList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[VCRecord]] = None -class VerifyResponse(BaseModel): - class Config: - allow_population_by_field_name = True +class VerifiableCredential(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + context: List[Dict[str, Any]] = Field( + ..., + alias="@context", + description="The JSON-LD context of the credential", + examples=[ + [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + ] + ], + ) + credential_status: Optional[Dict[str, Any]] = Field( + None, alias="credentialStatus", examples=[""] + ) + credential_subject: Dict[str, Any] = Field( + ..., alias="credentialSubject", examples=[""] + ) + expiration_date: Optional[str] = Field( + None, + alias="expirationDate", + description="The expiration date", + examples=["2010-01-01T19:23:24Z"], + pattern="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", + ) + id: Optional[str] = Field( + None, + description="The ID of the credential", + examples=["http://example.edu/credentials/1872"], + pattern="\\w+:(\\/?\\/?)[^\\s]+", + ) + issuance_date: str = Field( + ..., + alias="issuanceDate", + description="The issuance date", + examples=["2010-01-01T19:23:24Z"], + pattern="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", + ) + issuer: Dict[str, Any] = Field( + ..., + description="The JSON-LD Verifiable Credential Issuer. Either string of object with id field.", + examples=["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"], + ) + proof: LinkedDataProof = Field( + ..., + description="The proof of the credential", + examples=[ + { + "created": "2019-12-11T03:50:55", + "jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0JiNjQiXX0..lKJU0Df_keblRKhZAS9Qq6zybm-HqUXNVZ8vgEPNTAjQKBhQDxvXNo7nvtUBb_Eq1Ch6YBKY5qBQ", + "proofPurpose": "assertionMethod", + "type": "Ed25519Signature2018", + "verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", + } + ], + ) + type: List[str] = Field( + ..., + description="The JSON-LD type of the credential", + examples=[["VerifiableCredential", "AlumniCredential"]], + ) + + +class VerifiablePresentation(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + context: List[Dict[str, Any]] = Field( + ..., + alias="@context", + description="The JSON-LD context of the presentation", + examples=[["https://www.w3.org/2018/credentials/v1"]], + ) + holder: Optional[Dict[str, Any]] = Field( + None, + description="The JSON-LD Verifiable Credential Holder. Either string of object with id field.", + examples=["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"], + ) + id: Optional[str] = Field( + None, + description="The ID of the presentation", + examples=["http://example.edu/presentations/1872"], + pattern="\\w+:(\\/?\\/?)[^\\s]+", + ) + proof: LinkedDataProof = Field( + ..., + description="The proof of the presentation", + examples=[ + { + "created": "2019-12-11T03:50:55", + "jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0JiNjQiXX0..lKJU0Df_keblRKhZAS9Qq6zybm-HqUXNVZ8vgEPNTAjQKBhQDxvXNo7nvtUBb_Eq1Ch6YBKY5qBQ", + "proofPurpose": "assertionMethod", + "type": "Ed25519Signature2018", + "verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", + } + ], + ) + type: List[str] = Field( + ..., + description="The JSON-LD type of the presentation", + examples=[["VerifiablePresentation"]], + ) + verifiable_credential: Optional[List[Dict[str, Any]]] = Field( + None, alias="verifiableCredential" + ) + + +class VerifyCredentialRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + options: Optional[LDProofVCOptions] = None + verifiable_credential: Optional[VerifiableCredential] = Field( + None, alias="verifiableCredential" + ) + + +class VerifyPresentationRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + options: Optional[LDProofVCOptions] = None + verifiable_presentation: Optional[VerifiablePresentation] = Field( + None, alias="verifiablePresentation" + ) + + +class VerifyRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + doc: SignedDoc = Field(..., description="Signed document") + verkey: Optional[str] = Field( + None, description="Verkey to use for doc verification" + ) + +class VerifyResponse(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) error: Optional[str] = Field(None, description="Error text") valid: bool -class Context1(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class Context1(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Credential context to match", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) -class SchemaId1(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class SchemaId1(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Credential schema identifier", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) -class Type(BaseModel): - class Config: - allow_population_by_field_name = True - - __root__: str = Field( +class Type(RootModel[str]): + model_config = ConfigDict( + populate_by_name=True, + ) + root: str = Field( ..., description="Credential type to match", - example="https://myhost:8021", - regex="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", + examples=["https://myhost:8021"], + pattern="^[A-Za-z0-9\\.\\-\\+]+://([A-Za-z0-9][.A-Za-z0-9-_]+[A-Za-z0-9])+(:[1-9][0-9]*)?(/[^?&#]+)?$", ) class W3CCredentialsListRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) contexts: Optional[List[Context1]] = None given_id: Optional[str] = Field(None, description="Given credential id to match") issuer_id: Optional[str] = Field( @@ -3497,14 +3918,14 @@ class WalletModuleResponse(ActionMenuModulesResult): class WalletRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) key_management_mode: Literal["managed", "unmanaged"] = Field( ..., description="Mode regarding management of wallet key" @@ -3513,125 +3934,36 @@ class Config: None, description="Settings for this wallet." ) state: Optional[str] = Field( - None, description="Current record state", example="active" + None, description="Current record state", examples=["active"] ) updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) wallet_id: str = Field( ..., description="Wallet record ID", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) class WriteLedger(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) ledger_id: Optional[str] = None -class CredDefValueRevocation(CredDefValueRevocation1): - """ - Revocation value for credential definition - """ - - class Config: - allow_population_by_field_name = True - - -class CredDefValueSchemaAnoncredsPrimary(CredDefValuePrimarySchemaAnoncreds): - """ - Primary value for credential definition - """ - - class Config: - allow_population_by_field_name = True - - -class CredDefValueSchemaAnoncredsRevocation(CredDefValueRevocationSchemaAnoncreds): - """ - Revocation value for credential definition - """ - - class Config: - allow_population_by_field_name = True - - -class CredentialProof(LinkedDataProof): - """ - The proof of the credential - """ - - class Config: - allow_population_by_field_name = True - - -class DIDCreateOptions(DIDCreateOptions1): - """ - To define a key type and/or a did depending on chosen DID method. - """ - - class Config: - allow_population_by_field_name = True - - -class DocOptions(SignatureOptions): - """ - Signature options - """ - - class Config: - allow_population_by_field_name = True - - -class IndyCredAbstractKeyCorrectnessProof(IndyKeyCorrectnessProof): - """ - Key correctness proof - """ - - class Config: - allow_population_by_field_name = True - - -class IndyCredPrecisCredInfo(IndyCredInfo): - """ - Credential info - """ - - class Config: - allow_population_by_field_name = True - - -class IndyCredPrecisInterval(IndyNonRevocationInterval): - """ - Non-revocation interval from presentation request - """ - - class Config: - allow_population_by_field_name = True - - class IndyPrimaryProofEqProof(IndyEQProof): """ Indy equality proof """ - class Config: - allow_population_by_field_name = True - - -class IndyProofProofAggregatedProof(IndyProofProofAggregatedProof1): - """ - Indy proof aggregated proof - """ - - class Config: - allow_population_by_field_name = True + model_config = ConfigDict( + populate_by_name=True, + ) class IndyProofProofProofsProofNonRevocProof(IndyNonRevocProof): @@ -3639,443 +3971,251 @@ class IndyProofProofProofsProofNonRevocProof(IndyNonRevocProof): Indy non-revocation proof """ - class Config: - allow_population_by_field_name = True + model_config = ConfigDict( + populate_by_name=True, + ) class IndyProofReqAttrSpecNonRevoked(IndyProofReqAttrSpecNonRevoked1): pass - - class Config: - allow_population_by_field_name = True + model_config = ConfigDict( + populate_by_name=True, + ) class IndyProofReqPredSpecNonRevoked(IndyProofReqPredSpecNonRevoked1): pass - - class Config: - allow_population_by_field_name = True + model_config = ConfigDict( + populate_by_name=True, + ) class IndyProofRequestNonRevoked(IndyProofRequestNonRevoked1): pass - - class Config: - allow_population_by_field_name = True + model_config = ConfigDict( + populate_by_name=True, + ) -class IndyRevRegEntryValue(IndyRevRegEntryValue1): - """ - Revocation registry entry value - """ - - class Config: - allow_population_by_field_name = True - - -class InputDescriptorsSchema(SchemasInputDescriptorFilter): - """ - Accepts a list of schema or a dict containing filters like oneof_filter. - """ - - class Config: - allow_population_by_field_name = True - - -class KeylistQueryPaginate(KeylistQueryPaginate1): - """ - Pagination info - """ - - class Config: - allow_population_by_field_name = True - - -class LDProofVCOptionsCredentialStatus(CredentialStatusOptions): - """ - The credential status mechanism to use for the credential. Omitting the property indicates the issued credential will not include a credential status - """ - - class Config: - allow_population_by_field_name = True - - -class PresentationProof(LinkedDataProof): - """ - The proof of the presentation - """ - - class Config: - allow_population_by_field_name = True - - -class RevListStateRevocationList(RevList): - """ - revocation list - """ - - class Config: - allow_population_by_field_name = True - - -class SchemaSendResultSchema(Schema): - """ - Schema definition - """ - - class Config: - allow_population_by_field_name = True - - -class SignedDocProof(SignatureOptions): - """ - Linked data proof - """ - - class Config: - allow_population_by_field_name = True - - -class TxnOrCredentialDefinitionSendResultTxn(TransactionRecord): - """ - Credential definition transaction to endorse - """ - - class Config: - allow_population_by_field_name = True - - -class TxnOrPublishRevocationsResultTxn(TransactionRecord): - """ - Revocation registry revocations transaction to endorse - """ - - class Config: - allow_population_by_field_name = True - - -class TxnOrRegisterLedgerNymResponseTxn(TransactionRecord): - """ - DID transaction to endorse - """ - - class Config: - allow_population_by_field_name = True - - -class TxnOrRevRegResultTxn(TransactionRecord): - """ - Revocation registry definition transaction to endorse - """ - - class Config: - allow_population_by_field_name = True - - -class TxnOrSchemaSendResultTxn(TransactionRecord): - """ - Schema transaction to endorse - """ - - class Config: - allow_population_by_field_name = True - - -class V10CredentialBoundOfferRequestCounterProposal(CredentialProposal): - """ - Optional counter-proposal - """ - - class Config: - allow_population_by_field_name = True - - -class V10CredentialExchangeCredential(IndyCredInfo): - """ - Credential as stored - """ - - class Config: - allow_population_by_field_name = True - - -class V10CredentialExchangeCredentialProposalDict(CredentialProposal): - """ - Credential proposal message - """ - - class Config: - allow_population_by_field_name = True - - -class V10CredentialExchangeCredentialRequest(IndyCredRequest): - """ - (Indy) credential request - """ - - class Config: - allow_population_by_field_name = True - - -class V10CredentialExchangeRawCredential(IndyCredential): - """ - Credential as received, prior to storage in holder wallet - """ - - class Config: - allow_population_by_field_name = True - - -class V10DiscoveryRecordQueryMsg(Query): - """ - Query message - """ - - class Config: - allow_population_by_field_name = True - - -class V10PresentationExchangePresentationProposalDict(PresentationProposal): - """ - Presentation proposal message - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredBoundOfferRequestCounterPreview(V20CredPreview): - """ - Optional content for counter-proposal - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredExRecordByFormat(V20CredExRecordByFormat1): - """ - Attachment content by format for proposal, offer, request, and issue - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredExRecordCredPreview(V20CredPreview): - """ - Credential preview from credential proposal - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredFilterIndy(V20CredFilterIndy1): - """ - Credential filter for indy - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredProposalCredentialPreview(V20CredPreview): - """ - Credential preview - """ - - class Config: - allow_population_by_field_name = True - - -class V20DiscoveryRecordDisclosures(Disclosures): - """ - Disclosures message - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresExRecordByFormat(V20PresExRecordByFormat1): - """ - Attachment content by format for proposal, request, and presentation - """ - - class Config: - allow_population_by_field_name = True - - -class AttachDecoratorData1JWS(BaseModel): - class Config: - allow_population_by_field_name = True - - header: AttachDecoratorDataJWSHeader - protected: Optional[str] = Field( - None, - description="protected JWS header", - example="ey4uLn0", - regex="^[-_a-zA-Z0-9]*$", - ) - signature: str = Field( - ..., description="signature", example="ey4uLn0", regex="^[-_a-zA-Z0-9]*$" - ) +class AttachDecoratorData1JWS(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + header: AttachDecoratorDataJWSHeader + protected: Optional[str] = Field( + None, + description="protected JWS header", + examples=["ey4uLn0"], + pattern="^[-_a-zA-Z0-9]*$", + ) + signature: str = Field( + ..., description="signature", examples=["ey4uLn0"], pattern="^[-_a-zA-Z0-9]*$" + ) class AttachDecoratorDataJWS(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) header: Optional[AttachDecoratorDataJWSHeader] = None protected: Optional[str] = Field( None, description="protected JWS header", - example="ey4uLn0", - regex="^[-_a-zA-Z0-9]*$", + examples=["ey4uLn0"], + pattern="^[-_a-zA-Z0-9]*$", ) signature: Optional[str] = Field( - None, description="signature", example="ey4uLn0", regex="^[-_a-zA-Z0-9]*$" + None, description="signature", examples=["ey4uLn0"], pattern="^[-_a-zA-Z0-9]*$" ) signatures: Optional[List[AttachDecoratorData1JWS]] = Field( None, description="List of signatures" ) -class CredDefPostRequest(BaseModel): - class Config: - allow_population_by_field_name = True +class CredDef(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + issuer_id: Optional[str] = Field( + None, + alias="issuerId", + description="Issuer Identifier of the credential definition or schema", + examples=["WgWxqztrNooG92RXvxSTWv"], + ) + schema_id: Optional[str] = Field( + None, + alias="schemaId", + description="Schema identifier", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + ) + tag: Optional[str] = Field( + None, + description="The tag value passed in by the Issuer to an AnonCred's Credential Definition create and store implementation.", + examples=["default"], + ) + type: Optional[Literal["CL"]] = None + value: Optional[CredDefValueSchemaAnoncreds] = None + +class CredDefPostRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) credential_definition: Optional[InnerCredDef] = None options: Optional[CredDefPostOptions] = None -class CredDefValuePrimary1(BaseModel): - class Config: - allow_population_by_field_name = True - - n: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - r: Optional[Generated] = None - rctxt: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - s: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - z: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - +class CredDefState(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + credential_definition: Optional[CredDef] = Field( + None, description="credential definition" + ) + credential_definition_id: Optional[str] = Field( + None, + description="credential definition id", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + ) + state: Optional[Literal["finished", "failed", "action", "wait"]] = None -class CredDefValueSchemaAnoncreds(BaseModel): - class Config: - allow_population_by_field_name = True - primary: Optional[CredDefValueSchemaAnoncredsPrimary] = None - revocation: Optional[CredDefValueSchemaAnoncredsRevocation] = None +class CredDefValuePrimary(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + n: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + r: Optional[Generated] = None + rctxt: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + s: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + z: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") class CredInfoList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[IndyCredInfo]] = None class CredRevRecordDetailsResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[IssuerCredRevRecord]] = None class CredRevRecordDetailsResultSchemaAnoncreds(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[IssuerCredRevRecordSchemaAnoncreds]] = None class CredRevRecordResult(BaseModel): - class Config: - allow_population_by_field_name = True - - result: Optional[IssuerCredRevRecordSchemaAnoncreds] = None + model_config = ConfigDict( + populate_by_name=True, + ) + result: Optional[IssuerCredRevRecord] = None class CredRevRecordResultSchemaAnoncreds(BaseModel): - class Config: - allow_population_by_field_name = True - - result: Optional[IssuerCredRevRecord] = None + model_config = ConfigDict( + populate_by_name=True, + ) + result: Optional[IssuerCredRevRecordSchemaAnoncreds] = None class Credential(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) context: List[Dict[str, Any]] = Field( ..., alias="@context", description="The JSON-LD context of the credential", - example=[ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", + examples=[ + [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + ] ], ) credential_status: Optional[Dict[str, Any]] = Field( - None, alias="credentialStatus", example="" + None, alias="credentialStatus", examples=[""] ) credential_subject: Dict[str, Any] = Field( - ..., alias="credentialSubject", example="" + ..., alias="credentialSubject", examples=[""] ) expiration_date: Optional[str] = Field( None, alias="expirationDate", description="The expiration date", - example="2010-01-01T19:23:24Z", - regex="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", + examples=["2010-01-01T19:23:24Z"], + pattern="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", ) id: Optional[str] = Field( None, - example="http://example.edu/credentials/1872", - regex="\\w+:(\\/?\\/?)[^\\s]+", + description="The ID of the credential", + examples=["http://example.edu/credentials/1872"], + pattern="\\w+:(\\/?\\/?)[^\\s]+", ) issuance_date: str = Field( ..., alias="issuanceDate", description="The issuance date", - example="2010-01-01T19:23:24Z", - regex="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", + examples=["2010-01-01T19:23:24Z"], + pattern="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", ) issuer: Dict[str, Any] = Field( ..., description="The JSON-LD Verifiable Credential Issuer. Either string of object with id field.", - example="did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH", + examples=["did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"], + ) + proof: Optional[LinkedDataProof] = Field( + None, + description="The proof of the credential", + examples=[ + { + "created": "2019-12-11T03:50:55", + "jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0JiNjQiXX0..lKJU0Df_keblRKhZAS9Qq6zybm-HqUXNVZ8vgEPNTAjQKBhQDxvXNo7nvtUBb_Eq1Ch6YBKY5qBQ", + "proofPurpose": "assertionMethod", + "type": "Ed25519Signature2018", + "verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", + } + ], ) - proof: Optional[CredentialProof] = None type: List[str] = Field( ..., description="The JSON-LD type of the credential", - example=["VerifiableCredential", "AlumniCredential"], + examples=[["VerifiableCredential", "AlumniCredential"]], ) class DIDCreate(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) method: Optional[str] = Field( None, description="Method for the requested DID.Supported methods are 'key', 'sov', and any other registered method.", - example="sov", + examples=["sov"], + ) + options: Optional[DIDCreateOptions] = Field( + None, + description="To define a key type and/or a did depending on chosen DID method.", ) - options: Optional[DIDCreateOptions] = None seed: Optional[str] = Field( None, - description="Optional seed to use for DID, Must beenabled in configuration before use.", - example="000000000000000000000000Trustee1", + description="Optional seed to use for DID, Must be enabled in configuration before use.", + examples=["000000000000000000000000Trustee1"], ) class DIFField(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) filter: Optional[Filter] = None id: Optional[str] = Field(None, description="ID") path: Optional[List[str]] = None @@ -4086,20 +4226,20 @@ class Config: class Disclose(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) protocols: List[ProtocolDescriptor] = Field( ..., description="List of protocol descriptors" @@ -4107,50 +4247,80 @@ class Config: class Doc(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) credential: Dict[str, Any] = Field(..., description="Credential to sign") - options: DocOptions + options: SignatureOptions = Field(..., description="Signature options") -class IndyCredAbstract(BaseModel): - class Config: - allow_population_by_field_name = True +class FetchCredentialResponse(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + results: Optional[VerifiableCredential] = None + + +class GetCredDefResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + credential_definition: Optional[CredDef] = Field( + None, description="credential definition" + ) + credential_definition_id: Optional[str] = Field( + None, + description="credential definition id", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + ) + credential_definitions_metadata: Optional[Dict[str, Any]] = None + resolution_metadata: Optional[Dict[str, Any]] = None + +class IndyCredAbstract(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: str = Field( ..., description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + ) + key_correctness_proof: IndyKeyCorrectnessProof = Field( + ..., description="Key correctness proof" ) - key_correctness_proof: IndyCredAbstractKeyCorrectnessProof nonce: str = Field( - ..., description="Nonce in credential abstract", example="0", regex="^[0-9]*$" + ..., + description="Nonce in credential abstract", + examples=["0"], + pattern="^[0-9]*$", ) schema_id: str = Field( ..., description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) class IndyCredPrecis(BaseModel): - class Config: - allow_population_by_field_name = True - - cred_info: IndyCredPrecisCredInfo - interval: Optional[IndyCredPrecisInterval] = None + model_config = ConfigDict( + populate_by_name=True, + ) + cred_info: IndyCredInfo = Field(..., description="Credential info") + interval: Optional[IndyNonRevocationInterval] = Field( + None, description="Non-revocation interval from presentation request" + ) presentation_referents: Optional[List[str]] = None class IndyGEProof(BaseModel): - class Config: - allow_population_by_field_name = True - - alpha: Optional[str] = Field(None, example="0", regex="^[0-9]*$") - mj: Optional[str] = Field(None, example="0", regex="^[0-9]*$") + model_config = ConfigDict( + populate_by_name=True, + ) + alpha: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") + mj: Optional[str] = Field(None, examples=["0"], pattern="^[0-9]*$") predicate: Optional[IndyGEProofPred] = None r: Optional[Dict[str, str]] = None t: Optional[Dict[str, str]] = None @@ -4158,9 +4328,9 @@ class Config: class IndyPresSpec(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) requested_attributes: Dict[str, IndyRequestedCredsRequestedAttr] = Field( ..., description="Nested object mapping proof request attribute referents to requested-attribute specifiers", @@ -4173,24 +4343,34 @@ class Config: ..., description="Self-attested attributes to build into proof" ) trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) class IndyPrimaryProof(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) eq_proof: Optional[IndyPrimaryProofEqProof] = None ge_proofs: Optional[List[IndyGEProof]] = Field(None, description="Indy GE proofs") -class IndyProofReqAttrSpec(BaseModel): - class Config: - allow_population_by_field_name = True +class IndyProofProofProofsProof(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + non_revoc_proof: Optional[IndyProofProofProofsProofNonRevocProof] = None + primary_proof: Optional[IndyPrimaryProof] = Field( + None, description="Indy primary proof" + ) + +class IndyProofReqAttrSpec(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) name: Optional[str] = Field( - None, description="Attribute name", example="favouriteDrink" + None, description="Attribute name", examples=["favouriteDrink"] ) names: Optional[List[str]] = Field(None, description="Attribute name group") non_revoked: Optional[IndyProofReqAttrSpecNonRevoked] = None @@ -4201,13 +4381,13 @@ class Config: class IndyProofReqPredSpec(BaseModel): - class Config: - allow_population_by_field_name = True - - name: str = Field(..., description="Attribute name", example="index") + model_config = ConfigDict( + populate_by_name=True, + ) + name: str = Field(..., description="Attribute name", examples=["index"]) non_revoked: Optional[IndyProofReqPredSpecNonRevoked] = None p_type: Literal["<", "<=", ">=", ">"] = Field( - ..., description="Predicate type ('<', '<=', '>=', or '>')", example=">=" + ..., description="Predicate type ('<', '<=', '>=', or '>')", examples=[">="] ) p_value: int = Field(..., description="Threshold value") restrictions: Optional[List[Dict[str, str]]] = Field( @@ -4217,15 +4397,15 @@ class Config: class IndyProofRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) name: Optional[str] = Field( - None, description="Proof request name", example="Proof request" + None, description="Proof request name", examples=["Proof request"] ) non_revoked: Optional[IndyProofRequestNonRevoked] = None nonce: Optional[str] = Field( - None, description="Nonce", example="1", regex="^[1-9][0-9]*$" + None, description="Nonce", examples=["1"], pattern="^[1-9][0-9]*$" ) requested_attributes: Dict[str, IndyProofReqAttrSpec] = Field( ..., description="Requested attribute specifications of proof request" @@ -4234,88 +4414,109 @@ class Config: ..., description="Requested predicate specifications of proof request" ) version: Optional[str] = Field( - None, description="Proof request version", example="1.0", regex="^[0-9.]+$" + None, description="Proof request version", examples=["1.0"], pattern="^[0-9.]+$" ) class IndyProofRequestedProofRevealedAttrGroup(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) sub_proof_index: Optional[int] = Field(None, description="Sub-proof index") values: Optional[Dict[str, RawEncoded]] = Field( None, description="Indy proof requested proof revealed attr groups group value" ) -class IndyRevRegDefValuePublicKeys1(BaseModel): - class Config: - allow_population_by_field_name = True - +class IndyRevRegDefValuePublicKeys(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) accum_key: Optional[IndyRevRegDefValuePublicKeysAccumKey] = Field( None, alias="accumKey" ) class IndyRevRegEntry(BaseModel): - class Config: - allow_population_by_field_name = True - - value: Optional[IndyRevRegEntryValue] = None + model_config = ConfigDict( + populate_by_name=True, + ) + value: Optional[IndyRevRegEntryValue] = Field( + None, description="Revocation registry entry value" + ) ver: Optional[str] = Field( None, description="Version of revocation registry entry", - example="1.0", - regex="^[0-9.]+$", + examples=["1.0"], + pattern="^[0-9.]+$", ) -class Keylist(BaseModel): - class Config: - allow_population_by_field_name = True +class IssueCredentialRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + credential: Optional[Credential] = None + options: Optional[LDProofVCOptions] = None + + +class IssueCredentialResponse(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + verifiable_credential: Optional[VerifiableCredential] = Field( + None, alias="verifiableCredential" + ) + +class Keylist(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[RouteRecord]] = Field( None, description="List of keylist records" ) class KeylistQuery(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) filter: Optional[Dict[str, Any]] = Field( - None, description="Query dictionary object", example={"filter": {}} + None, description="Query dictionary object", examples=[{"filter": {}}] + ) + paginate: Optional[KeylistQueryPaginate] = Field( + None, description="Pagination info" ) - paginate: Optional[KeylistQueryPaginate] = None class KeylistUpdate(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) updates: Optional[List[KeylistUpdateRule]] = Field( None, description="List of update rules" @@ -4323,70 +4524,62 @@ class Config: class KeylistUpdateRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) updates: Optional[List[KeylistUpdateRule]] = None -class LDProofVCOptions(BaseModel): - class Config: - allow_population_by_field_name = True - - challenge: Optional[str] = Field( - None, - description="A challenge to include in the proof. SHOULD be provided by the requesting party of the credential (=holder)", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - created: Optional[str] = Field( - None, - description="The date and time of the proof (with a maximum accuracy in seconds). Defaults to current system time", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", - ) - credential_status: Optional[LDProofVCOptionsCredentialStatus] = Field( - None, alias="credentialStatus" - ) - domain: Optional[str] = Field( - None, - description="The intended domain of validity for the proof", - example="example.com", - ) - proof_purpose: Optional[str] = Field( - None, - alias="proofPurpose", - description="The proof purpose used for the proof. Should match proof purposes registered in the Linked Data Proofs Specification", - example="assertionMethod", +class LDProofVCDetail(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - proof_type: Optional[str] = Field( - None, - alias="proofType", - description="The proof type used for the proof. Should match suites registered in the Linked Data Cryptographic Suite Registry", - example="Ed25519Signature2018", + credential: Credential = Field( + ..., + description="Detail of the JSON-LD Credential to be issued", + examples=[ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/citizenship/v1", + ], + "credentialSubject": { + "familyName": "SMITH", + "gender": "Male", + "givenName": "JOHN", + "type": ["PermanentResident", "Person"], + }, + "description": "Government of Example Permanent Resident Card.", + "identifier": "83627465", + "issuanceDate": "2019-12-03T12:19:52Z", + "issuer": "did:key:z6MkmjY8GnV5i9YTDtPETC2uUAW6ejw3nk5mXF5yci5ab7th", + "name": "Permanent Resident Card", + "type": ["VerifiableCredential", "PermanentResidentCard"], + } + ], ) - verification_method: Optional[str] = Field( - None, - alias="verificationMethod", - description="The verification method to use for the proof. Should match a verification method in the wallet", - example="did:example:123456#key-1", + options: LDProofVCOptions = Field( + ..., + description="Options for specifying how the linked data proof is created.", + examples=[{"proofType": "Ed25519Signature2018"}], ) class MediationList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: List[MediationRecord] = Field(..., description="List of mediation records") class MenuForm(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) description: Optional[str] = Field( None, description="Additional descriptive text for menu form", - example="Window preference settings", + examples=["Window preference settings"], ) params: Optional[List[MenuFormParam]] = Field( None, description="List of form parameters" @@ -4395,207 +4588,172 @@ class Config: None, alias="submit-label", description="Alternative label for form submit button", - example="Send", + examples=["Send"], ) title: Optional[str] = Field( - None, description="Menu form title", example="Preferences" + None, description="Menu form title", examples=["Preferences"] ) class MenuOption(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) description: Optional[str] = Field( None, description="Additional descriptive text for menu option", - example="Window display preferences", + examples=["Window display preferences"], ) disabled: Optional[bool] = Field( - None, description="Whether to show option as disabled", example=False + None, description="Whether to show option as disabled", examples=[False] ) form: Optional[MenuForm] = None name: str = Field( - ..., description="Menu option name (unique identifier)", example="window_prefs" - ) - title: str = Field( - ..., description="Menu option title", example="Window Preferences" - ) - - -class Presentation(BaseModel): - class Config: - allow_population_by_field_name = True - - context: List[Dict[str, Any]] = Field( - ..., - alias="@context", - description="The JSON-LD context of the presentation", - example=["https://www.w3.org/2018/credentials/v1"], - ) - holder: Optional[Dict[str, Any]] = Field( - None, - description="The JSON-LD Verifiable Credential Holder. Either string of object with id field.", - example="did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH", - ) - id: Optional[str] = Field( - None, - example="http://example.edu/presentations/1872", - regex="\\w+:(\\/?\\/?)[^\\s]+", - ) - proof: Optional[PresentationProof] = None - type: List[str] = Field( ..., - description="The JSON-LD type of the presentation", - example=["VerifiablePresentation"], + description="Menu option name (unique identifier)", + examples=["window_prefs"], ) - verifiable_credential: Optional[List[Dict[str, Any]]] = Field( - None, alias="verifiableCredential" + title: str = Field( + ..., description="Menu option title", examples=["Window Preferences"] ) class ProofResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) error: Optional[str] = None proof: Optional[Dict[str, Any]] = None purpose_result: Optional[PurposeResult] = None verified: Optional[bool] = None -class ProvePresentationRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - options: Optional[LDProofVCOptions] = None - presentation: Optional[Presentation] = None - - -class PublishRevocations(BaseModel): - class Config: - allow_population_by_field_name = True - - options: Optional[PublishRevocationsOptions] = None - rrid2crid: Optional[Dict[str, List[Rrid2cridItem]]] = Field( - None, description="Credential revocation ids by revocation registry id" +class ProvePresentationResponse(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + verifiable_presentation: Optional[VerifiablePresentation] = Field( + None, alias="verifiablePresentation" ) class Queries(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) queries: Optional[List[QueryItem]] = None class RevListCreateRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) options: Optional[RevListOptions] = None rev_reg_def_id: Optional[str] = Field( None, description="Revocation registry definition identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], ) -class RevListState(BaseModel): - class Config: - allow_population_by_field_name = True - - revocation_list: Optional[RevListStateRevocationList] = None - state: Optional[Literal["finished", "failed", "action", "wait"]] = None +class RevListResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + job_id: Optional[str] = None + registration_metadata: Optional[Dict[str, Any]] = None + revocation_list_metadata: Optional[Dict[str, Any]] = None + revocation_list_state: Optional[RevListState] = None class RevRegCreateRequestSchemaAnoncreds(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) options: Optional[RevRegDefOptions] = None revocation_registry_definition: Optional[InnerRevRegDef] = None class RevRegDef(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) cred_def_id: Optional[str] = Field( None, alias="credDefId", description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], ) issuer_id: Optional[str] = Field( None, alias="issuerId", description="Issuer Identifier of the credential definition or schema", - example="WgWxqztrNooG92RXvxSTWv", + examples=["WgWxqztrNooG92RXvxSTWv"], ) revoc_def_type: Optional[str] = Field(None, alias="revocDefType") tag: Optional[str] = Field( None, description="tag for the revocation registry definition", - example="default", + examples=["default"], ) value: Optional[RevRegDefValue] = None -class SchemaResult(BaseModel): - class Config: - allow_population_by_field_name = True +class RevRegDefState(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + revocation_registry_definition: Optional[RevRegDef] = Field( + None, description="revocation registry definition" + ) + revocation_registry_definition_id: Optional[str] = Field( + None, + description="revocation registry definition id", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + ) + state: Optional[ + Literal["finished", "failed", "action", "wait", "decommissioned", "full"] + ] = None + +class SchemaResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) job_id: Optional[str] = None registration_metadata: Optional[Dict[str, Any]] = None schema_metadata: Optional[Dict[str, Any]] = None schema_state: Optional[SchemaState] = None -class SchemaSendResult(BaseModel): - class Config: - allow_population_by_field_name = True - - schema_: Optional[SchemaSendResultSchema] = Field(None, alias="schema") - schema_id: str = Field( - ..., - description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", - ) - - class SignRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) doc: Doc verkey: str = Field(..., description="Verkey to use for signing") -class SignedDoc(BaseModel): - class Config: - allow_population_by_field_name = True - - proof: SignedDocProof - - class TAAInfo(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) aml_record: Optional[AMLRecord] = None taa_accepted: Optional[TAAAcceptance] = None taa_record: Optional[TAARecord] = None @@ -4603,58 +4761,66 @@ class Config: class TAAResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) result: Optional[TAAInfo] = None class TransactionList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[TransactionRecord]] = Field( None, description="List of transaction records" ) -class TxnOrCredentialDefinitionSendResult(BaseModel): - class Config: - allow_population_by_field_name = True - - sent: Optional[CredentialDefinitionSendResult] = None - txn: Optional[TxnOrCredentialDefinitionSendResultTxn] = None - - -class TxnOrPublishRevocationsResult(BaseModel): - class Config: - allow_population_by_field_name = True - - sent: Optional[PublishRevocationsSchemaAnoncreds] = None - txn: Optional[TxnOrPublishRevocationsResultTxn] = None - - -class TxnOrRegisterLedgerNymResponse(BaseModel): - class Config: - allow_population_by_field_name = True - - success: Optional[bool] = Field( - None, description="Success of nym registration operation", example=True +class V10DiscoveryRecord(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + connection_id: Optional[str] = Field( + None, + description="Connection identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + created_at: Optional[str] = Field( + None, + description="Time of record creation", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + disclose: Optional[Disclose] = Field(None, description="Disclose message") + discovery_exchange_id: Optional[str] = Field( + None, + description="Credential exchange identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + query_msg: Optional[Query] = Field(None, description="Query message") + state: Optional[str] = Field( + None, description="Current record state", examples=["active"] + ) + thread_id: Optional[str] = Field( + None, + description="Thread identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + trace: Optional[bool] = Field( + None, description="Record trace information, based on agent configuration" + ) + updated_at: Optional[str] = Field( + None, + description="Time of last record update", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) - txn: Optional[TxnOrRegisterLedgerNymResponseTxn] = None - - -class V10CredentialBoundOfferRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - counter_proposal: Optional[V10CredentialBoundOfferRequestCounterProposal] = None class V10PresentationCreateRequestRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -4662,19 +4828,19 @@ class Config: auto_verify: Optional[bool] = Field( None, description="Verifier choice to auto-verify proof presentation", - example=False, + examples=[False], ) comment: Optional[str] = None proof_request: IndyProofRequest trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) class V10PresentationSendRequestRequest(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -4682,316 +4848,234 @@ class Config: auto_verify: Optional[bool] = Field( None, description="Verifier choice to auto-verify proof presentation", - example=False, + examples=[False], ) comment: Optional[str] = None connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) proof_request: IndyProofRequest trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) -class VerifiableCredential(BaseModel): - class Config: - allow_population_by_field_name = True +class V20CredFilter(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + indy: Optional[V20CredFilterIndy] = Field( + None, description="Credential filter for indy" + ) + ld_proof: Optional[LDProofVCDetail] = Field( + None, description="Credential filter for linked data proof" + ) - context: List[Dict[str, Any]] = Field( - ..., - alias="@context", - description="The JSON-LD context of the credential", - example=[ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - ], + +class V20CredFilterLDProof(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - credential_status: Optional[Dict[str, Any]] = Field( - None, alias="credentialStatus", example="" + ld_proof: LDProofVCDetail = Field( + ..., description="Credential filter for linked data proof" ) - credential_subject: Dict[str, Any] = Field( - ..., alias="credentialSubject", example="" + + +class V20CredOfferConnFreeRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - expiration_date: Optional[str] = Field( + auto_issue: Optional[bool] = Field( None, - alias="expirationDate", - description="The expiration date", - example="2010-01-01T19:23:24Z", - regex="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", + description="Whether to respond automatically to credential requests, creating and issuing requested credentials", ) - id: Optional[str] = Field( + auto_remove: Optional[bool] = Field( None, - example="http://example.edu/credentials/1872", - regex="\\w+:(\\/?\\/?)[^\\s]+", + description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", ) - issuance_date: str = Field( - ..., - alias="issuanceDate", - description="The issuance date", - example="2010-01-01T19:23:24Z", - regex="^([0-9]{4})-([0-9]{2})-([0-9]{2})([Tt ]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?$", + comment: Optional[str] = Field(None, description="Human-readable comment") + credential_preview: Optional[V20CredPreview] = None + filter: V20CredFilter = Field( + ..., description="Credential specification criteria by format" ) - issuer: Dict[str, Any] = Field( - ..., - description="The JSON-LD Verifiable Credential Issuer. Either string of object with id field.", - example="did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH", + replacement_id: Optional[str] = Field( + None, + description="Optional identifier used to manage credential replacement", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - proof: CredentialProof - type: List[str] = Field( - ..., - description="The JSON-LD type of the credential", - example=["VerifiableCredential", "AlumniCredential"], + trace: Optional[bool] = Field( + None, description="Record trace information, based on agent configuration" ) -class VerifiablePresentation(BaseModel): - class Config: - allow_population_by_field_name = True - - context: List[Dict[str, Any]] = Field( - ..., - alias="@context", - description="The JSON-LD context of the presentation", - example=["https://www.w3.org/2018/credentials/v1"], +class V20CredOfferRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - holder: Optional[Dict[str, Any]] = Field( + auto_issue: Optional[bool] = Field( None, - description="The JSON-LD Verifiable Credential Holder. Either string of object with id field.", - example="did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH", + description="Whether to respond automatically to credential requests, creating and issuing requested credentials", ) - id: Optional[str] = Field( + auto_remove: Optional[bool] = Field( None, - example="http://example.edu/presentations/1872", - regex="\\w+:(\\/?\\/?)[^\\s]+", + description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", ) - proof: PresentationProof - type: List[str] = Field( + comment: Optional[str] = Field(None, description="Human-readable comment") + connection_id: str = Field( ..., - description="The JSON-LD type of the presentation", - example=["VerifiablePresentation"], + description="Connection identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - verifiable_credential: Optional[List[Dict[str, Any]]] = Field( - None, alias="verifiableCredential" + credential_preview: Optional[V20CredPreview] = None + filter: V20CredFilter = Field( + ..., description="Credential specification criteria by format" + ) + replacement_id: Optional[str] = Field( + None, + description="Optional identifier used to manage credential replacement", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + trace: Optional[bool] = Field( + None, description="Record trace information, based on agent configuration" ) -class VerifyCredentialRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - options: Optional[LDProofVCOptions] = None - verifiable_credential: Optional[VerifiableCredential] = Field( - None, alias="verifiableCredential" +class V20CredRequestFree(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + auto_remove: Optional[bool] = Field( + None, + description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", + ) + comment: Optional[str] = Field(None, description="Human-readable comment") + connection_id: str = Field( + ..., + description="Connection identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + filter: V20CredFilterLDProof = Field( + ..., description="Credential specification criteria by format" + ) + holder_did: Optional[str] = Field( + None, + description="Holder DID to substitute for the credentialSubject.id", + examples=["did:key:ahsdkjahsdkjhaskjdhakjshdkajhsdkjahs"], + ) + trace: Optional[bool] = Field( + None, description="Whether to trace event (default false)", examples=[False] ) -class VerifyPresentationRequest(BaseModel): - class Config: - allow_population_by_field_name = True +class V20DiscoveryRecord(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + connection_id: Optional[str] = Field( + None, + description="Connection identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + created_at: Optional[str] = Field( + None, + description="Time of record creation", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + disclosures: Optional[Disclosures] = Field(None, description="Disclosures message") + discovery_exchange_id: Optional[str] = Field( + None, + description="Credential exchange identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + queries_msg: Optional[Queries] = Field(None, description="Queries message") + state: Optional[str] = Field( + None, description="Current record state", examples=["active"] + ) + thread_id: Optional[str] = Field( + None, + description="Thread identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + trace: Optional[bool] = Field( + None, description="Record trace information, based on agent configuration" + ) + updated_at: Optional[str] = Field( + None, + description="Time of last record update", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) - options: Optional[LDProofVCOptions] = None - verifiable_presentation: Optional[VerifiablePresentation] = Field( - None, alias="verifiablePresentation" + +class V20IssueCredSchemaCore(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + auto_remove: Optional[bool] = Field( + None, + description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", + ) + comment: Optional[str] = Field(None, description="Human-readable comment") + credential_preview: Optional[V20CredPreview] = None + filter: V20CredFilter = Field( + ..., description="Credential specification criteria by format" + ) + replacement_id: Optional[str] = Field( + None, + description="Optional identifier used to manage credential replacement", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + trace: Optional[bool] = Field( + None, description="Record trace information, based on agent configuration" ) class WalletList(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[WalletRecord]] = Field( None, description="List of wallet records" ) -class AttachDecoratorDataJws(AttachDecoratorDataJWS): - """ - Detached Java Web Signature - """ - - class Config: - allow_population_by_field_name = True - - -class CredDefValuePrimary(CredDefValuePrimary1): - """ - Primary value for credential definition - """ - - class Config: - allow_population_by_field_name = True - - -class IndyProofProofProofsProofPrimaryProof(IndyPrimaryProof): - """ - Indy primary proof - """ - - class Config: - allow_population_by_field_name = True - - -class IndyRevRegDefValuePublicKeys(IndyRevRegDefValuePublicKeys1): - """ - Public keys - """ - - class Config: - allow_population_by_field_name = True - - -class IssuerRevRegRecordRevocRegEntry(IndyRevRegEntry): - """ - Revocation registry entry - """ - - class Config: - allow_population_by_field_name = True - - -class LDProofVCDetailCredential(Credential): - """ - Detail of the JSON-LD Credential to be issued - """ - - class Config: - allow_population_by_field_name = True - - -class LDProofVCDetailOptions(LDProofVCOptions): - """ - Options for specifying how the linked data proof is created. - """ - - class Config: - allow_population_by_field_name = True - - -class RevRegDefStateRevocationRegistryDefinition(RevRegDef): - """ - revocation registry definition - """ - - class Config: - allow_population_by_field_name = True - - -class TxnOrSchemaSendResultSent(SchemaSendResult): - """ - Content sent - """ - - class Config: - allow_population_by_field_name = True - - -class V10CredentialExchangeCredentialOffer(IndyCredAbstract): - """ - (Indy) credential offer - """ - - class Config: - allow_population_by_field_name = True - - -class V10DiscoveryRecordDisclose(Disclose): - """ - Disclose message - """ - - class Config: - allow_population_by_field_name = True - - -class V10PresentationExchangePresentationRequest(IndyProofRequest): - """ - (Indy) presentation request (also known as proof request) - """ - - class Config: - allow_population_by_field_name = True - - -class V20DiscoveryRecordQueriesMsg(Queries): - """ - Queries message - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresProposalByFormatIndy(IndyProofRequest): - """ - Presentation proposal for indy - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresRequestByFormatIndy(IndyProofRequest): - """ - Presentation request for indy - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresSpecByFormatRequestIndy(IndyPresSpec): - """ - Presentation specification for indy - """ - - class Config: - allow_population_by_field_name = True - - -class VerifyRequestDoc(SignedDoc): - """ - Signed document - """ - - class Config: - allow_population_by_field_name = True - - class AttachDecoratorData(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) base64: Optional[str] = Field( None, description="Base64-encoded data", - example="ey4uLn0=", - regex="^[a-zA-Z0-9+/]*={0,2}$", + examples=["ey4uLn0="], + pattern="^[a-zA-Z0-9+/]*={0,2}$", ) json_: Optional[Dict[str, Any]] = Field( None, alias="json", description="JSON-serialized data", - example='{"sample": "content"}', + examples=['{"sample": "content"}'], + ) + jws: Optional[AttachDecoratorDataJWS] = Field( + None, description="Detached Java Web Signature" ) - jws: Optional[AttachDecoratorDataJws] = None links: Optional[List[str]] = Field( None, description="List of hypertext links to data" ) sha256: Optional[str] = Field( None, description="SHA256 hash (binhex encoded) of content", - example="617a48c7c8afe0521efdc03e5bb0ad9e655893e6b4b51f0e794d70fba132aacb", - regex="^[a-fA-F0-9+/]{64}$", + examples=["617a48c7c8afe0521efdc03e5bb0ad9e655893e6b4b51f0e794d70fba132aacb"], + pattern="^[a-fA-F0-9+/]{64}$", ) class Constraints(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) fields: Optional[List[DIFField]] = None is_holder: Optional[List[DIFHolder]] = None limit_disclosure: Optional[str] = Field(None, description="LimitDisclosure") @@ -5003,68 +5087,95 @@ class Config: ) -class CredDef(BaseModel): - class Config: - allow_population_by_field_name = True +class CredDefResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + credential_definition_metadata: Optional[Dict[str, Any]] = None + credential_definition_state: Optional[CredDefState] = None + job_id: Optional[str] = None + registration_metadata: Optional[Dict[str, Any]] = None - issuer_id: Optional[str] = Field( + +class CredDefValue(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + primary: Optional[CredDefValuePrimary] = Field( + None, description="Primary value for credential definition" + ) + revocation: Optional[CredDefValueRevocation] = Field( + None, description="Revocation value for credential definition" + ) + + +class CredentialDefinition(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + id: Optional[str] = Field( None, - alias="issuerId", - description="Issuer Identifier of the credential definition or schema", - example="WgWxqztrNooG92RXvxSTWv", + description="Credential definition identifier", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) schema_id: Optional[str] = Field( None, alias="schemaId", - description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + description="Schema identifier within credential definition identifier", + examples=["20"], ) tag: Optional[str] = Field( None, - description="The tag value passed in by the Issuer to\n an AnonCred's Credential Definition create and store implementation.", - example="default", + description="Tag within credential definition identifier", + examples=["tag"], + ) + type: Optional[Dict[str, Any]] = Field( + None, + description="Signature type: CL for Camenisch-Lysyanskaya", + examples=["CL"], + ) + value: Optional[CredDefValue] = Field( + None, description="Credential definition primary and revocation values" + ) + ver: Optional[str] = Field( + None, description="Node protocol version", examples=["1.0"], pattern="^[0-9.]+$" ) - type: Optional[Literal["CL"]] = None - value: Optional[CredDefValueSchemaAnoncreds] = None - -class CredDefValue(BaseModel): - class Config: - allow_population_by_field_name = True - primary: Optional[CredDefValuePrimary] = None - revocation: Optional[CredDefValueRevocation] = None +class CredentialDefinitionGetResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + credential_definition: Optional[CredentialDefinition] = None class DocumentVerificationResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) document: Optional[Dict[str, Any]] = None errors: Optional[List[str]] = None results: Optional[List[ProofResult]] = None verified: bool -class FetchCredentialResponse(BaseModel): - class Config: - allow_population_by_field_name = True - - results: Optional[VerifiableCredential] = None - - -class IndyProofProofProofsProof(BaseModel): - class Config: - allow_population_by_field_name = True - - non_revoc_proof: Optional[IndyProofProofProofsProofNonRevocProof] = None - primary_proof: Optional[IndyProofProofProofsProofPrimaryProof] = None - +class IndyProofProof(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + aggregated_proof: Optional[IndyProofProofAggregatedProof] = Field( + None, description="Indy proof aggregated proof" + ) + proofs: Optional[List[IndyProofProofProofsProof]] = Field( + None, description="Indy proof proofs" + ) -class IndyProofRequestedProof1(BaseModel): - class Config: - allow_population_by_field_name = True +class IndyProofRequestedProof(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) predicates: Optional[Dict[str, IndyProofRequestedProofPredicate]] = Field( None, description="Proof requested proof predicates." ) @@ -5082,10 +5193,10 @@ class Config: ) -class IndyRevRegDefValue1(BaseModel): - class Config: - allow_population_by_field_name = True - +class IndyRevRegDefValue(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) issuance_type: Optional[Literal["ISSUANCE_ON_DEMAND", "ISSUANCE_BY_DEFAULT"]] = ( Field(None, alias="issuanceType", description="Issuance type") ) @@ -5093,18 +5204,18 @@ class Config: None, alias="maxCredNum", description="Maximum number of credentials; registry size", - example=10, + examples=[10], ge=1, ) public_keys: Optional[IndyRevRegDefValuePublicKeys] = Field( - None, alias="publicKeys" + None, alias="publicKeys", description="Public keys" ) tails_hash: Optional[str] = Field( None, alias="tailsHash", description="Tails hash value", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) tails_location: Optional[str] = Field( None, alias="tailsLocation", description="Tails file location" @@ -5112,101 +5223,96 @@ class Config: class InputDescriptors(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) constraints: Optional[Constraints] = None group: Optional[List[str]] = None id: Optional[str] = Field(None, description="ID") metadata: Optional[Dict[str, Any]] = Field(None, description="Metadata dictionary") name: Optional[str] = Field(None, description="Name") purpose: Optional[str] = Field(None, description="Purpose") - schema_: Optional[InputDescriptorsSchema] = Field(None, alias="schema") - - -class IssueCredentialRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - credential: Optional[Credential] = None - options: Optional[LDProofVCOptions] = None - - -class IssueCredentialResponse(BaseModel): - class Config: - allow_population_by_field_name = True - - verifiable_credential: Optional[VerifiableCredential] = Field( - None, alias="verifiableCredential" + schema_: Optional[SchemasInputDescriptorFilter] = Field( + None, + alias="schema", + description="Accepts a list of schema or a dict containing filters like oneof_filter.", + examples=[ + { + "oneof_filter": [ + [ + {"uri": "https://www.w3.org/Test1#Test1"}, + {"uri": "https://www.w3.org/Test2#Test2"}, + ], + { + "oneof_filter": [ + [{"uri": "https://www.w3.org/Test1#Test1"}], + [{"uri": "https://www.w3.org/Test2#Test2"}], + ] + }, + ] + } + ], ) -class LDProofVCDetail(BaseModel): - class Config: - allow_population_by_field_name = True - - credential: LDProofVCDetailCredential - options: LDProofVCDetailOptions - - class Menu(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) description: Optional[str] = Field( None, description="Introductory text for the menu", - example="This menu presents options", + examples=["This menu presents options"], ) errormsg: Optional[str] = Field( None, description="An optional error message to display in menu header", - example="Error: item not found", + examples=["Error: item not found"], ) options: List[MenuOption] = Field(..., description="List of menu options") - title: Optional[str] = Field(None, description="Menu title", example="My Menu") + title: Optional[str] = Field(None, description="Menu title", examples=["My Menu"]) class MenuJson(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) description: Optional[str] = Field( None, description="Introductory text for the menu", - example="User preferences for window settings", + examples=["User preferences for window settings"], ) errormsg: Optional[str] = Field( None, description="Optional error message to display in menu header", - example="Error: item not present", + examples=["Error: item not present"], ) options: List[MenuOption] = Field(..., description="List of menu options") - title: Optional[str] = Field(None, description="Menu title", example="My Menu") + title: Optional[str] = Field(None, description="Menu title", examples=["My Menu"]) class PresentationDefinition(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) format: Optional[ClaimFormat] = None id: Optional[str] = Field( None, description="Unique Resource Identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - regex="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + pattern="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", ) input_descriptors: Optional[List[InputDescriptors]] = None name: Optional[str] = Field( @@ -5221,145 +5327,102 @@ class Config: class PresentationVerificationResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) credential_results: Optional[List[DocumentVerificationResult]] = None errors: Optional[List[str]] = None presentation_result: Optional[DocumentVerificationResult] = None verified: bool -class ProvePresentationResponse(BaseModel): - class Config: - allow_population_by_field_name = True - - verifiable_presentation: Optional[VerifiablePresentation] = Field( - None, alias="verifiablePresentation" +class RevRegDefResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - - -class RevListResult(BaseModel): - class Config: - allow_population_by_field_name = True - job_id: Optional[str] = None registration_metadata: Optional[Dict[str, Any]] = None - revocation_list_metadata: Optional[Dict[str, Any]] = None - revocation_list_state: Optional[RevListState] = None - + revocation_registry_definition_metadata: Optional[Dict[str, Any]] = None + revocation_registry_definition_state: Optional[RevRegDefState] = None -class RevRegDefState(BaseModel): - class Config: - allow_population_by_field_name = True - revocation_registry_definition: Optional[ - RevRegDefStateRevocationRegistryDefinition - ] = None - revocation_registry_definition_id: Optional[str] = Field( - None, - description="revocation registry definition id", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", +class SendMenu(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - state: Optional[ - Literal["finished", "failed", "action", "wait", "decommissioned", "full"] - ] = None + menu: MenuJson = Field(..., description="Menu to send to connection") -class TxnOrSchemaSendResult(BaseModel): - class Config: - allow_population_by_field_name = True +class V10DiscoveryExchangeListResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + results: Optional[List[V10DiscoveryRecord]] = None - sent: Optional[TxnOrSchemaSendResultSent] = None - txn: Optional[TxnOrSchemaSendResultTxn] = None +class V20CredBoundOfferRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + counter_preview: Optional[V20CredPreview] = Field( + None, description="Optional content for counter-proposal" + ) + filter: Optional[V20CredFilter] = Field( + None, description="Credential specification criteria by format" + ) -class V10DiscoveryRecord(BaseModel): - class Config: - allow_population_by_field_name = True - connection_id: Optional[str] = Field( - None, - description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", +class V20CredExFree(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - created_at: Optional[str] = Field( + auto_remove: Optional[bool] = Field( None, - description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", ) - disclose: Optional[V10DiscoveryRecordDisclose] = None - discovery_exchange_id: Optional[str] = Field( - None, - description="Credential exchange identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + comment: Optional[str] = Field(None, description="Human-readable comment") + connection_id: str = Field( + ..., + description="Connection identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - query_msg: Optional[V10DiscoveryRecordQueryMsg] = None - state: Optional[str] = Field( - None, description="Current record state", example="active" + credential_preview: Optional[V20CredPreview] = None + filter: V20CredFilter = Field( + ..., description="Credential specification criteria by format" ) - thread_id: Optional[str] = Field( + replacement_id: Optional[str] = Field( None, - description="Thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="Optional identifier used to manage credential replacement", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" ) - updated_at: Optional[str] = Field( - None, - description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + verification_method: Optional[str] = Field( + None, description="For ld-proofs. Verification method for signing." ) -class V20DiscoveryRecord(BaseModel): - class Config: - allow_population_by_field_name = True - - connection_id: Optional[str] = Field( - None, - description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - created_at: Optional[str] = Field( - None, - description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", - ) - disclosures: Optional[V20DiscoveryRecordDisclosures] = None - discovery_exchange_id: Optional[str] = Field( - None, - description="Credential exchange identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - queries_msg: Optional[V20DiscoveryRecordQueriesMsg] = None - state: Optional[str] = Field( - None, description="Current record state", example="active" - ) - thread_id: Optional[str] = Field( - None, - description="Thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", +class V20DiscoveryExchangeListResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - trace: Optional[bool] = Field( - None, description="Record trace information, based on agent configuration" + results: Optional[List[V20DiscoveryRecord]] = None + + +class V20DiscoveryExchangeResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - updated_at: Optional[str] = Field( - None, - description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + results: Optional[V20DiscoveryRecord] = Field( + None, description="Discover Features v2.0 exchange record" ) class VerifyCredentialResponse(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[PresentationVerificationResult] = None @@ -5367,905 +5430,331 @@ class VerifyPresentationResponse(VerifyCredentialResponse): pass -class VerifyRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - doc: VerifyRequestDoc - verkey: Optional[str] = Field( - None, description="Verkey to use for doc verification" - ) - - -class ActionMenuFetchResultResult(Menu): - """ - Action menu - """ - - class Config: - allow_population_by_field_name = True - - -class CredDefStateCredentialDefinition(CredDef): - """ - credential definition - """ - - class Config: - allow_population_by_field_name = True - - -class CredentialDefinitionValue(CredDefValue): - """ - Credential definition primary and revocation values - """ - - class Config: - allow_population_by_field_name = True - - -class IndyProofRequestedProof(IndyProofRequestedProof1): - """ - Indy proof.requested_proof content - """ - - class Config: - allow_population_by_field_name = True - - -class IndyRevRegDefValue(IndyRevRegDefValue1): - """ - Revocation registry definition value - """ - - class Config: - allow_population_by_field_name = True - - -class SendMenuMenu(MenuJson): - """ - Menu to send to connection - """ - - class Config: - allow_population_by_field_name = True - - -class V10DiscoveryExchangeListResultResultsInner(V10DiscoveryRecord): - """ - Discover Features v1.0 exchange record - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredFilterLdProof(LDProofVCDetail): - """ - Credential filter for linked data proof - """ - - class Config: - allow_population_by_field_name = True - - -class V20DiscoveryExchangeListResultResultsInner(V20DiscoveryRecord): - """ - Discover Features v2.0 exchange record - """ - - class Config: - allow_population_by_field_name = True - - class ActionMenuFetchResult(BaseModel): - class Config: - allow_population_by_field_name = True - - result: Optional[ActionMenuFetchResultResult] = None + model_config = ConfigDict( + populate_by_name=True, + ) + result: Optional[Menu] = Field(None, description="Action menu") class AttachDecorator(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Attachment identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) byte_count: Optional[int] = Field( - None, description="Byte count of data included by reference", example=1234 + None, description="Byte count of data included by reference", examples=[1234] ) data: AttachDecoratorData description: Optional[str] = Field( None, description="Human-readable description of content", - example="view from doorway, facing east, with lights off", + examples=["view from doorway, facing east, with lights off"], ) filename: Optional[str] = Field( - None, description="File name", example="IMG1092348.png" + None, description="File name", examples=["IMG1092348.png"] ) lastmod_time: Optional[str] = Field( None, - description="Hint regarding last modification datetime, in ISO-8601 format", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", - ) - mime_type: Optional[str] = Field( - None, alias="mime-type", description="MIME type", example="image/png" - ) - - -class CredDefState(BaseModel): - class Config: - allow_population_by_field_name = True - - credential_definition: Optional[CredDefStateCredentialDefinition] = None - credential_definition_id: Optional[str] = Field( - None, - description="credential definition id", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - ) - state: Optional[Literal["finished", "failed", "action", "wait"]] = None - - -class CredentialDefinition(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", - ) - schema_id: Optional[str] = Field( - None, - alias="schemaId", - description="Schema identifier within credential definition identifier", - example="20", - ) - tag: Optional[str] = Field( - None, description="Tag within credential definition identifier", example="tag" - ) - type: Optional[Dict[str, Any]] = Field( - None, description="Signature type: CL for Camenisch-Lysyanskaya", example="CL" - ) - value: Optional[CredentialDefinitionValue] = None - ver: Optional[str] = Field( - None, description="Node protocol version", example="1.0", regex="^[0-9.]+$" - ) - - -class CredentialDefinitionGetResult(BaseModel): - class Config: - allow_population_by_field_name = True - - credential_definition: Optional[CredentialDefinition] = None - - -class CredentialOffer(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - type: Optional[str] = Field( - None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", - ) - comment: Optional[str] = Field(None, description="Human-readable comment") - credential_preview: Optional[CredentialPreview] = None - offers_attach: List[AttachDecorator] = Field(..., alias="offers~attach") - - -class DIFPresSpec(BaseModel): - class Config: - allow_population_by_field_name = True - - issuer_id: Optional[str] = Field( - None, - description="Issuer identifier to sign the presentation, if different from current public DID", - ) - presentation_definition: Optional[PresentationDefinition] = None - record_ids: Optional[Dict[str, Any]] = Field( - None, - description="Mapping of input_descriptor id to list of stored W3C credential record_id", - example={ - "": ["", ""], - "": [""], - }, - ) - reveal_doc: Optional[Dict[str, Any]] = Field( - None, - description="reveal doc [JSON-LD frame] dict used to derive the credential when selective disclosure is required", - example={ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/bbs/v1", - ], - "@explicit": True, - "@requireAll": True, - "credentialSubject": { - "@explicit": True, - "@requireAll": True, - "Observation": [ - {"effectiveDateTime": {}, "@explicit": True, "@requireAll": True} - ], - }, - "issuanceDate": {}, - "issuer": {}, - "type": ["VerifiableCredential", "LabReport"], - }, - ) - - -class DIFProofProposal(BaseModel): - class Config: - allow_population_by_field_name = True - - input_descriptors: Optional[List[InputDescriptors]] = None - options: Optional[DIFOptions] = None - - -class DIFProofRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - options: Optional[DIFOptions] = None - presentation_definition: PresentationDefinition - - -class GetCredDefResult(BaseModel): - class Config: - allow_population_by_field_name = True - - credential_definition: Optional[CredDefStateCredentialDefinition] = None - credential_definition_id: Optional[str] = Field( - None, - description="credential definition id", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - ) - credential_definitions_metadata: Optional[Dict[str, Any]] = None - resolution_metadata: Optional[Dict[str, Any]] = None - - -class IndyProofProof1(BaseModel): - class Config: - allow_population_by_field_name = True - - aggregated_proof: Optional[IndyProofProofAggregatedProof] = None - proofs: Optional[List[IndyProofProofProofsProof]] = Field( - None, description="Indy proof proofs" - ) - - -class IndyRevRegDef(BaseModel): - class Config: - allow_population_by_field_name = True - - cred_def_id: Optional[str] = Field( - None, - alias="credDefId", - description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", - ) - id: Optional[str] = Field( - None, - description="Indy revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", - ) - revoc_def_type: Optional[Literal["CL_ACCUM"]] = Field( - None, - alias="revocDefType", - description="Revocation registry type (specify CL_ACCUM)", - example="CL_ACCUM", - ) - tag: Optional[str] = Field(None, description="Revocation registry tag") - value: Optional[IndyRevRegDefValue] = None - ver: Optional[str] = Field( - None, - description="Version of revocation registry definition", - example="1.0", - regex="^[0-9.]+$", - ) - - -class InvitationMessage(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - type: Optional[str] = Field( - None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", - ) - accept: Optional[List[str]] = Field( - None, - description="List of mime type in order of preference", - example=["didcomm/aip1", "didcomm/aip2;env=rfc19"], - ) - goal: Optional[str] = Field( - None, - description="A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message", - example="To issue a Faber College Graduate credential", - ) - goal_code: Optional[str] = Field( - None, - description="A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message", - example="issue-vc", - ) - handshake_protocols: Optional[List[str]] = None - image_url: Optional[str] = Field( - None, - alias="imageUrl", - description="Optional image URL for out-of-band invitation", - example="http://192.168.56.101/img/logo.jpg", - ) - label: Optional[str] = Field(None, description="Optional label", example="Bob") - requests_attach: Optional[List[AttachDecorator]] = Field( - None, alias="requests~attach", description="Optional request attachment" - ) - services: Optional[List[Dict[str, Any]]] = Field( - None, - example=[ - { - "did": "WgWxqztrNooG92RXvxSTWv", - "id": "string", - "recipientKeys": [ - "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH" - ], - "routingKeys": [ - "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH" - ], - "serviceEndpoint": "http://192.168.56.101:8020", - "type": "string", - }, - "did:sov:WgWxqztrNooG92RXvxSTWv", - ], - ) - - -class PresentationRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - type: Optional[str] = Field( - None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", - ) - comment: Optional[str] = Field(None, description="Human-readable comment") - request_presentations_attach: List[AttachDecorator] = Field( - ..., alias="request_presentations~attach" - ) - - -class RevRegDefResult(BaseModel): - class Config: - allow_population_by_field_name = True - - job_id: Optional[str] = None - registration_metadata: Optional[Dict[str, Any]] = None - revocation_registry_definition_metadata: Optional[Dict[str, Any]] = None - revocation_registry_definition_state: Optional[RevRegDefState] = None - - -class SendMenu(BaseModel): - class Config: - allow_population_by_field_name = True - - menu: SendMenuMenu - - -class V10DiscoveryExchangeListResult(BaseModel): - class Config: - allow_population_by_field_name = True - - results: Optional[List[V10DiscoveryExchangeListResultResultsInner]] = None - - -class V20CredFilter(BaseModel): - class Config: - allow_population_by_field_name = True - - indy: Optional[V20CredFilterIndy] = None - ld_proof: Optional[V20CredFilterLdProof] = None - - -class V20CredFilterLDProof(BaseModel): - class Config: - allow_population_by_field_name = True - - ld_proof: V20CredFilterLdProof - - -class V20CredIssue(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - type: Optional[str] = Field( - None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", - ) - comment: Optional[str] = Field(None, description="Human-readable comment") - credentials_attach: List[AttachDecorator] = Field( - ..., alias="credentials~attach", description="Credential attachments" - ) - formats: List[V20CredFormat] = Field( - ..., description="Acceptable attachment formats" - ) - replacement_id: Optional[str] = Field( - None, - description="Issuer-unique identifier to coordinate credential replacement", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - - -class V20CredOffer(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - type: Optional[str] = Field( - None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", - ) - comment: Optional[str] = Field(None, description="Human-readable comment") - credential_preview: Optional[V20CredPreview] = None - formats: List[V20CredFormat] = Field( - ..., description="Acceptable credential formats" - ) - offers_attach: List[AttachDecorator] = Field( - ..., alias="offers~attach", description="Offer attachments" - ) - replacement_id: Optional[str] = Field( - None, - description="Issuer-unique identifier to coordinate credential replacement", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - - -class V20CredProposal(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - type: Optional[str] = Field( - None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", - ) - comment: Optional[str] = Field(None, description="Human-readable comment") - credential_preview: Optional[V20CredProposalCredentialPreview] = None - filters_attach: List[AttachDecorator] = Field( - ..., - alias="filters~attach", - description="Credential filter per acceptable format on corresponding identifier", - ) - formats: List[V20CredFormat] = Field(..., description="Attachment formats") - - -class V20CredRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( - None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - type: Optional[str] = Field( - None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", - ) - comment: Optional[str] = Field(None, description="Human-readable comment") - formats: List[V20CredFormat] = Field( - ..., description="Acceptable attachment formats" - ) - requests_attach: List[AttachDecorator] = Field( - ..., alias="requests~attach", description="Request attachments" - ) - - -class V20DiscoveryExchangeListResult(BaseModel): - class Config: - allow_population_by_field_name = True - - results: Optional[List[V20DiscoveryExchangeListResultResultsInner]] = None - - -class V20DiscoveryExchangeResult(BaseModel): - class Config: - allow_population_by_field_name = True - - results: Optional[V20DiscoveryExchangeListResultResultsInner] = None - + description="Hint regarding last modification datetime, in ISO-8601 format", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + mime_type: Optional[str] = Field( + None, alias="mime-type", description="MIME type", examples=["image/png"] + ) -class V20Pres(BaseModel): - class Config: - allow_population_by_field_name = True +class CredentialOffer(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) comment: Optional[str] = Field(None, description="Human-readable comment") - formats: List[V20PresFormat] = Field( - ..., description="Acceptable attachment formats" - ) - presentations_attach: List[AttachDecorator] = Field( - ..., alias="presentations~attach" - ) - + credential_preview: Optional[CredentialPreview] = None + offers_attach: List[AttachDecorator] = Field(..., alias="offers~attach") -class V20PresProposal(BaseModel): - class Config: - allow_population_by_field_name = True +class DIDXRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) - comment: Optional[str] = Field(None, description="Human-readable comment") - formats: List[V20PresFormat] - proposals_attach: List[AttachDecorator] = Field( - ..., - alias="proposals~attach", - description="Attachment per acceptable format on corresponding identifier", + did: Optional[str] = Field( + None, + description="DID of exchange", + examples=["did:peer:WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", ) - - -class V20PresRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - id: Optional[str] = Field( + did_doc_attach: Optional[AttachDecorator] = Field( None, - alias="@id", - description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + alias="did_doc~attach", + description="As signed attachment, DID Doc associated with DID", ) - type: Optional[str] = Field( + goal: Optional[str] = Field( None, - alias="@type", - description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + description="A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message", + examples=["To issue a Faber College Graduate credential"], ) - comment: Optional[str] = Field(None, description="Human-readable comment") - formats: List[V20PresFormat] - request_presentations_attach: List[AttachDecorator] = Field( - ..., - alias="request_presentations~attach", - description="Attachment per acceptable format on corresponding identifier", + goal_code: Optional[str] = Field( + None, + description="A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message", + examples=["issue-vc"], ) - will_confirm: Optional[bool] = Field( - None, description="Whether verifier will send confirmation ack" + label: str = Field( + ..., + description="Label for DID exchange request", + examples=["Request to connect with Bob"], ) -class DIDXRequestDidDocAttach(AttachDecorator): - """ - As signed attachment, DID Doc associated with DID - """ - - class Config: - allow_population_by_field_name = True - - -class IndyProofProof(IndyProofProof1): - """ - Indy proof.proof content - """ - - class Config: - allow_population_by_field_name = True - - -class InvitationRecordInvitation(InvitationMessage): - """ - Out of band invitation message - """ - - class Config: - allow_population_by_field_name = True - - -class IssuerRevRegRecordRevocRegDef(IndyRevRegDef): - """ - Revocation registry definition - """ - - class Config: - allow_population_by_field_name = True - - -class V10CredentialExchangeCredentialOfferDict(CredentialOffer): - """ - Credential offer message - """ - - class Config: - allow_population_by_field_name = True - - -class V10PresentationExchangePresentationRequestDict(PresentationRequest): - """ - Presentation request message - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredBoundOfferRequestFilter(V20CredFilter): - """ - Credential specification criteria by format - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredExRecordCredIssue(V20CredIssue): - """ - Serialized credential issue message - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredExRecordCredOffer(V20CredOffer): - """ - Credential offer message - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredExRecordCredProposal(V20CredProposal): - """ - Credential proposal message - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredExRecordCredRequest(V20CredRequest): - """ - Serialized credential request message - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredRequestFreeFilter(V20CredFilterLDProof): - """ - Credential specification criteria by format - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresExRecordPres(V20Pres): - """ - Presentation message - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresExRecordPresProposal(V20PresProposal): - """ - Presentation proposal message - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresExRecordPresRequest(V20PresRequest): - """ - Presentation request message - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresProposalByFormatDif(DIFProofProposal): - """ - Presentation proposal for DIF - """ - - class Config: - allow_population_by_field_name = True - - -class V20PresRequestByFormatDif(DIFProofRequest): - """ - Presentation request for DIF - """ +class DIFPresSpec(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + issuer_id: Optional[str] = Field( + None, + description="Issuer identifier to sign the presentation, if different from current public DID", + ) + presentation_definition: Optional[PresentationDefinition] = None + record_ids: Optional[Dict[str, Any]] = Field( + None, + description="Mapping of input_descriptor id to list of stored W3C credential record_id", + examples=[ + { + "": ["", ""], + "": [""], + } + ], + ) + reveal_doc: Optional[Dict[str, Any]] = Field( + None, + description="reveal doc [JSON-LD frame] dict used to derive the credential when selective disclosure is required", + examples=[ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/bbs/v1", + ], + "@explicit": True, + "@requireAll": True, + "credentialSubject": { + "@explicit": True, + "@requireAll": True, + "Observation": [ + { + "effectiveDateTime": {}, + "@explicit": True, + "@requireAll": True, + } + ], + }, + "issuanceDate": {}, + "issuer": {}, + "type": ["VerifiableCredential", "LabReport"], + } + ], + ) - class Config: - allow_population_by_field_name = True +class DIFProofProposal(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + input_descriptors: Optional[List[InputDescriptors]] = None + options: Optional[DIFOptions] = None -class V20PresSpecByFormatRequestDif(DIFPresSpec): - """ - Optional Presentation specification for DIF, overrides the PresentionExchange record's PresRequest - """ - class Config: - allow_population_by_field_name = True +class DIFProofRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + options: Optional[DIFOptions] = None + presentation_definition: PresentationDefinition -class CredDefResult(BaseModel): - class Config: - allow_population_by_field_name = True +class IndyProof(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + identifiers: Optional[List[IndyProofIdentifier]] = Field( + None, description="Indy proof.identifiers content" + ) + proof: Optional[IndyProofProof] = Field( + None, description="Indy proof.proof content" + ) + requested_proof: Optional[IndyProofRequestedProof] = Field( + None, description="Indy proof.requested_proof content" + ) - credential_definition_metadata: Optional[Dict[str, Any]] = None - credential_definition_state: Optional[CredDefState] = None - job_id: Optional[str] = None - registration_metadata: Optional[Dict[str, Any]] = None +class IndyRevRegDef(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + cred_def_id: Optional[str] = Field( + None, + alias="credDefId", + description="Credential definition identifier", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + ) + id: Optional[str] = Field( + None, + description="Indy revocation registry identifier", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + ) + revoc_def_type: Optional[Literal["CL_ACCUM"]] = Field( + None, + alias="revocDefType", + description="Revocation registry type (specify CL_ACCUM)", + examples=["CL_ACCUM"], + ) + tag: Optional[str] = Field(None, description="Revocation registry tag") + value: Optional[IndyRevRegDefValue] = Field( + None, description="Revocation registry definition value" + ) + ver: Optional[str] = Field( + None, + description="Version of revocation registry definition", + examples=["1.0"], + pattern="^[0-9.]+$", + ) -class DIDXRequest(BaseModel): - class Config: - allow_population_by_field_name = True +class InvitationMessage(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) id: Optional[str] = Field( None, alias="@id", description="Message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) type: Optional[str] = Field( None, alias="@type", description="Message type", - example="https://didcomm.org/my-family/1.0/my-message-type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) - did: Optional[str] = Field( + accept: Optional[List[str]] = Field( None, - description="DID of exchange", - example="did:peer:WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$|^did:([a-zA-Z0-9_]+):([a-zA-Z0-9_.%-]+(:[a-zA-Z0-9_.%-]+)*)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(\\/[^#?]*)?([?][^#]*)?(\\#.*)?$$", - ) - did_doc_attach: Optional[DIDXRequestDidDocAttach] = Field( - None, alias="did_doc~attach" + description="List of mime type in order of preference", + examples=[["didcomm/aip1", "didcomm/aip2;env=rfc19"]], ) goal: Optional[str] = Field( None, description="A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message", - example="To issue a Faber College Graduate credential", + examples=["To issue a Faber College Graduate credential"], ) goal_code: Optional[str] = Field( None, description="A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message", - example="issue-vc", + examples=["issue-vc"], ) - label: str = Field( - ..., - description="Label for DID exchange request", - example="Request to connect with Bob", + handshake_protocols: Optional[List[str]] = None + image_url: Optional[str] = Field( + None, + alias="imageUrl", + description="Optional image URL for out-of-band invitation", + examples=["http://192.168.56.101/img/logo.jpg"], ) - - -class IndyProof(BaseModel): - class Config: - allow_population_by_field_name = True - - identifiers: Optional[List[IndyProofIdentifier]] = Field( - None, description="Indy proof.identifiers content" + label: Optional[str] = Field(None, description="Optional label", examples=["Bob"]) + requests_attach: Optional[List[AttachDecorator]] = Field( + None, alias="requests~attach", description="Optional request attachment" + ) + services: Optional[List[Dict[str, Any]]] = Field( + None, + examples=[ + [ + { + "did": "WgWxqztrNooG92RXvxSTWv", + "id": "string", + "recipientKeys": [ + "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH" + ], + "routingKeys": [ + "did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH" + ], + "serviceEndpoint": "http://192.168.56.101:8020", + "type": "string", + }, + "did:sov:WgWxqztrNooG92RXvxSTWv", + ] + ], ) - proof: Optional[IndyProofProof] = None - requested_proof: Optional[IndyProofRequestedProof] = None class InvitationRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) invi_msg_id: Optional[str] = Field( None, description="Invitation message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + invitation: Optional[InvitationMessage] = Field( + None, description="Out of band invitation message" ) - invitation: Optional[InvitationRecordInvitation] = None invitation_id: Optional[str] = Field( None, description="Invitation record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) invitation_url: Optional[str] = Field( None, description="Invitation message URL", - example="https://example.com/endpoint?c_i=eyJAdHlwZSI6ICIuLi4iLCAiLi4uIjogIi4uLiJ9XX0=", + examples=[ + "https://example.com/endpoint?c_i=eyJAdHlwZSI6ICIuLi4iLCAiLi4uIjogIi4uLiJ9XX0=" + ], ) oob_id: Optional[str] = Field( None, description="Out of band record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) state: Optional[str] = Field( - None, description="Out of band message exchange state", example="await_response" + None, + description="Out of band message exchange state", + examples=["await_response"], ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -6273,40 +5762,40 @@ class Config: updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) class IssuerRevRegRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) cred_def_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) error_msg: Optional[str] = Field( - None, description="Error message", example="Revocation registry undefined" + None, description="Error message", examples=["Revocation registry undefined"] ) issuer_did: Optional[str] = Field( None, description="Issuer DID", - example="WgWxqztrNooG92RXvxSTWv", - regex="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", + examples=["WgWxqztrNooG92RXvxSTWv"], + pattern="^(did:sov:)?[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}$", ) max_cred_num: Optional[int] = Field( None, description="Maximum number of credentials for revocation registry", - example=1000, + examples=[1000], ) pending_pub: Optional[List[str]] = Field( None, @@ -6315,23 +5804,29 @@ class Config: record_id: Optional[str] = Field( None, description="Issuer revocation registry record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) revoc_def_type: Optional[Literal["CL_ACCUM"]] = Field( None, description="Revocation registry type (specify CL_ACCUM)", - example="CL_ACCUM", + examples=["CL_ACCUM"], + ) + revoc_reg_def: Optional[IndyRevRegDef] = Field( + None, description="Revocation registry definition" + ) + revoc_reg_entry: Optional[IndyRevRegEntry] = Field( + None, description="Revocation registry entry" ) - revoc_reg_def: Optional[IssuerRevRegRecordRevocRegDef] = None - revoc_reg_entry: Optional[IssuerRevRegRecordRevocRegEntry] = None revoc_reg_id: Optional[str] = Field( None, description="Revocation registry identifier", - example="WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", + examples=[ + "WgWxqztrNooG92RXvxSTWv:4:WgWxqztrNooG92RXvxSTWv:3:CL:20:tag:CL_ACCUM:0" + ], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):4:([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)", ) state: Optional[str] = Field( - None, description="Issue revocation registry record state", example="active" + None, description="Issue revocation registry record state", examples=["active"] ) tag: Optional[str] = Field( None, description="Tag within issuer revocation registry identifier" @@ -6339,8 +5834,8 @@ class Config: tails_hash: Optional[str] = Field( None, description="Tails hash", - example="H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", + examples=["H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$", ) tails_local_path: Optional[str] = Field( None, description="Local path to tails file" @@ -6351,52 +5846,56 @@ class Config: updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) class OobRecord(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) attach_thread_id: Optional[str] = Field( None, description="Connection record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) connection_id: Optional[str] = Field( None, description="Connection record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) invi_msg_id: str = Field( ..., description="Invitation message identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + invitation: InvitationMessage = Field( + ..., description="Out of band invitation message" ) - invitation: InvitationRecordInvitation multi_use: Optional[bool] = Field( - None, description="Allow for multiple uses of the oobinvitation", example=True + None, + description="Allow for multiple uses of the oob invitation", + examples=[True], ) oob_id: str = Field( ..., description="Oob record identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) our_recipient_key: Optional[str] = Field( None, description="Recipient key used for oob invitation", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) role: Optional[Literal["sender", "receiver"]] = Field( - None, description="OOB Role", example="receiver" + None, description="OOB Role", examples=["receiver"] ) state: Literal[ "initial", @@ -6407,24 +5906,48 @@ class Config: "done", "deleted", ] = Field( - ..., description="Out of band message exchange state", example="await-response" + ..., + description="Out of band message exchange state", + examples=["await-response"], + ) + their_service: Optional[ServiceDecorator] = None + trace: Optional[bool] = Field( + None, description="Record trace information, based on agent configuration" + ) + updated_at: Optional[str] = Field( + None, + description="Time of last record update", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + + +class PresentationRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - their_service: Optional[ServiceDecorator] = None - trace: Optional[bool] = Field( - None, description="Record trace information, based on agent configuration" + id: Optional[str] = Field( + None, + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - updated_at: Optional[str] = Field( + type: Optional[str] = Field( None, - description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], + ) + comment: Optional[str] = Field(None, description="Human-readable comment") + request_presentations_attach: List[AttachDecorator] = Field( + ..., alias="request_presentations~attach" ) class RevRegResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) result: Optional[IssuerRevRegRecord] = None @@ -6433,85 +5956,95 @@ class RevRegResultSchemaAnoncreds(RevRegResult): class TxnOrRevRegResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) sent: Optional[RevRegResult] = None - txn: Optional[TxnOrRevRegResultTxn] = None + txn: Optional[TransactionRecord] = Field( + None, description="Revocation registry definition transaction to endorse" + ) class V10CredentialExchange(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) auto_issue: Optional[bool] = Field( None, description="Issuer choice to issue to request in this credential exchange", - example=False, + examples=[False], ) auto_offer: Optional[bool] = Field( None, description="Holder choice to accept offer in this credential exchange", - example=False, + examples=[False], ) auto_remove: Optional[bool] = Field( None, description="Issuer choice to remove this credential exchange record when complete", - example=False, + examples=[False], ) connection_id: Optional[str] = Field( None, description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) - credential: Optional[V10CredentialExchangeCredential] = None + credential: Optional[IndyCredInfo] = Field(None, description="Credential as stored") credential_definition_id: Optional[str] = Field( None, description="Credential definition identifier", - example="WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - regex="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", + examples=["WgWxqztrNooG92RXvxSTWv:3:CL:20:tag"], + pattern="^([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}):3:CL:(([1-9][0-9]*)|([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+)):(.+)?$", ) credential_exchange_id: Optional[str] = Field( None, description="Credential exchange identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) credential_id: Optional[str] = Field( None, description="Credential identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - credential_offer: Optional[V10CredentialExchangeCredentialOffer] = None - credential_offer_dict: Optional[V10CredentialExchangeCredentialOfferDict] = None - credential_proposal_dict: Optional[V10CredentialExchangeCredentialProposalDict] = ( - None + credential_offer: Optional[IndyCredAbstract] = Field( + None, description="(Indy) credential offer" + ) + credential_offer_dict: Optional[CredentialOffer] = Field( + None, description="Credential offer message" + ) + credential_proposal_dict: Optional[CredentialProposal] = Field( + None, description="Credential proposal message" + ) + credential_request: Optional[IndyCredRequest] = Field( + None, description="(Indy) credential request" ) - credential_request: Optional[V10CredentialExchangeCredentialRequest] = None credential_request_metadata: Optional[Dict[str, Any]] = Field( None, description="(Indy) credential request metadata" ) error_msg: Optional[str] = Field( None, description="Error message", - example="Credential definition identifier is not set in proposal", + examples=["Credential definition identifier is not set in proposal"], ) initiator: Optional[Literal["self", "external"]] = Field( None, description="Issue-credential exchange initiator: self or external", - example="self", + examples=["self"], ) parent_thread_id: Optional[str] = Field( None, description="Parent thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + raw_credential: Optional[IndyCredential] = Field( + None, description="Credential as received, prior to storage in holder wallet" ) - raw_credential: Optional[V10CredentialExchangeRawCredential] = None revoc_reg_id: Optional[str] = Field( None, description="Revocation registry identifier" ) @@ -6521,21 +6054,23 @@ class Config: role: Optional[Literal["holder", "issuer"]] = Field( None, description="Issue-credential exchange role: holder or issuer", - example="issuer", + examples=["issuer"], ) schema_id: Optional[str] = Field( None, description="Schema identifier", - example="WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - regex="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", + examples=["WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0"], + pattern="^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$", ) state: Optional[str] = Field( - None, description="Issue-credential exchange state", example="credential_acked" + None, + description="Issue-credential exchange state", + examples=["credential_acked"], ) thread_id: Optional[str] = Field( None, description="Thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -6543,316 +6078,493 @@ class Config: updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) class V10CredentialExchangeListResult(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict( + populate_by_name=True, + ) results: Optional[List[V10CredentialExchange]] = Field( None, description="Aries#0036 v1.0 credential exchange records" ) -class V20CredBoundOfferRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - counter_preview: Optional[V20CredBoundOfferRequestCounterPreview] = None - filter: Optional[V20CredBoundOfferRequestFilter] = None - - -class V20CredExFree(BaseModel): - class Config: - allow_population_by_field_name = True - +class V10PresentationExchange(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + auto_present: Optional[bool] = Field( + None, + description="Prover choice to auto-present proof as verifier requests", + examples=[False], + ) auto_remove: Optional[bool] = Field( None, - description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", + description="Verifier choice to remove this presentation exchange record when complete", + examples=[False], ) - comment: Optional[str] = Field(None, description="Human-readable comment") - connection_id: str = Field( - ..., + auto_verify: Optional[bool] = Field( + None, description="Verifier choice to auto-verify proof presentation" + ) + connection_id: Optional[str] = Field( + None, description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - credential_preview: Optional[V20CredPreview] = None - filter: V20CredBoundOfferRequestFilter - replacement_id: Optional[str] = Field( + created_at: Optional[str] = Field( None, - description="Optional identifier used to manage credential replacement", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="Time of record creation", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + error_msg: Optional[str] = Field( + None, description="Error message", examples=["Invalid structure"] + ) + initiator: Optional[Literal["self", "external"]] = Field( + None, + description="Present-proof exchange initiator: self or external", + examples=["self"], + ) + presentation: Optional[IndyProof] = Field( + None, description="(Indy) presentation (also known as proof)" + ) + presentation_exchange_id: Optional[str] = Field( + None, + description="Presentation exchange identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + presentation_proposal_dict: Optional[PresentationProposal] = Field( + None, description="Presentation proposal message" + ) + presentation_request: Optional[IndyProofRequest] = Field( + None, description="(Indy) presentation request (also known as proof request)" + ) + presentation_request_dict: Optional[PresentationRequest] = Field( + None, description="Presentation request message" + ) + role: Optional[Literal["prover", "verifier"]] = Field( + None, + description="Present-proof exchange role: prover or verifier", + examples=["prover"], + ) + state: Optional[str] = Field( + None, description="Present-proof exchange state", examples=["verified"] + ) + thread_id: Optional[str] = Field( + None, + description="Thread identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" ) - verification_method: Optional[str] = Field( - None, description="For ld-proofs. Verification method for signing." + updated_at: Optional[str] = Field( + None, + description="Time of last record update", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + verified: Optional[Literal["true", "false"]] = Field( + None, + description="Whether presentation is verified: true or false", + examples=["true"], ) + verified_msgs: Optional[List[str]] = None -class V20CredExRecord(BaseModel): - class Config: - allow_population_by_field_name = True +class V10PresentationExchangeList(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + results: Optional[List[V10PresentationExchange]] = Field( + None, description="Aries RFC 37 v1.0 presentation exchange records" + ) - auto_issue: Optional[bool] = Field( + +class V20CredIssue(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + id: Optional[str] = Field( None, - description="Issuer choice to issue to request in this credential exchange", - example=False, + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - auto_offer: Optional[bool] = Field( + type: Optional[str] = Field( None, - description="Holder choice to accept offer in this credential exchange", - example=False, + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) - auto_remove: Optional[bool] = Field( + comment: Optional[str] = Field(None, description="Human-readable comment") + credentials_attach: List[AttachDecorator] = Field( + ..., alias="credentials~attach", description="Credential attachments" + ) + formats: List[V20CredFormat] = Field( + ..., description="Acceptable attachment formats" + ) + replacement_id: Optional[str] = Field( None, - description="Issuer choice to remove this credential exchange record when complete", - example=False, + description="Issuer-unique identifier to coordinate credential replacement", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - by_format: Optional[V20CredExRecordByFormat] = None - connection_id: Optional[str] = Field( + + +class V20CredOffer(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + id: Optional[str] = Field( None, - description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - created_at: Optional[str] = Field( + type: Optional[str] = Field( None, - description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) - cred_ex_id: Optional[str] = Field( + comment: Optional[str] = Field(None, description="Human-readable comment") + credential_preview: Optional[V20CredPreview] = None + formats: List[V20CredFormat] = Field( + ..., description="Acceptable credential formats" + ) + offers_attach: List[AttachDecorator] = Field( + ..., alias="offers~attach", description="Offer attachments" + ) + replacement_id: Optional[str] = Field( None, - description="Credential exchange identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="Issuer-unique identifier to coordinate credential replacement", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - cred_issue: Optional[V20CredExRecordCredIssue] = None - cred_offer: Optional[V20CredExRecordCredOffer] = None - cred_preview: Optional[V20CredExRecordCredPreview] = None - cred_proposal: Optional[V20CredExRecordCredProposal] = None - cred_request: Optional[V20CredExRecordCredRequest] = None - error_msg: Optional[str] = Field( - None, description="Error message", example="The front fell off" + + +class V20CredProposal(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - initiator: Optional[Literal["self", "external"]] = Field( + id: Optional[str] = Field( None, - description="Issue-credential exchange initiator: self or external", - example="self", + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - parent_thread_id: Optional[str] = Field( + type: Optional[str] = Field( None, - description="Parent thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) - role: Optional[Literal["issuer", "holder"]] = Field( + comment: Optional[str] = Field(None, description="Human-readable comment") + credential_preview: Optional[V20CredPreview] = Field( + None, description="Credential preview" + ) + filters_attach: List[AttachDecorator] = Field( + ..., + alias="filters~attach", + description="Credential filter per acceptable format on corresponding identifier", + ) + formats: List[V20CredFormat] = Field(..., description="Attachment formats") + + +class V20CredRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + id: Optional[str] = Field( None, - description="Issue-credential exchange role: holder or issuer", - example="issuer", + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - state: Optional[ - Literal[ - "proposal-sent", - "proposal-received", - "offer-sent", - "offer-received", - "request-sent", - "request-received", - "credential-issued", - "credential-received", - "done", - "credential-revoked", - "abandoned", - "deleted", - ] - ] = Field(None, description="Issue-credential exchange state", example="done") - thread_id: Optional[str] = Field( + type: Optional[str] = Field( None, - description="Thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) - trace: Optional[bool] = Field( - None, description="Record trace information, based on agent configuration" + comment: Optional[str] = Field(None, description="Human-readable comment") + formats: List[V20CredFormat] = Field( + ..., description="Acceptable attachment formats" ) - updated_at: Optional[str] = Field( + requests_attach: List[AttachDecorator] = Field( + ..., alias="requests~attach", description="Request attachments" + ) + + +class V20Pres(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + id: Optional[str] = Field( None, - description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + type: Optional[str] = Field( + None, + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], + ) + comment: Optional[str] = Field(None, description="Human-readable comment") + formats: List[V20PresFormat] = Field( + ..., description="Acceptable attachment formats" + ) + presentations_attach: List[AttachDecorator] = Field( + ..., alias="presentations~attach" + ) + + +class V20PresProposal(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + id: Optional[str] = Field( + None, + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + type: Optional[str] = Field( + None, + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], + ) + comment: Optional[str] = Field(None, description="Human-readable comment") + formats: List[V20PresFormat] = Field( + ..., description="Acceptable attachment formats" + ) + proposals_attach: List[AttachDecorator] = Field( + ..., + alias="proposals~attach", + description="Attachment per acceptable format on corresponding identifier", ) -class V20CredOfferConnFreeRequest(BaseModel): - class Config: - allow_population_by_field_name = True +class V20PresProposalByFormat(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + dif: Optional[DIFProofProposal] = Field( + None, description="Presentation proposal for DIF" + ) + indy: Optional[IndyProofRequest] = Field( + None, description="Presentation proposal for indy" + ) + - auto_issue: Optional[bool] = Field( +class V20PresProposalRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + auto_present: Optional[bool] = Field( None, - description="Whether to respond automatically to credential requests, creating and issuing requested credentials", + description="Whether to respond automatically to presentation requests, building and presenting requested proof", ) auto_remove: Optional[bool] = Field( None, - description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", + description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", ) comment: Optional[str] = Field(None, description="Human-readable comment") - credential_preview: Optional[V20CredPreview] = None - filter: V20CredBoundOfferRequestFilter - replacement_id: Optional[str] = Field( - None, - description="Optional identifier used to manage credential replacement", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + connection_id: str = Field( + ..., + description="Connection identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) + presentation_proposal: V20PresProposalByFormat trace: Optional[bool] = Field( - None, description="Record trace information, based on agent configuration" + None, description="Whether to trace event (default false)", examples=[False] ) -class V20CredOfferRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - auto_issue: Optional[bool] = Field( +class V20PresRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + id: Optional[str] = Field( None, - description="Whether to respond automatically to credential requests, creating and issuing requested credentials", + alias="@id", + description="Message identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - auto_remove: Optional[bool] = Field( + type: Optional[str] = Field( None, - description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", + alias="@type", + description="Message type", + examples=["https://didcomm.org/my-family/1.0/my-message-type"], ) comment: Optional[str] = Field(None, description="Human-readable comment") - connection_id: str = Field( - ..., - description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + formats: List[V20PresFormat] = Field( + ..., description="Acceptable attachment formats" ) - credential_preview: Optional[V20CredPreview] = None - filter: V20CredBoundOfferRequestFilter - replacement_id: Optional[str] = Field( - None, - description="Optional identifier used to manage credential replacement", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + request_presentations_attach: List[AttachDecorator] = Field( + ..., + alias="request_presentations~attach", + description="Attachment per acceptable format on corresponding identifier", ) - trace: Optional[bool] = Field( - None, description="Record trace information, based on agent configuration" + will_confirm: Optional[bool] = Field( + None, description="Whether verifier will send confirmation ack" ) -class V20CredRequestFree(BaseModel): - class Config: - allow_population_by_field_name = True +class V20PresRequestByFormat(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + dif: Optional[DIFProofRequest] = Field( + None, description="Presentation request for DIF" + ) + indy: Optional[IndyProofRequest] = Field( + None, description="Presentation request for indy" + ) + +class V20PresSendRequestRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, - description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", + description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", ) - comment: Optional[str] = Field(None, description="Human-readable comment") + auto_verify: Optional[bool] = Field( + None, + description="Verifier choice to auto-verify proof presentation", + examples=[False], + ) + comment: Optional[str] = None connection_id: str = Field( ..., description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) - filter: V20CredRequestFreeFilter - holder_did: Optional[str] = Field( - None, - description="Holder DID to substitute for the credentialSubject.id", - example="did:key:ahsdkjahsdkjhaskjdhakjshdkajhsdkjahs", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) + presentation_request: V20PresRequestByFormat trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) -class V20IssueCredSchemaCore(BaseModel): - class Config: - allow_population_by_field_name = True - +class V20PresSpecByFormatRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, - description="Whether to remove the credential exchange record on completion (overrides --preserve-exchange-records configuration setting)", + description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", ) - comment: Optional[str] = Field(None, description="Human-readable comment") - credential_preview: Optional[V20CredPreview] = None - filter: V20CredBoundOfferRequestFilter - replacement_id: Optional[str] = Field( + dif: Optional[DIFPresSpec] = Field( None, - description="Optional identifier used to manage credential replacement", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="Optional Presentation specification for DIF, overrides the PresentationExchange record's PresRequest", + ) + indy: Optional[IndyPresSpec] = Field( + None, description="Presentation specification for indy" ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" ) -class V20PresExRecord(BaseModel): - class Config: - allow_population_by_field_name = True - - auto_present: Optional[bool] = Field( +class V20CredExRecord(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + auto_issue: Optional[bool] = Field( None, - description="Prover choice to auto-present proof as verifier requests", - example=False, + description="Issuer choice to issue to request in this credential exchange", + examples=[False], + ) + auto_offer: Optional[bool] = Field( + None, + description="Holder choice to accept offer in this credential exchange", + examples=[False], ) auto_remove: Optional[bool] = Field( None, - description="Verifier choice to remove this presentation exchange record when complete", - example=False, + description="Issuer choice to remove this credential exchange record when complete", + examples=[False], ) - auto_verify: Optional[bool] = Field( - None, description="Verifier choice to auto-verify proof presentation" + by_format: Optional[V20CredExRecordByFormat] = Field( + None, + description="Attachment content by format for proposal, offer, request, and issue", ) - by_format: Optional[V20PresExRecordByFormat] = None connection_id: Optional[str] = Field( None, description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + ) + cred_ex_id: Optional[str] = Field( + None, + description="Credential exchange identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + cred_issue: Optional[V20CredIssue] = Field( + None, description="Serialized credential issue message" + ) + cred_offer: Optional[V20CredOffer] = Field( + None, description="Credential offer message" + ) + cred_preview: Optional[V20CredPreview] = Field( + None, description="Credential preview from credential proposal" + ) + cred_proposal: Optional[V20CredProposal] = Field( + None, description="Credential proposal message" + ) + cred_request: Optional[V20CredRequest] = Field( + None, description="Serialized credential request message" ) error_msg: Optional[str] = Field( - None, description="Error message", example="Invalid structure" + None, description="Error message", examples=["The front fell off"] ) initiator: Optional[Literal["self", "external"]] = Field( None, - description="Present-proof exchange initiator: self or external", - example="self", + description="Issue-credential exchange initiator: self or external", + examples=["self"], ) - pres: Optional[V20PresExRecordPres] = None - pres_ex_id: Optional[str] = Field( + parent_thread_id: Optional[str] = Field( None, - description="Presentation exchange identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + description="Parent thread identifier", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) - pres_proposal: Optional[V20PresExRecordPresProposal] = None - pres_request: Optional[V20PresExRecordPresRequest] = None - role: Optional[Literal["prover", "verifier"]] = Field( + role: Optional[Literal["issuer", "holder"]] = Field( None, - description="Present-proof exchange role: prover or verifier", - example="prover", + description="Issue-credential exchange role: holder or issuer", + examples=["issuer"], ) state: Optional[ Literal[ "proposal-sent", "proposal-received", + "offer-sent", + "offer-received", "request-sent", "request-received", - "presentation-sent", - "presentation-received", + "credential-issued", + "credential-received", "done", + "credential-revoked", "abandoned", "deleted", ] - ] = Field(None, description="Present-proof exchange state") + ] = Field(None, description="Issue-credential exchange state", examples=["done"]) thread_id: Optional[str] = Field( None, description="Thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -6860,70 +6572,35 @@ class Config: updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", - ) - verified: Optional[Literal["true", "false"]] = Field( - None, - description="Whether presentation is verified: 'true' or 'false'", - example="true", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) - verified_msgs: Optional[List[str]] = None -class V20PresExRecordList(BaseModel): - class Config: - allow_population_by_field_name = True - - results: Optional[List[V20PresExRecord]] = Field( - None, description="Presentation exchange records" +class V20CredExRecordDetail(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) + cred_ex_record: Optional[V20CredExRecord] = Field( + None, description="Credential exchange record" + ) + indy: Optional[V20CredExRecordIndy] = None + ld_proof: Optional[V20CredExRecordLDProof] = None -class V20PresProposalByFormat(BaseModel): - class Config: - allow_population_by_field_name = True - - dif: Optional[V20PresProposalByFormatDif] = None - indy: Optional[V20PresProposalByFormatIndy] = None - - -class V20PresProposalRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - auto_present: Optional[bool] = Field( - None, - description="Whether to respond automatically to presentation requests, building and presenting requested proof", - ) - auto_remove: Optional[bool] = Field( - None, - description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", - ) - comment: Optional[str] = Field(None, description="Human-readable comment") - connection_id: str = Field( - ..., - description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", +class V20CredExRecordListResult(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - presentation_proposal: V20PresProposalByFormat - trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + results: Optional[List[V20CredExRecordDetail]] = Field( + None, description="Credential exchange records and corresponding detail records" ) -class V20PresRequestByFormat(BaseModel): - class Config: - allow_population_by_field_name = True - - dif: Optional[V20PresRequestByFormatDif] = None - indy: Optional[V20PresRequestByFormatIndy] = None - - -class V20PresSendRequestRequest(BaseModel): - class Config: - allow_population_by_field_name = True - +class V20PresCreateRequestRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) auto_remove: Optional[bool] = Field( None, description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", @@ -6931,114 +6608,89 @@ class Config: auto_verify: Optional[bool] = Field( None, description="Verifier choice to auto-verify proof presentation", - example=False, + examples=[False], ) comment: Optional[str] = None - connection_id: str = Field( - ..., - description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", - ) presentation_request: V20PresRequestByFormat trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + None, description="Whether to trace event (default false)", examples=[False] ) -class V20PresSpecByFormatRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - auto_remove: Optional[bool] = Field( - None, - description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", - ) - dif: Optional[V20PresSpecByFormatRequestDif] = None - indy: Optional[V20PresSpecByFormatRequestIndy] = None - trace: Optional[bool] = Field( - None, description="Record trace information, based on agent configuration" +class V20PresExRecord(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - - -class V10PresentationExchangePresentation(IndyProof): - """ - (Indy) presentation (also known as proof) - """ - - class Config: - allow_population_by_field_name = True - - -class V20CredExRecordDetailCredExRecord(V20CredExRecord): - """ - Credential exchange record - """ - - class Config: - allow_population_by_field_name = True - - -class V10PresentationExchange(BaseModel): - class Config: - allow_population_by_field_name = True - auto_present: Optional[bool] = Field( None, description="Prover choice to auto-present proof as verifier requests", - example=False, + examples=[False], ) auto_remove: Optional[bool] = Field( None, description="Verifier choice to remove this presentation exchange record when complete", - example=False, + examples=[False], ) auto_verify: Optional[bool] = Field( None, description="Verifier choice to auto-verify proof presentation" ) + by_format: Optional[V20PresExRecordByFormat] = Field( + None, + description="Attachment content by format for proposal, request, and presentation", + ) connection_id: Optional[str] = Field( None, description="Connection identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) created_at: Optional[str] = Field( None, description="Time of record creation", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) error_msg: Optional[str] = Field( - None, description="Error message", example="Invalid structure" + None, description="Error message", examples=["Invalid structure"] ) initiator: Optional[Literal["self", "external"]] = Field( None, description="Present-proof exchange initiator: self or external", - example="self", + examples=["self"], ) - presentation: Optional[V10PresentationExchangePresentation] = None - presentation_exchange_id: Optional[str] = Field( + pres: Optional[V20Pres] = Field(None, description="Presentation message") + pres_ex_id: Optional[str] = Field( None, description="Presentation exchange identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], + ) + pres_proposal: Optional[V20PresProposal] = Field( + None, description="Presentation proposal message" + ) + pres_request: Optional[V20PresRequest] = Field( + None, description="Presentation request message" ) - presentation_proposal_dict: Optional[ - V10PresentationExchangePresentationProposalDict - ] = None - presentation_request: Optional[V10PresentationExchangePresentationRequest] = None - presentation_request_dict: Optional[ - V10PresentationExchangePresentationRequestDict - ] = None role: Optional[Literal["prover", "verifier"]] = Field( None, description="Present-proof exchange role: prover or verifier", - example="prover", - ) - state: Optional[str] = Field( - None, description="Present-proof exchange state", example="verified" + examples=["prover"], ) + state: Optional[ + Literal[ + "proposal-sent", + "proposal-received", + "request-sent", + "request-received", + "presentation-sent", + "presentation-received", + "done", + "abandoned", + "deleted", + ] + ] = Field(None, description="Present-proof exchange state") thread_id: Optional[str] = Field( None, description="Thread identifier", - example="3fa85f64-5717-4562-b3fc-2c963f66afa6", + examples=["3fa85f64-5717-4562-b3fc-2c963f66afa6"], ) trace: Optional[bool] = Field( None, description="Record trace information, based on agent configuration" @@ -7046,62 +6698,24 @@ class Config: updated_at: Optional[str] = Field( None, description="Time of last record update", - example="2021-12-31T23:59:59Z", - regex="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", + examples=["2021-12-31T23:59:59Z"], + pattern="^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$", ) verified: Optional[Literal["true", "false"]] = Field( None, - description="Whether presentation is verified: true or false", - example="true", + description="Whether presentation is verified: 'true' or 'false'", + examples=["true"], ) verified_msgs: Optional[List[str]] = None -class V10PresentationExchangeList(BaseModel): - class Config: - allow_population_by_field_name = True - - results: Optional[List[V10PresentationExchange]] = Field( - None, description="Aries RFC 37 v1.0 presentation exchange records" - ) - - -class V20CredExRecordDetail(BaseModel): - class Config: - allow_population_by_field_name = True - - cred_ex_record: Optional[V20CredExRecordDetailCredExRecord] = None - indy: Optional[V20CredExRecordIndy] = None - ld_proof: Optional[V20CredExRecordLDProof] = None - - -class V20CredExRecordListResult(BaseModel): - class Config: - allow_population_by_field_name = True - - results: Optional[List[V20CredExRecordDetail]] = Field( - None, description="Credential exchange records and corresponding detail records" - ) - - -class V20PresCreateRequestRequest(BaseModel): - class Config: - allow_population_by_field_name = True - - auto_remove: Optional[bool] = Field( - None, - description="Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)", - ) - auto_verify: Optional[bool] = Field( - None, - description="Verifier choice to auto-verify proof presentation", - example=False, +class V20PresExRecordList(BaseModel): + model_config = ConfigDict( + populate_by_name=True, ) - comment: Optional[str] = None - presentation_request: V20PresRequestByFormat - trace: Optional[bool] = Field( - None, description="Whether to trace event (default false)", example=False + results: Optional[List[V20PresExRecord]] = Field( + None, description="Presentation exchange records" ) -SubmissionRequirements.update_forward_refs() +SubmissionRequirements.model_rebuild() diff --git a/examples/self_attested/example.py b/examples/self_attested/example.py index 7bdfb26..1cfa7e6 100644 --- a/examples/self_attested/example.py +++ b/examples/self_attested/example.py @@ -11,9 +11,7 @@ from acapy_controller import Controller from acapy_controller.logging import logging_to_stdout -from acapy_controller.models import ( - V10PresentationExchange, -) +from acapy_controller.models import V10PresentationExchange from acapy_controller.protocols import ( IndyCredPrecis, didexchange, @@ -114,7 +112,7 @@ async def main(): response=List[IndyCredPrecis], ) pres_spec = indy_auto_select_credentials_for_presentation_request( - bob_pres_ex.presentation_request, relevant_creds + bob_pres_ex.presentation_request.serialize(), relevant_creds ) pres_spec.self_attested_attributes = {self_uuid: "self-attested data goes here"} bob_pres_ex = await bob.post( @@ -148,8 +146,6 @@ async def main(): state="presentation_acked", ) - print(alice_pres_ex.json(by_alias=True, indent=2)) - if __name__ == "__main__": logging_to_stdout() diff --git a/poetry.lock b/poetry.lock index d8b024a..35ee451 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "aiohttp" @@ -110,6 +110,17 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = true +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + [[package]] name = "async-selective-queue" version = "0.1.1" @@ -275,18 +286,18 @@ test = ["pytest (>=6)"] [[package]] name = "filelock" -version = "3.14.0" +version = "3.15.4" description = "A platform independent file lock." optional = false python-versions = ">=3.8" files = [ - {file = "filelock-3.14.0-py3-none-any.whl", hash = "sha256:43339835842f110ca7ae60f1e1c160714c5a6afd15a2873419ab185334975c0f"}, - {file = "filelock-3.14.0.tar.gz", hash = "sha256:6ea72da3be9b8c82afd3edcf99f2fffbb5076335a5ae4d03248bb5b6c3eae78a"}, + {file = "filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"}, + {file = "filelock-3.15.4.tar.gz", hash = "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)", "virtualenv (>=20.26.2)"] typing = ["typing-extensions (>=4.8)"] [[package]] @@ -523,27 +534,24 @@ files = [ [[package]] name = "nodeenv" -version = "1.8.0" +version = "1.9.1" description = "Node.js virtual environment builder" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ - {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, - {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, + {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, + {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, ] -[package.dependencies] -setuptools = "*" - [[package]] name = "packaging" -version = "24.0" +version = "24.1" description = "Core utilities for Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, - {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] @@ -608,65 +616,136 @@ virtualenv = ">=20.10.0" [[package]] name = "pydantic" -version = "1.10.15" -description = "Data validation and settings management using python type hints" +version = "2.8.2" +description = "Data validation using Python type hints" optional = true -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic-1.10.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:22ed12ee588b1df028a2aa5d66f07bf8f8b4c8579c2e96d5a9c1f96b77f3bb55"}, - {file = "pydantic-1.10.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:75279d3cac98186b6ebc2597b06bcbc7244744f6b0b44a23e4ef01e5683cc0d2"}, - {file = "pydantic-1.10.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50f1666a9940d3d68683c9d96e39640f709d7a72ff8702987dab1761036206bb"}, - {file = "pydantic-1.10.15-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82790d4753ee5d00739d6cb5cf56bceb186d9d6ce134aca3ba7befb1eedbc2c8"}, - {file = "pydantic-1.10.15-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:d207d5b87f6cbefbdb1198154292faee8017d7495a54ae58db06762004500d00"}, - {file = "pydantic-1.10.15-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e49db944fad339b2ccb80128ffd3f8af076f9f287197a480bf1e4ca053a866f0"}, - {file = "pydantic-1.10.15-cp310-cp310-win_amd64.whl", hash = "sha256:d3b5c4cbd0c9cb61bbbb19ce335e1f8ab87a811f6d589ed52b0254cf585d709c"}, - {file = "pydantic-1.10.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c3d5731a120752248844676bf92f25a12f6e45425e63ce22e0849297a093b5b0"}, - {file = "pydantic-1.10.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c365ad9c394f9eeffcb30a82f4246c0006417f03a7c0f8315d6211f25f7cb654"}, - {file = "pydantic-1.10.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3287e1614393119c67bd4404f46e33ae3be3ed4cd10360b48d0a4459f420c6a3"}, - {file = "pydantic-1.10.15-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be51dd2c8596b25fe43c0a4a59c2bee4f18d88efb8031188f9e7ddc6b469cf44"}, - {file = "pydantic-1.10.15-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6a51a1dd4aa7b3f1317f65493a182d3cff708385327c1c82c81e4a9d6d65b2e4"}, - {file = "pydantic-1.10.15-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4e316e54b5775d1eb59187f9290aeb38acf620e10f7fd2f776d97bb788199e53"}, - {file = "pydantic-1.10.15-cp311-cp311-win_amd64.whl", hash = "sha256:0d142fa1b8f2f0ae11ddd5e3e317dcac060b951d605fda26ca9b234b92214986"}, - {file = "pydantic-1.10.15-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7ea210336b891f5ea334f8fc9f8f862b87acd5d4a0cbc9e3e208e7aa1775dabf"}, - {file = "pydantic-1.10.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3453685ccd7140715e05f2193d64030101eaad26076fad4e246c1cc97e1bb30d"}, - {file = "pydantic-1.10.15-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bea1f03b8d4e8e86702c918ccfd5d947ac268f0f0cc6ed71782e4b09353b26f"}, - {file = "pydantic-1.10.15-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:005655cabc29081de8243126e036f2065bd7ea5b9dff95fde6d2c642d39755de"}, - {file = "pydantic-1.10.15-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:af9850d98fc21e5bc24ea9e35dd80a29faf6462c608728a110c0a30b595e58b7"}, - {file = "pydantic-1.10.15-cp37-cp37m-win_amd64.whl", hash = "sha256:d31ee5b14a82c9afe2bd26aaa405293d4237d0591527d9129ce36e58f19f95c1"}, - {file = "pydantic-1.10.15-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5e09c19df304b8123938dc3c53d3d3be6ec74b9d7d0d80f4f4b5432ae16c2022"}, - {file = "pydantic-1.10.15-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7ac9237cd62947db00a0d16acf2f3e00d1ae9d3bd602b9c415f93e7a9fc10528"}, - {file = "pydantic-1.10.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:584f2d4c98ffec420e02305cf675857bae03c9d617fcfdc34946b1160213a948"}, - {file = "pydantic-1.10.15-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bbc6989fad0c030bd70a0b6f626f98a862224bc2b1e36bfc531ea2facc0a340c"}, - {file = "pydantic-1.10.15-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d573082c6ef99336f2cb5b667b781d2f776d4af311574fb53d908517ba523c22"}, - {file = "pydantic-1.10.15-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6bd7030c9abc80134087d8b6e7aa957e43d35714daa116aced57269a445b8f7b"}, - {file = "pydantic-1.10.15-cp38-cp38-win_amd64.whl", hash = "sha256:3350f527bb04138f8aff932dc828f154847fbdc7a1a44c240fbfff1b57f49a12"}, - {file = "pydantic-1.10.15-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:51d405b42f1b86703555797270e4970a9f9bd7953f3990142e69d1037f9d9e51"}, - {file = "pydantic-1.10.15-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a980a77c52723b0dc56640ced396b73a024d4b74f02bcb2d21dbbac1debbe9d0"}, - {file = "pydantic-1.10.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67f1a1fb467d3f49e1708a3f632b11c69fccb4e748a325d5a491ddc7b5d22383"}, - {file = "pydantic-1.10.15-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:676ed48f2c5bbad835f1a8ed8a6d44c1cd5a21121116d2ac40bd1cd3619746ed"}, - {file = "pydantic-1.10.15-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:92229f73400b80c13afcd050687f4d7e88de9234d74b27e6728aa689abcf58cc"}, - {file = "pydantic-1.10.15-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2746189100c646682eff0bce95efa7d2e203420d8e1c613dc0c6b4c1d9c1fde4"}, - {file = "pydantic-1.10.15-cp39-cp39-win_amd64.whl", hash = "sha256:394f08750bd8eaad714718812e7fab615f873b3cdd0b9d84e76e51ef3b50b6b7"}, - {file = "pydantic-1.10.15-py3-none-any.whl", hash = "sha256:28e552a060ba2740d0d2aabe35162652c1459a0b9069fe0db7f4ee0e18e74d58"}, - {file = "pydantic-1.10.15.tar.gz", hash = "sha256:ca832e124eda231a60a041da4f013e3ff24949d94a01154b137fc2f2a43c3ffb"}, + {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, + {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, ] [package.dependencies] -typing-extensions = ">=4.2.0" +annotated-types = ">=0.4.0" +pydantic-core = "2.20.1" +typing-extensions = [ + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, +] [package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] +email = ["email-validator (>=2.0.0)"] + +[[package]] +name = "pydantic-core" +version = "2.20.1" +description = "Core functionality for Pydantic validation and serialization" +optional = true +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"}, + {file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"}, + {file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"}, + {file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"}, + {file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, + {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, + {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, + {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, + {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"}, + {file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"}, + {file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"}, + {file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"}, + {file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"}, + {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pytest" -version = "8.2.1" +version = "8.2.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.1-py3-none-any.whl", hash = "sha256:faccc5d332b8c3719f40283d0d44aa5cf101cec36f88cde9ed8f2bc0538612b1"}, - {file = "pytest-8.2.1.tar.gz", hash = "sha256:5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd"}, + {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, + {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, ] [package.dependencies] @@ -760,45 +839,30 @@ files = [ [[package]] name = "ruff" -version = "0.4.7" +version = "0.4.10" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.4.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e089371c67892a73b6bb1525608e89a2aca1b77b5440acf7a71dda5dac958f9e"}, - {file = "ruff-0.4.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:10f973d521d910e5f9c72ab27e409e839089f955be8a4c8826601a6323a89753"}, - {file = "ruff-0.4.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59c3d110970001dfa494bcd95478e62286c751126dfb15c3c46e7915fc49694f"}, - {file = "ruff-0.4.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa9773c6c00f4958f73b317bc0fd125295110c3776089f6ef318f4b775f0abe4"}, - {file = "ruff-0.4.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07fc80bbb61e42b3b23b10fda6a2a0f5a067f810180a3760c5ef1b456c21b9db"}, - {file = "ruff-0.4.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:fa4dafe3fe66d90e2e2b63fa1591dd6e3f090ca2128daa0be33db894e6c18648"}, - {file = "ruff-0.4.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7c0083febdec17571455903b184a10026603a1de078428ba155e7ce9358c5f6"}, - {file = "ruff-0.4.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ad1b20e66a44057c326168437d680a2166c177c939346b19c0d6b08a62a37589"}, - {file = "ruff-0.4.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbf5d818553add7511c38b05532d94a407f499d1a76ebb0cad0374e32bc67202"}, - {file = "ruff-0.4.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:50e9651578b629baec3d1513b2534de0ac7ed7753e1382272b8d609997e27e83"}, - {file = "ruff-0.4.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8874a9df7766cb956b218a0a239e0a5d23d9e843e4da1e113ae1d27ee420877a"}, - {file = "ruff-0.4.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:b9de9a6e49f7d529decd09381c0860c3f82fa0b0ea00ea78409b785d2308a567"}, - {file = "ruff-0.4.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:13a1768b0691619822ae6d446132dbdfd568b700ecd3652b20d4e8bc1e498f78"}, - {file = "ruff-0.4.7-py3-none-win32.whl", hash = "sha256:769e5a51df61e07e887b81e6f039e7ed3573316ab7dd9f635c5afaa310e4030e"}, - {file = "ruff-0.4.7-py3-none-win_amd64.whl", hash = "sha256:9e3ab684ad403a9ed1226894c32c3ab9c2e0718440f6f50c7c5829932bc9e054"}, - {file = "ruff-0.4.7-py3-none-win_arm64.whl", hash = "sha256:10f2204b9a613988e3484194c2c9e96a22079206b22b787605c255f130db5ed7"}, - {file = "ruff-0.4.7.tar.gz", hash = "sha256:2331d2b051dc77a289a653fcc6a42cce357087c5975738157cd966590b18b5e1"}, -] - -[[package]] -name = "setuptools" -version = "70.0.0" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, - {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, + {file = "ruff-0.4.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c2c4d0859305ac5a16310eec40e4e9a9dec5dcdfbe92697acd99624e8638dac"}, + {file = "ruff-0.4.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a79489607d1495685cdd911a323a35871abfb7a95d4f98fc6f85e799227ac46e"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1dd1681dfa90a41b8376a61af05cc4dc5ff32c8f14f5fe20dba9ff5deb80cd6"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c75c53bb79d71310dc79fb69eb4902fba804a81f374bc86a9b117a8d077a1784"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18238c80ee3d9100d3535d8eb15a59c4a0753b45cc55f8bf38f38d6a597b9739"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d8f71885bce242da344989cae08e263de29752f094233f932d4f5cfb4ef36a81"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:330421543bd3222cdfec481e8ff3460e8702ed1e58b494cf9d9e4bf90db52b9d"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e9b6fb3a37b772628415b00c4fc892f97954275394ed611056a4b8a2631365e"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f54c481b39a762d48f64d97351048e842861c6662d63ec599f67d515cb417f6"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:67fe086b433b965c22de0b4259ddfe6fa541c95bf418499bedb9ad5fb8d1c631"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:acfaaab59543382085f9eb51f8e87bac26bf96b164839955f244d07125a982ef"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3cea07079962b2941244191569cf3a05541477286f5cafea638cd3aa94b56815"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:338a64ef0748f8c3a80d7f05785930f7965d71ca260904a9321d13be24b79695"}, + {file = "ruff-0.4.10-py3-none-win32.whl", hash = "sha256:ffe3cd2f89cb54561c62e5fa20e8f182c0a444934bf430515a4b422f1ab7b7ca"}, + {file = "ruff-0.4.10-py3-none-win_amd64.whl", hash = "sha256:67f67cef43c55ffc8cc59e8e0b97e9e60b4837c8f21e8ab5ffd5d66e196e25f7"}, + {file = "ruff-0.4.10-py3-none-win_arm64.whl", hash = "sha256:dd1fcee327c20addac7916ca4e2653fbbf2e8388d8a6477ce5b4e986b68ae6c0"}, + {file = "ruff-0.4.10.tar.gz", hash = "sha256:3aa4f2bc388a30d346c56524f7cacca85945ba124945fe489952aadb6b5cd804"}, ] -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] - [[package]] name = "six" version = "1.16.0" @@ -823,24 +887,24 @@ files = [ [[package]] name = "typing-extensions" -version = "4.12.0" +version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.12.0-py3-none-any.whl", hash = "sha256:b349c66bea9016ac22978d800cfff206d5f9816951f12a7d0ec5578b0a819594"}, - {file = "typing_extensions-4.12.0.tar.gz", hash = "sha256:8cbcdc8606ebcb0d95453ad7dc5065e6237b6aa230a31e81d0f440c30fed5fd8"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] name = "virtualenv" -version = "20.26.2" +version = "20.26.3" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.26.2-py3-none-any.whl", hash = "sha256:a624db5e94f01ad993d476b9ee5346fdf7b9de43ccaee0e0197012dc838a0e9b"}, - {file = "virtualenv-20.26.2.tar.gz", hash = "sha256:82bf0f4eebbb78d36ddaee0283d43fe5736b53880b8a8cdcd37390a07ac3741c"}, + {file = "virtualenv-20.26.3-py3-none-any.whl", hash = "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589"}, + {file = "virtualenv-20.26.3.tar.gz", hash = "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a"}, ] [package.dependencies] @@ -961,4 +1025,4 @@ models = ["pydantic"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "2b014a90f49f27d10d523d181ef974ec8b8863222d323f5480021d11302bd833" +content-hash = "7ec3be6734dc73b35b56647bb8160fa1d80047f42865f22d4aa81fd151a4a9cf" diff --git a/pyproject.toml b/pyproject.toml index 07ead41..5e12fc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ homepage = "https://github.com/indicio-tech/acapy-minimal-example" python = "^3.10" async-selective-queue = "^0.1.1" aiohttp = "^3.9.5" -pydantic = {version = "^1.10.2", optional = true} +pydantic = {version = "^2.8.2", optional = true} blessings = "^1.7" [tool.poetry.extras]