@timardex/cluemart-server-shared 4.2.1 → 5.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.
@@ -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, EnumImportedMarketDeactivationReason, AiImportedMarket, 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, "userId" | "status"> & {
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, "userId" | "status"> & {
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,132 @@ 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
+ /**
339
+ * Why an inactive market was switched off: `STALE` when the source reported the
340
+ * place as no longer operational (only the crawler may switch it back on),
341
+ * `ADMIN` when an admin did it (the crawler must leave it alone). Absent on
342
+ * markets deactivated before the reason existed, which are treated as
343
+ * admin-owned — the conservative default.
344
+ */
345
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
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
+ };
351
+ declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaGoogleImportedMarket, {}, {}> & Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
352
+ eventId?: mongoose__default.Types.ObjectId;
353
+ claimedByUserId?: mongoose__default.Types.ObjectId;
354
+ /**
355
+ * Why an inactive market was switched off: `STALE` when the source reported the
356
+ * place as no longer operational (only the crawler may switch it back on),
357
+ * `ADMIN` when an admin did it (the crawler must leave it alone). Absent on
358
+ * markets deactivated before the reason existed, which are treated as
359
+ * admin-owned — the conservative default.
360
+ */
361
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
362
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
363
+ searchName?: string;
364
+ /** Indexed earliest `dateTime` start instant for chronological pagination. */
365
+ earliestStartDate?: Date | null;
366
+ } & Required<{
367
+ _id: string;
368
+ }> & {
369
+ __v: number;
370
+ }, any>;
371
+
372
+ type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
373
+ eventId?: mongoose__default.Types.ObjectId;
374
+ claimedByUserId?: mongoose__default.Types.ObjectId;
375
+ reviewedByUserId?: mongoose__default.Types.ObjectId;
376
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
377
+ searchName?: string;
378
+ /** Indexed earliest `dateTime` start instant for chronological pagination. */
379
+ earliestStartDate?: Date | null;
380
+ /** Set to the run timestamp each time the market appears on its source. */
381
+ lastSeenAt?: Date | null;
382
+ /** Consecutive successful runs where the market did not appear. */
383
+ missedRuns?: number;
384
+ /** Hash of the raw model description used to skip unchanged re-rewrites. */
385
+ descriptionSourceHash?: string | null;
386
+ /** Why an active market was deactivated (null while active). */
387
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
388
+ /** sourceKey of an existing AI market this one may duplicate (soft flag). */
389
+ duplicateHint?: string | null;
390
+ /** Fields still missing before the market can be approved. */
391
+ missingFields?: string[];
392
+ /**
393
+ * Set when an admin edits a queued candidate. The importer stops overwriting
394
+ * such a document's content on re-scrape (it only refreshes bookkeeping), so a
395
+ * reviewer's fix is never replaced by the source data; approval clears it.
396
+ */
397
+ reviewerEditedAt?: Date | null;
398
+ /**
399
+ * True while the published listing's city is unknown: approval fell back to
400
+ * the region because the document never carried one. The duplicate matcher
401
+ * treats such a listing as matching any city, which the publication key alone
402
+ * cannot express, so approvals of the same name + region are serialised.
403
+ * Rewritten by every approval (with the key), so a value left on an
404
+ * unpublished document is stale but self-correcting.
405
+ */
406
+ publicationCityUnknown?: boolean | null;
407
+ /**
408
+ * Normalized `region::name::city` key held only while the market is the
409
+ * published listing for that market. A unique partial index on it makes
410
+ * "one published listing per market" a durable constraint (see below).
411
+ */
412
+ publicationKey?: string | null;
413
+ };
414
+ declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
415
+ eventId?: mongoose__default.Types.ObjectId;
416
+ claimedByUserId?: mongoose__default.Types.ObjectId;
417
+ reviewedByUserId?: mongoose__default.Types.ObjectId;
418
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
419
+ searchName?: string;
420
+ /** Indexed earliest `dateTime` start instant for chronological pagination. */
421
+ earliestStartDate?: Date | null;
422
+ /** Set to the run timestamp each time the market appears on its source. */
423
+ lastSeenAt?: Date | null;
424
+ /** Consecutive successful runs where the market did not appear. */
425
+ missedRuns?: number;
426
+ /** Hash of the raw model description used to skip unchanged re-rewrites. */
427
+ descriptionSourceHash?: string | null;
428
+ /** Why an active market was deactivated (null while active). */
429
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
430
+ /** sourceKey of an existing AI market this one may duplicate (soft flag). */
431
+ duplicateHint?: string | null;
432
+ /** Fields still missing before the market can be approved. */
433
+ missingFields?: string[];
434
+ /**
435
+ * Set when an admin edits a queued candidate. The importer stops overwriting
436
+ * such a document's content on re-scrape (it only refreshes bookkeeping), so a
437
+ * reviewer's fix is never replaced by the source data; approval clears it.
438
+ */
439
+ reviewerEditedAt?: Date | null;
440
+ /**
441
+ * True while the published listing's city is unknown: approval fell back to
442
+ * the region because the document never carried one. The duplicate matcher
443
+ * treats such a listing as matching any city, which the publication key alone
444
+ * cannot express, so approvals of the same name + region are serialised.
445
+ * Rewritten by every approval (with the key), so a value left on an
446
+ * unpublished document is stale but self-correcting.
447
+ */
448
+ publicationCityUnknown?: boolean | null;
449
+ /**
450
+ * Normalized `region::name::city` key held only while the market is the
451
+ * published listing for that market. A unique partial index on it makes
452
+ * "one published listing per market" a durable constraint (see below).
453
+ */
454
+ publicationKey?: string | null;
455
+ } & Required<{
456
+ _id: string;
457
+ }> & {
458
+ __v: number;
459
+ }, any>;
460
+
335
461
  declare const relationDatesSchema: mongoose__default.Schema<RelationDate, mongoose__default.Model<RelationDate, any, any, any, mongoose__default.Document<unknown, any, RelationDate, any, {}> & RelationDate & {
336
462
  _id: mongoose__default.Types.ObjectId;
337
463
  } & {
@@ -463,6 +589,27 @@ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mon
463
589
  __v: number;
464
590
  }, any>;
465
591
 
592
+ type SchemaEventType = Omit<EventType, "eventInfoId" | "owner" | "ownerLicenceType" | "adIds" | "associates"> & {
593
+ adIds?: ObjectId[];
594
+ associates?: SchemaAssociateType[] | null;
595
+ eventInfoId: ObjectId;
596
+ owner: SchemaOwnerType;
597
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
598
+ searchName?: string;
599
+ };
600
+ declare const EventModel: mongoose__default.Model<SchemaEventType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventType, {}, {}> & Omit<EventType, "adIds" | "associates" | "eventInfoId" | "owner" | "ownerLicenceType"> & {
601
+ adIds?: ObjectId[];
602
+ associates?: SchemaAssociateType[] | null;
603
+ eventInfoId: ObjectId;
604
+ owner: SchemaOwnerType;
605
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
606
+ searchName?: string;
607
+ } & Required<{
608
+ _id: string;
609
+ }> & {
610
+ __v: number;
611
+ }, any>;
612
+
466
613
  type SchemaAffiliateReward = AffiliateRewardType;
467
614
  type SchemaAffiliateResourceType = Omit<AffiliateResourceType, "resourceId" | "resourceOwner"> & {
468
615
  resourceId: ObjectId;
@@ -481,4 +628,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
481
628
  __v: number;
482
629
  }, any>;
483
630
 
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, AssociateTypeSchema as b, ContactDetailsSchema as c, RelationTypeSchema as d, ResourceImageTypeSchema as e, type SchemaAffiliateResourceType as f, type SchemaAffiliateReward as g, type SchemaRelatedPostType as h, type SchemaRelationType as i, type SchemaStripeSubscription as j, type SchemaUserActivityEvent as k, type SchemaUserAssociatedResourcesType as l, type SchemaUserType as m, SocialMediaTypeSchema as n, baseResourceFields as o, dateTimeSchema as p, locationGeoSchema as q, locationsSchema as r, relatedPostSchema as s, relationDatesSchema as t, socialShareResourceSchema as u, termsAgreementSchema as v, userLicenseSchema as w };
631
+ 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, EnumImportedMarketDeactivationReason, AiImportedMarket, 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, "userId" | "status"> & {
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, "userId" | "status"> & {
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,132 @@ 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
+ /**
339
+ * Why an inactive market was switched off: `STALE` when the source reported the
340
+ * place as no longer operational (only the crawler may switch it back on),
341
+ * `ADMIN` when an admin did it (the crawler must leave it alone). Absent on
342
+ * markets deactivated before the reason existed, which are treated as
343
+ * admin-owned — the conservative default.
344
+ */
345
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
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
+ };
351
+ declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaGoogleImportedMarket, {}, {}> & Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
352
+ eventId?: mongoose__default.Types.ObjectId;
353
+ claimedByUserId?: mongoose__default.Types.ObjectId;
354
+ /**
355
+ * Why an inactive market was switched off: `STALE` when the source reported the
356
+ * place as no longer operational (only the crawler may switch it back on),
357
+ * `ADMIN` when an admin did it (the crawler must leave it alone). Absent on
358
+ * markets deactivated before the reason existed, which are treated as
359
+ * admin-owned — the conservative default.
360
+ */
361
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
362
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
363
+ searchName?: string;
364
+ /** Indexed earliest `dateTime` start instant for chronological pagination. */
365
+ earliestStartDate?: Date | null;
366
+ } & Required<{
367
+ _id: string;
368
+ }> & {
369
+ __v: number;
370
+ }, any>;
371
+
372
+ type SchemaAiImportedMarket = Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
373
+ eventId?: mongoose__default.Types.ObjectId;
374
+ claimedByUserId?: mongoose__default.Types.ObjectId;
375
+ reviewedByUserId?: mongoose__default.Types.ObjectId;
376
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
377
+ searchName?: string;
378
+ /** Indexed earliest `dateTime` start instant for chronological pagination. */
379
+ earliestStartDate?: Date | null;
380
+ /** Set to the run timestamp each time the market appears on its source. */
381
+ lastSeenAt?: Date | null;
382
+ /** Consecutive successful runs where the market did not appear. */
383
+ missedRuns?: number;
384
+ /** Hash of the raw model description used to skip unchanged re-rewrites. */
385
+ descriptionSourceHash?: string | null;
386
+ /** Why an active market was deactivated (null while active). */
387
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
388
+ /** sourceKey of an existing AI market this one may duplicate (soft flag). */
389
+ duplicateHint?: string | null;
390
+ /** Fields still missing before the market can be approved. */
391
+ missingFields?: string[];
392
+ /**
393
+ * Set when an admin edits a queued candidate. The importer stops overwriting
394
+ * such a document's content on re-scrape (it only refreshes bookkeeping), so a
395
+ * reviewer's fix is never replaced by the source data; approval clears it.
396
+ */
397
+ reviewerEditedAt?: Date | null;
398
+ /**
399
+ * True while the published listing's city is unknown: approval fell back to
400
+ * the region because the document never carried one. The duplicate matcher
401
+ * treats such a listing as matching any city, which the publication key alone
402
+ * cannot express, so approvals of the same name + region are serialised.
403
+ * Rewritten by every approval (with the key), so a value left on an
404
+ * unpublished document is stale but self-correcting.
405
+ */
406
+ publicationCityUnknown?: boolean | null;
407
+ /**
408
+ * Normalized `region::name::city` key held only while the market is the
409
+ * published listing for that market. A unique partial index on it makes
410
+ * "one published listing per market" a durable constraint (see below).
411
+ */
412
+ publicationKey?: string | null;
413
+ };
414
+ declare const AiImportedMarketModel: mongoose__default.Model<SchemaAiImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAiImportedMarket, {}, {}> & Omit<AiImportedMarket, "eventId" | "claimedByUserId" | "reviewedByUserId"> & {
415
+ eventId?: mongoose__default.Types.ObjectId;
416
+ claimedByUserId?: mongoose__default.Types.ObjectId;
417
+ reviewedByUserId?: mongoose__default.Types.ObjectId;
418
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
419
+ searchName?: string;
420
+ /** Indexed earliest `dateTime` start instant for chronological pagination. */
421
+ earliestStartDate?: Date | null;
422
+ /** Set to the run timestamp each time the market appears on its source. */
423
+ lastSeenAt?: Date | null;
424
+ /** Consecutive successful runs where the market did not appear. */
425
+ missedRuns?: number;
426
+ /** Hash of the raw model description used to skip unchanged re-rewrites. */
427
+ descriptionSourceHash?: string | null;
428
+ /** Why an active market was deactivated (null while active). */
429
+ deactivatedReason?: EnumImportedMarketDeactivationReason | null;
430
+ /** sourceKey of an existing AI market this one may duplicate (soft flag). */
431
+ duplicateHint?: string | null;
432
+ /** Fields still missing before the market can be approved. */
433
+ missingFields?: string[];
434
+ /**
435
+ * Set when an admin edits a queued candidate. The importer stops overwriting
436
+ * such a document's content on re-scrape (it only refreshes bookkeeping), so a
437
+ * reviewer's fix is never replaced by the source data; approval clears it.
438
+ */
439
+ reviewerEditedAt?: Date | null;
440
+ /**
441
+ * True while the published listing's city is unknown: approval fell back to
442
+ * the region because the document never carried one. The duplicate matcher
443
+ * treats such a listing as matching any city, which the publication key alone
444
+ * cannot express, so approvals of the same name + region are serialised.
445
+ * Rewritten by every approval (with the key), so a value left on an
446
+ * unpublished document is stale but self-correcting.
447
+ */
448
+ publicationCityUnknown?: boolean | null;
449
+ /**
450
+ * Normalized `region::name::city` key held only while the market is the
451
+ * published listing for that market. A unique partial index on it makes
452
+ * "one published listing per market" a durable constraint (see below).
453
+ */
454
+ publicationKey?: string | null;
455
+ } & Required<{
456
+ _id: string;
457
+ }> & {
458
+ __v: number;
459
+ }, any>;
460
+
335
461
  declare const relationDatesSchema: mongoose__default.Schema<RelationDate, mongoose__default.Model<RelationDate, any, any, any, mongoose__default.Document<unknown, any, RelationDate, any, {}> & RelationDate & {
336
462
  _id: mongoose__default.Types.ObjectId;
337
463
  } & {
@@ -463,6 +589,27 @@ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mon
463
589
  __v: number;
464
590
  }, any>;
