@timardex/cluemart-server-shared 4.0.8 → 4.2.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, 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, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, 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
 
@@ -9,6 +9,10 @@ type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
9
9
  type SchemaOwnerType = Omit<OwnerType, "userId"> & {
10
10
  userId: ObjectId;
11
11
  };
12
+ type SchemaAssociateType = Omit<AssociateType, "userId" | "status"> & {
13
+ status: EnumAssociateStatus;
14
+ userId: ObjectId;
15
+ };
12
16
  declare const OwnerTypeSchema: mongoose__default.Schema<SchemaOwnerType, mongoose__default.Model<SchemaOwnerType, any, any, any, mongoose__default.Document<unknown, any, SchemaOwnerType, any, {}> & Omit<OwnerType, "userId"> & {
13
17
  userId: ObjectId;
14
18
  } & {
@@ -20,6 +24,18 @@ declare const OwnerTypeSchema: mongoose__default.Schema<SchemaOwnerType, mongoos
20
24
  } & {
21
25
  __v: number;
22
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"> & {
28
+ status: EnumAssociateStatus;
29
+ userId: ObjectId;
30
+ } & {
31
+ _id: mongoose__default.Types.ObjectId;
32
+ } & {
33
+ __v: number;
34
+ }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaAssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaAssociateType>, {}, mongoose__default.DefaultSchemaOptions> & mongoose__default.FlatRecord<SchemaAssociateType> & {
35
+ _id: mongoose__default.Types.ObjectId;
36
+ } & {
37
+ __v: number;
38
+ }>;
23
39
  declare const SocialMediaTypeSchema: mongoose__default.Schema<SocialMediaType, mongoose__default.Model<SocialMediaType, any, any, any, mongoose__default.Document<unknown, any, SocialMediaType, any, {}> & SocialMediaType & {
24
40
  _id: mongoose__default.Types.ObjectId;
25
41
  } & {
@@ -139,6 +155,22 @@ declare const baseResourceFields: {
139
155
  required: boolean;
140
156
  type: DateConstructor;
141
157
  };
158
+ associates: {
159
+ default: never[];
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"> & {
162
+ status: EnumAssociateStatus;
163
+ userId: ObjectId;
164
+ } & {
165
+ _id: mongoose__default.Types.ObjectId;
166
+ } & {
167
+ __v: number;
168
+ }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaAssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaAssociateType>, {}, mongoose__default.DefaultSchemaOptions> & mongoose__default.FlatRecord<SchemaAssociateType> & {
169
+ _id: mongoose__default.Types.ObjectId;
170
+ } & {
171
+ __v: number;
172
+ }>[];
173
+ };
142
174
  contactDetails: {
143
175
  required: boolean;
144
176
  type: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
@@ -345,9 +377,15 @@ declare const RelationModel: mongoose__default.Model<SchemaRelationType, {}, {},
345
377
  type SchemaUserActivityEvent = Omit<UserActivityEvent, "resourceId"> & {
346
378
  resourceId: ObjectId;
347
379
  };
348
- type SchemaUserType = Omit<UserType, "vendor" | "coupon" | "events" | "partner" | "userActivity" | "_id" | "game" | "school" | "affiliate" | "permissions" | "stripe" | "totalOverallPoints"> & {
380
+ type SchemaUserAssociatedResourcesType = {
381
+ events: ObjectId[];
382
+ partners: ObjectId[];
383
+ vendors: ObjectId[];
384
+ };
385
+ type SchemaUserType = Omit<UserType, "vendor" | "coupon" | "events" | "partner" | "userActivity" | "_id" | "game" | "school" | "affiliate" | "associatedResources" | "permissions" | "stripe" | "totalOverallPoints"> & {
349
386
  _id: ObjectId;
350
387
  affiliate: ObjectId;
388
+ associatedResources?: SchemaUserAssociatedResourcesType | null;
351
389
  coupon: ObjectId;
352
390
  events: ObjectId[];
353
391
  game: ObjectId;
@@ -389,9 +427,10 @@ type SchemaStripeSubscription = StripeSubscription & {
389
427
  subscriptionMutationLockExpiresAt?: Date;
390
428
  subscriptionMutationLockId?: string;
391
429
  };
392
- declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUserType, {}, {}> & Omit<UserType, "_id" | "vendor" | "coupon" | "events" | "partner" | "userActivity" | "game" | "school" | "affiliate" | "permissions" | "stripe" | "totalOverallPoints"> & {
430
+ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUserType, {}, {}> & Omit<UserType, "_id" | "vendor" | "coupon" | "events" | "partner" | "userActivity" | "game" | "school" | "affiliate" | "associatedResources" | "permissions" | "stripe" | "totalOverallPoints"> & {
393
431
  _id: ObjectId;
394
432
  affiliate: ObjectId;
433
+ associatedResources?: SchemaUserAssociatedResourcesType | null;
395
434
  coupon: ObjectId;
396
435
  events: ObjectId[];
397
436
  game: ObjectId;
@@ -442,4 +481,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
442
481
  __v: number;
443
482
  }, any>;
444
483
 
445
- export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, RelationModel as R, type SchemaOwnerType as S, UserModel as U, ContactDetailsSchema as a, RelationTypeSchema as b, ResourceImageTypeSchema as c, type SchemaAffiliateResourceType as d, type SchemaAffiliateReward as e, type SchemaRelatedPostType as f, type SchemaRelationType as g, type SchemaStripeSubscription as h, type SchemaUserActivityEvent as i, type SchemaUserType as j, SocialMediaTypeSchema as k, baseResourceFields as l, dateTimeSchema as m, locationGeoSchema as n, locationsSchema as o, relationDatesSchema as p, relatedPostSchema as r, socialShareResourceSchema as s, termsAgreementSchema as t, userLicenseSchema as u };
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 };
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { OwnerType, 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, RelationType, RelationDate, StripeSubscription, EnumBillingPeriod, EnumUserLicence, UserActivityEvent, UserType, 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
 
@@ -9,6 +9,10 @@ type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
9
9
  type SchemaOwnerType = Omit<OwnerType, "userId"> & {
10
10
  userId: ObjectId;
11
11
  };
12
+ type SchemaAssociateType = Omit<AssociateType, "userId" | "status"> & {
13
+ status: EnumAssociateStatus;
14
+ userId: ObjectId;
15
+ };
12
16
  declare const OwnerTypeSchema: mongoose__default.Schema<SchemaOwnerType, mongoose__default.Model<SchemaOwnerType, any, any, any, mongoose__default.Document<unknown, any, SchemaOwnerType, any, {}> & Omit<OwnerType, "userId"> & {
13
17
  userId: ObjectId;
14
18
  } & {
@@ -20,6 +24,18 @@ declare const OwnerTypeSchema: mongoose__default.Schema<SchemaOwnerType, mongoos
20
24
  } & {
21
25
  __v: number;
22
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"> & {
28
+ status: EnumAssociateStatus;
29
+ userId: ObjectId;
30
+ } & {
31
+ _id: mongoose__default.Types.ObjectId;
32
+ } & {
33
+ __v: number;
34
+ }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaAssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaAssociateType>, {}, mongoose__default.DefaultSchemaOptions> & mongoose__default.FlatRecord<SchemaAssociateType> & {
35
+ _id: mongoose__default.Types.ObjectId;
36
+ } & {
37
+ __v: number;
38
+ }>;
23
39
  declare const SocialMediaTypeSchema: mongoose__default.Schema<SocialMediaType, mongoose__default.Model<SocialMediaType, any, any, any, mongoose__default.Document<unknown, any, SocialMediaType, any, {}> & SocialMediaType & {
24
40
  _id: mongoose__default.Types.ObjectId;
25
41
  } & {
@@ -139,6 +155,22 @@ declare const baseResourceFields: {
139
155
  required: boolean;
140
156
  type: DateConstructor;
141
157
  };
158
+ associates: {
159
+ default: never[];
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"> & {
162
+ status: EnumAssociateStatus;
163
+ userId: ObjectId;
164
+ } & {
165
+ _id: mongoose__default.Types.ObjectId;
166
+ } & {
167
+ __v: number;
168
+ }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaAssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaAssociateType>, {}, mongoose__default.DefaultSchemaOptions> & mongoose__default.FlatRecord<SchemaAssociateType> & {
169
+ _id: mongoose__default.Types.ObjectId;
170
+ } & {
171
+ __v: number;
172
+ }>[];
173
+ };
142
174
  contactDetails: {
143
175
  required: boolean;
144
176
  type: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
@@ -345,9 +377,15 @@ declare const RelationModel: mongoose__default.Model<SchemaRelationType, {}, {},
345
377
  type SchemaUserActivityEvent = Omit<UserActivityEvent, "resourceId"> & {
346
378
  resourceId: ObjectId;
347
379
  };
348
- type SchemaUserType = Omit<UserType, "vendor" | "coupon" | "events" | "partner" | "userActivity" | "_id" | "game" | "school" | "affiliate" | "permissions" | "stripe" | "totalOverallPoints"> & {
380
+ type SchemaUserAssociatedResourcesType = {
381
+ events: ObjectId[];
382
+ partners: ObjectId[];
383
+ vendors: ObjectId[];
384
+ };
385
+ type SchemaUserType = Omit<UserType, "vendor" | "coupon" | "events" | "partner" | "userActivity" | "_id" | "game" | "school" | "affiliate" | "associatedResources" | "permissions" | "stripe" | "totalOverallPoints"> & {
349
386
  _id: ObjectId;
350
387
  affiliate: ObjectId;
388
+ associatedResources?: SchemaUserAssociatedResourcesType | null;
351
389
  coupon: ObjectId;
352
390
  events: ObjectId[];
353
391
  game: ObjectId;
@@ -389,9 +427,10 @@ type SchemaStripeSubscription = StripeSubscription & {
389
427
  subscriptionMutationLockExpiresAt?: Date;
390
428
  subscriptionMutationLockId?: string;
391
429
  };
392
- declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUserType, {}, {}> & Omit<UserType, "_id" | "vendor" | "coupon" | "events" | "partner" | "userActivity" | "game" | "school" | "affiliate" | "permissions" | "stripe" | "totalOverallPoints"> & {
430
+ declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUserType, {}, {}> & Omit<UserType, "_id" | "vendor" | "coupon" | "events" | "partner" | "userActivity" | "game" | "school" | "affiliate" | "associatedResources" | "permissions" | "stripe" | "totalOverallPoints"> & {
393
431
  _id: ObjectId;
394
432
  affiliate: ObjectId;
433
+ associatedResources?: SchemaUserAssociatedResourcesType | null;
395
434
  coupon: ObjectId;
396
435
  events: ObjectId[];
397
436
  game: ObjectId;
@@ -442,4 +481,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
442
481
  __v: number;
443
482
  }, any>;
444
483
 
445
- export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, RelationModel as R, type SchemaOwnerType as S, UserModel as U, ContactDetailsSchema as a, RelationTypeSchema as b, ResourceImageTypeSchema as c, type SchemaAffiliateResourceType as d, type SchemaAffiliateReward as e, type SchemaRelatedPostType as f, type SchemaRelationType as g, type SchemaStripeSubscription as h, type SchemaUserActivityEvent as i, type SchemaUserType as j, SocialMediaTypeSchema as k, baseResourceFields as l, dateTimeSchema as m, locationGeoSchema as n, locationsSchema as o, relationDatesSchema as p, relatedPostSchema as r, socialShareResourceSchema as s, termsAgreementSchema as t, userLicenseSchema as u };
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 };
@@ -698,6 +698,7 @@ var ChatReportModel = mongoose8.models.ChatReport || mongoose8.model("ChatReport
698
698
 
699
699
  // src/mongoose/global.ts
700
700
  import {
701
+ EnumAssociateStatus,
701
702
  EnumEventDateStatus,
702
703
  EnumPostType,
703
704
  EnumUserLicence as EnumUserLicence2
@@ -716,6 +717,25 @@ var OwnerTypeSchema = new MongooseSchema5(
716
717
  { _id: false }
717
718
  // Prevents Mongoose from creating an additional _id field for subdocuments
718
719
  );
720
+ var AssociateTypeSchema = new MongooseSchema5(
721
+ {
722
+ addedAt: { default: Date.now, required: false, type: Date },
723
+ email: { lowercase: true, required: true, trim: true, type: String },
724
+ respondedAt: { default: null, required: false, type: Date },
725
+ status: {
726
+ default: EnumAssociateStatus.PENDING,
727
+ enum: Object.values(EnumAssociateStatus),
728
+ required: true,
729
+ type: String
730
+ },
731
+ userId: {
732
+ ref: "User",
733
+ required: true,
734
+ type: mongoose9.Schema.Types.ObjectId
735
+ }
736
+ },
737
+ { _id: false }
738
+ );
719
739
  var SocialMediaTypeSchema = new MongooseSchema5(
720
740
  {
721
741
  link: { required: true, type: String },
@@ -881,6 +901,7 @@ var baseResourceFields = {
881
901
  type: [mongoose9.Schema.Types.ObjectId]
882
902
  },
883
903
  approvedAt: { default: null, required: false, type: Date },
904
+ associates: { default: [], required: false, type: [AssociateTypeSchema] },
884
905
  contactDetails: { required: false, type: ContactDetailsSchema },
885
906
  cover: {
886
907
  required: true,
@@ -1153,6 +1174,8 @@ var schema8 = new MongooseSchema7(
1153
1174
  missingFields: { required: false, type: [String] },
1154
1175
  name: { required: true, type: String },
1155
1176
  openingHours: { required: false, type: [String] },
1177
+ publicationCityUnknown: { default: false, required: false, type: Boolean },
1178
+ publicationKey: { required: false, type: String },
1156
1179
  rainOrShine: { required: true, type: Boolean },
1157
1180
  rating: { required: false, type: Number },
1158
1181
  region: { required: false, type: String },
@@ -1164,6 +1187,7 @@ var schema8 = new MongooseSchema7(
1164
1187
  required: false,
1165
1188
  type: mongoose11.Schema.Types.ObjectId
1166
1189
  },
1190
+ reviewerEditedAt: { default: null, required: false, type: Date },
1167
1191
  reviewStatus: {
1168
1192
  default: EnumImportedMarketReviewStatus.PENDING,
1169
1193
  enum: Object.values(EnumImportedMarketReviewStatus),
@@ -1200,6 +1224,16 @@ schema8.index({
1200
1224
  _id: 1
1201
1225
  });
1202
1226
  schema8.index({ region: 1, searchName: 1 });
1227
+ schema8.index(
1228
+ { publicationKey: 1 },
1229
+ {
1230
+ name: "ai_market_publication_key",
1231
+ partialFilterExpression: {
1232
+ publicationKey: { $exists: true, $type: "string" }
1233
+ },
1234
+ unique: true
1235
+ }
1236
+ );
1203
1237
  schema8.index({ slug: 1 });
1204
1238
  schema8.index({ reviewStatus: 1 });
1205
1239
  schema8.index({ description: "text", name: "text" });
@@ -1783,6 +1817,29 @@ var userOverallPointsSchema = new MongooseSchema16(
1783
1817
  },
1784
1818
  { _id: false }
1785
1819
  );
1820
+ var userAssociatedResourcesSchema = new MongooseSchema16(
1821
+ {
1822
+ events: {
1823
+ default: [],
1824
+ ref: "Event",
1825
+ required: false,
1826
+ type: [mongoose20.Schema.Types.ObjectId]
1827
+ },
1828
+ partners: {
1829
+ default: [],
1830
+ ref: "Partner",
1831
+ required: false,
1832
+ type: [mongoose20.Schema.Types.ObjectId]
1833
+ },
1834
+ vendors: {
1835
+ default: [],
1836
+ ref: "Vendor",
1837
+ required: false,
1838
+ type: [mongoose20.Schema.Types.ObjectId]
1839
+ }
1840
+ },
1841
+ { _id: false }
1842
+ );
1786
1843
  var schema15 = new MongooseSchema16(
1787
1844
  {
1788
1845
  active: { default: false, required: true, type: Boolean },
@@ -1791,6 +1848,11 @@ var schema15 = new MongooseSchema16(
1791
1848
  required: false,
1792
1849
  type: mongoose20.Schema.Types.ObjectId
1793
1850
  },
1851
+ associatedResources: {
1852
+ default: () => ({ events: [], partners: [], vendors: [] }),
1853
+ required: false,
1854
+ type: userAssociatedResourcesSchema
1855
+ },
1794
1856
  avatar: {
1795
1857
  required: false,
1796
1858
  type: ResourceImageTypeSchema
@@ -1801,7 +1863,10 @@ var schema15 = new MongooseSchema16(
1801
1863
  type: mongoose20.Schema.Types.ObjectId
1802
1864
  },
1803
1865
  deletedAt: { default: null, required: false, type: Date },
1804
- email: { required: true, type: String },
1866
+ // `normalizeEmail` (`cluemart-shared`) is trim + lower-case; keeping the same
1867
+ // rule here means every write path — resolvers, seeds, scripts — stores the
1868
+ // comparable form, not only the clients that validate through `emailRequiredSchema`.
1869
+ email: { lowercase: true, required: true, trim: true, type: String },
1805
1870
  emailSentFor: {
1806
1871
  enum: Object.values(EnumNotificationResourceType2),
1807
1872
  required: false,
@@ -1916,6 +1981,9 @@ schema15.index({ "licences.expiryDate": 1 });
1916
1981
  schema15.index({ "licences.licenceType": 1 });
1917
1982
  schema15.index({ promoCodes: 1, active: 1, deletedAt: 1 });
1918
1983
  schema15.index({ email: "text", firstName: "text", lastName: "text" });
1984
+ schema15.index({ "associatedResources.events": 1 });
1985
+ schema15.index({ "associatedResources.partners": 1 });
1986
+ schema15.index({ "associatedResources.vendors": 1 });
1919
1987
  var UserModel = mongoose20.models.User || mongoose20.model("User", schema15);
1920
1988
 
1921
1989
  // src/mongoose/VerificationToken.ts
@@ -2052,6 +2120,7 @@ schema17.index({
2052
2120
  name: "text"
2053
2121
  });
2054
2122
  schema17.index({ deletedAt: 1, "owner.userId": 1 });
2123
+ schema17.index({ "associates.userId": 1, deletedAt: 1 });
2055
2124
  schema17.plugin(searchNamePlugin);
2056
2125
  var VendorModel = mongoose22.models.Vendor || mongoose22.model("Vendor", schema17);
2057
2126
 
@@ -2159,6 +2228,13 @@ var schema20 = new MongooseSchema21(
2159
2228
  {
2160
2229
  ...baseResourceFields,
2161
2230
  // Importing base resource fields from global.ts
2231
+ // Claim link of the AI-imported market this event was created from, the
2232
+ // counterpart of `googlePlaceId`. Written once by `createEvent`.
2233
+ aiImportedMarketSourceKey: {
2234
+ default: null,
2235
+ required: false,
2236
+ type: String
2237
+ },
2162
2238
  claimed: { default: true, required: false, type: Boolean },
2163
2239
  dateTime: { required: true, type: [dateTimeSchema] },
2164
2240
  eventInfoId: {
@@ -2198,6 +2274,7 @@ schema20.index({ "dateTime.dateStatus": 1 });
2198
2274
  schema20.index({ slug: 1 });
2199
2275
  schema20.index({ description: "text", name: "text", tags: "text" });
2200
2276
  schema20.index({ deletedAt: 1, "owner.userId": 1 });
2277
+ schema20.index({ "associates.userId": 1, deletedAt: 1 });
2201
2278
  schema20.plugin(searchNamePlugin);
2202
2279
  var EventModel = mongoose25.models.Event || mongoose25.model("Event", schema20);
2203
2280
 
@@ -2244,6 +2321,7 @@ schema22.index({ "location.geo": "2dsphere" });
2244
2321
  schema22.index({ slug: 1 });
2245
2322
  schema22.index({ name: "text", description: "text" });
2246
2323
  schema22.index({ "owner.userId": 1, deletedAt: 1 });
2324
+ schema22.index({ "associates.userId": 1, deletedAt: 1 });
2247
2325
  schema22.plugin(searchNamePlugin);
2248
2326
  var PartnerModel = mongoose27.models.Partner || mongoose27.model("Partner", schema22);
2249
2327
 
@@ -2911,6 +2989,7 @@ export {
2911
2989
  ChatModel,
2912
2990
  ChatReportModel,
2913
2991
  OwnerTypeSchema,
2992
+ AssociateTypeSchema,
2914
2993
  SocialMediaTypeSchema,
2915
2994
  ResourceImageTypeSchema,
2916
2995
  CategorySchema,
@@ -2959,4 +3038,4 @@ export {
2959
3038
  ImpersonationSessionModel,
2960
3039
  ImpersonationAuditModel
2961
3040
  };
2962
- //# sourceMappingURL=chunk-TSKI3WB2.mjs.map
3041
+ //# sourceMappingURL=chunk-ABW2L2HY.mjs.map