Alison Clarke
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # RO invitations design Document describing API designs for https://github.com/wellcometrust/corporate/issues/10167 ## Notes This is based on the Invitations API. We considered a couple of different approaches to combining the Research Office invitations with invitations to join an application: 1. Using `/ro-invitation` in URLs and **ROInvitation...** in schema names to differentiate them from inviting users to an application. (See [Previous design](#Previous-design)). We decided we preferred not to have completely separate endpoints for the two sets of invitations. 2. Combining both invitations endpoints as a single `/invitation` endpoint and checking the data format to determine whether an invitation was for a Research Office or an Application. (See [Alternative design](#Alternative-design).) This would allowed easy resuse of code but would have resulted in some slightly messy schemas as they combined information from both invitations, so may have been prone to errors. 3. Using `/api/2/invitation/[application|research-office]` as the endpoints. (See [Suggested Middleware API Design](#Suggested-Middleware-API-design).) This will mean changing the existing application invitation endpoints, but will allow us to reuse code where appropriate but separate code where necessary. See also these [meeting notes](https://www.notion.so/wellcometrust/RO-permissions-ebbb54dea1bb4802bb937601a1b27717) for discussion of the accept RO invitation process on login. ## Suggested Middleware API Design Existing endpoints for invitations will be modified to include `application`, e.g. `GET POST api/2/invitation` will be moved to `GET POST api/2/invitation/application` Some schemas will also be renamed, e.g. `InvitationPostSchema` will become `ApplicationInvitationPostSchema`. Schemas that are common across both types of endpoints will remain the same. New endpoints are described below. ### `POST api/2/invitation/research-office` Create a new Research Office invitation and send invitation email if successful This expects a JSON body conforming to [ResearchOfficeInvitationPostSchema](#ResearchOfficeInvitationPostSchema). This returns a 201 on success, with the invitation code as the `data` value. If the organisation id is invalid or the user does not have access to it, an INVALID_ORGANISATION_ID error is returned. If the user belongs to a different Research Office, an INVALID_USER error is returned. If the Salesforce call to create a Research Office invitation succeeds but the email sending fails straight away, a `SEND_EMAIL_ERROR` error will be returned. -------------------- ### `GET api/2/invitation/research-office/<str:invitation_code>` Returns the details of a Research Office invitation. If the invitation code is not valid, a NOT_FOUND error will be returned. Example response: ```json { "data": { "invitationCode": "wxyz5678", "invitedBy": { "email": "e.piaf@xyzw.ac.uk", "firstName": "Edith", "lastName": "Piaf", "middleName": "", "title": "Ms" }, "organisation": { "name": "Oxbridge University", "organisationId": "organisation-1" }, "role": "ADMIN" }, "metadata": {}, "success": true } ``` -------------------- ### ~~`POST api/2/invitation/research-office/<str:invitation_code>:accept`~~ > [name=Alison Clarke] Accept not needed as per [meeting notes](https://www.notion.so/wellcometrust/RO-permissions-ebbb54dea1bb4802bb937601a1b27717) and [slack conversation](https://wellcome.slack.com/archives/C02KEDRDZUG/p1666607508431559?thread_ts=1666604241.489129&cid=C02KEDRDZUG): invitation code will be passed to the register user endpoint in SF, so once registered they will automatically be added to the RO. ~~Accepts a Research Office invitation.~~ ~~This returns a 200 on success.~~ ~~If the invitation code is not valid, a NOT_FOUND error will be returned.~~ ~~A USER_NOT_ALLOWED error will be returned if the current user is already a member of the organisation, or the invitation was for a different user.~~ ~~This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling is done by another RO member.~~ ~~Returns success or failure response.~~ -------------------- ### `POST api/2/invitation/research-office/<str:invitation_code>:cancel` Cancels a Research Office invitation. This returns a 200 on success. If the invitation code is not valid, a NOT_FOUND error will be returned. A USER_NOT_ALLOWED error will be returned if the current user is not an Authorised Approver. This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling is done by another RO member. Returns success or failure response. -------------------- ### ~~`POST api/2/invitation/research-office/<str:invitation_code>:decline`~~ > [name=Alison Clarke] Decline not needed as per [meeting notes](https://www.notion.so/wellcometrust/RO-permissions-ebbb54dea1bb4802bb937601a1b27717) ~~Declines a Research Office invitation.~~ ~~This returns a 200 on success.~~ ~~If the invitation code is not valid, a NOT_FOUND error will be returned.~~ ~~A USER_NOT_ALLOWED error will be returned if the invitation was for a different user.~~ ~~This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling is done by another RO member.~~ ~~Returns success or failure response.~~ -------------------- ### `POST api/2/invitation/research-office/<str:invitation_code>:resend` Resends a Research Office invitation email. This returns a 200 on success. If the invitation code is not valid, a NOT_FOUND error will be returned. A USER_NOT_ALLOWED error will be returned if the invitation was created by a different user. This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling/resending is done by the lead applicant. Returns success or failure response. ## Schemas Schemas are described using <a href="https://json-schema.org/">JSON Schema</a>. ### ResearchOfficeInvitationGetSchema ```json { "definitions": { "ResearchOfficeInvitationOrganisationSchema": { "description": "Schema used to define the (limited) organisation data returned with an invitation", "properties": { "organisationId": { "title": "Organisationid", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "organisationId", "name" ], "title": "ResearchOfficeInvitationOrganisationSchema", "type": "object" }, "InvitationGetUserSchema": { "description": "Schema used to define the user who created an invitation", "properties": { "email": { "format": "email", "title": "Email", "type": "string" }, "firstName": { "title": "Firstname", "type": "string" }, "lastName": { "title": "Lastname", "type": "string" }, "middleName": { "title": "Middlename", "type": "string" }, "title": { "title": "Title", "type": "string" } }, "required": [ "title", "firstName", "middleName", "lastName", "email" ], "title": "InvitationGetUserSchema", "type": "object" } }, "description": "Schema definining the response from a request to get an invitation", "properties": { "organisation": { "$ref": "#/definitions/ResearchOfficeInvitationOrganisationSchema" }, "invitationCode": { "title": "Invitationcode", "type": "string" }, "invitedBy": { "$ref": "#/definitions/InvitationGetUserSchema" }, "permissionSet": { "type": "array", "items": { "type": "string" } } }, "required": [ "invitationCode", "permissionSet", "organisation", "invitedBy" ], "title": "ResearchOfficeInvitationGetSchema", "type": "object" } ``` ### ResearchOfficeInvitationPostSchema > [name=Alison Clarke] Role will always be "admin" for now but we'll keep it in the middleware schema. ```json { "description": "Schema definining the expected structure of a POST request to get a Research Office invitation", "properties": { "organisationId": { "title": "organisationId", "type": "string" }, "customMessage": { "title": "Custommessage", "type": "string" }, "email": { "format": "email", "title": "Email", "type": "string" }, "role": { "type": "string" }, }, "required": [ "organisationId", "email", "role" ], "title": "ResearchOfficeInvitationPostSchema", "type": "object" } ``` ## Answered Questions * How is the email for an organisation's first user sent out? (Directly from Salesforce, or does it need to come from the funding platform app via some sort of trigger?) **(This is not in scope at the moment)** * Is there a page displayed to an invited user before the accept (as with a co-applicant invitation)? - **No, the link goes straight through to accept** * Who can accept/decline/cancel/resend an invitation? * Accept/decline: **only invitee** * Cancel/resend: **any RO authorised approver** * How will the roles be implemented in Salesforce? Front end has: * Roles: Authorised approver, Team member * Additional permission: Allow to submit financial reports (Y/N) Need to find out how this will be implemented in Salesforce: could be 4 different roles or 2 sets of permissions. Simon suggests tole plus flag for additional permission. Alice is concerned about whether that is a future-proof way of storing permissions. * Can an RO user be a member of more than one organisation? This affects whether there is the need for a workflow where an RO user signs in to an existing account to accept the invitation. **No, a user can only be a member of one organisation. The API should reject a user who already belongs to a different RO when an admin attempts to invite them.** * Will SF mandate the RO permissions e.g. ensuring only an admin user can create and cancel invitations? **Presumably no longer needed if we're only having admin users for MVP** * * Will SF create an equivalent of GET invitation, to enable us to get the organisation ID before calling PATCH invitation, and to get information needed to resend an invitation email? **Have updated the JIRA ticket to request this** * Where will the validation be done to ensure invitations are restricted to the user for whom they were created? (We can't validate it in the MW unless we have an equivalent of GET invitation, or the `GET roinvite` call validates the invite against the current user.) **We probably don't need to do this unless we implement accept/decline, but if we do then we can use the GET invitation equivalent now to validate** * Will Salesforce ensure only RO users (admins) are able to use the `roinvite` endpoints? **Yes (but we're still thinking about MW user type validation)** * If we're only having admins for now, should we specify that role in the H8 call to create an invitation? Or should we just not include any roles for now? **Specify in the call to H8** # Discarded design suggestions ## Previous design ### `POST api/2/ro-invitation` Create a new Research Office invitation and send invitation email if successful This expects a JSON body conforming to [ROInvitationPostSchema](#ROInvitationPostSchema). This returns a 201 on success, with the invitation code as the `data` value. If the organisation id is invalid or the user does not have access to it, an INVALID_ORGANISATION_ID error is returned. If the Salesforce call to create a Research Office invitation succeeds but the email sending fails straight away, a `SEND_EMAIL_ERROR` error will be returned. -------------------- ### `GET api/2/ro-invitation/<str:invitation_code>` **FIXME: need to know what info we need to display on accept invitation page - is this needed at all?** Gets information about a Research Office invitation. This returns JSON conforming to [ROInvitationGetSchema](#ROInvitationGetSchema). If the invitation code is not valid, a NOT_FOUND error will be returned. Example response: ``` { "success": True, "data": { "invitationCode": "wxyz5678", "permissionSet": ["AUTHORISED_APPROVER", "FINANCE"] "organisation": { "organisationId": "organisation-1", "name": "University of Someplace" }, "invitedBy": { "title": "Ms", "firstName": "Edith", "middleName": "", "lastName": "Piaf", "email": "e.piaf@xyzw.ac.uk", }, }, "metadata": {}, } ``` -------------------- ### `POST api/2/ro-invitation/<str:invitation_code>:accept` Accepts a Research Office invitation. This returns a 200 on success. If the invitation code is not valid, a NOT_FOUND error will be returned. A USER_NOT_ALLOWED error will be returned if the current user is already a member of the organisation, or the invitation was for a different user. This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling is done by another RO member. Returns success or failure response. -------------------- ### `POST api/2/ro-invitation/<str:invitation_code>:cancel` Cancels a Research Office invitation. This returns a 200 on success. If the invitation code is not valid, a NOT_FOUND error will be returned. A USER_NOT_ALLOWED error will be returned if the current user is not an Authorised Approver. This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling is done by another RO member. Returns success or failure response. -------------------- ### `POST api/2/ro-invitation/<str:invitation_code>:decline` Declines a Research Office invitation. This returns a 200 on success. If the invitation code is not valid, a NOT_FOUND error will be returned. A USER_NOT_ALLOWED error will be returned if the invitation was for a different user. This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling is done by another RO member. Returns success or failure response. -------------------- ### `POST api/2/ro-invitation/<str:invitation_code>:resend` Resends a Research Office invitation email. This returns a 200 on success. If the invitation code is not valid, a NOT_FOUND error will be returned. A USER_NOT_ALLOWED error will be returned if the invitation was created by a different user. This is a [custom method](https://cloud.google.com/apis/design/custom_methods) rather than a simple PATCH because accepting/declining a Research Office invitation is done by the invitee whereas cancelling/resending is done by the lead applicant. Returns success or failure response. ## Schemas Schemas are described using <a href="https://json-schema.org/">JSON Schema</a>. ### ROInvitationGetSchema ```json { "definitions": { "ROInvitationOrganisationSchema": { "description": "Schema used to define the (limited) organisation data returned with an invitation", "properties": { "organisationId": { "title": "Organisationid", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "organisationId", "name" ], "title": "ROInvitationOrganisationSchema", "type": "object" }, "ROInvitationGetUserSchema": { "description": "Schema used to define the user who created an RO invitation", "properties": { "email": { "format": "email", "title": "Email", "type": "string" }, "firstName": { "title": "Firstname", "type": "string" }, "lastName": { "title": "Lastname", "type": "string" }, "middleName": { "title": "Middlename", "type": "string" }, "title": { "title": "Title", "type": "string" } }, "required": [ "title", "firstName", "middleName", "lastName", "email" ], "title": "ROInvitationGetUserSchema", "type": "object" } }, "description": "Schema definining the response from a request to get an invitation", "properties": { "organisation": { "$ref": "#/definitions/ROInvitationOrganisationSchema" }, "invitationCode": { "title": "Invitationcode", "type": "string" }, "invitedBy": { "$ref": "#/definitions/ROInvitationGetUserSchema" }, "permissionSet": { "type": "array", "items": { "type": "string" } } }, "required": [ "invitationCode", "role", "organisation", "invitedBy" ], "title": "ROInvitationGetSchema", "type": "object" } ``` ### ROInvitationPostSchema ```json { "description": "Schema definining the expected structure of a POST request to get a Research Office invitation", "properties": { "organisationId": { "title": "organisationId", "type": "string" }, "customMessage": { "title": "Custommessage", "type": "string" }, "email": { "format": "email", "title": "Email", "type": "string" }, "role": { "title": "Role", "type": "string" }, "additional_permissions": { "title": "Additionalpermissions", "type": "array", "items": { "type": "string" } } }, "required": [ "organisationId", "email", "role" ], "title": "ROInvitationPostSchema", "type": "object" } ``` ## Alternative Middleware API design - combining both sets of invitations ### `POST api/2/invitation` Create a new Research Office invitation and send invitation email if successful This expects a JSON body conforming to [InvitationPostSchema](InvitationPostSchema) which would be modified to allow both the application and research office invitation types (some fields are common, others would be different). NB: This is possible in JSON schema using `oneOf`, and in pydantic using `Union`. The resulting JSON schema would look [a bit complex](#Example-combined-PostInvitationSchema) but would work. We could determine the object type after validation to determine which H8 API endpoint to call. e.g., assuming `ApplicationInvitationPostSchema` and `InvitationPostSchema` are defined: ```python class InvitationPostSchema(BaseModel): __root__: Union[ApplicationInvitationPostSchema, ROInvitationPostSchema] = Field( ..., description='Schema validating invitation for application or RO' ) ``` [Full code sample](#Example-combined-PostInvitationSchema) This returns a 201 on success, with the invitation code as the `data` value. If the organisation id is invalid or the user does not have access to it, an INVALID_ORGANISATION_ID error is returned. If the Salesforce call to create a Research Office invitation succeeds but the email sending fails straight away, a `SEND_EMAIL_ERROR` error will be returned. -------------------- ### `GET api/2/invitation/(?P<type>application|ro)/<str:invitation_code>` The URL will specify whether this is an application or a research office invitation. As per the POST schema, we could use a `Union` at the root level of the schema to return the relevant properties for a research office vs an application invitation. -------------------- ### `POST api/2/invitation/(?P<type>application|ro)/<str:invitation_code>:accept` Accepts an invitation. -------------------- ### `POST api/2/invitation/(?P<type>application|ro)/<str:invitation_code>:cancel` Cancels an invitation. -------------------- ### `POST api/2/invitation/(?P<type>application|ro)/<str:invitation_code>:decline` Declines an invitation. -------------------- ### `POST api/2/invitation/(?P<type>application|ro)/<str:invitation_code>:resend` Resends an invitation email. ### Example combined PostInvitationSchema Pydantic schema: ```python class InvitationPostBaseSchema(BaseModel): email: EmailStr customMessage: Optional[str] class ApplicationInvitationPostSchema(InvitationPostBaseSchema): """Schema definining the expected structure of a POST request to get an invitation for an application""" applicationId: str role: str class ROInvitationPostSchema(InvitationPostBaseSchema): """Schema definining the expected structure of a POST request to get an invitation for a research office""" organisationId: str permissions: List[str] class InvitationPostSchema(BaseModel): __root__: Union[ApplicationInvitationPostSchema, ROInvitationPostSchema] = Field( ..., description='schema validating invitation for application or RO' ) ``` Generated JSON schema: ```json { "anyOf": [ { "$ref": "#/definitions/ApplicationInvitationPostSchema" }, { "$ref": "#/definitions/ROInvitationPostSchema" } ], "definitions": { "ApplicationInvitationPostSchema": { "description": "Schema definining the expected structure of a POST request to get an invitation for an application", "properties": { "applicationId": { "title": "Applicationid", "type": "string" }, "customMessage": { "title": "Custommessage", "type": "string" }, "email": { "format": "email", "title": "Email", "type": "string" }, "role": { "title": "Role", "type": "string" } }, "required": [ "email", "applicationId", "role" ], "title": "ApplicationInvitationPostSchema", "type": "object" }, "ROInvitationPostSchema": { "description": "Schema definining the expected structure of a POST request to get an invitation for a research office", "properties": { "customMessage": { "title": "Custommessage", "type": "string" }, "email": { "format": "email", "title": "Email", "type": "string" }, "organisationId": { "title": "Organisationid", "type": "string" }, "permissions": { "items": { "type": "string" }, "title": "Permissions", "type": "array" } }, "required": [ "email", "organisationId", "permissions" ], "title": "ROInvitationPostSchema", "type": "object" } }, "description": "Schema definining the expected structure of a POST request to get an invitation", "title": "InvitationPostSchema" } ``` (Note that pydantic maps `Union` to `anyOf` rather than `oneOf` - see https://github.com/samuelcolvin/pydantic/issues/656 for discussion.)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully