@fgv/ts-res 5.0.0-0 → 5.0.0-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/ts-res.d.ts +777 -124
  2. package/lib/index.d.ts +10 -2
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +23 -2
  5. package/lib/index.js.map +1 -1
  6. package/lib/packlets/bundle/bundleBuilder.d.ts +41 -0
  7. package/lib/packlets/bundle/bundleBuilder.d.ts.map +1 -0
  8. package/lib/packlets/bundle/bundleBuilder.js +134 -0
  9. package/lib/packlets/bundle/bundleBuilder.js.map +1 -0
  10. package/lib/packlets/bundle/bundleLoader.d.ts +72 -0
  11. package/lib/packlets/bundle/bundleLoader.d.ts.map +1 -0
  12. package/lib/packlets/bundle/bundleLoader.js +105 -0
  13. package/lib/packlets/bundle/bundleLoader.js.map +1 -0
  14. package/lib/packlets/bundle/bundleNormalizer.d.ts +73 -0
  15. package/lib/packlets/bundle/bundleNormalizer.d.ts.map +1 -0
  16. package/lib/packlets/bundle/bundleNormalizer.js +142 -0
  17. package/lib/packlets/bundle/bundleNormalizer.js.map +1 -0
  18. package/lib/packlets/bundle/bundleUtils.d.ts +70 -0
  19. package/lib/packlets/bundle/bundleUtils.d.ts.map +1 -0
  20. package/lib/packlets/bundle/bundleUtils.js +117 -0
  21. package/lib/packlets/bundle/bundleUtils.js.map +1 -0
  22. package/lib/packlets/bundle/convert.d.ts +33 -0
  23. package/lib/packlets/bundle/convert.d.ts.map +1 -0
  24. package/lib/packlets/bundle/convert.js +78 -0
  25. package/lib/packlets/bundle/convert.js.map +1 -0
  26. package/lib/packlets/bundle/index.d.ts +21 -0
  27. package/lib/packlets/bundle/index.d.ts.map +1 -0
  28. package/lib/packlets/bundle/index.js +83 -0
  29. package/lib/packlets/bundle/index.js.map +1 -0
  30. package/lib/packlets/bundle/model.d.ts +100 -0
  31. package/lib/packlets/bundle/model.d.ts.map +1 -0
  32. package/lib/packlets/bundle/model.js +24 -0
  33. package/lib/packlets/bundle/model.js.map +1 -0
  34. package/lib/packlets/common/resources.d.ts +8 -0
  35. package/lib/packlets/common/resources.d.ts.map +1 -1
  36. package/lib/packlets/common/resources.js.map +1 -1
  37. package/lib/packlets/conditions/condition.js +1 -1
  38. package/lib/packlets/conditions/condition.js.map +1 -1
  39. package/lib/packlets/conditions/conditionSet.d.ts +9 -0
  40. package/lib/packlets/conditions/conditionSet.d.ts.map +1 -1
  41. package/lib/packlets/conditions/conditionSet.js +74 -1
  42. package/lib/packlets/conditions/conditionSet.js.map +1 -1
  43. package/lib/packlets/import/fsItem.d.ts.map +1 -1
  44. package/lib/packlets/import/fsItem.js +8 -13
  45. package/lib/packlets/import/fsItem.js.map +1 -1
  46. package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -1
  47. package/lib/packlets/import/importers/jsonImporter.js +1 -0
  48. package/lib/packlets/import/importers/jsonImporter.js.map +1 -1
  49. package/lib/packlets/qualifier-types/literalQualifierType.d.ts +4 -0
  50. package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -1
  51. package/lib/packlets/qualifier-types/literalQualifierType.js +14 -0
  52. package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -1
  53. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts +7 -0
  54. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -1
  55. package/lib/packlets/qualifier-types/literalValueHierarchy.js +14 -1
  56. package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -1
  57. package/lib/packlets/qualifier-types/qualifierType.d.ts +11 -0
  58. package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -1
  59. package/lib/packlets/qualifier-types/qualifierType.js +9 -0
  60. package/lib/packlets/qualifier-types/qualifierType.js.map +1 -1
  61. package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -1
  62. package/lib/packlets/qualifiers/qualifierCollector.js +1 -2
  63. package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -1
  64. package/lib/packlets/resource-types/jsonResourceType.d.ts +4 -4
  65. package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -1
  66. package/lib/packlets/resource-types/jsonResourceType.js +1 -1
  67. package/lib/packlets/resource-types/jsonResourceType.js.map +1 -1
  68. package/lib/packlets/resource-types/resourceType.d.ts +18 -9
  69. package/lib/packlets/resource-types/resourceType.d.ts.map +1 -1
  70. package/lib/packlets/resource-types/resourceType.js.map +1 -1
  71. package/lib/packlets/resources/common.d.ts +12 -0
  72. package/lib/packlets/resources/common.d.ts.map +1 -1
  73. package/lib/packlets/resources/common.js.map +1 -1
  74. package/lib/packlets/resources/resourceCandidate.d.ts +5 -1
  75. package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -1
  76. package/lib/packlets/resources/resourceCandidate.js +6 -0
  77. package/lib/packlets/resources/resourceCandidate.js.map +1 -1
  78. package/lib/packlets/resources/resourceManagerBuilder.d.ts +133 -6
  79. package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +1 -1
  80. package/lib/packlets/resources/resourceManagerBuilder.js +451 -9
  81. package/lib/packlets/resources/resourceManagerBuilder.js.map +1 -1
  82. package/lib/packlets/runtime/cacheListener.d.ts +9 -0
  83. package/lib/packlets/runtime/cacheListener.d.ts.map +1 -1
  84. package/lib/packlets/runtime/cacheListener.js +6 -0
  85. package/lib/packlets/runtime/cacheListener.js.map +1 -1
  86. package/lib/packlets/runtime/cacheMetrics.d.ts +6 -0
  87. package/lib/packlets/runtime/cacheMetrics.d.ts.map +1 -1
  88. package/lib/packlets/runtime/cacheMetrics.js +11 -0
  89. package/lib/packlets/runtime/cacheMetrics.js.map +1 -1
  90. package/lib/packlets/runtime/compiledResourceCollection.d.ts +1 -1
  91. package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +1 -1
  92. package/lib/packlets/runtime/compiledResourceCollection.js.map +1 -1
  93. package/lib/packlets/runtime/iResourceManager.d.ts +9 -3
  94. package/lib/packlets/runtime/iResourceManager.d.ts.map +1 -1
  95. package/lib/packlets/runtime/iResourceManager.js.map +1 -1
  96. package/lib/packlets/runtime/resourceResolver.d.ts +21 -0
  97. package/lib/packlets/runtime/resourceResolver.d.ts.map +1 -1
  98. package/lib/packlets/runtime/resourceResolver.js +39 -17
  99. package/lib/packlets/runtime/resourceResolver.js.map +1 -1
  100. package/package.json +12 -12
package/dist/ts-res.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Collections } from '@fgv/ts-utils';
3
3
  import { Converter } from '@fgv/ts-utils';
4
4
  import { DetailedResult } from '@fgv/ts-utils';
5
5
  import { FileTree } from '@fgv/ts-utils';
6
+ import { Hash } from '@fgv/ts-utils';
6
7
  import { ICollectible } from '@fgv/ts-utils';
7
8
  import { IReadOnlyResultMap } from '@fgv/ts-utils';
8
9
  import { JsonObject } from '@fgv/ts-json-base';
