mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-23 01:48:13 +01:00
Show backup status in Settings window
This commit is contained in:
10
ts/types/Storage.d.ts
vendored
10
ts/types/Storage.d.ts
vendored
@@ -17,7 +17,11 @@ import type {
|
||||
SessionResetsType,
|
||||
StorageServiceCredentials,
|
||||
} from '../textsecure/Types.d';
|
||||
import type { BackupCredentialWrapperType } from './backups';
|
||||
import type {
|
||||
BackupCredentialWrapperType,
|
||||
BackupsSubscriptionType,
|
||||
BackupStatusType,
|
||||
} from './backups';
|
||||
import type { ServiceIdString } from './ServiceId';
|
||||
|
||||
import type { RegisteredChallengeType } from '../challenge';
|
||||
@@ -222,6 +226,10 @@ export type StorageAccessType = {
|
||||
key: string;
|
||||
};
|
||||
|
||||
backupTier: number | undefined;
|
||||
cloudBackupStatus: BackupStatusType | undefined;
|
||||
backupSubscriptionStatus: BackupsSubscriptionType;
|
||||
|
||||
// If true Desktop message history was restored from backup
|
||||
isRestoredFromBackup: boolean;
|
||||
|
||||
|
||||
@@ -29,3 +29,35 @@ export type BackupCdnReadCredentialType = Readonly<{
|
||||
retrievedAtMs: number;
|
||||
cdnNumber: number;
|
||||
}>;
|
||||
|
||||
export type SubscriptionCostType = {
|
||||
amount: number;
|
||||
currencyCode: string;
|
||||
};
|
||||
|
||||
export type BackupStatusType = {
|
||||
createdAt?: number;
|
||||
protoSize?: number;
|
||||
mediaSize?: number;
|
||||
};
|
||||
|
||||
export type BackupsSubscriptionType =
|
||||
| {
|
||||
status: 'not-found' | 'expired';
|
||||
}
|
||||
| {
|
||||
status: 'free';
|
||||
mediaIncludedInBackupDurationDays: number;
|
||||
}
|
||||
| (
|
||||
| {
|
||||
status: 'active';
|
||||
renewalDate?: Date;
|
||||
cost?: SubscriptionCostType;
|
||||
}
|
||||
| {
|
||||
status: 'pending-cancellation';
|
||||
expiryDate?: Date;
|
||||
cost?: SubscriptionCostType;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user