feat: enable patient form interactions and revision-aware signing
This commit is contained in:
@@ -6,6 +6,8 @@ import type {
|
||||
SignatureUploadInput,
|
||||
SignatureUploadResponse,
|
||||
SigningProof,
|
||||
SigningFormState,
|
||||
PatientAnswer,
|
||||
SigningContextResponse,
|
||||
TokenConsumeRequest,
|
||||
TokenConsumeResponse,
|
||||
@@ -63,3 +65,17 @@ export function uploadSigningSignature(
|
||||
)
|
||||
.then(unwrapApiResponse)
|
||||
}
|
||||
|
||||
export function saveSigningForm(
|
||||
proof: SigningProof,
|
||||
expectedRevision: number,
|
||||
answers: Record<string, PatientAnswer>,
|
||||
): Promise<SigningFormState> {
|
||||
return request
|
||||
.post<ApiResponse<SigningFormState>>('/v1/sign-deliveries/token/form', {
|
||||
...proof,
|
||||
expectedRevision,
|
||||
answers,
|
||||
})
|
||||
.then(unwrapApiResponse)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user