@timardex/cluemart-server-shared 1.0.131 → 1.0.132

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, EnumUserLicence } 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, GameDocType, 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';
@@ -635,7 +635,7 @@ declare const AppSettingModel: mongoose.Model<AppSettingsType, {}, {}, {}, mongo
635
635
  __v: number;
636
636
  }, any>;
637
637
 
638
- declare const GameModel: mongoose.Model<GameType, {}, {}, {}, mongoose.Document<unknown, {}, GameType, {}, {}> & GameType & Required<{
638
+ declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Document<unknown, {}, GameDocType, {}, {}> & GameDocType & Required<{
639
639
  _id: string;
640
640
  }> & {
641
641
  __v: number;
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, EnumUserLicence } 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, GameDocType, 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';
@@ -635,7 +635,7 @@ declare const AppSettingModel: mongoose.Model<AppSettingsType, {}, {}, {}, mongo
635
635
  __v: number;
636
636
  }, any>;
637
637
 
638
- declare const GameModel: mongoose.Model<GameType, {}, {}, {}, mongoose.Document<unknown, {}, GameType, {}, {}> & GameType & Required<{
638
+ declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Document<unknown, {}, GameDocType, {}, {}> & GameDocType & Required<{
639
639
  _id: string;
640
640
  }> & {
641
641
  __v: number;
package/dist/index.mjs CHANGED
@@ -6755,9 +6755,13 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
6755
6755
  EnumNotificationResourceType22["DEACTIVATED_EVENT"] = "deactivated_event";
6756
6756
  EnumNotificationResourceType22["DEACTIVATED_PARTNER"] = "deactivated_partner";
6757
6757
  EnumNotificationResourceType22["DEACTIVATED_VENDOR"] = "deactivated_vendor";
6758
+ EnumNotificationResourceType22["DOWNGRADED_EVENT"] = "downgraded_event";
6759
+ EnumNotificationResourceType22["DOWNGRADED_PARTNER"] = "downgraded_partner";
6760
+ EnumNotificationResourceType22["DOWNGRADED_VENDOR"] = "downgraded_vendor";
6758
6761
  EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
6759
6762
  EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
6760
6763
  EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
6764
+ EnumNotificationResourceType22["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
6761
6765
  EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
6762
6766
  EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
6763
6767
  EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
@@ -6769,11 +6773,11 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
6769
6773
  return EnumNotificationResourceType22;
6770
6774
  })(EnumNotificationResourceType || {});
6771
6775
  var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType22) => {
6776
+ EnumNotificationType22["CHAT"] = "chat";
6772
6777
  EnumNotificationType22["EVENT"] = "event";
6773
- EnumNotificationType22["VENDOR"] = "vendor";
6774
6778
  EnumNotificationType22["RELATION"] = "relation";
6775
- EnumNotificationType22["CHAT"] = "chat";
6776
6779
  EnumNotificationType22["SYSTEM"] = "system";
6780
+ EnumNotificationType22["VENDOR"] = "vendor";
6777
6781
  return EnumNotificationType22;
6778
6782
  })(EnumNotificationType || {});
6779
6783
  var EnumRegions = /* @__PURE__ */ ((EnumRegions22) => {
@@ -6841,6 +6845,17 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
6841
6845
  EnumSubscriptionStatus22["TRIALING"] = "trialing";
6842
6846
  return EnumSubscriptionStatus22;
6843
6847
  })(EnumSubscriptionStatus || {});
6848
+ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
6849
+ EnumGameType2["DAILY_CLUE"] = "dailyClue";
6850
+ return EnumGameType2;
6851
+ })(EnumGameType || {});
6852
+ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus3) => {
6853
+ EnumGameStatus3["GAME_COMPLETED"] = "GAME_COMPLETED";
6854
+ EnumGameStatus3["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
6855
+ EnumGameStatus3["GAME_LEFT"] = "GAME_LEFT";
6856
+ EnumGameStatus3["GAME_STARTED"] = "GAME_STARTED";
6857
+ return EnumGameStatus3;
6858
+ })(EnumGameStatus || {});
6844
6859
  var dateFormat = "DD-MM-YYYY";
6845
6860
  var timeFormat = "HH:mm";
6846
6861
  dayjs.extend(customParseFormat);
@@ -9876,46 +9891,63 @@ var GAME_HISTORY_FIELDS_FRAGMENT = gql`
9876
9891
  }
9877
9892
  ${GAME_DATE_FIELDS_FRAGMENT}
9878
9893
  `;
9894
+ var GAME_DATA_FIELDS_FRAGMENT = gql`
9895
+ fragment GameDataFields on GameDataType {
9896
+ dailyClue {
9897
+ ...DailyClueGameDataFields
9898
+ }
9899
+ }
9900
+ ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
9901
+ `;
9879
9902
  var GAME_FIELDS_FRAGMENT = gql`
9880
9903
  fragment GameFields on GameType {
9881
- _id
9882
9904
  active
9883
9905
  createdAt
9884
- deletedAt
9885
9906
  gameData {
9886
- dailyClue {
9887
- ...DailyClueGameDataFields
9888
- }
9907
+ ...GameDataFields
9889
9908
  }
9890
9909
  gameHistory {
9891
9910
  ...GameHistoryFields
9892
9911
  }
9912
+ gameType
9893
9913
  updatedAt
9914
+ }
9915
+ ${GAME_DATA_FIELDS_FRAGMENT}
9916
+ ${GAME_HISTORY_FIELDS_FRAGMENT}
9917
+ `;
9918
+ var GAME_DOC_FIELDS_FRAGMENT = gql`
9919
+ fragment GameDocFields on GameDocType {
9920
+ _id
9921
+ active
9922
+ createdAt
9923
+ deletedAt
9924
+ games {
9925
+ ...GameFields
9926
+ }
9894
9927
  owner {
9895
9928
  ...OwnerFields
9896
9929
  }
9897
9930
  points
9931
+ updatedAt
9898
9932
  }
9899
- ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
9900
9933
  ${OWNER_FIELDS_FRAGMENT}
9901
- ${GAME_DATE_FIELDS_FRAGMENT}
9902
- ${GAME_HISTORY_FIELDS_FRAGMENT}
9934
+ ${GAME_FIELDS_FRAGMENT}
9903
9935
  `;
9904
9936
  var GET_GAMES = gql`
9905
9937
  query getGames {
9906
9938
  games {
9907
- ...GameFields
9939
+ ...GameDocFields
9908
9940
  }
9909
9941
  }
9910
- ${GAME_FIELDS_FRAGMENT}
9942
+ ${GAME_DOC_FIELDS_FRAGMENT}
9911
9943
  `;
9912
9944
  var GET_GAME = gql`
9913
9945
  query getGame($_id: ID!) {
9914
9946
  game(_id: $_id) {
9915
- ...GameFields
9947
+ ...GameDocFields
9916
9948
  }
9917
9949
  }
9918
- ${GAME_FIELDS_FRAGMENT}
9950
+ ${GAME_DOC_FIELDS_FRAGMENT}
9919
9951
  `;
9920
9952
  var GET_GAME_LEADERBOARD = gql`
9921
9953
  query getGameLeaderboard {
@@ -10078,10 +10110,10 @@ var GET_APP_SETTINGS = gql`
10078
10110
  var START_GAME_MUTATION = gql`
10079
10111
  mutation startGame($input: BaseGameInputType!) {
10080
10112
  startGame(input: $input) {
10081
- ...GameFields
10113
+ ...GameDocFields
10082
10114
  }
10083
10115
  }
10084
- ${GAME_FIELDS_FRAGMENT}
10116
+ ${GAME_DOC_FIELDS_FRAGMENT}
10085
10117
  `;
10086
10118
  var LEAVE_GAME_MUTATION = gql`
10087
10119
  mutation leaveGame($_id: ID!, $gameType: GameTypeEnumType!) {
@@ -10091,10 +10123,10 @@ var LEAVE_GAME_MUTATION = gql`
10091
10123
  var UPDATE_DAILY_CLUE_MUTATION = gql`
10092
10124
  mutation updateDailyClueGame($_id: ID!, $foundLetter: String!) {
10093
10125
  updateDailyClueGame(_id: $_id, foundLetter: $foundLetter) {
10094
- ...GameFields
10126
+ ...GameDocFields
10095
10127
  }
10096
10128
  }
10097
- ${GAME_FIELDS_FRAGMENT}
10129
+ ${GAME_DOC_FIELDS_FRAGMENT}
10098
10130
  `;
10099
10131
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
10100
10132
  var nzbnRegex = /^94\d{11}$/;
@@ -10719,16 +10751,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10719
10751
  EnumActivity2["VIEW"] = "VIEW";
10720
10752
  return EnumActivity2;
10721
10753
  })(EnumActivity || {});
10722
- var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
10723
- EnumGameType2["DAILY_CLUE"] = "dailyClue";
10724
- return EnumGameType2;
10725
- })(EnumGameType || {});
10726
- var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
10727
- EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
10728
- EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
10729
- EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
10730
- return EnumGameStatus2;
10731
- })(EnumGameStatus || {});
10732
10754
 
10733
10755
  // src/mongoose/Ad.ts
10734
10756
  import mongoose from "mongoose";
@@ -11424,7 +11446,7 @@ schema4.index({ isRead: 1, userId: 1 });
11424
11446
  schema4.index({ createdAt: -1, userId: 1 });
11425
11447
  var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
11426
11448
 
11427
- // node_modules/@timardex/cluemart-shared/dist/chunk-USQKKCIA.mjs
11449
+ // node_modules/@timardex/cluemart-shared/dist/chunk-534WN2SR.mjs
11428
11450
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11429
11451
  EnumOSPlatform22["ANDROID"] = "android";
11430
11452
  EnumOSPlatform22["IOS"] = "ios";
@@ -12033,12 +12055,24 @@ var gameHistorySchema = new MongooseSchema19(
12033
12055
  },
12034
12056
  { _id: false }
12035
12057
  );
12058
+ var gameTypeSchema = new MongooseSchema19(
12059
+ {
12060
+ active: { default: true, required: true, type: Boolean },
12061
+ gameData: gameDataDefinition,
12062
+ gameHistory: { default: [], required: true, type: [gameHistorySchema] },
12063
+ gameType: {
12064
+ enum: Object.values(EnumGameType),
12065
+ required: true,
12066
+ type: String
12067
+ }
12068
+ },
12069
+ { _id: false, timestamps: true }
12070
+ );
12036
12071
  var schema14 = new MongooseSchema19(
12037
12072
  {
12038
12073
  active: { default: false, required: true, type: Boolean },
12039
12074
  deletedAt: { default: null, required: false, type: Date },
12040
- gameData: gameDataDefinition,
12041
- gameHistory: { default: [], required: true, type: [gameHistorySchema] },
12075
+ games: { default: [], required: false, type: [gameTypeSchema] },
12042
12076
  owner: {
12043
12077
  required: true,
12044
12078
  type: OwnerTypeSchema