@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,4 +1,4 @@
1
- import { CreateBulkNotificationInput, NotificationType, ChatMessageType, ParticipantType, ChatType } from '@timardex/cluemart-shared';
1
+ import { CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType } from '@timardex/cluemart-shared';
2
2
  import mongoose from 'mongoose';
3
3
  import { NotificationCount } from '@timardex/cluemart-shared/types';
4
4
  import express from 'express';
@@ -26,7 +26,7 @@ declare enum EnumPubSubEvents {
26
26
  }
27
27
  interface AuthUser {
28
28
  email: string;
29
- role: string;
29
+ role: EnumUserRole;
30
30
  userId: ObjectId;
31
31
  }
32
32
  interface SubscriptionPayload {
@@ -1,4 +1,4 @@
1
- import { CreateBulkNotificationInput, NotificationType, ChatMessageType, ParticipantType, ChatType } from '@timardex/cluemart-shared';
1
+ import { CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType } from '@timardex/cluemart-shared';
2
2
  import mongoose from 'mongoose';
3
3
  import { NotificationCount } from '@timardex/cluemart-shared/types';
4
4
  import express from 'express';
@@ -26,7 +26,7 @@ declare enum EnumPubSubEvents {
26
26
  }
27
27
  interface AuthUser {
28
28
  email: string;
29
- role: string;
29
+ role: EnumUserRole;
30
30
  userId: ObjectId;
31
31
  }
32
32
  interface SubscriptionPayload {
@@ -9925,7 +9925,7 @@ var GET_GAMES = gql`
9925
9925
  ${GAME_DOC_FIELDS_FRAGMENT}
9926
9926
  `;
9927
9927
  var GET_GAME = gql`
9928
- query getGame($_id: ID!) {
9928
+ query getGame($_id: ID) {
9929
9929
  game(_id: $_id) {
9930
9930
  ...GameDocFields
9931
9931
  }
@@ -10111,6 +10111,18 @@ var UPDATE_DAILY_CLUE_MUTATION = gql`
10111
10111
  }
10112
10112
  ${GAME_DOC_FIELDS_FRAGMENT}
10113
10113
  `;
10114
+ var SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = gql`
10115
+ fragment SchoolRegisteredUsersFields on SchoolRegisteredUserType {
10116
+ _id
10117
+ avatar {
10118
+ ...ResourceImageFields
10119
+ }
10120
+ email
10121
+ firstName
10122
+ lastName
10123
+ }
10124
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
10125
+ `;
10114
10126
  var SCHOOL = gql`
10115
10127
  fragment SchoolFields on SchoolType {
10116
10128
  _id
@@ -10131,6 +10143,7 @@ var SCHOOL = gql`
10131
10143
  ...OwnerFields
10132
10144
  }
10133
10145
  overallPoints
10146
+ ranking
10134
10147
  region
10135
10148
  studentCount
10136
10149
  schoolCode
@@ -10152,10 +10165,16 @@ var SCHOOL = gql`
10152
10165
  var GET_SCHOOL = gql`
10153
10166
  query getSchool($_id: ID!) {
10154
10167
  school(_id: $_id) {
10155
- ...SchoolFields
10168
+ school {
10169
+ ...SchoolFields
10170
+ }
10171
+ users {
10172
+ ...SchoolRegisteredUsersFields
10173
+ }
10156
10174
  }
10157
10175
  }
10158
10176
  ${SCHOOL}
10177
+ ${SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT}
10159
10178
  `;
10160
10179
  var GET_SCHOOLS = gql`
10161
10180
  query getSchools {
@@ -10819,6 +10838,79 @@ var schoolSchema = create$3().shape({
10819
10838
  socialMedia: create$2().of(socialMediaSchema).nullable().default(null),
10820
10839
  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"))
10821
10840
  });
10841
+ var PKG = "@timardex/cluemart-shared";
10842
+ var IMAGE_EXTENSION = ".webp";
10843
+ var posterIds = ["poster1", "poster2", "poster3"];
10844
+ var posterFiles = Object.fromEntries(
10845
+ posterIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10846
+ );
10847
+ var cluiIds = [
10848
+ "cluiTui",
10849
+ "sima",
10850
+ "tablas",
10851
+ "telefonos",
10852
+ "ugralos"
10853
+ ];
10854
+ var cluiFiles = Object.fromEntries(
10855
+ cluiIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10856
+ );
10857
+ var iconIds = [
10858
+ "apple-maps-icon",
10859
+ "facebook",
10860
+ "google-maps-icon",
10861
+ "instagram",
10862
+ "meet",
10863
+ "poll",
10864
+ "tiktok",
10865
+ "tip",
10866
+ "waze-maps-icon",
10867
+ "website",
10868
+ "youtube"
10869
+ ];
10870
+ var iconFiles = Object.fromEntries(
10871
+ iconIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10872
+ );
10873
+ var badgeIds = ["corporate", "private", "school"];
10874
+ var badgeFiles = Object.fromEntries(
10875
+ badgeIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10876
+ );
10877
+ var logoIds = [
10878
+ "googleMaps-logo-dark",
10879
+ "googleMaps-logo-light",
10880
+ "logo",
10881
+ "logo-atr"
10882
+ ];
10883
+ var logoFiles = Object.fromEntries(
10884
+ logoIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10885
+ );
10886
+ var otherImagesIds = [
10887
+ "banner-horizontal",
10888
+ "banner-vertical",
10889
+ "qr-code",
10890
+ "store-android",
10891
+ "store-ios"
10892
+ ];
10893
+ var otherImagesFiles = Object.fromEntries(
10894
+ otherImagesIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10895
+ );
10896
+ var posters = Object.fromEntries(
10897
+ Object.entries(posterFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10898
+ );
10899
+ var cluiImages = Object.fromEntries(
10900
+ Object.entries(cluiFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10901
+ );
10902
+ var icons = Object.fromEntries(
10903
+ Object.entries(iconFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10904
+ );
10905
+ var badges = Object.fromEntries(
10906
+ Object.entries(badgeFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10907
+ );
10908
+ var logos = Object.fromEntries(
10909
+ Object.entries(logoFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10910
+ );
10911
+ var otherImages = Object.fromEntries(
10912
+ Object.entries(otherImagesFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10913
+ );
10822
10914
  var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10823
10915
  EnumActivity2["FAVORITE"] = "FAVORITE";
10824
10916
  EnumActivity2["GOING"] = "GOING";
@@ -12260,4 +12352,4 @@ react/cjs/react.development.js:
12260
12352
  * LICENSE file in the root directory of this source tree.
12261
12353
  *)
12262
12354
  */
12263
- //# sourceMappingURL=chunk-OOUMYJJO.mjs.map
12355
+ //# sourceMappingURL=chunk-Q6KEIJPS.mjs.map