465
591
 
592
+ type SchemaEventType = Omit<EventType, "eventInfoId" | "owner" | "ownerLicenceType" | "adIds" | "associates"> & {
593
+ adIds?: ObjectId[];
594
+ associates?: SchemaAssociateType[] | null;
595
+ eventInfoId: ObjectId;
596
+ owner: SchemaOwnerType;
597
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
598
+ searchName?: string;
599
+ };
600
+ declare const EventModel: mongoose__default.Model<SchemaEventType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventType, {}, {}> & Omit<EventType, "adIds" | "associates" | "eventInfoId" | "owner" | "ownerLicenceType"> & {
601
+ adIds?: ObjectId[];
602
+ associates?: SchemaAssociateType[] | null;
603
+ eventInfoId: ObjectId;
604
+ owner: SchemaOwnerType;
605
+ /** Lowercase `name` mirror for prefix type-ahead (see searchNamePlugin). */
606
+ searchName?: string;
607
+ } & Required<{
608
+ _id: string;
609
+ }> & {
610
+ __v: number;
611
+ }, any>;
612
+
466
613
  type SchemaAffiliateReward = AffiliateRewardType;
467
614
  type SchemaAffiliateResourceType = Omit<AffiliateResourceType, "resourceId" | "resourceOwner"> & {
468
615
  resourceId: ObjectId;
@@ -481,4 +628,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
481
628
  __v: number;
482
629
  }, any>;
