Skip to content

Commit e65ce75

Browse files
committed
✨ 0.9.0: new fields: goal and goal_code
`goal`: 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 [Optional]. `goal_code`: 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 [Optional].
1 parent 22b90ea commit e65ce75

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

aries_cloudcontroller/api/did_exchange.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ async def create_request(
5555
*,
5656
their_public_did: str,
5757
alias: Optional[str] = None,
58+
goal: Optional[str] = None,
59+
goal_code: Optional[str] = None,
5860
mediation_id: Optional[str] = None,
5961
my_endpoint: Optional[str] = None,
6062
my_label: Optional[str] = None,
@@ -64,6 +66,8 @@ async def create_request(
6466
return await self.__create_request(
6567
their_public_did=their_public_did,
6668
alias=alias,
69+
goal=goal,
70+
goal_code=goal_code,
6771
mediation_id=mediation_id,
6872
my_endpoint=my_endpoint,
6973
my_label=my_label,
@@ -111,6 +115,8 @@ def __create_request(
111115
*,
112116
their_public_did: Query,
113117
alias: Query = None,
118+
goal: Query = None,
119+
goal_code: Query = None,
114120
mediation_id: Query = None,
115121
my_endpoint: Query = None,
116122
my_label: Query = None,

aries_cloudcontroller/model/didx_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ class DIDXRequest(BaseModel):
2222
type: Message type [Optional].
2323
did: DID of exchange [Optional].
2424
did_docattach: As signed attachment, DID Doc associated with DID [Optional].
25+
goal: 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 [Optional].
26+
goal_code: 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 [Optional].
2527
"""
2628

2729
label: str
2830
id: Optional[str] = Field(None, alias="@id")
2931
type: Optional[str] = Field(None, alias="@type")
3032
did: Optional[str] = None
3133
did_docattach: Optional[AttachDecorator] = Field(None, alias="did_doc~attach")
34+
goal: Optional[str] = None
35+
goal_code: Optional[str] = None
3236

3337
@validator("did")
3438
def did_pattern(cls, value):

aries_cloudcontroller/model/invitation_create_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class InvitationCreateRequest(BaseModel):
2020
accept: List of mime type in order of preference that should be use in responding to the message [Optional].
2121
alias: Alias for connection [Optional].
2222
attachments: Optional invitation attachments [Optional].
23+
goal: 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 [Optional].
24+
goal_code: 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 [Optional].
2325
handshake_protocols: The handshake_protocols of this InvitationCreateRequest [Optional].
2426
mediation_id: Identifier for active mediation record to be used [Optional].
2527
metadata: Optional metadata to attach to the connection created with the invitation [Optional].
@@ -31,6 +33,8 @@ class InvitationCreateRequest(BaseModel):
3133
accept: Optional[List[str]] = None
3234
alias: Optional[str] = None
3335
attachments: Optional[List[AttachmentDef]] = None
36+
goal: Optional[str] = None
37+
goal_code: Optional[str] = None
3438
handshake_protocols: Optional[List[str]] = None
3539
mediation_id: Optional[str] = None
3640
metadata: Optional[Dict[str, Any]] = None

aries_cloudcontroller/model/invitation_message.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class InvitationMessage(BaseModel):
2020
id: Message identifier [Optional].
2121
type: Message type [Optional].
2222
accept: List of mime type in order of preference [Optional].
23+
goal: 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 [Optional].
24+
goal_code: 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 [Optional].
2325
handshake_protocols: The handshake_protocols of this InvitationMessage [Optional].
2426
image_url: Optional image URL for out-of-band invitation [Optional].
2527
label: Optional label [Optional].
@@ -30,6 +32,8 @@ class InvitationMessage(BaseModel):
3032
id: Optional[str] = Field(None, alias="@id")
3133
type: Optional[str] = Field(None, alias="@type")
3234
accept: Optional[List[str]] = None
35+
goal: Optional[str] = None
36+
goal_code: Optional[str] = None
3337
handshake_protocols: Optional[List[str]] = None
3438
image_url: Optional[str] = Field(None, alias="imageUrl")
3539
label: Optional[str] = None

0 commit comments

Comments
 (0)