f655adfbea
Migrate app code into canonical feature slices, add phone-only AI digest scheduling and review, wire local notification/background task support, and cover the flow with tests.
61 lines
1.6 KiB
Dart
61 lines
1.6 KiB
Dart
class SharedMessageIngestInput {
|
|
const SharedMessageIngestInput({
|
|
required this.sourceApp,
|
|
required this.messageText,
|
|
this.sourceDisplayName,
|
|
this.sourceUserId,
|
|
this.sourceThreadId,
|
|
this.sharedAt,
|
|
});
|
|
|
|
final String sourceApp;
|
|
final String messageText;
|
|
final String? sourceDisplayName;
|
|
final String? sourceUserId;
|
|
final String? sourceThreadId;
|
|
final DateTime? sharedAt;
|
|
}
|
|
|
|
enum SharedMessageIngestStatus { imported, queuedForResolution }
|
|
|
|
class SharedMessageIngestResult {
|
|
const SharedMessageIngestResult({
|
|
required this.status,
|
|
required this.createdProfile,
|
|
required this.createdSourceLink,
|
|
this.profileId,
|
|
this.profileName,
|
|
this.momentId,
|
|
this.inboxEntryId,
|
|
});
|
|
|
|
const SharedMessageIngestResult.imported({
|
|
required this.profileId,
|
|
required this.profileName,
|
|
required this.createdProfile,
|
|
required this.createdSourceLink,
|
|
required this.momentId,
|
|
}) : status = SharedMessageIngestStatus.imported,
|
|
inboxEntryId = null;
|
|
|
|
const SharedMessageIngestResult.queuedForResolution({
|
|
required this.inboxEntryId,
|
|
}) : status = SharedMessageIngestStatus.queuedForResolution,
|
|
createdProfile = false,
|
|
createdSourceLink = false,
|
|
profileId = null,
|
|
profileName = null,
|
|
momentId = null;
|
|
|
|
final SharedMessageIngestStatus status;
|
|
final String? profileId;
|
|
final String? profileName;
|
|
final bool createdProfile;
|
|
final bool createdSourceLink;
|
|
final String? momentId;
|
|
final String? inboxEntryId;
|
|
|
|
bool get isQueuedForResolution =>
|
|
status == SharedMessageIngestStatus.queuedForResolution;
|
|
}
|