@@ -178,6 +179,262 @@ declare function buildQualifierDefaultValuesToken(parts: ReadonlyArray<IQualifie
178
179
  */
179
180
  declare function buildQualifierDefaultValueToken({ qualifier, value }: IQualifierDefaultValueTokenParts): Result<QualifierDefaultValueToken>;
180
181
 
182
+ declare namespace Bundle {
183
+ export {
184
+ IBundleMetadata,
185
+ IBundleExportMetadata,
186
+ IBundle,
187
+ IBundleCreateParams,
188
+ BundleBuilder,
189
+ BundleLoader,
190
+ IBundleLoaderCreateParams,
191
+ BundleUtils,
192
+ IBundleComponents,
193
+ Model_4 as Model,
194
+ Convert_10 as Convert,
195
+ BundleNormalizer
196
+ }
197
+ }
198
+ export { Bundle }
199
+
200
+ /**
201
+ * `Converter` for a {@link Bundle.IBundle | bundle} object.
202
+ * @public
203
+ */
204
+ declare const bundle: Converter<IBundle>;
205
+
206
+ /**
207
+ * Builder for creating resource bundles from a ResourceManagerBuilder.
208
+ * Handles the compilation, configuration extraction, and integrity verification
209
+ * needed to create a complete, portable bundle.
210
+ * @public
211
+ */
212
+ export declare class BundleBuilder {
213
+ /**
214
+ * Creates a resource bundle from a ResourceManagerBuilder.
215
+ * @param builder - The ResourceManagerBuilder containing the resources to bundle
216
+ * @param systemConfig - The SystemConfiguration used to create the builder
217
+ * @param params - Optional parameters for bundle creation
218
+ * @returns Success with the created bundle if successful, Failure with error message otherwise
219
+ * @public
220
+ */
221
+ static create(builder: ResourceManagerBuilder, systemConfig: SystemConfiguration, params?: IBundleCreateParams): Result<IBundle>;
222
+ /**
223
+ * Creates a resource bundle from a ResourceManagerBuilder using a predefined system configuration.
224
+ * This is a convenience method for the common case of using predefined configurations.
225
+ * @param builder - The ResourceManagerBuilder containing the resources to bundle
226
+ * @param configName - The name of the predefined system configuration used
227
+ * @param params - Optional parameters for bundle creation
228
+ * @returns Success with the created bundle if successful, Failure with error message otherwise
229
+ * @public
230
+ */
231
+ static createFromPredefined(builder: ResourceManagerBuilder, configName: PredefinedSystemConfiguration, params?: IBundleCreateParams): Result<IBundle>;
232
+ /**
233
+ * Generates a hash checksum for the compiled resource collection.
234
+ * The checksum is calculated using the provided hash normalizer.
235
+ * @param compiledCollection - The compiled resource collection to generate checksum for
236
+ * @param hashNormalizer - The hash normalizer to use for checksum generation
237
+ * @returns Success with the checksum string if successful, Failure otherwise
238
+ * @internal
239
+ */
240
+ private static _generateChecksum;
241
+ }
242
+
243
+ /**
244
+ * `Converter` for {@link Bundle.IBundleCreateParams | bundle creation parameters}.
245
+ * @public
246
+ */
247
+ declare const bundleCreateParams: Converter<IBundleCreateParams>;
248
+
249
+ /**
250
+ * `Converter` for {@link Bundle.IBundleExportMetadata | bundle export metadata}.
251
+ * @public
252
+ */
253
+ declare const bundleExportMetadata: Converter<IBundleExportMetadata>;
254
+
255
+ /**
256
+ * Loader for creating an IResourceManager from a resource bundle.
257
+ * Handles integrity verification and reconstruction of the runtime resource manager.
258
+ * @public
259
+ */
260
+ export declare class BundleLoader {
261
+ /**
262
+ * Creates an IResourceManager from a resource bundle.
263
+ * @param params - Parameters for bundle loading including the bundle and options
264
+ * @returns Success with the IResourceManager if successful, Failure with error message otherwise
265
+ * @public
266
+ */
267
+ static createManagerFromBundle(params: IBundleLoaderCreateParams): Result<IResourceManager>;
268
+ /**
269
+ * Verifies the integrity of a bundle by checking its checksum.
270
+ * @param bundle - The bundle to verify
271
+ * @param skipVerification - Whether to skip verification
272
+ * @param hashNormalizer - The hash normalizer to use for verification
273
+ * @returns Success if verification passes or is skipped, Failure otherwise
274
+ * @internal
275
+ */
276
+ private static _verifyBundleIntegrity;
277
+ /**
278
+ * Generates a hash checksum for the compiled resource collection.
279
+ * @param compiledCollection - The compiled resource collection to generate checksum for
280
+ * @param hashNormalizer - The hash normalizer to use for checksum generation
281
+ * @returns Success with the checksum string if successful, Failure otherwise
282
+ * @internal
283
+ */
284
+ private static _generateChecksum;
285
+ /**
286
+ * Creates a SystemConfiguration from the bundle's configuration.
287
+ * @param bundle - The bundle containing the configuration
288
+ * @returns Success with the SystemConfiguration if successful, Failure otherwise
289
+ * @internal
290
+ */
291
+ private static _createSystemConfiguration;
292
+ /**
293
+ * Creates a CompiledResourceCollection from the bundle.
294
+ * @param bundle - The bundle to load
295
+ * @param qualifierTypes - The qualifier type collector from the system configuration
296
+ * @param resourceTypes - The resource type collector from the system configuration
297
+ * @returns Success with the CompiledResourceCollection if successful, Failure otherwise
298
+ * @internal
299
+ */
300
+ private static _createCompiledResourceCollection;
301
+ }
302
+
303
+ /**
304
+ * `Converter` for a {@link Bundle.IBundleMetadata | bundle metadata} object.
305
+ * @public
306
+ */
307
+ declare const bundleMetadata: Converter<IBundleMetadata>;
308
+
309
+ /**
310
+ * Normalizes ResourceManagerBuilder instances to ensure consistent ordering
311
+ * of internal entities, enabling order-independent bundle checksums.
312
+ *
313
+ * The normalization process rebuilds the ResourceManagerBuilder from the ground up
314
+ * in a canonical order to ensure identical index assignments regardless of
315
+ * original construction order.
316
+ * @public
317
+ */
318
+ declare class BundleNormalizer {
319
+ /**
320
+ * Creates a normalized ResourceManagerBuilder from an existing builder.
321
+ * The normalized builder will have identical entities but arranged in
322
+ * canonical order to ensure consistent index assignments.
323
+ *
324
+ * @param originalBuilder - The ResourceManagerBuilder to normalize
325
+ * @param systemConfig - The SystemConfiguration used to create the original builder
326
+ * @returns Success with the normalized ResourceManagerBuilder if successful, Failure otherwise
327
+ */
328
+ static normalize(originalBuilder: ResourceManagerBuilder, systemConfig: SystemConfiguration): Result<ResourceManagerBuilder>;
329
+ /**
330
+ * Creates a normalized ResourceManagerBuilder using a predefined system configuration.
331
+ * This is a convenience method for the common case of using predefined configurations.
332
+ *
333
+ * @param originalBuilder - The ResourceManagerBuilder to normalize
334
+ * @param configName - The name of the predefined system configuration used
335
+ * @returns Success with the normalized ResourceManagerBuilder if successful, Failure otherwise
336
+ */
337
+ static normalizeFromPredefined(originalBuilder: ResourceManagerBuilder, configName: PredefinedSystemConfiguration): Result<ResourceManagerBuilder>;
338
+ /**
339
+ * Normalizes all conditions from the original builder by adding them to the
340
+ * normalized builder in sorted order using loose condition declarations.
341
+ *
342
+ * @param originalBuilder - The source ResourceManagerBuilder
343
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
344
+ * @returns Success if all conditions were normalized successfully, Failure otherwise
345
+ * @internal
346
+ */
347
+ private static _normalizeConditions;
348
+ /**
349
+ * Normalizes all condition sets from the original builder by adding them to the
350
+ * normalized builder in sorted order using loose condition set declarations.
351
+ *
352
+ * @param originalBuilder - The source ResourceManagerBuilder
353
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
354
+ * @returns Success if all condition sets were normalized successfully, Failure otherwise
355
+ * @internal
356
+ */
357
+ private static _normalizeConditionSets;
358
+ /**
359
+ * Normalizes all candidates by sorting them first by resource ID, then by condition set.
360
+ *
361
+ * @param originalBuilder - The source ResourceManagerBuilder
362
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
363
+ * @returns Success if all candidates were normalized successfully, Failure otherwise
364
+ * @internal
365
+ */
366
+ private static _normalizeCandidates;
367
+ /**
368
+ * Adds normalized resources to the target builder by first normalizing conditions,
369
+ * then condition sets, then candidates.
370
+ *
371
+ * @param originalBuilder - The source ResourceManagerBuilder
372
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
373
+ * @returns Success if all resources were added successfully, Failure otherwise
374
+ * @internal
375
+ */
376
+ private static _addNormalizedResources;
377
+ }
378
+
379
+ /**
380
+ * Lightweight converter for bundle structure validation without full processing.
381
+ * Useful for detecting bundle files without the overhead of full validation.
382
+ * @public
383
+ */
384
+ declare const bundleStructure: Converter<{
385
+ metadata: IBundleMetadata;
386
+ config: unknown;
387
+ compiledCollection: unknown;
388
+ }>;
389
+
390
+ /**
391
+ * Utility functions for working with resource bundles.
392
+ * Provides reusable logic for bundle detection, parsing, and component extraction.
393
+ * @public
394
+ */
395
+ declare class BundleUtils {
396
+ /**
397
+ * Checks if the given object appears to be a bundle file by examining its structure.
398
+ * This is a lightweight check that doesn't perform full validation.
399
+ * @param data - The data to check
400
+ * @returns True if the data appears to be a bundle structure
401
+ * @public
402
+ */
403
+ static isBundleFile(data: unknown): boolean;
404
+ /**
405
+ * Extracts and validates components from a bundle for reuse.
406
+ * Performs full validation of the bundle structure and creates typed components.
407
+ * @param bundleData - The raw bundle data to extract components from
408
+ * @returns Success with bundle components if valid, Failure with error message otherwise
409
+ * @public
410
+ */
411
+ static extractBundleComponents(bundleData: unknown): Result<IBundleComponents>;
412
+ /**
413
+ * Extracts just the metadata from potential bundle data without full validation.
414
+ * Useful for displaying bundle information without processing the entire bundle.
415
+ * @param data - The data to extract metadata from
416
+ * @returns Success with metadata if found and valid, Failure otherwise
417
+ * @public
418
+ */
419
+ static extractBundleMetadata(data: unknown): Result<IBundleMetadata>;
420
+ /**
421
+ * Parses bundle data from a JSON string.
422
+ * Convenience method that combines JSON parsing with bundle component extraction.
423
+ * @param jsonString - The JSON string containing bundle data
424
+ * @returns Success with bundle components if valid, Failure with error message otherwise
425
+ * @public
426
+ */
427
+ static parseBundleFromJson(jsonString: string): Result<IBundleComponents>;
428
+ /**
429
+ * Checks if a file name suggests it might be a bundle file.
430
+ * This is a heuristic check based on file naming conventions.
431
+ * @param fileName - The file name to check
432
+ * @returns True if the file name suggests a bundle file
433
+ * @public
434
+ */
435
+ static isBundleFileName(fileName: string): boolean;
436
+ }
437
+
181
438
  /**
182
439
  * Simple implementation of {@link Decisions.ICandidate | ICandidate} with
183
440
  * helper methods for sorting and presentation.
@@ -227,6 +484,15 @@ declare class Candidate<TVALUE extends JsonValue = JsonValue> implements ICandid
227
484
  */
228
485
  declare type CandidateAction = 'unchanged' | 'reduced' | 'suppressed';
229
486
 
487
+ /**
488
+ * The completeness of a resource candidate value. A full value is one that
489
+ * contains all of the required properties for the resource type. A partial
490
+ * value is one that contains some of the required properties for the resource
491
+ * type.
492
+ * @public
493
+ */
494
+ export declare type CandidateCompleteness = 'full' | 'partial';
495
+
230
496
  /**
231
497
  * Manages candidate reduction logic for filtering and qualifier reduction operations.
232
498
  * Encapsulates the state and logic needed to consistently process candidates for reduction.
@@ -402,13 +668,14 @@ declare namespace Common {
402
668
  ResourceTypeName,
403
669
  ResourceTypeIndex,
404
670
  ResourceValueMergeMethod,
405
- allResourceValueMergeMethods
671
+ allResourceValueMergeMethods,
672
+ CandidateCompleteness
406
673
  }
407
674
  }
408
675
 
409
676
  declare namespace Compiled {
410
677
  export {
411
- Convert_3 as Convert,
678
+ Convert_6 as Convert,
412
679
  ICompiledResourceOptions,
413
680
  ICompiledConditionMetadata,
414
681
  ICompiledConditionSetMetadata,
@@ -429,61 +696,61 @@ declare namespace Compiled {
429
696
  * Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.
430
697
  * @public
431
698
  */
432
- declare const compiledAbstractDecision: ObjectConverter<Model.ICompiledAbstractDecision, unknown>;
699
+ declare const compiledAbstractDecision: ObjectConverter<Model_3.ICompiledAbstractDecision, unknown>;
433
700
 
434
701
  /**
435
702
  * Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.
436
703
  * @public
437
704
  */
438
- declare const compiledCandidate: ObjectConverter<Model.ICompiledCandidate, unknown>;
705
+ declare const compiledCandidate: ObjectConverter<Model_3.ICompiledCandidate, unknown>;
439
706
 
440
707
  /**
441
708
  * Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.
442
709
  * @public
443
710
  */
444
- declare const compiledCondition: ObjectConverter<Model.ICompiledCondition, unknown>;
711
+ declare const compiledCondition: ObjectConverter<Model_3.ICompiledCondition, unknown>;
445
712
 
446
713
  /**
447
714
  * Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.
448
715
  * @public
449
716
  */
450
- declare const compiledConditionMetadata: ObjectConverter<Model.ICompiledConditionMetadata, unknown>;
717
+ declare const compiledConditionMetadata: ObjectConverter<Model_3.ICompiledConditionMetadata, unknown>;
451
718
 
452
719
  /**
453
720
  * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.
454
721
  * @public
455
722
  */
456
- declare const compiledConditionSet: ObjectConverter<Model.ICompiledConditionSet, unknown>;
723
+ declare const compiledConditionSet: ObjectConverter<Model_3.ICompiledConditionSet, unknown>;
457
724
 
458
725
  /**
459
726
  * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.
460
727
  * @public
461
728
  */
462
- declare const compiledConditionSetMetadata: ObjectConverter<Model.ICompiledConditionSetMetadata, unknown>;
729
+ declare const compiledConditionSetMetadata: ObjectConverter<Model_3.ICompiledConditionSetMetadata, unknown>;
463
730
 
464
731
  /**
465
732
  * Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.
466
733
  * @public
467
734
  */
468
- declare const compiledDecisionMetadata: ObjectConverter<Model.ICompiledDecisionMetadata, unknown>;
735
+ declare const compiledDecisionMetadata: ObjectConverter<Model_3.ICompiledDecisionMetadata, unknown>;
469
736
 
470
737
  /**
471
738
  * Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.
472
739
  * @public
473
740
  */
474
- declare const compiledQualifier: ObjectConverter<Model.ICompiledQualifier, unknown>;
741
+ declare const compiledQualifier: ObjectConverter<Model_3.ICompiledQualifier, unknown>;
475
742
 
476
743
  /**
477
744
  * Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.
478
745
  * @public
479
746
  */
480
- declare const compiledQualifierType: ObjectConverter<Model.ICompiledQualifierType, unknown>;
747
+ declare const compiledQualifierType: ObjectConverter<Model_3.ICompiledQualifierType, unknown>;
481
748
 
482
749
  /**
483
750
  * Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.
484
751
  * @public
485
752
  */
486
- declare const compiledResource: ObjectConverter<Model.ICompiledResource, unknown>;
753
+ declare const compiledResource: ObjectConverter<Model_3.ICompiledResource, unknown>;
487
754
 
488
755
  /**
489
756
  * A compiled resource collection implements {@link Runtime.IResourceManager | IResourceManager}
@@ -491,7 +758,7 @@ declare const compiledResource: ObjectConverter<Model.ICompiledResource, unknown
491
758
  * and use pre-compiled resource collections without rebuilding them from scratch.
492
759
  * @public
493
760
  */
494
- declare class CompiledResourceCollection implements IResourceManager {
761
+ declare class CompiledResourceCollection implements IResourceManager<IResource> {
495
762
  readonly conditions: ReadOnlyConditionCollector;
496
763
  readonly conditionSets: ReadOnlyConditionSetCollector;
497
764
  readonly decisions: ReadOnlyAbstractDecisionCollector;
@@ -628,13 +895,13 @@ declare class CompiledResourceCollection implements IResourceManager {
628
895
  * This combines all the individual converters into a single converter for the entire resource collection.
629
896
  * @public
630
897
  */
631
- declare const compiledResourceCollection: ObjectConverter<Model.ICompiledResourceCollection, unknown>;
898
+ declare const compiledResourceCollection: ObjectConverter<Model_3.ICompiledResourceCollection, unknown>;
632
899
 
633
900
  /**
634
901
  * Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.
635
902
  * @public
636
903
  */
637
- declare const compiledResourceType: ObjectConverter<Model.ICompiledResourceType, unknown>;
904
+ declare const compiledResourceType: ObjectConverter<Model_3.ICompiledResourceType, unknown>;
638
905
 
639
906
  /**
640
907
  * A {@link Decisions.ConcreteDecision | concrete decision} is a {@link Decisions.IDecision | decision}
@@ -685,7 +952,7 @@ declare class ConcreteDecision<TVALUE extends JsonValue = JsonValue> implements
685
952
  * Represents a single condition applied to some resource instance.
686
953
  * @public
687
954
  */
688
- declare class Condition implements IValidatedConditionDecl {
955
+ export declare class Condition implements IValidatedConditionDecl {
689
956
  /**
690
957
  * The {@link Qualifiers.Qualifier | qualifier} used in this condition.
691
958
  */
@@ -932,7 +1199,7 @@ declare const conditionPriority: Converter<ConditionPriority, unknown>;
932
1199
 
933
1200
  declare namespace Conditions {
934
1201
  export {
935
- Convert_2 as Convert,
1202
+ Convert_11 as Convert,
936
1203
  Condition,
937
1204
  IConditionCollectorCreateParams,
938
1205
  ConditionCollector,
@@ -956,7 +1223,7 @@ export { Conditions }
956
1223
  * context for a resource instance to be valid.
957
1224
  * @public
958
1225
  */
959
- declare class ConditionSet implements IValidatedConditionSetDecl {
1226
+ export declare class ConditionSet implements IValidatedConditionSetDecl {
960
1227
  protected readonly _collectible: Collections.Collectible<ConditionSetKey, ConditionSetIndex>;
961
1228
  /**
962
1229
  * The {@link Conditions.Condition | conditions} that make up this condition
@@ -1026,6 +1293,14 @@ declare class ConditionSet implements IValidatedConditionSetDecl {
1026
1293
  * @public
1027
1294
  */
1028
1295
  static getKeyForDecl(decl: IValidatedConditionSetDecl): Result<ConditionSetKey>;
1296
+ /**
1297
+ * Gets a condition set key from a loose condition set declaration.
1298
+ * @param conditionSet - The loose condition set declaration to convert.
1299
+ * @param conditionCollector - The condition collector used for validation.
1300
+ * @returns `Success` with the condition set key if successful, `Failure` otherwise.
1301
+ * @public
1302
+ */
1303
+ static getKeyFromLooseDecl(conditionSet: ResourceJson.Json.ConditionSetDecl | undefined, conditionCollector: ConditionCollector): Result<ConditionSetKey>;
1029
1304
  /**
1030
1305
  * Gets a {@link ConditionSetToken | condition set token} for this condition set,
1031
1306
  * if possible.
@@ -1120,10 +1395,10 @@ declare class ConditionSetCollector extends ValidatingCollector<ConditionSet> {
1120
1395
  declare type ConditionSetDecl = ConditionSetDeclAsArray | ConditionSetDeclAsRecord;
1121
1396
 
1122
1397
  /**
1123
- * Converter which converts to a {@link Conditions.IConditionSetDecl | condition set declaration}.
1398
+ * `Converter` for a normalized {@link ResourceJson.Normalized.ConditionSetDecl | condition set declaration}.
1124
1399
  * @public
1125
1400
  */
1126
- declare const conditionSetDecl: ObjectConverter<IConditionSetDecl, unknown>;
1401
+ declare const conditionSetDecl: Converter<Normalized.ConditionSetDecl>;
1127
1402
 
1128
1403
  /**
1129
1404
  * Normalized non-validated declaration of a {@link Conditions.Condition | condition}.
@@ -1132,10 +1407,10 @@ declare const conditionSetDecl: ObjectConverter<IConditionSetDecl, unknown>;
1132
1407
  declare type ConditionSetDecl_2 = ReadonlyArray<ILooseConditionDecl>;
1133
1408
 
1134
1409
  /**
1135
- * `Converter` for a normalized {@link ResourceJson.Normalized.ConditionSetDecl | condition set declaration}.
1410
+ * Converter which converts to a {@link Conditions.IConditionSetDecl | condition set declaration}.
1136
1411
  * @public
1137
1412
  */
1138
- declare const conditionSetDecl_2: Converter<Normalized.ConditionSetDecl>;
1413
+ declare const conditionSetDecl_2: ObjectConverter<IConditionSetDecl, unknown>;
1139
1414
 
1140
1415
  /**
1141
1416
  * Non-validated declaration of a {@link Conditions.Condition | condition}.
@@ -1373,8 +1648,8 @@ declare class ConditionTokens {
1373
1648
 
1374
1649
  declare namespace Config {
1375
1650
  export {
1376
- Model_2 as Model,
1377
- Convert_10 as Convert,
1651
+ Model,
1652
+ Convert_9 as Convert,
1378
1653
  updateSystemConfigurationQualifierDefaultValues,
1379
1654
  ISystemConfigurationInitParams,
1380
1655
  SystemConfiguration,
@@ -1390,7 +1665,7 @@ export { Config }
1390
1665
 
1391
1666
  declare namespace Config_2 {
1392
1667
  export {
1393
- Convert_6 as Convert,
1668
+ Convert_2 as Convert,
1394
1669
  IQualifierTypeConfig,
1395
1670
  ILanguageQualifierTypeConfig,
1396
1671
  ITerritoryQualifierTypeConfig,
@@ -1404,7 +1679,7 @@ declare namespace Config_2 {
1404
1679
 
1405
1680
  declare namespace Config_3 {
1406
1681
  export {
1407
- Convert_9 as Convert,
1682
+ Convert_5 as Convert,
1408
1683
  IResourceTypeConfig
1409
1684
  }
1410
1685
  }
@@ -1417,7 +1692,7 @@ declare const containerContextDecl: Converter<Normalized.IContainerContextDecl>;
1417
1692
 
1418
1693
  declare namespace Context {
1419
1694
  export {
1420
- Convert_5 as Convert,
1695
+ Convert_7 as Convert,
1421
1696
  IContextMatchOptions,
1422
1697
  IContextQualifierValueDecl,
1423
1698
  IContextDecl,
@@ -1760,23 +2035,62 @@ export { Convert }
1760
2035
 
1761
2036
  declare namespace Convert_10 {
1762
2037
  export {
1763
- systemConfiguration,
1764
- predefinedSystemConfiguration
2038
+ bundleMetadata,
2039
+ bundleExportMetadata,
2040
+ bundle,
2041
+ bundleCreateParams,
2042
+ bundleStructure
1765
2043
  }
1766
2044
  }
1767
2045
 
1768
- declare namespace Convert_2 {
2046
+ declare namespace Convert_11 {
1769
2047
  export {
1770
2048
  conditionDecl,
1771
2049
  IConditionDeclConvertContext,
1772
2050
  validatedConditionDecl,
1773
- conditionSetDecl,
2051
+ conditionSetDecl_2 as conditionSetDecl,
1774
2052
  IConditionSetDeclConvertContext,
1775
2053
  validatedConditionSetDecl
1776
2054
  }
1777
2055
  }
1778
2056
 
2057
+ declare namespace Convert_2 {
2058
+ export {
2059
+ languageQualifierTypeConfig,
2060
+ territoryQualifierTypeConfig,
2061
+ literalQualifierTypeConfig,
2062
+ systemLanguageQualifierTypeConfig,
2063
+ systemTerritoryQualifierTypeConfig,
2064
+ systemLiteralQualifierTypeConfig,
2065
+ systemQualifierTypeConfig
2066
+ }
2067
+ }
2068
+
1779
2069
  declare namespace Convert_3 {
2070
+ export {
2071
+ literalValueHierarchyCreateParams,
2072
+ IQualifierTypeConvertContext,
2073
+ qualifierType
2074
+ }
2075
+ }
2076
+
2077
+ declare namespace Convert_4 {
2078
+ export {
2079
+ qualifierDecl,
2080
+ IQualifierDeclConvertContext,
2081
+ validatedQualifierDecl,
2082
+ IQualifierConvertContext,
2083
+ qualifier
2084
+ }
2085
+ }
2086
+
2087
+ declare namespace Convert_5 {
2088
+ export {
2089
+ resourceTypeConfig
2090
+ }
2091
+ }
2092
+
2093
+ declare namespace Convert_6 {
1780
2094
  export {
1781
2095
  compiledConditionMetadata,
1782
2096
  compiledConditionSetMetadata,
@@ -1793,11 +2107,21 @@ declare namespace Convert_3 {
1793
2107
  }
1794
2108
  }
1795
2109
 
1796
- declare namespace Convert_4 {
2110
+ declare namespace Convert_7 {
2111
+ export {
2112
+ contextQualifierValueDecl,
2113
+ contextDecl,
2114
+ IContextDeclConvertContext,
2115
+ validatedContextQualifierValueDecl,
2116
+ validatedContextDecl
2117
+ }
2118
+ }
2119
+
2120
+ declare namespace Convert_8 {
1797
2121
  export {
1798
2122
  looseConditionDecl,
1799
2123
  childConditionDecl,
1800
- conditionSetDecl_2 as conditionSetDecl,
2124
+ conditionSetDecl,
1801
2125
  looseResourceCandidateDecl,
1802
2126
  importerResourceCandidateDecl,
1803
2127
  childResourceCandidateDecl,
@@ -1811,49 +2135,10 @@ declare namespace Convert_4 {
1811
2135
  }
1812
2136
  }
1813
2137
 
1814
- declare namespace Convert_5 {
1815
- export {
1816
- contextQualifierValueDecl,
1817
- contextDecl,
1818
- IContextDeclConvertContext,
1819
- validatedContextQualifierValueDecl,
1820
- validatedContextDecl
1821
- }
1822
- }
1823
-
1824
- declare namespace Convert_6 {
1825
- export {
1826
- languageQualifierTypeConfig,
1827
- territoryQualifierTypeConfig,
1828
- literalQualifierTypeConfig,
1829
- systemLanguageQualifierTypeConfig,
1830
- systemTerritoryQualifierTypeConfig,
1831
- systemLiteralQualifierTypeConfig,
1832
- systemQualifierTypeConfig
1833
- }
1834
- }
1835
-
1836
- declare namespace Convert_7 {
1837
- export {
1838
- literalValueHierarchyCreateParams,
1839
- IQualifierTypeConvertContext,
1840
- qualifierType
1841
- }
1842
- }
1843
-
1844
- declare namespace Convert_8 {
1845
- export {
1846
- qualifierDecl,
1847
- IQualifierDeclConvertContext,
1848
- validatedQualifierDecl,
1849
- IQualifierConvertContext,
1850
- qualifier
1851
- }
1852
- }
1853
-
1854
2138
  declare namespace Convert_9 {
1855
2139
  export {
1856
- resourceTypeConfig
2140
+ systemConfiguration,
2141
+ predefinedSystemConfiguration
1857
2142
  }
1858
2143
  }
1859
2144
 
@@ -1895,7 +2180,7 @@ declare function createResourceTypeFromConfig(config: IResourceTypeConfig): Resu
1895
2180
  * Simple collectible implementation of {@link Decisions.IDecision | IDecision}.
1896
2181
  * @public
1897
2182
  */
1898
- declare class Decision<TVALUE extends JsonValue = JsonValue> implements IDecision<TVALUE> {
2183
+ export declare class Decision<TVALUE extends JsonValue = JsonValue> implements IDecision<TVALUE> {
1899
2184
  /**
1900
2185
  * The sorted {@link Conditions.ConditionSet | ConditionSets} that make up this decision.
1901
2186
  * @public
@@ -2283,6 +2568,147 @@ declare interface IAbstractDecisionCreateParams {
2283
2568
  index?: number;
2284
2569
  }
2285
2570
 
2571
+ /**
2572
+ * A complete resource bundle that encapsulates built resources, configuration, and metadata.
2573
+ * Bundles provide a portable, integrity-verified way to distribute pre-compiled resource collections.
2574
+ * @public
2575
+ */
2576
+ declare interface IBundle {
2577
+ /**
2578
+ * Metadata about the bundle including build date and integrity checksum.
2579
+ */
2580
+ metadata: IBundleMetadata;
2581
+ /**
2582
+ * The system configuration that was used to build the resources in this bundle.
2583
+ */
2584
+ config: Model.ISystemConfiguration;
2585
+ /**
2586
+ * The compiled resource collection containing all resources, conditions, and decisions.
2587
+ */
2588
+ compiledCollection: Compiled.ICompiledResourceCollection;
2589
+ /**
2590
+ * Optional export metadata for tracking when and how the bundle was exported.
2591
+ */
2592
+ exportMetadata?: IBundleExportMetadata;
2593
+ }
2594
+
2595
+ /**
2596
+ * Components extracted from a bundle for reuse in different contexts.
2597
+ * @public
2598
+ */
2599
+ declare interface IBundleComponents {
2600
+ /**
2601
+ * The system configuration from the bundle.
2602
+ */
2603
+ systemConfiguration: SystemConfiguration;
2604
+ /**
2605
+ * The compiled resource collection from the bundle.
2606
+ */
2607
+ compiledCollection: Compiled.ICompiledResourceCollection;
2608
+ /**
2609
+ * The bundle metadata including build information.
2610
+ */
2611
+ metadata: IBundleMetadata;
2612
+ }
2613
+
2614
+ /**
2615
+ * Optional parameters for bundle creation.
2616
+ * @public
2617
+ */
2618
+ declare interface IBundleCreateParams {
2619
+ /**
2620
+ * Optional version identifier to include in the bundle metadata.
2621
+ */
2622
+ version?: string;
2623
+ /**
2624
+ * Optional description to include in the bundle metadata.
2625
+ */
2626
+ description?: string;
2627
+ /**
2628
+ * Optional custom build date. If not provided, the current date will be used.
2629
+ */
2630
+ dateBuilt?: string;
2631
+ /**
2632
+ * Optional hash normalizer for generating checksums. If not provided,
2633
+ * a CRC32 normalizer will be used for browser compatibility.
2634
+ */
2635
+ hashNormalizer?: Hash.HashingNormalizer;
2636
+ /**
2637
+ * Whether to normalize the ResourceManagerBuilder before bundle creation.
2638
+ * When true, the builder is reconstructed in canonical order to ensure
2639
+ * order-independent checksums. Defaults to false for Phase 1 compatibility.
2640
+ */
2641
+ normalize?: boolean;
2642
+ }
2643
+
2644
+ /**
2645
+ * Optional export metadata for tracking bundle export information.
2646
+ * @public
2647
+ */
2648
+ declare interface IBundleExportMetadata {
2649
+ /**
2650
+ * ISO timestamp indicating when the bundle was exported.
2651
+ */
2652
+ exportedAt: string;
2653
+ /**
2654
+ * Tool or application that exported the bundle.
2655
+ */
2656
+ exportedFrom: string;
2657
+ /**
2658
+ * Type of bundle export (e.g., 'ts-res-bundle', 'ts-res-bundle-filtered').
2659
+ */
2660
+ type: string;
2661
+ /**
2662
+ * Optional filter context if the bundle represents filtered data.
2663
+ */
2664
+ filterContext?: Record<string, unknown>;
2665
+ }
2666
+
2667
+ /**
2668
+ * Parameters for creating a BundleLoader.
2669
+ * @public
2670
+ */
2671
+ declare interface IBundleLoaderCreateParams {
2672
+ /**
2673
+ * The bundle to load.
2674
+ */
2675
+ bundle: IBundle;
2676
+ /**
2677
+ * Whether to skip checksum verification during loading.
2678
+ * Default is false - checksum verification is performed.
2679
+ */
2680
+ skipChecksumVerification?: boolean;
2681
+ /**
2682
+ * Optional hash normalizer for verifying checksums. If not provided,
2683
+ * a CRC32 normalizer will be used for browser compatibility.
2684
+ * Must match the normalizer used during bundle creation.
2685
+ */
2686
+ hashNormalizer?: Hash.HashingNormalizer;
2687
+ }
2688
+
2689
+ /**
2690
+ * Metadata for a resource bundle, including build information and integrity verification.
2691
+ * @public
2692
+ */
2693
+ declare interface IBundleMetadata {
2694
+ /**
2695
+ * ISO timestamp indicating when the bundle was built.
2696
+ */
2697
+ dateBuilt: string;
2698
+ /**
2699
+ * SHA-256 checksum of the serialized compiled resource collection for integrity verification.
2700
+ */
2701
+ checksum: string;
2702
+ /**
2703
+ * Optional version identifier for the bundle.
2704
+ */
2705
+ version?: string;
2706
+ /**
2707
+ * Optional human-readable description of the bundle.
2708
+ */
2709
+ description?: string;
2710
+ }
2711
+
2286
2712
  /**
2287
2713
  * Cache metrics interface for tracking cache performance.
2288
2714
  * @public
@@ -3784,6 +4210,13 @@ declare interface IQualifierType extends ICollectible<QualifierTypeName, Qualifi
3784
4210
  * details otherwise.
3785
4211
  */
3786
4212
  isValidContextValue(value: string): value is QualifierContextValue;
4213
+ /**
4214
+ * Determines if a supplied condition value is a potential match for a possible context value.
4215
+ * @param conditionValue - The condition value.
4216
+ * @param contextValue - The context value.
4217
+ * @returns `true` if the condition value is a potential match for the context value, `false` otherwise.
4218
+ */
4219
+ isPotentialMatch(conditionValue: string, contextValue: string): boolean;
3787
4220
  /**
3788
4221
  * Validates that a value and optional operator are valid for use in a condition
3789
4222
  * for qualifiers of this type.
@@ -4130,10 +4563,10 @@ declare interface IResourceCandidateValidationProperties {
4130
4563
  */
4131
4564
  id: ResourceId;
4132
4565
  /**
4133
- * {@inheritdoc ResourceJson.Json.ILooseResourceCandidateDecl.isPartial}
4566
+ * Describes how complete the candidate value is.
4134
4567
  * @public
4135
4568
  */
4136
- isPartial: boolean;
4569
+ completeness: CandidateCompleteness;
4137
4570
  /**
4138
4571
  * {@inheritdoc ResourceJson.Json.ILooseResourceCandidateDecl.json}
4139
4572
  * @public
@@ -4274,7 +4707,7 @@ declare interface IResourceDeclContainer {
4274
4707
  * implementations without requiring the full ResourceManagerBuilder build mechanics.
4275
4708
  * @public
4276
4709
  */
4277
- declare interface IResourceManager {
4710
+ export declare interface IResourceManager<TR extends IResource = IResource> {
4278
4711
  /**
4279
4712
  * A {@link Conditions.ReadOnlyConditionCollector | ReadOnlyConditionCollector} which
4280
4713
  * contains the {@link Conditions.Condition | conditions} used by resource candidates.
@@ -4295,12 +4728,17 @@ declare interface IResourceManager {
4295
4728
  * @param id - The resource identifier
4296
4729
  * @returns Success with the runtime resource if found, Failure otherwise
4297
4730
  */
4298
- getBuiltResource(id: string): Result<IResource>;
4731
+ getBuiltResource(id: string): Result<TR>;
4732
+ /**
4733
+ * Gets a resource tree built from the resources in this resource manager.
4734
+ * @returns Result containing the resource tree root, or failure if tree construction fails
4735
+ */
4736
+ getBuiltResourceTree(): Result<IReadOnlyResourceTreeRoot<TR>>;
4299
4737
  /**
4300
4738
  * A read-only result map of all built resources, keyed by resource ID.
4301
4739
  * Resources are built on-demand when accessed and returns Results for error handling.
4302
4740
  */
4303
- readonly builtResources: Collections.IReadOnlyValidatingResultMap<ResourceId, IResource>;
4741
+ readonly builtResources: Collections.IReadOnlyValidatingResultMap<ResourceId, TR>;
4304
4742
  /**
4305
4743
  * The number of resources in this resource manager.
4306
4744
  */
@@ -4326,6 +4764,19 @@ declare interface IResourceManagerBuilderCreateParams {
4326
4764
  resourceTypes: ReadOnlyResourceTypeCollector;
4327
4765
  }
4328
4766
 
4767
+ /**
4768
+ * Options for ResourceManagerBuilder clone operations.
4769
+ * Extends IDeclarationOptions to include support for applying edits when cloning.
4770
+ * @public
4771
+ */
4772
+ declare interface IResourceManagerCloneOptions extends IResourceDeclarationOptions {
4773
+ /**
4774
+ * Optional array of loose condition declarations to be applied as edits during the clone operation.
4775
+ * These conditions can modify or extend the resource candidates in the cloned manager.
4776
+ */
4777
+ readonly candidates?: ReadonlyArray<ResourceJson.Json.ILooseResourceCandidateDecl>;
4778
+ }
4779
+
4329
4780
  /**
4330
4781
  * A listener for {@link Runtime.ResourceResolver | ResourceResolver} cache activity.
4331
4782
  * @public
@@ -4349,6 +4800,11 @@ declare interface IResourceResolverCacheListener {
4349
4800
  * @param index - The index of the cache that had an error.
4350
4801
  */
4351
4802
  onCacheError(cache: ResourceResolverCacheType, index: number): void;
4803
+ /**
4804
+ * Called when a context error occurs.
4805
+ * @param error - The error that occurred.
4806
+ */
4807
+ onContextError(qualifier: string, error: string): void;
4352
4808
  /**
4353
4809
  * Called when a cache is cleared.
4354
4810
  * @param cache - The type of cache that was cleared.
@@ -4380,6 +4836,24 @@ declare interface IResourceResolverCreateParams {
4380
4836
  * An optional listener for {@link Runtime.ResourceResolver | ResourceResolver} cache activity.
4381
4837
  */
4382
4838
  listener?: IResourceResolverCacheListener;
4839
+ /**
4840
+ * Optional configuration options for the {@link Runtime.ResourceResolver | ResourceResolver}.
4841
+ */
4842
+ options?: IResourceResolverOptions;
4843
+ }
4844
+
4845
+ /**
4846
+ * Options for configuring a {@link Runtime.ResourceResolver | ResourceResolver}.
4847
+ * @public
4848
+ */
4849
+ declare interface IResourceResolverOptions {
4850
+ /**
4851
+ * Controls whether null values in resource composition should suppress properties
4852
+ * instead of setting them to null. When true, properties with null values from
4853
+ * higher-priority partial candidates will be omitted from the final composed resource.
4854
+ * @defaultValue false
4855
+ */
4856
+ suppressNullAsDelete?: boolean;
4383
4857
  }
4384
4858
 
4385
4859
  /**
@@ -5058,15 +5532,15 @@ declare class JsonResourceType extends ResourceType<JsonObject> {
5058
5532
  /**
5059
5533
  * {@inheritdoc ResourceTypes.ResourceType.(validate:1)}
5060
5534
  */
5061
- validate(json: JsonObject, isPartial: true): Result<JsonObject>;
5535
+ validate(json: JsonObject, completeness: CandidateCompleteness): Result<JsonObject>;
5062
5536
  /**
5063
5537
  * {@inheritdoc ResourceTypes.ResourceType.(validate:2)}
5064
5538
  */
5065
- validate(json: JsonObject, isPartial: false): Result<JsonObject>;
5539
+ validate(json: JsonObject, completeness: 'full'): Result<JsonObject>;
5066
5540
  /**
5067
5541
  * {@inheritdoc ResourceTypes.ResourceType.(validate:3)}
5068
5542
  */
5069
- validate(json: JsonObject, isPartial: boolean): Result<JsonObject>;
5543
+ validate(json: JsonObject, completeness: 'partial'): Result<JsonObject>;
5070
5544
  }
5071
5545
 
5072
5546
  /**
@@ -5139,7 +5613,7 @@ declare class LanguageQualifierType extends QualifierType {
5139
5613
  * @returns A `Converter` for {@link QualifierTypes.Config.ILanguageQualifierTypeConfig | LanguageQualifierTypeConfig} objects.
5140
5614
  * @public
5141
5615
  */
5142
- declare const languageQualifierTypeConfig: ObjectConverter<Model_3.ILanguageQualifierTypeConfig, unknown>;
5616
+ declare const languageQualifierTypeConfig: ObjectConverter<Model_2.ILanguageQualifierTypeConfig, unknown>;
5143
5617
 
5144
5618
  /**
5145
5619
  * A {@link QualifierTypes.QualifierType | qualifier} that matches a literal value,
@@ -5178,6 +5652,10 @@ declare class LiteralQualifierType extends QualifierType {
5178
5652
  * @returns `true` if the value is a valid condition value, `false` otherwise.
5179
5653
  */
5180
5654
  isValidConditionValue(value: string): value is QualifierConditionValue;
5655
+ /**
5656
+ * {@inheritdoc QualifierTypes.IQualifierType.isPotentialMatch}
5657
+ */
5658
+ isPotentialMatch(conditionValue: string, contextValue: string): boolean;
5181
5659
  /**
5182
5660
  * {@inheritdoc QualifierTypes.QualifierType._matchOne}
5183
5661
  */
@@ -5223,7 +5701,7 @@ declare class LiteralQualifierType extends QualifierType {
5223
5701
  * @returns A `Converter` for {@link QualifierTypes.Config.ILiteralQualifierTypeConfig | LiteralQualifierTypeConfig} objects.
5224
5702
  * @public
5225
5703
  */
5226
- declare const literalQualifierTypeConfig: ObjectConverter<Model_3.ILiteralQualifierTypeConfig, unknown>;
5704
+ declare const literalQualifierTypeConfig: ObjectConverter<Model_2.ILiteralQualifierTypeConfig, unknown>;
5227
5705
 
5228
5706
  /**
5229
5707
  * A class that implements a hierarchy of literal values. The hierarchy is defined as a
@@ -5277,6 +5755,13 @@ declare class LiteralValueHierarchy<T extends string = string> {
5277
5755
  * to root, or `Failure` if the value is not in the hierarchy.
5278
5756
  */
5279
5757
  getAncestors(value: T): Result<T[]>;
5758
+ /**
5759
+ * Determines if a value is an ancestor of a possible ancestor value.
5760
+ * @param value - The value to check.
5761
+ * @param possibleAncestor - The possible ancestor value.
5762
+ * @returns `true` if the value is an ancestor of the possible ancestor, `false` otherwise.
5763
+ */
5764
+ isAncestor(value: T, possibleAncestor: T): boolean;
5280
5765
  /**
5281
5766
  * Gets all descendants of a value in the hierarchy.
5282
5767
  * @param value - The value to get descendants for.
@@ -5469,6 +5954,25 @@ declare function mergeLooseResource(resource: Normalized.IImporterResourceDecl,
5469
5954
  export declare const MinConditionPriority: ConditionPriority;
5470
5955
 
5471
5956
  declare namespace Model {
5957
+ export {
5958
+ ISystemConfiguration
5959
+ }
5960
+ }
5961
+
5962
+ declare namespace Model_2 {
5963
+ export {
5964
+ IQualifierTypeConfig,
5965
+ ILanguageQualifierTypeConfig,
5966
+ ITerritoryQualifierTypeConfig,
5967
+ ILiteralQualifierTypeConfig,
5968
+ ISystemLanguageQualifierTypeConfig,
5969
+ ISystemTerritoryQualifierTypeConfig,
5970
+ ISystemLiteralQualifierTypeConfig,
5971
+ ISystemQualifierTypeConfig
5972
+ }
5973
+ }
5974
+
5975
+ declare namespace Model_3 {
5472
5976
  export {
5473
5977
  ICompiledConditionMetadata,
5474
5978
  ICompiledConditionSetMetadata,
@@ -5485,22 +5989,12 @@ declare namespace Model {
5485
5989
  }
5486
5990
  }
5487
5991
 
5488
- declare namespace Model_2 {
5489
- export {
5490
- ISystemConfiguration
5491
- }
5492
- }
5493
-
5494
- declare namespace Model_3 {
5992
+ declare namespace Model_4 {
5495
5993
  export {
5496
- IQualifierTypeConfig,
5497
- ILanguageQualifierTypeConfig,
5498
- ITerritoryQualifierTypeConfig,
5499
- ILiteralQualifierTypeConfig,
5500
- ISystemLanguageQualifierTypeConfig,
5501
- ISystemTerritoryQualifierTypeConfig,
5502
- ISystemLiteralQualifierTypeConfig,
5503
- ISystemQualifierTypeConfig
5994
+ IBundleMetadata,
5995
+ IBundleExportMetadata,
5996
+ IBundle,
5997
+ IBundleCreateParams
5504
5998
  }
5505
5999
  }
5506
6000
 
@@ -5527,6 +6021,10 @@ declare class NoOpResourceResolverCacheListener implements IResourceResolverCach
5527
6021
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheError}
5528
6022
  */
5529
6023
  onCacheError(cache: ResourceResolverCacheType, index: number): void;
6024
+ /**
6025
+ * {@inheritDoc Runtime.IResourceResolverCacheListener.onContextError}
6026
+ */
6027
+ onContextError(qualifier: string, error: string): void;
5530
6028
  /**
5531
6029
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheClear}
5532
6030
  */
@@ -5674,7 +6172,7 @@ declare const predefinedSystemConfiguration: Converter<PredefinedSystemConfigura
5674
6172
  * which a resource is used.
5675
6173
  * @public
5676
6174
  */
5677
- declare class Qualifier implements IValidatedQualifierDecl, ICollectible<QualifierName, QualifierIndex> {
6175
+ export declare class Qualifier implements IValidatedQualifierDecl, ICollectible<QualifierName, QualifierIndex> {
5678
6176
  /**
5679
6177
  * The name of the qualifier.
5680
6178
  */
@@ -6013,7 +6511,7 @@ declare const qualifierName: Converter<QualifierName, unknown>;
6013
6511
 
6014
6512
  declare namespace Qualifiers {
6015
6513
  export {
6016
- Convert_8 as Convert,
6514
+ Convert_4 as Convert,
6017
6515
  Qualifier,
6018
6516
  IQualifierDecl,
6019
6517
  IValidatedQualifierDecl,
@@ -6034,7 +6532,7 @@ export { Qualifiers }
6034
6532
  * the {@link QualifierTypes.IQualifierType | IQualifierType} interface.
6035
6533
  * @public
6036
6534
  */
6037
- declare abstract class QualifierType implements IQualifierType {
6535
+ export declare abstract class QualifierType implements IQualifierType {
6038
6536
  /**
6039
6537
  * {@inheritdoc QualifierTypes.IQualifierType.name}
6040
6538
  */
@@ -6068,6 +6566,10 @@ declare abstract class QualifierType implements IQualifierType {
6068
6566
  * {@inheritdoc QualifierTypes.IQualifierType.isValidContextValue}
6069
6567
  */
6070
6568
  isValidContextValue(value: string): value is QualifierContextValue;
6569
+ /**
6570
+ * {@inheritdoc QualifierTypes.IQualifierType.isPotentialMatch}
6571
+ */
6572
+ isPotentialMatch(conditionValue: string, contextValue: string): boolean;
6071
6573
  /**
6072
6574
  * {@inheritdoc QualifierTypes.IQualifierType.validateCondition}
6073
6575
  */
@@ -6186,7 +6688,7 @@ declare const qualifierTypeName: Converter<QualifierTypeName, unknown>;
6186
6688
  declare namespace QualifierTypes {
6187
6689
  export {
6188
6690
  Config_2 as Config,
6189
- Convert_7 as Convert,
6691
+ Convert_3 as Convert,
6190
6692
  IQualifierType,
6191
6693
  IQualifierTypeCreateParams,
6192
6694
  QualifierType,
@@ -6383,7 +6885,7 @@ declare namespace RegularExpressions {
6383
6885
  * candidate instances.
6384
6886
  * @public
6385
6887
  */
6386
- declare class Resource implements IResource {
6888
+ export declare class Resource implements IResource {
6387
6889
  /**
6388
6890
  * The unique {@link ResourceId | id} of the resource.
6389
6891
  */
@@ -6599,7 +7101,7 @@ declare type ResourceBuilderResultDetail = Collections.ResultMapResultDetail | '
6599
7101
  * and instructions on how to merge it with other instances.
6600
7102
  * @public
6601
7103
  */
6602
- declare class ResourceCandidate implements IResourceCandidate {
7104
+ export declare class ResourceCandidate implements IResourceCandidate {
6603
7105
  /**
6604
7106
  * The unique identifier of the resource for which this candidate
6605
7107
  * is a possible instance.
@@ -6626,6 +7128,10 @@ declare class ResourceCandidate implements IResourceCandidate {
6626
7128
  * this candidate belongs.
6627
7129
  */
6628
7130
  readonly resourceType: ResourceType | undefined;
7131
+ /**
7132
+ * The completeness of the candidate value.
7133
+ */
7134
+ get completeness(): CandidateCompleteness;
6629
7135
  /**
6630
7136
  * Constructor for a {@link Resources.ResourceCandidate | ResourceCandidate} object.
6631
7137
  * @param params - Parameters to create a new {@link Resources.ResourceCandidate | ResourceCandidate}.
@@ -6826,7 +7332,7 @@ declare const resourceIndex: Converter<ResourceIndex, unknown>;
6826
7332
  declare namespace ResourceJson {
6827
7333
  export {
6828
7334
  Compiled,
6829
- Convert_4 as Convert,
7335
+ Convert_8 as Convert,
6830
7336
  Helpers_2 as Helpers,
6831
7337
  Json,
6832
7338
  Normalized,
@@ -6844,7 +7350,7 @@ export { ResourceJson }
6844
7350
  * and builds a collection of {@link Resources.Resource | resources} once all candidates are collected.
6845
7351
  * @public
6846
7352
  */
6847
- declare class ResourceManagerBuilder implements IResourceManager {
7353
+ export declare class ResourceManagerBuilder implements IResourceManager<Resource> {
6848
7354
  readonly qualifiers: IReadOnlyQualifierCollector;
6849
7355
  readonly resourceTypes: ReadOnlyResourceTypeCollector;
6850
7356
  protected readonly _conditions: ConditionCollector;
@@ -6853,6 +7359,7 @@ declare class ResourceManagerBuilder implements IResourceManager {
6853
7359
  protected readonly _resources: ValidatingResultMap<ResourceId, ResourceBuilder>;
6854
7360
  readonly _builtResources: ValidatingResultMap<ResourceId, Resource>;
6855
7361
  protected _built: boolean;
7362
+ protected _cachedResourceTree?: ResourceTree.IReadOnlyResourceTreeRoot<Resource>;
6856
7363
  /**
6857
7364
  * A {@link Conditions.ConditionCollector | ConditionCollector} which
6858
7365
  * contains the {@link Conditions.Condition | conditions} used so far by
@@ -6909,6 +7416,26 @@ declare class ResourceManagerBuilder implements IResourceManager {
6909
7416
  * @public
6910
7417
  */
6911
7418
  static create(params: IResourceManagerBuilderCreateParams): Result<ResourceManagerBuilder>;
7419
+ /**
7420
+ * Creates a new {@link Resources.ResourceManagerBuilder | ResourceManagerBuilder} object from a predefined system configuration.
7421
+ * @param name - The name of the predefined system configuration to use.
7422
+ * @param qualifierDefaultValues - Optional default values for qualifiers.
7423
+ * @returns `Success` with the new {@link Resources.ResourceManagerBuilder | ResourceManagerBuilder} object if successful,
7424
+ * or `Failure` with an error message if not.
7425
+ * @public
7426
+ */
7427
+ static createPredefined(name: Config.PredefinedSystemConfiguration, qualifierDefaultValues?: Config.ISystemConfigurationInitParams['qualifierDefaultValues']): Result<ResourceManagerBuilder>;
7428
+ /**
7429
+ * Creates a new {@link Resources.ResourceManagerBuilder | ResourceManagerBuilder} from a
7430
+ * {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.
7431
+ * This method reconstructs an exactly equivalent builder where all qualifier, condition,
7432
+ * condition set, and decision indices match the original compiled collection.
7433
+ * @param compiledCollection - The compiled resource collection to reconstruct from.
7434
+ * @param systemConfig - The system configuration containing qualifiers and resource types.
7435
+ * @returns `Success` with the new manager if successful, or `Failure` with an error message if not.
7436
+ * @public
7437
+ */
7438
+ static createFromCompiledResourceCollection(compiledCollection: ResourceJson.Compiled.ICompiledResourceCollection, systemConfig: Config.SystemConfiguration): Result<ResourceManagerBuilder>;
6912
7439
  /**
6913
7440
  * Given a {@link ResourceJson.Json.ILooseResourceCandidateDecl | resource candidate declaration}, builds and adds
6914
7441
  * a {@link Resources.ResourceCandidate | candidate} to the manager.
@@ -6918,6 +7445,20 @@ declare class ResourceManagerBuilder implements IResourceManager {
6918
7445
  */
6919
7446
  addLooseCandidate(decl: ResourceJson.Json.ILooseResourceCandidateDecl): DetailedResult<ResourceCandidate, ResourceBuilderResultDetail>;
6920
7447
  addResource(decl: ResourceJson.Json.ILooseResourceDecl): DetailedResult<ResourceBuilder, ResourceBuilderResultDetail>;
7448
+ /**
7449
+ * Adds a condition to the manager.
7450
+ * @param decl - The condition declaration to add.
7451
+ * @returns `Success` with the condition if successful, or `Failure` with an error message if not.
7452
+ * @public
7453
+ */
7454
+ addCondition(decl: ResourceJson.Json.ILooseConditionDecl): Result<Condition>;
7455
+ /**
7456
+ * Adds a condition set to the manager.
7457
+ * @param decl - The condition set declaration to add.
7458
+ * @returns `Success` with the condition set if successful, or `Failure` with an error message if not.
7459
+ * @public
7460
+ */
7461
+ addConditionSet(conditions: ResourceJson.Normalized.ConditionSetDecl): Result<ConditionSet>;
6921
7462
  /**
6922
7463
  * Gets a read-only array of all {@link Resources.ResourceBuilder | resource builders} present in the manager.
6923
7464
  * @returns `Success` with the {@link Resources.ResourceBuilder | resource builder} if successful,
@@ -6948,6 +7489,19 @@ declare class ResourceManagerBuilder implements IResourceManager {
6948
7489
  * @public
6949
7490
  */
6950
7491
  getAllBuiltResources(): Result<ReadonlyArray<Resource>>;
7492
+ /**
7493
+ * Builds and returns a hierarchical tree representation of all resources managed by this builder.
7494
+ * Resources are organized based on their dot-separated resource IDs (e.g., "app.messages.welcome"
7495
+ * becomes a tree with "app" as root, "messages" as branch, and "welcome" as leaf).
7496
+ *
7497
+ * String-based validation is available through the `children.validating` property,
7498
+ * allowing callers to use `tree.children.validating.getById(stringId)` for validated access.
7499
+ *
7500
+ * Uses lazy initialization with caching for performance.
7501
+ * @returns Result containing the resource tree root, or failure if tree construction fails
7502
+ * @public
7503
+ */
7504
+ getBuiltResourceTree(): Result<ResourceTree.IReadOnlyResourceTreeRoot<Resource>>;
6951
7505
  /**
6952
7506
  * Gets a read-only array of all {@link Resources.Resource | built resources} in the manager.
6953
7507
  * @returns `Success` with an array of resources if successful, or `Failure` with an error message if not.
@@ -7024,11 +7578,89 @@ declare class ResourceManagerBuilder implements IResourceManager {
7024
7578
  * Creates a filtered clone of this ResourceManagerBuilder using the specified context.
7025
7579
  * This is a convenience method that creates a new ResourceManagerBuilder with the same
7026
7580
  * configuration but filtered to include only candidates that match the provided context.
7027
- * @param options - Options for the cloning operation, including the strongly-typed filterForContext property.
7581
+ * If candidates are provided for editing, they will be applied with collision detection.
7582
+ * @param options - Options for the cloning operation, including the strongly-typed filterForContext property and optional candidates for edits.
7028
7583
  * @returns A Result containing the new filtered ResourceManagerBuilder.
7029
7584
  * @public
7030
7585
  */
7031
- clone(options?: IResourceDeclarationOptions): Result<ResourceManagerBuilder>;
7586
+ clone(options?: IResourceManagerCloneOptions): Result<ResourceManagerBuilder>;
7587
+ /**
7588
+ * Creates a resource ID keyed map from an array of loose resource candidate declarations.
7589
+ * This enables efficient detection of edit collisions by grouping candidates by their target resource.
7590
+ * @param candidates - Array of loose resource candidate declarations to organize
7591
+ * @returns A Result containing a Map where keys are validated ResourceIds and values are arrays of candidates for that resource
7592
+ * @internal
7593
+ */
7594
+ private static _createCandidatesByResourceMap;
7595
+ /**
7596
+ * Generates a proper ConditionSet token for collision detection using the existing ConditionSet.getKeyForDecl method.
7597
+ * @param conditionSet - The condition set to generate a token for
7598
+ * @param conditionCollector - The condition collector needed for validation context
7599
+ * @returns A Result containing the ConditionSet token if successful, or failure if validation fails
7600
+ * @internal
7601
+ */
7602
+ /**
7603
+ * Applies candidate edits to a resource declaration, handling collisions using condition set tokens.
7604
+ * If there's no collision, adds the candidate. If there's a collision, replaces the original candidate with the edit.
7605
+ * @param resourceDecl - The original resource declaration to potentially modify
7606
+ * @param candidatesByResource - Map of resource IDs to arrays of candidate edits
7607
+ * @param conditionCollector - The condition collector needed for generating condition tokens
7608
+ * @returns A Result containing the resource declaration to use (original or modified)
7609
+ * @internal
7610
+ */
7611
+ private static _applyEditsToResourceDeclaration;
7612
+ /**
7613
+ * Creates a new resource declaration from an array of candidate declarations.
7614
+ * This is used when cloning to create new resources that don't exist in the original manager.
7615
+ * @param resourceId - The validated resource ID for the new resource
7616
+ * @param candidates - Array of loose candidate declarations for the new resource
7617
+ * @param conditionCollector - The condition collector for validation context
7618
+ * @returns A Result containing the new resource declaration if successful, or failure if validation fails
7619
+ * @internal
7620
+ */
7621
+ private static _createResourceDeclFromCandidates;
7622
+ /**
7623
+ * Reconstructs conditions from a compiled collection and adds them to the builder.
7624
+ * @param builder - The builder to add conditions to.
7625
+ * @param compiledCollection - The compiled collection containing conditions.
7626
+ * @returns `Success` if all conditions were added successfully, `Failure` otherwise.
7627
+ * @internal
7628
+ */
7629
+ private static _reconstructConditions;
7630
+ /**
7631
+ * Reconstructs condition sets from a compiled collection and adds them to the builder.
7632
+ * @param builder - The builder to add condition sets to.
7633
+ * @param compiledCollection - The compiled collection containing condition sets.
7634
+ * @returns `Success` if all condition sets were added successfully, `Failure` otherwise.
7635
+ * @internal
7636
+ */
7637
+ private static _reconstructConditionSets;
7638
+ /**
7639
+ * Reconstructs decisions from a compiled collection and adds them to the builder.
7640
+ * @param builder - The builder to add decisions to.
7641
+ * @param compiledCollection - The compiled collection containing decisions.
7642
+ * @returns `Success` if all decisions were added successfully, `Failure` otherwise.
7643
+ * @internal
7644
+ */
7645
+ private static _reconstructDecisions;
7646
+ /**
7647
+ * Reconstructs resources and their candidates from a compiled collection and adds them to the builder.
7648
+ * @param builder - The builder to add resources to.
7649
+ * @param compiledCollection - The compiled collection containing resources.
7650
+ * @returns `Success` if all resources were added successfully, `Failure` otherwise.
7651
+ * @internal
7652
+ */
7653
+ private static _reconstructResources;
7654
+ /**
7655
+ * Helper method to create candidates from a decision's condition sets.
7656
+ * @param compiledResource - The compiled resource containing candidates.
7657
+ * @param decision - The decision containing condition sets.
7658
+ * @param resourceType - The resource type for the candidates.
7659
+ * @param builder - The builder to add candidates to.
7660
+ * @returns `Success` if all candidates were added successfully, `Failure` otherwise.
7661
+ * @internal
7662
+ */
7663
+ private static _createCandidatesFromDecision;
7032
7664
  }
7033
7665
 
7034
7666
  /**
@@ -7055,7 +7687,7 @@ declare const resourceName: Converter<ResourceName, unknown>;
7055
7687
  * and caching results for optimal performance.
7056
7688
  * @public
7057
7689
  */
7058
- declare class ResourceResolver {
7690
+ export declare class ResourceResolver {
7059
7691
  /**
7060
7692
  * The resource manager that defines available resources and provides condition access.
7061
7693
  */
@@ -7068,6 +7700,10 @@ declare class ResourceResolver {
7068
7700
  * The context qualifier provider that resolves qualifier values.
7069
7701
  */
7070
7702
  readonly contextQualifierProvider: IContextQualifierProvider;
7703
+ /**
7704
+ * The configuration options for this resource resolver.
7705
+ */
7706
+ readonly options: IResourceResolverOptions;
7071
7707
  /**
7072
7708
  * The cache array for resolved conditions, indexed by condition index for O(1) lookup.
7073
7709
  * Each entry stores the resolved {@link Runtime.IConditionMatchResult | condition match result} for
@@ -7211,6 +7847,8 @@ declare type ResourceResolverCacheActivity = 'hit' | 'miss' | 'error' | 'clear';
7211
7847
  */
7212
7848
  declare class ResourceResolverCacheMetricsListener<TM extends ICacheMetrics> implements IResourceResolverCacheListener {
7213
7849
  private readonly _metrics;
7850
+ private _contextErrors;
7851
+ get numContextErrors(): number;
7214
7852
  constructor(factory: () => TM);
7215
7853
  constructor(metrics: OverallCacheMetrics<TM>);
7216
7854
  /**
@@ -7230,6 +7868,10 @@ declare class ResourceResolverCacheMetricsListener<TM extends ICacheMetrics> imp
7230
7868
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheError}
7231
7869
  */
7232
7870
  onCacheError(cache: ResourceResolverCacheType, index: number): void;
7871
+ /**
7872
+ * {@inheritDoc Runtime.IResourceResolverCacheListener.onContextError}
7873
+ */
7874
+ onContextError(qualifier: string, error: string): void;
7233
7875
  /**
7234
7876
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheClear}
7235
7877
  */
@@ -7264,7 +7906,8 @@ declare namespace Resources {
7264
7906
  ResourceManagerBuilderResultDetail,
7265
7907
  ResourceManagerBuilder,
7266
7908
  IResourceDeclarationOptions,
7267
- ICompiledResourceOptionsWithFilter
7909
+ ICompiledResourceOptionsWithFilter,
7910
+ IResourceManagerCloneOptions
7268
7911
  }
7269
7912
  }
7270
7913
  export { Resources }
@@ -7412,7 +8055,7 @@ declare const resourceTreeRootDecl: Converter<Normalized.IResourceTreeRootDecl>;
7412
8055
  * resource value.
7413
8056
  * @public
7414
8057
  */
7415
- declare abstract class ResourceType<T = unknown> implements ICollectible<ResourceTypeName, ResourceTypeIndex> {
8058
+ export declare abstract class ResourceType<T = unknown> implements ICollectible<ResourceTypeName, ResourceTypeIndex> {
7416
8059
  private _collectible;
7417
8060
  /**
7418
8061
  * The key for this resource type.
@@ -7435,30 +8078,39 @@ declare abstract class ResourceType<T = unknown> implements ICollectible<Resourc
7435
8078
  /**
7436
8079
  * Validates a JSON value for use as a partial resource instance value.
7437
8080
  * @param json - The JSON value to validate.
7438
- * @param isPartial - `true` indicates that the value is expected to be partial.
8081
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
7439
8082
  * @returns `Success` with the strongly-typed partial resource value if the JSON is valid,
7440
8083
  * `Failure` with an error message otherwise.
7441
8084
  * @public
7442
8085
  */
7443
- abstract validate(json: JsonValue, isPartial: true): Result<Partial<T>>;
8086
+ abstract validate(json: JsonValue, completeness: CandidateCompleteness): Result<Partial<T>>;
7444
8087
  /**
7445
8088
  * Validates a JSON value for use as a complete resource instance value.
7446
8089
  * @param json - The JSON value to validate.
7447
- * @param isPartial - `false` indicates that the value is expected to be complete.
8090
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
7448
8091
  * @returns `Success` with the strongly-typed resource value if the JSON is valid,
7449
8092
  * `Failure` with an error message otherwise.
7450
8093
  * @public
7451
8094
  */
7452
- abstract validate(json: JsonValue, isPartial: false): Result<T>;
8095
+ abstract validate(json: JsonValue, completeness: 'full'): Result<T>;
8096
+ /**
8097
+ * Validates a JSON value for use as a partial resource instance value.
8098
+ * @param json - The JSON value to validate.
8099
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
8100
+ * @returns `Success` with the strongly-typed partial resource value if the JSON is valid,
8101
+ * `Failure` with an error message otherwise.
8102
+ * @public
8103
+ */
8104
+ abstract validate(json: JsonValue, completeness: 'partial'): Result<Partial<T>>;
7453
8105
  /**
7454
8106
  * Validates a JSON value for use as a full or partial resource instance value.
7455
8107
  * @param json - The JSON value to validate.
7456
- * @param isPartial - Indicates whether the value is expected to be partial.
8108
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
7457
8109
  * @returns `Success` with the strongly-typed full or partial resource value if
7458
8110
  * the JSON is valid, `Failure` with an error message otherwise.
7459
8111
  * @public
7460
8112
  */
7461
- abstract validate(json: JsonValue, isPartial?: boolean): Result<T | Partial<T>>;
8113
+ abstract validate(json: JsonValue, completeness?: CandidateCompleteness): Result<T | Partial<T>>;
7462
8114
  /**
7463
8115
  * Sets the index for this resource type. Once set, the index cannot be changed.
7464
8116
  */
@@ -7556,6 +8208,7 @@ declare namespace Runtime {
7556
8208
  IValidatingSimpleContextQualifierProviderCreateParams,
7557
8209
  ValidatingSimpleContextQualifierProvider,
7558
8210
  DecisionResolutionResult,
8211
+ IResourceResolverOptions,
7559
8212
  IResourceResolverCreateParams,
7560
8213
  ResourceResolver,
7561
8214
  ConditionMatchType,
@@ -7747,28 +8400,28 @@ declare const systemConfiguration: ObjectConverter<ISystemConfiguration, unknown
7747
8400
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemLanguageQualifierTypeConfig | SystemLanguageQualifierTypeConfig} objects.
7748
8401
  * @public
7749
8402
  */
7750
- declare const systemLanguageQualifierTypeConfig: ObjectConverter<Model_3.ISystemLanguageQualifierTypeConfig, unknown>;
8403
+ declare const systemLanguageQualifierTypeConfig: ObjectConverter<Model_2.ISystemLanguageQualifierTypeConfig, unknown>;
7751
8404
 
7752
8405
  /**
7753
8406
  * A `Converter` for {@link QualifierTypes.Config.ISystemLiteralQualifierTypeConfig | SystemLiteralQualifierTypeConfig} objects.
7754
8407
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemLiteralQualifierTypeConfig | SystemLiteralQualifierTypeConfig} objects.
7755
8408
  * @public
7756
8409
  */
7757
- declare const systemLiteralQualifierTypeConfig: ObjectConverter<Model_3.ISystemLiteralQualifierTypeConfig, unknown>;
8410
+ declare const systemLiteralQualifierTypeConfig: ObjectConverter<Model_2.ISystemLiteralQualifierTypeConfig, unknown>;
7758
8411
 
7759
8412
  /**
7760
8413
  * A `Converter` for {@link QualifierTypes.Config.ISystemQualifierTypeConfig | SystemQualifierTypeConfig} objects.
7761
8414
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemQualifierTypeConfig | SystemQualifierTypeConfig} objects.
7762
8415
  * @public
7763
8416
  */
7764
- declare const systemQualifierTypeConfig: Converter<Model_3.ISystemQualifierTypeConfig, unknown>;
8417
+ declare const systemQualifierTypeConfig: Converter<Model_2.ISystemQualifierTypeConfig, unknown>;
7765
8418
 
7766
8419
  /**
7767
8420
  * A `Converter` for {@link QualifierTypes.Config.ISystemTerritoryQualifierTypeConfig | SystemTerritoryQualifierTypeConfig} objects.
7768
8421
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemTerritoryQualifierTypeConfig | SystemTerritoryQualifierTypeConfig} objects.
7769
8422
  * @public
7770
8423
  */
7771
- declare const systemTerritoryQualifierTypeConfig: ObjectConverter<Model_3.ISystemTerritoryQualifierTypeConfig, unknown>;
8424
+ declare const systemTerritoryQualifierTypeConfig: ObjectConverter<Model_2.ISystemTerritoryQualifierTypeConfig, unknown>;
7772
8425
 
7773
8426
  /**
7774
8427
  * @internal
@@ -7871,7 +8524,7 @@ declare class TerritoryQualifierType extends QualifierType {
7871
8524
  * @returns A `Converter` for {@link QualifierTypes.Config.ITerritoryQualifierTypeConfig | TerritoryQualifierTypeConfig} objects.
7872
8525
  * @public
7873
8526
  */
7874
- declare const territoryQualifierTypeConfig: ObjectConverter<Model_3.ITerritoryQualifierTypeConfig, unknown>;
8527
+ declare const territoryQualifierTypeConfig: ObjectConverter<Model_2.ITerritoryQualifierTypeConfig, unknown>;
7875
8528
 
7876
8529
  /**
7877
8530
  * Converts a number to a {@link ConditionIndex} if it is a valid condition index.