@timardex/cluemart-server-shared 1.0.281 → 1.0.287
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-C_g6TdeG.d.ts +396 -0
- package/dist/Affiliate-CmS0A1gU.d.mts +396 -0
- package/dist/{Chat-DYkhie3G.d.mts → Chat-Bnqec74U.d.mts} +4 -4
- package/dist/{Chat-DYkhie3G.d.ts → Chat-Bnqec74U.d.ts} +4 -4
- package/dist/{chunk-6IK6D2KS.mjs → chunk-6EDO734D.mjs} +6 -1
- package/dist/chunk-6EDO734D.mjs.map +1 -0
- package/dist/index.cjs +334 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +273 -149
- package/dist/index.d.ts +273 -149
- package/dist/index.mjs +318 -31
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +2 -0
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +40 -387
- package/dist/mongoose/index.d.ts +40 -387
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +677 -382
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +129 -5
- package/dist/service/index.d.ts +129 -5
- package/dist/service/index.mjs +313 -24
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/Relation-6t3Gn4pM.d.ts +0 -47
- package/dist/Relation-BjYghDE9.d.mts +0 -47
- package/dist/chunk-6IK6D2KS.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, SocialShareResourceType, 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, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
|
|
3
|
-
import mongoose from 'mongoose';
|
|
2
|
+
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, SocialShareResourceType, 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, EnumAffiliateRewardType, PromoCodeType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
import mongoose__default from 'mongoose';
|
|
4
5
|
export { default as mongoose } from 'mongoose';
|
|
5
6
|
import { NotificationCount, DateTimeType as DateTimeType$1 } from '@timardex/cluemart-shared/types';
|
|
6
7
|
import express from 'express';
|
|
7
8
|
export { default as express } from 'express';
|
|
8
9
|
import dayjs from 'dayjs';
|
|
9
10
|
|
|
10
|
-
declare const AdModel:
|
|
11
|
+
declare const AdModel: mongoose__default.Model<AdType, {}, {}, {}, mongoose__default.Document<unknown, {}, AdType, {}, {}> & AdType & Required<{
|
|
11
12
|
_id: string;
|
|
12
13
|
}> & {
|
|
13
14
|
__v: number;
|
|
@@ -19,7 +20,7 @@ type SchemaCreateBulkNotificationInput = Omit<CreateBulkNotificationInput, "user
|
|
|
19
20
|
type SchemaNotificationType = Omit<NotificationType, "userId"> & {
|
|
20
21
|
userId: ObjectId;
|
|
21
22
|
};
|
|
22
|
-
declare const NotificationModel:
|
|
23
|
+
declare const NotificationModel: mongoose__default.Model<SchemaNotificationType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaNotificationType, {}, {}> & Omit<NotificationType, "userId"> & {
|
|
23
24
|
userId: ObjectId;
|
|
24
25
|
} & Required<{
|
|
25
26
|
_id: string;
|
|
@@ -27,7 +28,7 @@ declare const NotificationModel: mongoose.Model<SchemaNotificationType, {}, {},
|
|
|
27
28
|
__v: number;
|
|
28
29
|
}, any>;
|
|
29
30
|
|
|
30
|
-
type ObjectId =
|
|
31
|
+
type ObjectId = mongoose__default.Types.ObjectId;
|
|
31
32
|
declare enum EnumPubSubEvents {
|
|
32
33
|
GET_CHAT_MESSAGE = "GET_CHAT_MESSAGE",
|
|
33
34
|
GET_NOTIFICATIONS = "GET_NOTIFICATIONS",
|
|
@@ -82,7 +83,7 @@ type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
|
82
83
|
participants: SchemaParticipantType[];
|
|
83
84
|
messages: SchemaChatMessageType[];
|
|
84
85
|
};
|
|
85
|
-
declare const ChatModel:
|
|
86
|
+
declare const ChatModel: mongoose__default.Model<SchemaChatType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "participants" | "messages"> & {
|
|
86
87
|
participants: SchemaParticipantType[];
|
|
87
88
|
messages: SchemaChatMessageType[];
|
|
88
89
|
} & Required<{
|
|
@@ -96,7 +97,7 @@ type SchemaChatReportType = Omit<ReportChatUser, "reporterUserId" | "reportedUse
|
|
|
96
97
|
reportedUserId: ObjectId;
|
|
97
98
|
chatId: ObjectId;
|
|
98
99
|
};
|
|
99
|
-
declare const ChatReportModel:
|
|
100
|
+
declare const ChatReportModel: mongoose__default.Model<SchemaChatReportType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatReportType, {}, {}> & Omit<ReportChatUser, "reporterUserId" | "reportedUserId" | "chatId"> & {
|
|
100
101
|
reporterUserId: ObjectId;
|
|
101
102
|
reportedUserId: ObjectId;
|
|
102
103
|
chatId: ObjectId;
|
|
@@ -112,147 +113,147 @@ type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
|
|
|
112
113
|
type SchemaOwnerType = Omit<OwnerType, "userId"> & {
|
|
113
114
|
userId: ObjectId;
|
|
114
115
|
};
|
|
115
|
-
declare const OwnerTypeSchema:
|
|
116
|
+
declare const OwnerTypeSchema: mongoose__default.Schema<SchemaOwnerType, mongoose__default.Model<SchemaOwnerType, any, any, any, mongoose__default.Document<unknown, any, SchemaOwnerType, any, {}> & Omit<OwnerType, "userId"> & {
|
|
116
117
|
userId: ObjectId;
|
|
117
118
|
} & {
|
|
118
|
-
_id:
|
|
119
|
+
_id: mongoose__default.Types.ObjectId;
|
|
119
120
|
} & {
|
|
120
121
|
__v: number;
|
|
121
|
-
}, any>, {}, {}, {}, {},
|
|
122
|
-
_id:
|
|
122
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaOwnerType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaOwnerType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SchemaOwnerType> & {
|
|
123
|
+
_id: mongoose__default.Types.ObjectId;
|
|
123
124
|
} & {
|
|
124
125
|
__v: number;
|
|
125
126
|
}>;
|
|
126
|
-
declare const SocialMediaTypeSchema:
|
|
127
|
-
_id:
|
|
127
|
+
declare const SocialMediaTypeSchema: mongoose__default.Schema<SocialMediaType, mongoose__default.Model<SocialMediaType, any, any, any, mongoose__default.Document<unknown, any, SocialMediaType, any, {}> & SocialMediaType & {
|
|
128
|
+
_id: mongoose__default.Types.ObjectId;
|
|
128
129
|
} & {
|
|
129
130
|
__v: number;
|
|
130
|
-
}, any>, {}, {}, {}, {},
|
|
131
|
-
_id:
|
|
131
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SocialMediaType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SocialMediaType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SocialMediaType> & {
|
|
132
|
+
_id: mongoose__default.Types.ObjectId;
|
|
132
133
|
} & {
|
|
133
134
|
__v: number;
|
|
134
135
|
}>;
|
|
135
|
-
declare const ResourceImageTypeSchema:
|
|
136
|
-
_id:
|
|
136
|
+
declare const ResourceImageTypeSchema: mongoose__default.Schema<ResourceImageType, mongoose__default.Model<ResourceImageType, any, any, any, mongoose__default.Document<unknown, any, ResourceImageType, any, {}> & ResourceImageType & {
|
|
137
|
+
_id: mongoose__default.Types.ObjectId;
|
|
137
138
|
} & {
|
|
138
139
|
__v: number;
|
|
139
|
-
}, any>, {}, {}, {}, {},
|
|
140
|
-
_id:
|
|
140
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, ResourceImageType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<ResourceImageType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<ResourceImageType> & {
|
|
141
|
+
_id: mongoose__default.Types.ObjectId;
|
|
141
142
|
} & {
|
|
142
143
|
__v: number;
|
|
143
144
|
}>;
|
|
144
|
-
declare const CategorySchema:
|
|
145
|
-
_id:
|
|
145
|
+
declare const CategorySchema: mongoose__default.Schema<Category, mongoose__default.Model<Category, any, any, any, mongoose__default.Document<unknown, any, Category, any, {}> & Category & {
|
|
146
|
+
_id: mongoose__default.Types.ObjectId;
|
|
146
147
|
} & {
|
|
147
148
|
__v: number;
|
|
148
|
-
}, any>, {}, {}, {}, {},
|
|
149
|
-
_id:
|
|
149
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, Category, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<Category>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<Category> & {
|
|
150
|
+
_id: mongoose__default.Types.ObjectId;
|
|
150
151
|
} & {
|
|
151
152
|
__v: number;
|
|
152
153
|
}>;
|
|
153
|
-
declare const userLicenseSchema:
|
|
154
|
-
_id:
|
|
154
|
+
declare const userLicenseSchema: mongoose__default.Schema<UserLicenceType, mongoose__default.Model<UserLicenceType, any, any, any, mongoose__default.Document<unknown, any, UserLicenceType, any, {}> & UserLicenceType & {
|
|
155
|
+
_id: mongoose__default.Types.ObjectId;
|
|
155
156
|
} & {
|
|
156
157
|
__v: number;
|
|
157
|
-
}, any>, {}, {}, {}, {},
|
|
158
|
-
_id:
|
|
158
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, UserLicenceType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<UserLicenceType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<UserLicenceType> & {
|
|
159
|
+
_id: mongoose__default.Types.ObjectId;
|
|
159
160
|
} & {
|
|
160
161
|
__v: number;
|
|
161
162
|
}>;
|
|
162
|
-
declare const associatesSchema:
|
|
163
|
-
_id:
|
|
163
|
+
declare const associatesSchema: mongoose__default.Schema<AssociateType, mongoose__default.Model<AssociateType, any, any, any, mongoose__default.Document<unknown, any, AssociateType, any, {}> & AssociateType & {
|
|
164
|
+
_id: mongoose__default.Types.ObjectId;
|
|
164
165
|
} & {
|
|
165
166
|
__v: number;
|
|
166
|
-
}, any>, {}, {}, {}, {},
|
|
167
|
-
_id:
|
|
167
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, AssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<AssociateType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<AssociateType> & {
|
|
168
|
+
_id: mongoose__default.Types.ObjectId;
|
|
168
169
|
} & {
|
|
169
170
|
__v: number;
|
|
170
171
|
}>;
|
|
171
|
-
declare const ContactDetailsSchema:
|
|
172
|
-
_id:
|
|
172
|
+
declare const ContactDetailsSchema: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
|
|
173
|
+
_id: mongoose__default.Types.ObjectId;
|
|
173
174
|
} & {
|
|
174
175
|
__v: number;
|
|
175
|
-
}, any>, {}, {}, {}, {},
|
|
176
|
-
_id:
|
|
176
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, ResourceContactDetailsType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<ResourceContactDetailsType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<ResourceContactDetailsType> & {
|
|
177
|
+
_id: mongoose__default.Types.ObjectId;
|
|
177
178
|
} & {
|
|
178
179
|
__v: number;
|
|
179
180
|
}>;
|
|
180
|
-
declare const termsAgreementSchema:
|
|
181
|
+
declare const termsAgreementSchema: mongoose__default.Schema<TermsAgreement, mongoose__default.Model<TermsAgreement, any, any, any, mongoose__default.Document<unknown, any, TermsAgreement, any, {}> & _timardex_cluemart_shared.DeviceInfo & {
|
|
181
182
|
termVersion: string;
|
|
182
183
|
} & {
|
|
183
|
-
_id:
|
|
184
|
+
_id: mongoose__default.Types.ObjectId;
|
|
184
185
|
} & {
|
|
185
186
|
__v: number;
|
|
186
|
-
}, any>, {}, {}, {}, {},
|
|
187
|
-
_id:
|
|
187
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, TermsAgreement, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<TermsAgreement>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<TermsAgreement> & {
|
|
188
|
+
_id: mongoose__default.Types.ObjectId;
|
|
188
189
|
} & {
|
|
189
190
|
__v: number;
|
|
190
191
|
}>;
|
|
191
|
-
declare const resourceRelationsSchema:
|
|
192
|
+
declare const resourceRelationsSchema: mongoose__default.Schema<{
|
|
192
193
|
relationId: ObjectId;
|
|
193
194
|
relationDates: RelationDate[];
|
|
194
|
-
},
|
|
195
|
+
}, mongoose__default.Model<{
|
|
195
196
|
relationId: ObjectId;
|
|
196
197
|
relationDates: RelationDate[];
|
|
197
|
-
}, any, any, any,
|
|
198
|
+
}, any, any, any, mongoose__default.Document<unknown, any, {
|
|
198
199
|
relationId: ObjectId;
|
|
199
200
|
relationDates: RelationDate[];
|
|
200
201
|
}, any, {}> & {
|
|
201
202
|
relationId: ObjectId;
|
|
202
203
|
relationDates: RelationDate[];
|
|
203
204
|
} & {
|
|
204
|
-
_id:
|
|
205
|
+
_id: mongoose__default.Types.ObjectId;
|
|
205
206
|
} & {
|
|
206
207
|
__v: number;
|
|
207
|
-
}, any>, {}, {}, {}, {},
|
|
208
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, {
|
|
208
209
|
relationId: ObjectId;
|
|
209
210
|
relationDates: RelationDate[];
|
|
210
|
-
},
|
|
211
|
+
}, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<{
|
|
211
212
|
relationId: ObjectId;
|
|
212
213
|
relationDates: RelationDate[];
|
|
213
|
-
}>, {},
|
|
214
|
+
}>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<{
|
|
214
215
|
relationId: ObjectId;
|
|
215
216
|
relationDates: RelationDate[];
|
|
216
217
|
}> & {
|
|
217
|
-
_id:
|
|
218
|
+
_id: mongoose__default.Types.ObjectId;
|
|
218
219
|
} & {
|
|
219
220
|
__v: number;
|
|
220
221
|
}>;
|
|
221
|
-
declare const dateTimeSchema:
|
|
222
|
-
_id:
|
|
222
|
+
declare const dateTimeSchema: mongoose__default.Schema<DateTimeType, mongoose__default.Model<DateTimeType, any, any, any, mongoose__default.Document<unknown, any, DateTimeType, any, {}> & DateTimeType & {
|
|
223
|
+
_id: mongoose__default.Types.ObjectId;
|
|
223
224
|
} & {
|
|
224
225
|
__v: number;
|
|
225
|
-
}, any>, {}, {}, {}, {},
|
|
226
|
-
_id:
|
|
226
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, DateTimeType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<DateTimeType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<DateTimeType> & {
|
|
227
|
+
_id: mongoose__default.Types.ObjectId;
|
|
227
228
|
} & {
|
|
228
229
|
__v: number;
|
|
229
230
|
}>;
|
|
230
|
-
declare const locationGeoSchema:
|
|
231
|
-
_id:
|
|
231
|
+
declare const locationGeoSchema: mongoose__default.Schema<LocationGeoType, mongoose__default.Model<LocationGeoType, any, any, any, mongoose__default.Document<unknown, any, LocationGeoType, any, {}> & LocationGeoType & {
|
|
232
|
+
_id: mongoose__default.Types.ObjectId;
|
|
232
233
|
} & {
|
|
233
234
|
__v: number;
|
|
234
|
-
}, any>, {}, {}, {}, {},
|
|
235
|
-
_id:
|
|
235
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, LocationGeoType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<LocationGeoType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<LocationGeoType> & {
|
|
236
|
+
_id: mongoose__default.Types.ObjectId;
|
|
236
237
|
} & {
|
|
237
238
|
__v: number;
|
|
238
239
|
}>;
|
|
239
|
-
declare const locationsSchema:
|
|
240
|
-
_id:
|
|
240
|
+
declare const locationsSchema: mongoose__default.Schema<LocationType, mongoose__default.Model<LocationType, any, any, any, mongoose__default.Document<unknown, any, LocationType, any, {}> & LocationType & {
|
|
241
|
+
_id: mongoose__default.Types.ObjectId;
|
|
241
242
|
} & {
|
|
242
243
|
__v: number;
|
|
243
|
-
}, any>, {}, {}, {}, {},
|
|
244
|
-
_id:
|
|
244
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, LocationType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<LocationType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<LocationType> & {
|
|
245
|
+
_id: mongoose__default.Types.ObjectId;
|
|
245
246
|
} & {
|
|
246
247
|
__v: number;
|
|
247
248
|
}>;
|
|
248
|
-
declare const relatedPostSchema:
|
|
249
|
+
declare const relatedPostSchema: mongoose__default.Schema<SchemaRelatedPostType, mongoose__default.Model<SchemaRelatedPostType, any, any, any, mongoose__default.Document<unknown, any, SchemaRelatedPostType, any, {}> & Omit<RelatedPostType, "postId"> & {
|
|
249
250
|
postId: ObjectId;
|
|
250
251
|
} & {
|
|
251
|
-
_id:
|
|
252
|
+
_id: mongoose__default.Types.ObjectId;
|
|
252
253
|
} & {
|
|
253
254
|
__v: number;
|
|
254
|
-
}, any>, {}, {}, {}, {},
|
|
255
|
-
_id:
|
|
255
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaRelatedPostType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaRelatedPostType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SchemaRelatedPostType> & {
|
|
256
|
+
_id: mongoose__default.Types.ObjectId;
|
|
256
257
|
} & {
|
|
257
258
|
__v: number;
|
|
258
259
|
}>;
|
|
@@ -265,40 +266,40 @@ declare const baseResourceFields: {
|
|
|
265
266
|
adIds: {
|
|
266
267
|
ref: string;
|
|
267
268
|
required: boolean;
|
|
268
|
-
type: (typeof
|
|
269
|
+
type: (typeof mongoose__default.Schema.Types.ObjectId)[];
|
|
269
270
|
};
|
|
270
271
|
associates: {
|
|
271
272
|
required: boolean;
|
|
272
|
-
type:
|
|
273
|
-
_id:
|
|
273
|
+
type: mongoose__default.Schema<AssociateType, mongoose__default.Model<AssociateType, any, any, any, mongoose__default.Document<unknown, any, AssociateType, any, {}> & AssociateType & {
|
|
274
|
+
_id: mongoose__default.Types.ObjectId;
|
|
274
275
|
} & {
|
|
275
276
|
__v: number;
|
|
276
|
-
}, any>, {}, {}, {}, {},
|
|
277
|
-
_id:
|
|
277
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, AssociateType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<AssociateType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<AssociateType> & {
|
|
278
|
+
_id: mongoose__default.Types.ObjectId;
|
|
278
279
|
} & {
|
|
279
280
|
__v: number;
|
|
280
281
|
}>[];
|
|
281
282
|
};
|
|
282
283
|
contactDetails: {
|
|
283
284
|
required: boolean;
|
|
284
|
-
type:
|
|
285
|
-
_id:
|
|
285
|
+
type: mongoose__default.Schema<ResourceContactDetailsType, mongoose__default.Model<ResourceContactDetailsType, any, any, any, mongoose__default.Document<unknown, any, ResourceContactDetailsType, any, {}> & ResourceContactDetailsType & {
|
|
286
|
+
_id: mongoose__default.Types.ObjectId;
|
|
286
287
|
} & {
|
|
287
288
|
__v: number;
|
|
288
|
-
}, any>, {}, {}, {}, {},
|
|
289
|
-
_id:
|
|
289
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, ResourceContactDetailsType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<ResourceContactDetailsType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<ResourceContactDetailsType> & {
|
|
290
|
+
_id: mongoose__default.Types.ObjectId;
|
|
290
291
|
} & {
|
|
291
292
|
__v: number;
|
|
292
293
|
}>;
|
|
293
294
|
};
|
|
294
295
|
cover: {
|
|
295
296
|
required: boolean;
|
|
296
|
-
type:
|
|
297
|
-
_id:
|
|
297
|
+
type: mongoose__default.Schema<ResourceImageType, mongoose__default.Model<ResourceImageType, any, any, any, mongoose__default.Document<unknown, any, ResourceImageType, any, {}> & ResourceImageType & {
|
|
298
|
+
_id: mongoose__default.Types.ObjectId;
|
|
298
299
|
} & {
|
|
299
300
|
__v: number;
|
|
300
|
-
}, any>, {}, {}, {}, {},
|
|
301
|
-
_id:
|
|
301
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, ResourceImageType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<ResourceImageType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<ResourceImageType> & {
|
|
302
|
+
_id: mongoose__default.Types.ObjectId;
|
|
302
303
|
} & {
|
|
303
304
|
__v: number;
|
|
304
305
|
}>;
|
|
@@ -314,24 +315,24 @@ declare const baseResourceFields: {
|
|
|
314
315
|
};
|
|
315
316
|
images: {
|
|
316
317
|
required: boolean;
|
|
317
|
-
type:
|
|
318
|
-
_id:
|
|
318
|
+
type: mongoose__default.Schema<ResourceImageType, mongoose__default.Model<ResourceImageType, any, any, any, mongoose__default.Document<unknown, any, ResourceImageType, any, {}> & ResourceImageType & {
|
|
319
|
+
_id: mongoose__default.Types.ObjectId;
|
|
319
320
|
} & {
|
|
320
321
|
__v: number;
|
|
321
|
-
}, any>, {}, {}, {}, {},
|
|
322
|
-
_id:
|
|
322
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, ResourceImageType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<ResourceImageType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<ResourceImageType> & {
|
|
323
|
+
_id: mongoose__default.Types.ObjectId;
|
|
323
324
|
} & {
|
|
324
325
|
__v: number;
|
|
325
326
|
}>[];
|
|
326
327
|
};
|
|
327
328
|
logo: {
|
|
328
329
|
required: boolean;
|
|
329
|
-
type:
|
|
330
|
-
_id:
|
|
330
|
+
type: mongoose__default.Schema<ResourceImageType, mongoose__default.Model<ResourceImageType, any, any, any, mongoose__default.Document<unknown, any, ResourceImageType, any, {}> & ResourceImageType & {
|
|
331
|
+
_id: mongoose__default.Types.ObjectId;
|
|
331
332
|
} & {
|
|
332
333
|
__v: number;
|
|
333
|
-
}, any>, {}, {}, {}, {},
|
|
334
|
-
_id:
|
|
334
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, ResourceImageType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<ResourceImageType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<ResourceImageType> & {
|
|
335
|
+
_id: mongoose__default.Types.ObjectId;
|
|
335
336
|
} & {
|
|
336
337
|
__v: number;
|
|
337
338
|
}>;
|
|
@@ -342,26 +343,26 @@ declare const baseResourceFields: {
|
|
|
342
343
|
};
|
|
343
344
|
owner: {
|
|
344
345
|
required: boolean;
|
|
345
|
-
type:
|
|
346
|
+
type: mongoose__default.Schema<SchemaOwnerType, mongoose__default.Model<SchemaOwnerType, any, any, any, mongoose__default.Document<unknown, any, SchemaOwnerType, any, {}> & Omit<OwnerType, "userId"> & {
|
|
346
347
|
userId: ObjectId;
|
|
347
348
|
} & {
|
|
348
|
-
_id:
|
|
349
|
+
_id: mongoose__default.Types.ObjectId;
|
|
349
350
|
} & {
|
|
350
351
|
__v: number;
|
|
351
|
-
}, any>, {}, {}, {}, {},
|
|
352
|
-
_id:
|
|
352
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaOwnerType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaOwnerType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SchemaOwnerType> & {
|
|
353
|
+
_id: mongoose__default.Types.ObjectId;
|
|
353
354
|
} & {
|
|
354
355
|
__v: number;
|
|
355
356
|
}>;
|
|
356
357
|
};
|
|
357
358
|
posterUsage: {
|
|
358
359
|
required: boolean;
|
|
359
|
-
type:
|
|
360
|
-
_id:
|
|
360
|
+
type: mongoose__default.Schema<PosterUsageType, mongoose__default.Model<PosterUsageType, any, any, any, mongoose__default.Document<unknown, any, PosterUsageType, any, {}> & PosterUsageType & {
|
|
361
|
+
_id: mongoose__default.Types.ObjectId;
|
|
361
362
|
} & {
|
|
362
363
|
__v: number;
|
|
363
|
-
}, any>, {}, {}, {}, {},
|
|
364
|
-
_id:
|
|
364
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, PosterUsageType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<PosterUsageType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<PosterUsageType> & {
|
|
365
|
+
_id: mongoose__default.Types.ObjectId;
|
|
365
366
|
} & {
|
|
366
367
|
__v: number;
|
|
367
368
|
}>;
|
|
@@ -380,14 +381,14 @@ declare const baseResourceFields: {
|
|
|
380
381
|
};
|
|
381
382
|
relatedPost: {
|
|
382
383
|
required: boolean;
|
|
383
|
-
type:
|
|
384
|
+
type: mongoose__default.Schema<SchemaRelatedPostType, mongoose__default.Model<SchemaRelatedPostType, any, any, any, mongoose__default.Document<unknown, any, SchemaRelatedPostType, any, {}> & Omit<RelatedPostType, "postId"> & {
|
|
384
385
|
postId: ObjectId;
|
|
385
386
|
} & {
|
|
386
|
-
_id:
|
|
387
|
+
_id: mongoose__default.Types.ObjectId;
|
|
387
388
|
} & {
|
|
388
389
|
__v: number;
|
|
389
|
-
}, any>, {}, {}, {}, {},
|
|
390
|
-
_id:
|
|
390
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaRelatedPostType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaRelatedPostType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SchemaRelatedPostType> & {
|
|
391
|
+
_id: mongoose__default.Types.ObjectId;
|
|
391
392
|
} & {
|
|
392
393
|
__v: number;
|
|
393
394
|
}>;
|
|
@@ -402,48 +403,48 @@ declare const baseResourceFields: {
|
|
|
402
403
|
};
|
|
403
404
|
socialMedia: {
|
|
404
405
|
required: boolean;
|
|
405
|
-
type:
|
|
406
|
-
_id:
|
|
406
|
+
type: mongoose__default.Schema<SocialMediaType, mongoose__default.Model<SocialMediaType, any, any, any, mongoose__default.Document<unknown, any, SocialMediaType, any, {}> & SocialMediaType & {
|
|
407
|
+
_id: mongoose__default.Types.ObjectId;
|
|
407
408
|
} & {
|
|
408
409
|
__v: number;
|
|
409
|
-
}, any>, {}, {}, {}, {},
|
|
410
|
-
_id:
|
|
410
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SocialMediaType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SocialMediaType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SocialMediaType> & {
|
|
411
|
+
_id: mongoose__default.Types.ObjectId;
|
|
411
412
|
} & {
|
|
412
413
|
__v: number;
|
|
413
414
|
}>[];
|
|
414
415
|
};
|
|
415
416
|
termsAgreement: {
|
|
416
417
|
required: boolean;
|
|
417
|
-
type:
|
|
418
|
+
type: mongoose__default.Schema<TermsAgreement, mongoose__default.Model<TermsAgreement, any, any, any, mongoose__default.Document<unknown, any, TermsAgreement, any, {}> & _timardex_cluemart_shared.DeviceInfo & {
|
|
418
419
|
termVersion: string;
|
|
419
420
|
} & {
|
|
420
|
-
_id:
|
|
421
|
+
_id: mongoose__default.Types.ObjectId;
|
|
421
422
|
} & {
|
|
422
423
|
__v: number;
|
|
423
|
-
}, any>, {}, {}, {}, {},
|
|
424
|
-
_id:
|
|
424
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, TermsAgreement, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<TermsAgreement>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<TermsAgreement> & {
|
|
425
|
+
_id: mongoose__default.Types.ObjectId;
|
|
425
426
|
} & {
|
|
426
427
|
__v: number;
|
|
427
428
|
}>;
|
|
428
429
|
};
|
|
429
430
|
};
|
|
430
|
-
declare const socialShareResourceSchema:
|
|
431
|
-
_id:
|
|
431
|
+
declare const socialShareResourceSchema: mongoose__default.Schema<SocialShareResourceType, mongoose__default.Model<SocialShareResourceType, any, any, any, mongoose__default.Document<unknown, any, SocialShareResourceType, any, {}> & SocialShareResourceType & {
|
|
432
|
+
_id: mongoose__default.Types.ObjectId;
|
|
432
433
|
} & {
|
|
433
434
|
__v: number;
|
|
434
|
-
}, any>, {}, {}, {}, {},
|
|
435
|
-
_id:
|
|
435
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SocialShareResourceType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SocialShareResourceType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SocialShareResourceType> & {
|
|
436
|
+
_id: mongoose__default.Types.ObjectId;
|
|
436
437
|
} & {
|
|
437
438
|
__v: number;
|
|
438
439
|
}>;
|
|
439
440
|
|
|
440
441
|
type SchemaGoogleImportedMarket = Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
441
|
-
eventId?:
|
|
442
|
-
claimedByUserId?:
|
|
442
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
443
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
443
444
|
};
|
|
444
|
-
declare const GoogleImportedMarketModel:
|
|
445
|
-
eventId?:
|
|
446
|
-
claimedByUserId?:
|
|
445
|
+
declare const GoogleImportedMarketModel: mongoose__default.Model<SchemaGoogleImportedMarket, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaGoogleImportedMarket, {}, {}> & Omit<GoogleImportedMarket, "eventId" | "claimedByUserId"> & {
|
|
446
|
+
eventId?: mongoose__default.Types.ObjectId;
|
|
447
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
447
448
|
} & Required<{
|
|
448
449
|
_id: string;
|
|
449
450
|
}> & {
|
|
@@ -453,7 +454,7 @@ declare const GoogleImportedMarketModel: mongoose.Model<SchemaGoogleImportedMark
|
|
|
453
454
|
type SchemaPushTokenType = Omit<PushTokenType, "userId"> & {
|
|
454
455
|
userId: ObjectId;
|
|
455
456
|
};
|
|
456
|
-
declare const PushTokenModel:
|
|
457
|
+
declare const PushTokenModel: mongoose__default.Model<SchemaPushTokenType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaPushTokenType, {}, {}> & Omit<PushTokenType, "userId"> & {
|
|
457
458
|
userId: ObjectId;
|
|
458
459
|
} & Required<{
|
|
459
460
|
_id: string;
|
|
@@ -461,12 +462,12 @@ declare const PushTokenModel: mongoose.Model<SchemaPushTokenType, {}, {}, {}, mo
|
|
|
461
462
|
__v: number;
|
|
462
463
|
}, any>;
|
|
463
464
|
|
|
464
|
-
declare const relationDatesSchema:
|
|
465
|
-
_id:
|
|
465
|
+
declare const relationDatesSchema: mongoose__default.Schema<RelationDate, mongoose__default.Model<RelationDate, any, any, any, mongoose__default.Document<unknown, any, RelationDate, any, {}> & RelationDate & {
|
|
466
|
+
_id: mongoose__default.Types.ObjectId;
|
|
466
467
|
} & {
|
|
467
468
|
__v: number;
|
|
468
|
-
}, any>, {}, {}, {}, {},
|
|
469
|
-
_id:
|
|
469
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, RelationDate, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<RelationDate>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<RelationDate> & {
|
|
470
|
+
_id: mongoose__default.Types.ObjectId;
|
|
470
471
|
} & {
|
|
471
472
|
__v: number;
|
|
472
473
|
}>;
|
|
@@ -480,7 +481,7 @@ type SchemaRelationType = Omit<RelationType, "eventId" | "vendorId" | "chatId">
|
|
|
480
481
|
* It is used to define the structure of the relation type in the database.
|
|
481
482
|
* The schema is used by Mongoose to create a model for the relation type.
|
|
482
483
|
*/
|
|
483
|
-
declare const RelationTypeSchema:
|
|
484
|
+
declare const RelationTypeSchema: mongoose__default.Schema<SchemaRelationType, mongoose__default.Model<SchemaRelationType, any, any, any, mongoose__default.Document<unknown, any, SchemaRelationType, any, {}> & Omit<RelationType, "chatId" | "eventId" | "vendorId"> & {
|
|
484
485
|
eventId: ObjectId;
|
|
485
486
|
vendorId: ObjectId;
|
|
486
487
|
chatId: ObjectId;
|
|
@@ -488,12 +489,12 @@ declare const RelationTypeSchema: mongoose.Schema<SchemaRelationType, mongoose.M
|
|
|
488
489
|
_id: string;
|
|
489
490
|
}> & {
|
|
490
491
|
__v: number;
|
|
491
|
-
}, any>, {}, {}, {}, {},
|
|
492
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, SchemaRelationType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<SchemaRelationType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<SchemaRelationType> & Required<{
|
|
492
493
|
_id: string;
|
|
493
494
|
}> & {
|
|
494
495
|
__v: number;
|
|
495
496
|
}>;
|
|
496
|
-
declare const RelationModel:
|
|
497
|
+
declare const RelationModel: mongoose__default.Model<SchemaRelationType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaRelationType, {}, {}> & Omit<RelationType, "chatId" | "eventId" | "vendorId"> & {
|
|
497
498
|
eventId: ObjectId;
|
|
498
499
|
vendorId: ObjectId;
|
|
499
500
|
chatId: ObjectId;
|
|
@@ -503,7 +504,7 @@ declare const RelationModel: mongoose.Model<SchemaRelationType, {}, {}, {}, mong
|
|
|
503
504
|
__v: number;
|
|
504
505
|
}, any>;
|
|
505
506
|
|
|
506
|
-
declare const ResourceActivityModel:
|
|
507
|
+
declare const ResourceActivityModel: mongoose__default.Model<ResourceActivityType, {}, {}, {}, mongoose__default.Document<unknown, {}, ResourceActivityType, {}, {}> & ResourceActivityType & Required<{
|
|
507
508
|
_id: string;
|
|
508
509
|
}> & {
|
|
509
510
|
__v: number;
|
|
@@ -537,7 +538,7 @@ type SchemaUserType = Omit<UserType, "vendor" | "events" | "partner" | "userActi
|
|
|
537
538
|
};
|
|
538
539
|
};
|
|
539
540
|
};
|
|
540
|
-
declare const UserModel:
|
|
541
|
+
declare const UserModel: mongoose__default.Model<SchemaUserType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUserType, {}, {}> & Omit<UserType, "_id" | "vendor" | "events" | "partner" | "userActivity" | "game" | "school" | "affiliate"> & {
|
|
541
542
|
_id: ObjectId;
|
|
542
543
|
affiliate: ObjectId;
|
|
543
544
|
events: ObjectId[];
|
|
@@ -562,7 +563,7 @@ declare const UserModel: mongoose.Model<SchemaUserType, {}, {}, {}, mongoose.Doc
|
|
|
562
563
|
};
|
|
563
564
|
};
|
|
564
565
|
} & Required<{
|
|
565
|
-
_id:
|
|
566
|
+
_id: mongoose__default.Types.ObjectId;
|
|
566
567
|
}> & {
|
|
567
568
|
__v: number;
|
|
568
569
|
}, any>;
|
|
@@ -572,8 +573,8 @@ interface VerificationTokenType {
|
|
|
572
573
|
verificationToken: string;
|
|
573
574
|
createdAt: Date;
|
|
574
575
|
}
|
|
575
|
-
declare const VerificationTokenModel:
|
|
576
|
-
_id:
|
|
576
|
+
declare const VerificationTokenModel: mongoose__default.Model<VerificationTokenType, {}, {}, {}, mongoose__default.Document<unknown, {}, VerificationTokenType, {}, {}> & VerificationTokenType & {
|
|
577
|
+
_id: mongoose__default.Types.ObjectId;
|
|
577
578
|
} & {
|
|
578
579
|
__v: number;
|
|
579
580
|
}, any>;
|
|
@@ -584,7 +585,7 @@ type SchemaVendorType = Omit<VendorType, "vendorInfoId" | "owner" | "adIds" | "u
|
|
|
584
585
|
vendorInfoId: ObjectId;
|
|
585
586
|
unregisteredVendorId?: ObjectId | null;
|
|
586
587
|
};
|
|
587
|
-
declare const VendorModel:
|
|
588
|
+
declare const VendorModel: mongoose__default.Model<SchemaVendorType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaVendorType, {}, {}> & Omit<VendorType, "adIds" | "owner" | "vendorInfoId" | "unregisteredVendorId"> & {
|
|
588
589
|
adIds?: ObjectId[];
|
|
589
590
|
owner: SchemaOwnerType;
|
|
590
591
|
vendorInfoId: ObjectId;
|
|
@@ -598,7 +599,7 @@ declare const VendorModel: mongoose.Model<SchemaVendorType, {}, {}, {}, mongoose
|
|
|
598
599
|
type SchemaVendorInfoType = Omit<VendorInfoType, "vendorId"> & {
|
|
599
600
|
vendorId: ObjectId;
|
|
600
601
|
};
|
|
601
|
-
declare const VendorInfoModel:
|
|
602
|
+
declare const VendorInfoModel: mongoose__default.Model<SchemaVendorInfoType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaVendorInfoType, {}, {}> & Omit<VendorInfoType, "vendorId"> & {
|
|
602
603
|
vendorId: ObjectId;
|
|
603
604
|
} & Required<{
|
|
604
605
|
_id: string;
|
|
@@ -611,11 +612,11 @@ type SchemaUnregisteredVendorInvitationType = Omit<UnregisteredVendorInvitationT
|
|
|
611
612
|
};
|
|
612
613
|
type SchemaUnregisteredVendorType = Omit<UnregisteredVendorType, "invitations" | "claimedByUserId"> & {
|
|
613
614
|
invitations: SchemaUnregisteredVendorInvitationType[];
|
|
614
|
-
claimedByUserId?:
|
|
615
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
615
616
|
};
|
|
616
|
-
declare const UnregisteredVendorModel:
|
|
617
|
+
declare const UnregisteredVendorModel: mongoose__default.Model<SchemaUnregisteredVendorType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaUnregisteredVendorType, {}, {}> & Omit<UnregisteredVendorType, "claimedByUserId" | "invitations"> & {
|
|
617
618
|
invitations: SchemaUnregisteredVendorInvitationType[];
|
|
618
|
-
claimedByUserId?:
|
|
619
|
+
claimedByUserId?: mongoose__default.Types.ObjectId;
|
|
619
620
|
} & Required<{
|
|
620
621
|
_id: string;
|
|
621
622
|
}> & {
|
|
@@ -627,7 +628,7 @@ type SchemaEventType = Omit<EventType, "eventInfoId" | "owner" | "adIds"> & {
|
|
|
627
628
|
eventInfoId: ObjectId;
|
|
628
629
|
owner: SchemaOwnerType;
|
|
629
630
|
};
|
|
630
|
-
declare const EventModel:
|
|
631
|
+
declare const EventModel: mongoose__default.Model<SchemaEventType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventType, {}, {}> & Omit<EventType, "adIds" | "eventInfoId" | "owner"> & {
|
|
631
632
|
adIds?: ObjectId[];
|
|
632
633
|
eventInfoId: ObjectId;
|
|
633
634
|
owner: SchemaOwnerType;
|
|
@@ -637,28 +638,28 @@ declare const EventModel: mongoose.Model<SchemaEventType, {}, {}, {}, mongoose.D
|
|
|
637
638
|
__v: number;
|
|
638
639
|
}, any>;
|
|
639
640
|
|
|
640
|
-
declare const StallTypeSchema:
|
|
641
|
-
_id:
|
|
641
|
+
declare const StallTypeSchema: mongoose__default.Schema<StallType, mongoose__default.Model<StallType, any, any, any, mongoose__default.Document<unknown, any, StallType, any, {}> & StallType & {
|
|
642
|
+
_id: mongoose__default.Types.ObjectId;
|
|
642
643
|
} & {
|
|
643
644
|
__v: number;
|
|
644
|
-
}, any>, {}, {}, {}, {},
|
|
645
|
-
_id:
|
|
645
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, StallType, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<StallType>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<StallType> & {
|
|
646
|
+
_id: mongoose__default.Types.ObjectId;
|
|
646
647
|
} & {
|
|
647
648
|
__v: number;
|
|
648
649
|
}>;
|
|
649
|
-
declare const refundPolicySchema:
|
|
650
|
-
_id:
|
|
650
|
+
declare const refundPolicySchema: mongoose__default.Schema<RefundPolicy, mongoose__default.Model<RefundPolicy, any, any, any, mongoose__default.Document<unknown, any, RefundPolicy, any, {}> & RefundPolicy & {
|
|
651
|
+
_id: mongoose__default.Types.ObjectId;
|
|
651
652
|
} & {
|
|
652
653
|
__v: number;
|
|
653
|
-
}, any>, {}, {}, {}, {},
|
|
654
|
-
_id:
|
|
654
|
+
}, any>, {}, {}, {}, {}, mongoose__default.DefaultSchemaOptions, RefundPolicy, mongoose__default.Document<unknown, {}, mongoose__default.FlatRecord<RefundPolicy>, {}, mongoose__default.ResolveSchemaOptions<mongoose__default.DefaultSchemaOptions>> & mongoose__default.FlatRecord<RefundPolicy> & {
|
|
655
|
+
_id: mongoose__default.Types.ObjectId;
|
|
655
656
|
} & {
|
|
656
657
|
__v: number;
|
|
657
658
|
}>;
|
|
658
659
|
type SchemaEventInfoType = Omit<EventInfoType, "eventId"> & {
|
|
659
660
|
eventId: ObjectId;
|
|
660
661
|
};
|
|
661
|
-
declare const EventInfoModel:
|
|
662
|
+
declare const EventInfoModel: mongoose__default.Model<SchemaEventInfoType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaEventInfoType, {}, {}> & Omit<EventInfoType, "eventId"> & {
|
|
662
663
|
eventId: ObjectId;
|
|
663
664
|
} & Required<{
|
|
664
665
|
_id: string;
|
|
@@ -670,7 +671,7 @@ type SchemaPartnerType = Omit<PartnerType, "owner" | "adIds"> & {
|
|
|
670
671
|
adIds?: ObjectId[];
|
|
671
672
|
owner: SchemaOwnerType;
|
|
672
673
|
};
|
|
673
|
-
declare const PartnerModel:
|
|
674
|
+
declare const PartnerModel: mongoose__default.Model<SchemaPartnerType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaPartnerType, {}, {}> & Omit<PartnerType, "adIds" | "owner"> & {
|
|
674
675
|
adIds?: ObjectId[];
|
|
675
676
|
owner: SchemaOwnerType;
|
|
676
677
|
} & Required<{
|
|
@@ -680,7 +681,7 @@ declare const PartnerModel: mongoose.Model<SchemaPartnerType, {}, {}, {}, mongoo
|
|
|
680
681
|
}, any>;
|
|
681
682
|
|
|
682
683
|
type SchemaPostType = PostType;
|
|
683
|
-
declare const PostModel:
|
|
684
|
+
declare const PostModel: mongoose__default.Model<PostType, {}, {}, {}, mongoose__default.Document<unknown, {}, PostType, {}, {}> & Omit<_timardex_cluemart_shared.PostFormData, "resource" | "content" | "coverUpload"> & {
|
|
684
685
|
_id: string;
|
|
685
686
|
content: PostContentType[];
|
|
686
687
|
createdAt: Date;
|
|
@@ -696,7 +697,7 @@ declare const PostModel: mongoose.Model<PostType, {}, {}, {}, mongoose.Document<
|
|
|
696
697
|
}, any>;
|
|
697
698
|
|
|
698
699
|
declare const APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
699
|
-
declare const AppSettingModel:
|
|
700
|
+
declare const AppSettingModel: mongoose__default.Model<AppSettingsType, {}, {}, {}, mongoose__default.Document<unknown, {}, AppSettingsType, {}, {}> & _timardex_cluemart_shared.AppSettingsFormData & {
|
|
700
701
|
_id: string;
|
|
701
702
|
activeSchoolsStudentCountTotal: number;
|
|
702
703
|
activeSchoolsStudentCountUpdatedAt: Date;
|
|
@@ -712,14 +713,14 @@ declare const AppSettingModel: mongoose.Model<AppSettingsType, {}, {}, {}, mongo
|
|
|
712
713
|
type SchemaGameType = Omit<GameType, "_id"> & {
|
|
713
714
|
_id: ObjectId;
|
|
714
715
|
};
|
|
715
|
-
declare const GameModel:
|
|
716
|
+
declare const GameModel: mongoose__default.Model<GameDocType, {}, {}, {}, mongoose__default.Document<unknown, {}, GameDocType, {}, {}> & GameDocType & Required<{
|
|
716
717
|
_id: string;
|
|
717
718
|
}> & {
|
|
718
719
|
__v: number;
|
|
719
720
|
}, any>;
|
|
720
721
|
|
|
721
722
|
type SchoolDocument = Omit<SchoolType, "ranking">;
|
|
722
|
-
declare const SchoolModel:
|
|
723
|
+
declare const SchoolModel: mongoose__default.Model<SchoolDocument, {}, {}, {}, mongoose__default.Document<unknown, {}, SchoolDocument, {}, {}> & SchoolDocument & Required<{
|
|
723
724
|
_id: string;
|
|
724
725
|
}> & {
|
|
725
726
|
__v: number;
|
|
@@ -733,15 +734,130 @@ type AffiliateDocument = Omit<AffiliateType, "_id" | "owner" | "affiliateResourc
|
|
|
733
734
|
affiliateResources: SchemaAffiliateResourceType[];
|
|
734
735
|
owner: SchemaOwnerType;
|
|
735
736
|
};
|
|
736
|
-
declare const AffiliateModel:
|
|
737
|
+
declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {}, {}, mongoose__default.Document<unknown, {}, AffiliateDocument, {}, {}> & Omit<AffiliateType, "_id" | "owner" | "affiliateResources"> & {
|
|
737
738
|
affiliateResources: SchemaAffiliateResourceType[];
|
|
738
739
|
owner: SchemaOwnerType;
|
|
739
740
|
} & {
|
|
740
|
-
_id:
|
|
741
|
+
_id: mongoose__default.Types.ObjectId;
|
|
741
742
|
} & {
|
|
742
743
|
__v: number;
|
|
743
744
|
}, any>;
|
|
744
745
|
|
|
746
|
+
/**
|
|
747
|
+
* Checks whether an affiliate code is already taken by an active, non-deleted affiliate.
|
|
748
|
+
*
|
|
749
|
+
* Used when generating new affiliate codes so collisions are avoided before insert.
|
|
750
|
+
* Matches the partial unique index on `affiliateCode` for active documents.
|
|
751
|
+
*
|
|
752
|
+
* @param affiliateCode - Candidate affiliate promo code to check.
|
|
753
|
+
* @returns `true` when an active, non-deleted affiliate already uses this code.
|
|
754
|
+
*/
|
|
755
|
+
declare function activeAffiliateCodeExists(affiliateCode: string): Promise<boolean>;
|
|
756
|
+
|
|
757
|
+
type AwardAffiliateVendorSubscriptionRewardsResult = {
|
|
758
|
+
awarded: number;
|
|
759
|
+
skipped: number;
|
|
760
|
+
};
|
|
761
|
+
/**
|
|
762
|
+
* Awards monthly vendor subscription rewards to affiliates with active referred vendors.
|
|
763
|
+
*
|
|
764
|
+
* Eligibility per affiliate resource:
|
|
765
|
+
* - Affiliate is not soft-deleted
|
|
766
|
+
* - Linked `affiliateResources` entry is vendor, `resourceActive`, and not deleted
|
|
767
|
+
* - Vendor is active, not deleted, and `promoCodes` includes the affiliate code
|
|
768
|
+
* - Vendor owner has a non-expired Standard / Pro / Pro+ vendor licence
|
|
769
|
+
*
|
|
770
|
+
* Reward type follows the owner's highest valid licence:
|
|
771
|
+
* - Pro / Pro+ → `ACTIVE_VENDOR_PRO_SUBSCRIPTION` (3 pts)
|
|
772
|
+
* - Standard → `ACTIVE_VENDOR_STANDARD_SUBSCRIPTION` (1 pt)
|
|
773
|
+
*
|
|
774
|
+
* Idempotent per affiliate + vendor + reward type + calendar month.
|
|
775
|
+
* On successful award, notifies the affiliate owner (best-effort).
|
|
776
|
+
*
|
|
777
|
+
* @param now - Reference time for month bounds and licence expiry (defaults to now).
|
|
778
|
+
* @returns Counts of awarded and skipped candidates.
|
|
779
|
+
*/
|
|
780
|
+
declare function awardAffiliateVendorSubscriptionRewards(now?: Date): Promise<AwardAffiliateVendorSubscriptionRewardsResult>;
|
|
781
|
+
|
|
782
|
+
declare const AFFILIATE_REWARDS: {
|
|
783
|
+
NEW_EVENT_REGISTRATION: {
|
|
784
|
+
description: string;
|
|
785
|
+
value: number;
|
|
786
|
+
};
|
|
787
|
+
NEW_VENDOR_REGISTRATION: {
|
|
788
|
+
description: string;
|
|
789
|
+
value: number;
|
|
790
|
+
};
|
|
791
|
+
ACTIVE_VENDOR_PRO_SUBSCRIPTION: {
|
|
792
|
+
description: string;
|
|
793
|
+
value: number;
|
|
794
|
+
};
|
|
795
|
+
ACTIVE_VENDOR_STANDARD_SUBSCRIPTION: {
|
|
796
|
+
description: string;
|
|
797
|
+
value: number;
|
|
798
|
+
};
|
|
799
|
+
ACTIVE_VENDOR_BONUS_REWARD: {
|
|
800
|
+
description: string;
|
|
801
|
+
value: number;
|
|
802
|
+
};
|
|
803
|
+
ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS: {
|
|
804
|
+
description: string;
|
|
805
|
+
value: number;
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
/**
|
|
809
|
+
* Create an affiliate reward
|
|
810
|
+
* @param rewardType - The type of reward
|
|
811
|
+
* @param createdAt - The date the reward was received
|
|
812
|
+
* @returns The affiliate reward
|
|
813
|
+
* @example
|
|
814
|
+
* const reward = createAffiliateReward(EnumAffiliateRewardType.NEW_EVENT_REGISTRATION, new Date());
|
|
815
|
+
* console.log(reward);
|
|
816
|
+
*/
|
|
817
|
+
declare function createAffiliateReward(rewardType: EnumAffiliateRewardType, createdAt: Date): AffiliateRewardType;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Loads the affiliate whose `affiliateCode` matches the given promo code.
|
|
821
|
+
*
|
|
822
|
+
* Includes inactive affiliates (`active: false`) so resource referrals work before
|
|
823
|
+
* admin approval. Soft-deleted affiliates (`deletedAt` set) are excluded.
|
|
824
|
+
*
|
|
825
|
+
* @param promoCode - Normalized affiliate promo code to resolve.
|
|
826
|
+
* @returns The matching affiliate document, or `null` when not found.
|
|
827
|
+
*/
|
|
828
|
+
declare function findAffiliateByPromoCode(promoCode: PromoCodeType): Promise<(mongoose.Document<unknown, {}, Omit<_timardex_cluemart_shared.AffiliateType, "_id" | "owner" | "affiliateResources"> & {
|
|
829
|
+
affiliateResources: SchemaAffiliateResourceType[];
|
|
830
|
+
owner: SchemaOwnerType;
|
|
831
|
+
}, {}, {}> & Omit<_timardex_cluemart_shared.AffiliateType, "_id" | "owner" | "affiliateResources"> & {
|
|
832
|
+
affiliateResources: SchemaAffiliateResourceType[];
|
|
833
|
+
owner: SchemaOwnerType;
|
|
834
|
+
} & {
|
|
835
|
+
_id: mongoose.Types.ObjectId;
|
|
836
|
+
} & {
|
|
837
|
+
__v: number;
|
|
838
|
+
}) | null>;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Normalizes, trims, uppercases, and deduplicates resource promo codes.
|
|
842
|
+
*
|
|
843
|
+
* @param promoCodes - Raw promo codes from a create-resource mutation input.
|
|
844
|
+
* @returns Unique normalized codes; empty strings and whitespace-only values are removed.
|
|
845
|
+
*/
|
|
846
|
+
declare function normalizeAffiliatePromoCodes(promoCodes: PromoCodeType[] | null | undefined): PromoCodeType[];
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Maps a vendor owner's highest valid vendor licence to a monthly subscription reward.
|
|
850
|
+
*
|
|
851
|
+
* Prefer Pro / Pro+ over Standard when both are valid.
|
|
852
|
+
* Returns `null` when no non-expired vendor licence applies.
|
|
853
|
+
*/
|
|
854
|
+
declare function mapVendorLicenceToSubscriptionRewardType(licences: UserLicenceType[] | null | undefined, now?: Date): EnumAffiliateRewardType | null;
|
|
855
|
+
/** Inclusive start / exclusive end of the UTC calendar month containing `now`. */
|
|
856
|
+
declare function getSubscriptionRewardPeriodBounds(now?: Date): {
|
|
857
|
+
periodEnd: Date;
|
|
858
|
+
periodStart: Date;
|
|
859
|
+
};
|
|
860
|
+
|
|
745
861
|
/**
|
|
746
862
|
* Connect to MongoDB using Mongoose.
|
|
747
863
|
* Supports both local MongoDB (via MONGODB_URI) and MongoDB Atlas (via individual env vars).
|
|
@@ -754,6 +870,14 @@ declare const connectToDatabase: ({ appName, dbName, dbPassword, dbUser, mongodb
|
|
|
754
870
|
mongodbUri: string;
|
|
755
871
|
}) => Promise<void>;
|
|
756
872
|
|
|
873
|
+
/** Matches partial unique indexes for promo/affiliate codes on active documents. */
|
|
874
|
+
declare const ACTIVE_NOT_DELETED_FILTER: {
|
|
875
|
+
readonly active: true;
|
|
876
|
+
readonly deletedAt: null;
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
declare function normalizePromoCode(decoratedPromoCode: string | null | undefined): string | null;
|
|
880
|
+
|
|
757
881
|
/**
|
|
758
882
|
* Create notifications in the database for multiple users
|
|
759
883
|
* This is typically called when sending push notifications
|
|
@@ -809,4 +933,4 @@ declare function didRemoveAnyEventDates(previousDateTime: EventDateSlot[] | unde
|
|
|
809
933
|
*/
|
|
810
934
|
declare function updateRelationDatesToUnavailable(relationDates: SchemaRelationType["relationDates"], eventDateTime: DateTimeWithPriceType[] | undefined): SchemaRelationType["relationDates"];
|
|
811
935
|
|
|
812
|
-
export { APP_SETTINGS_ID, AdModel, AffiliateModel, AppSettingModel, type AuthUser, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, EnumPubSubEvents, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, NotificationModel, 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, associatesSchema, baseResourceFields, connectToDatabase, convertObjectIdsToStrings, dateTimeSchema, didRemoveAnyEventDates, findEventOrImportedMarketById, locationGeoSchema, locationsSchema, refundPolicySchema, relatedPostSchema, relationDatesSchema, resourceRelationsSchema, saveNotificationsInDb, sendPushNotifications, socialShareResourceSchema, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, updateVendorBasedOnUserLicense, userLicenseSchema };
|
|
936
|
+
export { ACTIVE_NOT_DELETED_FILTER, AFFILIATE_REWARDS, APP_SETTINGS_ID, AdModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, EnumPubSubEvents, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, NotificationModel, 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, associatesSchema, awardAffiliateVendorSubscriptionRewards, baseResourceFields, connectToDatabase, convertObjectIdsToStrings, createAffiliateReward, dateTimeSchema, didRemoveAnyEventDates, findAffiliateByPromoCode, findEventOrImportedMarketById, getSubscriptionRewardPeriodBounds, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, refundPolicySchema, relatedPostSchema, relationDatesSchema, resourceRelationsSchema, saveNotificationsInDb, sendPushNotifications, socialShareResourceSchema, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, updateVendorBasedOnUserLicense, userLicenseSchema };
|