@timardex/cluemart-server-shared 1.0.62 → 1.0.64

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.
@@ -8426,6 +8426,42 @@ var LOCATION_FIELDS_FRAGMENT = gql`
8426
8426
  type
8427
8427
  }
8428
8428
  `;
8429
+ var EVENT_LIST_ITEM = gql`
8430
+ fragment EventListItemFields on EventListItemType {
8431
+ _id
8432
+ active
8433
+ claimed
8434
+ cover {
8435
+ ...ResourceImageFields
8436
+ }
8437
+ createdAt
8438
+ dateTime {
8439
+ ...EventDateTimeFields
8440
+ }
8441
+ deletedAt
8442
+ description
8443
+ eventType
8444
+ googlePlaceId
8445
+ images {
8446
+ ...ResourceImageFields
8447
+ }
8448
+ location {
8449
+ ...LocationFields
8450
+ }
8451
+ logo {
8452
+ ...ResourceImageFields
8453
+ }
8454
+ name
8455
+ rainOrShine
8456
+ rating
8457
+ region
8458
+ reviewCount
8459
+ updatedAt
8460
+ }
8461
+ ${EVENT_DATETIME_FIELDS_FRAGMENT}
8462
+ ${LOCATION_FIELDS_FRAGMENT}
8463
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
8464
+ `;
8429
8465
  var EVENT_INFO = gql`
8430
8466
  fragment EventInfoFields on EventInfoType {
8431
8467
  _id
@@ -8529,10 +8565,10 @@ var EVENT = gql`
8529
8565
  var GET_EVENTS = gql`
8530
8566
  query getEvents {
8531
8567
  events {
8532
- ...EventFields
8568
+ ...EventListItemFields
8533
8569
  }
8534
8570
  }
8535
- ${EVENT}
8571
+ ${EVENT_LIST_ITEM}
8536
8572
  `;
8537
8573
  var GET_EVENT = gql`
8538
8574
  query getEvent($_id: ID!) {
@@ -8545,26 +8581,26 @@ var GET_EVENT = gql`
8545
8581
  var GET_EVENTS_BY_REGION = gql`
8546
8582
  query getEventsByRegion($region: String!) {
8547
8583
  eventsByRegion(region: $region) {
8548
- ...EventFields
8584
+ ...EventListItemFields
8549
8585
  }
8550
8586
  }
8551
- ${EVENT}
8587
+ ${EVENT_LIST_ITEM}
8552
8588
  `;
8553
8589
  var SEARCH_EVENTS = gql`
8554
8590
  query searchEvents($search: String!, $region: String) {
8555
8591
  eventsSearch(search: $search, region: $region) {
8556
- ...EventFields
8592
+ ...EventListItemFields
8557
8593
  }
8558
8594
  }
8559
- ${EVENT}
8595
+ ${EVENT_LIST_ITEM}
8560
8596
  `;
8561
8597
  var GET_EVENTS_NEAR_ME = gql`
8562
8598
  query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
8563
8599
  eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
8564
- ...EventFields
8600
+ ...EventListItemFields
8565
8601
  }
8566
8602
  }
8567
- ${EVENT}
8603
+ ${EVENT_LIST_ITEM}
8568
8604
  `;
8569
8605
  var GET_EVENT_INFO = gql`
8570
8606
  query getEventInfo($eventId: ID!) {
@@ -9196,36 +9232,6 @@ var SEARCH_PARTNERS = gql`
9196
9232
  }
9197
9233
  ${PARTNER}
9198
9234
  `;
9199
- var USER_ACTIVITY_EVENT_FRAGMENT = gql`
9200
- fragment UserActivityEventFields on UserActivityEventType {
9201
- _id
9202
- active
9203
- cover {
9204
- ...ResourceImageFields
9205
- }
9206
- dateTime {
9207
- ...EventDateTimeFields
9208
- }
9209
- description
9210
- eventType
9211
- location {
9212
- ...LocationFields
9213
- }
9214
- logo {
9215
- ...ResourceImageFields
9216
- }
9217
- name
9218
- rainOrShine
9219
- region
9220
- socialMedia {
9221
- ...SocialMediaFields
9222
- }
9223
- }
9224
- ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
9225
- ${LOCATION_FIELDS_FRAGMENT}
9226
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
9227
- ${EVENT_DATETIME_FIELDS_FRAGMENT}
9228
- `;
9229
9235
  var GET_USERS = gql`
9230
9236
  query getUsers {
9231
9237
  users {
@@ -9271,7 +9277,7 @@ var GET_USER_ACTIVITIES = gql`
9271
9277
  userActivities {
9272
9278
  favourites {
9273
9279
  events {
9274
- ...EventFields
9280
+ ...EventListItemFields
9275
9281
  }
9276
9282
  vendors {
9277
9283
  ...VendorFields
@@ -9279,24 +9285,23 @@ var GET_USER_ACTIVITIES = gql`
9279
9285
  }
9280
9286
  going {
9281
9287
  events {
9282
- ...UserActivityEventFields
9288
+ ...EventListItemFields
9283
9289
  }
9284
9290
  }
9285
9291
  interested {
9286
9292
  events {
9287
- ...UserActivityEventFields
9293
+ ...EventListItemFields
9288
9294
  }
9289
9295
  }
9290
9296
  present {
9291
9297
  events {
9292
- ...UserActivityEventFields
9298
+ ...EventListItemFields
9293
9299
  }
9294
9300
  }
9295
9301
  }
9296
9302
  }
9297
- ${EVENT}
9303
+ ${EVENT_LIST_ITEM}
9298
9304
  ${VENDOR}
9299
- ${USER_ACTIVITY_EVENT_FRAGMENT}
9300
9305
  `;
9301
9306
  var NOTIFICATION_FRAGMENT = gql`
9302
9307
  fragment NotificationFields on Notification {
@@ -9453,7 +9458,7 @@ var GET_RESOURCE_CONNECTIONS = gql`
9453
9458
  ) {
9454
9459
  resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {
9455
9460
  events {
9456
- ...EventFields
9461
+ ...EventListItemFields
9457
9462
  }
9458
9463
  vendors {
9459
9464
  ...VendorFields
@@ -9461,7 +9466,7 @@ var GET_RESOURCE_CONNECTIONS = gql`
9461
9466
  }
9462
9467
  }
9463
9468
  ${VENDOR}
9464
- ${EVENT}
9469
+ ${EVENT_LIST_ITEM}
9465
9470
  `;
9466
9471
  var CREATE_RELATION_MUTATION = gql`
9467
9472
  mutation createRelation($input: RelationInputType!) {
@@ -9969,6 +9974,13 @@ var UPDATE_APP_SETTINGS_MUTATION = gql`
9969
9974
  updateAppSettings(input: $input)
9970
9975
  }
9971
9976
  `;
9977
+ var CRAWL_GOOGLE_MARKETS_MUTATION = gql`
9978
+ mutation crawlGoogleMarkets {
9979
+ crawlGoogleMarkets {
9980
+ message
9981
+ }
9982
+ }
9983
+ `;
9972
9984
  var APP_SETTINGS_FIELDS_FRAGMENT = gql`
9973
9985
  fragment AppSettingsFields on AppSettingsType {
9974
9986
  _id
@@ -9986,93 +9998,6 @@ var GET_APP_SETTINGS = gql`
9986
9998
  }
9987
9999
  ${APP_SETTINGS_FIELDS_FRAGMENT}
9988
10000
  `;
9989
- var CRAWL_GOOGLE_MARKETS_MUTATION = gql`
9990
- mutation crawlGoogleMarkets {
9991
- crawlGoogleMarkets {
9992
- message
9993
- }
9994
- }
9995
- `;
9996
- var GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT = gql`
9997
- fragment GoogleImportedMarketsFields on GoogleImportedMarketType {
9998
- _id
9999
- accessibilityOptions
10000
- address
10001
- addressComponents {
10002
- longName
10003
- shortName
10004
- types
10005
- }
10006
- allowsDogs
10007
- businessStatus
10008
- claimed
10009
- createdAt
10010
- goodForChildren
10011
- goodForGroups
10012
- googleMapsUrl
10013
- googlePlaceId
10014
- image
10015
- importedAt
10016
- liveMusic
10017
- location {
10018
- lat
10019
- lng
10020
- }
10021
- name
10022
- openingHours
10023
- parkingOptions
10024
- paymentOptions
10025
- phone
10026
- photos
10027
- rating
10028
- region
10029
- restroom
10030
- reviewCount
10031
- slug
10032
- updatedAt
10033
- website
10034
- }
10035
- `;
10036
- var GET_GOOGLE_IMPORTED_MARKETS = gql`
10037
- query getGoogleImportedMarkets {
10038
- googleImportedMarkets {
10039
- ...GoogleImportedMarketsFields
10040
- }
10041
- }
10042
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10043
- `;
10044
- var GET_GOOGLE_IMPORTED_MARKETS_BY_REGION = gql`
10045
- query getGoogleImportedMarketsByRegion($region: String!) {
10046
- googleImportedMarketsByRegion(region: $region) {
10047
- ...GoogleImportedMarketsFields
10048
- }
10049
- }
10050
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10051
- `;
10052
- var SEARCH_GOOGLE_IMPORTED_MARKETS = gql`
10053
- query searchGoogleImportedMarkets($search: String!, $region: String) {
10054
- googleImportedMarketsSearch(search: $search, region: $region) {
10055
- ...GoogleImportedMarketsFields
10056
- }
10057
- }
10058
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10059
- `;
10060
- var GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME = gql`
10061
- query getGoogleImportedMarketsNearMe(
10062
- $latitude: Float!
10063
- $longitude: Float!
10064
- $radius: Int
10065
- ) {
10066
- googleImportedMarketsNearMe(
10067
- lat: $latitude
10068
- lng: $longitude
10069
- radius: $radius
10070
- ) {
10071
- ...GoogleImportedMarketsFields
10072
- }
10073
- }
10074
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10075
- `;
10076
10001
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
10077
10002
  var nzbnRegex = /^94\d{11}$/;
10078
10003
  var normalizedUrlTransform = () => create$6().trim().transform(
@@ -11078,6 +11003,29 @@ var dateTimeSchema3 = new MongooseSchema3(
11078
11003
  { _id: false }
11079
11004
  // Prevents Mongoose from creating an additional _id field for subdocuments
11080
11005
  );
11006
+ var locationsSchema = new MongooseSchema3(
11007
+ {
11008
+ city: { required: true, type: String },
11009
+ coordinates: {
11010
+ required: true,
11011
+ type: [Number]
11012
+ // [longitude, latitude]
11013
+ },
11014
+ country: { required: true, type: String },
11015
+ fullAddress: { required: true, type: String },
11016
+ latitude: { required: true, type: Number },
11017
+ longitude: { required: true, type: Number },
11018
+ region: { required: true, type: String },
11019
+ type: {
11020
+ default: "Point",
11021
+ enum: ["Point"],
11022
+ required: true,
11023
+ type: String
11024
+ }
11025
+ },
11026
+ { _id: false }
11027
+ // Prevents Mongoose from creating an additional _id field for subdocuments
11028
+ );
11081
11029
  var baseResourceFields = {
11082
11030
  active: { default: false, required: true, type: Boolean },
11083
11031
  adIds: {
@@ -11227,14 +11175,6 @@ var ChatModel = mongoose5.models.Chat || mongoose5.model("Chat", ChatSchema);
11227
11175
  // src/mongoose/GoogleImportedMarket.ts
11228
11176
  import mongoose6 from "mongoose";
11229
11177
  var MongooseSchema6 = mongoose6.Schema;
11230
- var locationSchema2 = new MongooseSchema6(
11231
- {
11232
- lat: { required: true, type: Number },
11233
- lng: { required: true, type: Number }
11234
- },
11235
- { _id: false }
11236
- // Prevents Mongoose from creating an additional _id field for subdocuments
11237
- );
11238
11178
  var addressComponentSchema = new MongooseSchema6(
11239
11179
  {
11240
11180
  longName: { required: false, type: String },
@@ -11246,11 +11186,18 @@ var addressComponentSchema = new MongooseSchema6(
11246
11186
  var schema3 = new MongooseSchema6(
11247
11187
  {
11248
11188
  accessibilityOptions: { required: false, type: Object },
11189
+ active: { default: false, required: true, type: Boolean },
11249
11190
  address: { required: true, type: String },
11250
11191
  addressComponents: { required: false, type: [addressComponentSchema] },
11251
11192
  allowsDogs: { required: false, type: Boolean },
11252
11193
  businessStatus: { required: false, type: String },
11253
11194
  claimed: { default: false, required: true, type: Boolean },
11195
+ cover: {
11196
+ required: false,
11197
+ type: ResourceImageTypeSchema
11198
+ },
11199
+ dateTime: [dateTimeSchema3],
11200
+ deletedAt: { default: null, required: false, type: Date },
11254
11201
  goodForChildren: { required: false, type: Boolean },
11255
11202
  goodForGroups: { required: false, type: Boolean },
11256
11203
  googleMapsUrl: { required: false, type: String },
@@ -11260,22 +11207,20 @@ var schema3 = new MongooseSchema6(
11260
11207
  unique: true
11261
11208
  // unique, indexed
11262
11209
  },
11263
- image: { required: false, type: String },
11264
- // photo_reference only
11210
+ images: { required: false, type: [ResourceImageTypeSchema] },
11211
+ // array of photo_reference
11265
11212
  importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
11266
11213
  liveMusic: { required: false, type: Boolean },
11267
11214
  location: {
11268
11215
  required: false,
11269
11216
  // optional because lat/lng may expire after 30 days
11270
- type: locationSchema2
11217
+ type: locationsSchema
11271
11218
  },
11272
11219
  name: { required: true, type: String },
11273
11220
  openingHours: { required: false, type: [String] },
11274
11221
  parkingOptions: { required: false, type: Object },
11275
11222
  paymentOptions: { required: false, type: Object },
11276
11223
  phone: { required: false, type: String },
11277
- photos: { required: false, type: [String] },
11278
- // array of photo_reference
11279
11224
  rating: { required: false, type: Number },
11280
11225
  region: { required: false, type: String },
11281
11226
  restroom: { required: false, type: Boolean },
@@ -11869,29 +11814,6 @@ var VendorInfoModel = mongoose14.models.VendorInfo || mongoose14.model("VendorIn
11869
11814
  // src/mongoose/event/Event.ts
11870
11815
  import mongoose15 from "mongoose";
11871
11816
  var MongooseSchema15 = mongoose15.Schema;
11872
- var locationsSchema = new MongooseSchema15(
11873
- {
11874
- city: { required: true, type: String },
11875
- coordinates: {
11876
- required: true,
11877
- type: [Number]
11878
- // [longitude, latitude]
11879
- },
11880
- country: { required: true, type: String },
11881
- fullAddress: { required: true, type: String },
11882
- latitude: { required: true, type: Number },
11883
- longitude: { required: true, type: Number },
11884
- region: { required: true, type: String },
11885
- type: {
11886
- default: "Point",
11887
- enum: ["Point"],
11888
- required: true,
11889
- type: String
11890
- }
11891
- },
11892
- { _id: false }
11893
- // Prevents Mongoose from creating an additional _id field for subdocuments
11894
- );
11895
11817
  var schema11 = new MongooseSchema15(
11896
11818
  {
11897
11819
  ...baseResourceFields,
@@ -12027,6 +11949,7 @@ export {
12027
11949
  termsAgreementSchema,
12028
11950
  resourceRelationsSchema,
12029
11951
  dateTimeSchema3 as dateTimeSchema,
11952
+ locationsSchema,
12030
11953
  baseResourceFields,
12031
11954
  AdModel,
12032
11955
  ParticipantSchema,
@@ -12040,7 +11963,6 @@ export {
12040
11963
  VerificationTokenModel,
12041
11964
  VendorModel,
12042
11965
  VendorInfoModel,
12043
- locationsSchema,
12044
11966
  EventModel,
12045
11967
  PartnerModel,
12046
11968
  PostModel,
@@ -12071,4 +11993,4 @@ react/cjs/react.development.js:
12071
11993
  * LICENSE file in the root directory of this source tree.
12072
11994
  *)
12073
11995
  */
12074
- //# sourceMappingURL=chunk-HV25W6XY.mjs.map
11996
+ //# sourceMappingURL=chunk-DS5E2QOI.mjs.map