@declaro/data 2.0.0-beta.115 → 2.0.0-beta.116

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.
@@ -12661,31 +12661,16 @@ class BaseModelService {
12661
12661
  }
12662
12662
  return input[this.entityMetadata.primaryKey];
12663
12663
  }
12664
+ getSchema() {
12665
+ return this.schema;
12666
+ }
12664
12667
  }
12665
12668
  // src/domain/services/read-only-model-service.ts
12666
12669
  class ReadOnlyModelService extends BaseModelService {
12667
12670
  async normalizeDetail(detail) {
12668
- const detailModel = this.schema.definition.detail;
12669
- if (detailModel) {
12670
- const validation = await detailModel.validate(detail, { strict: false });
12671
- if (validation.issues) {
12672
- console.warn(`${detailModel.labels.singularLabel} shape did not match the expected schema`, validation);
12673
- } else {
12674
- return validation.value;
12675
- }
12676
- }
12677
12671
  return detail;
12678
12672
  }
12679
12673
  async normalizeSummary(summary) {
12680
- const summaryModel = this.schema.definition.summary;
12681
- if (summaryModel) {
12682
- const validation = await summaryModel.validate(summary, { strict: false });
12683
- if (validation.issues) {
12684
- console.warn(`${summaryModel.labels.singularLabel} shape did not match the expected schema`);
12685
- } else {
12686
- return validation.value;
12687
- }
12688
- }
12689
12674
  return summary;
12690
12675
  }
12691
12676
  async load(lookup, options) {
@@ -13117,5 +13102,5 @@ class MockMemoryRepository {
13117
13102
  }
13118
13103
  }
13119
13104
 
13120
- //# debugId=02E485F6A311A3CD64756E2164756E21
13105
+ //# debugId=C034DAEABB73EDD864756E2164756E21
13121
13106
  //# sourceMappingURL=index.cjs.map