@timardex/cluemart-server-shared 1.0.139 → 1.0.141

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,8 +1,8 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
- import { O as ObjectId } from '../Chat-DjrJ0LKo.mjs';
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';
4
+ import { O as ObjectId } from '../Chat-CM_mGOB0.mjs';
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-CM_mGOB0.mjs';
6
6
  import { EnumOSPlatform } from '@timardex/cluemart-shared/enums';
7
7
  import '@timardex/cluemart-shared/types';
8
8
  import 'express';
@@ -582,16 +582,8 @@ declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Docume
582
582
  __v: number;
583
583
  }, any>;
584
584
 
585
- declare const SchoolModel: mongoose.Model<SchoolType, {}, {}, {}, mongoose.Document<unknown, {}, SchoolType, {}, {}> & Omit<_timardex_cluemart_shared.SchoolFormData, "logoUpload"> & {
586
- _id: string;
587
- createdAt: Date;
588
- deletedAt: Date | null;
589
- overallPoints: number | null;
590
- owner: _timardex_cluemart_shared.OwnerType | null;
591
- ranking: number | null;
592
- schoolCode: string;
593
- updatedAt: Date | null;
594
- } & Required<{
585
+ type SchoolDocument = Omit<SchoolType, "ranking">;
586
+ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
595
587
  _id: string;
596
588
  }> & {
597
589
  __v: number;
@@ -1,8 +1,8 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
- import { O as ObjectId } from '../Chat-DjrJ0LKo.js';
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';
4
+ import { O as ObjectId } from '../Chat-CM_mGOB0.js';
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-CM_mGOB0.js';
6
6
  import { EnumOSPlatform } from '@timardex/cluemart-shared/enums';
7
7
  import '@timardex/cluemart-shared/types';
8
8
  import 'express';
@@ -582,16 +582,8 @@ declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Docume
582
582
  __v: number;
583
583
  }, any>;
584
584
 
585
- declare const SchoolModel: mongoose.Model<SchoolType, {}, {}, {}, mongoose.Document<unknown, {}, SchoolType, {}, {}> & Omit<_timardex_cluemart_shared.SchoolFormData, "logoUpload"> & {
586
- _id: string;
587
- createdAt: Date;
588
- deletedAt: Date | null;
589
- overallPoints: number | null;
590
- owner: _timardex_cluemart_shared.OwnerType | null;
591
- ranking: number | null;
592
- schoolCode: string;
593
- updatedAt: Date | null;
594
- } & Required<{
585
+ type SchoolDocument = Omit<SchoolType, "ranking">;
586
+ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
595
587
  _id: string;
596
588
  }> & {
597
589
  __v: number;
@@ -37,7 +37,7 @@ import {
37
37
  resourceRelationsSchema,
38
38
  termsAgreementSchema,
39
39
  userLicenseSchema
40
- } from "../chunk-PVOU5CHB.mjs";
40
+ } from "../chunk-7PPWLIUD.mjs";
41
41
  import "../chunk-3QS3WKRC.mjs";
