@timardex/cluemart-server-shared 1.0.297 → 1.0.300

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,7 +1,7 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, RelationType, AffiliateRewardType, AffiliateResourceType, AffiliateType } from '@timardex/cluemart-shared';
2
+ import { RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, RelationType, AffiliateRewardType, AffiliateResourceType, AffiliateType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from './Chat-Bnqec74U.js';
4
+ import { O as ObjectId } from './Chat-Wn7yfc3v.mjs';
5
5
 
6
6
  type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
7
7
  postId: ObjectId;
@@ -56,15 +56,6 @@ declare const userLicenseSchema: mongoose__default.Schema<UserLicenceType, mongo
56
56
  } & {
57
57
  __v: number;
58
58
  }>;
59
- declare const associatesSchema: mongoose__default.Schema<AssociateType, mongoose__default.Model<AssociateType, any, any, any, mongoose__default.Document<unknown, any, AssociateType, any, {}> & AssociateType & {
60
- _id: mongoose__default.Types.ObjectId;
61
- } & {
62
- __v: number;
63
- }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, AssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<AssociateType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<AssociateType> & {
64
- _id: mongoose__default.Types.ObjectId;
65
- } & {
66
- __v: number;
67
- }>;
68
59
  declare const ContactDetailsSchema: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
69
60
  _id: mongoose__default.Types.ObjectId;
70
61
  } & {
@@ -178,18 +169,6 @@ declare const baseResourceFields: {
178
169
  required: boolean;
179
170
  type: DateConstructor;
180
171
  };
181
- associates: {
182
- required: boolean;
183
- type: mongoose__default.Schema<AssociateType, mongoose__default.Model<AssociateType, any, any, any, mongoose__default.Document<unknown, any, AssociateType, any, {}> & AssociateType & {
184
- _id: mongoose__default.Types.ObjectId;
185
- } & {
186
- __v: number;
187
- }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, AssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<AssociateType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<AssociateType> & {
188
- _id: mongoose__default.Types.ObjectId;
189
- } & {
190
- __v: number;
191
- }>[];
192
- };
193
172
  contactDetails: {
194
173
  required: boolean;
195
174
  type: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
@@ -410,4 +389,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
410
389
  __v: number;
411
390
  }, any>;
412
391
 
413
- export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, ResourceImageTypeSchema as R, type SchemaOwnerType as S, type SchemaRelatedPostType as a, SocialMediaTypeSchema as b, associatesSchema as c, ContactDetailsSchema as d, dateTimeSchema as e, locationsSchema as f, relatedPostSchema as g, baseResourceFields as h, relationDatesSchema as i, type SchemaRelationType as j, RelationTypeSchema as k, locationGeoSchema as l, RelationModel as m, type SchemaAffiliateReward as n, type SchemaAffiliateResourceType as o, resourceRelationsSchema as r, socialShareResourceSchema as s, termsAgreementSchema as t, userLicenseSchema as u };
392
+ export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, ResourceImageTypeSchema as R, type SchemaOwnerType as S, type SchemaRelatedPostType as a, SocialMediaTypeSchema as b, ContactDetailsSchema as c, dateTimeSchema as d, locationsSchema as e, relatedPostSchema as f, baseResourceFields as g, relationDatesSchema as h, type SchemaRelationType as i, RelationTypeSchema as j, RelationModel as k, locationGeoSchema as l, type SchemaAffiliateReward as m, type SchemaAffiliateResourceType as n, resourceRelationsSchema as r, socialShareResourceSchema as s, termsAgreementSchema as t, userLicenseSchema as u };
@@ -1,7 +1,7 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, RelationType, AffiliateRewardType, AffiliateResourceType, AffiliateType } from '@timardex/cluemart-shared';
2
+ import { RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, RelationType, AffiliateRewardType, AffiliateResourceType, AffiliateType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from './Chat-Bnqec74U.mjs';
4
+ import { O as ObjectId } from './Chat-Wn7yfc3v.js';
5
5
 
6
6
  type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
7
7
  postId: ObjectId;
@@ -56,15 +56,6 @@ declare const userLicenseSchema: mongoose__default.Schema<UserLicenceType, mongo
56
56
  } & {
57
57
  __v: number;
58
58
  }>;
59
- declare const associatesSchema: mongoose__default.Schema<AssociateType, mongoose__default.Model<AssociateType, any, any, any, mongoose__default.Document<unknown, any, AssociateType, any, {}> & AssociateType & {
60
- _id: mongoose__default.Types.ObjectId;
61
- } & {
62
- __v: number;
63
- }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, AssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<AssociateType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<AssociateType> & {
64
- _id: mongoose__default.Types.ObjectId;
65
- } & {
66
- __v: number;
67
- }>;
68
59
  declare const ContactDetailsSchema: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
69
60
  _id: mongoose__default.Types.ObjectId;
70
61
  } & {
@@ -178,18 +169,6 @@ declare const baseResourceFields: {
178
169
  required: boolean;
179
170
  type: DateConstructor;
180
171
  };
181
- associates: {
182
- required: boolean;
183
- type: mongoose__default.Schema<AssociateType, mongoose__default.Model<AssociateType, any, any, any, mongoose__default.Document<unknown, any, AssociateType, any, {}> & AssociateType & {
184
- _id: mongoose__default.Types.ObjectId;
185
- } & {
186
- __v: number;
187
- }, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, AssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<AssociateType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<AssociateType> & {
188
- _id: mongoose__default.Types.ObjectId;
189
- } & {
190
- __v: number;
191
- }>[];
192
- };
193
172
  contactDetails: {
194
173
  required: boolean;
195
174
  type: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
@@ -410,4 +389,4 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
410
389
  __v: number;
411
390
  }, any>;
412
391
 
413
- export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, ResourceImageTypeSchema as R, type SchemaOwnerType as S, type SchemaRelatedPostType as a, SocialMediaTypeSchema as b, associatesSchema as c, ContactDetailsSchema as d, dateTimeSchema as e, locationsSchema as f, relatedPostSchema as g, baseResourceFields as h, relationDatesSchema as i, type SchemaRelationType as j, RelationTypeSchema as k, locationGeoSchema as l, RelationModel as m, type SchemaAffiliateReward as n, type SchemaAffiliateResourceType as o, resourceRelationsSchema as r, socialShareResourceSchema as s, termsAgreementSchema as t, userLicenseSchema as u };
392
+ export { AffiliateModel as A, CategorySchema as C, OwnerTypeSchema as O, ResourceImageTypeSchema as R, type SchemaOwnerType as S, type SchemaRelatedPostType as a, SocialMediaTypeSchema as b, ContactDetailsSchema as c, dateTimeSchema as d, locationsSchema as e, relatedPostSchema as f, baseResourceFields as g, relationDatesSchema as h, type SchemaRelationType as i, RelationTypeSchema as j, RelationModel as k, locationGeoSchema as l, type SchemaAffiliateReward as m, type SchemaAffiliateResourceType as n, resourceRelationsSchema as r, socialShareResourceSchema as s, termsAgreementSchema as t, userLicenseSchema as u };
@@ -26,7 +26,7 @@ declare enum EnumPubSubEvents {
26
26
  }
27
27
  interface AuthUser {
28
28
  email: string;
29
- role: EnumUserRole;
29
+ roles: EnumUserRole[];
30
30
  userId: ObjectId;
31
31
  }
32
32
  interface SubscriptionPayload {
@@ -26,7 +26,7 @@ declare enum EnumPubSubEvents {
26
26
  }
27
27
  interface AuthUser {
28
28
  email: string;
29
- role: EnumUserRole;
29
+ roles: EnumUserRole[];
30
30
  userId: ObjectId;
31
31
  }
32
32
  interface SubscriptionPayload {
@@ -14,4 +14,4 @@ export {
14
14
  mongoose,
15
15
  EnumPubSubEvents
16
16
  };
17
- //# sourceMappingURL=chunk-YXUJ4VQU.mjs.map
17
+ //# sourceMappingURL=chunk-6PNG5BI5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/index.ts"],"sourcesContent":["import { EnumUserRole } from \"@timardex/cluemart-shared\";\nimport { NotificationCount } from \"@timardex/cluemart-shared/types\";\nimport express from \"express\";\nimport mongoose from \"mongoose\";\n\nimport { SchemaChatType } from \"../mongoose/chat/Chat\";\nimport { SchemaNotificationType } from \"../mongoose/Notification\";\n\n// chnage to export type ObjectId = mongoose.Types.ObjectId;\n// chnage in server when setting decideGameType\nexport type ObjectId = mongoose.Types.ObjectId;\n\nexport enum EnumPubSubEvents {\n GET_CHAT_MESSAGE = \"GET_CHAT_MESSAGE\",\n GET_NOTIFICATIONS = \"GET_NOTIFICATIONS\",\n GET_NOTIFICATIONS_COUNT = \"GET_NOTIFICATIONS_COUNT\",\n USER_TYPING = \"USER_TYPING\",\n}\n\nexport interface AuthUser {\n email: string;\n roles: EnumUserRole[];\n userId: ObjectId;\n}\n\nexport interface SubscriptionPayload {\n getChatMessage?: SchemaChatType;\n userTyping?: SchemaChatType; // NOT USED\n getNotifications?: SchemaNotificationType[];\n // Used only for filtering; not part of the GraphQL schema output\n getNotificationsUserId?: ObjectId;\n getNotificationsCount?: NotificationCount & { userId: ObjectId };\n}\n\nexport interface GraphQLContext {\n appVersion: string | null;\n user: AuthUser | null;\n pubsub: {\n publish: (\n eventName: EnumPubSubEvents,\n payload: SubscriptionPayload,\n ) => void;\n subscribe: (eventName: EnumPubSubEvents) => AsyncIterable<any>;\n };\n request: express.Request;\n response: express.Response;\n}\n\nexport { mongoose, express };\n"],"mappings":";AAEA,OAAO,aAAa;AACpB,OAAO,cAAc;AASd,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;","names":["EnumPubSubEvents"]}
@@ -3278,9 +3278,6 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
3278
3278
  return EnumRelationResource22;
3279
3279
  })(EnumRelationResource || {});
