@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
|
@@ -8428,17 +8428,25 @@ var CONTACT_DETAILS_FIELDS_FRAGMENT = gql`
|
|
|
8428
8428
|
mobilePhone
|
|
8429
8429
|
}
|
|
8430
8430
|
`;
|
|
8431
|
+
var LOCATION_GEO_FIELDS_FRAGMENT = gql`
|
|
8432
|
+
fragment LocationGeoFields on LocationGeoType {
|
|
8433
|
+
coordinates
|
|
8434
|
+
type
|
|
8435
|
+
}
|
|
8436
|
+
`;
|
|
8431
8437
|
var LOCATION_FIELDS_FRAGMENT = gql`
|
|
8432
8438
|
fragment LocationFields on LocationType {
|
|
8433
8439
|
city
|
|
8434
|
-
coordinates
|
|
8435
8440
|
country
|
|
8436
8441
|
fullAddress
|
|
8442
|
+
geo {
|
|
8443
|
+
...LocationGeoFields
|
|
8444
|
+
}
|
|
8437
8445
|
latitude
|
|
8438
8446
|
longitude
|
|
8439
8447
|
region
|
|
8440
|
-
type
|
|
8441
8448
|
}
|
|
8449
|
+
${LOCATION_GEO_FIELDS_FRAGMENT}
|
|
8442
8450
|
`;
|
|
8443
8451
|
var EVENT_LIST_ITEM = gql`
|
|
8444
8452
|
fragment EventListItemFields on EventListItemType {
|
|
@@ -8741,14 +8749,16 @@ var GET_TESTER = gql`
|
|
|
8741
8749
|
var VENDOR_LOCATION_FIELDS_FRAGMENT = gql`
|
|
8742
8750
|
fragment VendorLocationFields on VendorLocationType {
|
|
8743
8751
|
city
|
|
8744
|
-
coordinates
|
|
8745
8752
|
country
|
|
8746
8753
|
fullAddress
|
|
8754
|
+
geo {
|
|
8755
|
+
...LocationGeoFields
|
|
8756
|
+
}
|
|
8747
8757
|
latitude
|
|
8748
8758
|
longitude
|
|
8749
8759
|
region
|
|
8750
|
-
type
|
|
8751
8760
|
}
|
|
8761
|
+
${LOCATION_GEO_FIELDS_FRAGMENT}
|
|
8752
8762
|
`;
|
|
8753
8763
|
var VENDOR_DATETIME_FIELDS_FRAGMENT = gql`
|
|
8754
8764
|
fragment VendorDateTimeFields on VendorDateTimeType {
|
|
@@ -9097,6 +9107,7 @@ var CHAT_FIELDS_FRAGMENT = gql`
|
|
|
9097
9107
|
participants {
|
|
9098
9108
|
...ChatParticipantFields
|
|
9099
9109
|
}
|
|
9110
|
+
region
|
|
9100
9111
|
updatedAt
|
|
9101
9112
|
}
|
|
9102
9113
|
${CHAT_MESSAGE_FIELDS_FRAGMENT}
|
|
@@ -9118,6 +9129,14 @@ var USER_CHATS = gql`
|
|
|
9118
9129
|
}
|
|
9119
9130
|
${CHAT_FIELDS_FRAGMENT}
|
|
9120
9131
|
`;
|
|
9132
|
+
var GET_CHATS_BY_REGION = gql`
|
|
9133
|
+
query getChatsByRegion($region: String!) {
|
|
9134
|
+
chatsByRegion(region: $region) {
|
|
9135
|
+
...ChatFields
|
|
9136
|
+
}
|
|
9137
|
+
}
|
|
9138
|
+
${CHAT_FIELDS_FRAGMENT}
|
|
9139
|
+
`;
|
|
9121
9140
|
var SEND_CHAT_MESSAGE_MUTATION = gql`
|
|
9122
9141
|
mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
|
|
9123
9142
|
sendChatMessage(_id: $_id, input: $input) {
|
|
@@ -9141,7 +9160,10 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = gql`
|
|
|
9141
9160
|
`;
|
|
9142
9161
|
var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql`
|
|
9143
9162
|
mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
|
|
9144
|
-
removeParticipantFromChat(chatId: $chatId, userId: $userId)
|
|
9163
|
+
removeParticipantFromChat(chatId: $chatId, userId: $userId) {
|
|
9164
|
+
success
|
|
9165
|
+
region
|
|
9166
|
+
}
|
|
9145
9167
|
}
|
|
9146
9168
|
`;
|
|
9147
9169
|
var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql`
|
|
@@ -9823,8 +9845,7 @@ var RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`
|
|
|
9823
9845
|
activity {
|
|
9824
9846
|
activityType
|
|
9825
9847
|
location {
|
|
9826
|
-
|
|
9827
|
-
coordinates
|
|
9848
|
+
...LocationGeoFields
|
|
9828
9849
|
}
|
|
9829
9850
|
dateStatus
|
|
9830
9851
|
startDate
|
|
@@ -9834,6 +9855,7 @@ var RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`
|
|
|
9834
9855
|
userId
|
|
9835
9856
|
}
|
|
9836
9857
|
}
|
|
9858
|
+
${LOCATION_GEO_FIELDS_FRAGMENT}
|
|
9837
9859
|
`;
|
|
9838
9860
|
var GET_RESOURCE_ACTIVITY = gql`
|
|
9839
9861
|
query getResourceActivity(
|
|
@@ -10235,16 +10257,18 @@ var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
|
10235
10257
|
});
|
|
10236
10258
|
var locationSchema = create$3().shape({
|
|
10237
10259
|
city: create$6().label("City").required("City is required"),
|
|
10238
|
-
coordinates: create$2().of(create$5().required("Coordinates must be numbers")).length(
|
|
10239
|
-
2,
|
|
10240
|
-
"Coordinates must contain exactly two numbers (longitude, latitude)"
|
|
10241
|
-
).required("Coordinates are required"),
|
|
10242
10260
|
country: create$6().label("Country").required("Country is required"),
|
|
10243
10261
|
fullAddress: create$6().label("Address").required("Address is required"),
|
|
10262
|
+
geo: create$3().shape({
|
|
10263
|
+
coordinates: create$2().of(create$5().required("Coordinates must be numbers")).length(
|
|
10264
|
+
2,
|
|
10265
|
+
"Coordinates must contain exactly two numbers (longitude, latitude)"
|
|
10266
|
+
).required("Coordinates are required"),
|
|
10267
|
+
type: create$6().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
|
|
10268
|
+
}),
|
|
10244
10269
|
latitude: create$5().label("Latitude").required("Latitude is required"),
|
|
10245
10270
|
longitude: create$5().label("Longitude").required("Longitude is required"),
|
|
10246
|
-
region: create$6().label("Region").required("Region is required")
|
|
10247
|
-
type: create$6().oneOf(["Point"], "Type must be 'Point'").default("Point").required("Type is required")
|
|
10271
|
+
region: create$6().label("Region").required("Region is required")
|
|
10248
10272
|
});
|
|
10249
10273
|
var passwordSchema = create$6().trim().label("Password").min(8, "Password must be at least 8 characters long").required("Password is required");
|
|
10250
10274
|
var socialMediaSchema = create$3({
|
|
@@ -10723,15 +10747,16 @@ var appSettingsSchema = create$3({
|
|
|
10723
10747
|
});
|
|
10724
10748
|
var defaultLocation = {
|
|
10725
10749
|
city: "",
|
|
10726
|
-
coordinates: [0, 0],
|
|
10727
|
-
// [longitude, latitude]
|
|
10728
10750
|
country: "",
|
|
10729
10751
|
fullAddress: "",
|
|
10752
|
+
geo: {
|
|
10753
|
+
coordinates: [0, 0],
|
|
10754
|
+
// [longitude, latitude]
|
|
10755
|
+
type: "Point"
|
|
10756
|
+
},
|
|
10730
10757
|
latitude: 0,
|
|
10731
10758
|
longitude: 0,
|
|
10732
|
-
region: ""
|
|
10733
|
-
type: "Point"
|
|
10734
|
-
// Default type for GeoJSON
|
|
10759
|
+
region: ""
|
|
10735
10760
|
};
|
|
10736
10761
|
var globalDefaultValues = {
|
|
10737
10762
|
active: false,
|
|
@@ -11121,25 +11146,27 @@ var dateTimeSchema3 = new MongooseSchema3(
|
|
|
11121
11146
|
{ _id: false }
|
|
11122
11147
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11123
11148
|
);
|
|
11149
|
+
var locationGeoSchema = new MongooseSchema3(
|
|
11150
|
+
{
|
|
11151
|
+
coordinates: { required: true, type: [Number] },
|
|
11152
|
+
// [longitude, latitude]
|
|
11153
|
+
type: { default: "Point", enum: ["Point"], required: true, type: String }
|
|
11154
|
+
},
|
|
11155
|
+
{ _id: false }
|
|
11156
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11157
|
+
);
|
|
11124
11158
|
var locationsSchema = new MongooseSchema3(
|
|
11125
11159
|
{
|
|
11126
11160
|
city: { required: true, type: String },
|
|
11127
|
-
coordinates: {
|
|
11128
|
-
required: true,
|
|
11129
|
-
type: [Number]
|
|
11130
|
-
// [longitude, latitude]
|
|
11131
|
-
},
|
|
11132
11161
|
country: { required: true, type: String },
|
|
11133
11162
|
fullAddress: { required: true, type: String },
|
|
11163
|
+
geo: {
|
|
11164
|
+
required: true,
|
|
11165
|
+
type: locationGeoSchema
|
|
11166
|
+
},
|
|
11134
11167
|
latitude: { required: true, type: Number },
|
|
11135
11168
|
longitude: { required: true, type: Number },
|
|
11136
|
-
region: { required: true, type: String }
|
|
11137
|
-
type: {
|
|
11138
|
-
default: "Point",
|
|
11139
|
-
enum: ["Point"],
|
|
11140
|
-
required: true,
|
|
11141
|
-
type: String
|
|
11142
|
-
}
|
|
11169
|
+
region: { required: true, type: String }
|
|
11143
11170
|
},
|
|
11144
11171
|
{ _id: false }
|
|
11145
11172
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
@@ -11324,7 +11351,8 @@ var ChatSchema = new MongooseSchema5(
|
|
|
11324
11351
|
},
|
|
11325
11352
|
deletedAt: { default: null, required: false, type: Date },
|
|
11326
11353
|
messages: [MessageSchema],
|
|
11327
|
-
participants: [ParticipantSchema]
|
|
11354
|
+
participants: [ParticipantSchema],
|
|
11355
|
+
region: { default: null, required: false, type: String }
|
|
11328
11356
|
},
|
|
11329
11357
|
{
|
|
11330
11358
|
timestamps: true
|
|
@@ -11419,7 +11447,7 @@ var schema3 = new MongooseSchema6(
|
|
|
11419
11447
|
},
|
|
11420
11448
|
{ timestamps: true }
|
|
11421
11449
|
);
|
|
11422
|
-
schema3.index({ location: "2dsphere" });
|
|
11450
|
+
schema3.index({ "location.geo": "2dsphere" });
|
|
11423
11451
|
schema3.index({ name: 1 });
|
|
11424
11452
|
schema3.index({ region: 1 });
|
|
11425
11453
|
var GoogleImportedMarketModel = mongoose6.models.GoogleImportedMarket || mongoose6.model("GoogleImportedMarket", schema3);
|
|
@@ -11500,16 +11528,8 @@ var ActivitySchema = new MongooseSchema9(
|
|
|
11500
11528
|
type: String
|
|
11501
11529
|
},
|
|
11502
11530
|
location: {
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
type: [Number]
|
|
11506
|
-
},
|
|
11507
|
-
type: {
|
|
11508
|
-
default: "Point",
|
|
11509
|
-
enum: ["Point"],
|
|
11510
|
-
required: false,
|
|
11511
|
-
type: String
|
|
11512
|
-
}
|
|
11531
|
+
required: false,
|
|
11532
|
+
type: locationGeoSchema
|
|
11513
11533
|
},
|
|
11514
11534
|
startDate: { required: false, type: String },
|
|
11515
11535
|
startTime: { required: false, type: String },
|
|
@@ -11891,19 +11911,8 @@ var LocationsSchema = new MongooseSchema13(
|
|
|
11891
11911
|
},
|
|
11892
11912
|
description: { required: false, type: String },
|
|
11893
11913
|
location: {
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
required: false,
|
|
11897
|
-
type: [Number]
|
|
11898
|
-
// [longitude, latitude]
|
|
11899
|
-
},
|
|
11900
|
-
country: { required: false, type: String },
|
|
11901
|
-
fullAddress: { required: false, type: String },
|
|
11902
|
-
latitude: { required: false, type: Number },
|
|
11903
|
-
longitude: { required: false, type: Number },
|
|
11904
|
-
region: { required: false, type: String },
|
|
11905
|
-
type: { required: false, type: String }
|
|
11906
|
-
// Mongoose GeoJSON type
|
|
11914
|
+
required: false,
|
|
11915
|
+
type: locationsSchema
|
|
11907
11916
|
}
|
|
11908
11917
|
},
|
|
11909
11918
|
{ _id: false }
|
|
@@ -12042,7 +12051,7 @@ var schema11 = new MongooseSchema15(
|
|
|
12042
12051
|
schema11.index({ name: 1 });
|
|
12043
12052
|
schema11.index({ description: 1 });
|
|
12044
12053
|
schema11.index({ region: 1 });
|
|
12045
|
-
schema11.index({ location: "2dsphere" });
|
|
12054
|
+
schema11.index({ "location.geo": "2dsphere" });
|
|
12046
12055
|
schema11.index({ tags: 1 });
|
|
12047
12056
|
schema11.index({ "associates.email": 1 });
|
|
12048
12057
|
var EventModel = mongoose15.models.Event || mongoose15.model("Event", schema11);
|
|
@@ -12144,6 +12153,7 @@ export {
|
|
|
12144
12153
|
termsAgreementSchema,
|
|
12145
12154
|
resourceRelationsSchema,
|
|
12146
12155
|
dateTimeSchema3 as dateTimeSchema,
|
|
12156
|
+
locationGeoSchema,
|
|
12147
12157
|
locationsSchema,
|
|
12148
12158
|
baseResourceFields,
|
|
12149
12159
|
AdModel,
|
|
@@ -12188,4 +12198,4 @@ react/cjs/react.development.js:
|
|
|
12188
12198
|
* LICENSE file in the root directory of this source tree.
|
|
12189
12199
|
*)
|
|
12190
12200
|
*/
|
|
12191
|
-
//# sourceMappingURL=chunk-
|
|
12201
|
+
//# sourceMappingURL=chunk-OKVJLUMS.mjs.map
|