| | | 1 | | namespace Chronicis.Api.Services.ExternalLinks; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Configuration options for a blob-backed external link provider (e.g., SRD 2014, SRD 2024). |
| | | 5 | | /// </summary> |
| | | 6 | | public record BlobExternalLinkProviderOptions |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Provider key used in API requests (e.g., "srd14", "srd24"). |
| | | 10 | | /// </summary> |
| | 0 | 11 | | public required string Key { get; init; } |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Display name shown in UI and attribution (e.g., "SRD 2014", "SRD 2024"). |
| | | 15 | | /// </summary> |
| | 0 | 16 | | public required string DisplayName { get; init; } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Azure Storage connection string. |
| | | 20 | | /// </summary> |
| | 0 | 21 | | public required string ConnectionString { get; init; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Blob container name (e.g., "chronicis-external-links"). |
| | | 25 | | /// </summary> |
| | 0 | 26 | | public required string ContainerName { get; init; } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Root prefix path within container (e.g., "2014/", "2024/"). |
| | | 30 | | /// Must end with a slash. |
| | | 31 | | /// </summary> |
| | 0 | 32 | | public required string RootPrefix { get; init; } |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// Maximum number of suggestions to return from a search. |
| | | 36 | | /// </summary> |
| | 0 | 37 | | public int MaxSuggestions { get; init; } = 20; |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// Number of items to return when query is "category/" with no search term. |
| | | 41 | | /// </summary> |
| | 0 | 42 | | public int FirstNCategoryItems { get; init; } = 20; |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// Cache TTL for categories list (in minutes). |
| | | 46 | | /// </summary> |
| | 0 | 47 | | public int CategoriesCacheTtl { get; init; } = 30; |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// Cache TTL for per-category item indexes (in minutes). |
| | | 51 | | /// </summary> |
| | 0 | 52 | | public int CategoryIndexCacheTtl { get; init; } = 30; |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// Cache TTL for rendered content (in minutes). |
| | | 56 | | /// </summary> |
| | 0 | 57 | | public int ContentCacheTtl { get; init; } = 15; |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// Maximum depth for recursive category discovery. |
| | | 61 | | /// Safety limit to prevent runaway recursion in deeply nested hierarchies. |
| | | 62 | | /// </summary> |
| | 0 | 63 | | public int MaxDrillDownDepth { get; init; } = 10; |
| | | 64 | | } |