@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.
@@ -12622,31 +12622,16 @@ class BaseModelService {
12622
12622
  }
12623
12623
  return input[this.entityMetadata.primaryKey];
12624
12624
  }
12625
+ getSchema() {
12626
+ return this.schema;
12627
+ }
12625
12628
  }
12626
12629
  // src/domain/services/read-only-model-service.ts
12627
12630
  class ReadOnlyModelService extends BaseModelService {
12628
12631
  async normalizeDetail(detail) {
12629
- const detailModel = this.schema.definition.detail;
12630
- if (detailModel) {
12631
- const validation = await detailModel.validate(detail, { strict: false });
12632
- if (validation.issues) {
12633
- console.warn(`${detailModel.labels.singularLabel} shape did not match the expected schema`, validation);
12634
- } else {
12635
- return validation.value;
12636
- }
12637
- }
12638
12632
  return detail;
12639
12633
  }
12640
12634
  async normalizeSummary(summary) {
12641
- const summaryModel = this.schema.definition.summary;
12642
- if (summaryModel) {
12643
- const validation = await summaryModel.validate(summary, { strict: false });
12644
- if (validation.issues) {
12645
- console.warn(`${summaryModel.labels.singularLabel} shape did not match the expected schema`);
12646
- } else {
12647
- return validation.value;
12648
- }
12649
- }
12650
12635
  return summary;
12651
12636
  }
12652
12637
  async load(lookup, options) {
@@ -13096,5 +13081,5 @@ export {
13096
13081
  BaseModelService
13097
13082
  };
13098
13083
 
13099
- //# debugId=71BB4C5702006B2764756E2164756E21
13084
+ //# debugId=C40E3C9988109C9B64756E2164756E21
13100
13085
  //# sourceMappingURL=index.js.map