42
42
  export {
43
43
  APP_SETTINGS_ID,
@@ -6806,7 +6806,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
6806
6806
  EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
6807
6807
  EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
6808
6808
  EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
6809
- EnumNotificationResourceType22["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
6809
+ EnumNotificationResourceType22["DAILY_CLUE_GAME"] = "daily_clue_game";
6810
6810
  EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
6811
6811
  EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
6812
6812
  EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
@@ -9990,7 +9990,7 @@ var GET_GAMES = gql`
9990
9990
  ${GAME_DOC_FIELDS_FRAGMENT}
9991
9991
  `;
9992
9992
  var GET_GAME = gql`
9993
- query getGame($_id: ID!) {
9993
+ query getGame($_id: ID) {
9994
9994
  game(_id: $_id) {
9995
9995
  ...GameDocFields
9996
9996
  }
@@ -10903,6 +10903,79 @@ var schoolSchema = create$3().shape({
10903
10903
  socialMedia: create$2().of(socialMediaSchema).nullable().default(null),
10904
10904
  studentCount: create$5().label("Student Count").nullable().transform((value, originalValue) => originalValue === "" ? null : value).typeError("Student count must be a number").min(350, "Student count must be at least 350").required("Student count is required").test("no-leading-zeros", "", noLeadingZeros("Student Count"))
10905
10905
  });
10906
+ var PKG = "@timardex/cluemart-shared";
10907
+ var IMAGE_EXTENSION = ".webp";
10908
+ var posterIds = ["poster1", "poster2", "poster3"];
10909
+ var posterFiles = Object.fromEntries(
10910
+ posterIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10911
+ );
10912
+ var cluiIds = [
10913
+ "cluiTui",
10914
+ "sima",
10915
+ "tablas",
10916
+ "telefonos",
10917
+ "ugralos"
10918
+ ];
10919
+ var cluiFiles = Object.fromEntries(
10920
+ cluiIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10921
+ );
10922
+ var iconIds = [
10923
+ "apple-maps-icon",
10924
+ "facebook",
10925
+ "google-maps-icon",
10926
+ "instagram",
10927
+ "meet",
10928
+ "poll",
10929
+ "tiktok",
10930
+ "tip",
10931
+ "waze-maps-icon",
10932
+ "website",
10933
+ "youtube"
10934
+ ];
10935
+ var iconFiles = Object.fromEntries(
10936
+ iconIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10937
+ );
10938
+ var badgeIds = ["corporate", "private", "school"];
10939
+ var badgeFiles = Object.fromEntries(
10940
+ badgeIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10941
+ );
10942
+ var logoIds = [
10943
+ "googleMaps-logo-dark",
10944
+ "googleMaps-logo-light",
10945
+ "logo",
10946
+ "logo-atr"
10947
+ ];
10948
+ var logoFiles = Object.fromEntries(
10949
+ logoIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10950
+ );
10951
+ var otherImagesIds = [
10952
+ "banner-horizontal",
10953
+ "banner-vertical",
10954
+ "qr-code",
10955
+ "store-android",
10956
+ "store-ios"
10957
+ ];
10958
+ var otherImagesFiles = Object.fromEntries(
10959
+ otherImagesIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10960
+ );
10961
+ var posters = Object.fromEntries(
10962
+ Object.entries(posterFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10963
+ );
10964
+ var cluiImages = Object.fromEntries(
10965
+ Object.entries(cluiFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10966
+ );
10967
+ var icons = Object.fromEntries(
10968
+ Object.entries(iconFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10969
+ );
10970
+ var badges = Object.fromEntries(
10971
+ Object.entries(badgeFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10972
+ );
10973
+ var logos = Object.fromEntries(
10974
+ Object.entries(logoFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10975
+ );
10976
+ var otherImages = Object.fromEntries(
10977
+ Object.entries(otherImagesFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10978
+ );
10906
10979
  var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10907
10980
  EnumActivity2["FAVORITE"] = "FAVORITE";
10908
10981
  EnumActivity2["GOING"] = "GOING";
@@ -10973,7 +11046,7 @@ async function saveNotificationsInDb(payload) {
10973
11046
  // src/service/sendPushNotifications.ts
10974
11047
  var import_expo_server_sdk = require("expo-server-sdk");
10975
11048
 
10976
- // node_modules/@timardex/cluemart-shared/dist/chunk-534WN2SR.mjs
11049
+ // node_modules/@timardex/cluemart-shared/dist/chunk-73ULMQM6.mjs
10977
11050
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
10978
11051
  EnumOSPlatform22["ANDROID"] = "android";
10979
11052
  EnumOSPlatform22["IOS"] = "ios";
@@ -12402,7 +12475,6 @@ var schema15 = new MongooseSchema20(
12402
12475
  required: true,
12403
12476
  type: OwnerTypeSchema
12404
12477
  },
12405
- ranking: { default: 0, required: false, type: Number },
12406
12478
  region: { required: true, type: String },
12407
12479
  schoolCode: { required: true, type: String },
12408
12480
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },