@timardex/cluemart-server-shared 1.0.130 → 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/{chunk-YFZVVTXN.mjs → chunk-OBW4LAAG.mjs} +66 -31
- package/dist/chunk-OBW4LAAG.mjs.map +1 -0
- package/dist/index.cjs +65 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +65 -30
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +65 -30
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +2 -2
- package/dist/mongoose/index.d.ts +2 -2
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +65 -30
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-YFZVVTXN.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, 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,
|
|
2
|
+
import { AdType, 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 } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-DjrJ0LKo.mjs';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-DjrJ0LKo.mjs';
|
|
@@ -544,7 +544,7 @@ declare const AppSettingModel: mongoose.Model<AppSettingsType, {}, {}, {}, mongo
|
|
|
544
544
|
__v: number;
|
|
545
545
|
}, any>;
|
|
546
546
|
|
|
547
|
-
declare const GameModel: mongoose.Model<
|
|
547
|
+
declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Document<unknown, {}, GameDocType, {}, {}> & GameDocType & Required<{
|
|
548
548
|
_id: string;
|
|
549
549
|
}> & {
|
|
550
550
|
__v: number;
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, 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,
|
|
2
|
+
import { AdType, 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 } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-DjrJ0LKo.js';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-DjrJ0LKo.js';
|
|
@@ -544,7 +544,7 @@ declare const AppSettingModel: mongoose.Model<AppSettingsType, {}, {}, {}, mongo
|
|
|
544
544
|
__v: number;
|
|
545
545
|
}, any>;
|
|
546
546
|
|
|
547
|
-
declare const GameModel: mongoose.Model<
|
|
547
|
+
declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Document<unknown, {}, GameDocType, {}, {}> & GameDocType & Required<{
|
|
548
548
|
_id: string;
|
|
549
549
|
}> & {
|
|
550
550
|
__v: number;
|
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -6799,9 +6799,13 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
6799
6799
|
EnumNotificationResourceType22["DEACTIVATED_EVENT"] = "deactivated_event";
|
|
6800
6800
|
EnumNotificationResourceType22["DEACTIVATED_PARTNER"] = "deactivated_partner";
|
|
6801
6801
|
EnumNotificationResourceType22["DEACTIVATED_VENDOR"] = "deactivated_vendor";
|
|
6802
|
+
EnumNotificationResourceType22["DOWNGRADED_EVENT"] = "downgraded_event";
|
|
6803
|
+
EnumNotificationResourceType22["DOWNGRADED_PARTNER"] = "downgraded_partner";
|
|
6804
|
+
EnumNotificationResourceType22["DOWNGRADED_VENDOR"] = "downgraded_vendor";
|
|
6802
6805
|
EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
|
|
6803
6806
|
EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
|
|
6804
6807
|
EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
|
|
6808
|
+
EnumNotificationResourceType22["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
|
|
6805
6809
|
EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
|
|
6806
6810
|
EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
|
|
6807
6811
|
EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
|
|
@@ -6813,11 +6817,11 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
6813
6817
|
return EnumNotificationResourceType22;
|
|
6814
6818
|
})(EnumNotificationResourceType || {});
|
|
6815
6819
|
var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType22) => {
|
|
6820
|
+
EnumNotificationType22["CHAT"] = "chat";
|
|
6816
6821
|
EnumNotificationType22["EVENT"] = "event";
|
|
6817
|
-
EnumNotificationType22["VENDOR"] = "vendor";
|
|
6818
6822
|
EnumNotificationType22["RELATION"] = "relation";
|
|
6819
|
-
EnumNotificationType22["CHAT"] = "chat";
|
|
6820
6823
|
EnumNotificationType22["SYSTEM"] = "system";
|
|
6824
|
+
EnumNotificationType22["VENDOR"] = "vendor";
|
|
6821
6825
|
return EnumNotificationType22;
|
|
6822
6826
|
})(EnumNotificationType || {});
|
|
6823
6827
|
var EnumRegions = /* @__PURE__ */ ((EnumRegions22) => {
|
|
@@ -6885,6 +6889,17 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
|
|
|
6885
6889
|
EnumSubscriptionStatus22["TRIALING"] = "trialing";
|
|
6886
6890
|
return EnumSubscriptionStatus22;
|
|
6887
6891
|
})(EnumSubscriptionStatus || {});
|
|
6892
|
+
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
6893
|
+
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
6894
|
+
return EnumGameType2;
|
|
6895
|
+
})(EnumGameType || {});
|
|
6896
|
+
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus3) => {
|
|
6897
|
+
EnumGameStatus3["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
6898
|
+
EnumGameStatus3["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
6899
|
+
EnumGameStatus3["GAME_LEFT"] = "GAME_LEFT";
|
|
6900
|
+
EnumGameStatus3["GAME_STARTED"] = "GAME_STARTED";
|
|
6901
|
+
return EnumGameStatus3;
|
|
6902
|
+
})(EnumGameStatus || {});
|
|
6888
6903
|
var dateFormat = "DD-MM-YYYY";
|
|
6889
6904
|
var timeFormat = "HH:mm";
|
|
6890
6905
|
import_dayjs.default.extend(import_customParseFormat.default);
|
|
@@ -9920,46 +9935,63 @@ var GAME_HISTORY_FIELDS_FRAGMENT = gql`
|
|
|
9920
9935
|
}
|
|
9921
9936
|
${GAME_DATE_FIELDS_FRAGMENT}
|
|
9922
9937
|
`;
|
|
9938
|
+
var GAME_DATA_FIELDS_FRAGMENT = gql`
|
|
9939
|
+
fragment GameDataFields on GameDataType {
|
|
9940
|
+
dailyClue {
|
|
9941
|
+
...DailyClueGameDataFields
|
|
9942
|
+
}
|
|
9943
|
+
}
|
|
9944
|
+
${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
|
|
9945
|
+
`;
|
|
9923
9946
|
var GAME_FIELDS_FRAGMENT = gql`
|
|
9924
9947
|
fragment GameFields on GameType {
|
|
9925
|
-
_id
|
|
9926
9948
|
active
|
|
9927
9949
|
createdAt
|
|
9928
|
-
deletedAt
|
|
9929
9950
|
gameData {
|
|
9930
|
-
|
|
9931
|
-
...DailyClueGameDataFields
|
|
9932
|
-
}
|
|
9951
|
+
...GameDataFields
|
|
9933
9952
|
}
|
|
9934
9953
|
gameHistory {
|
|
9935
9954
|
...GameHistoryFields
|
|
9936
9955
|
}
|
|
9956
|
+
gameType
|
|
9937
9957
|
updatedAt
|
|
9958
|
+
}
|
|
9959
|
+
${GAME_DATA_FIELDS_FRAGMENT}
|
|
9960
|
+
${GAME_HISTORY_FIELDS_FRAGMENT}
|
|
9961
|
+
`;
|
|
9962
|
+
var GAME_DOC_FIELDS_FRAGMENT = gql`
|
|
9963
|
+
fragment GameDocFields on GameDocType {
|
|
9964
|
+
_id
|
|
9965
|
+
active
|
|
9966
|
+
createdAt
|
|
9967
|
+
deletedAt
|
|
9968
|
+
games {
|
|
9969
|
+
...GameFields
|
|
9970
|
+
}
|
|
9938
9971
|
owner {
|
|
9939
9972
|
...OwnerFields
|
|
9940
9973
|
}
|
|
9941
9974
|
points
|
|
9975
|
+
updatedAt
|
|
9942
9976
|
}
|
|
9943
|
-
${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
|
|
9944
9977
|
${OWNER_FIELDS_FRAGMENT}
|
|
9945
|
-
${
|
|
9946
|
-
${GAME_HISTORY_FIELDS_FRAGMENT}
|
|
9978
|
+
${GAME_FIELDS_FRAGMENT}
|
|
9947
9979
|
`;
|
|
9948
9980
|
var GET_GAMES = gql`
|
|
9949
9981
|
query getGames {
|
|
9950
9982
|
games {
|
|
9951
|
-
...
|
|
9983
|
+
...GameDocFields
|
|
9952
9984
|
}
|
|
9953
9985
|
}
|
|
9954
|
-
${
|
|
9986
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
9955
9987
|
`;
|
|
9956
9988
|
var GET_GAME = gql`
|
|
9957
9989
|
query getGame($_id: ID!) {
|
|
9958
9990
|
game(_id: $_id) {
|
|
9959
|
-
...
|
|
9991
|
+
...GameDocFields
|
|
9960
9992
|
}
|
|
9961
9993
|
}
|
|
9962
|
-
${
|
|
9994
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
9963
9995
|
`;
|
|
9964
9996
|
var GET_GAME_LEADERBOARD = gql`
|
|
9965
9997
|
query getGameLeaderboard {
|
|
@@ -10122,10 +10154,10 @@ var GET_APP_SETTINGS = gql`
|
|
|
10122
10154
|
var START_GAME_MUTATION = gql`
|
|
10123
10155
|
mutation startGame($input: BaseGameInputType!) {
|
|
10124
10156
|
startGame(input: $input) {
|
|
10125
|
-
...
|
|
10157
|
+
...GameDocFields
|
|
10126
10158
|
}
|
|
10127
10159
|
}
|
|
10128
|
-
${
|
|
10160
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
10129
10161
|
`;
|
|
10130
10162
|
var LEAVE_GAME_MUTATION = gql`
|
|
10131
10163
|
mutation leaveGame($_id: ID!, $gameType: GameTypeEnumType!) {
|
|
@@ -10135,10 +10167,10 @@ var LEAVE_GAME_MUTATION = gql`
|
|
|
10135
10167
|
var UPDATE_DAILY_CLUE_MUTATION = gql`
|
|
10136
10168
|
mutation updateDailyClueGame($_id: ID!, $foundLetter: String!) {
|
|
10137
10169
|
updateDailyClueGame(_id: $_id, foundLetter: $foundLetter) {
|
|
10138
|
-
...
|
|
10170
|
+
...GameDocFields
|
|
10139
10171
|
}
|
|
10140
10172
|
}
|
|
10141
|
-
${
|
|
10173
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
10142
10174
|
`;
|
|
10143
10175
|
var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
10144
10176
|
var nzbnRegex = /^94\d{11}$/;
|
|
@@ -10763,15 +10795,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
10763
10795
|
EnumActivity2["VIEW"] = "VIEW";
|
|
10764
10796
|
return EnumActivity2;
|
|
10765
10797
|
})(EnumActivity || {});
|
|
10766
|
-
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
10767
|
-
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
10768
|
-
return EnumGameType2;
|
|
10769
|
-
})(EnumGameType || {});
|
|
10770
|
-
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
10771
|
-
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
10772
|
-
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
10773
|
-
return EnumGameStatus2;
|
|
10774
|
-
})(EnumGameStatus || {});
|
|
10775
10798
|
|
|
10776
10799
|
// src/mongoose/Notification.ts
|
|
10777
10800
|
var import_mongoose2 = __toESM(require("mongoose"));
|
|
@@ -10834,7 +10857,7 @@ async function saveNotificationsInDb(payload) {
|
|
|
10834
10857
|
// src/service/sendPushNotifications.ts
|
|
10835
10858
|
var import_expo_server_sdk = require("expo-server-sdk");
|
|
10836
10859
|
|
|
10837
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10860
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-534WN2SR.mjs
|
|
10838
10861
|
var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
10839
10862
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
10840
10863
|
EnumOSPlatform22["IOS"] = "ios";
|
|
@@ -12210,12 +12233,24 @@ var gameHistorySchema = new MongooseSchema19(
|
|
|
12210
12233
|
},
|
|
12211
12234
|
{ _id: false }
|
|
12212
12235
|
);
|
|
12236
|
+
var gameTypeSchema = new MongooseSchema19(
|
|
12237
|
+
{
|
|
12238
|
+
active: { default: true, required: true, type: Boolean },
|
|
12239
|
+
gameData: gameDataDefinition,
|
|
12240
|
+
gameHistory: { default: [], required: true, type: [gameHistorySchema] },
|
|
12241
|
+
gameType: {
|
|
12242
|
+
enum: Object.values(EnumGameType),
|
|
12243
|
+
required: true,
|
|
12244
|
+
type: String
|
|
12245
|
+
}
|
|
12246
|
+
},
|
|
12247
|
+
{ _id: false, timestamps: true }
|
|
12248
|
+
);
|
|
12213
12249
|
var schema14 = new MongooseSchema19(
|
|
12214
12250
|
{
|
|
12215
12251
|
active: { default: false, required: true, type: Boolean },
|
|
12216
12252
|
deletedAt: { default: null, required: false, type: Date },
|
|
12217
|
-
|
|
12218
|
-
gameHistory: { default: [], required: true, type: [gameHistorySchema] },
|
|
12253
|
+
games: { default: [], required: false, type: [gameTypeSchema] },
|
|
12219
12254
|
owner: {
|
|
12220
12255
|
required: true,
|
|
12221
12256
|
type: OwnerTypeSchema
|