@timardex/cluemart-server-shared 4.1.0 → 4.2.1

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,
@@ -1796,6 +1817,29 @@ var userOverallPointsSchema = new MongooseSchema16(
1796
1817
  },
1797
1818
  { _id: false }
1798
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
+ );
1799
1843
  var schema15 = new MongooseSchema16(
1800
1844
  {
1801
1845
  active: { default: false, required: true, type: Boolean },
@@ -1804,6 +1848,11 @@ var schema15 = new MongooseSchema16(
1804
1848
  required: false,
1805
1849
  type: mongoose20.Schema.Types.ObjectId
1806
1850
  },
1851
+ associatedResources: {
1852
+ default: () => ({ events: [], partners: [], vendors: [] }),
1853
+ required: false,
1854
+ type: userAssociatedResourcesSchema
1855
+ },
1807
1856
  avatar: {
1808
1857
  required: false,
1809
1858
  type: ResourceImageTypeSchema
@@ -1814,7 +1863,10 @@ var schema15 = new MongooseSchema16(
1814
1863
  type: mongoose20.Schema.Types.ObjectId
1815
1864
  },
1816
1865
  deletedAt: { default: null, required: false, type: Date },
1817
- 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 },
1818
1870
  emailSentFor: {
1819
1871
  enum: Object.values(EnumNotificationResourceType2),
1820
1872
  required: false,
@@ -1929,6 +1981,10 @@ schema15.index({ "licences.expiryDate": 1 });
1929
1981
  schema15.index({ "licences.licenceType": 1 });
1930
1982
  schema15.index({ promoCodes: 1, active: 1, deletedAt: 1 });
1931
1983
  schema15.index({ email: "text", firstName: "text", lastName: "text" });
1984
+ schema15.index({ email: 1 }, { name: "email_unique", unique: true });
1985
+ schema15.index({ "associatedResources.events": 1 });
1986
+ schema15.index({ "associatedResources.partners": 1 });
1987
+ schema15.index({ "associatedResources.vendors": 1 });
1932
1988
  var UserModel = mongoose20.models.User || mongoose20.model("User", schema15);
1933
1989
 
1934
1990
  // src/mongoose/VerificationToken.ts
@@ -2065,6 +2121,7 @@ schema17.index({
2065
2121
  name: "text"
2066
2122
  });
2067
2123
  schema17.index({ deletedAt: 1, "owner.userId": 1 });
2124
+ schema17.index({ "associates.userId": 1, deletedAt: 1 });
2068
2125
  schema17.plugin(searchNamePlugin);
2069
2126
  var VendorModel = mongoose22.models.Vendor || mongoose22.model("Vendor", schema17);
2070
2127
 
@@ -2218,6 +2275,7 @@ schema20.index({ "dateTime.dateStatus": 1 });
2218
2275
  schema20.index({ slug: 1 });
2219
2276
  schema20.index({ description: "text", name: "text", tags: "text" });
2220
2277
  schema20.index({ deletedAt: 1, "owner.userId": 1 });
2278
+ schema20.index({ "associates.userId": 1, deletedAt: 1 });
2221
2279
  schema20.plugin(searchNamePlugin);
2222
2280
  var EventModel = mongoose25.models.Event || mongoose25.model("Event", schema20);
2223
2281
 
@@ -2264,6 +2322,7 @@ schema22.index({ "location.geo": "2dsphere" });
2264
2322
  schema22.index({ slug: 1 });
2265
2323
  schema22.index({ name: "text", description: "text" });
2266
2324
  schema22.index({ "owner.userId": 1, deletedAt: 1 });
2325
+ schema22.index({ "associates.userId": 1, deletedAt: 1 });
2267
2326
  schema22.plugin(searchNamePlugin);
2268
2327
  var PartnerModel = mongoose27.models.Partner || mongoose27.model("Partner", schema22);
2269
2328
 
@@ -2931,6 +2990,7 @@ export {
2931
2990
  ChatModel,
2932
2991
  ChatReportModel,
2933
2992
  OwnerTypeSchema,
2993
+ AssociateTypeSchema,
2934
2994
  SocialMediaTypeSchema,
2935
2995
  ResourceImageTypeSchema,
2936
2996
  CategorySchema,
@@ -2979,4 +3039,4 @@ export {
2979
3039
  ImpersonationSessionModel,
2980
3040
  ImpersonationAuditModel
2981
3041
  };
2982
- //# sourceMappingURL=chunk-U5WL3CZR.mjs.map
3042
+ //# sourceMappingURL=chunk-HHATQITH.mjs.map