Skip to content

Commit

Permalink
Update functions docs (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljohanneskraft authored Sep 22, 2024
1 parent 9a94270 commit cd56c71
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,26 +616,6 @@ Watch links for YouTube: `https://youtube.com/watch?v=${youtubeId}`.

# Functions

## checkInvitationCode

Use `checkInvitationCode` to check if an invitation code is still available and connect the currently (anonymously) authenticated userId with the invitation.

- Note: Currently, due to an issue with Firebase Authentication, the user is already enrolled after calling this function with a full user account and an invitation code may be used infinitely often. This should not be the case in the production system.

### Security

Any authenticated user may use this function, but it should only occur before that user has linked credentials or the user object has been created.

### Input

|Property|Type|Values|Comments|
|-|-|-|-|
|invitationCode|string|-|The invitation code provided to the user by the organization. It needs to be between 6-12 characters long and only use uppercase latin characters and arabic digits.|

### Output

None.

## createInvitation

Use `createInvitation` to create invitations to be sent out to new patients, clinicians or owners.
Expand Down Expand Up @@ -730,6 +710,24 @@ Admins may dismiss messages for any user, otherwise users may only dismiss their

None.

## enrollUser

Use `enrollUser` to enroll a user, i.e. use an invitation code to create a full user account.

### Security

Any authenticated, non-enrolled user may use this function.

### Input

|Property|Type|Values|Comments|
|-|-|-|-|
|invitationCode|string|-|The invitation code provided to the user by the organization. It needs to be between 6-12 characters long and only use uppercase latin characters and arabic digits.|

### Output

None.

## exportHealthSummary

`exportHealthSummary` creates a health summary PDF and returns its data.
Expand Down

0 comments on commit cd56c71

Please sign in to comment.