3280
3280
  var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
3281
- EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_EVENT"] = "added_as_associate_event";
3282
- EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_PARTNER"] = "added_as_associate_partner";
3283
- EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_VENDOR"] = "added_as_associate_vendor";
3284
3281
  EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
3285
3282
  EnumNotificationResourceType22["AFFILIATE_REWARD_RECEIVED"] = "affiliate_reward_received";
3286
3283
  EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
@@ -3352,13 +3349,13 @@ var EnumUserLicence = /* @__PURE__ */ ((EnumUserLicence22) => {
3352
3349
  })(EnumUserLicence || {});
3353
3350
  var EnumUserRole = /* @__PURE__ */ ((EnumUserRole22) => {
3354
3351
  EnumUserRole22["ADMIN"] = "admin";
3355
- EnumUserRole22["SUPER_ADMIN"] = "super_admin";
3356
- EnumUserRole22["CUSTOMER"] = "customer";
3357
- EnumUserRole22["MARKETING"] = "marketing";
3358
- EnumUserRole22["MODERATOR"] = "moderator";
3359
- EnumUserRole22["SUPPORT"] = "support";
3360
3352
  EnumUserRole22["AFFILIATE"] = "affiliate";
3353
+ EnumUserRole22["CUSTOMER"] = "customer";
3354
+ EnumUserRole22["EVENT"] = "event";
3355
+ EnumUserRole22["PARTNER"] = "partner";
3361
3356
  EnumUserRole22["SCHOOL"] = "school";
3357
+ EnumUserRole22["SUPER_ADMIN"] = "super_admin";
3358
+ EnumUserRole22["VENDOR"] = "vendor";
3362
3359
  return EnumUserRole22;
3363
3360
  })(EnumUserRole || {});
