mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
refactor: remove SyncConfigPort dead port and ConflictUiPort.notify is dropped (#8408)
* refactor: remove SyncConfigPort dead port and ConflictUiPort.notify is dropped * refactor: remove orphaned doc comment and type
This commit is contained in:
parent
cabf266574
commit
863c7347a3
4 changed files with 2 additions and 105 deletions
|
|
@ -111,8 +111,6 @@ export type {
|
|||
OperationApplyPort,
|
||||
RemoteApplyWindowPort,
|
||||
SyncActionLike,
|
||||
SyncConfigPort,
|
||||
SyncConfigSnapshot,
|
||||
} from './ports';
|
||||
|
||||
// Conflict-resolution helpers.
|
||||
|
|
|
|||
|
|
@ -57,29 +57,6 @@ export interface ArchiveSideEffectPort<TAction extends SyncActionLike = SyncActi
|
|||
handleOperation(action: TAction): Promise<void> | void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Domain-free sync configuration snapshot.
|
||||
*
|
||||
* Provider IDs stay plain strings at the package boundary. Host applications can
|
||||
* narrow them in their adapter layer.
|
||||
*/
|
||||
export interface SyncConfigSnapshot<TProviderId extends string = string> {
|
||||
isEnabled: boolean;
|
||||
syncProvider: TProviderId | null;
|
||||
isEncryptionEnabled?: boolean;
|
||||
isCompressionEnabled?: boolean;
|
||||
isManualSyncOnly?: boolean;
|
||||
syncInterval?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Port for reading host sync configuration without importing framework store
|
||||
* selectors or host provider enums.
|
||||
*/
|
||||
export interface SyncConfigPort<TProviderId extends string = string> {
|
||||
getSyncConfig(): Promise<SyncConfigSnapshot<TProviderId>>;
|
||||
}
|
||||
|
||||
export interface ConflictUiDialogRequest {
|
||||
conflictType: string;
|
||||
scenario?: string;
|
||||
|
|
@ -89,20 +66,10 @@ export interface ConflictUiDialogRequest {
|
|||
meta?: SyncPortMeta;
|
||||
}
|
||||
|
||||
export type ConflictUiNotificationSeverity = 'info' | 'warning' | 'error';
|
||||
|
||||
export interface ConflictUiNotification {
|
||||
severity: ConflictUiNotificationSeverity;
|
||||
message: string;
|
||||
reason?: string;
|
||||
meta?: SyncPortMeta;
|
||||
}
|
||||
|
||||
/**
|
||||
* Port for conflict dialogs/snacks. Resolutions are strings so the host owns
|
||||
* user-facing choices such as USE_LOCAL, USE_REMOTE, or CANCEL.
|
||||
*/
|
||||
export interface ConflictUiPort<TResolution extends string = string> {
|
||||
showConflictDialog(request: ConflictUiDialogRequest): Promise<TResolution>;
|
||||
notify?(notification: ConflictUiNotification): Promise<void> | void;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue