@timardex/cluemart-server-shared 1.0.161 → 1.0.163
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/Relation-BQhULTU-.d.mts +47 -0
- package/dist/Relation-Dvgd2CFi.d.ts +47 -0
- package/dist/{chunk-YJEFAISD.mjs → chunk-RGSAG3WZ.mjs} +4 -2
- package/dist/{chunk-YJEFAISD.mjs.map → chunk-RGSAG3WZ.mjs.map} +1 -1
- package/dist/index.cjs +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +2 -1
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +3 -44
- package/dist/mongoose/index.d.ts +3 -44
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +17 -1
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +9 -2
- package/dist/service/index.d.ts +9 -2
- package/dist/service/index.mjs +16 -1
- package/dist/service/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket,
|
|
2
|
+
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-Ctmtatmi.mjs';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-Ctmtatmi.mjs';
|
|
6
6
|
import { EnumOSPlatform } from '@timardex/cluemart-shared/enums';
|
|
7
|
+
export { a as RelationModel, R as RelationTypeSchema, S as SchemaRelationType, r as relationDatesSchema } from '../Relation-BQhULTU-.mjs';
|
|
7
8
|
import '@timardex/cluemart-shared/types';
|
|
8
9
|
import 'express';
|
|
9
10
|
|
|
@@ -350,48 +351,6 @@ declare const PushTokenModel: mongoose.Model<SchemaPushTokenType, {}, {}, {}, mo
|
|
|
350
351
|
__v: number;
|
|
351
352
|
}, any>;
|
|
352
353
|
|
|
353
|
-
declare const relationDatesSchema: mongoose.Schema<RelationDate, mongoose.Model<RelationDate, any, any, any, mongoose.Document<unknown, any, RelationDate, any, {}> & RelationDate & {
|
|
354
|
-
_id: mongoose.Types.ObjectId;
|
|
355
|
-
} & {
|
|
356
|
-
__v: number;
|
|
357
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, RelationDate, mongoose.Document<unknown, {}, mongoose.FlatRecord<RelationDate>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<RelationDate> & {
|
|
358
|
-
_id: mongoose.Types.ObjectId;
|
|
359
|
-
} & {
|
|
360
|
-
__v: number;
|
|
361
|
-
}>;
|
|
362
|
-
type SchemaRelationType = Omit<RelationType, "eventId" | "vendorId" | "chatId"> & {
|
|
363
|
-
eventId: ObjectId;
|
|
364
|
-
vendorId: ObjectId;
|
|
365
|
-
chatId: ObjectId;
|
|
366
|
-
};
|
|
367
|
-
/**
|
|
368
|
-
* This is the schema for the relation type.
|
|
369
|
-
* It is used to define the structure of the relation type in the database.
|
|
370
|
-
* The schema is used by Mongoose to create a model for the relation type.
|
|
371
|
-
*/
|
|
372
|
-
declare const RelationTypeSchema: mongoose.Schema<SchemaRelationType, mongoose.Model<SchemaRelationType, any, any, any, mongoose.Document<unknown, any, SchemaRelationType, any, {}> & Omit<RelationType, "chatId" | "eventId" | "vendorId"> & {
|
|
373
|
-
eventId: ObjectId;
|
|
374
|
-
vendorId: ObjectId;
|
|
375
|
-
chatId: ObjectId;
|
|
376
|
-
} & Required<{
|
|
377
|
-
_id: string;
|
|
378
|
-
}> & {
|
|
379
|
-
__v: number;
|
|
380
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaRelationType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaRelationType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaRelationType> & Required<{
|
|
381
|
-
_id: string;
|
|
382
|
-
}> & {
|
|
383
|
-
__v: number;
|
|
384
|
-
}>;
|
|
385
|
-
declare const RelationModel: mongoose.Model<SchemaRelationType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaRelationType, {}, {}> & Omit<RelationType, "chatId" | "eventId" | "vendorId"> & {
|
|
386
|
-
eventId: ObjectId;
|
|
387
|
-
vendorId: ObjectId;
|
|
388
|
-
chatId: ObjectId;
|
|
389
|
-
} & Required<{
|
|
390
|
-
_id: string;
|
|
391
|
-
}> & {
|
|
392
|
-
__v: number;
|
|
393
|
-
}, any>;
|
|
394
|
-
|
|
395
354
|
declare const ResourceActivityModel: mongoose.Model<ResourceActivityType, {}, {}, {}, mongoose.Document<unknown, {}, ResourceActivityType, {}, {}> & ResourceActivityType & Required<{
|
|
396
355
|
_id: string;
|
|
397
356
|
}> & {
|
|
@@ -591,4 +550,4 @@ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.D
|
|
|
591
550
|
__v: number;
|
|
592
551
|
}, any>;
|
|
593
552
|
|
|
594
|
-
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel,
|
|
553
|
+
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket,
|
|
2
|
+
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-Ctmtatmi.js';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-Ctmtatmi.js';
|
|
6
6
|
import { EnumOSPlatform } from '@timardex/cluemart-shared/enums';
|
|
7
|
+
export { a as RelationModel, R as RelationTypeSchema, S as SchemaRelationType, r as relationDatesSchema } from '../Relation-Dvgd2CFi.js';
|
|
7
8
|
import '@timardex/cluemart-shared/types';
|
|
8
9
|
import 'express';
|
|
9
10
|
|
|
@@ -350,48 +351,6 @@ declare const PushTokenModel: mongoose.Model<SchemaPushTokenType, {}, {}, {}, mo
|
|
|
350
351
|
__v: number;
|
|
351
352
|
}, any>;
|
|
352
353
|
|
|
353
|
-
declare const relationDatesSchema: mongoose.Schema<RelationDate, mongoose.Model<RelationDate, any, any, any, mongoose.Document<unknown, any, RelationDate, any, {}> & RelationDate & {
|
|
354
|
-
_id: mongoose.Types.ObjectId;
|
|
355
|
-
} & {
|
|
356
|
-
__v: number;
|
|
357
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, RelationDate, mongoose.Document<unknown, {}, mongoose.FlatRecord<RelationDate>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<RelationDate> & {
|
|
358
|
-
_id: mongoose.Types.ObjectId;
|
|
359
|
-
} & {
|
|
360
|
-
__v: number;
|
|
361
|
-
}>;
|
|
362
|
-
type SchemaRelationType = Omit<RelationType, "eventId" | "vendorId" | "chatId"> & {
|
|
363
|
-
eventId: ObjectId;
|
|
364
|
-
vendorId: ObjectId;
|
|
365
|
-
chatId: ObjectId;
|
|
366
|
-
};
|
|
367
|
-
/**
|
|
368
|
-
* This is the schema for the relation type.
|
|
369
|
-
* It is used to define the structure of the relation type in the database.
|
|
370
|
-
* The schema is used by Mongoose to create a model for the relation type.
|
|
371
|
-
*/
|
|
372
|
-
declare const RelationTypeSchema: mongoose.Schema<SchemaRelationType, mongoose.Model<SchemaRelationType, any, any, any, mongoose.Document<unknown, any, SchemaRelationType, any, {}> & Omit<RelationType, "chatId" | "eventId" | "vendorId"> & {
|
|
373
|
-
eventId: ObjectId;
|
|
374
|
-
vendorId: ObjectId;
|
|
375
|
-
chatId: ObjectId;
|
|
376
|
-
} & Required<{
|
|
377
|
-
_id: string;
|
|
378
|
-
}> & {
|
|
379
|
-
__v: number;
|
|
380
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaRelationType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaRelationType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaRelationType> & Required<{
|
|
381
|
-
_id: string;
|
|
382
|
-
}> & {
|
|
383
|
-
__v: number;
|
|
384
|
-
}>;
|
|
385
|
-
declare const RelationModel: mongoose.Model<SchemaRelationType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaRelationType, {}, {}> & Omit<RelationType, "chatId" | "eventId" | "vendorId"> & {
|
|
386
|
-
eventId: ObjectId;
|
|
387
|
-
vendorId: ObjectId;
|
|
388
|
-
chatId: ObjectId;
|
|
389
|
-
} & Required<{
|
|
390
|
-
_id: string;
|
|
391
|
-
}> & {
|
|
392
|
-
__v: number;
|
|
393
|
-
}, any>;
|
|
394
|
-
|
|
395
354
|
declare const ResourceActivityModel: mongoose.Model<ResourceActivityType, {}, {}, {}, mongoose.Document<unknown, {}, ResourceActivityType, {}, {}> & ResourceActivityType & Required<{
|
|
396
355
|
_id: string;
|
|
397
356
|
}> & {
|
|
@@ -591,4 +550,4 @@ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.D
|
|
|
591
550
|
__v: number;
|
|
592
551
|
}, any>;
|
|
593
552
|
|
|
594
|
-
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel,
|
|
553
|
+
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
|
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -1679,6 +1679,7 @@ __export(service_exports, {
|
|
|
1679
1679
|
saveNotificationsInDb: () => saveNotificationsInDb,
|
|
1680
1680
|
sendPushNotifications: () => sendPushNotifications,
|
|
1681
1681
|
updateAdStatuses: () => updateAdStatuses,
|
|
1682
|
+
updateRelationDatesToUnavailable: () => updateRelationDatesToUnavailable,
|
|
1682
1683
|
updateVendorBasedOnUserLicense: () => updateVendorBasedOnUserLicense
|
|
1683
1684
|
});
|
|
1684
1685
|
module.exports = __toCommonJS(service_exports);
|
|
@@ -12450,7 +12451,8 @@ var schema11 = new MongooseSchema15(
|
|
|
12450
12451
|
required: false,
|
|
12451
12452
|
type: [resourceRelationsSchema]
|
|
12452
12453
|
},
|
|
12453
|
-
tags: { required: true, type: [String] }
|
|
12454
|
+
tags: { required: true, type: [String] },
|
|
12455
|
+
unregisteredVendorIds: { default: [], required: false, type: [String] }
|
|
12454
12456
|
},
|
|
12455
12457
|
{ timestamps: true }
|
|
12456
12458
|
);
|
|
@@ -12972,6 +12974,19 @@ async function findEventOrImportedMarketById(resourceId) {
|
|
|
12972
12974
|
]);
|
|
12973
12975
|
return eventDoc ?? googleImportedDoc;
|
|
12974
12976
|
}
|
|
12977
|
+
|
|
12978
|
+
// src/service/relations.ts
|
|
12979
|
+
function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
|
|
12980
|
+
return relationDates.map((relationDate) => {
|
|
12981
|
+
const existsInEvent = eventDateTime?.some(
|
|
12982
|
+
(dt) => dt.startDate === relationDate.dateTime.startDate && dt.startTime === relationDate.dateTime.startTime
|
|
12983
|
+
) ?? false;
|
|
12984
|
+
return {
|
|
12985
|
+
...relationDate,
|
|
12986
|
+
status: existsInEvent ? relationDate.status : EnumInviteStatus.UNAVAILABLE
|
|
12987
|
+
};
|
|
12988
|
+
});
|
|
12989
|
+
}
|
|
12975
12990
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12976
12991
|
0 && (module.exports = {
|
|
12977
12992
|
connectToDatabase,
|
|
@@ -12980,6 +12995,7 @@ async function findEventOrImportedMarketById(resourceId) {
|
|
|
12980
12995
|
saveNotificationsInDb,
|
|
12981
12996
|
sendPushNotifications,
|
|
12982
12997
|
updateAdStatuses,
|
|
12998
|
+
updateRelationDatesToUnavailable,
|
|
12983
12999
|
updateVendorBasedOnUserLicense
|
|
12984
13000
|
});
|
|
12985
13001
|
/*! Bundled license information:
|