-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow documentation #164
base: develop
Are you sure you want to change the base?
Flow documentation #164
Conversation
invitation-flow.drawio
Outdated
<mxPoint x="570" y="210" as="targetPoint" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="NDPqdjoCEg37fMv0_q80-18" value="<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;"><b>Invitation:Type</b></p><hr size="1" style="border-style:solid;"><p style="margin:0px;margin-left:8px;">Tokrn :&nbsp;<b>string</b>&nbsp;<br>email :&nbsp;<b style="background-color: initial;">string</b><span style="background-color: initial;">&nbsp;</span></p><p style="margin:0px;margin-left:8px;"><span style="background-color: initial;">accepted :&nbsp;</span><b style="background-color: initial;">bool</b><span style="background-color: initial;">&nbsp;</span><br></p><p style="margin: 0px 0px 0px 8px;">createdAt :&nbsp;<b style="background-color: initial;">datetime</b><span style="background-color: initial;">&nbsp;</span></p><p style="margin: 0px 0px 0px 8px;">expiresAt :&nbsp;<b style="background-color: initial;">?datetime</b><span style="background-color: initial;">&nbsp;</span></p><p style="margin: 0px 0px 0px 8px;">acceptedAt :&nbsp;<b style="background-color: initial;">?datetime</b><span style="background-color: initial;">&nbsp;</span></p><div><br></div>" style="verticalAlign=top;align=left;overflow=fill;html=1;whiteSpace=wrap;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Tokrn" -> "Token"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The email
should be optional in the database table, because we want our schema to support situations where invites are generated and then sent for instance via Matrix instead of via email
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throught the I-D we use the term 'Invite' so maybe call the db table 'Invites'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Reciever' -> 'Receiver'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'submiting' -> 'submitting'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For AcceptInvitationRequestDto, please use the field names as they actually appear in the API call (section 3.5.2. Invite Acceptance Request Details), so:
- recipientProvider
- token
- userID
- name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Samce for Invite Acceptance Response, and maybe rename them to:
- InviteAcceptanceRequestDto
- InviteAcceptanceResponseDto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Could you also move the files in a Diagrams
folder? Afterwards we shall also move the other example committed by Michiel in there.
@@ -14,6 +14,11 @@ Previous versions: | |||
|
|||
[SemVer](https://semver.org) versioning applies to OCM, and all versions are supported unless stated otherwise by an implementation. | |||
|
|||
## Invitation flow at a glance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to not include this in the README, there are quite a few flows and the Invite is not even the core one, therefore it does not make much sense to show it here.
I have a suggestion, would you be able to use mermaid instead of draw io? I have created something very similar to yours, it is human-readable text and auto renders as markdown: sequenceDiagram
participant Inviter
participant InviteSenderServer as Invite Sender Server
participant InviteReceiverServer as Invite Receiver Server
participant Invitee
Inviter->>InviteSenderServer: Calls Invite API
InviteSenderServer->>InviteSenderServer: Creates an invite record in the database
Note right of InviteSenderServer: Dispatch notification (Email) to invitee\n- Token\n- invite sender server FQDN
InviteSenderServer->>Invitee: Send Email with Token and Server FQDN
Invitee->>InviteReceiverServer: Submit invite acceptance form\n(Token, invite sender server FQDN)
InviteReceiverServer->>InviteSenderServer: Discover the OCM API of the inviter server
InviteReceiverServer->>InviteReceiverServer: Adds FQDN of invite sender server as trusted server
InviteReceiverServer->>InviteSenderServer: Accept invite API Call\n(InviteAcceptanceRequestDto)
Note left of InviteReceiverServer: InviteAcceptanceRequestDto\n+ recipientProvider: string\n+ token: string\n+ userID: string\n+ email: string\n+ name: string
InviteSenderServer->>InviteSenderServer: Add invite receiver FQDN as trusted server
InviteSenderServer->>InviteSenderServer: Mark the invitation record as accepted
InviteSenderServer->>InviteSenderServer: Add invite receiver in the contacts table
InviteSenderServer->>InviteReceiverServer: Return InviteAcceptanceResponseDto
Note right of InviteReceiverServer: InviteAcceptanceResponseDto\n+ UserId: string\n+ Email: string\n+ Name: string
InviteReceiverServer->>Invitee: Adds Invite sender as contact
|
I actually support @MahdiBaghbani comment, the mermaid-based diagrams are also more git friendly! |
No description provided.