@timardex/cluemart-shared 1.2.29 → 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.
Files changed (48) hide show
  1. package/dist/ad-Cv1V8lgJ.d.ts +129 -0
  2. package/dist/ad-IVwm5MLY.d.mts +129 -0
  3. package/dist/{auth-CzEdRDf1.d.ts → auth-BCxQp_CF.d.ts} +1 -1
  4. package/dist/{auth-Ci6Uskch.d.mts → auth-BczaOu28.d.mts} +1 -1
  5. package/dist/{chunk-BO3HICLR.mjs → chunk-4OLDTZXH.mjs} +3 -1
  6. package/dist/chunk-4OLDTZXH.mjs.map +1 -0
  7. package/dist/{chunk-CQ7TCXMI.mjs → chunk-O6LVIQFK.mjs} +3 -5
  8. package/dist/chunk-O6LVIQFK.mjs.map +1 -0
  9. package/dist/formFields/index.d.mts +2 -1
  10. package/dist/formFields/index.d.ts +2 -1
  11. package/dist/{global-2Jk7sRkL.d.ts → global-Bnr6l_NH.d.ts} +21 -1
  12. package/dist/{global-DWuTxnJ8.d.mts → global-_89-F0iL.d.mts} +21 -1
  13. package/dist/graphql/index.d.mts +3 -3
  14. package/dist/graphql/index.d.ts +3 -3
  15. package/dist/hooks/index.d.mts +4 -4
  16. package/dist/hooks/index.d.ts +4 -4
  17. package/dist/index.cjs +112 -76
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.mts +132 -2
  20. package/dist/index.d.ts +132 -2
  21. package/dist/index.mjs +98 -76
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/mongoose/index.cjs +94 -62
  24. package/dist/mongoose/index.cjs.map +1 -1
  25. package/dist/mongoose/index.d.mts +109 -4
  26. package/dist/mongoose/index.d.ts +109 -4
  27. package/dist/mongoose/index.mjs +22 -3
  28. package/dist/mongoose/index.mjs.map +1 -1
  29. package/dist/service/index.cjs +22 -15
  30. package/dist/service/index.cjs.map +1 -1
  31. package/dist/service/index.d.mts +9 -2
  32. package/dist/service/index.d.ts +9 -2
  33. package/dist/service/index.mjs +19 -13
  34. package/dist/service/index.mjs.map +1 -1
  35. package/dist/types/index.cjs +15 -2
  36. package/dist/types/index.cjs.map +1 -1
  37. package/dist/types/index.d.mts +5 -5
  38. package/dist/types/index.d.ts +5 -5
  39. package/dist/types/index.mjs +5 -3
  40. package/dist/utils/index.d.mts +2 -1
  41. package/dist/utils/index.d.ts +2 -1
  42. package/package.json +3 -1
  43. package/dist/ad-Crq-z5Wt.d.mts +0 -69
  44. package/dist/ad-DHetF-th.d.ts +0 -69
  45. package/dist/chunk-BO3HICLR.mjs.map +0 -1
  46. package/dist/chunk-CQ7TCXMI.mjs.map +0 -1
  47. package/dist/user-DbEEY7fv.d.ts +0 -64
  48. package/dist/user-OPY5EOqR.d.mts +0 -64
@@ -0,0 +1,129 @@
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-Bnr6l_NH.js';
3
+
4
+ interface TestersFormData {
5
+ categories?: Category[] | null;
6
+ companyName: string;
7
+ email: string;
8
+ firstName: string;
9
+ lastName: string;
10
+ osType: EnumOSPlatform;
11
+ region: string;
12
+ resourceType: EnumResourceType;
13
+ }
14
+ type CreateTestersFormData = CreateFormData<TestersFormData>;
15
+ interface TesterType extends TestersFormData {
16
+ _id: string;
17
+ active: boolean;
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ }
21
+
22
+ type UserFormData = {
23
+ _id?: string;
24
+ active: boolean;
25
+ avatar?: ResourceImageType | null;
26
+ avatarUpload?: ResourceImageType | null;
27
+ confirmPassword: string;
28
+ email: string;
29
+ firstName: string;
30
+ lastName: string;
31
+ password: string;
32
+ platform?: EnumOSPlatform;
33
+ preferredRegion: string;
34
+ role: EnumUserRole;
35
+ termsAgreement?: TermsAgreement | null;
36
+ };
37
+ type CreateUserFormData = CreateFormData<UserFormData>;
38
+ type UserActivityEvent = {
39
+ resourceId: string;
40
+ startDate: string;
41
+ startTime: string;
42
+ };
43
+ type UserActivity = {
44
+ favourites: {
45
+ events: string[];
46
+ vendors: string[];
47
+ };
48
+ going: {
49
+ events: UserActivityEvent[];
50
+ };
51
+ interested: {
52
+ events: UserActivityEvent[];
53
+ };
54
+ present: {
55
+ events: UserActivityEvent[];
56
+ };
57
+ };
58
+ interface UserType {
59
+ _id: string;
60
+ active: boolean;
61
+ avatar: ResourceImageType | null;
62
+ createdAt: string;
63
+ deletedAt: string | null;
64
+ email: string;
65
+ events: string[] | null;
66
+ firstName: string;
67
+ isTester: boolean;
68
+ lastName: string;
69
+ licences: EnumUserLicence[] | null;
70
+ partners?: PartnerType[] | null;
71
+ password: string;
72
+ platform: EnumOSPlatform | null;
73
+ preferredRegion: string;
74
+ refreshToken: string | null;
75
+ role: EnumUserRole;
76
+ termsAgreement?: TermsAgreement | null;
77
+ updatedAt: string;
78
+ userActivity: UserActivity | null;
79
+ vendor: string | null;
80
+ }
81
+
82
+ declare enum EnumAdShowOn {
83
+ FRONT_PAGE = "Front_page",
84
+ EVENTS_PAGE = "Events_page",
85
+ VENDORS_PAGE = "Vendors_page"
86
+ }
87
+ declare enum EnumAdStatus {
88
+ ACTIVE = "Active",
89
+ PAUSED = "Paused",
90
+ EXPIRED = "Expired"
91
+ }
92
+ declare enum EnumAdType {
93
+ SPONSORED = "Sponsored",
94
+ FREE = "Free"
95
+ }
96
+ declare enum EnumAdStyle {
97
+ BLOOM = "Bloom",
98
+ RISE = "Rise"
99
+ }
100
+ interface AdFormData {
101
+ active: boolean;
102
+ adStyle: EnumAdStyle;
103
+ adType: EnumAdType;
104
+ clui?: string | null;
105
+ end: Date;
106
+ resourceCover: string;
107
+ resourceDescription: string;
108
+ resourceId: string;
109
+ resourceLogo?: string | null;
110
+ resourceName: string;
111
+ resourceRegion: string;
112
+ resourceType: EnumResourceType;
113
+ showOn: EnumAdShowOn;
114
+ socialMedia?: SocialMediaType[] | null;
115
+ start?: Date;
116
+ status: EnumAdStatus;
117
+ targetRegion?: string | null;
118
+ }
119
+ type CreateAdFormData = CreateFormData<AdFormData>;
120
+ interface AdType extends AdFormData {
121
+ _id: string;
122
+ clicks?: number;
123
+ createdAt: Date;
124
+ impressions?: number;
125
+ start: Date;
126
+ updatedAt: Date;
127
+ }
128
+
129
+ export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, type UserActivityEvent as f, type UserActivity as g, EnumAdShowOn as h, EnumAdType as i, EnumAdStyle as j };
@@ -0,0 +1,129 @@
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-_89-F0iL.mjs';
3
+
4
+ interface TestersFormData {
5
+ categories?: Category[] | null;
6
+ companyName: string;
7
+ email: string;
8
+ firstName: string;
9
+ lastName: string;
10
+ osType: EnumOSPlatform;
11
+ region: string;
12
+ resourceType: EnumResourceType;
13
+ }
14
+ type CreateTestersFormData = CreateFormData<TestersFormData>;
15
+ interface TesterType extends TestersFormData {
16
+ _id: string;
17
+ active: boolean;
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ }
21
+
22
+ type UserFormData = {
23
+ _id?: string;
24
+ active: boolean;
25
+ avatar?: ResourceImageType | null;
26
+ avatarUpload?: ResourceImageType | null;
27
+ confirmPassword: string;
28
+ email: string;
29
+ firstName: string;
30
+ lastName: string;
31
+ password: string;
32
+ platform?: EnumOSPlatform;
33
+ preferredRegion: string;
34
+ role: EnumUserRole;
35
+ termsAgreement?: TermsAgreement | null;
36
+ };
37
+ type CreateUserFormData = CreateFormData<UserFormData>;
38
+ type UserActivityEvent = {
39
+ resourceId: string;
40
+ startDate: string;
41
+ startTime: string;
42
+ };
43
+ type UserActivity = {
44
+ favourites: {
45
+ events: string[];
46
+ vendors: string[];
47
+ };
48
+ going: {
49
+ events: UserActivityEvent[];
50
+ };
51
+ interested: {
52
+ events: UserActivityEvent[];
53
+ };
54
+ present: {
55
+ events: UserActivityEvent[];
56
+ };
57
+ };
58
+ interface UserType {
59
+ _id: string;
60
+ active: boolean;
61
+ avatar: ResourceImageType | null;
62
+ createdAt: string;
63
+ deletedAt: string | null;
64
+ email: string;
65
+ events: string[] | null;
66
+ firstName: string;
67
+ isTester: boolean;
68
+ lastName: string;
69
+ licences: EnumUserLicence[] | null;
70
+ partners?: PartnerType[] | null;
71
+ password: string;
72
+ platform: EnumOSPlatform | null;
73
+ preferredRegion: string;
74
+ refreshToken: string | null;
75
+ role: EnumUserRole;
76
+ termsAgreement?: TermsAgreement | null;
77
+ updatedAt: string;
78
+ userActivity: UserActivity | null;
79
+ vendor: string | null;
80
+ }
81
+
82
+ declare enum EnumAdShowOn {
83
+ FRONT_PAGE = "Front_page",
84
+ EVENTS_PAGE = "Events_page",
85
+ VENDORS_PAGE = "Vendors_page"
86
+ }
87
+ declare enum EnumAdStatus {
88
+ ACTIVE = "Active",
89
+ PAUSED = "Paused",
90
+ EXPIRED = "Expired"
91
+ }
92
+ declare enum EnumAdType {
93
+ SPONSORED = "Sponsored",
94
+ FREE = "Free"
95
+ }
96
+ declare enum EnumAdStyle {
97
+ BLOOM = "Bloom",
98
+ RISE = "Rise"
99
+ }
100
+ interface AdFormData {
101
+ active: boolean;
102
+ adStyle: EnumAdStyle;
103
+ adType: EnumAdType;
104
+ clui?: string | null;
105
+ end: Date;
106
+ resourceCover: string;
107
+ resourceDescription: string;
108
+ resourceId: string;
109
+ resourceLogo?: string | null;
110
+ resourceName: string;
111
+ resourceRegion: string;
112
+ resourceType: EnumResourceType;
113
+ showOn: EnumAdShowOn;
114
+ socialMedia?: SocialMediaType[] | null;
115
+ start?: Date;
116
+ status: EnumAdStatus;
117
+ targetRegion?: string | null;
118
+ }
119
+ type CreateAdFormData = CreateFormData<AdFormData>;
120
+ interface AdType extends AdFormData {
121
+ _id: string;
122
+ clicks?: number;
123
+ createdAt: Date;
124
+ impressions?: number;
125
+ start: Date;
126
+ updatedAt: Date;
127
+ }
128
+
129
+ export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, type UserActivityEvent as f, type UserActivity as g, EnumAdShowOn as h, EnumAdType as i, EnumAdStyle as j };
@@ -1,4 +1,4 @@
1
- import { a1 as CreateFormData, T as TermsAgreement } from './global-2Jk7sRkL.js';
1
+ import { a3 as CreateFormData, T as TermsAgreement } from './global-Bnr6l_NH.js';
2
2
  import { EnumOSPlatform } from './enums/index.js';
