@timardex/cluemart-shared 1.2.34 → 1.2.36
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/{ad-CiYcsJB7.d.mts → ad-Bv5fLkN0.d.mts} +1 -1
- package/dist/{ad-BZylIpez.d.ts → ad-DDPNpx02.d.ts} +1 -1
- package/dist/{auth-DDtMJHZw.d.mts → auth-BVGs-5Vm.d.mts} +1 -1
- package/dist/{auth-CmaB99NK.d.ts → auth-BhUIvvZ2.d.ts} +1 -1
- package/dist/formFields/index.d.mts +1 -3
- package/dist/formFields/index.d.ts +1 -3
- package/dist/{global-DVYSZ6LR.d.ts → global-BA84KF8J.d.ts} +2 -148
- package/dist/{global-ExJZRDGR.d.mts → global-BEqzo5Z2.d.mts} +2 -148
- package/dist/graphql/index.d.mts +3 -5
- package/dist/graphql/index.d.ts +3 -5
- package/dist/hooks/index.d.mts +3 -5
- package/dist/hooks/index.d.ts +3 -5
- package/dist/hooks/index.mjs +5 -5
- package/dist/index.cjs +17 -1124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +311 -821
- package/dist/index.d.ts +311 -821
- package/dist/index.mjs +17 -1096
- package/dist/index.mjs.map +1 -1
- package/dist/resourceActivities-0CdofGJp.d.mts +96 -0
- package/dist/resourceActivities-BjgH9TFc.d.ts +96 -0
- package/dist/types/index.cjs +2 -26
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +4 -6
- package/dist/types/index.d.ts +4 -6
- package/dist/types/index.mjs +11 -8
- package/dist/types/index.mjs.map +1 -1
- package/dist/utils/index.d.mts +1 -3
- package/dist/utils/index.d.ts +1 -3
- package/package.json +1 -1
- package/dist/chunk-4OLDTZXH.mjs +0 -26
- package/dist/chunk-4OLDTZXH.mjs.map +0 -1
- package/dist/chunk-NPHPFWQH.mjs +0 -63
- package/dist/chunk-NPHPFWQH.mjs.map +0 -1
- package/dist/mongoose/index.cjs +0 -1085
- package/dist/mongoose/index.cjs.map +0 -1
- package/dist/mongoose/index.d.mts +0 -415
- package/dist/mongoose/index.d.ts +0 -415
- package/dist/mongoose/index.mjs +0 -862
- package/dist/mongoose/index.mjs.map +0 -1
- package/dist/resourceActivities-B4roVKtQ.d.ts +0 -34
- package/dist/resourceActivities-BIjtlOGp.d.mts +0 -34
- package/dist/service/index.cjs +0 -308
- package/dist/service/index.cjs.map +0 -1
- package/dist/service/index.d.mts +0 -27
- package/dist/service/index.d.ts +0 -27
- package/dist/service/index.mjs +0 -190
- package/dist/service/index.mjs.map +0 -1
package/dist/mongoose/index.cjs
DELETED
|
@@ -1,1085 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/mongoose/index.ts
|
|
31
|
-
var mongoose_exports = {};
|
|
32
|
-
__export(mongoose_exports, {
|
|
33
|
-
AdModel: () => AdModel,
|
|
34
|
-
CategorySchema: () => CategorySchema,
|
|
35
|
-
ChatModel: () => ChatModel,
|
|
36
|
-
EventInfoModel: () => EventInfoModel,
|
|
37
|
-
EventModel: () => EventModel,
|
|
38
|
-
NotificationModel: () => NotificationModel,
|
|
39
|
-
ParticipantSchema: () => ParticipantSchema,
|
|
40
|
-
PushTokenModel: () => PushTokenModel,
|
|
41
|
-
RelationModel: () => RelationModel,
|
|
42
|
-
RelationTypeSchema: () => RelationTypeSchema,
|
|
43
|
-
ResourceActivityModel: () => ResourceActivityModel,
|
|
44
|
-
ResourceImageTypeSchema: () => ResourceImageTypeSchema,
|
|
45
|
-
SocialMediaTypeSchema: () => SocialMediaTypeSchema,
|
|
46
|
-
StallTypeSchema: () => StallTypeSchema,
|
|
47
|
-
TesterModel: () => TesterModel,
|
|
48
|
-
UserModel: () => UserModel,
|
|
49
|
-
VendorInfoModel: () => VendorInfoModel,
|
|
50
|
-
VendorModel: () => VendorModel,
|
|
51
|
-
VerificationTokenModel: () => VerificationTokenModel,
|
|
52
|
-
baseResourceFields: () => baseResourceFields,
|
|
53
|
-
partnersSchema: () => partnersSchema,
|
|
54
|
-
relationDatesSchema: () => relationDatesSchema,
|
|
55
|
-
termsAgreementSchema: () => termsAgreementSchema
|
|
56
|
-
});
|
|
57
|
-
module.exports = __toCommonJS(mongoose_exports);
|
|
58
|
-
|
|
59
|
-
// src/mongoose/Ad.ts
|
|
60
|
-
var import_mongoose5 = __toESM(require("mongoose"));
|
|
61
|
-
|
|
62
|
-
// src/enums/index.ts
|
|
63
|
-
var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus2) => {
|
|
64
|
-
EnumInviteStatus2["ACCEPTED"] = "Accepted";
|
|
65
|
-
EnumInviteStatus2["COMPLETED"] = "Completed";
|
|
66
|
-
EnumInviteStatus2["EXPIRED"] = "Expired";
|
|
67
|
-
EnumInviteStatus2["NO_STATUS"] = "No_Status";
|
|
68
|
-
EnumInviteStatus2["PAID"] = "Paid";
|
|
69
|
-
EnumInviteStatus2["PENDING"] = "Pending";
|
|
70
|
-
EnumInviteStatus2["REJECTED"] = "Rejected";
|
|
71
|
-
EnumInviteStatus2["UNAVAILABLE"] = "Unavailable";
|
|
72
|
-
EnumInviteStatus2["WAITING"] = "Waiting";
|
|
73
|
-
return EnumInviteStatus2;
|
|
74
|
-
})(EnumInviteStatus || {});
|
|
75
|
-
var EnumChatType = /* @__PURE__ */ ((EnumChatType2) => {
|
|
76
|
-
EnumChatType2["GROUP"] = "group";
|
|
77
|
-
EnumChatType2["PRIVATE"] = "private";
|
|
78
|
-
EnumChatType2["RELATION"] = "relation";
|
|
79
|
-
return EnumChatType2;
|
|
80
|
-
})(EnumChatType || {});
|
|
81
|
-
var EnumPaymentMethod = /* @__PURE__ */ ((EnumPaymentMethod2) => {
|
|
82
|
-
EnumPaymentMethod2["CASH"] = "cash";
|
|
83
|
-
EnumPaymentMethod2["EFTPOS"] = "eftpos";
|
|
84
|
-
EnumPaymentMethod2["BANK_TRANSFER"] = "bank_transfer";
|
|
85
|
-
EnumPaymentMethod2["PAYPAL"] = "paypal";
|
|
86
|
-
EnumPaymentMethod2["STRIPE"] = "stripe";
|
|
87
|
-
return EnumPaymentMethod2;
|
|
88
|
-
})(EnumPaymentMethod || {});
|
|
89
|
-
var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor2) => {
|
|
90
|
-
EnumFoodFlavor2["SALTY"] = "Salty";
|
|
91
|
-
EnumFoodFlavor2["SAVOURY"] = "Savoury";
|
|
92
|
-
EnumFoodFlavor2["SPICY"] = "Spicy";
|
|
93
|
-
EnumFoodFlavor2["SWEET"] = "Sweet";
|
|
94
|
-
return EnumFoodFlavor2;
|
|
95
|
-
})(EnumFoodFlavor || {});
|
|
96
|
-
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
97
|
-
EnumResourceType2["EVENT"] = "event";
|
|
98
|
-
EnumResourceType2["VENDOR"] = "vendor";
|
|
99
|
-
return EnumResourceType2;
|
|
100
|
-
})(EnumResourceType || {});
|
|
101
|
-
var EnumEventType = /* @__PURE__ */ ((EnumEventType2) => {
|
|
102
|
-
EnumEventType2["EXPO"] = "Expo";
|
|
103
|
-
EnumEventType2["FAIR"] = "Fair";
|
|
104
|
-
EnumEventType2["FESTIVAL"] = "Festival";
|
|
105
|
-
EnumEventType2["MARKET"] = "Market";
|
|
106
|
-
return EnumEventType2;
|
|
107
|
-
})(EnumEventType || {});
|
|
108
|
-
var EnumVendorType = /* @__PURE__ */ ((EnumVendorType2) => {
|
|
109
|
-
EnumVendorType2["STALLHOLDER"] = "Stallholder";
|
|
110
|
-
EnumVendorType2["SHOP"] = "Shop";
|
|
111
|
-
EnumVendorType2["CHARITY"] = "Charity";
|
|
112
|
-
return EnumVendorType2;
|
|
113
|
-
})(EnumVendorType || {});
|
|
114
|
-
var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform2) => {
|
|
115
|
-
EnumOSPlatform2["ANDROID"] = "android";
|
|
116
|
-
EnumOSPlatform2["IOS"] = "ios";
|
|
117
|
-
EnumOSPlatform2["WEB"] = "web";
|
|
118
|
-
return EnumOSPlatform2;
|
|
119
|
-
})(EnumOSPlatform || {});
|
|
120
|
-
var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource2) => {
|
|
121
|
-
EnumRelationResource2["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
|
|
122
|
-
EnumRelationResource2["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
|
|
123
|
-
return EnumRelationResource2;
|
|
124
|
-
})(EnumRelationResource || {});
|
|
125
|
-
var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType2) => {
|
|
126
|
-
EnumNotificationResourceType2["ADDED_AS_PARTNER_EVENT"] = "added_as_partner_event";
|
|
127
|
-
EnumNotificationResourceType2["ADDED_AS_PARTNER_VENDOR"] = "added_as_partner_vendor";
|
|
128
|
-
EnumNotificationResourceType2["APPROVED_EVENT"] = "approved_event";
|
|
129
|
-
EnumNotificationResourceType2["APPROVED_VENDOR"] = "approved_vendor";
|
|
130
|
-
EnumNotificationResourceType2["CREATED_EVENT"] = "created_event";
|
|
131
|
-
EnumNotificationResourceType2["CREATED_VENDOR"] = "created_vendor";
|
|
132
|
-
EnumNotificationResourceType2["EVENT_INVITE_VENDOR"] = "event_invite_vendor" /* EVENT_INVITE_VENDOR */;
|
|
133
|
-
EnumNotificationResourceType2["EVENT_STARTING_SOON"] = "event_starting_soon";
|
|
134
|
-
EnumNotificationResourceType2["NEW_CHAT_MESSAGE"] = "new_chat_message";
|
|
135
|
-
EnumNotificationResourceType2["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event" /* VENDOR_APPLICATION_TO_EVENT */;
|
|
136
|
-
return EnumNotificationResourceType2;
|
|
137
|
-
})(EnumNotificationResourceType || {});
|
|
138
|
-
var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType2) => {
|
|
139
|
-
EnumNotificationType2["EVENT"] = "event" /* EVENT */;
|
|
140
|
-
EnumNotificationType2["VENDOR"] = "vendor" /* VENDOR */;
|
|
141
|
-
EnumNotificationType2["RELATION"] = "relation";
|
|
142
|
-
EnumNotificationType2["CHAT"] = "chat";
|
|
143
|
-
EnumNotificationType2["SYSTEM"] = "system";
|
|
144
|
-
return EnumNotificationType2;
|
|
145
|
-
})(EnumNotificationType || {});
|
|
146
|
-
var EnumUserLicence = /* @__PURE__ */ ((EnumUserLicence2) => {
|
|
147
|
-
EnumUserLicence2["PRO_EVENT"] = "pro_event";
|
|
148
|
-
EnumUserLicence2["PRO_PLUS_EVENT"] = "pro_plus_event";
|
|
149
|
-
EnumUserLicence2["PRO_PLUS_VENDOR"] = "pro_plus_vendor";
|
|
150
|
-
EnumUserLicence2["PRO_VENDOR"] = "pro_vendor";
|
|
151
|
-
EnumUserLicence2["STANDARD_EVENT"] = "standard_event";
|
|
152
|
-
EnumUserLicence2["STANDARD_VENDOR"] = "standard_vendor";
|
|
153
|
-
return EnumUserLicence2;
|
|
154
|
-
})(EnumUserLicence || {});
|
|
155
|
-
var EnumUserRole = /* @__PURE__ */ ((EnumUserRole2) => {
|
|
156
|
-
EnumUserRole2["ADMIN"] = "admin";
|
|
157
|
-
EnumUserRole2["CUSTOMER"] = "customer";
|
|
158
|
-
EnumUserRole2["MARKETING"] = "marketing";
|
|
159
|
-
EnumUserRole2["MODERATOR"] = "moderator";
|
|
160
|
-
EnumUserRole2["SUPPORT"] = "support";
|
|
161
|
-
return EnumUserRole2;
|
|
162
|
-
})(EnumUserRole || {});
|
|
163
|
-
|
|
164
|
-
// src/types/global.ts
|
|
165
|
-
var import_mongoose = __toESM(require("mongoose"));
|
|
166
|
-
|
|
167
|
-
// src/types/ad.ts
|
|
168
|
-
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
|
|
169
|
-
EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
|
|
170
|
-
EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
|
|
171
|
-
EnumAdShowOn2["VENDORS_PAGE"] = "Vendors_page";
|
|
172
|
-
return EnumAdShowOn2;
|
|
173
|
-
})(EnumAdShowOn || {});
|
|
174
|
-
var EnumAdStatus = /* @__PURE__ */ ((EnumAdStatus2) => {
|
|
175
|
-
EnumAdStatus2["ACTIVE"] = "Active";
|
|
176
|
-
EnumAdStatus2["PAUSED"] = "Paused";
|
|
177
|
-
EnumAdStatus2["EXPIRED"] = "Expired";
|
|
178
|
-
return EnumAdStatus2;
|
|
179
|
-
})(EnumAdStatus || {});
|
|
180
|
-
var EnumAdType = /* @__PURE__ */ ((EnumAdType2) => {
|
|
181
|
-
EnumAdType2["SPONSORED"] = "Sponsored";
|
|
182
|
-
EnumAdType2["FREE"] = "Free";
|
|
183
|
-
return EnumAdType2;
|
|
184
|
-
})(EnumAdType || {});
|
|
185
|
-
var EnumAdStyle = /* @__PURE__ */ ((EnumAdStyle2) => {
|
|
186
|
-
EnumAdStyle2["BLOOM"] = "Bloom";
|
|
187
|
-
EnumAdStyle2["RISE"] = "Rise";
|
|
188
|
-
return EnumAdStyle2;
|
|
189
|
-
})(EnumAdStyle || {});
|
|
190
|
-
|
|
191
|
-
// src/types/resourceActivities.ts
|
|
192
|
-
var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
193
|
-
EnumActivity2["FAVORITE"] = "FAVORITE";
|
|
194
|
-
EnumActivity2["GOING"] = "GOING";
|
|
195
|
-
EnumActivity2["INTERESTED"] = "INTERESTED";
|
|
196
|
-
EnumActivity2["PRESENT"] = "PRESENT";
|
|
197
|
-
EnumActivity2["VIEW"] = "VIEW";
|
|
198
|
-
return EnumActivity2;
|
|
199
|
-
})(EnumActivity || {});
|
|
200
|
-
|
|
201
|
-
// src/mongoose/global.ts
|
|
202
|
-
var import_mongoose4 = __toESM(require("mongoose"));
|
|
203
|
-
|
|
204
|
-
// src/mongoose/Relation.ts
|
|
205
|
-
var import_mongoose3 = __toESM(require("mongoose"));
|
|
206
|
-
|
|
207
|
-
// src/mongoose/event/EventInfo.ts
|
|
208
|
-
var import_mongoose2 = __toESM(require("mongoose"));
|
|
209
|
-
var MongooseSchema = import_mongoose2.default.Schema;
|
|
210
|
-
var StallTypeSchema = new MongooseSchema(
|
|
211
|
-
{
|
|
212
|
-
electricity: {
|
|
213
|
-
price: { required: false, type: Number },
|
|
214
|
-
selected: { required: false, type: Boolean }
|
|
215
|
-
},
|
|
216
|
-
label: { required: false, type: String },
|
|
217
|
-
price: { required: false, type: Number },
|
|
218
|
-
stallCapacity: { required: false, type: Number }
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
_id: false
|
|
222
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
223
|
-
}
|
|
224
|
-
);
|
|
225
|
-
var dateTimeSchema = new MongooseSchema(
|
|
226
|
-
{
|
|
227
|
-
endDate: { required: true, type: String },
|
|
228
|
-
endTime: { required: true, type: String },
|
|
229
|
-
stallTypes: [StallTypeSchema],
|
|
230
|
-
startDate: { required: true, type: String },
|
|
231
|
-
startTime: { required: true, type: String }
|
|
232
|
-
},
|
|
233
|
-
{ _id: false }
|
|
234
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
235
|
-
);
|
|
236
|
-
var paymentInfoSchema = new MongooseSchema(
|
|
237
|
-
{
|
|
238
|
-
accountHolderName: { required: false, type: String },
|
|
239
|
-
accountNumber: { required: false, type: String },
|
|
240
|
-
link: { required: false, type: String },
|
|
241
|
-
paymentMethod: {
|
|
242
|
-
enum: Object.values(EnumPaymentMethod),
|
|
243
|
-
required: true,
|
|
244
|
-
type: String
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
{ _id: false }
|
|
248
|
-
// Prevents Mongoose from creating an additional _id field
|
|
249
|
-
);
|
|
250
|
-
var requirementsSchema = new MongooseSchema(
|
|
251
|
-
{
|
|
252
|
-
category: { required: true, type: String },
|
|
253
|
-
label: { required: true, type: String },
|
|
254
|
-
value: { required: true, type: Boolean }
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
_id: false
|
|
258
|
-
// Prevents Mongoose from creating an additional _id field for
|
|
259
|
-
}
|
|
260
|
-
);
|
|
261
|
-
var schema = new MongooseSchema(
|
|
262
|
-
{
|
|
263
|
-
applicationDeadlineHours: { required: true, type: Number },
|
|
264
|
-
dateTime: [dateTimeSchema],
|
|
265
|
-
eventId: {
|
|
266
|
-
ref: "Event",
|
|
267
|
-
required: false,
|
|
268
|
-
type: import_mongoose2.default.Schema.Types.ObjectId
|
|
269
|
-
},
|
|
270
|
-
packInTime: { required: true, type: Number },
|
|
271
|
-
paymentDueHours: { required: true, type: Number },
|
|
272
|
-
paymentInfo: [paymentInfoSchema],
|
|
273
|
-
requirements: [requirementsSchema]
|
|
274
|
-
},
|
|
275
|
-
{ timestamps: true }
|
|
276
|
-
);
|
|
277
|
-
var EventInfoModel = import_mongoose2.default.models.EventInfo || import_mongoose2.default.model("EventInfo", schema);
|
|
278
|
-
|
|
279
|
-
// src/mongoose/Relation.ts
|
|
280
|
-
var MongooseSchema2 = import_mongoose3.default.Schema;
|
|
281
|
-
var relationDatesSchema = new MongooseSchema2(
|
|
282
|
-
{
|
|
283
|
-
lastUpdateBy: {
|
|
284
|
-
resourceId: { required: false, type: String },
|
|
285
|
-
userEmail: { required: false, type: String }
|
|
286
|
-
},
|
|
287
|
-
paymentReference: { required: false, type: String },
|
|
288
|
-
stallType: StallTypeSchema,
|
|
289
|
-
startDate: { required: false, type: String },
|
|
290
|
-
startTime: { required: false, type: String },
|
|
291
|
-
status: {
|
|
292
|
-
enum: Object.values(EnumInviteStatus),
|
|
293
|
-
required: false,
|
|
294
|
-
type: String
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
{ _id: false }
|
|
298
|
-
);
|
|
299
|
-
var RelationTypeSchema = new MongooseSchema2(
|
|
300
|
-
{
|
|
301
|
-
active: { default: true, required: true, type: Boolean },
|
|
302
|
-
chatId: {
|
|
303
|
-
ref: "Chat",
|
|
304
|
-
required: true,
|
|
305
|
-
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
306
|
-
},
|
|
307
|
-
deletedAt: { default: null, required: false, type: Date },
|
|
308
|
-
eventId: {
|
|
309
|
-
ref: "Event",
|
|
310
|
-
required: true,
|
|
311
|
-
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
312
|
-
},
|
|
313
|
-
lastUpdateBy: {
|
|
314
|
-
enum: Object.values(EnumResourceType),
|
|
315
|
-
required: true,
|
|
316
|
-
type: String
|
|
317
|
-
},
|
|
318
|
-
relationDates: [relationDatesSchema],
|
|
319
|
-
relationType: {
|
|
320
|
-
enum: Object.values(EnumRelationResource),
|
|
321
|
-
required: true,
|
|
322
|
-
type: String
|
|
323
|
-
},
|
|
324
|
-
vendorId: {
|
|
325
|
-
ref: "Vendor",
|
|
326
|
-
required: true,
|
|
327
|
-
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
{ timestamps: true }
|
|
331
|
-
);
|
|
332
|
-
RelationTypeSchema.index({
|
|
333
|
-
"relationDates.startDate": 1,
|
|
334
|
-
"relationDates.startTime": 1,
|
|
335
|
-
"relationDates.status": 1
|
|
336
|
-
});
|
|
337
|
-
var RelationModel = import_mongoose3.default.models.Relation || import_mongoose3.default.model("Relation", RelationTypeSchema);
|
|
338
|
-
|
|
339
|
-
// src/mongoose/global.ts
|
|
340
|
-
var MongooseSchema3 = import_mongoose4.default.Schema;
|
|
341
|
-
var OwnerTypeSchema = new MongooseSchema3(
|
|
342
|
-
{
|
|
343
|
-
email: { required: true, type: String },
|
|
344
|
-
userId: {
|
|
345
|
-
ref: "User",
|
|
346
|
-
required: true,
|
|
347
|
-
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
{ _id: false }
|
|
351
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
352
|
-
);
|
|
353
|
-
var SocialMediaTypeSchema = new MongooseSchema3(
|
|
354
|
-
{
|
|
355
|
-
link: { required: true, type: String },
|
|
356
|
-
name: { required: true, type: String }
|
|
357
|
-
},
|
|
358
|
-
{ _id: false }
|
|
359
|
-
// Prevents Mongoose from creating an additional _id field
|
|
360
|
-
);
|
|
361
|
-
var ResourceImageTypeSchema = new MongooseSchema3(
|
|
362
|
-
{
|
|
363
|
-
source: { required: false, type: String },
|
|
364
|
-
title: { required: false, type: String }
|
|
365
|
-
},
|
|
366
|
-
{ _id: false }
|
|
367
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
368
|
-
);
|
|
369
|
-
var SubCategorySchema = new MongooseSchema3(
|
|
370
|
-
{
|
|
371
|
-
id: { required: false, type: String },
|
|
372
|
-
items: [
|
|
373
|
-
{
|
|
374
|
-
id: { required: false, type: String },
|
|
375
|
-
name: { required: false, type: String }
|
|
376
|
-
}
|
|
377
|
-
],
|
|
378
|
-
name: { required: false, type: String }
|
|
379
|
-
},
|
|
380
|
-
{ _id: false }
|
|
381
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
382
|
-
);
|
|
383
|
-
var CategorySchema = new MongooseSchema3(
|
|
384
|
-
{
|
|
385
|
-
id: { required: true, type: String },
|
|
386
|
-
name: { required: true, type: String },
|
|
387
|
-
subcategories: [SubCategorySchema]
|
|
388
|
-
},
|
|
389
|
-
{ _id: false }
|
|
390
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
391
|
-
);
|
|
392
|
-
var PosterUsageTypeSchema = new MongooseSchema3(
|
|
393
|
-
{
|
|
394
|
-
count: { default: 0, required: false, type: Number },
|
|
395
|
-
month: { required: false, type: String }
|
|
396
|
-
},
|
|
397
|
-
{ _id: false }
|
|
398
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
399
|
-
);
|
|
400
|
-
var partnersSchema = new MongooseSchema3(
|
|
401
|
-
{
|
|
402
|
-
email: { required: false, type: String },
|
|
403
|
-
licence: {
|
|
404
|
-
enum: Object.values(EnumUserLicence),
|
|
405
|
-
required: false,
|
|
406
|
-
type: String
|
|
407
|
-
},
|
|
408
|
-
resourceId: {
|
|
409
|
-
required: false,
|
|
410
|
-
type: String
|
|
411
|
-
},
|
|
412
|
-
resourceType: {
|
|
413
|
-
enum: Object.values(EnumResourceType),
|
|
414
|
-
required: false,
|
|
415
|
-
type: String
|
|
416
|
-
}
|
|
417
|
-
},
|
|
418
|
-
{ _id: false }
|
|
419
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
420
|
-
);
|
|
421
|
-
var ContactDetailsSchema = new MongooseSchema3(
|
|
422
|
-
{
|
|
423
|
-
email: { required: false, type: String },
|
|
424
|
-
landlinePhone: { required: false, type: String },
|
|
425
|
-
mobilePhone: { required: false, type: String }
|
|
426
|
-
},
|
|
427
|
-
{ _id: false }
|
|
428
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
429
|
-
);
|
|
430
|
-
var termsAgreementSchema = new MongooseSchema3(
|
|
431
|
-
{
|
|
432
|
-
appBuildNumber: { required: true, type: String },
|
|
433
|
-
appId: { required: true, type: String },
|
|
434
|
-
appVersion: { required: true, type: String },
|
|
435
|
-
brand: { required: true, type: String },
|
|
436
|
-
deviceName: { required: true, type: String },
|
|
437
|
-
installationId: { required: true, type: String },
|
|
438
|
-
manufacturer: { required: true, type: String },
|
|
439
|
-
modelName: { required: true, type: String },
|
|
440
|
-
osName: { required: true, type: String },
|
|
441
|
-
osVersion: { required: true, type: String },
|
|
442
|
-
termVersion: { required: true, type: String },
|
|
443
|
-
timestamp: { required: true, type: String }
|
|
444
|
-
},
|
|
445
|
-
{ _id: false }
|
|
446
|
-
);
|
|
447
|
-
var resourceRelationsSchema = new MongooseSchema3(
|
|
448
|
-
{
|
|
449
|
-
relationDates: {
|
|
450
|
-
default: [],
|
|
451
|
-
required: false,
|
|
452
|
-
type: [relationDatesSchema]
|
|
453
|
-
},
|
|
454
|
-
relationId: {
|
|
455
|
-
ref: "Relation",
|
|
456
|
-
required: false,
|
|
457
|
-
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
{ _id: false }
|
|
461
|
-
);
|
|
462
|
-
var baseResourceFields = {
|
|
463
|
-
active: { default: false, required: true, type: Boolean },
|
|
464
|
-
adIds: {
|
|
465
|
-
ref: "Ad",
|
|
466
|
-
required: false,
|
|
467
|
-
type: [import_mongoose4.default.Schema.Types.ObjectId]
|
|
468
|
-
},
|
|
469
|
-
contactDetails: ContactDetailsSchema,
|
|
470
|
-
cover: ResourceImageTypeSchema,
|
|
471
|
-
deletedAt: { default: null, required: false, type: Date },
|
|
472
|
-
description: { required: true, type: String },
|
|
473
|
-
images: [ResourceImageTypeSchema],
|
|
474
|
-
logo: ResourceImageTypeSchema,
|
|
475
|
-
name: { required: true, type: String },
|
|
476
|
-
owner: OwnerTypeSchema,
|
|
477
|
-
partners: {
|
|
478
|
-
required: false,
|
|
479
|
-
type: [partnersSchema]
|
|
480
|
-
},
|
|
481
|
-
posterUsage: PosterUsageTypeSchema,
|
|
482
|
-
promoCodes: { required: false, type: [String] },
|
|
483
|
-
region: { required: true, type: String },
|
|
484
|
-
relations: {
|
|
485
|
-
default: [],
|
|
486
|
-
required: false,
|
|
487
|
-
type: [resourceRelationsSchema]
|
|
488
|
-
},
|
|
489
|
-
socialMedia: [SocialMediaTypeSchema],
|
|
490
|
-
termsAgreement: termsAgreementSchema
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
// src/mongoose/Ad.ts
|
|
494
|
-
var MongooseSchema4 = import_mongoose5.default.Schema;
|
|
495
|
-
var schema2 = new MongooseSchema4(
|
|
496
|
-
{
|
|
497
|
-
active: { default: true, type: Boolean },
|
|
498
|
-
adStyle: {
|
|
499
|
-
default: "Bloom" /* BLOOM */,
|
|
500
|
-
enum: Object.values(EnumAdStyle),
|
|
501
|
-
required: true,
|
|
502
|
-
type: String
|
|
503
|
-
},
|
|
504
|
-
adType: {
|
|
505
|
-
default: "Sponsored" /* SPONSORED */,
|
|
506
|
-
enum: Object.values(EnumAdType),
|
|
507
|
-
required: true,
|
|
508
|
-
type: String
|
|
509
|
-
},
|
|
510
|
-
// TODO: similar to ViewSchema
|
|
511
|
-
clicks: { default: 0, required: true, type: Number },
|
|
512
|
-
clui: { required: false, type: String },
|
|
513
|
-
end: { required: true, type: Date },
|
|
514
|
-
// TODO: similar to ViewSchema
|
|
515
|
-
impressions: { default: 0, required: true, type: Number },
|
|
516
|
-
resourceCover: { required: true, type: String },
|
|
517
|
-
resourceDescription: { required: true, type: String },
|
|
518
|
-
resourceId: { required: true, type: String },
|
|
519
|
-
resourceLogo: { required: false, type: String },
|
|
520
|
-
resourceName: { required: true, type: String },
|
|
521
|
-
resourceRegion: { required: true, type: String },
|
|
522
|
-
resourceType: {
|
|
523
|
-
enum: Object.values(EnumResourceType),
|
|
524
|
-
required: true,
|
|
525
|
-
type: String
|
|
526
|
-
},
|
|
527
|
-
showOn: {
|
|
528
|
-
default: "Front_page" /* FRONT_PAGE */,
|
|
529
|
-
enum: Object.values(EnumAdShowOn),
|
|
530
|
-
required: true,
|
|
531
|
-
type: String
|
|
532
|
-
},
|
|
533
|
-
socialMedia: [SocialMediaTypeSchema],
|
|
534
|
-
start: { required: true, type: Date },
|
|
535
|
-
status: {
|
|
536
|
-
default: "Active" /* ACTIVE */,
|
|
537
|
-
enum: Object.values(EnumAdStatus),
|
|
538
|
-
required: true,
|
|
539
|
-
type: String
|
|
540
|
-
},
|
|
541
|
-
targetRegion: { required: false, type: String }
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
timestamps: true
|
|
545
|
-
}
|
|
546
|
-
);
|
|
547
|
-
schema2.index({
|
|
548
|
-
end: 1,
|
|
549
|
-
start: 1,
|
|
550
|
-
status: 1
|
|
551
|
-
});
|
|
552
|
-
var AdModel = import_mongoose5.default.models.Ad || import_mongoose5.default.model("Ad", schema2);
|
|
553
|
-
|
|
554
|
-
// src/mongoose/Chat.ts
|
|
555
|
-
var import_mongoose6 = __toESM(require("mongoose"));
|
|
556
|
-
var MongooseSchema5 = import_mongoose6.default.Schema;
|
|
557
|
-
var MessageSchema = new MongooseSchema5(
|
|
558
|
-
{
|
|
559
|
-
content: { required: true, type: String },
|
|
560
|
-
senderAvatar: { required: false, type: String },
|
|
561
|
-
senderId: {
|
|
562
|
-
ref: "User",
|
|
563
|
-
required: true,
|
|
564
|
-
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
565
|
-
},
|
|
566
|
-
senderName: { required: true, type: String }
|
|
567
|
-
},
|
|
568
|
-
{ timestamps: true }
|
|
569
|
-
);
|
|
570
|
-
var ParticipantSchema = new MongooseSchema5(
|
|
571
|
-
{
|
|
572
|
-
active: { default: true, required: true, type: Boolean },
|
|
573
|
-
email: { required: true, type: String },
|
|
574
|
-
userId: {
|
|
575
|
-
ref: "User",
|
|
576
|
-
required: true,
|
|
577
|
-
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
578
|
-
}
|
|
579
|
-
},
|
|
580
|
-
{ _id: false }
|
|
581
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
582
|
-
);
|
|
583
|
-
var ChatSchema = new MongooseSchema5(
|
|
584
|
-
{
|
|
585
|
-
active: { default: true, required: true, type: Boolean },
|
|
586
|
-
chatName: { required: true, type: String },
|
|
587
|
-
chatType: {
|
|
588
|
-
enum: Object.values(EnumChatType),
|
|
589
|
-
required: true,
|
|
590
|
-
type: String
|
|
591
|
-
},
|
|
592
|
-
deletedAt: { default: null, required: false, type: Date },
|
|
593
|
-
messages: [MessageSchema],
|
|
594
|
-
participants: [ParticipantSchema],
|
|
595
|
-
resourceInfo: {
|
|
596
|
-
eventId: {
|
|
597
|
-
ref: "Event",
|
|
598
|
-
required: false,
|
|
599
|
-
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
600
|
-
},
|
|
601
|
-
vendorId: {
|
|
602
|
-
ref: "Vendor",
|
|
603
|
-
required: false,
|
|
604
|
-
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
timestamps: true
|
|
610
|
-
}
|
|
611
|
-
);
|
|
612
|
-
var ChatModel = import_mongoose6.default.models.Chat || import_mongoose6.default.model("Chat", ChatSchema);
|
|
613
|
-
|
|
614
|
-
// src/mongoose/Notification.ts
|
|
615
|
-
var import_mongoose7 = __toESM(require("mongoose"));
|
|
616
|
-
var MongooseSchema6 = import_mongoose7.default.Schema;
|
|
617
|
-
var schema3 = new MongooseSchema6(
|
|
618
|
-
{
|
|
619
|
-
data: {
|
|
620
|
-
resourceId: { required: true, type: String },
|
|
621
|
-
resourceName: { required: true, type: String },
|
|
622
|
-
resourceType: {
|
|
623
|
-
enum: Object.values(EnumNotificationResourceType),
|
|
624
|
-
required: true,
|
|
625
|
-
type: String
|
|
626
|
-
}
|
|
627
|
-
},
|
|
628
|
-
isRead: { default: false, index: true, required: true, type: Boolean },
|
|
629
|
-
message: { required: true, type: String },
|
|
630
|
-
title: { required: true, type: String },
|
|
631
|
-
type: {
|
|
632
|
-
default: "system" /* SYSTEM */,
|
|
633
|
-
enum: Object.values(EnumNotificationType),
|
|
634
|
-
required: true,
|
|
635
|
-
type: String
|
|
636
|
-
},
|
|
637
|
-
userId: {
|
|
638
|
-
ref: "User",
|
|
639
|
-
required: true,
|
|
640
|
-
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
{ timestamps: true }
|
|
644
|
-
);
|
|
645
|
-
schema3.index({ isRead: 1, userId: 1 });
|
|
646
|
-
schema3.index({ createdAt: -1, userId: 1 });
|
|
647
|
-
var NotificationModel = import_mongoose7.default.models.Notification || import_mongoose7.default.model("Notification", schema3);
|
|
648
|
-
|
|
649
|
-
// src/mongoose/PushToken.ts
|
|
650
|
-
var import_mongoose8 = __toESM(require("mongoose"));
|
|
651
|
-
var MongooseSchema7 = import_mongoose8.default.Schema;
|
|
652
|
-
var schema4 = new MongooseSchema7(
|
|
653
|
-
{
|
|
654
|
-
platform: {
|
|
655
|
-
enum: Object.values(EnumOSPlatform),
|
|
656
|
-
required: true,
|
|
657
|
-
type: String
|
|
658
|
-
},
|
|
659
|
-
token: { required: true, type: String },
|
|
660
|
-
userId: { required: true, type: import_mongoose8.default.Schema.Types.ObjectId }
|
|
661
|
-
},
|
|
662
|
-
{ timestamps: true }
|
|
663
|
-
);
|
|
664
|
-
var PushTokenModel = import_mongoose8.default.models.PushToken || import_mongoose8.default.model("PushToken", schema4);
|
|
665
|
-
|
|
666
|
-
// src/mongoose/ResourceActivity.ts
|
|
667
|
-
var import_mongoose9 = __toESM(require("mongoose"));
|
|
668
|
-
var MongooseSchema8 = import_mongoose9.default.Schema;
|
|
669
|
-
var ActivitySchema = new MongooseSchema8(
|
|
670
|
-
{
|
|
671
|
-
activityType: {
|
|
672
|
-
enum: Object.values(EnumActivity),
|
|
673
|
-
required: true,
|
|
674
|
-
type: String
|
|
675
|
-
},
|
|
676
|
-
location: {
|
|
677
|
-
coordinates: {
|
|
678
|
-
required: false,
|
|
679
|
-
type: [Number]
|
|
680
|
-
},
|
|
681
|
-
type: {
|
|
682
|
-
default: "Point",
|
|
683
|
-
enum: ["Point"],
|
|
684
|
-
required: false,
|
|
685
|
-
type: String
|
|
686
|
-
}
|
|
687
|
-
},
|
|
688
|
-
startDate: { required: false, type: String },
|
|
689
|
-
startTime: { required: false, type: String },
|
|
690
|
-
timestamp: { default: Date.now, type: Date },
|
|
691
|
-
userAgent: {
|
|
692
|
-
enum: Object.values(EnumOSPlatform),
|
|
693
|
-
required: true,
|
|
694
|
-
type: String
|
|
695
|
-
},
|
|
696
|
-
userId: { required: false, type: String }
|
|
697
|
-
},
|
|
698
|
-
{ _id: false }
|
|
699
|
-
);
|
|
700
|
-
var schema5 = new MongooseSchema8(
|
|
701
|
-
{
|
|
702
|
-
activity: { default: [], type: [ActivitySchema] },
|
|
703
|
-
resourceId: { required: true, type: String },
|
|
704
|
-
resourceType: {
|
|
705
|
-
enum: Object.values(EnumResourceType),
|
|
706
|
-
required: true,
|
|
707
|
-
type: String
|
|
708
|
-
}
|
|
709
|
-
},
|
|
710
|
-
{ timestamps: true }
|
|
711
|
-
);
|
|
712
|
-
schema5.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
713
|
-
schema5.index({ "views.location": "2dsphere" });
|
|
714
|
-
var ResourceActivityModel = import_mongoose9.default.models.ResourceActivity || import_mongoose9.default.model("ResourceActivity", schema5);
|
|
715
|
-
|
|
716
|
-
// src/mongoose/Testers.ts
|
|
717
|
-
var import_mongoose10 = __toESM(require("mongoose"));
|
|
718
|
-
var MongooseSchema9 = import_mongoose10.default.Schema;
|
|
719
|
-
var TesterSchema = new MongooseSchema9(
|
|
720
|
-
{
|
|
721
|
-
active: { default: false, required: true, type: Boolean },
|
|
722
|
-
categories: [CategorySchema],
|
|
723
|
-
companyName: { required: true, type: String },
|
|
724
|
-
email: { required: true, type: String },
|
|
725
|
-
firstName: { required: true, type: String },
|
|
726
|
-
lastName: { required: true, type: String },
|
|
727
|
-
osType: {
|
|
728
|
-
enum: Object.values(EnumOSPlatform),
|
|
729
|
-
required: true,
|
|
730
|
-
type: String
|
|
731
|
-
},
|
|
732
|
-
region: { required: true, type: String },
|
|
733
|
-
resourceType: {
|
|
734
|
-
enum: Object.values(EnumResourceType),
|
|
735
|
-
required: true,
|
|
736
|
-
type: String
|
|
737
|
-
}
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
timestamps: true
|
|
741
|
-
}
|
|
742
|
-
);
|
|
743
|
-
var TesterModel = import_mongoose10.default.models.Tester || import_mongoose10.default.model("Tester", TesterSchema);
|
|
744
|
-
|
|
745
|
-
// src/mongoose/User.ts
|
|
746
|
-
var import_mongoose11 = __toESM(require("mongoose"));
|
|
747
|
-
var MongooseSchema10 = import_mongoose11.default.Schema;
|
|
748
|
-
var userActivityEventSchema = new MongooseSchema10(
|
|
749
|
-
{
|
|
750
|
-
resourceId: {
|
|
751
|
-
ref: "Event",
|
|
752
|
-
required: false,
|
|
753
|
-
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
754
|
-
},
|
|
755
|
-
startDate: { required: false, type: String },
|
|
756
|
-
startTime: { required: false, type: String }
|
|
757
|
-
},
|
|
758
|
-
{ _id: false }
|
|
759
|
-
);
|
|
760
|
-
var userActivityFavouritesSchema = new MongooseSchema10(
|
|
761
|
-
{
|
|
762
|
-
events: {
|
|
763
|
-
ref: "Event",
|
|
764
|
-
required: false,
|
|
765
|
-
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
766
|
-
},
|
|
767
|
-
vendors: {
|
|
768
|
-
ref: "Vendor",
|
|
769
|
-
required: false,
|
|
770
|
-
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
{ _id: false }
|
|
774
|
-
);
|
|
775
|
-
var schema6 = new MongooseSchema10(
|
|
776
|
-
{
|
|
777
|
-
active: { default: false, required: true, type: Boolean },
|
|
778
|
-
avatar: ResourceImageTypeSchema,
|
|
779
|
-
deletedAt: { default: null, required: false, type: Date },
|
|
780
|
-
email: { required: true, type: String },
|
|
781
|
-
events: {
|
|
782
|
-
ref: "Event",
|
|
783
|
-
required: false,
|
|
784
|
-
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
785
|
-
},
|
|
786
|
-
firstName: { required: true, type: String },
|
|
787
|
-
isTester: { default: false, required: false, type: Boolean },
|
|
788
|
-
lastName: { required: true, type: String },
|
|
789
|
-
licences: {
|
|
790
|
-
enum: Object.values(EnumUserLicence),
|
|
791
|
-
required: false,
|
|
792
|
-
type: [String]
|
|
793
|
-
},
|
|
794
|
-
partners: {
|
|
795
|
-
required: false,
|
|
796
|
-
type: [partnersSchema]
|
|
797
|
-
},
|
|
798
|
-
password: { required: true, type: String },
|
|
799
|
-
platform: {
|
|
800
|
-
enum: Object.values(EnumOSPlatform),
|
|
801
|
-
required: false,
|
|
802
|
-
type: String
|
|
803
|
-
},
|
|
804
|
-
preferredRegion: {
|
|
805
|
-
required: true,
|
|
806
|
-
type: String
|
|
807
|
-
},
|
|
808
|
-
refreshToken: {
|
|
809
|
-
required: false,
|
|
810
|
-
type: String
|
|
811
|
-
},
|
|
812
|
-
role: {
|
|
813
|
-
default: "customer" /* CUSTOMER */,
|
|
814
|
-
enum: Object.values(EnumUserRole),
|
|
815
|
-
required: true,
|
|
816
|
-
type: String
|
|
817
|
-
},
|
|
818
|
-
termsAgreement: termsAgreementSchema,
|
|
819
|
-
userActivity: {
|
|
820
|
-
favourites: {
|
|
821
|
-
default: () => ({ events: [], vendors: [] }),
|
|
822
|
-
type: userActivityFavouritesSchema
|
|
823
|
-
},
|
|
824
|
-
going: {
|
|
825
|
-
events: [userActivityEventSchema]
|
|
826
|
-
},
|
|
827
|
-
interested: {
|
|
828
|
-
events: [userActivityEventSchema]
|
|
829
|
-
},
|
|
830
|
-
present: {
|
|
831
|
-
events: [userActivityEventSchema]
|
|
832
|
-
}
|
|
833
|
-
},
|
|
834
|
-
vendor: {
|
|
835
|
-
ref: "Vendor",
|
|
836
|
-
required: false,
|
|
837
|
-
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
838
|
-
}
|
|
839
|
-
},
|
|
840
|
-
{ timestamps: true }
|
|
841
|
-
);
|
|
842
|
-
schema6.index({ "partners.email": 1 });
|
|
843
|
-
var UserModel = import_mongoose11.default.models.User || import_mongoose11.default.model("User", schema6);
|
|
844
|
-
|
|
845
|
-
// src/mongoose/VerificationToken.ts
|
|
846
|
-
var import_mongoose12 = __toESM(require("mongoose"));
|
|
847
|
-
var MongooseSchema11 = import_mongoose12.default.Schema;
|
|
848
|
-
var schema7 = new MongooseSchema11(
|
|
849
|
-
{
|
|
850
|
-
createdAt: {
|
|
851
|
-
default: Date.now,
|
|
852
|
-
expires: 24 * 60 * 60,
|
|
853
|
-
// 24 hours in seconds (MongoDB TTL expects seconds)
|
|
854
|
-
required: true,
|
|
855
|
-
type: Date
|
|
856
|
-
},
|
|
857
|
-
// Token expires after 1 day
|
|
858
|
-
email: { required: true, type: String },
|
|
859
|
-
verificationToken: { required: true, type: String }
|
|
860
|
-
},
|
|
861
|
-
{ timestamps: true }
|
|
862
|
-
);
|
|
863
|
-
var VerificationTokenModel = import_mongoose12.default.models.VerificationToken || import_mongoose12.default.model("VerificationToken", schema7);
|
|
864
|
-
|
|
865
|
-
// src/mongoose/vendor/Vendor.ts
|
|
866
|
-
var import_mongoose13 = __toESM(require("mongoose"));
|
|
867
|
-
var MongooseSchema12 = import_mongoose13.default.Schema;
|
|
868
|
-
var MenuTypeSchema = new MongooseSchema12(
|
|
869
|
-
{
|
|
870
|
-
description: { required: false, type: String },
|
|
871
|
-
name: { required: false, type: String },
|
|
872
|
-
price: { required: false, type: Number },
|
|
873
|
-
productGroups: { required: false, type: [String] }
|
|
874
|
-
},
|
|
875
|
-
{ _id: false }
|
|
876
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
877
|
-
);
|
|
878
|
-
var LocationsSchema = new MongooseSchema12(
|
|
879
|
-
{
|
|
880
|
-
dateTime: {
|
|
881
|
-
endDate: { required: false, type: String },
|
|
882
|
-
endTime: { required: false, type: String },
|
|
883
|
-
startDate: { required: false, type: String },
|
|
884
|
-
startTime: { required: false, type: String }
|
|
885
|
-
},
|
|
886
|
-
description: { required: false, type: String },
|
|
887
|
-
location: {
|
|
888
|
-
city: { required: false, type: String },
|
|
889
|
-
coordinates: {
|
|
890
|
-
required: false,
|
|
891
|
-
type: [Number]
|
|
892
|
-
// [longitude, latitude]
|
|
893
|
-
},
|
|
894
|
-
country: { required: false, type: String },
|
|
895
|
-
fullAddress: { required: false, type: String },
|
|
896
|
-
latitude: { required: false, type: Number },
|
|
897
|
-
longitude: { required: false, type: Number },
|
|
898
|
-
region: { required: false, type: String },
|
|
899
|
-
type: { required: false, type: String }
|
|
900
|
-
// Mongoose GeoJSON type
|
|
901
|
-
}
|
|
902
|
-
},
|
|
903
|
-
{ _id: false }
|
|
904
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
905
|
-
);
|
|
906
|
-
var schema8 = new MongooseSchema12(
|
|
907
|
-
{
|
|
908
|
-
...baseResourceFields,
|
|
909
|
-
// Importing base resource fields from global.ts
|
|
910
|
-
availability: {
|
|
911
|
-
corporate: { default: false, required: false, type: Boolean },
|
|
912
|
-
private: { default: false, required: false, type: Boolean },
|
|
913
|
-
school: { default: false, required: false, type: Boolean }
|
|
914
|
-
},
|
|
915
|
-
categories: [CategorySchema],
|
|
916
|
-
locations: [LocationsSchema],
|
|
917
|
-
multiLocation: { required: true, type: Boolean },
|
|
918
|
-
products: [MenuTypeSchema],
|
|
919
|
-
vendorInfoId: {
|
|
920
|
-
ref: "VendorInfo",
|
|
921
|
-
required: false,
|
|
922
|
-
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
923
|
-
},
|
|
924
|
-
vendorType: {
|
|
925
|
-
enum: Object.values(EnumVendorType),
|
|
926
|
-
required: true,
|
|
927
|
-
type: String
|
|
928
|
-
}
|
|
929
|
-
},
|
|
930
|
-
{ timestamps: true }
|
|
931
|
-
);
|
|
932
|
-
schema8.index({ name: 1 });
|
|
933
|
-
schema8.index({ description: 1 });
|
|
934
|
-
schema8.index({ region: 1 });
|
|
935
|
-
schema8.index({ "categories.name": 1 });
|
|
936
|
-
schema8.index({ "partners.email": 1 });
|
|
937
|
-
var VendorModel = import_mongoose13.default.models.Vendor || import_mongoose13.default.model("Vendor", schema8);
|
|
938
|
-
|
|
939
|
-
// src/mongoose/vendor/VendorInfo.ts
|
|
940
|
-
var import_mongoose14 = __toESM(require("mongoose"));
|
|
941
|
-
var MongooseSchema13 = import_mongoose14.default.Schema;
|
|
942
|
-
var AttributesSchema = new MongooseSchema13(
|
|
943
|
-
{
|
|
944
|
-
details: { required: false, type: String },
|
|
945
|
-
isRequired: { default: false, required: true, type: Boolean }
|
|
946
|
-
},
|
|
947
|
-
{ _id: false }
|
|
948
|
-
);
|
|
949
|
-
var schema9 = new MongooseSchema13(
|
|
950
|
-
{
|
|
951
|
-
compliance: {
|
|
952
|
-
foodBeverageLicense: { default: false, required: false, type: Boolean },
|
|
953
|
-
liabilityInsurance: { default: false, required: false, type: Boolean }
|
|
954
|
-
},
|
|
955
|
-
documents: [ResourceImageTypeSchema],
|
|
956
|
-
product: {
|
|
957
|
-
foodFlavors: {
|
|
958
|
-
enum: Object.values(EnumFoodFlavor),
|
|
959
|
-
required: true,
|
|
960
|
-
type: [String]
|
|
961
|
-
},
|
|
962
|
-
packaging: { required: true, type: [String] },
|
|
963
|
-
priceRange: {
|
|
964
|
-
max: { required: true, type: Number },
|
|
965
|
-
min: { required: true, type: Number }
|
|
966
|
-
},
|
|
967
|
-
producedIn: { required: true, type: [String] }
|
|
968
|
-
},
|
|
969
|
-
requirements: {
|
|
970
|
-
electricity: AttributesSchema,
|
|
971
|
-
gazebo: AttributesSchema,
|
|
972
|
-
table: AttributesSchema
|
|
973
|
-
},
|
|
974
|
-
stallInfo: {
|
|
975
|
-
size: {
|
|
976
|
-
depth: { required: true, type: Number },
|
|
977
|
-
width: { required: true, type: Number }
|
|
978
|
-
}
|
|
979
|
-
},
|
|
980
|
-
vendorId: {
|
|
981
|
-
ref: "Vendor",
|
|
982
|
-
required: true,
|
|
983
|
-
type: import_mongoose14.default.Schema.Types.ObjectId
|
|
984
|
-
}
|
|
985
|
-
},
|
|
986
|
-
{ timestamps: true }
|
|
987
|
-
);
|
|
988
|
-
var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mongoose14.default.model("VendorInfo", schema9);
|
|
989
|
-
|
|
990
|
-
// src/mongoose/event/Event.ts
|
|
991
|
-
var import_mongoose15 = __toESM(require("mongoose"));
|
|
992
|
-
var MongooseSchema14 = import_mongoose15.default.Schema;
|
|
993
|
-
var locationsSchema = new MongooseSchema14(
|
|
994
|
-
{
|
|
995
|
-
city: { required: true, type: String },
|
|
996
|
-
coordinates: {
|
|
997
|
-
required: true,
|
|
998
|
-
type: [Number]
|
|
999
|
-
// [longitude, latitude]
|
|
1000
|
-
},
|
|
1001
|
-
country: { required: true, type: String },
|
|
1002
|
-
fullAddress: { required: true, type: String },
|
|
1003
|
-
latitude: { required: true, type: Number },
|
|
1004
|
-
longitude: { required: true, type: Number },
|
|
1005
|
-
region: { required: true, type: String },
|
|
1006
|
-
type: {
|
|
1007
|
-
default: "Point",
|
|
1008
|
-
enum: ["Point"],
|
|
1009
|
-
required: true,
|
|
1010
|
-
type: String
|
|
1011
|
-
}
|
|
1012
|
-
},
|
|
1013
|
-
{ _id: false }
|
|
1014
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
1015
|
-
);
|
|
1016
|
-
var dateTimeSchema2 = new MongooseSchema14(
|
|
1017
|
-
{
|
|
1018
|
-
endDate: { required: true, type: String },
|
|
1019
|
-
endTime: { required: true, type: String },
|
|
1020
|
-
startDate: { required: true, type: String },
|
|
1021
|
-
startTime: { required: true, type: String }
|
|
1022
|
-
},
|
|
1023
|
-
{ _id: false }
|
|
1024
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
1025
|
-
);
|
|
1026
|
-
var schema10 = new MongooseSchema14(
|
|
1027
|
-
{
|
|
1028
|
-
...baseResourceFields,
|
|
1029
|
-
// Importing base resource fields from global.ts
|
|
1030
|
-
dateTime: [dateTimeSchema2],
|
|
1031
|
-
eventInfoId: {
|
|
1032
|
-
ref: "EventInfo",
|
|
1033
|
-
required: false,
|
|
1034
|
-
type: import_mongoose15.default.Schema.Types.ObjectId
|
|
1035
|
-
},
|
|
1036
|
-
eventType: {
|
|
1037
|
-
enum: Object.values(EnumEventType),
|
|
1038
|
-
required: true,
|
|
1039
|
-
type: String
|
|
1040
|
-
},
|
|
1041
|
-
location: {
|
|
1042
|
-
required: true,
|
|
1043
|
-
type: locationsSchema
|
|
1044
|
-
},
|
|
1045
|
-
nzbn: { required: true, type: String },
|
|
1046
|
-
provider: { required: false, type: String },
|
|
1047
|
-
rainOrShine: { required: true, type: Boolean },
|
|
1048
|
-
tags: { required: true, type: [String] }
|
|
1049
|
-
},
|
|
1050
|
-
{ timestamps: true }
|
|
1051
|
-
);
|
|
1052
|
-
schema10.index({ name: 1 });
|
|
1053
|
-
schema10.index({ description: 1 });
|
|
1054
|
-
schema10.index({ region: 1 });
|
|
1055
|
-
schema10.index({ location: "2dsphere" });
|
|
1056
|
-
schema10.index({ tags: 1 });
|
|
1057
|
-
schema10.index({ "partners.email": 1 });
|
|
1058
|
-
var EventModel = import_mongoose15.default.models.Event || import_mongoose15.default.model("Event", schema10);
|
|
1059
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1060
|
-
0 && (module.exports = {
|
|
1061
|
-
AdModel,
|
|
1062
|
-
CategorySchema,
|
|
1063
|
-
ChatModel,
|
|
1064
|
-
EventInfoModel,
|
|
1065
|
-
EventModel,
|
|
1066
|
-
NotificationModel,
|
|
1067
|
-
ParticipantSchema,
|
|
1068
|
-
PushTokenModel,
|
|
1069
|
-
RelationModel,
|
|
1070
|
-
RelationTypeSchema,
|
|
1071
|
-
ResourceActivityModel,
|
|
1072
|
-
ResourceImageTypeSchema,
|
|
1073
|
-
SocialMediaTypeSchema,
|
|
1074
|
-
StallTypeSchema,
|
|
1075
|
-
TesterModel,
|
|
1076
|
-
UserModel,
|
|
1077
|
-
VendorInfoModel,
|
|
1078
|
-
VendorModel,
|
|
1079
|
-
VerificationTokenModel,
|
|
1080
|
-
baseResourceFields,
|
|
1081
|
-
partnersSchema,
|
|
1082
|
-
relationDatesSchema,
|
|
1083
|
-
termsAgreementSchema
|
|
1084
|
-
});
|
|
1085
|
-
//# sourceMappingURL=index.cjs.map
|