Skip to content
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

Update functions docs #141

Merged
merged 2 commits into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading