@timardex/cluemart-shared 1.2.30 → 1.2.31
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-C02AZIGy.d.ts → ad-Cv1V8lgJ.d.ts} +1 -1
- package/dist/{ad-CTWMmc7b.d.mts → ad-IVwm5MLY.d.mts} +1 -1
- package/dist/{auth-o_ns6gLk.d.ts → auth-BCxQp_CF.d.ts} +1 -1
- package/dist/{auth-YsJJnj12.d.mts → auth-BczaOu28.d.mts} +1 -1
- package/dist/{chunk-BO3HICLR.mjs → chunk-4OLDTZXH.mjs} +3 -1
- package/dist/chunk-4OLDTZXH.mjs.map +1 -0
- package/dist/formFields/index.d.mts +2 -1
- package/dist/formFields/index.d.ts +2 -1
- package/dist/{global-4lS-fh61.d.ts → global-Bnr6l_NH.d.ts} +1 -0
- package/dist/{global-_ZHkOcnR.d.mts → global-_89-F0iL.d.mts} +1 -0
- package/dist/graphql/index.d.mts +3 -2
- package/dist/graphql/index.d.ts +3 -2
- package/dist/hooks/index.d.mts +4 -3
- package/dist/hooks/index.d.ts +4 -3
- package/dist/index.cjs +78 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +77 -69
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +65 -62
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +4 -3
- package/dist/mongoose/index.d.ts +4 -3
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +17 -8
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +9 -2
- package/dist/service/index.d.ts +9 -2
- package/dist/service/index.mjs +11 -5
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.cjs +15 -2
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +5 -4
- package/dist/types/index.d.ts +5 -4
- package/dist/types/index.mjs +5 -3
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/index.d.ts +2 -1
- package/package.json +3 -1
- package/dist/chunk-BO3HICLR.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.js';
|
|
2
|
-
import { C as Category, a3 as CreateFormData, s as ResourceImageType, P as PartnerType, T as TermsAgreement, r as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, a3 as CreateFormData, s as ResourceImageType, P as PartnerType, T as TermsAgreement, r as SocialMediaType } from './global-Bnr6l_NH.js';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories?: Category[] | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.mjs';
|
|
2
|
-
import { C as Category, a3 as CreateFormData, s as ResourceImageType, P as PartnerType, T as TermsAgreement, r as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, a3 as CreateFormData, s as ResourceImageType, P as PartnerType, T as TermsAgreement, r as SocialMediaType } from './global-_89-F0iL.mjs';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories?: Category[] | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/types/global.ts
|
|
2
|
+
import mongoose from "mongoose";
|
|
2
3
|
var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
3
4
|
EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
|
|
4
5
|
EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
|
|
@@ -18,7 +19,8 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
18
19
|
})(EnumActivity || {});
|
|
19
20
|
|
|
20
21
|
export {
|
|
22
|
+
mongoose,
|
|
21
23
|
EnumPubSubEvents,
|
|
22
24
|
EnumActivity
|
|
23
25
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-4OLDTZXH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/global.ts","../src/types/resourceActivities.ts"],"sourcesContent":["import { Request } from \"express\";\nimport mongoose from \"mongoose\";\nimport {\n Control,\n FieldErrors,\n FieldValues,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport { SchemaChatType } from \"src/mongoose/Chat\";\nimport { SchemaNotificationType } from \"src/mongoose/Notification\";\n\nimport { EnumResourceType, EnumSocialMedia, EnumUserLicence } from \"../enums\";\n\nimport { EventType } from \"./event\";\nimport { NotificationCount } from \"./notification\";\nimport { RelationDate } from \"./relation\";\nimport { VendorType } from \"./vendor\";\n\nexport type Nullable<T> = {\n [K in keyof T]: T[K] | null | undefined;\n};\n\nexport type DeviceInfo = {\n appBuildNumber: string;\n appId: string;\n appVersion: string;\n brand: string;\n deviceName: string;\n installationId: string;\n manufacturer: string;\n modelName: string;\n osName: string;\n osVersion: string;\n timestamp: string;\n};\n\nexport type TermsAgreement = DeviceInfo & {\n termVersion: string;\n};\n\nexport type ResourceContactDetailsType = {\n email?: string | null;\n landlinePhone?: string | null;\n mobilePhone?: string | null;\n};\n\nexport type ResourceImageType = {\n source: string;\n title: string;\n};\n\nexport type SocialMediaType = {\n name?: EnumSocialMedia;\n link?: string;\n};\n\nexport type PartnerType = {\n email: string;\n resourceId: string;\n resourceType: EnumResourceType;\n licence: EnumUserLicence;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n contactDetails?: ResourceContactDetailsType | null;\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n description: string;\n images?: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n logo?: ResourceImageType | null;\n logoUpload?: ResourceImageType | null;\n name: string;\n owner?: OwnerType | null;\n partners?: PartnerType[] | null;\n promoCodes?: string[] | null;\n region: string;\n socialMedia?: SocialMediaType[] | null;\n termsAgreement?: TermsAgreement | null;\n}\n\nexport type PosterUsageType = {\n month: string;\n count: number;\n};\n\nexport type BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\" | \"owner\"\n> & {\n _id: string;\n adIds?: string[] | null;\n createdAt: string;\n deletedAt: string | null;\n owner: OwnerType;\n posterUsage?: PosterUsageType | null;\n relations:\n | {\n relationId: string | null;\n relationDates: RelationDate[] | null;\n }[]\n | null;\n updatedAt: string;\n};\n\nexport type LocationType = {\n city: string;\n coordinates: number[]; // [longitude, latitude]\n country: string;\n fullAddress: string;\n latitude: number;\n longitude: number;\n region: string;\n type: \"Point\"; // Mongoose GeoJSON type\n};\n\nexport type DateTimeType = {\n endDate: string;\n endTime: string;\n startDate: string;\n startTime: string;\n};\n\nexport type Region = {\n latitude: number;\n latitudeDelta: number;\n longitude: number;\n longitudeDelta: number;\n};\n\nexport type GeocodeLocation = Pick<LocationType, \"latitude\" | \"longitude\">;\n\nexport type MapMultiLocation = {\n dateTime: DateTimeType | null;\n location: LocationType | null;\n resourceId?: string;\n resourceName?: string;\n resourceType?: EnumResourceType;\n};\n\nexport interface FormField {\n disabled?: boolean;\n helperText?: string;\n isTextArea?: boolean;\n keyboardType?:\n | \"default\"\n | \"email-address\"\n | \"number-pad\"\n | \"url\"\n | \"decimal-pad\"\n | \"phone-pad\";\n name: string;\n placeholder: string;\n secureTextEntry?: boolean;\n}\n\nexport interface FormDateField {\n dateMode: \"date\" | \"time\";\n helperText?: string;\n name: \"endDate\" | \"endTime\" | \"startDate\" | \"startTime\";\n placeholder: string;\n}\n\nexport interface SubcategoryItems {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface Subcategory {\n id: string;\n name: string;\n items?: SubcategoryItems[] | null;\n}\n\nexport interface Category {\n color?: string | null;\n description?: string | null;\n id: string;\n name: string;\n subcategories: Subcategory[];\n}\n\nexport type OptionItem = {\n value: string;\n label: string;\n};\n\nexport type ImageObjectType = {\n uri: string;\n type: string;\n name: string;\n};\n\nexport interface ResourceConnectionsType {\n events: EventType[] | null;\n vendors: VendorType[] | null;\n}\n\nexport interface CreateFormData<T extends FieldValues> {\n control: Control<T, any>;\n fields: T;\n formState: { errors: FieldErrors<T> };\n handleSubmit: UseFormHandleSubmit<T, any>;\n reset: UseFormReset<T>;\n setValue: UseFormSetValue<T>;\n watch: UseFormWatch<T>;\n}\n\nexport type ObjectId = mongoose.Schema.Types.ObjectId;\n\nexport enum EnumPubSubEvents {\n GET_CHAT_MESSAGE = \"GET_CHAT_MESSAGE\",\n GET_NOTIFICATIONS = \"GET_NOTIFICATIONS\",\n GET_NOTIFICATIONS_COUNT = \"GET_NOTIFICATIONS_COUNT\",\n USER_TYPING = \"USER_TYPING\",\n}\n\nexport interface AuthUser {\n email: string;\n role: string;\n userId: ObjectId;\n}\n\nexport interface SubscriptionPayload {\n getChatMessage?: SchemaChatType;\n userTyping?: SchemaChatType; // NOT USED\n getNotifications?: SchemaNotificationType[];\n // Used only for filtering; not part of the GraphQL schema output\n getNotificationsUserId?: ObjectId;\n getNotificationsCount?: NotificationCount & { userId: ObjectId };\n}\n\nexport interface GraphQLContext {\n user: AuthUser | null;\n pubsub: {\n publish: (\n eventName: EnumPubSubEvents,\n payload: SubscriptionPayload,\n ) => void;\n subscribe: (eventName: EnumPubSubEvents) => AsyncIterable<any>;\n };\n request: Request;\n response: Response;\n}\n\nexport { mongoose };\n","import { EnumOSPlatform, EnumResourceType } from \"src/enums\";\n\nexport enum EnumActivity {\n FAVORITE = \"FAVORITE\",\n GOING = \"GOING\",\n INTERESTED = \"INTERESTED\",\n PRESENT = \"PRESENT\",\n VIEW = \"VIEW\",\n}\n\nexport type ResourceActivityEntry = {\n activityType: EnumActivity;\n location: {\n type: \"Point\";\n coordinates: number[]; // [longitude, latitude]\n } | null;\n startDate?: string | null;\n startTime?: string | null;\n timestamp: Date;\n userAgent: EnumOSPlatform;\n userId?: string | null;\n};\n\nexport type ResourceActivityType = {\n _id: string;\n resourceType: EnumResourceType;\n resourceId: string;\n activity: ResourceActivityEntry[];\n};\n\nexport type ResourceActivityInputType = {\n resourceId: string;\n resourceType: string;\n activity: Omit<ResourceActivityEntry, \"timestamp\">;\n};\n"],"mappings":";AACA,OAAO,cAAc;AA6Nd,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;;;AC5NL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,UAAO;AALG,SAAAA;AAAA,GAAA;","names":["EnumPubSubEvents","EnumActivity"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-_89-F0iL.mjs';
|
|
2
|
+
import 'express';
|
|
2
3
|
import 'mongoose';
|
|
3
4
|
import 'react-hook-form';
|
|
4
5
|
import '../enums/index.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-Bnr6l_NH.js';
|
|
2
|
+
import 'express';
|
|
2
3
|
import 'mongoose';
|
|
3
4
|
import 'react-hook-form';
|
|
4
5
|
import '../enums/index.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Request } from 'express';
|
|
1
2
|
import mongoose from 'mongoose';
|
|
2
3
|
import { FieldValues, Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
4
|
import { EnumChatType, EnumEventType, EnumPaymentMethod, EnumInviteStatus, EnumResourceType, EnumRelationResource, EnumVendorType, EnumFoodFlavor, EnumNotificationType, EnumNotificationResourceType, EnumUserLicence, EnumSocialMedia } from './enums/index.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Request } from 'express';
|
|
1
2
|
import mongoose from 'mongoose';
|
|
2
3
|
import { FieldValues, Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
4
|
import { EnumChatType, EnumEventType, EnumPaymentMethod, EnumInviteStatus, EnumResourceType, EnumRelationResource, EnumVendorType, EnumFoodFlavor, EnumNotificationType, EnumNotificationResourceType, EnumUserLicence, EnumSocialMedia } from './enums/index.mjs';
|
package/dist/graphql/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
|
-
import { b as ChatType, E as EventType, c as EventInfoType, N as NotificationType, d as NotificationCount, e as RelationType, f as ResourceConnectionsType, V as VendorType, g as VendorInfoType } from '../global-
|
|
2
|
+
import { b as ChatType, E as EventType, c as EventInfoType, N as NotificationType, d as NotificationCount, e as RelationType, f as ResourceConnectionsType, V as VendorType, g as VendorInfoType } from '../global-_89-F0iL.mjs';
|
|
3
3
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
4
|
-
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-
|
|
4
|
+
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-IVwm5MLY.mjs';
|
|
5
5
|
import { R as ResourceActivityType } from '../resourceActivities-BIjtlOGp.mjs';
|
|
6
|
+
import 'express';
|
|
6
7
|
import 'mongoose';
|
|
7
8
|
import 'react-hook-form';
|
|
8
9
|
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
|
-
import { b as ChatType, E as EventType, c as EventInfoType, N as NotificationType, d as NotificationCount, e as RelationType, f as ResourceConnectionsType, V as VendorType, g as VendorInfoType } from '../global-
|
|
2
|
+
import { b as ChatType, E as EventType, c as EventInfoType, N as NotificationType, d as NotificationCount, e as RelationType, f as ResourceConnectionsType, V as VendorType, g as VendorInfoType } from '../global-Bnr6l_NH.js';
|
|
3
3
|
import { EnumResourceType } from '../enums/index.js';
|
|
4
|
-
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-
|
|
4
|
+
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-Cv1V8lgJ.js';
|
|
5
5
|
import { R as ResourceActivityType } from '../resourceActivities-B4roVKtQ.js';
|
|
6
|
+
import 'express';
|
|
6
7
|
import 'mongoose';
|
|
7
8
|
import 'react-hook-form';
|
|
8
9
|
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { L as LocationType, h as VendorFormData, i as CreateVendorFormData, j as VendorInfoFormData, k as CreateVendorInfoFormData, l as EventFormData, m as CreateEventFormData, n as EventInfoFormData, o as CreateEventInfoFormData, B as BaseResourceTypeFormData } from '../global-
|
|
2
|
-
import { a as UserFormData, C as CreateUserFormData, b as TestersFormData, c as CreateTestersFormData, d as AdFormData, e as CreateAdFormData } from '../ad-
|
|
3
|
-
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-
|
|
1
|
+
import { L as LocationType, h as VendorFormData, i as CreateVendorFormData, j as VendorInfoFormData, k as CreateVendorInfoFormData, l as EventFormData, m as CreateEventFormData, n as EventInfoFormData, o as CreateEventInfoFormData, B as BaseResourceTypeFormData } from '../global-_89-F0iL.mjs';
|
|
2
|
+
import { a as UserFormData, C as CreateUserFormData, b as TestersFormData, c as CreateTestersFormData, d as AdFormData, e as CreateAdFormData } from '../ad-IVwm5MLY.mjs';
|
|
3
|
+
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-BczaOu28.mjs';
|
|
4
|
+
import 'express';
|
|
4
5
|
import 'mongoose';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
import '../enums/index.mjs';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { L as LocationType, h as VendorFormData, i as CreateVendorFormData, j as VendorInfoFormData, k as CreateVendorInfoFormData, l as EventFormData, m as CreateEventFormData, n as EventInfoFormData, o as CreateEventInfoFormData, B as BaseResourceTypeFormData } from '../global-
|
|
2
|
-
import { a as UserFormData, C as CreateUserFormData, b as TestersFormData, c as CreateTestersFormData, d as AdFormData, e as CreateAdFormData } from '../ad-
|
|
3
|
-
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-
|
|
1
|
+
import { L as LocationType, h as VendorFormData, i as CreateVendorFormData, j as VendorInfoFormData, k as CreateVendorInfoFormData, l as EventFormData, m as CreateEventFormData, n as EventInfoFormData, o as CreateEventInfoFormData, B as BaseResourceTypeFormData } from '../global-Bnr6l_NH.js';
|
|
2
|
+
import { a as UserFormData, C as CreateUserFormData, b as TestersFormData, c as CreateTestersFormData, d as AdFormData, e as CreateAdFormData } from '../ad-Cv1V8lgJ.js';
|
|
3
|
+
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-BCxQp_CF.js';
|
|
4
|
+
import 'express';
|
|
4
5
|
import 'mongoose';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
import '../enums/index.js';
|
package/dist/index.cjs
CHANGED
|
@@ -112,6 +112,7 @@ __export(index_exports, {
|
|
|
112
112
|
loginFields: () => loginFields,
|
|
113
113
|
mapArrayToOptions: () => mapArrayToOptions,
|
|
114
114
|
mapBaseResourceTypeToFormData: () => mapBaseResourceTypeToFormData,
|
|
115
|
+
mongoose: () => import_mongoose.default,
|
|
115
116
|
normalizeUrl: () => normalizeUrl,
|
|
116
117
|
packagingOptions: () => packagingOptions,
|
|
117
118
|
partnersSchema: () => partnersSchema,
|
|
@@ -6194,9 +6195,10 @@ function useAdForm(data) {
|
|
|
6194
6195
|
}
|
|
6195
6196
|
|
|
6196
6197
|
// src/mongoose/Ad.ts
|
|
6197
|
-
var
|
|
6198
|
+
var import_mongoose5 = __toESM(require("mongoose"));
|
|
6198
6199
|
|
|
6199
6200
|
// src/types/global.ts
|
|
6201
|
+
var import_mongoose = __toESM(require("mongoose"));
|
|
6200
6202
|
var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
6201
6203
|
EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
|
|
6202
6204
|
EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
|
|
@@ -6216,14 +6218,14 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
6216
6218
|
})(EnumActivity || {});
|
|
6217
6219
|
|
|
6218
6220
|
// src/mongoose/global.ts
|
|
6219
|
-
var
|
|
6221
|
+
var import_mongoose4 = __toESM(require("mongoose"));
|
|
6220
6222
|
|
|
6221
6223
|
// src/mongoose/Relation.ts
|
|
6222
|
-
var
|
|
6224
|
+
var import_mongoose3 = __toESM(require("mongoose"));
|
|
6223
6225
|
|
|
6224
6226
|
// src/mongoose/event/EventInfo.ts
|
|
6225
|
-
var
|
|
6226
|
-
var MongooseSchema =
|
|
6227
|
+
var import_mongoose2 = __toESM(require("mongoose"));
|
|
6228
|
+
var MongooseSchema = import_mongoose2.default.Schema;
|
|
6227
6229
|
var StallTypeSchema = new MongooseSchema(
|
|
6228
6230
|
{
|
|
6229
6231
|
electricity: {
|
|
@@ -6282,7 +6284,7 @@ var schema = new MongooseSchema(
|
|
|
6282
6284
|
eventId: {
|
|
6283
6285
|
ref: "Event",
|
|
6284
6286
|
required: false,
|
|
6285
|
-
type:
|
|
6287
|
+
type: import_mongoose2.default.Schema.Types.ObjectId
|
|
6286
6288
|
},
|
|
6287
6289
|
packInTime: { required: true, type: Number },
|
|
6288
6290
|
paymentDueHours: { required: true, type: Number },
|
|
@@ -6291,13 +6293,13 @@ var schema = new MongooseSchema(
|
|
|
6291
6293
|
},
|
|
6292
6294
|
{ timestamps: true }
|
|
6293
6295
|
);
|
|
6294
|
-
var EventInfoModel =
|
|
6296
|
+
var EventInfoModel = import_mongoose2.default.model(
|
|
6295
6297
|
"EventInfo",
|
|
6296
6298
|
schema
|
|
6297
6299
|
);
|
|
6298
6300
|
|
|
6299
6301
|
// src/mongoose/Relation.ts
|
|
6300
|
-
var MongooseSchema2 =
|
|
6302
|
+
var MongooseSchema2 = import_mongoose3.default.Schema;
|
|
6301
6303
|
var relationDatesSchema = new MongooseSchema2(
|
|
6302
6304
|
{
|
|
6303
6305
|
lastUpdateBy: {
|
|
@@ -6322,13 +6324,13 @@ var RelationTypeSchema = new MongooseSchema2(
|
|
|
6322
6324
|
chatId: {
|
|
6323
6325
|
ref: "Chat",
|
|
6324
6326
|
required: true,
|
|
6325
|
-
type:
|
|
6327
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
6326
6328
|
},
|
|
6327
6329
|
deletedAt: { default: null, required: false, type: Date },
|
|
6328
6330
|
eventId: {
|
|
6329
6331
|
ref: "Event",
|
|
6330
6332
|
required: true,
|
|
6331
|
-
type:
|
|
6333
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
6332
6334
|
},
|
|
6333
6335
|
lastUpdateBy: {
|
|
6334
6336
|
enum: Object.values(EnumResourceType),
|
|
@@ -6344,7 +6346,7 @@ var RelationTypeSchema = new MongooseSchema2(
|
|
|
6344
6346
|
vendorId: {
|
|
6345
6347
|
ref: "Vendor",
|
|
6346
6348
|
required: true,
|
|
6347
|
-
type:
|
|
6349
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
6348
6350
|
}
|
|
6349
6351
|
},
|
|
6350
6352
|
{ timestamps: true }
|
|
@@ -6354,20 +6356,20 @@ RelationTypeSchema.index({
|
|
|
6354
6356
|
"relationDates.startTime": 1,
|
|
6355
6357
|
"relationDates.status": 1
|
|
6356
6358
|
});
|
|
6357
|
-
var RelationModel =
|
|
6359
|
+
var RelationModel = import_mongoose3.default.model(
|
|
6358
6360
|
"Relation",
|
|
6359
6361
|
RelationTypeSchema
|
|
6360
6362
|
);
|
|
6361
6363
|
|
|
6362
6364
|
// src/mongoose/global.ts
|
|
6363
|
-
var MongooseSchema3 =
|
|
6365
|
+
var MongooseSchema3 = import_mongoose4.default.Schema;
|
|
6364
6366
|
var OwnerTypeSchema = new MongooseSchema3(
|
|
6365
6367
|
{
|
|
6366
6368
|
email: { required: true, type: String },
|
|
6367
6369
|
userId: {
|
|
6368
6370
|
ref: "User",
|
|
6369
6371
|
required: true,
|
|
6370
|
-
type:
|
|
6372
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
6371
6373
|
}
|
|
6372
6374
|
},
|
|
6373
6375
|
{ _id: false }
|
|
@@ -6477,7 +6479,7 @@ var resourceRelationsSchema = new MongooseSchema3(
|
|
|
6477
6479
|
relationId: {
|
|
6478
6480
|
ref: "Relation",
|
|
6479
6481
|
required: false,
|
|
6480
|
-
type:
|
|
6482
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
6481
6483
|
}
|
|
6482
6484
|
},
|
|
6483
6485
|
{ _id: false }
|
|
@@ -6487,7 +6489,7 @@ var baseResourceFields = {
|
|
|
6487
6489
|
adIds: {
|
|
6488
6490
|
ref: "Ad",
|
|
6489
6491
|
required: false,
|
|
6490
|
-
type: [
|
|
6492
|
+
type: [import_mongoose4.default.Schema.Types.ObjectId]
|
|
6491
6493
|
},
|
|
6492
6494
|
contactDetails: ContactDetailsSchema,
|
|
6493
6495
|
cover: ResourceImageTypeSchema,
|
|
@@ -6514,7 +6516,7 @@ var baseResourceFields = {
|
|
|
6514
6516
|
};
|
|
6515
6517
|
|
|
6516
6518
|
// src/mongoose/Ad.ts
|
|
6517
|
-
var MongooseSchema4 =
|
|
6519
|
+
var MongooseSchema4 = import_mongoose5.default.Schema;
|
|
6518
6520
|
var schema2 = new MongooseSchema4(
|
|
6519
6521
|
{
|
|
6520
6522
|
active: { default: true, type: Boolean },
|
|
@@ -6572,11 +6574,11 @@ schema2.index({
|
|
|
6572
6574
|
start: 1,
|
|
6573
6575
|
status: 1
|
|
6574
6576
|
});
|
|
6575
|
-
var AdModel =
|
|
6577
|
+
var AdModel = import_mongoose5.default.model("Ad", schema2);
|
|
6576
6578
|
|
|
6577
6579
|
// src/mongoose/Chat.ts
|
|
6578
|
-
var
|
|
6579
|
-
var MongooseSchema5 =
|
|
6580
|
+
var import_mongoose6 = __toESM(require("mongoose"));
|
|
6581
|
+
var MongooseSchema5 = import_mongoose6.default.Schema;
|
|
6580
6582
|
var MessageSchema = new MongooseSchema5(
|
|
6581
6583
|
{
|
|
6582
6584
|
content: { required: true, type: String },
|
|
@@ -6584,7 +6586,7 @@ var MessageSchema = new MongooseSchema5(
|
|
|
6584
6586
|
senderId: {
|
|
6585
6587
|
ref: "User",
|
|
6586
6588
|
required: true,
|
|
6587
|
-
type:
|
|
6589
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
6588
6590
|
},
|
|
6589
6591
|
senderName: { required: true, type: String }
|
|
6590
6592
|
},
|
|
@@ -6597,7 +6599,7 @@ var ParticipantSchema = new MongooseSchema5(
|
|
|
6597
6599
|
userId: {
|
|
6598
6600
|
ref: "User",
|
|
6599
6601
|
required: true,
|
|
6600
|
-
type:
|
|
6602
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
6601
6603
|
}
|
|
6602
6604
|
},
|
|
6603
6605
|
{ _id: false }
|
|
@@ -6619,12 +6621,12 @@ var ChatSchema = new MongooseSchema5(
|
|
|
6619
6621
|
eventId: {
|
|
6620
6622
|
ref: "Event",
|
|
6621
6623
|
required: false,
|
|
6622
|
-
type:
|
|
6624
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
6623
6625
|
},
|
|
6624
6626
|
vendorId: {
|
|
6625
6627
|
ref: "Vendor",
|
|
6626
6628
|
required: false,
|
|
6627
|
-
type:
|
|
6629
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
6628
6630
|
}
|
|
6629
6631
|
}
|
|
6630
6632
|
},
|
|
@@ -6632,11 +6634,11 @@ var ChatSchema = new MongooseSchema5(
|
|
|
6632
6634
|
timestamps: true
|
|
6633
6635
|
}
|
|
6634
6636
|
);
|
|
6635
|
-
var ChatModel =
|
|
6637
|
+
var ChatModel = import_mongoose6.default.model("Chat", ChatSchema);
|
|
6636
6638
|
|
|
6637
6639
|
// src/mongoose/Notification.ts
|
|
6638
|
-
var
|
|
6639
|
-
var MongooseSchema6 =
|
|
6640
|
+
var import_mongoose7 = __toESM(require("mongoose"));
|
|
6641
|
+
var MongooseSchema6 = import_mongoose7.default.Schema;
|
|
6640
6642
|
var schema3 = new MongooseSchema6(
|
|
6641
6643
|
{
|
|
6642
6644
|
data: {
|
|
@@ -6660,21 +6662,21 @@ var schema3 = new MongooseSchema6(
|
|
|
6660
6662
|
userId: {
|
|
6661
6663
|
ref: "User",
|
|
6662
6664
|
required: true,
|
|
6663
|
-
type:
|
|
6665
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
6664
6666
|
}
|
|
6665
6667
|
},
|
|
6666
6668
|
{ timestamps: true }
|
|
6667
6669
|
);
|
|
6668
6670
|
schema3.index({ isRead: 1, userId: 1 });
|
|
6669
6671
|
schema3.index({ createdAt: -1, userId: 1 });
|
|
6670
|
-
var NotificationModel =
|
|
6672
|
+
var NotificationModel = import_mongoose7.default.model(
|
|
6671
6673
|
"Notification",
|
|
6672
6674
|
schema3
|
|
6673
6675
|
);
|
|
6674
6676
|
|
|
6675
6677
|
// src/mongoose/PushToken.ts
|
|
6676
|
-
var
|
|
6677
|
-
var MongooseSchema7 =
|
|
6678
|
+
var import_mongoose8 = __toESM(require("mongoose"));
|
|
6679
|
+
var MongooseSchema7 = import_mongoose8.default.Schema;
|
|
6678
6680
|
var schema4 = new MongooseSchema7(
|
|
6679
6681
|
{
|
|
6680
6682
|
platform: {
|
|
@@ -6683,15 +6685,15 @@ var schema4 = new MongooseSchema7(
|
|
|
6683
6685
|
type: String
|
|
6684
6686
|
},
|
|
6685
6687
|
token: { required: true, type: String },
|
|
6686
|
-
userId: { required: true, type:
|
|
6688
|
+
userId: { required: true, type: import_mongoose8.default.Schema.Types.ObjectId }
|
|
6687
6689
|
},
|
|
6688
6690
|
{ timestamps: true }
|
|
6689
6691
|
);
|
|
6690
|
-
var PushTokenModel =
|
|
6692
|
+
var PushTokenModel = import_mongoose8.default.model("PushToken", schema4);
|
|
6691
6693
|
|
|
6692
6694
|
// src/mongoose/ResourceActivity.ts
|
|
6693
|
-
var
|
|
6694
|
-
var MongooseSchema8 =
|
|
6695
|
+
var import_mongoose9 = __toESM(require("mongoose"));
|
|
6696
|
+
var MongooseSchema8 = import_mongoose9.default.Schema;
|
|
6695
6697
|
var ActivitySchema = new MongooseSchema8(
|
|
6696
6698
|
{
|
|
6697
6699
|
activityType: {
|
|
@@ -6737,11 +6739,11 @@ var schema5 = new MongooseSchema8(
|
|
|
6737
6739
|
);
|
|
6738
6740
|
schema5.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
6739
6741
|
schema5.index({ "views.location": "2dsphere" });
|
|
6740
|
-
var ResourceActivityModel =
|
|
6742
|
+
var ResourceActivityModel = import_mongoose9.default.model("ResourceActivity", schema5);
|
|
6741
6743
|
|
|
6742
6744
|
// src/mongoose/Testers.ts
|
|
6743
|
-
var
|
|
6744
|
-
var MongooseSchema9 =
|
|
6745
|
+
var import_mongoose10 = __toESM(require("mongoose"));
|
|
6746
|
+
var MongooseSchema9 = import_mongoose10.default.Schema;
|
|
6745
6747
|
var TesterSchema = new MongooseSchema9(
|
|
6746
6748
|
{
|
|
6747
6749
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -6766,17 +6768,17 @@ var TesterSchema = new MongooseSchema9(
|
|
|
6766
6768
|
timestamps: true
|
|
6767
6769
|
}
|
|
6768
6770
|
);
|
|
6769
|
-
var TesterModel =
|
|
6771
|
+
var TesterModel = import_mongoose10.default.model("Tester", TesterSchema);
|
|
6770
6772
|
|
|
6771
6773
|
// src/mongoose/User.ts
|
|
6772
|
-
var
|
|
6773
|
-
var MongooseSchema10 =
|
|
6774
|
+
var import_mongoose11 = __toESM(require("mongoose"));
|
|
6775
|
+
var MongooseSchema10 = import_mongoose11.default.Schema;
|
|
6774
6776
|
var userActivityEventSchema = new MongooseSchema10(
|
|
6775
6777
|
{
|
|
6776
6778
|
resourceId: {
|
|
6777
6779
|
ref: "Event",
|
|
6778
6780
|
required: false,
|
|
6779
|
-
type:
|
|
6781
|
+
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
6780
6782
|
},
|
|
6781
6783
|
startDate: { required: false, type: String },
|
|
6782
6784
|
startTime: { required: false, type: String }
|
|
@@ -6788,12 +6790,12 @@ var userActivityFavouritesSchema = new MongooseSchema10(
|
|
|
6788
6790
|
events: {
|
|
6789
6791
|
ref: "Event",
|
|
6790
6792
|
required: false,
|
|
6791
|
-
type: [
|
|
6793
|
+
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
6792
6794
|
},
|
|
6793
6795
|
vendors: {
|
|
6794
6796
|
ref: "Vendor",
|
|
6795
6797
|
required: false,
|
|
6796
|
-
type: [
|
|
6798
|
+
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
6797
6799
|
}
|
|
6798
6800
|
},
|
|
6799
6801
|
{ _id: false }
|
|
@@ -6807,7 +6809,7 @@ var schema6 = new MongooseSchema10(
|
|
|
6807
6809
|
events: {
|
|
6808
6810
|
ref: "Event",
|
|
6809
6811
|
required: false,
|
|
6810
|
-
type: [
|
|
6812
|
+
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
6811
6813
|
},
|
|
6812
6814
|
firstName: { required: true, type: String },
|
|
6813
6815
|
isTester: { default: false, required: false, type: Boolean },
|
|
@@ -6860,17 +6862,17 @@ var schema6 = new MongooseSchema10(
|
|
|
6860
6862
|
vendor: {
|
|
6861
6863
|
ref: "Vendor",
|
|
6862
6864
|
required: false,
|
|
6863
|
-
type:
|
|
6865
|
+
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
6864
6866
|
}
|
|
6865
6867
|
},
|
|
6866
6868
|
{ timestamps: true }
|
|
6867
6869
|
);
|
|
6868
6870
|
schema6.index({ "partners.email": 1 });
|
|
6869
|
-
var UserModel =
|
|
6871
|
+
var UserModel = import_mongoose11.default.model("User", schema6);
|
|
6870
6872
|
|
|
6871
6873
|
// src/mongoose/VerificationToken.ts
|
|
6872
|
-
var
|
|
6873
|
-
var MongooseSchema11 =
|
|
6874
|
+
var import_mongoose12 = __toESM(require("mongoose"));
|
|
6875
|
+
var MongooseSchema11 = import_mongoose12.default.Schema;
|
|
6874
6876
|
var schema7 = new MongooseSchema11(
|
|
6875
6877
|
{
|
|
6876
6878
|
createdAt: {
|
|
@@ -6886,14 +6888,14 @@ var schema7 = new MongooseSchema11(
|
|
|
6886
6888
|
},
|
|
6887
6889
|
{ timestamps: true }
|
|
6888
6890
|
);
|
|
6889
|
-
var VerificationTokenModel =
|
|
6891
|
+
var VerificationTokenModel = import_mongoose12.default.model(
|
|
6890
6892
|
"VerificationToken",
|
|
6891
6893
|
schema7
|
|
6892
6894
|
);
|
|
6893
6895
|
|
|
6894
6896
|
// src/mongoose/vendor/Vendor.ts
|
|
6895
|
-
var
|
|
6896
|
-
var MongooseSchema12 =
|
|
6897
|
+
var import_mongoose13 = __toESM(require("mongoose"));
|
|
6898
|
+
var MongooseSchema12 = import_mongoose13.default.Schema;
|
|
6897
6899
|
var MenuTypeSchema = new MongooseSchema12(
|
|
6898
6900
|
{
|
|
6899
6901
|
description: { required: false, type: String },
|
|
@@ -6948,7 +6950,7 @@ var schema8 = new MongooseSchema12(
|
|
|
6948
6950
|
vendorInfoId: {
|
|
6949
6951
|
ref: "VendorInfo",
|
|
6950
6952
|
required: false,
|
|
6951
|
-
type:
|
|
6953
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
6952
6954
|
},
|
|
6953
6955
|
vendorType: {
|
|
6954
6956
|
enum: Object.values(EnumVendorType),
|
|
@@ -6963,11 +6965,11 @@ schema8.index({ description: 1 });
|
|
|
6963
6965
|
schema8.index({ region: 1 });
|
|
6964
6966
|
schema8.index({ "categories.name": 1 });
|
|
6965
6967
|
schema8.index({ "partners.email": 1 });
|
|
6966
|
-
var VendorModel =
|
|
6968
|
+
var VendorModel = import_mongoose13.default.model("Vendor", schema8);
|
|
6967
6969
|
|
|
6968
6970
|
// src/mongoose/vendor/VendorInfo.ts
|
|
6969
|
-
var
|
|
6970
|
-
var MongooseSchema13 =
|
|
6971
|
+
var import_mongoose14 = __toESM(require("mongoose"));
|
|
6972
|
+
var MongooseSchema13 = import_mongoose14.default.Schema;
|
|
6971
6973
|
var AttributesSchema = new MongooseSchema13(
|
|
6972
6974
|
{
|
|
6973
6975
|
details: { required: false, type: String },
|
|
@@ -7009,19 +7011,19 @@ var schema9 = new MongooseSchema13(
|
|
|
7009
7011
|
vendorId: {
|
|
7010
7012
|
ref: "Vendor",
|
|
7011
7013
|
required: true,
|
|
7012
|
-
type:
|
|
7014
|
+
type: import_mongoose14.default.Schema.Types.ObjectId
|
|
7013
7015
|
}
|
|
7014
7016
|
},
|
|
7015
7017
|
{ timestamps: true }
|
|
7016
7018
|
);
|
|
7017
|
-
var VendorInfoModel =
|
|
7019
|
+
var VendorInfoModel = import_mongoose14.default.model(
|
|
7018
7020
|
"VendorInfo",
|
|
7019
7021
|
schema9
|
|
7020
7022
|
);
|
|
7021
7023
|
|
|
7022
7024
|
// src/mongoose/event/Event.ts
|
|
7023
|
-
var
|
|
7024
|
-
var MongooseSchema14 =
|
|
7025
|
+
var import_mongoose15 = __toESM(require("mongoose"));
|
|
7026
|
+
var MongooseSchema14 = import_mongoose15.default.Schema;
|
|
7025
7027
|
var locationsSchema = new MongooseSchema14(
|
|
7026
7028
|
{
|
|
7027
7029
|
city: { required: true, type: String },
|
|
@@ -7063,7 +7065,7 @@ var schema10 = new MongooseSchema14(
|
|
|
7063
7065
|
eventInfoId: {
|
|
7064
7066
|
ref: "EventInfo",
|
|
7065
7067
|
required: false,
|
|
7066
|
-
type:
|
|
7068
|
+
type: import_mongoose15.default.Schema.Types.ObjectId
|
|
7067
7069
|
},
|
|
7068
7070
|
eventType: {
|
|
7069
7071
|
enum: Object.values(EnumEventType),
|
|
@@ -7087,10 +7089,10 @@ schema10.index({ region: 1 });
|
|
|
7087
7089
|
schema10.index({ location: "2dsphere" });
|
|
7088
7090
|
schema10.index({ tags: 1 });
|
|
7089
7091
|
schema10.index({ "partners.email": 1 });
|
|
7090
|
-
var EventModel =
|
|
7092
|
+
var EventModel = import_mongoose15.default.model("Event", schema10);
|
|
7091
7093
|
|
|
7092
7094
|
// src/service/database.ts
|
|
7093
|
-
var
|
|
7095
|
+
var import_mongoose16 = __toESM(require("mongoose"));
|
|
7094
7096
|
|
|
7095
7097
|
// src/service/timezonePlugin.ts
|
|
7096
7098
|
var import_dayjs3 = __toESM(require("dayjs"));
|
|
@@ -7112,15 +7114,21 @@ function timezonePlugin(schema11) {
|
|
|
7112
7114
|
}
|
|
7113
7115
|
|
|
7114
7116
|
// src/service/database.ts
|
|
7115
|
-
|
|
7116
|
-
var connectToDatabase = async (
|
|
7117
|
+
import_mongoose16.default.plugin(timezonePlugin);
|
|
7118
|
+
var connectToDatabase = async ({
|
|
7119
|
+
appName,
|
|
7120
|
+
dbName,
|
|
7121
|
+
dbPassword,
|
|
7122
|
+
dbUser,
|
|
7123
|
+
mongodbUri
|
|
7124
|
+
}) => {
|
|
7117
7125
|
try {
|
|
7118
|
-
const mongoUri =
|
|
7126
|
+
const mongoUri = mongodbUri ? mongodbUri : (
|
|
7119
7127
|
// Fallback to MongoDB Atlas connection string
|
|
7120
|
-
`mongodb+srv://${
|
|
7128
|
+
`mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`
|
|
7121
7129
|
);
|
|
7122
|
-
await
|
|
7123
|
-
const connectionType =
|
|
7130
|
+
await import_mongoose16.default.connect(mongoUri);
|
|
7131
|
+
const connectionType = mongodbUri ? "Local MongoDB" : "MongoDB Atlas";
|
|
7124
7132
|
console.log(
|
|
7125
7133
|
`${connectionType} connected from server/src/service/database.ts`
|
|
7126
7134
|
);
|
|
@@ -7417,6 +7425,7 @@ var fonts = {
|
|
|
7417
7425
|
loginFields,
|
|
7418
7426
|
mapArrayToOptions,
|
|
7419
7427
|
mapBaseResourceTypeToFormData,
|
|
7428
|
+
mongoose,
|
|
7420
7429
|
normalizeUrl,
|
|
7421
7430
|
packagingOptions,
|
|
7422
7431
|
partnersSchema,
|