@timardex/cluemart-server-shared 1.1.0 → 1.1.11
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/{Affiliate-CtH6MdT3.d.ts → Affiliate-B76iZ3fE.d.mts} +7 -38
- package/dist/{Affiliate-DaFyIRHK.d.mts → Affiliate-gqV1-654.d.ts} +7 -38
- package/dist/{Chat-NS-2VVEV.d.mts → Chat-Wn7yfc3v.d.mts} +5 -7
- package/dist/{Chat-NS-2VVEV.d.ts → Chat-Wn7yfc3v.d.ts} +5 -7
- package/dist/{chunk-Z22PTYAL.mjs → chunk-3J26U4GN.mjs} +2295 -2937
- package/dist/chunk-3J26U4GN.mjs.map +1 -0
- package/dist/{chunk-RU5PTSIO.mjs → chunk-6PNG5BI5.mjs} +1 -1
- package/dist/chunk-6PNG5BI5.mjs.map +1 -0
- package/dist/index.cjs +2309 -3067
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +70 -211
- package/dist/index.d.ts +70 -211
- package/dist/index.mjs +2309 -3067
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +2233 -2927
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +60 -161
- package/dist/mongoose/index.d.ts +60 -161
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +2309 -3067
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +10 -17
- package/dist/service/index.d.ts +10 -17
- package/dist/service/index.mjs +59 -167
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-RU5PTSIO.mjs.map +0 -1
- package/dist/chunk-Z22PTYAL.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, CreateBulkNotificationInput, NotificationType,
|
|
2
|
+
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType, PromoCodeType, EnumAffiliateRewardType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
|
|
3
3
|
import * as mongoose from 'mongoose';
|
|
4
4
|
import mongoose__default from 'mongoose';
|
|
5
5
|
export { default as mongoose } from 'mongoose';
|
|
@@ -8,21 +8,8 @@ import express from 'express';
|
|
|
8
8
|
export { default as express } from 'express';
|
|
9
9
|
import dayjs from 'dayjs';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
_id:
|
|
13
|
-
end: Date;
|
|
14
|
-
start: Date;
|
|
15
|
-
createdAt: Date;
|
|
16
|
-
updatedAt: Date;
|
|
17
|
-
};
|
|
18
|
-
declare const AdModel: mongoose__default.Model<SchemaAdType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAdType, {}, {}> & Omit<AdType, "_id" | "end" | "start" | "createdAt" | "updatedAt"> & {
|
|
19
|
-
_id: mongoose__default.Types.ObjectId;
|
|
20
|
-
end: Date;
|
|
21
|
-
start: Date;
|
|
22
|
-
createdAt: Date;
|
|
23
|
-
updatedAt: Date;
|
|
24
|
-
} & Required<{
|
|
25
|
-
_id: mongoose__default.Types.ObjectId;
|
|
11
|
+
declare const AdModel: mongoose__default.Model<AdType, {}, {}, {}, mongoose__default.Document<unknown, {}, AdType, {}, {}> & AdType & Required<{
|
|
12
|
+
_id: string;
|
|
26
13
|
}> & {
|
|
27
14
|
__v: number;
|
|
28
15
|
}, any>;
|
|
@@ -50,7 +37,7 @@ declare enum EnumPubSubEvents {
|
|
|
50
37
|
}
|
|
51
38
|
interface AuthUser {
|
|
52
39
|
email: string;
|
|
53
|
-
roles:
|
|
40
|
+
roles: EnumUserRole[];
|
|
54
41
|
userId: ObjectId;
|
|
55
42
|
}
|
|
56
43
|
interface SubscriptionPayload {
|
|
@@ -76,12 +63,10 @@ interface GraphQLContext {
|
|
|
76
63
|
type SchemaChatMessageReplyPreviewType = Omit<NonNullable<ChatMessageType["replyPreview"]>, "senderId"> & {
|
|
77
64
|
senderId: ObjectId;
|
|
78
65
|
};
|
|
79
|
-
type SchemaChatMessageReactionType = Omit<NonNullable<
|
|
80
|
-
createdAt: Date;
|
|
66
|
+
type SchemaChatMessageReactionType = Omit<NonNullable<ChatMessageType["likedBy"]>[number], "userId"> & {
|
|
81
67
|
userId: ObjectId;
|
|
82
68
|
};
|
|
83
|
-
type SchemaChatMessageSeenType = Omit<NonNullable<
|
|
84
|
-
seenAt: Date;
|
|
69
|
+
type SchemaChatMessageSeenType = Omit<NonNullable<ChatMessageType["seenBy"]>[number], "userId"> & {
|
|
85
70
|
userId: ObjectId;
|
|
86
71
|
};
|
|
87
72
|
type SchemaChatMessageType = Omit<ChatMessageType, "senderId" | "replyToMessageId" | "replyPreview" | "likedBy" | "seenBy"> & {
|
|
@@ -91,7 +76,7 @@ type SchemaChatMessageType = Omit<ChatMessageType, "senderId" | "replyToMessageI
|
|
|
91
76
|
likedBy?: SchemaChatMessageReactionType[];
|
|
92
77
|
seenBy?: SchemaChatMessageSeenType[];
|
|
93
78
|
};
|
|
94
|
-
type SchemaParticipantType = Omit<
|
|
79
|
+
type SchemaParticipantType = Omit<ParticipantType, "userId"> & {
|
|
95
80
|
userId: ObjectId;
|
|
96
81
|
};
|
|
97
82
|
type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
@@ -107,12 +92,12 @@ declare const ChatModel: mongoose__default.Model<SchemaChatType, {}, {}, {}, mon
|
|
|
107
92
|
__v: number;
|
|
108
93
|
}, any>;
|
|
109
94
|
|
|
110
|
-
type SchemaChatReportType = Omit<
|
|
95
|
+
type SchemaChatReportType = Omit<ReportChatUser, "reporterUserId" | "reportedUserId" | "chatId"> & {
|
|
111
96
|
reporterUserId: ObjectId;
|
|
112
97
|
reportedUserId: ObjectId;
|
|
113
98
|
chatId: ObjectId;
|
|
114
99
|
};
|
|
115
|
-
declare const ChatReportModel: mongoose__default.Model<SchemaChatReportType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatReportType, {}, {}> & Omit<
|
|
100
|
+
declare const ChatReportModel: mongoose__default.Model<SchemaChatReportType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatReportType, {}, {}> & Omit<ReportChatUser, "reporterUserId" | "reportedUserId" | "chatId"> & {
|
|
116
101
|
reporterUserId: ObjectId;
|
|
117
102
|
reportedUserId: ObjectId;
|
|
118
103
|
chatId: ObjectId;
|
|
@@ -465,7 +450,7 @@ declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImp
|
|
|
465
450
|
type SchemaPushTokenType = Omit<PushTokenType, "userId"> & {
|
|
466
451
|
userId: ObjectId;
|
|
467
452
|
};
|
|
468
|
-
declare const PushTokenModel: mongoose__default.Model<SchemaPushTokenType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaPushTokenType, {}, {}> & Omit<
|
|
453
|
+
declare const PushTokenModel: mongoose__default.Model<SchemaPushTokenType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaPushTokenType, {}, {}> & Omit<PushTokenType, "userId"> & {
|
|
469
454
|
userId: ObjectId;
|
|
470
455
|
} & Required<{
|
|
471
456
|
_id: string;
|
|
@@ -524,28 +509,14 @@ declare const ResourceActivityModel: mongoose__default.Model<ResourceActivityTyp
|
|
|
524
509
|
type SchemaUserActivityEvent = Omit<UserActivityEvent, "resourceId"> & {
|
|
525
510
|
resourceId: ObjectId;
|
|
526
511
|
};
|
|
527
|
-
|
|
528
|
-
* Mongoose user document. GraphQL UserType is the redacted client shape
|
|
529
|
-
* (ISO Date strings, no secrets). Persistence keeps JS Date + password /
|
|
530
|
-
* refreshToken / emailSentFor. Dual-shape — do not collapse.
|
|
531
|
-
*/
|
|
532
|
-
type SchemaUserType = Omit<UserType, "affiliate" | "createdAt" | "deletedAt" | "events" | "game" | "licences" | "partner" | "permissions" | "redeemedRewards" | "school" | "stripe" | "updatedAt" | "userActivity" | "vendor" | "_id"> & {
|
|
512
|
+
type SchemaUserType = Omit<UserType, "vendor" | "events" | "partner" | "userActivity" | "_id" | "game" | "school" | "affiliate" | "permissions"> & {
|
|
533
513
|
_id: ObjectId;
|
|
534
|
-
affiliate
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
licences?: UserLicenceType[] | null;
|
|
541
|
-
partner?: ObjectId;
|
|
542
|
-
password: string;
|
|
543
|
-
redeemedRewards?: RedeemedReward[] | null;
|
|
544
|
-
refreshToken?: string | null;
|
|
545
|
-
school?: ObjectId;
|
|
546
|
-
stripe?: StripeSubscription;
|
|
547
|
-
updatedAt: Date;
|
|
548
|
-
vendor?: ObjectId;
|
|
514
|
+
affiliate: ObjectId;
|
|
515
|
+
events: ObjectId[];
|
|
516
|
+
game: ObjectId;
|
|
517
|
+
partner: ObjectId;
|
|
518
|
+
school: ObjectId;
|
|
519
|
+
vendor: ObjectId;
|
|
549
520
|
userActivity: {
|
|
550
521
|
favourites: {
|
|
551
522
|
events: ObjectId[];
|
|
@@ -563,23 +534,14 @@ type SchemaUserType = Omit<UserType, "affiliate" | "createdAt" | "deletedAt" | "
|
|
|
563
534
|
};
|
|
564
535
|
};
|
|
565
536
|
};
|
|
566
|
-
declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUserType, {}, {}> & Omit<UserType, "_id" | "
|
|
537
|
+
declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUserType, {}, {}> & Omit<UserType, "_id" | "vendor" | "events" | "partner" | "userActivity" | "game" | "school" | "affiliate" | "permissions"> & {
|
|
567
538
|
_id: ObjectId;
|
|
568
|
-
affiliate
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
licences?: UserLicenceType[] | null;
|
|
575
|
-
partner?: ObjectId;
|
|
576
|
-
password: string;
|
|
577
|
-
redeemedRewards?: RedeemedReward[] | null;
|
|
578
|
-
refreshToken?: string | null;
|
|
579
|
-
school?: ObjectId;
|
|
580
|
-
stripe?: StripeSubscription;
|
|
581
|
-
updatedAt: Date;
|
|
582
|
-
vendor?: ObjectId;
|
|
539
|
+
affiliate: ObjectId;
|
|
540
|
+
events: ObjectId[];
|
|
541
|
+
game: ObjectId;
|
|
542
|
+
partner: ObjectId;
|
|
543
|
+
school: ObjectId;
|
|
544
|
+
vendor: ObjectId;
|
|
583
545
|
userActivity: {
|
|
584
546
|
favourites: {
|
|
585
547
|
events: ObjectId[];
|
|
@@ -606,7 +568,6 @@ interface VerificationTokenType {
|
|
|
606
568
|
email: string;
|
|
607
569
|
verificationToken: string;
|
|
608
570
|
createdAt: Date;
|
|
609
|
-
updatedAt: Date;
|
|
610
571
|
}
|
|
611
572
|
declare const VerificationTokenModel: mongoose__default.Model<VerificationTokenType, {}, {}, {}, mongoose__default.Document<unknown, {}, VerificationTokenType, {}, {}> & VerificationTokenType & {
|
|
612
573
|
_id: mongoose__default.Types.ObjectId;
|
|
@@ -614,43 +575,27 @@ declare const VerificationTokenModel: mongoose__default.Model<VerificationTokenT
|
|
|
614
575
|
__v: number;
|
|
615
576
|
}, any>;
|
|
616
577
|
|
|
617
|
-
|
|
618
|
-
* Mongoose vendor document. GraphQL `Date` is an ISO string at the wire;
|
|
619
|
-
* documents store JS Date. Dual-shape vs generated VendorType — do not collapse.
|
|
620
|
-
*/
|
|
621
|
-
type SchemaVendorType = Omit<VendorType, "adIds" | "approvedAt" | "createdAt" | "deletedAt" | "owner" | "unregisteredVendorId" | "updatedAt" | "vendorInfoId"> & {
|
|
578
|
+
type SchemaVendorType = Omit<VendorType, "vendorInfoId" | "owner" | "adIds" | "unregisteredVendorId"> & {
|
|
622
579
|
adIds?: ObjectId[];
|
|
623
|
-
approvedAt?: Date | null;
|
|
624
|
-
createdAt: Date;
|
|
625
|
-
deletedAt?: Date | null;
|
|
626
580
|
owner: SchemaOwnerType;
|
|
581
|
+
vendorInfoId: ObjectId;
|
|
627
582
|
unregisteredVendorId?: ObjectId | null;
|
|
628
|
-
updatedAt: Date;
|
|
629
|
-
vendorInfoId?: ObjectId;
|
|
630
583
|
};
|
|
631
|
-
declare const VendorModel: mongoose__default.Model<SchemaVendorType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaVendorType, {}, {}> & Omit<VendorType, "
|
|
584
|
+
declare const VendorModel: mongoose__default.Model<SchemaVendorType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaVendorType, {}, {}> & Omit<VendorType, "adIds" | "owner" | "vendorInfoId" | "unregisteredVendorId"> & {
|
|
632
585
|
adIds?: ObjectId[];
|
|
633
|
-
approvedAt?: Date | null;
|
|
634
|
-
createdAt: Date;
|
|
635
|
-
deletedAt?: Date | null;
|
|
636
586
|
owner: SchemaOwnerType;
|
|
587
|
+
vendorInfoId: ObjectId;
|
|
637
588
|
unregisteredVendorId?: ObjectId | null;
|
|
638
|
-
updatedAt: Date;
|
|
639
|
-
vendorInfoId?: ObjectId;
|
|
640
589
|
} & Required<{
|
|
641
590
|
_id: string;
|
|
642
591
|
}> & {
|
|
643
592
|
__v: number;
|
|
644
593
|
}, any>;
|
|
645
594
|
|
|
646
|
-
type SchemaVendorInfoType = Omit<VendorInfoType, "vendorId"
|
|
647
|
-
createdAt: Date;
|
|
648
|
-
updatedAt: Date;
|
|
595
|
+
type SchemaVendorInfoType = Omit<VendorInfoType, "vendorId"> & {
|
|
649
596
|
vendorId: ObjectId;
|
|
650
597
|
};
|
|
651
|
-
declare const VendorInfoModel: mongoose__default.Model<SchemaVendorInfoType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaVendorInfoType, {}, {}> & Omit<VendorInfoType, "
|
|
652
|
-
createdAt: Date;
|
|
653
|
-
updatedAt: Date;
|
|
598
|
+
declare const VendorInfoModel: mongoose__default.Model<SchemaVendorInfoType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaVendorInfoType, {}, {}> & Omit<VendorInfoType, "vendorId"> & {
|
|
654
599
|
vendorId: ObjectId;
|
|
655
600
|
} & Required<{
|
|
656
601
|
_id: string;
|
|
@@ -661,52 +606,34 @@ declare const VendorInfoModel: mongoose__default.Model<SchemaVendorInfoType, {},
|
|
|
661
606
|
type SchemaUnregisteredVendorInvitationType = Omit<UnregisteredVendorInvitationType, "inviterId"> & {
|
|
662
607
|
inviterId: ObjectId;
|
|
663
608
|
};
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
type SchemaUnregisteredVendorType = Omit<UnregisteredVendorType, "claimedAt" | "claimedByUserId" | "createdAt" | "deletedAt" | "invitations" | "updatedAt"> & {
|
|
669
|
-
claimedAt?: Date | null;
|
|
609
|
+
type SchemaUnregisteredVendorType = Omit<UnregisteredVendorType, "invitations" | "claimedByUserId"> & {
|
|
610
|
+
claimInitiatedAt?: Date | null;
|
|
611
|
+
claimToken?: string | null;
|
|
612
|
+
claimTokenExpiresAt?: Date | null;
|
|
670
613
|
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
671
|
-
createdAt: Date;
|
|
672
|
-
deletedAt?: Date | null;
|
|
673
614
|
invitations: SchemaUnregisteredVendorInvitationType[];
|
|
674
|
-
updatedAt: Date;
|
|
675
615
|
};
|
|
676
|
-
declare const UnregisteredVendorModel: mongoose__default.Model<SchemaUnregisteredVendorType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUnregisteredVendorType, {}, {}> & Omit<UnregisteredVendorType, "
|
|
677
|
-
|
|
616
|
+
declare const UnregisteredVendorModel: mongoose__default.Model<SchemaUnregisteredVendorType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUnregisteredVendorType, {}, {}> & Omit<UnregisteredVendorType, "claimedByUserId" | "invitations"> & {
|
|
617
|
+
claimInitiatedAt?: Date | null;
|
|
618
|
+
claimToken?: string | null;
|
|
619
|
+
claimTokenExpiresAt?: Date | null;
|
|
678
620
|
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
679
|
-
createdAt: Date;
|
|
680
|
-
deletedAt?: Date | null;
|
|
681
621
|
invitations: SchemaUnregisteredVendorInvitationType[];
|
|
682
|
-
updatedAt: Date;
|
|
683
622
|
} & Required<{
|
|
684
623
|
_id: string;
|
|
685
624
|
}> & {
|
|
686
625
|
__v: number;
|
|
687
626
|
}, any>;
|
|
688
627
|
|
|
689
|
-
|
|
690
|
-
* Mongoose event document. GraphQL `Date` is an ISO string at the wire;
|
|
691
|
-
* documents store JS Date. Dual-shape vs generated EventType — do not collapse.
|
|
692
|
-
*/
|
|
693
|
-
type SchemaEventType = Omit<EventType, "adIds" | "approvedAt" | "createdAt" | "deletedAt" | "eventInfoId" | "owner" | "updatedAt"> & {
|
|
628
|
+
type SchemaEventType = Omit<EventType, "eventInfoId" | "owner" | "adIds"> & {
|
|
694
629
|
adIds?: ObjectId[];
|
|
695
|
-
|
|
696
|
-
createdAt: Date;
|
|
697
|
-
deletedAt?: Date | null;
|
|
698
|
-
eventInfoId?: ObjectId;
|
|
630
|
+
eventInfoId: ObjectId;
|
|
699
631
|
owner: SchemaOwnerType;
|
|
700
|
-
updatedAt: Date;
|
|
701
632
|
};
|
|
702
|
-
declare const EventModel: mongoose__default.Model<SchemaEventType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventType, {}, {}> & Omit<EventType, "
|
|
633
|
+
declare const EventModel: mongoose__default.Model<SchemaEventType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventType, {}, {}> & Omit<EventType, "adIds" | "eventInfoId" | "owner"> & {
|
|
703
634
|
adIds?: ObjectId[];
|
|
704
|
-
|
|
705
|
-
createdAt: Date;
|
|
706
|
-
deletedAt?: Date | null;
|
|
707
|
-
eventInfoId?: ObjectId;
|
|
635
|
+
eventInfoId: ObjectId;
|
|
708
636
|
owner: SchemaOwnerType;
|
|
709
|
-
updatedAt: Date;
|
|
710
637
|
} & Required<{
|
|
711
638
|
_id: string;
|
|
712
639
|
}> & {
|
|
@@ -731,40 +658,24 @@ declare const refundPolicySchema: mongoose__default.Schema<RefundPolicy, mongoos
|
|
|
731
658
|
} & {
|
|
732
659
|
__v: number;
|
|
733
660
|
}>;
|
|
734
|
-
type SchemaEventInfoType = Omit<EventInfoType, "eventId"
|
|
735
|
-
createdAt: Date;
|
|
661
|
+
type SchemaEventInfoType = Omit<EventInfoType, "eventId"> & {
|
|
736
662
|
eventId: ObjectId;
|
|
737
|
-
updatedAt: Date;
|
|
738
663
|
};
|
|
739
|
-
declare const EventInfoModel: mongoose__default.Model<SchemaEventInfoType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventInfoType, {}, {}> & Omit<EventInfoType, "
|
|
740
|
-
createdAt: Date;
|
|
664
|
+
declare const EventInfoModel: mongoose__default.Model<SchemaEventInfoType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventInfoType, {}, {}> & Omit<EventInfoType, "eventId"> & {
|
|
741
665
|
eventId: ObjectId;
|
|
742
|
-
updatedAt: Date;
|
|
743
666
|
} & Required<{
|
|
744
667
|
_id: string;
|
|
745
668
|
}> & {
|
|
746
669
|
__v: number;
|
|
747
670
|
}, any>;
|
|
748
671
|
|
|
749
|
-
|
|
750
|
-
* Mongoose partner document. GraphQL `Date` is an ISO string at the wire;
|
|
751
|
-
* documents store JS Date. Dual-shape vs generated PartnerType — do not collapse.
|
|
752
|
-
*/
|
|
753
|
-
type SchemaPartnerType = Omit<PartnerType, "adIds" | "approvedAt" | "createdAt" | "deletedAt" | "owner" | "updatedAt"> & {
|
|
672
|
+
type SchemaPartnerType = Omit<PartnerType, "owner" | "adIds"> & {
|
|
754
673
|
adIds?: ObjectId[];
|
|
755
|
-
approvedAt?: Date | null;
|
|
756
|
-
createdAt: Date;
|
|
757
|
-
deletedAt?: Date | null;
|
|
758
674
|
owner: SchemaOwnerType;
|
|
759
|
-
updatedAt: Date;
|
|
760
675
|
};
|
|
761
|
-
declare const PartnerModel: mongoose__default.Model<SchemaPartnerType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaPartnerType, {}, {}> & Omit<PartnerType, "
|
|
676
|
+
declare const PartnerModel: mongoose__default.Model<SchemaPartnerType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaPartnerType, {}, {}> & Omit<PartnerType, "adIds" | "owner"> & {
|
|
762
677
|
adIds?: ObjectId[];
|
|
763
|
-
approvedAt?: Date | null;
|
|
764
|
-
createdAt: Date;
|
|
765
|
-
deletedAt?: Date | null;
|
|
766
678
|
owner: SchemaOwnerType;
|
|
767
|
-
updatedAt: Date;
|
|
768
679
|
} & Required<{
|
|
769
680
|
_id: string;
|
|
770
681
|
}> & {
|
|
@@ -772,7 +683,17 @@ declare const PartnerModel: mongoose__default.Model<SchemaPartnerType, {}, {}, {
|
|
|
772
683
|
}, any>;
|
|
773
684
|
|
|
774
685
|
type SchemaPostType = PostType;
|
|
775
|
-
declare const PostModel: mongoose__default.Model<PostType, {}, {}, {}, mongoose__default.Document<unknown, {}, PostType, {}, {}> &
|
|
686
|
+
declare const PostModel: mongoose__default.Model<PostType, {}, {}, {}, mongoose__default.Document<unknown, {}, PostType, {}, {}> & Omit<_timardex_cluemart_shared.PostFormData, "resource" | "content" | "coverUpload"> & {
|
|
687
|
+
_id: string;
|
|
688
|
+
approvedAt?: Date | null;
|
|
689
|
+
content: PostContentType[];
|
|
690
|
+
createdAt: Date;
|
|
691
|
+
deletedAt: Date | null;
|
|
692
|
+
resource?: PostResource | null;
|
|
693
|
+
slug: string;
|
|
694
|
+
sharePublic?: _timardex_cluemart_shared.SocialShareResourceType | null;
|
|
695
|
+
updatedAt: Date | null;
|
|
696
|
+
} & Required<{
|
|
776
697
|
_id: string;
|
|
777
698
|
}> & {
|
|
778
699
|
__v: number;
|
|
@@ -801,80 +722,25 @@ declare const GameModel: mongoose__default.Model<GameDocType, {}, {}, {}, mongoo
|
|
|
801
722
|
__v: number;
|
|
802
723
|
}, any>;
|
|
803
724
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
endDate: Date;
|
|
807
|
-
name: string;
|
|
808
|
-
startDate: Date;
|
|
809
|
-
};
|
|
810
|
-
/**
|
|
811
|
-
* Mongoose school document. GraphQL `Date` is an ISO string at the wire;
|
|
812
|
-
* documents store JS Date. Dual-shape vs generated SchoolType — do not collapse.
|
|
813
|
-
*/
|
|
814
|
-
type SchemaSchoolType = Omit<SchoolType, "approvedAt" | "campaigns" | "createdAt" | "deletedAt" | "owner" | "ranking" | "updatedAt"> & {
|
|
815
|
-
approvedAt?: Date | null;
|
|
816
|
-
campaigns?: SchemaSchoolCampaign[];
|
|
817
|
-
createdAt: Date;
|
|
818
|
-
deletedAt?: Date | null;
|
|
819
|
-
owner: SchemaOwnerType;
|
|
820
|
-
updatedAt: Date;
|
|
821
|
-
};
|
|
822
|
-
declare const SchoolModel: mongoose__default.Model<SchemaSchoolType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaSchoolType, {}, {}> & Omit<SchoolType, "createdAt" | "updatedAt" | "deletedAt" | "approvedAt" | "owner" | "campaigns" | "ranking"> & {
|
|
823
|
-
approvedAt?: Date | null;
|
|
824
|
-
campaigns?: SchemaSchoolCampaign[];
|
|
825
|
-
createdAt: Date;
|
|
826
|
-
deletedAt?: Date | null;
|
|
827
|
-
owner: SchemaOwnerType;
|
|
828
|
-
updatedAt: Date;
|
|
829
|
-
} & Required<{
|
|
725
|
+
type SchoolDocument = Omit<SchoolType, "ranking">;
|
|
726
|
+
declare const SchoolModel: mongoose__default.Model<SchoolDocument, {}, {}, {}, mongoose__default.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
|
|
830
727
|
_id: string;
|
|
831
728
|
}> & {
|
|
832
729
|
__v: number;
|
|
833
730
|
}, any>;
|
|
834
731
|
|
|
835
|
-
|
|
836
|
-
type
|
|
837
|
-
createdAt: Date;
|
|
838
|
-
redeemedAt?: Date | null;
|
|
839
|
-
rewardDescription: string;
|
|
840
|
-
rewardType: AffiliateRewardEnumType;
|
|
841
|
-
rewardValue: number;
|
|
842
|
-
};
|
|
843
|
-
type SchemaAffiliateResourceType = Omit<AffiliateResourceType, "resourceDeletedAt" | "resourceId" | "resourceOwner" | "rewards"> & {
|
|
844
|
-
resourceDeletedAt?: Date | null;
|
|
732
|
+
type SchemaAffiliateReward = AffiliateRewardType;
|
|
733
|
+
type SchemaAffiliateResourceType = Omit<AffiliateResourceType, "resourceId" | "resourceOwner"> & {
|
|
845
734
|
resourceId: ObjectId;
|
|
846
735
|
resourceOwner: SchemaOwnerType;
|
|
847
|
-
rewards?: SchemaAffiliateReward[];
|
|
848
|
-
};
|
|
849
|
-
/** Persistence redeem-history dates are JS Date; GraphQL RedeemHistoryType uses ISO strings. */
|
|
850
|
-
type SchemaRedeemHistory = {
|
|
851
|
-
paidAt?: Date | null;
|
|
852
|
-
redeemedAt: Date;
|
|
853
|
-
rewardValue: number;
|
|
854
736
|
};
|
|
855
|
-
|
|
856
|
-
* Mongoose affiliate document. GraphQL `Date` is an ISO string at the wire;
|
|
857
|
-
* documents store JS Date. Dual-shape vs generated AffiliateType — do not collapse.
|
|
858
|
-
*/
|
|
859
|
-
type SchemaAffiliateType = Omit<AffiliateType, "_id" | "affiliateBonusRewards" | "affiliateResources" | "approvedAt" | "createdAt" | "deletedAt" | "owner" | "redeemHistory" | "updatedAt"> & {
|
|
860
|
-
affiliateBonusRewards?: SchemaAffiliateReward[];
|
|
737
|
+
type AffiliateDocument = Omit<AffiliateType, "_id" | "owner" | "affiliateResources"> & {
|
|
861
738
|
affiliateResources: SchemaAffiliateResourceType[];
|
|
862
|
-
approvedAt?: Date | null;
|
|
863
|
-
createdAt: Date;
|
|
864
|
-
deletedAt?: Date | null;
|
|
865
739
|
owner: SchemaOwnerType;
|
|
866
|
-
redeemHistory?: SchemaRedeemHistory[];
|
|
867
|
-
updatedAt: Date;
|
|
868
740
|
};
|
|
869
|
-
declare const AffiliateModel: mongoose__default.Model<
|
|
870
|
-
affiliateBonusRewards?: SchemaAffiliateReward[];
|
|
741
|
+
declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {}, {}, mongoose__default.Document<unknown, {}, AffiliateDocument, {}, {}> & Omit<AffiliateType, "_id" | "owner" | "affiliateResources"> & {
|
|
871
742
|
affiliateResources: SchemaAffiliateResourceType[];
|
|
872
|
-
approvedAt?: Date | null;
|
|
873
|
-
createdAt: Date;
|
|
874
|
-
deletedAt?: Date | null;
|
|
875
743
|
owner: SchemaOwnerType;
|
|
876
|
-
redeemHistory?: SchemaRedeemHistory[];
|
|
877
|
-
updatedAt: Date;
|
|
878
744
|
} & {
|
|
879
745
|
_id: mongoose__default.Types.ObjectId;
|
|
880
746
|
} & {
|
|
@@ -928,19 +794,12 @@ declare function awardAffiliateVendorSubscriptionRewards(now?: Date): Promise<Aw
|
|
|
928
794
|
* @param promoCode - Normalized affiliate promo code to resolve.
|
|
929
795
|
* @returns The matching affiliate document, or `null` when not found.
|
|
930
796
|
*/
|
|
931
|
-
declare function findAffiliateByPromoCode(promoCode: PromoCodeType): Promise<(mongoose.Document<unknown, {},
|
|
932
|
-
|
|
797
|
+
declare function findAffiliateByPromoCode(promoCode: PromoCodeType): Promise<(mongoose.Document<unknown, {}, Omit<_timardex_cluemart_shared.AffiliateType, "_id" | "owner" | "affiliateResources"> & {
|
|
798
|
+
affiliateResources: SchemaAffiliateResourceType[];
|
|
799
|
+
owner: SchemaOwnerType;
|
|
800
|
+
}, {}, {}> & Omit<_timardex_cluemart_shared.AffiliateType, "_id" | "owner" | "affiliateResources"> & {
|
|
933
801
|
affiliateResources: SchemaAffiliateResourceType[];
|
|
934
|
-
approvedAt?: Date | null;
|
|
935
|
-
createdAt: Date;
|
|
936
|
-
deletedAt?: Date | null;
|
|
937
802
|
owner: SchemaOwnerType;
|
|
938
|
-
redeemHistory?: {
|
|
939
|
-
paidAt?: Date | null;
|
|
940
|
-
redeemedAt: Date;
|
|
941
|
-
rewardValue: number;
|
|
942
|
-
}[];
|
|
943
|
-
updatedAt: Date;
|
|
944
803
|
} & {
|
|
945
804
|
_id: mongoose.Types.ObjectId;
|
|
946
805
|
} & {
|
|
@@ -963,7 +822,7 @@ declare function normalizeAffiliatePromoCodes(promoCodes: PromoCodeType[] | null
|
|
|
963
822
|
* otherwise falls back to the Standard subscription reward.
|
|
964
823
|
* Returns `null` when no non-expired vendor licence applies.
|
|
965
824
|
*/
|
|
966
|
-
declare function mapVendorLicenceToSubscriptionRewardType(licences: UserLicenceType[] | null | undefined, now?: Date, stripe?: UserType["stripe"] | null):
|
|
825
|
+
declare function mapVendorLicenceToSubscriptionRewardType(licences: UserLicenceType[] | null | undefined, now?: Date, stripe?: UserType["stripe"] | null): EnumAffiliateRewardType | null;
|
|
967
826
|
/** Inclusive start / exclusive end of the UTC calendar month containing `now`. */
|
|
968
827
|
declare function getSubscriptionRewardPeriodBounds(now?: Date): {
|
|
969
828
|
periodEnd: Date;
|
|
@@ -1025,7 +884,7 @@ declare function sendPushNotifications({ data, message, title, userIds, }: Schem
|
|
|
1025
884
|
*/
|
|
1026
885
|
declare function updateAdStatuses(): Promise<void>;
|
|
1027
886
|
|
|
1028
|
-
declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceType:
|
|
887
|
+
declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceType: EnumUserLicence): Promise<void>;
|
|
1029
888
|
|
|
1030
889
|
/**
|
|
1031
890
|
* True when `value` is a valid Mongo ObjectId string.
|
|
@@ -1071,4 +930,4 @@ declare function didRemoveAnyEventDates(previousDateTime: EventDateSlot[] | unde
|
|
|
1071
930
|
*/
|
|
1072
931
|
declare function updateRelationDatesToUnavailable(relationDates: SchemaRelationType["relationDates"], eventDateTime: DateTimeWithPriceType[] | undefined): SchemaRelationType["relationDates"];
|
|
1073
932
|
|
|
1074
|
-
export { ACTIVE_NOT_DELETED_FILTER, APP_SETTINGS_ID, AdModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, EnumPubSubEvents, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type
|
|
933
|
+
export { ACTIVE_NOT_DELETED_FILTER, APP_SETTINGS_ID, AdModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, EnumPubSubEvents, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type SchemaAffiliateResourceType, type SchemaAffiliateReward, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelatedPostType, type SchemaRelationType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, type SubscriptionPayload, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, activeAffiliateCodeExists, awardAffiliateVendorSubscriptionRewards, baseResourceFields, connectToDatabase, convertObjectIdsToStrings, dateTimeSchema, didRemoveAnyEventDates, findAffiliateByPromoCode, findEventOrImportedMarketById, getSubscriptionRewardPeriodBounds, isValidObjectId, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, resourceRelationsSchema, saveNotificationsInDb, sendPushNotifications, socialShareResourceSchema, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, updateVendorBasedOnUserLicense, userLicenseSchema };
|