@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.
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, 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, EnumUserLicence } from '@timardex/cluemart-shared';
2
+ import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, 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, 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';
@@ -36,7 +36,7 @@ declare enum EnumPubSubEvents {
36
36
  }
37
37
  interface AuthUser {
38
38
  email: string;
39
- role: string;
39
+ role: EnumUserRole;
40
40
  userId: ObjectId;
41
41
  }
42
42
  interface SubscriptionPayload {
@@ -673,15 +673,8 @@ declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Docume
673
673
  __v: number;
674
674
  }, any>;
675
675
 
676
- declare const SchoolModel: mongoose.Model<SchoolType, {}, {}, {}, mongoose.Document<unknown, {}, SchoolType, {}, {}> & Omit<_timardex_cluemart_shared.SchoolFormData, "logoUpload"> & {
677
- _id: string;
678
- createdAt: Date;
679
- deletedAt: Date | null;
680
- overallPoints: number | null;
681
- owner: _timardex_cluemart_shared.OwnerType | null;
682
- schoolCode: string;
683
- updatedAt: Date | null;
684
- } & Required<{
676
+ type SchoolDocument = Omit<SchoolType, "ranking">;
677
+ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
685
678
  _id: string;
686
679
  }> & {
687
680
  __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, 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, EnumUserLicence } from '@timardex/cluemart-shared';
2
+ import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, 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, 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';
@@ -36,7 +36,7 @@ declare enum EnumPubSubEvents {
36
36
  }
37
37
  interface AuthUser {
38
38
  email: string;
39
- role: string;
39
+ role: EnumUserRole;
40
40
  userId: ObjectId;
41
41
  }
42
42
  interface SubscriptionPayload {
@@ -673,15 +673,8 @@ declare const GameModel: mongoose.Model<GameDocType, {}, {}, {}, mongoose.Docume
673
673
  __v: number;
674
674
  }, any>;
675
675
 
676
- declare const SchoolModel: mongoose.Model<SchoolType, {}, {}, {}, mongoose.Document<unknown, {}, SchoolType, {}, {}> & Omit<_timardex_cluemart_shared.SchoolFormData, "logoUpload"> & {
677
- _id: string;
678
- createdAt: Date;
679
- deletedAt: Date | null;
680
- overallPoints: number | null;
681
- owner: _timardex_cluemart_shared.OwnerType | null;
682
- schoolCode: string;
683
- updatedAt: Date | null;
684
- } & Required<{
676
+ type SchoolDocument = Omit<SchoolType, "ranking">;
677
+ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
685
678
  _id: string;
686
679
  }> & {
687
680
  __v: number;
package/dist/index.mjs CHANGED
@@ -9946,7 +9946,7 @@ var GET_GAMES = gql`
9946
9946
  ${GAME_DOC_FIELDS_FRAGMENT}
9947
9947
  `;
9948
9948
  var GET_GAME = gql`
9949
- query getGame($_id: ID!) {
9949
+ query getGame($_id: ID) {
9950
9950
  game(_id: $_id) {
9951
9951
  ...GameDocFields
9952
9952
  }
@@ -10132,6 +10132,18 @@ var UPDATE_DAILY_CLUE_MUTATION = gql`
10132
10132
  }
10133
10133
  ${GAME_DOC_FIELDS_FRAGMENT}
10134
10134
  `;
10135
+ var SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = gql`
10136
+ fragment SchoolRegisteredUsersFields on SchoolRegisteredUserType {
10137
+ _id
10138
+ avatar {
10139
+ ...ResourceImageFields
10140
+ }
10141
+ email
10142
+ firstName
10143
+ lastName
10144
+ }
10145
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
10146
+ `;
10135
10147
  var SCHOOL = gql`
10136
10148
  fragment SchoolFields on SchoolType {
10137
10149
  _id
@@ -10152,6 +10164,7 @@ var SCHOOL = gql`
10152
10164
  ...OwnerFields
10153
10165
  }
10154
10166
  overallPoints
10167
+ ranking
10155
10168
  region
10156
10169
  studentCount
10157
10170
  schoolCode
@@ -10173,10 +10186,16 @@ var SCHOOL = gql`
10173
10186
  var GET_SCHOOL = gql`
10174
10187
  query getSchool($_id: ID!) {
10175
10188
  school(_id: $_id) {
10176
- ...SchoolFields
10189
+ school {
10190
+ ...SchoolFields
10191
+ }
10192
+ users {
10193
+ ...SchoolRegisteredUsersFields
10194
+ }
10177
10195
  }
10178
10196
  }
10179
10197
  ${SCHOOL}
10198
+ ${SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT}
10180
10199
  `;
10181
10200
  var GET_SCHOOLS = gql`
10182
10201
  query getSchools {
@@ -10840,6 +10859,79 @@ var schoolSchema = create$3().shape({
10840
10859
  socialMedia: create$2().of(socialMediaSchema).nullable().default(null),
10841
10860
  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"))
10842
10861
  });
10862
+ var PKG = "@timardex/cluemart-shared";
10863
+ var IMAGE_EXTENSION = ".webp";
10864
+ var posterIds = ["poster1", "poster2", "poster3"];
10865
+ var posterFiles = Object.fromEntries(
10866
+ posterIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10867
+ );
10868
+ var cluiIds = [
10869
+ "cluiTui",
10870
+ "sima",
10871
+ "tablas",
10872
+ "telefonos",
10873
+ "ugralos"
10874
+ ];
10875
+ var cluiFiles = Object.fromEntries(
10876
+ cluiIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10877
+ );
10878
+ var iconIds = [
10879
+ "apple-maps-icon",
10880
+ "facebook",
10881
+ "google-maps-icon",
10882
+ "instagram",
10883
+ "meet",
10884
+ "poll",
10885
+ "tiktok",
10886
+ "tip",
10887
+ "waze-maps-icon",
10888
+ "website",
10889
+ "youtube"
10890
+ ];
10891
+ var iconFiles = Object.fromEntries(
10892
+ iconIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10893
+ );
10894
+ var badgeIds = ["corporate", "private", "school"];
10895
+ var badgeFiles = Object.fromEntries(
10896
+ badgeIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10897
+ );
10898
+ var logoIds = [
10899
+ "googleMaps-logo-dark",
10900
+ "googleMaps-logo-light",
10901
+ "logo",
10902
+ "logo-atr"
10903
+ ];
10904
+ var logoFiles = Object.fromEntries(
10905
+ logoIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10906
+ );
10907
+ var otherImagesIds = [
10908
+ "banner-horizontal",
10909
+ "banner-vertical",
10910
+ "qr-code",
10911
+ "store-android",
10912
+ "store-ios"
10913
+ ];
10914
+ var otherImagesFiles = Object.fromEntries(
10915
+ otherImagesIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
10916
+ );
10917
+ var posters = Object.fromEntries(
10918
+ Object.entries(posterFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10919
+ );
10920
+ var cluiImages = Object.fromEntries(
10921
+ Object.entries(cluiFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10922
+ );
10923
+ var icons = Object.fromEntries(
10924
+ Object.entries(iconFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10925
+ );
10926
+ var badges = Object.fromEntries(
10927
+ Object.entries(badgeFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10928
+ );
10929
+ var logos = Object.fromEntries(
10930
+ Object.entries(logoFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10931
+ );
10932
+ var otherImages = Object.fromEntries(
10933
+ Object.entries(otherImagesFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
10934
+ );
10843
10935
  var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10844
10936
  EnumActivity2["FAVORITE"] = "FAVORITE";
10845
10937
  EnumActivity2["GOING"] = "GOING";