@badger_badger/badger_hq 1.7.0 → 1.8.0

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.
@@ -883,6 +883,20 @@ var discoveredBySchema = new mongoose.Schema(
883
883
  },
884
884
  EMBEDDED
885
885
  );
886
+ var sourceDiscoverySchema = new mongoose.Schema(
887
+ {
888
+ taskId: { type: ObjectId, required: true },
889
+ captureId: { type: ObjectId },
890
+ capturedUrl: { type: String },
891
+ name: { type: String, required: true, maxlength: 200 },
892
+ description: { type: String, maxlength: 1e3 },
893
+ // Not `required`: Mongoose rejects '' for required strings, and the judge may return an empty reason.
894
+ reason: { type: String, maxlength: 300, default: "" },
895
+ relevanceScore: { type: Number, required: true, min: 0, max: 1 },
896
+ discoveredAt: { type: Date, required: true }
897
+ },
898
+ EMBEDDED
899
+ );
886
900
  var sourceImportSummarySchema = new mongoose.Schema(
887
901
  {
888
902
  toCreate: { type: Number, required: true, default: 0, min: 0 },
@@ -1133,6 +1147,7 @@ var sourceSchema = new mongoose.Schema(
1133
1147
  tags: { type: [String], required: true, default: [] },
1134
1148
  status: { type: String, enum: SOURCE_STATUS_VALUES, required: true, default: "active" },
1135
1149
  discoveredBy: { type: discoveredBySchema, required: true },
1150
+ discovery: { type: sourceDiscoverySchema },
1136
1151
  lastCollectedAt: { type: Date },
1137
1152
  nextVisitAt: { type: Date },
1138
1153
  visitIntervalMs: { type: Number, min: 1 },
@@ -1508,6 +1523,7 @@ exports.scoutProfileSchema = scoutProfileSchema;
1508
1523
  exports.scoutRatingSchema = scoutRatingSchema;
1509
1524
  exports.scraperMetricSchema = scraperMetricSchema;
1510
1525
  exports.scraperSchema = scraperSchema;
1526
+ exports.sourceDiscoverySchema = sourceDiscoverySchema;
1511
1527
  exports.sourceImportRowErrorSchema = sourceImportRowErrorSchema;
1512
1528
  exports.sourceImportSchema = sourceImportSchema;
1513
1529
  exports.sourceImportSummarySchema = sourceImportSummarySchema;