fix(actas): move closure to reusable inspector signing
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Failing after 2m3s
DH V2 CI / API · typecheck, tests, build (push) Successful in 34s
DH V2 CI / WEB · typecheck, build (push) Successful in 20s
Production dependency audit / API · production dependencies (push) Successful in 9s
Production dependency audit / WEB · production dependencies (push) Successful in 8s
DH V2 CI / Docker / scripts contract (push) Successful in 1m18s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Failing after 2m3s
DH V2 CI / API · typecheck, tests, build (push) Successful in 34s
DH V2 CI / WEB · typecheck, build (push) Successful in 20s
Production dependency audit / API · production dependencies (push) Successful in 9s
Production dependency audit / WEB · production dependencies (push) Successful in 8s
DH V2 CI / Docker / scripts contract (push) Successful in 1m18s
This commit is contained in:
@@ -23,6 +23,15 @@ export interface UserSmtpSettings {
|
||||
custom: UserSmtpCustomSettings | null;
|
||||
}
|
||||
|
||||
|
||||
export interface UserReusableSignature {
|
||||
configured: boolean;
|
||||
mimeType: 'image/png' | null;
|
||||
sizeBytes: number | null;
|
||||
imageSha256: string | null;
|
||||
updatedAt: string | null;
|
||||
}
|
||||
|
||||
export interface UserSmtpSettingsInput {
|
||||
mode: UserSmtpMode;
|
||||
host?: string;
|
||||
@@ -65,3 +74,26 @@ export function testSelfSmtpSettings() {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function getSelfSignature() {
|
||||
return apiRequest<UserReusableSignature>('/users/self/signature');
|
||||
}
|
||||
|
||||
export function saveSelfSignature(file: File) {
|
||||
const body = new FormData();
|
||||
body.append('file', file);
|
||||
return apiRequest<UserReusableSignature>('/users/self/signature', {
|
||||
method: 'PUT',
|
||||
body,
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteSelfSignature() {
|
||||
return apiRequest<UserReusableSignature>('/users/self/signature', { method: 'DELETE' });
|
||||
}
|
||||
|
||||
export function selfSignatureContentUrl(signature: UserReusableSignature) {
|
||||
const version = signature.imageSha256 ? `?v=${encodeURIComponent(signature.imageSha256)}` : '';
|
||||
return `/api/v3/users/self/signature/content${version}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user