3364
3361
  var EnumEventDateStatus = /* @__PURE__ */ ((EnumEventDateStatus22) => {
@@ -4944,17 +4941,6 @@ var LICENCE_FIELDS_FRAGMENT = gql`
4944
4941
  prevLicenceType
4945
4942
  }
4946
4943
  `;
4947
- var ASSOCIATES_FIELDS_FRAGMENT = gql`
4948
- fragment AssociatesFields on AssociateType {
4949
- email
4950
- resourceId
4951
- resourceType
4952
- licence {
4953
- ...LicenceFields
4954
- }
4955
- }
4956
- ${LICENCE_FIELDS_FRAGMENT}
4957
- `;
4958
4944
  var TERMS_AGREEMENT_FIELDS_FRAGMENT = gql`
4959
4945
  fragment TermsAgreementFields on TermsAgreementType {
4960
4946
  appBuildNumber
@@ -5045,9 +5031,6 @@ var USER_FIELDS_FRAGMENT = gql`
5045
5031
  fragment UserFields on UserType {
5046
5032
  _id
5047
5033
  active
5048
- associates {
5049
- ...AssociatesFields
5050
- }
5051
5034
  affiliate
5052
5035
  avatar {
5053
5036
  ...ResourceImageFields
@@ -5070,8 +5053,9 @@ var USER_FIELDS_FRAGMENT = gql`
5070
5053
  overallPoints
5071
5054
  platform
5072
5055
  preferredRegion
5056
+ permissions
5073
5057
  promoCodes
5074
- role
5058
+ roles
5075
5059
  redeemedRewards {
5076
5060
  ...RedeemedRewardFields
5077
5061
  }
@@ -5086,7 +5070,6 @@ var USER_FIELDS_FRAGMENT = gql`
5086
5070
  updatedAt
5087
5071
  }
5088
5072
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5089
- ${ASSOCIATES_FIELDS_FRAGMENT}
5090
5073
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5091
5074
  ${USER_ACTIVITY_FIELDS_FRAGMENT}
5092
5075
  ${LICENCE_FIELDS_FRAGMENT}
@@ -5232,9 +5215,6 @@ var EVENT = gql`
5232
5215
  fragment EventFields on EventType {
5233
5216
  _id
5234
5217
  active
5235
- associates {
5236
- ...AssociatesFields
5237
- }
5238
5218
  adIds
5239
5219
  approvedAt
5240
5220
  cover {
@@ -5307,7 +5287,6 @@ var EVENT = gql`
5307
5287
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5308
5288
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5309
5289
  ${POSTER_USAGE_FIELDS_FRAGMENT}
5310
- ${ASSOCIATES_FIELDS_FRAGMENT}
5311
5290
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5312
5291
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5313
5292
  ${RELATION_DATES_FRAGMENT}
@@ -5420,9 +5399,6 @@ var VENDOR = gql`
5420
5399
  fragment VendorFields on VendorType {
5421
5400
  _id
5422
5401
  active
5423
- associates {
5424
- ...AssociatesFields
5425
- }
5426
5402
  adIds
5427
5403
  approvedAt
5428
5404
  availability {
@@ -5513,7 +5489,6 @@ var VENDOR = gql`
5513
5489
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5514
5490
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5515
5491
  ${POSTER_USAGE_FIELDS_FRAGMENT}
5516
- ${ASSOCIATES_FIELDS_FRAGMENT}
5517
5492
  ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
5518
5493
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5519
5494
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
@@ -5666,9 +5641,6 @@ var PARTNER = gql`
5666
5641
  fragment PartnerFields on PartnerType {
5667
5642
  _id
5668
5643
  active
5669
- associates {
5670
- ...AssociatesFields
5671
- }
5672
5644
  adIds
5673
5645
  approvedAt
5674
5646
  cover {
@@ -5719,7 +5691,6 @@ var PARTNER = gql`
5719
5691
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5720
5692
  ${LOCATION_FIELDS_FRAGMENT}
5721
5693
  ${OWNER_FIELDS_FRAGMENT}
5722
- ${ASSOCIATES_FIELDS_FRAGMENT}
5723
5694
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5724
5695
  ${POSTER_USAGE_FIELDS_FRAGMENT}
5725
5696
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
@@ -6166,7 +6137,6 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql`
6166
6137
  var CHAT_PARTICIPANT = gql`
6167
6138
  fragment ChatParticipantFields on ChatParticipantType {
6168
6139
  active
6169
- isAssociate
6170
6140
  userAvatar
6171
6141
  userEmail
6172
6142
  userId
@@ -7644,7 +7614,6 @@ var MessageSchema = new MongooseSchema2(
7644
7614
  var ParticipantSchema = new MongooseSchema2(
7645
7615
  {
7646
7616
  active: { default: true, required: true, type: Boolean },
7647
- isAssociate: { default: null, required: false, type: Boolean },
7648
7617
  userAvatar: { required: false, type: String },
7649
7618
  userEmail: { required: true, type: String },
7650
7619
  userId: {
@@ -7969,26 +7938,6 @@ var userLicenseSchema = new MongooseSchema6(
7969
7938
  },
7970
7939
  { _id: false, timestamps: false }
7971
7940
  );
7972
- var associatesSchema = new MongooseSchema6(
7973
- {
7974
- email: { required: true, type: String },
7975
- licence: {
7976
- required: true,
7977
- type: userLicenseSchema
7978
- },
7979
- resourceId: {
7980
- required: true,
7981
- type: String
7982
- },
7983
- resourceType: {
7984
- enum: Object.values(EnumResourceType),
7985
- required: true,
7986
- type: String
7987
- }
7988
- },
7989
- { _id: false }
7990
- // Prevents Mongoose from creating an additional _id field for subdocuments
7991
- );
7992
7941
  var ContactDetailsSchema = new MongooseSchema6(
7993
7942
  {
7994
7943
  email: { required: false, type: String },
@@ -8104,10 +8053,6 @@ var baseResourceFields = {
8104
8053
  type: [mongoose6.Schema.Types.ObjectId]
8105
8054
  },
8106
8055
  approvedAt: { default: null, required: false, type: Date },
8107
- associates: {
8108
- required: false,
8109
- type: [associatesSchema]
8110
- },
8111
8056
  contactDetails: { required: false, type: ContactDetailsSchema },
8112
8057
  cover: {
8113
8058
  required: true,
@@ -8251,7 +8196,7 @@ schema4.index({ isRead: 1, userId: 1 });
8251
8196
  schema4.index({ createdAt: -1, userId: 1 });
8252
8197
  var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
8253
8198
 
8254
- // node_modules/@timardex/cluemart-shared/dist/chunk-D33VEY7Q.mjs
8199
+ // node_modules/@timardex/cluemart-shared/dist/chunk-X3OLM35T.mjs
8255
8200
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
8256
8201
  EnumOSPlatform22["ANDROID"] = "android";
8257
8202
  EnumOSPlatform22["IOS"] = "ios";
@@ -8412,10 +8357,6 @@ var schema7 = new MongooseSchema11(
8412
8357
  required: false,
8413
8358
  type: mongoose11.Schema.Types.ObjectId
8414
8359
  },
8415
- associates: {
8416
- required: false,
8417
- type: [associatesSchema]
8418
- },
8419
8360
  avatar: {
8420
8361
  required: false,
8421
8362
  type: ResourceImageTypeSchema
@@ -8476,11 +8417,11 @@ var schema7 = new MongooseSchema11(
8476
8417
  required: false,
8477
8418
  type: String
8478
8419
  },
8479
- role: {
8480
- default: EnumUserRole.CUSTOMER,
8420
+ roles: {
8421
+ default: [EnumUserRole.CUSTOMER],
8481
8422
  enum: Object.values(EnumUserRole),
8482
8423
  required: true,
8483
- type: String
8424
+ type: [String]
8484
8425
  },
8485
8426
  school: {
8486
8427
  ref: "School",
@@ -8515,7 +8456,6 @@ var schema7 = new MongooseSchema11(
8515
8456
  },
8516
8457
  { strict: false, timestamps: true }
8517
8458
  );
8518
- schema7.index({ "associates.email": 1 });
8519
8459
  schema7.index({ "licences.expiryDate": 1 });
8520
8460
  schema7.index({ "licences.licenceType": 1 });
8521
8461
  var UserModel = mongoose11.models.User || mongoose11.model("User", schema7);
@@ -8633,7 +8573,6 @@ schema9.index({ name: 1 });
8633
8573
  schema9.index({ description: 1 });
8634
8574
  schema9.index({ region: 1 });
8635
8575
  schema9.index({ "categories.name": 1 });
8636
- schema9.index({ "associates.email": 1 });
8637
8576
  schema9.index({ slug: 1 });
8638
8577
  var VendorModel = mongoose13.models.Vendor || mongoose13.model("Vendor", schema9);
8639
8578
 
@@ -8772,7 +8711,6 @@ schema12.index({ description: 1 });
8772
8711
  schema12.index({ region: 1 });
8773
8712
  schema12.index({ "location.geo": "2dsphere" });
8774
8713
  schema12.index({ tags: 1 });
8775
- schema12.index({ "associates.email": 1 });
8776
8714
  schema12.index({ deletedAt: 1 });
8777
8715
  schema12.index({ "dateTime.dateStatus": 1 });
8778
8716
  schema12.index({ slug: 1 });
@@ -8801,7 +8739,6 @@ schema13.index({ name: 1 });
8801
8739
  schema13.index({ description: 1 });
8802
8740
  schema13.index({ region: 1 });
8803
8741
  schema13.index({ "location.geo": "2dsphere" });
8804
- schema13.index({ "associates.email": 1 });
8805
8742
  schema13.index({ slug: 1 });
8806
8743
  var PartnerModel = mongoose17.models.Partner || mongoose17.model("Partner", schema13);
8807
8744
 
@@ -9228,7 +9165,6 @@ var AffiliateModel = mongoose25.models.Affiliate || mongoose25.model("Affiliate"
9228
9165
 
9229
9166
  export {
9230
9167
  EnumInviteStatus,
9231
- EnumChatType,
9232
9168
  EnumResourceType,
9233
9169
  EnumNotificationResourceType,
9234
9170
  EnumNotificationType,
@@ -9252,7 +9188,6 @@ export {
9252
9188
  ResourceImageTypeSchema,
9253
9189
  CategorySchema,
9254
9190
  userLicenseSchema,
9255
- associatesSchema,
9256
9191
  ContactDetailsSchema,
9257
9192
  termsAgreementSchema,
9258
9193
  resourceRelationsSchema,
@@ -9280,4 +9215,4 @@ export {
9280
9215
  SchoolModel,
9281
9216
  AffiliateModel
9282
9217
  };
9283
- //# sourceMappingURL=chunk-NBJNO6FV.mjs.map
9218
+ //# sourceMappingURL=chunk-6WS5FH7A.mjs.map