@timardex/cluemart-server-shared 1.0.128 → 1.0.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, CreateBulkNotificationInput, NotificationType, ChatMessageType, ParticipantType, ChatType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType } from '@timardex/cluemart-shared';
2
+ import { AdType, CreateBulkNotificationInput, NotificationType, ChatMessageType, ParticipantType, ChatType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, EnumUserLicence } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
4
  export { default as mongoose } from 'mongoose';
5
5
  import { NotificationCount } from '@timardex/cluemart-shared/types';
@@ -673,10 +673,10 @@ declare function updateAdStatuses(): Promise<void>;
673
673
  * If the user has a Pro Vendor license, they can have multiple associates and access to all availability types.
674
674
  * If they have a Standard Vendor license, their associates are removed and availability is restricted.
675
675
  * @param userId
676
- * @param licenceObject
676
+ * @param licenceType
677
677
  * @returns
678
678
  */
679
- declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceObject: UserLicenceType): Promise<void>;
679
+ declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceType: EnumUserLicence): Promise<void>;
680
680
 
681
681
  /**
682
682
  * Recursively converts all ObjectId fields to strings in an object
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, CreateBulkNotificationInput, NotificationType, ChatMessageType, ParticipantType, ChatType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType } from '@timardex/cluemart-shared';
2
+ import { AdType, CreateBulkNotificationInput, NotificationType, ChatMessageType, ParticipantType, ChatType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, EnumUserLicence } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
4
  export { default as mongoose } from 'mongoose';
5
5
  import { NotificationCount } from '@timardex/cluemart-shared/types';
@@ -673,10 +673,10 @@ declare function updateAdStatuses(): Promise<void>;
673
673
  * If the user has a Pro Vendor license, they can have multiple associates and access to all availability types.
674
674
  * If they have a Standard Vendor license, their associates are removed and availability is restricted.
675
675
  * @param userId
676
- * @param licenceObject
676
+ * @param licenceType
677
677
  * @returns
678
678
  */
679
- declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceObject: UserLicenceType): Promise<void>;
679
+ declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceType: EnumUserLicence): Promise<void>;
680
680
 
681
681
  /**
682
682
  * Recursively converts all ObjectId fields to strings in an object
package/dist/index.mjs CHANGED
@@ -9858,12 +9858,23 @@ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql`
9858
9858
  collected
9859
9859
  shuffled
9860
9860
  todaysLetter
9861
+ todaysClue
9861
9862
  todaysPlacement
9862
9863
  }
9863
9864
  streak
9864
9865
  }
9865
9866
  ${BASE_GAME_FIELDS_FRAGMENT}
9866
9867
  `;
9868
+ var GAME_HISTORY_FIELDS_FRAGMENT = gql`
9869
+ fragment GameHistoryFields on GameHistoryType {
9870
+ gameDate {
9871
+ ...GameDateFields
9872
+ }
9873
+ gameType
9874
+ pointsEarned
9875
+ }
9876
+ ${GAME_DATE_FIELDS_FRAGMENT}
9877
+ `;
9867
9878
  var GAME_FIELDS_FRAGMENT = gql`
9868
9879
  fragment GameFields on GameType {
9869
9880
  _id
@@ -9876,11 +9887,7 @@ var GAME_FIELDS_FRAGMENT = gql`
9876
9887
  }
9877
9888
  }
9878
9889
  gameHistory {
9879
- gameDate {
9880
- ...GameDateFields
9881
- }
9882
- gameType
9883
- pointsEarned
9890
+ ...GameHistoryFields
9884
9891
  }
9885
9892
  updatedAt
9886
9893
  owner {
@@ -9891,6 +9898,7 @@ var GAME_FIELDS_FRAGMENT = gql`
9891
9898
  ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
9892
9899
  ${OWNER_FIELDS_FRAGMENT}
9893
9900
  ${GAME_DATE_FIELDS_FRAGMENT}
9901
+ ${GAME_HISTORY_FIELDS_FRAGMENT}
9894
9902
  `;
9895
9903
  var GET_GAMES = gql`
9896
9904
  query getGames {
@@ -9908,6 +9916,21 @@ var GET_GAME = gql`
9908
9916
  }
9909
9917
  ${GAME_FIELDS_FRAGMENT}
9910
9918
  `;
9919
+ var GET_GAME_LEADERBOARD = gql`
9920
+ query getGameLeaderboard {
9921
+ gameLeaderboard {
9922
+ gameHistory {
9923
+ ...GameHistoryFields
9924
+ }
9925
+ overallPoints
9926
+ owner {
9927
+ ...OwnerFields
9928
+ }
9929
+ }
9930
+ }
9931
+ ${OWNER_FIELDS_FRAGMENT}
9932
+ ${GAME_HISTORY_FIELDS_FRAGMENT}
9933
+ `;
9911
9934
  var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
9912
9935
  fragment PostContentDataFields on PostContentData {
9913
9936
  game {
@@ -12207,7 +12230,7 @@ async function updateAdStatuses() {
12207
12230
  }
12208
12231
 
12209
12232
  // src/service/vendor.ts
12210
- async function updateVendorBasedOnUserLicense(userId, licenceObject) {
12233
+ async function updateVendorBasedOnUserLicense(userId, licenceType) {
12211
12234
  try {
12212
12235
  const user = await UserModel.findById(userId).exec();
12213
12236
  if (!user) {
@@ -12217,7 +12240,7 @@ async function updateVendorBasedOnUserLicense(userId, licenceObject) {
12217
12240
  if (!userVendor) {
12218
12241
  return;
12219
12242
  }
12220
- const selectedLicence = licenceObject.licenceType;
12243
+ const selectedLicence = licenceType;
12221
12244
  if (selectedLicence === void 0) {
12222
12245
  return;
12223
12246
  }