@timardex/cluemart-server-shared 4.0.7 → 4.1.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/dist/{chunk-TSKI3WB2.mjs → chunk-U5WL3CZR.mjs} +21 -1
- package/dist/chunk-U5WL3CZR.mjs.map +1 -0
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +42 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.mjs +20 -0
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +20 -0
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +42 -0
- package/dist/mongoose/index.d.ts +42 -0
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +20 -0
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-TSKI3WB2.mjs.map +0 -1
|
@@ -140,6 +140,27 @@ type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserI
|
|
|
140
140
|
duplicateHint?: string | null;
|
|
141
141
|
/** Fields still missing before the market can be approved. */
|
|
142
142
|
missingFields?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
145
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
146
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
147
|
+
*/
|
|
148
|
+
reviewerEditedAt?: Date | null;
|
|
149
|
+
/**
|
|
150
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
151
|
+
* the region because the document never carried one. The duplicate matcher
|
|
152
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
153
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
154
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
155
|
+
* unpublished document is stale but self-correcting.
|
|
156
|
+
*/
|
|
157
|
+
publicationCityUnknown?: boolean | null;
|
|
158
|
+
/**
|
|
159
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
160
|
+
* published listing for that market. A unique partial index on it makes
|
|
161
|
+
* "one published listing per market" a durable constraint (see below).
|
|
162
|
+
*/
|
|
163
|
+
publicationKey?: string | null;
|
|
143
164
|
};
|
|
144
165
|
declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
145
166
|
eventId?: mongoose__default.Types.ObjectId;
|
|
@@ -161,6 +182,27 @@ declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMar
|
|
|
161
182
|
duplicateHint?: string | null;
|
|
162
183
|
/** Fields still missing before the market can be approved. */
|
|
163
184
|
missingFields?: string[];
|
|
185
|
+
/**
|
|
186
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
187
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
188
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
189
|
+
*/
|
|
190
|
+
reviewerEditedAt?: Date | null;
|
|
191
|
+
/**
|
|
192
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
193
|
+
* the region because the document never carried one. The duplicate matcher
|
|
194
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
195
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
196
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
197
|
+
* unpublished document is stale but self-correcting.
|
|
198
|
+
*/
|
|
199
|
+
publicationCityUnknown?: boolean | null;
|
|
200
|
+
/**
|
|
201
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
202
|
+
* published listing for that market. A unique partial index on it makes
|
|
203
|
+
* "one published listing per market" a durable constraint (see below).
|
|
204
|
+
*/
|
|
205
|
+
publicationKey?: string | null;
|
|
164
206
|
} & Required<{
|
|
165
207
|
_id: string;
|
|
166
208
|
}> & {
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -140,6 +140,27 @@ type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserI
|
|
|
140
140
|
duplicateHint?: string | null;
|
|
141
141
|
/** Fields still missing before the market can be approved. */
|
|
142
142
|
missingFields?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
145
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
146
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
147
|
+
*/
|
|
148
|
+
reviewerEditedAt?: Date | null;
|
|
149
|
+
/**
|
|
150
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
151
|
+
* the region because the document never carried one. The duplicate matcher
|
|
152
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
153
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
154
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
155
|
+
* unpublished document is stale but self-correcting.
|
|
156
|
+
*/
|
|
157
|
+
publicationCityUnknown?: boolean | null;
|
|
158
|
+
/**
|
|
159
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
160
|
+
* published listing for that market. A unique partial index on it makes
|
|
161
|
+
* "one published listing per market" a durable constraint (see below).
|
|
162
|
+
*/
|
|
163
|
+
publicationKey?: string | null;
|
|
143
164
|
};
|
|
144
165
|
declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
145
166
|
eventId?: mongoose__default.Types.ObjectId;
|
|
@@ -161,6 +182,27 @@ declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMar
|
|
|
161
182
|
duplicateHint?: string | null;
|
|
162
183
|
/** Fields still missing before the market can be approved. */
|
|
163
184
|
missingFields?: string[];
|
|
185
|
+
/**
|
|
186
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
187
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
188
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
189
|
+
*/
|
|
190
|
+
reviewerEditedAt?: Date | null;
|
|
191
|
+
/**
|
|
192
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
193
|
+
* the region because the document never carried one. The duplicate matcher
|
|
194
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
195
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
196
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
197
|
+
* unpublished document is stale but self-correcting.
|
|
198
|
+
*/
|
|
199
|
+
publicationCityUnknown?: boolean | null;
|
|
200
|
+
/**
|
|
201
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
202
|
+
* published listing for that market. A unique partial index on it makes
|
|
203
|
+
* "one published listing per market" a durable constraint (see below).
|
|
204
|
+
*/
|
|
205
|
+
publicationKey?: string | null;
|
|
164
206
|
} & Required<{
|
|
165
207
|
_id: string;
|
|
166
208
|
}> & {
|
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -1197,6 +1197,8 @@ var schema8 = new MongooseSchema7(
|
|
|
1197
1197
|
missingFields: { required: false, type: [String] },
|
|
1198
1198
|
name: { required: true, type: String },
|
|
1199
1199
|
openingHours: { required: false, type: [String] },
|
|
1200
|
+
publicationCityUnknown: { default: false, required: false, type: Boolean },
|
|
1201
|
+
publicationKey: { required: false, type: String },
|
|
1200
1202
|
rainOrShine: { required: true, type: Boolean },
|
|
1201
1203
|
rating: { required: false, type: Number },
|
|
1202
1204
|
region: { required: false, type: String },
|
|
@@ -1208,6 +1210,7 @@ var schema8 = new MongooseSchema7(
|
|
|
1208
1210
|
required: false,
|
|
1209
1211
|
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
1210
1212
|
},
|
|
1213
|
+
reviewerEditedAt: { default: null, required: false, type: Date },
|
|
1211
1214
|
reviewStatus: {
|
|
1212
1215
|
default: import_cluemart_shared10.EnumImportedMarketReviewStatus.PENDING,
|
|
1213
1216
|
enum: Object.values(import_cluemart_shared10.EnumImportedMarketReviewStatus),
|
|
@@ -1244,6 +1247,16 @@ schema8.index({
|
|
|
1244
1247
|
_id: 1
|
|
1245
1248
|
});
|
|
1246
1249
|
schema8.index({ region: 1, searchName: 1 });
|
|
1250
|
+
schema8.index(
|
|
1251
|
+
{ publicationKey: 1 },
|
|
1252
|
+
{
|
|
1253
|
+
name: "ai_market_publication_key",
|
|
1254
|
+
partialFilterExpression: {
|
|
1255
|
+
publicationKey: { $exists: true, $type: "string" }
|
|
1256
|
+
},
|
|
1257
|
+
unique: true
|
|
1258
|
+
}
|
|
1259
|
+
);
|
|
1247
1260
|
schema8.index({ slug: 1 });
|
|
1248
1261
|
schema8.index({ reviewStatus: 1 });
|
|
1249
1262
|
schema8.index({ description: "text", name: "text" });
|
|
@@ -2168,6 +2181,13 @@ var schema20 = new MongooseSchema21(
|
|
|
2168
2181
|
{
|
|
2169
2182
|
...baseResourceFields,
|
|
2170
2183
|
// Importing base resource fields from global.ts
|
|
2184
|
+
// Claim link of the AI-imported market this event was created from, the
|
|
2185
|
+
// counterpart of `googlePlaceId`. Written once by `createEvent`.
|
|
2186
|
+
aiImportedMarketSourceKey: {
|
|
2187
|
+
default: null,
|
|
2188
|
+
required: false,
|
|
2189
|
+
type: String
|
|
2190
|
+
},
|
|
2171
2191
|
claimed: { default: true, required: false, type: Boolean },
|
|
2172
2192
|
dateTime: { required: true, type: [dateTimeSchema] },
|
|
2173
2193
|
eventInfoId: {
|