Files
spacedrive/packages/event_samples.json
Jamie Pine 6dfecac83e feat: Enhance job management and event handling in DaemonConnector
- Introduced new data structures for library and job information to align with the Rust daemon output.
- Implemented real-time job tracking by fetching the current job list and subscribing to job events.
- Enhanced event handling to manage job states (started, progress, completed, failed, paused, resumed) effectively.
- Improved logging for connection status and job events to aid in debugging and user experience.
- Updated JobInfo model to allow mutable properties for better state management during job updates.
2025-09-21 13:39:22 -07:00

229 lines
4.6 KiB
JSON

[
"CoreStarted",
"CoreShutdown",
{
"LibraryCreated": {
"id": "e86b94c0-e217-497d-a42f-3ca834d1ddeb",
"name": "Sample Library",
"path": "/sample/path"
}
},
{
"LibraryOpened": {
"id": "1a2168ae-0b1e-4390-b871-984ee5cd8a93",
"name": "Sample Library",
"path": "/sample/path"
}
},
{
"LibraryClosed": {
"id": "eb719a2e-cba9-4225-be0c-8e9cc23c44e9",
"name": "Sample Library"
}
},
{
"LibraryDeleted": {
"id": "d3fc8b89-e459-4577-8a58-819ae8910d20",
"name": "Sample Library",
"deleted_data": true
}
},
{
"EntryCreated": {
"library_id": "4532c3ab-174f-4326-b60e-58b80c46f4db",
"entry_id": "bbb5d740-829e-4d17-9f30-7519e82bb2bc"
}
},
{
"EntryModified": {
"library_id": "68bbeb2e-bc33-4cc3-bbd2-f4f42824020a",
"entry_id": "76a8a243-f094-41eb-a807-91ceccc96f5e"
}
},
{
"EntryDeleted": {
"library_id": "bac72f7c-27d6-45fc-ab3c-beb886f53b3a",
"entry_id": "0ef9b7f7-e31e-4e28-9a15-bba1574858b2"
}
},
{
"EntryMoved": {
"library_id": "7a060540-e8e1-4f03-837d-2cf539ed53d7",
"entry_id": "49bd1da1-d1d4-4a66-b867-e5f972294f70",
"old_path": "/old/path",
"new_path": "/new/path"
}
},
{
"JobQueued": {
"job_id": "job-123",
"job_type": "Indexing"
}
},
{
"JobStarted": {
"job_id": "job-123",
"job_type": "Indexing"
}
},
{
"JobProgress": {
"job_id": "job-123",
"job_type": "Indexing",
"progress": 0.5,
"message": "Processing files...",
"generic_progress": null
}
},
{
"JobProgress": {
"job_id": "job-456",
"job_type": "FileCopy",
"progress": 0.75,
"message": "Copying files...",
"generic_progress": {
"message": "Copying files...",
"percentage": 0.75,
"phase": "Processing"
}
}
},
{
"JobCompleted": {
"job_id": "job-123",
"job_type": "Indexing",
"output": {
"type": "Success"
}
}
},
{
"JobFailed": {
"job_id": "job-123",
"job_type": "Indexing",
"error": "Sample error"
}
},
{
"JobCancelled": {
"job_id": "job-123",
"job_type": "Indexing"
}
},
{
"JobPaused": {
"job_id": "job-123"
}
},
{
"JobResumed": {
"job_id": "job-123"
}
},
{
"IndexingStarted": {
"location_id": "4be366ec-dcd8-40e6-8205-4ae9fb02c931"
}
},
{
"IndexingProgress": {
"location_id": "bf9688bc-4a90-405e-8a91-92319300728b",
"processed": 100,
"total": 200
}
},
{
"IndexingCompleted": {
"location_id": "b773872b-dab1-4d41-b821-6d1d9c978e3a",
"total_files": 150,
"total_dirs": 20
}
},
{
"IndexingFailed": {
"location_id": "40884b1f-6ab3-4b0a-8a9e-4157cc5b51a0",
"error": "Sample indexing error"
}
},
{
"DeviceConnected": {
"device_id": "b15a0f33-6ec6-42db-ba16-9a34ee3311b8",
"device_name": "Sample Device"
}
},
{
"DeviceDisconnected": {
"device_id": "11550561-97d4-4d89-9078-68d8cc53eb86"
}
},
{
"FsRawChange": {
"library_id": "e4d5483c-d0c4-43b7-859f-fb8f2330eed3",
"kind": {
"Create": {
"path": "/sample/file.txt"
}
}
}
},
{
"LocationAdded": {
"library_id": "ca10555e-7cdf-4281-9f46-88296c3498e8",
"location_id": "199e877b-ca8e-4cb3-98c9-cf0aba04c004",
"path": "/sample/location"
}
},
{
"LocationRemoved": {
"library_id": "9c9477aa-b429-40b1-b3f0-0a77ceea67e6",
"location_id": "ad90f62f-ea0c-440f-88d9-bb052a4a77e5"
}
},
{
"FilesIndexed": {
"library_id": "12235993-914e-486c-9f71-7ef3a2ad2e48",
"location_id": "5ebdc0e7-55ff-4979-a849-11d6ce2e66a7",
"count": 42
}
},
{
"ThumbnailsGenerated": {
"library_id": "c3e2a208-6c25-414e-97a8-685179373fbe",
"count": 15
}
},
{
"FileOperationCompleted": {
"library_id": "825bd0a9-5070-48ea-a249-33783cd539cd",
"operation": "Copy",
"affected_files": 10
}
},
{
"FilesModified": {
"library_id": "9fb00ab3-334a-40dd-90ff-99e084aa9f20",
"paths": [
"/file1.txt",
"/file2.txt"
]
}
},
{
"LogMessage": {
"timestamp": "2025-09-21T20:34:22.433703Z",
"level": "info",
"target": "sd_core",
"message": "Sample log message",
"job_id": "job-123",
"library_id": "e90c86e9-dbbb-4e8d-a663-900b98cee3f4"
}
},
{
"Custom": {
"event_type": "sample_custom",
"data": {
"key": "value"
}
}
}
]