@timardex/cluemart-server-shared 4.2.0 → 5.0.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/{Affiliate-CfG8ctIo.d.ts → Affiliate-CisCDggv.d.ts} +135 -4
- package/dist/{Affiliate-Bilg9mgw.d.mts → Affiliate-DfBYlDtn.d.mts} +135 -4
- package/dist/{chunk-ABW2L2HY.mjs → chunk-VM4B5D2I.mjs} +10 -1
- package/dist/chunk-VM4B5D2I.mjs.map +1 -0
- package/dist/index.cjs +167 -93
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +102 -13
- package/dist/index.d.ts +102 -13
- package/dist/index.mjs +80 -9
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +9 -0
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +4 -135
- package/dist/mongoose/index.d.ts +4 -135
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +167 -93
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +103 -14
- package/dist/service/index.d.ts +103 -14
- package/dist/service/index.mjs +72 -10
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-ABW2L2HY.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { OwnerType, AssociateType, EnumAssociateStatus, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, AffiliateType, AffiliateResourceType, AffiliateRewardType } from '@timardex/cluemart-shared';
|
|
2
|
+
import { OwnerType, AssociateType, EnumAssociateStatus, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, GoogleImportedMarket, AiImportedMarket, EnumImportedMarketDeactivationReason, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, EventType, AffiliateType, AffiliateResourceType, AffiliateRewardType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose__default from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from './index-BptxBl9x.js';
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ declare const OwnerTypeSchema: mongoose__default.Schema<SchemaOwnerType, mongoos
|
|
|
24
24
|
} & {
|
|
25
25
|
__v: number;
|
|
26
26
|
}>;
|
|
27
|
-
declare const AssociateTypeSchema: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "
|
|
27
|
+
declare const AssociateTypeSchema: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "status" | "userId"> & {
|
|
28
28
|
status: EnumAssociateStatus;
|
|
29
29
|
userId: ObjectId;
|
|
30
30
|
} & {
|
|
@@ -158,7 +158,7 @@ declare const baseResourceFields: {
|
|
|
158
158
|
associates: {
|
|
159
159
|
default: never[];
|
|
160
160
|
required: boolean;
|
|
161
|
-
type: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "
|
|
161
|
+
type: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "status" | "userId"> & {
|
|
162
162
|
status: EnumAssociateStatus;
|
|
163
163
|
userId: ObjectId;
|
|
164
164
|
} & {
|
|
@@ -332,6 +332,116 @@ declare const baseResourceFields: {
|
|
|
332
332
|
};
|
|
333
333
|
};
|
|
334
334
|
|
|
335
|
+
type SchemaGoogleImportedMarket = Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
336
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
337
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
338
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
339
|
+
searchName?: string;
|
|
340
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
341
|
+
earliestStartDate?: Date | null;
|
|
342
|
+
};
|
|
343
|
+
declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaGoogleImportedMarket, {}, {}> & Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
344
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
345
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
346
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
347
|
+
searchName?: string;
|
|
348
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
349
|
+
earliestStartDate?: Date | null;
|
|
350
|
+
} & Required<{
|
|
351
|
+
_id: string;
|
|
352
|
+
}> & {
|
|
353
|
+
__v: number;
|
|
354
|
+
}, any>;
|
|
355
|
+
|
|
356
|
+
type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
357
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
358
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
359
|
+
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
360
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
361
|
+
searchName?: string;
|
|
362
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
363
|
+
earliestStartDate?: Date | null;
|
|
364
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
365
|
+
lastSeenAt?: Date | null;
|
|
366
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
367
|
+
missedRuns?: number;
|
|
368
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
369
|
+
descriptionSourceHash?: string | null;
|
|
370
|
+
/** Why an active market was deactivated (null while active). */
|
|
371
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
372
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
373
|
+
duplicateHint?: string | null;
|
|
374
|
+
/** Fields still missing before the market can be approved. */
|
|
375
|
+
missingFields?: string[];
|
|
376
|
+
/**
|
|
377
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
378
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
379
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
380
|
+
*/
|
|
381
|
+
reviewerEditedAt?: Date | null;
|
|
382
|
+
/**
|
|
383
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
384
|
+
* the region because the document never carried one. The duplicate matcher
|
|
385
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
386
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
387
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
388
|
+
* unpublished document is stale but self-correcting.
|
|
389
|
+
*/
|
|
390
|
+
publicationCityUnknown?: boolean | null;
|
|
391
|
+
/**
|
|
392
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
393
|
+
* published listing for that market. A unique partial index on it makes
|
|
394
|
+
* "one published listing per market" a durable constraint (see below).
|
|
395
|
+
*/
|
|
396
|
+
publicationKey?: string | null;
|
|
397
|
+
};
|
|
398
|
+
declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
399
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
400
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
401
|
+
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
402
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
403
|
+
searchName?: string;
|
|
404
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
405
|
+
earliestStartDate?: Date | null;
|
|
406
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
407
|
+
lastSeenAt?: Date | null;
|
|
408
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
409
|
+
missedRuns?: number;
|
|
410
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
411
|
+
descriptionSourceHash?: string | null;
|
|
412
|
+
/** Why an active market was deactivated (null while active). */
|
|
413
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
414
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
415
|
+
duplicateHint?: string | null;
|
|
416
|
+
/** Fields still missing before the market can be approved. */
|
|
417
|
+
missingFields?: string[];
|
|
418
|
+
/**
|
|
419
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
420
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
421
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
422
|
+
*/
|
|
423
|
+
reviewerEditedAt?: Date | null;
|
|
424
|
+
/**
|
|
425
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
426
|
+
* the region because the document never carried one. The duplicate matcher
|
|
427
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
428
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
429
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
430
|
+
* unpublished document is stale but self-correcting.
|
|
431
|
+
*/
|
|
432
|
+
publicationCityUnknown?: boolean | null;
|
|
433
|
+
/**
|
|
434
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
435
|
+
* published listing for that market. A unique partial index on it makes
|
|
436
|
+
* "one published listing per market" a durable constraint (see below).
|
|
437
|
+
*/
|
|
438
|
+
publicationKey?: string | null;
|
|
439
|
+
} & Required<{
|
|
440
|
+
_id: string;
|
|
441
|
+
}> & {
|
|
442
|
+
__v: number;
|
|
443
|
+
}, any>;
|
|
444
|
+
|
|
335
445
|
declare const relationDatesSchema: mongoose__default.Schema<RelationDate, mongoose__default.Model<RelationDate, any, any, any, mongoose__default.Document<unknown, any, RelationDate, any, {}> & RelationDate & {
|
|
336
446
|
_id: mongoose__default.Types.ObjectId;
|
|
337
447
|
} & {
|
|
@@ -463,6 +573,27 @@ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mon
|
|
|
463
573
|
__v: number;
|
|
464
574
|
}, any>;
|
|
465
575
|
|
|
576
|
+
type SchemaEventType = Omit<EventType, "eventInfoId" | "owner" | "ownerLicenceType" | "adIds" | "associates"> & {
|
|
577
|
+
adIds?: ObjectId[];
|
|
578
|
+
associates?: SchemaAssociateType[] | null;
|
|
579
|
+
eventInfoId: ObjectId;
|
|
580
|
+
owner: SchemaOwnerType;
|
|
581
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
582
|
+
searchName?: string;
|
|
583
|
+
};
|
|
584
|
+
declare const EventModel: mongoose__default.Model<SchemaEventType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventType, {}, {}> & Omit<EventType, "adIds" | "associates" | "eventInfoId" | "owner" | "ownerLicenceType"> & {
|
|
585
|
+
adIds?: ObjectId[];
|
|
586
|
+
associates?: SchemaAssociateType[] | null;
|
|
587
|
+
eventInfoId: ObjectId;
|
|
588
|
+
owner: SchemaOwnerType;
|
|
589
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
590
|
+
searchName?: string;
|
|
591
|
+
} & Required<{
|
|
592
|
+
_id: string;
|
|
593
|
+
}> & {
|
|
594
|
+
__v: number;
|
|
595
|
+
}, any>;
|
|
596
|
+
|
|
466
597
|
type SchemaAffiliateReward = AffiliateRewardType;
|
|
467
598
|
type SchemaAffiliateResourceType = Omit<AffiliateResourceType, "resourceId" | "resourceOwner"> & {
|
|
468
599
|
resourceId: ObjectId;
|
|
@@ -481,4 +612,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
|
|
|
481
612
|
__v: number;
|
|
482
613
|
}, any>;
|
|
483
614
|
|
|
484
|
-
export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, RelationModel as R, type SchemaAssociateType as S, UserModel as U, type SchemaOwnerType as a,
|
|
615
|
+
export { AffiliateModel as A, userLicenseSchema as B, CategorySchema as C, EventModel as E, GoogleImportedMarketModel as G, OwnerTypeSchema as O, RelationModel as R, type SchemaAssociateType as S, UserModel as U, type SchemaOwnerType as a, AiImportedMarketModel as b, AssociateTypeSchema as c, ContactDetailsSchema as d, RelationTypeSchema as e, ResourceImageTypeSchema as f, type SchemaAffiliateResourceType as g, type SchemaAffiliateReward as h, type SchemaAiImportedMarket as i, type SchemaEventType as j, type SchemaGoogleImportedMarket as k, type SchemaRelatedPostType as l, type SchemaRelationType as m, type SchemaStripeSubscription as n, type SchemaUserActivityEvent as o, type SchemaUserAssociatedResourcesType as p, type SchemaUserType as q, SocialMediaTypeSchema as r, baseResourceFields as s, dateTimeSchema as t, locationGeoSchema as u, locationsSchema as v, relatedPostSchema as w, relationDatesSchema as x, socialShareResourceSchema as y, termsAgreementSchema as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { OwnerType, AssociateType, EnumAssociateStatus, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, AffiliateType, AffiliateResourceType, AffiliateRewardType } from '@timardex/cluemart-shared';
|
|
2
|
+
import { OwnerType, AssociateType, EnumAssociateStatus, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, GoogleImportedMarket, AiImportedMarket, EnumImportedMarketDeactivationReason, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, EventType, AffiliateType, AffiliateResourceType, AffiliateRewardType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose__default from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from './index-BptxBl9x.mjs';
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ declare const OwnerTypeSchema: mongoose__default.Schema<SchemaOwnerType, mongoos
|
|
|
24
24
|
} & {
|
|
25
25
|
__v: number;
|
|
26
26
|
}>;
|
|
27
|
-
declare const AssociateTypeSchema: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "
|
|
27
|
+
declare const AssociateTypeSchema: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "status" | "userId"> & {
|
|
28
28
|
status: EnumAssociateStatus;
|
|
29
29
|
userId: ObjectId;
|
|
30
30
|
} & {
|
|
@@ -158,7 +158,7 @@ declare const baseResourceFields: {
|
|
|
158
158
|
associates: {
|
|
159
159
|
default: never[];
|
|
160
160
|
required: boolean;
|
|
161
|
-
type: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "
|
|
161
|
+
type: mongoose__default.Schema<SchemaAssociateType, mongoose__default.Model<SchemaAssociateType, any, any, any, mongoose__default.Document<unknown, any, SchemaAssociateType, any, {}> & Omit<AssociateType, "status" | "userId"> & {
|
|
162
162
|
status: EnumAssociateStatus;
|
|
163
163
|
userId: ObjectId;
|
|
164
164
|
} & {
|
|
@@ -332,6 +332,116 @@ declare const baseResourceFields: {
|
|
|
332
332
|
};
|
|
333
333
|
};
|
|
334
334
|
|
|
335
|
+
type SchemaGoogleImportedMarket = Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
336
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
337
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
338
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
339
|
+
searchName?: string;
|
|
340
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
341
|
+
earliestStartDate?: Date | null;
|
|
342
|
+
};
|
|
343
|
+
declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaGoogleImportedMarket, {}, {}> & Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
344
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
345
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
346
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
347
|
+
searchName?: string;
|
|
348
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
349
|
+
earliestStartDate?: Date | null;
|
|
350
|
+
} & Required<{
|
|
351
|
+
_id: string;
|
|
352
|
+
}> & {
|
|
353
|
+
__v: number;
|
|
354
|
+
}, any>;
|
|
355
|
+
|
|
356
|
+
type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
357
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
358
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
359
|
+
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
360
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
361
|
+
searchName?: string;
|
|
362
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
363
|
+
earliestStartDate?: Date | null;
|
|
364
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
365
|
+
lastSeenAt?: Date | null;
|
|
366
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
367
|
+
missedRuns?: number;
|
|
368
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
369
|
+
descriptionSourceHash?: string | null;
|
|
370
|
+
/** Why an active market was deactivated (null while active). */
|
|
371
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
372
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
373
|
+
duplicateHint?: string | null;
|
|
374
|
+
/** Fields still missing before the market can be approved. */
|
|
375
|
+
missingFields?: string[];
|
|
376
|
+
/**
|
|
377
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
378
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
379
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
380
|
+
*/
|
|
381
|
+
reviewerEditedAt?: Date | null;
|
|
382
|
+
/**
|
|
383
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
384
|
+
* the region because the document never carried one. The duplicate matcher
|
|
385
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
386
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
387
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
388
|
+
* unpublished document is stale but self-correcting.
|
|
389
|
+
*/
|
|
390
|
+
publicationCityUnknown?: boolean | null;
|
|
391
|
+
/**
|
|
392
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
393
|
+
* published listing for that market. A unique partial index on it makes
|
|
394
|
+
* "one published listing per market" a durable constraint (see below).
|
|
395
|
+
*/
|
|
396
|
+
publicationKey?: string | null;
|
|
397
|
+
};
|
|
398
|
+
declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
|
|
399
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
400
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
401
|
+
reviewedByUserId?: mongoose__default.Types.ObjectId;
|
|
402
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
403
|
+
searchName?: string;
|
|
404
|
+
/** Indexed earliest `dateTime` start instant for chronological pagination. */
|
|
405
|
+
earliestStartDate?: Date | null;
|
|
406
|
+
/** Set to the run timestamp each time the market appears on its source. */
|
|
407
|
+
lastSeenAt?: Date | null;
|
|
408
|
+
/** Consecutive successful runs where the market did not appear. */
|
|
409
|
+
missedRuns?: number;
|
|
410
|
+
/** Hash of the raw model description used to skip unchanged re-rewrites. */
|
|
411
|
+
descriptionSourceHash?: string | null;
|
|
412
|
+
/** Why an active market was deactivated (null while active). */
|
|
413
|
+
deactivatedReason?: EnumImportedMarketDeactivationReason | null;
|
|
414
|
+
/** sourceKey of an existing AI market this one may duplicate (soft flag). */
|
|
415
|
+
duplicateHint?: string | null;
|
|
416
|
+
/** Fields still missing before the market can be approved. */
|
|
417
|
+
missingFields?: string[];
|
|
418
|
+
/**
|
|
419
|
+
* Set when an admin edits a queued candidate. The importer stops overwriting
|
|
420
|
+
* such a document's content on re-scrape (it only refreshes bookkeeping), so a
|
|
421
|
+
* reviewer's fix is never replaced by the source data; approval clears it.
|
|
422
|
+
*/
|
|
423
|
+
reviewerEditedAt?: Date | null;
|
|
424
|
+
/**
|
|
425
|
+
* True while the published listing's city is unknown: approval fell back to
|
|
426
|
+
* the region because the document never carried one. The duplicate matcher
|
|
427
|
+
* treats such a listing as matching any city, which the publication key alone
|
|
428
|
+
* cannot express, so approvals of the same name + region are serialised.
|
|
429
|
+
* Rewritten by every approval (with the key), so a value left on an
|
|
430
|
+
* unpublished document is stale but self-correcting.
|
|
431
|
+
*/
|
|
432
|
+
publicationCityUnknown?: boolean | null;
|
|
433
|
+
/**
|
|
434
|
+
* Normalized `region::name::city` key held only while the market is the
|
|
435
|
+
* published listing for that market. A unique partial index on it makes
|
|
436
|
+
* "one published listing per market" a durable constraint (see below).
|
|
437
|
+
*/
|
|
438
|
+
publicationKey?: string | null;
|
|
439
|
+
} & Required<{
|
|
440
|
+
_id: string;
|
|
441
|
+
}> & {
|
|
442
|
+
__v: number;
|
|
443
|
+
}, any>;
|
|
444
|
+
|
|
335
445
|
declare const relationDatesSchema: mongoose__default.Schema<RelationDate, mongoose__default.Model<RelationDate, any, any, any, mongoose__default.Document<unknown, any, RelationDate, any, {}> & RelationDate & {
|
|
336
446
|
_id: mongoose__default.Types.ObjectId;
|
|
337
447
|
} & {
|
|
@@ -463,6 +573,27 @@ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mon
|
|
|
463
573
|
__v: number;
|
|
464
574
|
}, any>;
|
|
465
575
|
|
|
576
|
+
type SchemaEventType = Omit<EventType, "eventInfoId" | "owner" | "ownerLicenceType" | "adIds" | "associates"> & {
|
|
577
|
+
adIds?: ObjectId[];
|
|
578
|
+
associates?: SchemaAssociateType[] | null;
|
|
579
|
+
eventInfoId: ObjectId;
|
|
580
|
+
owner: SchemaOwnerType;
|
|
581
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
582
|
+
searchName?: string;
|
|
583
|
+
};
|
|
584
|
+
declare const EventModel: mongoose__default.Model<SchemaEventType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventType, {}, {}> & Omit<EventType, "adIds" | "associates" | "eventInfoId" | "owner" | "ownerLicenceType"> & {
|
|
585
|
+
adIds?: ObjectId[];
|
|
586
|
+
associates?: SchemaAssociateType[] | null;
|
|
587
|
+
eventInfoId: ObjectId;
|
|
588
|
+
owner: SchemaOwnerType;
|
|
589
|
+
/** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
|
|
590
|
+
searchName?: string;
|
|
591
|
+
} & Required<{
|
|
592
|
+
_id: string;
|
|
593
|
+
}> & {
|
|
594
|
+
__v: number;
|
|
595
|
+
}, any>;
|
|
596
|
+
|
|
466
597
|
type SchemaAffiliateReward = AffiliateRewardType;
|
|
467
598
|
type SchemaAffiliateResourceType = Omit<AffiliateResourceType, "resourceId" | "resourceOwner"> & {
|
|
468
599
|
resourceId: ObjectId;
|
|
@@ -481,4 +612,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
|
|
|
481
612
|
__v: number;
|
|
482
613
|
}, any>;
|
|
483
614
|
|
|
484
|
-
export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, RelationModel as R, type SchemaAssociateType as S, UserModel as U, type SchemaOwnerType as a,
|
|
615
|
+
export { AffiliateModel as A, userLicenseSchema as B, CategorySchema as C, EventModel as E, GoogleImportedMarketModel as G, OwnerTypeSchema as O, RelationModel as R, type SchemaAssociateType as S, UserModel as U, type SchemaOwnerType as a, AiImportedMarketModel as b, AssociateTypeSchema as c, ContactDetailsSchema as d, RelationTypeSchema as e, ResourceImageTypeSchema as f, type SchemaAffiliateResourceType as g, type SchemaAffiliateReward as h, type SchemaAiImportedMarket as i, type SchemaEventType as j, type SchemaGoogleImportedMarket as k, type SchemaRelatedPostType as l, type SchemaRelationType as m, type SchemaStripeSubscription as n, type SchemaUserActivityEvent as o, type SchemaUserAssociatedResourcesType as p, type SchemaUserType as q, SocialMediaTypeSchema as r, baseResourceFields as s, dateTimeSchema as t, locationGeoSchema as u, locationsSchema as v, relatedPostSchema as w, relationDatesSchema as x, socialShareResourceSchema as y, termsAgreementSchema as z };
|
|
@@ -1981,6 +1981,15 @@ schema15.index({ "licences.expiryDate": 1 });
|
|
|
1981
1981
|
schema15.index({ "licences.licenceType": 1 });
|
|
1982
1982
|
schema15.index({ promoCodes: 1, active: 1, deletedAt: 1 });
|
|
1983
1983
|
schema15.index({ email: "text", firstName: "text", lastName: "text" });
|
|
1984
|
+
schema15.index({ email: 1 }, { name: "email_unique", unique: true });
|
|
1985
|
+
schema15.index(
|
|
1986
|
+
{ email: 1 },
|
|
1987
|
+
{
|
|
1988
|
+
collation: { locale: "en", strength: 2 },
|
|
1989
|
+
name: "email_unique_normalized",
|
|
1990
|
+
unique: true
|
|
1991
|
+
}
|
|
1992
|
+
);
|
|
1984
1993
|
schema15.index({ "associatedResources.events": 1 });
|
|
1985
1994
|
schema15.index({ "associatedResources.partners": 1 });
|
|
1986
1995
|
schema15.index({ "associatedResources.vendors": 1 });
|
|
@@ -3038,4 +3047,4 @@ export {
|
|
|
3038
3047
|
ImpersonationSessionModel,
|
|
3039
3048
|
ImpersonationAuditModel
|
|
3040
3049
|
};
|
|
3041
|
-
//# sourceMappingURL=chunk-
|
|
3050
|
+
//# sourceMappingURL=chunk-VM4B5D2I.mjs.map
|