@timardex/cluemart-server-shared 1.0.78 → 1.0.80
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-TPZF5OZA.mjs → chunk-OKVJLUMS.mjs} +67 -57
- package/dist/chunk-OKVJLUMS.mjs.map +1 -0
- package/dist/index.cjs +67 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.mjs +66 -56
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +67 -56
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +11 -2
- package/dist/mongoose/index.d.ts +11 -2
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +65 -56
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-TPZF5OZA.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -1700,6 +1700,7 @@ __export(mongoose_exports, {
|
|
|
1700
1700
|
associatesSchema: () => associatesSchema,
|
|
1701
1701
|
baseResourceFields: () => baseResourceFields,
|
|
1702
1702
|
dateTimeSchema: () => dateTimeSchema3,
|
|
1703
|
+
locationGeoSchema: () => locationGeoSchema,
|
|
1703
1704
|
locationsSchema: () => locationsSchema,
|
|
1704
1705
|
relationDatesSchema: () => relationDatesSchema,
|
|
1705
1706
|
resourceRelationsSchema: () => resourceRelationsSchema,
|
|
@@ -8493,17 +8494,25 @@ var CONTACT_DETAILS_FIELDS_FRAGMENT = gql`
|
|
|
8493
8494
|
mobilePhone
|
|
8494
8495
|
}
|
|
8495
8496
|
`;
|
|
8497
|
+
var LOCATION_GEO_FIELDS_FRAGMENT = gql`
|
|
8498
|
+
fragment LocationGeoFields on LocationGeoType {
|
|
8499
|
+
coordinates
|
|
8500
|
+
type
|
|
8501
|
+
}
|
|
8502
|
+
`;
|
|
8496
8503
|
var LOCATION_FIELDS_FRAGMENT = gql`
|
|
8497
8504
|
fragment LocationFields on LocationType {
|
|
8498
8505
|
city
|
|
8499
|
-
coordinates
|
|
8500
8506
|
country
|
|
8501
8507
|
fullAddress
|
|
8508
|
+
geo {
|
|
8509
|
+
...LocationGeoFields
|
|
8510
|
+
}
|
|
8502
8511
|
latitude
|
|
8503
8512
|
longitude
|
|
8504
8513
|
region
|
|
8505
|
-
type
|
|
8506
8514
|
}
|
|
8515
|
+
${LOCATION_GEO_FIELDS_FRAGMENT}
|
|
8507
8516
|
`;
|
|
8508
8517
|
var EVENT_LIST_ITEM = gql`
|
|
8509
8518
|
fragment EventListItemFields on EventListItemType {
|
|
@@ -8806,14 +8815,16 @@ var GET_TESTER = gql`
|
|
|
8806
8815
|
var VENDOR_LOCATION_FIELDS_FRAGMENT = gql`
|
|
8807
8816
|
fragment VendorLocationFields on VendorLocationType {
|
|
8808
8817
|
city
|
|
8809
|
-
coordinates
|
|
8810
8818
|
country
|
|
8811
8819
|
fullAddress
|
|
8820
|
+
geo {
|
|
8821
|
+
...LocationGeoFields
|
|
8822
|
+
}
|
|
8812
8823
|
latitude
|
|
8813
8824
|
longitude
|
|
8814
8825
|
region
|
|
8815
|
-
type
|
|
8816
8826
|
}
|
|
8827
|
+
${LOCATION_GEO_FIELDS_FRAGMENT}
|
|
8817
8828
|
`;
|
|
8818
8829
|
var VENDOR_DATETIME_FIELDS_FRAGMENT = gql`
|
|
8819
8830
|
fragment VendorDateTimeFields on VendorDateTimeType {
|
|
@@ -9162,6 +9173,7 @@ var CHAT_FIELDS_FRAGMENT = gql`
|
|
|
9162
9173
|
participants {
|
|
9163
9174
|
...ChatParticipantFields
|
|
9164
9175
|
}
|
|
9176
|
+
region
|
|
9165
9177
|
updatedAt
|
|
9166
9178
|
}
|
|
9167
9179
|
${CHAT_MESSAGE_FIELDS_FRAGMENT}
|
|
@@ -9183,6 +9195,14 @@ var USER_CHATS = gql`
|
|
|
9183
9195
|
}
|
|
9184
9196
|
${CHAT_FIELDS_FRAGMENT}
|
|
9185
9197
|
`;
|
|
9198
|
+
var GET_CHATS_BY_REGION = gql`
|
|
9199
|
+
query getChatsByRegion($region: String!) {
|
|
9200
|
+
chatsByRegion(region: $region) {
|
|
9201
|
+
...ChatFields
|
|
9202
|
+
}
|
|
9203
|
+
}
|
|
9204
|
+
${CHAT_FIELDS_FRAGMENT}
|
|
9205
|
+
`;
|
|
9186
9206
|
var SEND_CHAT_MESSAGE_MUTATION = gql`
|
|
9187
9207
|
mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
|
|
9188
9208
|
sendChatMessage(_id: $_id, input: $input) {
|
|
@@ -9206,7 +9226,10 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = gql`
|
|
|
9206
9226
|
`;
|
|
9207
9227
|
var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql`
|
|
9208
9228
|
mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
|
|
9209
|
-
removeParticipantFromChat(chatId: $chatId, userId: $userId)
|
|
9229
|
+
removeParticipantFromChat(chatId: $chatId, userId: $userId) {
|
|
9230
|
+
success
|
|
9231
|
+
region
|
|
9232
|
+
}
|
|
9210
9233
|
}
|
|
9211
9234
|
`;
|
|
9212
9235
|
var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql`
|
|
@@ -9888,8 +9911,7 @@ var RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`
|
|
|
9888
9911
|
activity {
|
|
9889
9912
|
activityType
|
|
9890
9913
|
location {
|
|
9891
|
-
|
|
9892
|
-
coordinates
|
|
9914
|
+
...LocationGeoFields
|
|
9893
9915
|
}
|
|
9894
9916
|
dateStatus
|
|
9895
9917
|
startDate
|
|
@@ -9899,6 +9921,7 @@ var RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`
|
|
|
9899
9921
|
userId
|
|
9900
9922
|
}
|
|
9901
9923
|
}
|
|
9924
|
+
${LOCATION_GEO_FIELDS_FRAGMENT}
|
|
9902
9925
|
`;
|
|
9903
9926
|
var GET_RESOURCE_ACTIVITY = gql`
|
|
9904
9927
|
query getResourceActivity(
|
|
@@ -10300,16 +10323,18 @@ var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
|
10300
10323
|
});
|
|
10301
10324
|
var locationSchema = create$3().shape({
|
|
10302
10325
|
city: create$6().label("City").required("City is required"),
|
|
10303
|
-
coordinates: create$2().of(create$5().required("Coordinates must be numbers")).length(
|
|
10304
|
-
2,
|
|
10305
|
-
"Coordinates must contain exactly two numbers (longitude, latitude)"
|
|
10306
|
-
).required("Coordinates are required"),
|
|
10307
10326
|
country: create$6().label("Country").required("Country is required"),
|
|
10308
10327
|
fullAddress: create$6().label("Address").required("Address is required"),
|
|
10328
|
+
geo: create$3().shape({
|
|
10329
|
+
coordinates: create$2().of(create$5().required("Coordinates must be numbers")).length(
|
|
10330
|
+
2,
|
|
10331
|
+
"Coordinates must contain exactly two numbers (longitude, latitude)"
|
|
10332
|
+
).required("Coordinates are required"),
|
|
10333
|
+
type: create$6().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
|
|
10334
|
+
}),
|
|
10309
10335
|
latitude: create$5().label("Latitude").required("Latitude is required"),
|
|
10310
10336
|
longitude: create$5().label("Longitude").required("Longitude is required"),
|
|
10311
|
-
region: create$6().label("Region").required("Region is required")
|
|
10312
|
-
type: create$6().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
|
|
10337
|
+
region: create$6().label("Region").required("Region is required")
|
|
10313
10338
|
});
|
|
10314
10339
|
var passwordSchema = create$6().trim().label("Password").min(8, "Password must be at least 8 characters long").required("Password is required");
|
|
10315
10340
|
var socialMediaSchema = create$3({
|
|
@@ -10788,15 +10813,16 @@ var appSettingsSchema = create$3({
|
|
|
10788
10813
|
});
|
|
10789
10814
|
var defaultLocation = {
|
|
10790
10815
|
city: "",
|
|
10791
|
-
coordinates: [0, 0],
|
|
10792
|
-
// [longitude, latitude]
|
|
10793
10816
|
country: "",
|
|
10794
10817
|
fullAddress: "",
|
|
10818
|
+
geo: {
|
|
10819
|
+
coordinates: [0, 0],
|
|
10820
|
+
// [longitude, latitude]
|
|
10821
|
+
type: "Point"
|
|
10822
|
+
},
|
|
10795
10823
|
latitude: 0,
|
|
10796
10824
|
longitude: 0,
|
|
10797
|
-
region: ""
|
|
10798
|
-
type: "Point"
|
|
10799
|
-
// Default type for GeoJSON
|
|
10825
|
+
region: ""
|
|
10800
10826
|
};
|
|
10801
10827
|
var globalDefaultValues = {
|
|
10802
10828
|
active: false,
|
|
@@ -11186,25 +11212,27 @@ var dateTimeSchema3 = new MongooseSchema3(
|
|
|
11186
11212
|
{ _id: false }
|
|
11187
11213
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11188
11214
|
);
|
|
11215
|
+
var locationGeoSchema = new MongooseSchema3(
|
|
11216
|
+
{
|
|
11217
|
+
coordinates: { required: true, type: [Number] },
|
|
11218
|
+
// [longitude, latitude]
|
|
11219
|
+
type: { default: "Point", enum: ["Point"], required: true, type: String }
|
|
11220
|
+
},
|
|
11221
|
+
{ _id: false }
|
|
11222
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11223
|
+
);
|
|
11189
11224
|
var locationsSchema = new MongooseSchema3(
|
|
11190
11225
|
{
|
|
11191
11226
|
city: { required: true, type: String },
|
|
11192
|
-
coordinates: {
|
|
11193
|
-
required: true,
|
|
11194
|
-
type: [Number]
|
|
11195
|
-
// [longitude, latitude]
|
|
11196
|
-
},
|
|
11197
11227
|
country: { required: true, type: String },
|
|
11198
11228
|
fullAddress: { required: true, type: String },
|
|
11229
|
+
geo: {
|
|
11230
|
+
required: true,
|
|
11231
|
+
type: locationGeoSchema
|
|
11232
|
+
},
|
|
11199
11233
|
latitude: { required: true, type: Number },
|
|
11200
11234
|
longitude: { required: true, type: Number },
|
|
11201
|
-
region: { required: true, type: String }
|
|
11202
|
-
type: {
|
|
11203
|
-
default: "Point",
|
|
11204
|
-
enum: ["Point"],
|
|
11205
|
-
required: true,
|
|
11206
|
-
type: String
|
|
11207
|
-
}
|
|
11235
|
+
region: { required: true, type: String }
|
|
11208
11236
|
},
|
|
11209
11237
|
{ _id: false }
|
|
11210
11238
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
@@ -11389,7 +11417,8 @@ var ChatSchema = new MongooseSchema5(
|
|
|
11389
11417
|
},
|
|
11390
11418
|
deletedAt: { default: null, required: false, type: Date },
|
|
11391
11419
|
messages: [MessageSchema],
|
|
11392
|
-
participants: [ParticipantSchema]
|
|
11420
|
+
participants: [ParticipantSchema],
|
|
11421
|
+
region: { default: null, required: false, type: String }
|
|
11393
11422
|
},
|
|
11394
11423
|
{
|
|
11395
11424
|
timestamps: true
|
|
@@ -11484,7 +11513,7 @@ var schema3 = new MongooseSchema6(
|
|
|
11484
11513
|
},
|
|
11485
11514
|
{ timestamps: true }
|
|
11486
11515
|
);
|
|
11487
|
-
schema3.index({ location: "2dsphere" });
|
|
11516
|
+
schema3.index({ "location.geo": "2dsphere" });
|
|
11488
11517
|
schema3.index({ name: 1 });
|
|
11489
11518
|
schema3.index({ region: 1 });
|
|
11490
11519
|
var GoogleImportedMarketModel = import_mongoose6.default.models.GoogleImportedMarket || import_mongoose6.default.model("GoogleImportedMarket", schema3);
|
|
@@ -11565,16 +11594,8 @@ var ActivitySchema = new MongooseSchema9(
|
|
|
11565
11594
|
type: String
|
|
11566
11595
|
},
|
|
11567
11596
|
location: {
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
type: [Number]
|
|
11571
|
-
},
|
|
11572
|
-
type: {
|
|
11573
|
-
default: "Point",
|
|
11574
|
-
enum: ["Point"],
|
|
11575
|
-
required: false,
|
|
11576
|
-
type: String
|
|
11577
|
-
}
|
|
11597
|
+
required: false,
|
|
11598
|
+
type: locationGeoSchema
|
|
11578
11599
|
},
|
|
11579
11600
|
startDate: { required: false, type: String },
|
|
11580
11601
|
startTime: { required: false, type: String },
|
|
@@ -11956,19 +11977,8 @@ var LocationsSchema = new MongooseSchema13(
|
|
|
11956
11977
|
},
|
|
11957
11978
|
description: { required: false, type: String },
|
|
11958
11979
|
location: {
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
required: false,
|
|
11962
|
-
type: [Number]
|
|
11963
|
-
// [longitude, latitude]
|
|
11964
|
-
},
|
|
11965
|
-
country: { required: false, type: String },
|
|
11966
|
-
fullAddress: { required: false, type: String },
|
|
11967
|
-
latitude: { required: false, type: Number },
|
|
11968
|
-
longitude: { required: false, type: Number },
|
|
11969
|
-
region: { required: false, type: String },
|
|
11970
|
-
type: { required: false, type: String }
|
|
11971
|
-
// Mongoose GeoJSON type
|
|
11980
|
+
required: false,
|
|
11981
|
+
type: locationsSchema
|
|
11972
11982
|
}
|
|
11973
11983
|
},
|
|
11974
11984
|
{ _id: false }
|
|
@@ -12107,7 +12117,7 @@ var schema11 = new MongooseSchema15(
|
|
|
12107
12117
|
schema11.index({ name: 1 });
|
|
12108
12118
|
schema11.index({ description: 1 });
|
|
12109
12119
|
schema11.index({ region: 1 });
|
|
12110
|
-
schema11.index({ location: "2dsphere" });
|
|
12120
|
+
schema11.index({ "location.geo": "2dsphere" });
|
|
12111
12121
|
schema11.index({ tags: 1 });
|
|
12112
12122
|
schema11.index({ "associates.email": 1 });
|
|
12113
12123
|
var EventModel = import_mongoose15.default.models.Event || import_mongoose15.default.model("Event", schema11);
|
|
@@ -12222,6 +12232,7 @@ var AppSettingModel = import_mongoose18.default.models.AppSetting || import_mong
|
|
|
12222
12232
|
associatesSchema,
|
|
12223
12233
|
baseResourceFields,
|
|
12224
12234
|
dateTimeSchema,
|
|
12235
|
+
locationGeoSchema,
|
|
12225
12236
|
locationsSchema,
|
|
12226
12237
|
relationDatesSchema,
|
|
12227
12238
|
resourceRelationsSchema,
|