@timardex/cluemart-server-shared 1.0.63 → 1.0.65

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.cjs CHANGED
@@ -8498,6 +8498,42 @@ var LOCATION_FIELDS_FRAGMENT = gql`
8498
8498
  type
8499
8499
  }
8500
8500
  `;
8501
+ var EVENT_LIST_ITEM = gql`
8502
+ fragment EventListItemFields on EventListItemType {
8503
+ _id
8504
+ active
8505
+ claimed
8506
+ cover {
8507
+ ...ResourceImageFields
8508
+ }
8509
+ createdAt
8510
+ dateTime {
8511
+ ...EventDateTimeFields
8512
+ }
8513
+ deletedAt
8514
+ description
8515
+ eventType
8516
+ googlePlaceId
8517
+ images {
8518
+ ...ResourceImageFields
8519
+ }
8520
+ location {
8521
+ ...LocationFields
8522
+ }
8523
+ logo {
8524
+ ...ResourceImageFields
8525
+ }
8526
+ name
8527
+ rainOrShine
8528
+ rating
8529
+ region
8530
+ reviewCount
8531
+ updatedAt
8532
+ }
8533
+ ${EVENT_DATETIME_FIELDS_FRAGMENT}
8534
+ ${LOCATION_FIELDS_FRAGMENT}
8535
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
8536
+ `;
8501
8537
  var EVENT_INFO = gql`
8502
8538
  fragment EventInfoFields on EventInfoType {
8503
8539
  _id
@@ -8601,10 +8637,10 @@ var EVENT = gql`
8601
8637
  var GET_EVENTS = gql`
8602
8638
  query getEvents {
8603
8639
  events {
8604
- ...EventFields
8640
+ ...EventListItemFields
8605
8641
  }
8606
8642
  }
8607
- ${EVENT}
8643
+ ${EVENT_LIST_ITEM}
8608
8644
  `;
8609
8645
  var GET_EVENT = gql`
8610
8646
  query getEvent($_id: ID!) {
@@ -8617,26 +8653,26 @@ var GET_EVENT = gql`
8617
8653
  var GET_EVENTS_BY_REGION = gql`
8618
8654
  query getEventsByRegion($region: String!) {
8619
8655
  eventsByRegion(region: $region) {
8620
- ...EventFields
8656
+ ...EventListItemFields
8621
8657
  }
8622
8658
  }
8623
- ${EVENT}
8659
+ ${EVENT_LIST_ITEM}
8624
8660
  `;
8625
8661
  var SEARCH_EVENTS = gql`
8626
8662
  query searchEvents($search: String!, $region: String) {
8627
8663
  eventsSearch(search: $search, region: $region) {
8628
- ...EventFields
8664
+ ...EventListItemFields
8629
8665
  }
8630
8666
  }
8631
- ${EVENT}
8667
+ ${EVENT_LIST_ITEM}
8632
8668
  `;
8633
8669
  var GET_EVENTS_NEAR_ME = gql`
8634
8670
  query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
8635
8671
  eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
8636
- ...EventFields
8672
+ ...EventListItemFields
8637
8673
  }
8638
8674
  }
8639
- ${EVENT}
8675
+ ${EVENT_LIST_ITEM}
8640
8676
  `;
8641
8677
  var GET_EVENT_INFO = gql`
8642
8678
  query getEventInfo($eventId: ID!) {
@@ -9268,36 +9304,6 @@ var SEARCH_PARTNERS = gql`
9268
9304
  }
9269
9305
  ${PARTNER}
9270
9306
  `;
9271
- var USER_ACTIVITY_EVENT_FRAGMENT = gql`
9272
- fragment UserActivityEventFields on UserActivityEventType {
9273
- _id
9274
- active
9275
- cover {
9276
- ...ResourceImageFields
9277
- }
9278
- dateTime {
9279
- ...EventDateTimeFields
9280
- }
9281
- description
9282
- eventType
9283
- location {
9284
- ...LocationFields
9285
- }
9286
- logo {
9287
- ...ResourceImageFields
9288
- }
9289
- name
9290
- rainOrShine
9291
- region
9292
- socialMedia {
9293
- ...SocialMediaFields
9294
- }
9295
- }
9296
- ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
9297
- ${LOCATION_FIELDS_FRAGMENT}
9298
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
9299
- ${EVENT_DATETIME_FIELDS_FRAGMENT}
9300
- `;
9301
9307
  var GET_USERS = gql`
9302
9308
  query getUsers {
9303
9309
  users {
@@ -9343,7 +9349,7 @@ var GET_USER_ACTIVITIES = gql`
9343
9349
  userActivities {
9344
9350
  favourites {
9345
9351
  events {
9346
- ...EventFields
9352
+ ...EventListItemFields
9347
9353
  }
9348
9354
  vendors {
9349
9355
  ...VendorFields
@@ -9351,24 +9357,23 @@ var GET_USER_ACTIVITIES = gql`
9351
9357
  }
9352
9358
  going {
9353
9359
  events {
9354
- ...UserActivityEventFields
9360
+ ...EventListItemFields
9355
9361
  }
9356
9362
  }
9357
9363
  interested {
9358
9364
  events {
9359
- ...UserActivityEventFields
9365
+ ...EventListItemFields
9360
9366
  }
9361
9367
  }
9362
9368
  present {
9363
9369
  events {
9364
- ...UserActivityEventFields
9370
+ ...EventListItemFields
9365
9371
  }
9366
9372
  }
9367
9373
  }
9368
9374
  }
9369
- ${EVENT}
9375
+ ${EVENT_LIST_ITEM}
9370
9376
  ${VENDOR}
9371
- ${USER_ACTIVITY_EVENT_FRAGMENT}
9372
9377
  `;
9373
9378
  var NOTIFICATION_FRAGMENT = gql`
9374
9379
  fragment NotificationFields on Notification {
@@ -9525,7 +9530,7 @@ var GET_RESOURCE_CONNECTIONS = gql`
9525
9530
  ) {
9526
9531
  resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {
9527
9532
  events {
9528
- ...EventFields
9533
+ ...EventListItemFields
9529
9534
  }
9530
9535
  vendors {
9531
9536
  ...VendorFields
@@ -9533,7 +9538,7 @@ var GET_RESOURCE_CONNECTIONS = gql`
9533
9538
  }
9534
9539
  }
9535
9540
  ${VENDOR}
9536
- ${EVENT}
9541
+ ${EVENT_LIST_ITEM}
9537
9542
  `;
9538
9543
  var CREATE_RELATION_MUTATION = gql`
9539
9544
  mutation createRelation($input: RelationInputType!) {
@@ -10041,6 +10046,13 @@ var UPDATE_APP_SETTINGS_MUTATION = gql`
10041
10046
  updateAppSettings(input: $input)
10042
10047
  }
10043
10048
  `;
10049
+ var CRAWL_GOOGLE_MARKETS_MUTATION = gql`
10050
+ mutation crawlGoogleMarkets {
10051
+ crawlGoogleMarkets {
10052
+ message
10053
+ }
10054
+ }
10055
+ `;
10044
10056
  var APP_SETTINGS_FIELDS_FRAGMENT = gql`
10045
10057
  fragment AppSettingsFields on AppSettingsType {
10046
10058
  _id
@@ -10058,97 +10070,6 @@ var GET_APP_SETTINGS = gql`
10058
10070
  }
10059
10071
  ${APP_SETTINGS_FIELDS_FRAGMENT}
10060
10072
  `;
10061
- var CRAWL_GOOGLE_MARKETS_MUTATION = gql`
10062
- mutation crawlGoogleMarkets {
10063
- crawlGoogleMarkets {
10064
- message
10065
- }
10066
- }
10067
- `;
10068
- var GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT = gql`
10069
- fragment GoogleImportedMarketsFields on GoogleImportedMarketType {
10070
- _id
10071
- accessibilityOptions
10072
- address
10073
- addressComponents {
10074
- longName
10075
- shortName
10076
- types
10077
- }
10078
- allowsDogs
10079
- businessStatus
10080
- claimed
10081
- createdAt
10082
- dateTime {
10083
- ...EventDateTimeFields
10084
- }
10085
- goodForChildren
10086
- goodForGroups
10087
- googleMapsUrl
10088
- googlePlaceId
10089
- image
10090
- importedAt
10091
- liveMusic
10092
- location {
10093
- lat
10094
- lng
10095
- }
10096
- name
10097
- openingHours
10098
- parkingOptions
10099
- paymentOptions
10100
- phone
10101
- photos
10102
- rating
10103
- region
10104
- restroom
10105
- reviewCount
10106
- slug
10107
- updatedAt
10108
- website
10109
- }
10110
- ${EVENT_DATETIME_FIELDS_FRAGMENT}
10111
- `;
10112
- var GET_GOOGLE_IMPORTED_MARKETS = gql`
10113
- query getGoogleImportedMarkets {
10114
- googleImportedMarkets {
10115
- ...GoogleImportedMarketsFields
10116
- }
10117
- }
10118
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10119
- `;
10120
- var GET_GOOGLE_IMPORTED_MARKETS_BY_REGION = gql`
10121
- query getGoogleImportedMarketsByRegion($region: String!) {
10122
- googleImportedMarketsByRegion(region: $region) {
10123
- ...GoogleImportedMarketsFields
10124
- }
10125
- }
10126
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10127
- `;
10128
- var SEARCH_GOOGLE_IMPORTED_MARKETS = gql`
10129
- query searchGoogleImportedMarkets($search: String!, $region: String) {
10130
- googleImportedMarketsSearch(search: $search, region: $region) {
10131
- ...GoogleImportedMarketsFields
10132
- }
10133
- }
10134
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10135
- `;
10136
- var GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME = gql`
10137
- query getGoogleImportedMarketsNearMe(
10138
- $latitude: Float!
10139
- $longitude: Float!
10140
- $radius: Int
10141
- ) {
10142
- googleImportedMarketsNearMe(
10143
- lat: $latitude
10144
- lng: $longitude
10145
- radius: $radius
10146
- ) {
10147
- ...GoogleImportedMarketsFields
10148
- }
10149
- }
10150
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10151
- `;
10152
10073
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
10153
10074
  var nzbnRegex = /^94\d{11}$/;
10154
10075
  var normalizedUrlTransform = () => create$6().trim().transform(
@@ -11154,6 +11075,29 @@ var dateTimeSchema3 = new MongooseSchema3(
11154
11075
  { _id: false }
11155
11076
  // Prevents Mongoose from creating an additional _id field for subdocuments
11156
11077
  );
11078
+ var locationsSchema = new MongooseSchema3(
11079
+ {
11080
+ city: { required: true, type: String },
11081
+ coordinates: {
11082
+ required: true,
11083
+ type: [Number]
11084
+ // [longitude, latitude]
11085
+ },
11086
+ country: { required: true, type: String },
11087
+ fullAddress: { required: true, type: String },
11088
+ latitude: { required: true, type: Number },
11089
+ longitude: { required: true, type: Number },
11090
+ region: { required: true, type: String },
11091
+ type: {
11092
+ default: "Point",
11093
+ enum: ["Point"],
11094
+ required: true,
11095
+ type: String
11096
+ }
11097
+ },
11098
+ { _id: false }
11099
+ // Prevents Mongoose from creating an additional _id field for subdocuments
11100
+ );
11157
11101
  var baseResourceFields = {
11158
11102
  active: { default: false, required: true, type: Boolean },
11159
11103
  adIds: {
@@ -11303,14 +11247,6 @@ var ChatModel = import_mongoose5.default.models.Chat || import_mongoose5.default
11303
11247
  // src/mongoose/GoogleImportedMarket.ts
11304
11248
  var import_mongoose6 = __toESM(require("mongoose"));
11305
11249
  var MongooseSchema6 = import_mongoose6.default.Schema;
11306
- var locationSchema2 = new MongooseSchema6(
11307
- {
11308
- lat: { required: true, type: Number },
11309
- lng: { required: true, type: Number }
11310
- },
11311
- { _id: false }
11312
- // Prevents Mongoose from creating an additional _id field for subdocuments
11313
- );
11314
11250
  var addressComponentSchema = new MongooseSchema6(
11315
11251
  {
11316
11252
  longName: { required: false, type: String },
@@ -11322,12 +11258,18 @@ var addressComponentSchema = new MongooseSchema6(
11322
11258
  var schema3 = new MongooseSchema6(
11323
11259
  {
11324
11260
  accessibilityOptions: { required: false, type: Object },
11261
+ active: { default: false, required: true, type: Boolean },
11325
11262
  address: { required: true, type: String },
11326
11263
  addressComponents: { required: false, type: [addressComponentSchema] },
11327
11264
  allowsDogs: { required: false, type: Boolean },
11328
11265
  businessStatus: { required: false, type: String },
11329
11266
  claimed: { default: false, required: true, type: Boolean },
11267
+ cover: {
11268
+ required: false,
11269
+ type: ResourceImageTypeSchema
11270
+ },
11330
11271
  dateTime: [dateTimeSchema3],
11272
+ deletedAt: { default: null, required: false, type: Date },
11331
11273
  goodForChildren: { required: false, type: Boolean },
11332
11274
  goodForGroups: { required: false, type: Boolean },
11333
11275
  googleMapsUrl: { required: false, type: String },
@@ -11337,22 +11279,20 @@ var schema3 = new MongooseSchema6(
11337
11279
  unique: true
11338
11280
  // unique, indexed
11339
11281
  },
11340
- image: { required: false, type: String },
11341
- // photo_reference only
11282
+ images: { required: false, type: [ResourceImageTypeSchema] },
11283
+ // array of photo_reference
11342
11284
  importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
11343
11285
  liveMusic: { required: false, type: Boolean },
11344
11286
  location: {
11345
11287
  required: false,
11346
11288
  // optional because lat/lng may expire after 30 days
11347
- type: locationSchema2
11289
+ type: locationsSchema
11348
11290
  },
11349
11291
  name: { required: true, type: String },
11350
11292
  openingHours: { required: false, type: [String] },
11351
11293
  parkingOptions: { required: false, type: Object },
11352
11294
  paymentOptions: { required: false, type: Object },
11353
11295
  phone: { required: false, type: String },
11354
- photos: { required: false, type: [String] },
11355
- // array of photo_reference
11356
11296
  rating: { required: false, type: Number },
11357
11297
  region: { required: false, type: String },
11358
11298
  restroom: { required: false, type: Boolean },
@@ -11946,29 +11886,6 @@ var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mong
11946
11886
  // src/mongoose/event/Event.ts
11947
11887
  var import_mongoose15 = __toESM(require("mongoose"));
11948
11888
  var MongooseSchema15 = import_mongoose15.default.Schema;
11949
- var locationsSchema = new MongooseSchema15(
11950
- {
11951
- city: { required: true, type: String },
11952
- coordinates: {
11953
- required: true,
11954
- type: [Number]
11955
- // [longitude, latitude]
11956
- },
11957
- country: { required: true, type: String },
11958
- fullAddress: { required: true, type: String },
11959
- latitude: { required: true, type: Number },
11960
- longitude: { required: true, type: Number },
11961
- region: { required: true, type: String },
11962
- type: {
11963
- default: "Point",
11964
- enum: ["Point"],
11965
- required: true,
11966
- type: String
11967
- }
11968
- },
11969
- { _id: false }
11970
- // Prevents Mongoose from creating an additional _id field for subdocuments
11971
- );
11972
11889
  var schema11 = new MongooseSchema15(
11973
11890
  {
11974
11891
  ...baseResourceFields,