483
630
 
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, AssociateTypeSchema as b, ContactDetailsSchema as c, RelationTypeSchema as d, ResourceImageTypeSchema as e, type SchemaAffiliateResourceType as f, type SchemaAffiliateReward as g, type SchemaRelatedPostType as h, type SchemaRelationType as i, type SchemaStripeSubscription as j, type SchemaUserActivityEvent as k, type SchemaUserAssociatedResourcesType as l, type SchemaUserType as m, SocialMediaTypeSchema as n, baseResourceFields as o, dateTimeSchema as p, locationGeoSchema as q, locationsSchema as r, relatedPostSchema as s, relationDatesSchema as t, socialShareResourceSchema as u, termsAgreementSchema as v, userLicenseSchema as w };
631
+ 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 };
@@ -930,7 +930,8 @@ var baseResourceFields = {
930
930
 
931
931
  // src/mongoose/GoogleImportedMarket.ts
932
932
  import {
933
- EnumEventType
933
+ EnumEventType,
934
+ EnumImportedMarketDeactivationReason
934
935
  } from "@timardex/cluemart-shared";
935
936
  import mongoose10 from "mongoose";
936
937
 
@@ -1057,6 +1058,11 @@ var schema7 = new MongooseSchema6(
1057
1058
  type: ResourceImageTypeSchema
1058
1059
  },
1059
1060
  dateTime: [dateTimeSchema],
1061
+ deactivatedReason: {
1062
+ enum: Object.values(EnumImportedMarketDeactivationReason),
1063
+ required: false,
1064
+ type: String
1065
+ },
1060
1066
  deletedAt: { default: null, required: false, type: Date },
1061
1067
  description: { required: true, type: String },
1062
1068
  earliestStartDate: { default: null, required: false, type: Date },
@@ -1111,7 +1117,7 @@ var GoogleImportedMarketModel = mongoose10.models.GoogleImportedMarket || mongoo
1111
1117
  // src/mongoose/AiImportedMarket.ts
1112
1118
  import {
1113
1119
  EnumEventType as EnumEventType2,
1114
- EnumImportedMarketDeactivationReason,
1120
+ EnumImportedMarketDeactivationReason as EnumImportedMarketDeactivationReason2,
1115
1121
  EnumImportedMarketReviewStatus
1116
1122
  } from "@timardex/cluemart-shared";
1117
1123
  import mongoose11 from "mongoose";
@@ -1144,7 +1150,7 @@ var schema8 = new MongooseSchema7(
1144
1150
  },
1145
1151
  dateTime: [dateTimeSchema],
1146
1152
  deactivatedReason: {
1147
- enum: Object.values(EnumImportedMarketDeactivationReason),
1153
+ enum: Object.values(EnumImportedMarketDeactivationReason2),
1148
1154
  required: false,
1149
1155
  type: String
1150
1156
  },
@@ -1982,6 +1988,14 @@ schema15.index({ "licences.licenceType": 1 });
1982
1988
  schema15.index({ promoCodes: 1, active: 1, deletedAt: 1 });
1983
1989
  schema15.index({ email: "text", firstName: "text", lastName: "text" });
1984
1990
  schema15.index({ email: 1 }, { name: "email_unique", unique: true });
1991
+ schema15.index(
1992
+ { email: 1 },
1993
+ {
1994
+ collation: { locale: "en", strength: 2 },
1995
+ name: "email_unique_normalized",
1996
+ unique: true
1997
+ }
1998
+ );
1985
1999
  schema15.index({ "associatedResources.events": 1 });
1986
2000
  schema15.index({ "associatedResources.partners": 1 });
1987
2001
  schema15.index({ "associatedResources.vendors": 1 });
@@ -3039,4 +3053,4 @@ export {
3039
3053
  ImpersonationSessionModel,
3040
3054
  ImpersonationAuditModel
3041
3055
  };
3042
- //# sourceMappingURL=chunk-HHATQITH.mjs.map
3056
+ //# sourceMappingURL=chunk-MYZL22GL.mjs.map