@badger_badger/badger_hq 1.6.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.
- package/CHANGELOG.md +28 -0
- package/dist/{agent-session-oZI9RyQ_.d.cts → agent-session-C7C0Z1e1.d.cts} +145 -14
- package/dist/{agent-session-oZI9RyQ_.d.ts → agent-session-C7C0Z1e1.d.ts} +145 -14
- package/dist/index.cjs +99 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +301 -28
- package/dist/index.d.ts +301 -28
- package/dist/index.js +87 -4
- package/dist/index.js.map +1 -1
- package/dist/mongo/index.cjs +19 -0
- package/dist/mongo/index.cjs.map +1 -1
- package/dist/mongo/index.d.cts +243 -17
- package/dist/mongo/index.d.ts +243 -17
- package/dist/mongo/index.js +19 -1
- package/dist/mongo/index.js.map +1 -1
- package/package.json +1 -1
package/dist/mongo/index.cjs
CHANGED
|
@@ -247,6 +247,8 @@ var INDEXES = {
|
|
|
247
247
|
options: { unique: true, partialFilterExpression: NOT_SOFT_DELETED_FILTER }
|
|
248
248
|
},
|
|
249
249
|
{ key: { orgId: 1, route: 1, status: 1 } },
|
|
250
|
+
// Multikey: the sources attached to a Monitor task (cap counts, agents' version polls).
|
|
251
|
+
{ key: { orgId: 1, taskIds: 1 } },
|
|
250
252
|
// Partition key of the shared database; drives the future split into physical databases.
|
|
251
253
|
{ key: { orgId: 1, databaseId: 1 } }
|
|
252
254
|
],
|
|
@@ -881,6 +883,20 @@ var discoveredBySchema = new mongoose.Schema(
|
|
|
881
883
|
},
|
|
882
884
|
EMBEDDED
|
|
883
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
|
+
);
|
|
884
900
|
var sourceImportSummarySchema = new mongoose.Schema(
|
|
885
901
|
{
|
|
886
902
|
toCreate: { type: Number, required: true, default: 0, min: 0 },
|
|
@@ -1131,8 +1147,10 @@ var sourceSchema = new mongoose.Schema(
|
|
|
1131
1147
|
tags: { type: [String], required: true, default: [] },
|
|
1132
1148
|
status: { type: String, enum: SOURCE_STATUS_VALUES, required: true, default: "active" },
|
|
1133
1149
|
discoveredBy: { type: discoveredBySchema, required: true },
|
|
1150
|
+
discovery: { type: sourceDiscoverySchema },
|
|
1134
1151
|
lastCollectedAt: { type: Date },
|
|
1135
1152
|
nextVisitAt: { type: Date },
|
|
1153
|
+
visitIntervalMs: { type: Number, min: 1 },
|
|
1136
1154
|
deletedAt: { type: Date }
|
|
1137
1155
|
},
|
|
1138
1156
|
collectionOptions(COLLECTIONS.sources)
|
|
@@ -1505,6 +1523,7 @@ exports.scoutProfileSchema = scoutProfileSchema;
|
|
|
1505
1523
|
exports.scoutRatingSchema = scoutRatingSchema;
|
|
1506
1524
|
exports.scraperMetricSchema = scraperMetricSchema;
|
|
1507
1525
|
exports.scraperSchema = scraperSchema;
|
|
1526
|
+
exports.sourceDiscoverySchema = sourceDiscoverySchema;
|
|
1508
1527
|
exports.sourceImportRowErrorSchema = sourceImportRowErrorSchema;
|
|
1509
1528
|
exports.sourceImportSchema = sourceImportSchema;
|
|
1510
1529
|
exports.sourceImportSummarySchema = sourceImportSummarySchema;
|