@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/{chunk-QGZKB5FC.mjs → chunk-DS5E2QOI.mjs} +92 -175
- package/dist/chunk-DS5E2QOI.mjs.map +1 -0
- package/dist/index.cjs +90 -173
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.mjs +90 -173
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +90 -173
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +10 -10
- package/dist/mongoose/index.d.ts +10 -10
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +90 -173
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-QGZKB5FC.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -8491,6 +8491,42 @@ var LOCATION_FIELDS_FRAGMENT = gql`
|
|
|
8491
8491
|
type
|
|
8492
8492
|
}
|
|
8493
8493
|
`;
|
|
8494
|
+
var EVENT_LIST_ITEM = gql`
|
|
8495
|
+
fragment EventListItemFields on EventListItemType {
|
|
8496
|
+
_id
|
|
8497
|
+
active
|
|
8498
|
+
claimed
|
|
8499
|
+
cover {
|
|
8500
|
+
...ResourceImageFields
|
|
8501
|
+
}
|
|
8502
|
+
createdAt
|
|
8503
|
+
dateTime {
|
|
8504
|
+
...EventDateTimeFields
|
|
8505
|
+
}
|
|
8506
|
+
deletedAt
|
|
8507
|
+
description
|
|
8508
|
+
eventType
|
|
8509
|
+
googlePlaceId
|
|
8510
|
+
images {
|
|
8511
|
+
...ResourceImageFields
|
|
8512
|
+
}
|
|
8513
|
+
location {
|
|
8514
|
+
...LocationFields
|
|
8515
|
+
}
|
|
8516
|
+
logo {
|
|
8517
|
+
...ResourceImageFields
|
|
8518
|
+
}
|
|
8519
|
+
name
|
|
8520
|
+
rainOrShine
|
|
8521
|
+
rating
|
|
8522
|
+
region
|
|
8523
|
+
reviewCount
|
|
8524
|
+
updatedAt
|
|
8525
|
+
}
|
|
8526
|
+
${EVENT_DATETIME_FIELDS_FRAGMENT}
|
|
8527
|
+
${LOCATION_FIELDS_FRAGMENT}
|
|
8528
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
8529
|
+
`;
|
|
8494
8530
|
var EVENT_INFO = gql`
|
|
8495
8531
|
fragment EventInfoFields on EventInfoType {
|
|
8496
8532
|
_id
|
|
@@ -8594,10 +8630,10 @@ var EVENT = gql`
|
|
|
8594
8630
|
var GET_EVENTS = gql`
|
|
8595
8631
|
query getEvents {
|
|
8596
8632
|
events {
|
|
8597
|
-
...
|
|
8633
|
+
...EventListItemFields
|
|
8598
8634
|
}
|
|
8599
8635
|
}
|
|
8600
|
-
${
|
|
8636
|
+
${EVENT_LIST_ITEM}
|
|
8601
8637
|
`;
|
|
8602
8638
|
var GET_EVENT = gql`
|
|
8603
8639
|
query getEvent($_id: ID!) {
|
|
@@ -8610,26 +8646,26 @@ var GET_EVENT = gql`
|
|
|
8610
8646
|
var GET_EVENTS_BY_REGION = gql`
|
|
8611
8647
|
query getEventsByRegion($region: String!) {
|
|
8612
8648
|
eventsByRegion(region: $region) {
|
|
8613
|
-
...
|
|
8649
|
+
...EventListItemFields
|
|
8614
8650
|
}
|
|
8615
8651
|
}
|
|
8616
|
-
${
|
|
8652
|
+
${EVENT_LIST_ITEM}
|
|
8617
8653
|
`;
|
|
8618
8654
|
var SEARCH_EVENTS = gql`
|
|
8619
8655
|
query searchEvents($search: String!, $region: String) {
|
|
8620
8656
|
eventsSearch(search: $search, region: $region) {
|
|
8621
|
-
...
|
|
8657
|
+
...EventListItemFields
|
|
8622
8658
|
}
|
|
8623
8659
|
}
|
|
8624
|
-
${
|
|
8660
|
+
${EVENT_LIST_ITEM}
|
|
8625
8661
|
`;
|
|
8626
8662
|
var GET_EVENTS_NEAR_ME = gql`
|
|
8627
8663
|
query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {
|
|
8628
8664
|
eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {
|
|
8629
|
-
...
|
|
8665
|
+
...EventListItemFields
|
|
8630
8666
|
}
|
|
8631
8667
|
}
|
|
8632
|
-
${
|
|
8668
|
+
${EVENT_LIST_ITEM}
|
|
8633
8669
|
`;
|
|
8634
8670
|
var GET_EVENT_INFO = gql`
|
|
8635
8671
|
query getEventInfo($eventId: ID!) {
|
|
@@ -9261,36 +9297,6 @@ var SEARCH_PARTNERS = gql`
|
|
|
9261
9297
|
}
|
|
9262
9298
|
${PARTNER}
|
|
9263
9299
|
`;
|
|
9264
|
-
var USER_ACTIVITY_EVENT_FRAGMENT = gql`
|
|
9265
|
-
fragment UserActivityEventFields on UserActivityEventType {
|
|
9266
|
-
_id
|
|
9267
|
-
active
|
|
9268
|
-
cover {
|
|
9269
|
-
...ResourceImageFields
|
|
9270
|
-
}
|
|
9271
|
-
dateTime {
|
|
9272
|
-
...EventDateTimeFields
|
|
9273
|
-
}
|
|
9274
|
-
description
|
|
9275
|
-
eventType
|
|
9276
|
-
location {
|
|
9277
|
-
...LocationFields
|
|
9278
|
-
}
|
|
9279
|
-
logo {
|
|
9280
|
-
...ResourceImageFields
|
|
9281
|
-
}
|
|
9282
|
-
name
|
|
9283
|
-
rainOrShine
|
|
9284
|
-
region
|
|
9285
|
-
socialMedia {
|
|
9286
|
-
...SocialMediaFields
|
|
9287
|
-
}
|
|
9288
|
-
}
|
|
9289
|
-
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
9290
|
-
${LOCATION_FIELDS_FRAGMENT}
|
|
9291
|
-
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
9292
|
-
${EVENT_DATETIME_FIELDS_FRAGMENT}
|
|
9293
|
-
`;
|
|
9294
9300
|
var GET_USERS = gql`
|
|
9295
9301
|
query getUsers {
|
|
9296
9302
|
users {
|
|
@@ -9336,7 +9342,7 @@ var GET_USER_ACTIVITIES = gql`
|
|
|
9336
9342
|
userActivities {
|
|
9337
9343
|
favourites {
|
|
9338
9344
|
events {
|
|
9339
|
-
...
|
|
9345
|
+
...EventListItemFields
|
|
9340
9346
|
}
|
|
9341
9347
|
vendors {
|
|
9342
9348
|
...VendorFields
|
|
@@ -9344,24 +9350,23 @@ var GET_USER_ACTIVITIES = gql`
|
|
|
9344
9350
|
}
|
|
9345
9351
|
going {
|
|
9346
9352
|
events {
|
|
9347
|
-
...
|
|
9353
|
+
...EventListItemFields
|
|
9348
9354
|
}
|
|
9349
9355
|
}
|
|
9350
9356
|
interested {
|
|
9351
9357
|
events {
|
|
9352
|
-
...
|
|
9358
|
+
...EventListItemFields
|
|
9353
9359
|
}
|
|
9354
9360
|
}
|
|
9355
9361
|
present {
|
|
9356
9362
|
events {
|
|
9357
|
-
...
|
|
9363
|
+
...EventListItemFields
|
|
9358
9364
|
}
|
|
9359
9365
|
}
|
|
9360
9366
|
}
|
|
9361
9367
|
}
|
|
9362
|
-
${
|
|
9368
|
+
${EVENT_LIST_ITEM}
|
|
9363
9369
|
${VENDOR}
|
|
9364
|
-
${USER_ACTIVITY_EVENT_FRAGMENT}
|
|
9365
9370
|
`;
|
|
9366
9371
|
var NOTIFICATION_FRAGMENT = gql`
|
|
9367
9372
|
fragment NotificationFields on Notification {
|
|
@@ -9518,7 +9523,7 @@ var GET_RESOURCE_CONNECTIONS = gql`
|
|
|
9518
9523
|
) {
|
|
9519
9524
|
resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {
|
|
9520
9525
|
events {
|
|
9521
|
-
...
|
|
9526
|
+
...EventListItemFields
|
|
9522
9527
|
}
|
|
9523
9528
|
vendors {
|
|
9524
9529
|
...VendorFields
|
|
@@ -9526,7 +9531,7 @@ var GET_RESOURCE_CONNECTIONS = gql`
|
|
|
9526
9531
|
}
|
|
9527
9532
|
}
|
|
9528
9533
|
${VENDOR}
|
|
9529
|
-
${
|
|
9534
|
+
${EVENT_LIST_ITEM}
|
|
9530
9535
|
`;
|
|
9531
9536
|
var CREATE_RELATION_MUTATION = gql`
|
|
9532
9537
|
mutation createRelation($input: RelationInputType!) {
|
|
@@ -10034,6 +10039,13 @@ var UPDATE_APP_SETTINGS_MUTATION = gql`
|
|
|
10034
10039
|
updateAppSettings(input: $input)
|
|
10035
10040
|
}
|
|
10036
10041
|
`;
|
|
10042
|
+
var CRAWL_GOOGLE_MARKETS_MUTATION = gql`
|
|
10043
|
+
mutation crawlGoogleMarkets {
|
|
10044
|
+
crawlGoogleMarkets {
|
|
10045
|
+
message
|
|
10046
|
+
}
|
|
10047
|
+
}
|
|
10048
|
+
`;
|
|
10037
10049
|
var APP_SETTINGS_FIELDS_FRAGMENT = gql`
|
|
10038
10050
|
fragment AppSettingsFields on AppSettingsType {
|
|
10039
10051
|
_id
|
|
@@ -10051,97 +10063,6 @@ var GET_APP_SETTINGS = gql`
|
|
|
10051
10063
|
}
|
|
10052
10064
|
${APP_SETTINGS_FIELDS_FRAGMENT}
|
|
10053
10065
|
`;
|
|
10054
|
-
var CRAWL_GOOGLE_MARKETS_MUTATION = gql`
|
|
10055
|
-
mutation crawlGoogleMarkets {
|
|
10056
|
-
crawlGoogleMarkets {
|
|
10057
|
-
message
|
|
10058
|
-
}
|
|
10059
|
-
}
|
|
10060
|
-
`;
|
|
10061
|
-
var GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT = gql`
|
|
10062
|
-
fragment GoogleImportedMarketsFields on GoogleImportedMarketType {
|
|
10063
|
-
_id
|
|
10064
|
-
accessibilityOptions
|
|
10065
|
-
address
|
|
10066
|
-
addressComponents {
|
|
10067
|
-
longName
|
|
10068
|
-
shortName
|
|
10069
|
-
types
|
|
10070
|
-
}
|
|
10071
|
-
allowsDogs
|
|
10072
|
-
businessStatus
|
|
10073
|
-
claimed
|
|
10074
|
-
createdAt
|
|
10075
|
-
dateTime {
|
|
10076
|
-
...EventDateTimeFields
|
|
10077
|
-
}
|
|
10078
|
-
goodForChildren
|
|
10079
|
-
goodForGroups
|
|
10080
|
-
googleMapsUrl
|
|
10081
|
-
googlePlaceId
|
|
10082
|
-
image
|
|
10083
|
-
importedAt
|
|
10084
|
-
liveMusic
|
|
10085
|
-
location {
|
|
10086
|
-
lat
|
|
10087
|
-
lng
|
|
10088
|
-
}
|
|
10089
|
-
name
|
|
10090
|
-
openingHours
|
|
10091
|
-
parkingOptions
|
|
10092
|
-
paymentOptions
|
|
10093
|
-
phone
|
|
10094
|
-
photos
|
|
10095
|
-
rating
|
|
10096
|
-
region
|
|
10097
|
-
restroom
|
|
10098
|
-
reviewCount
|
|
10099
|
-
slug
|
|
10100
|
-
updatedAt
|
|
10101
|
-
website
|
|
10102
|
-
}
|
|
10103
|
-
${EVENT_DATETIME_FIELDS_FRAGMENT}
|
|
10104
|
-
`;
|
|
10105
|
-
var GET_GOOGLE_IMPORTED_MARKETS = gql`
|
|
10106
|
-
query getGoogleImportedMarkets {
|
|
10107
|
-
googleImportedMarkets {
|
|
10108
|
-
...GoogleImportedMarketsFields
|
|
10109
|
-
}
|
|
10110
|
-
}
|
|
10111
|
-
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
10112
|
-
`;
|
|
10113
|
-
var GET_GOOGLE_IMPORTED_MARKETS_BY_REGION = gql`
|
|
10114
|
-
query getGoogleImportedMarketsByRegion($region: String!) {
|
|
10115
|
-
googleImportedMarketsByRegion(region: $region) {
|
|
10116
|
-
...GoogleImportedMarketsFields
|
|
10117
|
-
}
|
|
10118
|
-
}
|
|
10119
|
-
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
10120
|
-
`;
|
|
10121
|
-
var SEARCH_GOOGLE_IMPORTED_MARKETS = gql`
|
|
10122
|
-
query searchGoogleImportedMarkets($search: String!, $region: String) {
|
|
10123
|
-
googleImportedMarketsSearch(search: $search, region: $region) {
|
|
10124
|
-
...GoogleImportedMarketsFields
|
|
10125
|
-
}
|
|
10126
|
-
}
|
|
10127
|
-
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
10128
|
-
`;
|
|
10129
|
-
var GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME = gql`
|
|
10130
|
-
query getGoogleImportedMarketsNearMe(
|
|
10131
|
-
$latitude: Float!
|
|
10132
|
-
$longitude: Float!
|
|
10133
|
-
$radius: Int
|
|
10134
|
-
) {
|
|
10135
|
-
googleImportedMarketsNearMe(
|
|
10136
|
-
lat: $latitude
|
|
10137
|
-
lng: $longitude
|
|
10138
|
-
radius: $radius
|
|
10139
|
-
) {
|
|
10140
|
-
...GoogleImportedMarketsFields
|
|
10141
|
-
}
|
|
10142
|
-
}
|
|
10143
|
-
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
10144
|
-
`;
|
|
10145
10066
|
var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
10146
10067
|
var nzbnRegex = /^94\d{11}$/;
|
|
10147
10068
|
var normalizedUrlTransform = () => create$6().trim().transform(
|
|
@@ -11147,6 +11068,29 @@ var dateTimeSchema3 = new MongooseSchema3(
|
|
|
11147
11068
|
{ _id: false }
|
|
11148
11069
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11149
11070
|
);
|
|
11071
|
+
var locationsSchema = new MongooseSchema3(
|
|
11072
|
+
{
|
|
11073
|
+
city: { required: true, type: String },
|
|
11074
|
+
coordinates: {
|
|
11075
|
+
required: true,
|
|
11076
|
+
type: [Number]
|
|
11077
|
+
// [longitude, latitude]
|
|
11078
|
+
},
|
|
11079
|
+
country: { required: true, type: String },
|
|
11080
|
+
fullAddress: { required: true, type: String },
|
|
11081
|
+
latitude: { required: true, type: Number },
|
|
11082
|
+
longitude: { required: true, type: Number },
|
|
11083
|
+
region: { required: true, type: String },
|
|
11084
|
+
type: {
|
|
11085
|
+
default: "Point",
|
|
11086
|
+
enum: ["Point"],
|
|
11087
|
+
required: true,
|
|
11088
|
+
type: String
|
|
11089
|
+
}
|
|
11090
|
+
},
|
|
11091
|
+
{ _id: false }
|
|
11092
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11093
|
+
);
|
|
11150
11094
|
var baseResourceFields = {
|
|
11151
11095
|
active: { default: false, required: true, type: Boolean },
|
|
11152
11096
|
adIds: {
|
|
@@ -11296,14 +11240,6 @@ var ChatModel = import_mongoose5.default.models.Chat || import_mongoose5.default
|
|
|
11296
11240
|
// src/mongoose/GoogleImportedMarket.ts
|
|
11297
11241
|
var import_mongoose6 = __toESM(require("mongoose"));
|
|
11298
11242
|
var MongooseSchema6 = import_mongoose6.default.Schema;
|
|
11299
|
-
var locationSchema2 = new MongooseSchema6(
|
|
11300
|
-
{
|
|
11301
|
-
lat: { required: true, type: Number },
|
|
11302
|
-
lng: { required: true, type: Number }
|
|
11303
|
-
},
|
|
11304
|
-
{ _id: false }
|
|
11305
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11306
|
-
);
|
|
11307
11243
|
var addressComponentSchema = new MongooseSchema6(
|
|
11308
11244
|
{
|
|
11309
11245
|
longName: { required: false, type: String },
|
|
@@ -11315,12 +11251,18 @@ var addressComponentSchema = new MongooseSchema6(
|
|
|
11315
11251
|
var schema3 = new MongooseSchema6(
|
|
11316
11252
|
{
|
|
11317
11253
|
accessibilityOptions: { required: false, type: Object },
|
|
11254
|
+
active: { default: false, required: true, type: Boolean },
|
|
11318
11255
|
address: { required: true, type: String },
|
|
11319
11256
|
addressComponents: { required: false, type: [addressComponentSchema] },
|
|
11320
11257
|
allowsDogs: { required: false, type: Boolean },
|
|
11321
11258
|
businessStatus: { required: false, type: String },
|
|
11322
11259
|
claimed: { default: false, required: true, type: Boolean },
|
|
11260
|
+
cover: {
|
|
11261
|
+
required: false,
|
|
11262
|
+
type: ResourceImageTypeSchema
|
|
11263
|
+
},
|
|
11323
11264
|
dateTime: [dateTimeSchema3],
|
|
11265
|
+
deletedAt: { default: null, required: false, type: Date },
|
|
11324
11266
|
goodForChildren: { required: false, type: Boolean },
|
|
11325
11267
|
goodForGroups: { required: false, type: Boolean },
|
|
11326
11268
|
googleMapsUrl: { required: false, type: String },
|
|
@@ -11330,22 +11272,20 @@ var schema3 = new MongooseSchema6(
|
|
|
11330
11272
|
unique: true
|
|
11331
11273
|
// unique, indexed
|
|
11332
11274
|
},
|
|
11333
|
-
|
|
11334
|
-
// photo_reference
|
|
11275
|
+
images: { required: false, type: [ResourceImageTypeSchema] },
|
|
11276
|
+
// array of photo_reference
|
|
11335
11277
|
importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
|
|
11336
11278
|
liveMusic: { required: false, type: Boolean },
|
|
11337
11279
|
location: {
|
|
11338
11280
|
required: false,
|
|
11339
11281
|
// optional because lat/lng may expire after 30 days
|
|
11340
|
-
type:
|
|
11282
|
+
type: locationsSchema
|
|
11341
11283
|
},
|
|
11342
11284
|
name: { required: true, type: String },
|
|
11343
11285
|
openingHours: { required: false, type: [String] },
|
|
11344
11286
|
parkingOptions: { required: false, type: Object },
|
|
11345
11287
|
paymentOptions: { required: false, type: Object },
|
|
11346
11288
|
phone: { required: false, type: String },
|
|
11347
|
-
photos: { required: false, type: [String] },
|
|
11348
|
-
// array of photo_reference
|
|
11349
11289
|
rating: { required: false, type: Number },
|
|
11350
11290
|
region: { required: false, type: String },
|
|
11351
11291
|
restroom: { required: false, type: Boolean },
|
|
@@ -11939,29 +11879,6 @@ var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mong
|
|
|
11939
11879
|
// src/mongoose/event/Event.ts
|
|
11940
11880
|
var import_mongoose15 = __toESM(require("mongoose"));
|
|
11941
11881
|
var MongooseSchema15 = import_mongoose15.default.Schema;
|
|
11942
|
-
var locationsSchema = new MongooseSchema15(
|
|
11943
|
-
{
|
|
11944
|
-
city: { required: true, type: String },
|
|
11945
|
-
coordinates: {
|
|
11946
|
-
required: true,
|
|
11947
|
-
type: [Number]
|
|
11948
|
-
// [longitude, latitude]
|
|
11949
|
-
},
|
|
11950
|
-
country: { required: true, type: String },
|
|
11951
|
-
fullAddress: { required: true, type: String },
|
|
11952
|
-
latitude: { required: true, type: Number },
|
|
11953
|
-
longitude: { required: true, type: Number },
|
|
11954
|
-
region: { required: true, type: String },
|
|
11955
|
-
type: {
|
|
11956
|
-
default: "Point",
|
|
11957
|
-
enum: ["Point"],
|
|
11958
|
-
required: true,
|
|
11959
|
-
type: String
|
|
11960
|
-
}
|
|
11961
|
-
},
|
|
11962
|
-
{ _id: false }
|
|
11963
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11964
|
-
);
|
|
11965
11882
|
var schema11 = new MongooseSchema15(
|
|
11966
11883
|
{
|
|
11967
11884
|
...baseResourceFields,
|