3
3
 
4
4
  type ContactUsFormData = {
@@ -1,4 +1,4 @@
1
- import { a1 as CreateFormData, T as TermsAgreement } from './global-DWuTxnJ8.mjs';
1
+ import { a3 as CreateFormData, T as TermsAgreement } from './global-_89-F0iL.mjs';
2
2
  import { EnumOSPlatform } from './enums/index.mjs';
3
3
 
4
4
  type ContactUsFormData = {
@@ -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-BO3HICLR.mjs.map
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"]}
@@ -41,7 +41,6 @@ var NotificationModel = mongoose.model(
41
41
  "Notification",
42
42
  schema
43
43
  );
44
- var Notification_default = NotificationModel;
45
44
 
46
45
  // src/mongoose/PushToken.ts
47
46
  import mongoose2 from "mongoose";
@@ -59,10 +58,9 @@ var schema2 = new MongooseSchema2(
59
58
  { timestamps: true }
60
59
  );
61
60
  var PushTokenModel = mongoose2.model("PushToken", schema2);
62
- var PushToken_default = PushTokenModel;
63
61
 
64
62
  export {
65
- Notification_default,
66
- PushToken_default
63
+ NotificationModel,
64
+ PushTokenModel
67
65
  };
68
- //# sourceMappingURL=chunk-CQ7TCXMI.mjs.map
66
+ //# sourceMappingURL=chunk-O6LVIQFK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/mongoose/Notification.ts","../src/mongoose/PushToken.ts"],"sourcesContent":["import mongoose from \"mongoose\";\n\nimport { EnumNotificationResourceType, EnumNotificationType } from \"src/enums\";\nimport {\n CreateBulkNotificationInput,\n NotificationType,\n ObjectId,\n} from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaCreateBulkNotificationInput = Omit<\n CreateBulkNotificationInput,\n \"userIds\"\n> & {\n userIds: ObjectId[];\n};\n\nexport type SchemaNotificationType = Omit<NotificationType, \"userId\"> & {\n userId: ObjectId;\n};\n/**\n * Schema for storing in-app notifications\n * Each notification is tied to a specific user and can be marked as read/unread\n */\nconst schema = new MongooseSchema<SchemaNotificationType>(\n {\n data: {\n resourceId: { required: true, type: String },\n resourceName: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumNotificationResourceType),\n required: true,\n type: String,\n },\n },\n isRead: { default: false, index: true, required: true, type: Boolean },\n message: { required: true, type: String },\n title: { required: true, type: String },\n type: {\n default: EnumNotificationType.SYSTEM,\n enum: Object.values(EnumNotificationType),\n required: true,\n type: String,\n },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\n// Compound index for efficient queries\nschema.index({ isRead: 1, userId: 1 });\nschema.index({ createdAt: -1, userId: 1 });\n\nexport const NotificationModel = mongoose.model<SchemaNotificationType>(\n \"Notification\",\n schema,\n);\n","import mongoose from \"mongoose\";\n\nimport { EnumOSPlatform } from \"src/enums\";\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\ntype PushTokenType = {\n _id: string;\n createdAt: Date;\n platform: EnumOSPlatform;\n token: string;\n updatedAt: Date;\n userId: string;\n};\n\nexport type SchemaPushTokenType = Omit<PushTokenType, \"userId\"> & {\n userId: ObjectId;\n};\n\n/**\n * This is the schema for the push token type.\n * It is used to define the structure of the push token type in the database.\n * The schema is used by Mongoose to create a model for the push token type.\n */\nconst schema = new MongooseSchema<SchemaPushTokenType>(\n {\n platform: {\n enum: Object.values(EnumOSPlatform),\n required: true,\n type: String,\n },\n token: { required: true, type: String },\n userId: { required: true, type: mongoose.Schema.Types.ObjectId },\n },\n { timestamps: true },\n);\n\nexport const PushTokenModel = mongoose.model<SchemaPushTokenType>(\"PushToken\", schema);\n"],"mappings":";;;;;;;AAAA,OAAO,cAAc;AASrB,IAAM,iBAAiB,SAAS;AAgBhC,IAAM,SAAS,IAAI;AAAA,EACjB;AAAA,IACE,MAAM;AAAA,MACJ,YAAY,EAAE,UAAU,MAAM,MAAM,OAAO;AAAA,MAC3C,cAAc,EAAE,UAAU,MAAM,MAAM,OAAO;AAAA,MAC7C,cAAc;AAAA,QACZ,MAAM,OAAO,OAAO,4BAA4B;AAAA,QAChD,UAAU;AAAA,QACV,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,QAAQ,EAAE,SAAS,OAAO,OAAO,MAAM,UAAU,MAAM,MAAM,QAAQ;AAAA,IACrE,SAAS,EAAE,UAAU,MAAM,MAAM,OAAO;AAAA,IACxC,OAAO,EAAE,UAAU,MAAM,MAAM,OAAO;AAAA,IACtC,MAAM;AAAA,MACJ;AAAA,MACA,MAAM,OAAO,OAAO,oBAAoB;AAAA,MACxC,UAAU;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,KAAK;AAAA,MACL,UAAU;AAAA,MACV,MAAM,SAAS,OAAO,MAAM;AAAA,IAC9B;AAAA,EACF;AAAA,EACA,EAAE,YAAY,KAAK;AACrB;AAGA,OAAO,MAAM,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;AACrC,OAAO,MAAM,EAAE,WAAW,IAAI,QAAQ,EAAE,CAAC;AAElC,IAAM,oBAAoB,SAAS;AAAA,EACxC;AAAA,EACA;AACF;;;AC7DA,OAAOA,eAAc;AAKrB,IAAMC,kBAAiBC,UAAS;AAoBhC,IAAMC,UAAS,IAAIF;AAAA,EACjB;AAAA,IACE,UAAU;AAAA,MACR,MAAM,OAAO,OAAO,cAAc;AAAA,MAClC,UAAU;AAAA,MACV,MAAM;AAAA,IACR;AAAA,IACA,OAAO,EAAE,UAAU,MAAM,MAAM,OAAO;AAAA,IACtC,QAAQ,EAAE,UAAU,MAAM,MAAMC,UAAS,OAAO,MAAM,SAAS;AAAA,EACjE;AAAA,EACA,EAAE,YAAY,KAAK;AACrB;AAEO,IAAM,iBAAiBA,UAAS,MAA2B,aAAaC,OAAM;","names":["mongoose","MongooseSchema","mongoose","schema"]}
@@ -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-DWuTxnJ8.mjs';
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-2Jk7sRkL.js';
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';
@@ -205,6 +206,13 @@ type SchemaCreateBulkNotificationInput = Omit<CreateBulkNotificationInput, "user
205
206
  type SchemaNotificationType = Omit<NotificationType, "userId"> & {
206
207
  userId: ObjectId;
207
208
  };
209
+ declare const NotificationModel: mongoose.Model<SchemaNotificationType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaNotificationType, {}, {}> & Omit<NotificationType, "userId"> & {
210
+ userId: ObjectId;
211
+ } & Required<{
212
+ _id: string;
213
+ }> & {
214
+ __v: number;
215
+ }, any>;
208
216
 
209
217
  interface NotificationDataType {
210
218
  resourceId: string;
@@ -259,6 +267,18 @@ declare const ParticipantSchema: mongoose.Schema<SchemaParticipantType, mongoose
259
267
  } & {
260
268
  __v: number;
261
269
  }>;
270
+ declare const ChatModel: mongoose.Model<SchemaChatType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "messages" | "participants" | "resourceInfo"> & {
271
+ participants: SchemaParticipantType[];
272
+ messages: SchemaChatMessageType[];
273
+ resourceInfo: {
274
+ eventId: ObjectId;
275
+ vendorId: ObjectId;
276
+ } | null;
277
+ } & Required<{
278
+ _id: string;
279
+ }> & {
280
+ __v: number;
281
+ }, any>;
262
282
 
263
283
  type Nullable<T> = {
264
284
  [K in keyof T]: T[K] | null | undefined;
@@ -455,4 +475,4 @@ interface GraphQLContext {
455
475
  response: Response;
456
476
  }
457
477
 
458
- export { type Subcategory as $, type SchemaCreateBulkNotificationInput as A, type BaseResourceTypeFormData as B, type Category as C, type DeviceInfo as D, type EventType as E, type FormField as F, type SchemaNotificationType as G, type GraphQLContext as H, type NotificationDataType as I, type ParticipantType as J, type ChatMessageInput as K, type LocationType as L, type ChatMessageType as M, type NotificationType as N, type OptionItem as O, type PartnerType as P, type Nullable as Q, type Requirement as R, type StallType as S, type TermsAgreement as T, type BaseResourceType as U, type VendorType as V, type DateTimeType as W, type Region as X, type GeocodeLocation as Y, type MapMultiLocation as Z, type SubcategoryItems as _, type FormDateField as a, type ImageObjectType as a0, type CreateFormData as a1, EnumPubSubEvents as a2, type AuthUser as a3, type SubscriptionPayload as a4, type DateTimeWithPriceType as a5, type PaymentInfoType as a6, type CreateBulkNotificationInput as a7, type VendorLocation as a8, type VendorMenuType as a9, type VendorAttributes as aa, type ChatType as b, type EventInfoType as c, type NotificationCount as d, type RelationType as e, type ResourceConnectionsType as f, type VendorInfoType as g, type VendorFormData as h, type CreateVendorFormData as i, type VendorInfoFormData as j, type CreateVendorInfoFormData as k, type EventFormData as l, type CreateEventFormData as m, type EventInfoFormData as n, type CreateEventInfoFormData as o, type OwnerType as p, type ObjectId as q, type SocialMediaType as r, type ResourceImageType as s, type ResourceContactDetailsType as t, type PosterUsageType as u, type RelationDate as v, type SchemaChatMessageType as w, type SchemaParticipantType as x, type SchemaChatType as y, ParticipantSchema as z };
478
+ export { type MapMultiLocation as $, ChatModel as A, type BaseResourceTypeFormData as B, type Category as C, type DeviceInfo as D, type EventType as E, type FormField as F, type SchemaCreateBulkNotificationInput as G, type SchemaNotificationType as H, NotificationModel as I, type GraphQLContext as J, type NotificationDataType as K, type LocationType as L, type ParticipantType as M, type NotificationType as N, type OptionItem as O, type PartnerType as P, type ChatMessageInput as Q, type Requirement as R, type StallType as S, type TermsAgreement as T, type ChatMessageType as U, type VendorType as V, type Nullable as W, type BaseResourceType as X, type DateTimeType as Y, type Region as Z, type GeocodeLocation as _, type FormDateField as a, type SubcategoryItems as a0, type Subcategory as a1, type ImageObjectType as a2, type CreateFormData as a3, EnumPubSubEvents as a4, type AuthUser as a5, type SubscriptionPayload as a6, type DateTimeWithPriceType as a7, type PaymentInfoType as a8, type CreateBulkNotificationInput as a9, type VendorLocation as aa, type VendorMenuType as ab, type VendorAttributes as ac, type ChatType as b, type EventInfoType as c, type NotificationCount as d, type RelationType as e, type ResourceConnectionsType as f, type VendorInfoType as g, type VendorFormData as h, type CreateVendorFormData as i, type VendorInfoFormData as j, type CreateVendorInfoFormData as k, type EventFormData as l, type CreateEventFormData as m, type EventInfoFormData as n, type CreateEventInfoFormData as o, type OwnerType as p, type ObjectId as q, type SocialMediaType as r, type ResourceImageType as s, type ResourceContactDetailsType as t, type PosterUsageType as u, type RelationDate as v, type SchemaChatMessageType as w, type SchemaParticipantType as x, type SchemaChatType as y, ParticipantSchema as z };
@@ -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';
@@ -205,6 +206,13 @@ type SchemaCreateBulkNotificationInput = Omit<CreateBulkNotificationInput, "user
205
206
  type SchemaNotificationType = Omit<NotificationType, "userId"> & {
206
207
  userId: ObjectId;
207
208
  };
209
+ declare const NotificationModel: mongoose.Model<SchemaNotificationType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaNotificationType, {}, {}> & Omit<NotificationType, "userId"> & {
210
+ userId: ObjectId;
211
+ } & Required<{
212
+ _id: string;
213
+ }> & {
214
+ __v: number;
215
+ }, any>;
208
216
 
209
217
  interface NotificationDataType {
210
218
  resourceId: string;
@@ -259,6 +267,18 @@ declare const ParticipantSchema: mongoose.Schema<SchemaParticipantType, mongoose
259
267
  } & {
260
268
  __v: number;
261
269
  }>;
270
+ declare const ChatModel: mongoose.Model<SchemaChatType, {}, {}, {}, mongoose.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "messages" | "participants" | "resourceInfo"> & {
271
+ participants: SchemaParticipantType[];
272
+ messages: SchemaChatMessageType[];
273
+ resourceInfo: {
274
+ eventId: ObjectId;
275
+ vendorId: ObjectId;
276
+ } | null;
277
+ } & Required<{
278
+ _id: string;
279
+ }> & {
280
+ __v: number;
281
+ }, any>;
262
282
 
263
283
  type Nullable<T> = {
264
284
  [K in keyof T]: T[K] | null | undefined;
@@ -455,4 +475,4 @@ interface GraphQLContext {
455
475
  response: Response;
456
476
  }
457
477
 
458
- export { type Subcategory as $, type SchemaCreateBulkNotificationInput as A, type BaseResourceTypeFormData as B, type Category as C, type DeviceInfo as D, type EventType as E, type FormField as F, type SchemaNotificationType as G, type GraphQLContext as H, type NotificationDataType as I, type ParticipantType as J, type ChatMessageInput as K, type LocationType as L, type ChatMessageType as M, type NotificationType as N, type OptionItem as O, type PartnerType as P, type Nullable as Q, type Requirement as R, type StallType as S, type TermsAgreement as T, type BaseResourceType as U, type VendorType as V, type DateTimeType as W, type Region as X, type GeocodeLocation as Y, type MapMultiLocation as Z, type SubcategoryItems as _, type FormDateField as a, type ImageObjectType as a0, type CreateFormData as a1, EnumPubSubEvents as a2, type AuthUser as a3, type SubscriptionPayload as a4, type DateTimeWithPriceType as a5, type PaymentInfoType as a6, type CreateBulkNotificationInput as a7, type VendorLocation as a8, type VendorMenuType as a9, type VendorAttributes as aa, type ChatType as b, type EventInfoType as c, type NotificationCount as d, type RelationType as e, type ResourceConnectionsType as f, type VendorInfoType as g, type VendorFormData as h, type CreateVendorFormData as i, type VendorInfoFormData as j, type CreateVendorInfoFormData as k, type EventFormData as l, type CreateEventFormData as m, type EventInfoFormData as n, type CreateEventInfoFormData as o, type OwnerType as p, type ObjectId as q, type SocialMediaType as r, type ResourceImageType as s, type ResourceContactDetailsType as t, type PosterUsageType as u, type RelationDate as v, type SchemaChatMessageType as w, type SchemaParticipantType as x, type SchemaChatType as y, ParticipantSchema as z };
478
+ export { type MapMultiLocation as $, ChatModel as A, type BaseResourceTypeFormData as B, type Category as C, type DeviceInfo as D, type EventType as E, type FormField as F, type SchemaCreateBulkNotificationInput as G, type SchemaNotificationType as H, NotificationModel as I, type GraphQLContext as J, type NotificationDataType as K, type LocationType as L, type ParticipantType as M, type NotificationType as N, type OptionItem as O, type PartnerType as P, type ChatMessageInput as Q, type Requirement as R, type StallType as S, type TermsAgreement as T, type ChatMessageType as U, type VendorType as V, type Nullable as W, type BaseResourceType as X, type DateTimeType as Y, type Region as Z, type GeocodeLocation as _, type FormDateField as a, type SubcategoryItems as a0, type Subcategory as a1, type ImageObjectType as a2, type CreateFormData as a3, EnumPubSubEvents as a4, type AuthUser as a5, type SubscriptionPayload as a6, type DateTimeWithPriceType as a7, type PaymentInfoType as a8, type CreateBulkNotificationInput as a9, type VendorLocation as aa, type VendorMenuType as ab, type VendorAttributes as ac, type ChatType as b, type EventInfoType as c, type NotificationCount as d, type RelationType as e, type ResourceConnectionsType as f, type VendorInfoType as g, type VendorFormData as h, type CreateVendorFormData as i, type VendorInfoFormData as j, type CreateVendorInfoFormData as k, type EventFormData as l, type CreateEventFormData as m, type EventInfoFormData as n, type CreateEventInfoFormData as o, type OwnerType as p, type ObjectId as q, type SocialMediaType as r, type ResourceImageType as s, type ResourceContactDetailsType as t, type PosterUsageType as u, type RelationDate as v, type SchemaChatMessageType as w, type SchemaParticipantType as x, type SchemaChatType as y, ParticipantSchema as z };
@@ -1,9 +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-DWuTxnJ8.mjs';
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, A as AdType, E as EnumAdStatus } from '../ad-Crq-z5Wt.mjs';
5
- import { U as UserType } from '../user-OPY5EOqR.mjs';
4
+ import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-IVwm5MLY.mjs';
6
5
  import { R as ResourceActivityType } from '../resourceActivities-BIjtlOGp.mjs';
6
+ import 'express';
7
7
  import 'mongoose';
8
8
  import 'react-hook-form';
9
9
 
@@ -1,9 +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-2Jk7sRkL.js';
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, A as AdType, E as EnumAdStatus } from '../ad-DHetF-th.js';
5
- import { U as UserType } from '../user-DbEEY7fv.js';
4
+ import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-Cv1V8lgJ.js';
6
5
  import { R as ResourceActivityType } from '../resourceActivities-B4roVKtQ.js';
6
+ import 'express';
7
7
  import 'mongoose';
8
8
  import 'react-hook-form';
9
9
 
@@ -1,7 +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-DWuTxnJ8.mjs';
2
- import { a as UserFormData, C as CreateUserFormData } from '../user-OPY5EOqR.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-Ci6Uskch.mjs';
4
- import { a as TestersFormData, C as CreateTestersFormData, b as AdFormData, c as CreateAdFormData } from '../ad-Crq-z5Wt.mjs';
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';
5
5
  import 'mongoose';
6
6
  import 'react-hook-form';
7
7
  import '../enums/index.mjs';
@@ -1,7 +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-2Jk7sRkL.js';
2
- import { a as UserFormData, C as CreateUserFormData } from '../user-DbEEY7fv.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-CzEdRDf1.js';
4
- import { a as TestersFormData, C as CreateTestersFormData, b as AdFormData, c as CreateAdFormData } from '../ad-DHetF-th.js';
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';
5
5
  import 'mongoose';
6
6
  import 'react-hook-form';
7
7
  import '../enums/index.js';