@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.
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,93 +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
- goodForChildren
10083
- goodForGroups
10084
- googleMapsUrl
10085
- googlePlaceId
10086
- image
10087
- importedAt
10088
- liveMusic
10089
- location {
10090
- lat
10091
- lng
10092
- }
10093
- name
10094
- openingHours
10095
- parkingOptions
10096
- paymentOptions
10097
- phone
10098
- photos
10099
- rating
10100
- region
10101
- restroom
10102
- reviewCount
10103
- slug
10104
- updatedAt
10105
- website
10106
- }
10107
- `;
10108
- var GET_GOOGLE_IMPORTED_MARKETS = gql`
10109
- query getGoogleImportedMarkets {
10110
- googleImportedMarkets {
10111
- ...GoogleImportedMarketsFields
10112
- }
10113
- }
10114
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10115
- `;
10116
- var GET_GOOGLE_IMPORTED_MARKETS_BY_REGION = gql`
10117
- query getGoogleImportedMarketsByRegion($region: String!) {
10118
- googleImportedMarketsByRegion(region: $region) {
10119
- ...GoogleImportedMarketsFields
10120
- }
10121
- }
10122
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10123
- `;
10124
- var SEARCH_GOOGLE_IMPORTED_MARKETS = gql`
10125
- query searchGoogleImportedMarkets($search: String!, $region: String) {
10126
- googleImportedMarketsSearch(search: $search, region: $region) {
10127
- ...GoogleImportedMarketsFields
10128
- }
10129
- }
10130
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10131
- `;
10132
- var GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME = gql`
10133
- query getGoogleImportedMarketsNearMe(
10134
- $latitude: Float!
10135
- $longitude: Float!
10136
- $radius: Int
10137
- ) {
10138
- googleImportedMarketsNearMe(
10139
- lat: $latitude
10140
- lng: $longitude
10141
- radius: $radius
10142
- ) {
10143
- ...GoogleImportedMarketsFields
10144
- }
10145
- }
10146
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
10147
- `;
10148
10073
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
10149
10074
  var nzbnRegex = /^94\d{11}$/;
10150
10075
  var normalizedUrlTransform = () => create$6().trim().transform(
@@ -11150,6 +11075,29 @@ var dateTimeSchema3 = new MongooseSchema3(
11150
11075
  { _id: false }
11151
11076
  // Prevents Mongoose from creating an additional _id field for subdocuments
11152
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
+ );
11153
11101
  var baseResourceFields = {
11154
11102
  active: { default: false, required: true, type: Boolean },
11155
11103
  adIds: {
@@ -11299,14 +11247,6 @@ var ChatModel = import_mongoose5.default.models.Chat || import_mongoose5.default
11299
11247
  // src/mongoose/GoogleImportedMarket.ts
11300
11248
  var import_mongoose6 = __toESM(require("mongoose"));
11301
11249
  var MongooseSchema6 = import_mongoose6.default.Schema;
11302
- var locationSchema2 = new MongooseSchema6(
11303
- {
11304
- lat: { required: true, type: Number },
11305
- lng: { required: true, type: Number }
11306
- },
11307
- { _id: false }
11308
- // Prevents Mongoose from creating an additional _id field for subdocuments
11309
- );
11310
11250
  var addressComponentSchema = new MongooseSchema6(
11311
11251
  {
11312
11252
  longName: { required: false, type: String },
@@ -11318,11 +11258,18 @@ var addressComponentSchema = new MongooseSchema6(
11318
11258
  var schema3 = new MongooseSchema6(
11319
11259
  {
11320
11260
  accessibilityOptions: { required: false, type: Object },
11261
+ active: { default: false, required: true, type: Boolean },
11321
11262
  address: { required: true, type: String },
11322
11263
  addressComponents: { required: false, type: [addressComponentSchema] },
11323
11264
  allowsDogs: { required: false, type: Boolean },
11324
11265
  businessStatus: { required: false, type: String },
11325
11266
  claimed: { default: false, required: true, type: Boolean },
11267
+ cover: {
11268
+ required: false,
11269
+ type: ResourceImageTypeSchema
11270
+ },
11271
+ dateTime: [dateTimeSchema3],
11272
+ deletedAt: { default: null, required: false, type: Date },
11326
11273
  goodForChildren: { required: false, type: Boolean },
11327
11274
  goodForGroups: { required: false, type: Boolean },
11328
11275
  googleMapsUrl: { required: false, type: String },
@@ -11332,22 +11279,20 @@ var schema3 = new MongooseSchema6(
11332
11279
  unique: true
11333
11280
  // unique, indexed
11334
11281
  },
11335
- image: { required: false, type: String },
11336
- // photo_reference only
11282
+ images: { required: false, type: [ResourceImageTypeSchema] },
11283
+ // array of photo_reference
11337
11284
  importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
11338
11285
  liveMusic: { required: false, type: Boolean },
11339
11286
  location: {
11340
11287
  required: false,
11341
11288
  // optional because lat/lng may expire after 30 days
11342
- type: locationSchema2
11289
+ type: locationsSchema
11343
11290
  },
11344
11291
  name: { required: true, type: String },
11345
11292
  openingHours: { required: false, type: [String] },
11346
11293
  parkingOptions: { required: false, type: Object },
11347
11294
  paymentOptions: { required: false, type: Object },
11348
11295
  phone: { required: false, type: String },
11349
- photos: { required: false, type: [String] },
11350
- // array of photo_reference
11351
11296
  rating: { required: false, type: Number },
11352
11297
  region: { required: false, type: String },
11353
11298
  restroom: { required: false, type: Boolean },
@@ -11941,29 +11886,6 @@ var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mong
11941
11886
  // src/mongoose/event/Event.ts
11942
11887
  var import_mongoose15 = __toESM(require("mongoose"));
11943
11888
  var MongooseSchema15 = import_mongoose15.default.Schema;
11944
- var locationsSchema = new MongooseSchema15(
11945
- {
11946
- city: { required: true, type: String },
11947
- coordinates: {
11948
- required: true,
11949
- type: [Number]
11950
- // [longitude, latitude]
11951
- },
11952
- country: { required: true, type: String },
11953
- fullAddress: { required: true, type: String },
11954
- latitude: { required: true, type: Number },
11955
- longitude: { required: true, type: Number },
11956
- region: { required: true, type: String },
11957
- type: {
11958
- default: "Point",
11959
- enum: ["Point"],
11960
- required: true,
11961
- type: String
11962
- }
11963
- },
11964
- { _id: false }
11965
- // Prevents Mongoose from creating an additional _id field for subdocuments
11966
- );
11967
11889
  var schema11 = new MongooseSchema15(
11968
11890
  {
11969
11891
  ...baseResourceFields,