@timardex/cluemart-server-shared 1.0.138 → 1.0.140

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,15 +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
- schoolCode: string;
592
- updatedAt: Date | null;
593
- } & Required<{
585
+ type SchoolDocument = Omit<SchoolType, "ranking">;
586
+ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
594
587
  _id: string;
595
588
  }> & {
596
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,15 +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
- schoolCode: string;
592
- updatedAt: Date | null;
593
- } & Required<{
585
+ type SchoolDocument = Omit<SchoolType, "ranking">;
586
+ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
594
587
  _id: string;
595
588
  }> & {
596
589
  __v: number;
@@ -37,7 +37,7 @@ import {
37
37
  resourceRelationsSchema,
38
38
  termsAgreementSchema,
39
39
  userLicenseSchema
40
- } from "../chunk-OOUMYJJO.mjs";
40
+ } from "../chunk-Q6KEIJPS.mjs";
41
41
  import "../chunk-3QS3WKRC.mjs";
42
42
  export {
43
43
  APP_SETTINGS_ID,
@@ -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
  }
@@ -10176,6 +10176,18 @@ var UPDATE_DAILY_CLUE_MUTATION = gql`
10176
10176
  }
10177
10177
  ${GAME_DOC_FIELDS_FRAGMENT}
10178
10178
  `;
10179
+ var SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = gql`
10180
+ fragment SchoolRegisteredUsersFields on SchoolRegisteredUserType {
10181
+ _id
10182
+ avatar {
10183
+ ...ResourceImageFields
10184
+ }
10185
+ email
10186
+ firstName
10187
+ lastName
10188
+ }
10189
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
10190
+ `;
10179
10191
  var SCHOOL = gql`
10180
10192
  fragment SchoolFields on SchoolType {
10181
10193
  _id
@@ -10196,6 +10208,7 @@ var SCHOOL = gql`
10196
10208
  ...OwnerFields
10197
10209
  }
10198
10210
  overallPoints
10211
+ ranking
10199
10212
  region
10200
10213
  studentCount
10201
10214
  schoolCode
@@ -10217,10 +10230,16 @@ var SCHOOL = gql`
10217
10230
  var GET_SCHOOL = gql`
10218
10231
  query getSchool($_id: ID!) {
10219
10232
  school(_id: $_id) {
10220
- ...SchoolFields
10233
+ school {
10234
+ ...SchoolFields
10235
+ }
10236
+ users {
10237
+ ...SchoolRegisteredUsersFields
10238
+ }
10221
10239
  }
10222
10240
  }
10223
10241
  ${SCHOOL}
10242
+ ${SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT}
10224
10243
  `;
10225
10244
  var GET_SCHOOLS = gql`
10226
10245
  query getSchools {
@@ -10884,6 +10903,79 @@ var schoolSchema = create$3().shape({
10884
10903
  socialMedia: create$2().of(socialMediaSchema).nullable().default(null),
10885
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"))
10886
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
+ );
10887
10979
  var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10888
10980
  EnumActivity2["FAVORITE"] = "FAVORITE";
10889
10981
  EnumActivity2["GOING"] = "GOING";