@timardex/cluemart-shared 1.2.35 → 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.
Files changed (48) hide show
  1. package/dist/{ad-CWAaH5Ql.d.mts → ad-Bv5fLkN0.d.mts} +1 -1
  2. package/dist/{ad-D60cy5L4.d.ts → ad-DDPNpx02.d.ts} +1 -1
  3. package/dist/{auth-BslKse3L.d.mts → auth-BVGs-5Vm.d.mts} +1 -1
  4. package/dist/{auth-Ch9Nt77g.d.ts → auth-BhUIvvZ2.d.ts} +1 -1
  5. package/dist/formFields/index.d.mts +1 -3
  6. package/dist/formFields/index.d.ts +1 -3
  7. package/dist/{global-DvxKMAQD.d.ts → global-BA84KF8J.d.ts} +2 -148
  8. package/dist/{global-j9FEfVZs.d.mts → global-BEqzo5Z2.d.mts} +2 -148
  9. package/dist/graphql/index.d.mts +3 -5
  10. package/dist/graphql/index.d.ts +3 -5
  11. package/dist/hooks/index.d.mts +3 -5
  12. package/dist/hooks/index.d.ts +3 -5
  13. package/dist/hooks/index.mjs +5 -5
  14. package/dist/index.cjs +17 -1013
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.mts +311 -819
  17. package/dist/index.d.ts +311 -819
  18. package/dist/index.mjs +17 -986
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/resourceActivities-0CdofGJp.d.mts +96 -0
  21. package/dist/resourceActivities-BjgH9TFc.d.ts +96 -0
  22. package/dist/types/index.cjs +2 -26
  23. package/dist/types/index.cjs.map +1 -1
  24. package/dist/types/index.d.mts +4 -6
  25. package/dist/types/index.d.ts +4 -6
  26. package/dist/types/index.mjs +11 -8
  27. package/dist/types/index.mjs.map +1 -1
  28. package/dist/utils/index.d.mts +1 -3
  29. package/dist/utils/index.d.ts +1 -3
  30. package/package.json +2 -1
  31. package/dist/chunk-4OLDTZXH.mjs +0 -26
  32. package/dist/chunk-4OLDTZXH.mjs.map +0 -1
  33. package/dist/chunk-WWL2Q5DN.mjs +0 -44
  34. package/dist/chunk-WWL2Q5DN.mjs.map +0 -1
  35. package/dist/mongoose/index.cjs +0 -1085
  36. package/dist/mongoose/index.cjs.map +0 -1
  37. package/dist/mongoose/index.d.mts +0 -415
  38. package/dist/mongoose/index.d.ts +0 -415
  39. package/dist/mongoose/index.mjs +0 -878
  40. package/dist/mongoose/index.mjs.map +0 -1
  41. package/dist/resourceActivities-B4roVKtQ.d.ts +0 -34
  42. package/dist/resourceActivities-BIjtlOGp.d.mts +0 -34
  43. package/dist/service/index.cjs +0 -172
  44. package/dist/service/index.cjs.map +0 -1
  45. package/dist/service/index.d.mts +0 -25
  46. package/dist/service/index.d.ts +0 -25
  47. package/dist/service/index.mjs +0 -79
  48. package/dist/service/index.mjs.map +0 -1
@@ -0,0 +1,96 @@
1
+ import { EnumChatType, EnumNotificationType, EnumNotificationResourceType, EnumResourceType, EnumOSPlatform } from './enums/index.mjs';
2
+
3
+ type ParticipantType = {
4
+ active: boolean;
5
+ email: string;
6
+ userId: string;
7
+ };
8
+ interface ChatMessageInput {
9
+ content: string;
10
+ senderId: string;
11
+ }
12
+ interface ChatMessageType {
13
+ _id?: string;
14
+ content: string;
15
+ createdAt?: string;
16
+ senderAvatar: string | null;
17
+ senderId: string;
18
+ senderName: string;
19
+ updatedAt?: string;
20
+ }
21
+ interface ChatType {
22
+ _id: string;
23
+ active: boolean;
24
+ chatType: EnumChatType;
25
+ chatName: string;
26
+ createdAt: string;
27
+ messages: ChatMessageType[];
28
+ participants: ParticipantType[];
29
+ resourceInfo: {
30
+ eventId: string;
31
+ vendorId: string;
32
+ } | null;
33
+ updatedAt: string;
34
+ deletedAt: string | null;
35
+ }
36
+
37
+ interface NotificationDataType {
38
+ resourceId: string;
39
+ resourceName: string;
40
+ resourceType: EnumNotificationResourceType;
41
+ }
42
+ type NotificationType = {
43
+ _id: string;
44
+ userId: string;
45
+ title: string;
46
+ message: string;
47
+ isRead: boolean;
48
+ type: EnumNotificationType;
49
+ data: NotificationDataType | null;
50
+ createdAt: string;
51
+ updatedAt: string;
52
+ };
53
+ type NotificationCount = {
54
+ total: number;
55
+ unread: number;
56
+ };
57
+ type CreateBulkNotificationInput = {
58
+ data: NotificationDataType | null;
59
+ message: string;
60
+ title: string;
61
+ type: EnumNotificationType;
62
+ userIds: string[];
63
+ };
64
+
65
+ declare enum EnumActivity {
66
+ FAVORITE = "FAVORITE",
67
+ GOING = "GOING",
68
+ INTERESTED = "INTERESTED",
69
+ PRESENT = "PRESENT",
70
+ VIEW = "VIEW"
71
+ }
72
+ type ResourceActivityEntry = {
73
+ activityType: EnumActivity;
74
+ location: {
75
+ type: "Point";
76
+ coordinates: number[];
77
+ } | null;
78
+ startDate?: string | null;
79
+ startTime?: string | null;
80
+ timestamp: Date;
81
+ userAgent: EnumOSPlatform;
82
+ userId?: string | null;
83
+ };
84
+ type ResourceActivityType = {
85
+ _id: string;
86
+ resourceType: EnumResourceType;
87
+ resourceId: string;
88
+ activity: ResourceActivityEntry[];
89
+ };
90
+ type ResourceActivityInputType = {
91
+ resourceId: string;
92
+ resourceType: string;
93
+ activity: Omit<ResourceActivityEntry, "timestamp">;
94
+ };
95
+
96
+ export { type ChatType as C, EnumActivity as E, type NotificationType as N, type ParticipantType as P, type ResourceActivityType as R, type NotificationCount as a, type ChatMessageInput as b, type ChatMessageType as c, type NotificationDataType as d, type CreateBulkNotificationInput as e, type ResourceActivityEntry as f, type ResourceActivityInputType as g };
@@ -0,0 +1,96 @@
1
+ import { EnumChatType, EnumNotificationType, EnumNotificationResourceType, EnumResourceType, EnumOSPlatform } from './enums/index.js';
2
+
3
+ type ParticipantType = {
4
+ active: boolean;
5
+ email: string;
6
+ userId: string;
7
+ };
8
+ interface ChatMessageInput {
9
+ content: string;
10
+ senderId: string;
11
+ }
12
+ interface ChatMessageType {
13
+ _id?: string;
14
+ content: string;
15
+ createdAt?: string;
16
+ senderAvatar: string | null;
17
+ senderId: string;
18
+ senderName: string;
19
+ updatedAt?: string;
20
+ }
21
+ interface ChatType {
22
+ _id: string;
23
+ active: boolean;
24
+ chatType: EnumChatType;
25
+ chatName: string;
26
+ createdAt: string;
27
+ messages: ChatMessageType[];
28
+ participants: ParticipantType[];
29
+ resourceInfo: {
30
+ eventId: string;
31
+ vendorId: string;
32
+ } | null;
33
+ updatedAt: string;
34
+ deletedAt: string | null;
35
+ }
36
+
37
+ interface NotificationDataType {
38
+ resourceId: string;
39
+ resourceName: string;
40
+ resourceType: EnumNotificationResourceType;
41
+ }
42
+ type NotificationType = {
43
+ _id: string;
44
+ userId: string;
45
+ title: string;
46
+ message: string;
47
+ isRead: boolean;
48
+ type: EnumNotificationType;
49
+ data: NotificationDataType | null;
50
+ createdAt: string;
51
+ updatedAt: string;
52
+ };
53
+ type NotificationCount = {
54
+ total: number;
55
+ unread: number;
56
+ };
57
+ type CreateBulkNotificationInput = {
58
+ data: NotificationDataType | null;
59
+ message: string;
60
+ title: string;
61
+ type: EnumNotificationType;
62
+ userIds: string[];
63
+ };
64
+
65
+ declare enum EnumActivity {
66
+ FAVORITE = "FAVORITE",
67
+ GOING = "GOING",
68
+ INTERESTED = "INTERESTED",
69
+ PRESENT = "PRESENT",
70
+ VIEW = "VIEW"
71
+ }
72
+ type ResourceActivityEntry = {
73
+ activityType: EnumActivity;
74
+ location: {
75
+ type: "Point";
76
+ coordinates: number[];
77
+ } | null;
78
+ startDate?: string | null;
79
+ startTime?: string | null;
80
+ timestamp: Date;
81
+ userAgent: EnumOSPlatform;
82
+ userId?: string | null;
83
+ };
84
+ type ResourceActivityType = {
85
+ _id: string;
86
+ resourceType: EnumResourceType;
87
+ resourceId: string;
88
+ activity: ResourceActivityEntry[];
89
+ };
90
+ type ResourceActivityInputType = {
91
+ resourceId: string;
92
+ resourceType: string;
93
+ activity: Omit<ResourceActivityEntry, "timestamp">;
94
+ };
95
+
96
+ export { type ChatType as C, EnumActivity as E, type NotificationType as N, type ParticipantType as P, type ResourceActivityType as R, type NotificationCount as a, type ChatMessageInput as b, type ChatMessageType as c, type NotificationDataType as d, type CreateBulkNotificationInput as e, type ResourceActivityEntry as f, type ResourceActivityInputType as g };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
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
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/types/index.ts
@@ -34,22 +24,10 @@ __export(types_exports, {
34
24
  EnumAdShowOn: () => EnumAdShowOn,
35
25
  EnumAdStatus: () => EnumAdStatus,
36
26
  EnumAdStyle: () => EnumAdStyle,
37
- EnumAdType: () => EnumAdType,
38
- EnumPubSubEvents: () => EnumPubSubEvents,
39
- mongoose: () => import_mongoose.default
27
+ EnumAdType: () => EnumAdType
40
28
  });
41
29
  module.exports = __toCommonJS(types_exports);
42
30
 
43
- // src/types/global.ts
44
- var import_mongoose = __toESM(require("mongoose"));
45
- var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
46
- EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
47
- EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
48
- EnumPubSubEvents2["GET_NOTIFICATIONS_COUNT"] = "GET_NOTIFICATIONS_COUNT";
49
- EnumPubSubEvents2["USER_TYPING"] = "USER_TYPING";
50
- return EnumPubSubEvents2;
51
- })(EnumPubSubEvents || {});
52
-
53
31
  // src/types/ad.ts
54
32
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
55
33
  EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
@@ -89,8 +67,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
89
67
  EnumAdShowOn,
90
68
  EnumAdStatus,
91
69
  EnumAdStyle,
92
- EnumAdType,
93
- EnumPubSubEvents,
94
- mongoose
70
+ EnumAdType
95
71
  });
96
72
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/index.ts","../../src/types/global.ts","../../src/types/ad.ts","../../src/types/resourceActivities.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./event\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./vendor\";\nexport * from \"./testers\";\nexport * from \"./user\";\nexport * from \"./ad\";\nexport * from \"./resourceActivities\";\n","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 { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdShowOn {\n FRONT_PAGE = \"Front_page\",\n EVENTS_PAGE = \"Events_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport interface AdFormData {\n active: boolean;\n adStyle: EnumAdStyle;\n adType: EnumAdType;\n clui?: string | null;\n end: Date; // ISO date string\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo?: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n showOn: EnumAdShowOn;\n socialMedia?: SocialMediaType[] | null;\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion?: string | null;\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date;\n}\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA;AAAA;;;ACCA,sBAAqB;AA6Nd,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;;;AC1NL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,kBAAe;AAHL,SAAAA;AAAA,GAAA;AAML,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,eAAY;AACZ,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;;;ACnBL,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":["mongoose","EnumPubSubEvents","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity"]}
1
+ {"version":3,"sources":["../../src/types/index.ts","../../src/types/ad.ts","../../src/types/resourceActivities.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./event\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./vendor\";\nexport * from \"./testers\";\nexport * from \"./user\";\nexport * from \"./ad\";\nexport * from \"./resourceActivities\";\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdShowOn {\n FRONT_PAGE = \"Front_page\",\n EVENTS_PAGE = \"Events_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport interface AdFormData {\n active: boolean;\n adStyle: EnumAdStyle;\n adType: EnumAdType;\n clui?: string | null;\n end: Date; // ISO date string\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo?: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n showOn: EnumAdShowOn;\n socialMedia?: SocialMediaType[] | null;\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion?: string | null;\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date;\n}\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIO,IAAK,eAAL,kBAAKA,kBAAL;AACL,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,kBAAe;AAHL,SAAAA;AAAA,GAAA;AAML,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,eAAY;AACZ,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;;;ACnBL,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":["EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity"]}
@@ -1,10 +1,8 @@
1
1
  import { EnumResourceType } from '../enums/index.mjs';
2
- export { e as ContactUsFormData, f as CreateContactUsFormData, C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, d as CreateResetPasswordFormData, c as CreateValidateVerificationTokenFormData, L as LoginFormData, R as RegisterFormData, g as RequestPasswordResetFormData, h as ResetPasswordFormData, V as ValidateVerificationTokenFormData } from '../auth-BslKse3L.mjs';
3
- export { a3 as AuthUser, U as BaseResourceType, B as BaseResourceTypeFormData, C as Category, K as ChatMessageInput, M as ChatMessageType, b as ChatType, a9 as CreateBulkNotificationInput, m as CreateEventFormData, o as CreateEventInfoFormData, a1 as CreateFormData, i as CreateVendorFormData, k as CreateVendorInfoFormData, W as DateTimeType, a6 as DateTimeWithPriceType, D as DeviceInfo, a2 as EnumPubSubEvents, l as EventFormData, n as EventInfoFormData, c as EventInfoType, E as EventType, a as FormDateField, F as FormField, Y as GeocodeLocation, a5 as GraphQLContext, a0 as ImageObjectType, L as LocationType, Z as MapMultiLocation, d as NotificationCount, a8 as NotificationDataType, N as NotificationType, Q as Nullable, q as ObjectId, O as OptionItem, p as OwnerType, J as ParticipantType, P as PartnerType, a7 as PaymentInfoType, u as PosterUsageType, X as Region, v as RelationDate, e as RelationType, R as Requirement, f as ResourceConnectionsType, t as ResourceContactDetailsType, s as ResourceImageType, r as SocialMediaType, S as StallType, $ as Subcategory, _ as SubcategoryItems, a4 as SubscriptionPayload, T as TermsAgreement, ac as VendorAttributes, h as VendorFormData, j as VendorInfoFormData, g as VendorInfoType, aa as VendorLocation, ab as VendorMenuType, V as VendorType } from '../global-j9FEfVZs.mjs';
4
- export { d as AdFormData, A as AdType, e as CreateAdFormData, c as CreateTestersFormData, C as CreateUserFormData, h as EnumAdShowOn, E as EnumAdStatus, j as EnumAdStyle, i as EnumAdType, T as TesterType, b as TestersFormData, g as UserActivity, f as UserActivityEvent, a as UserFormData, U as UserType } from '../ad-CWAaH5Ql.mjs';
5
- export { E as EnumActivity, a as ResourceActivityEntry, b as ResourceActivityInputType, R as ResourceActivityType } from '../resourceActivities-BIjtlOGp.mjs';
6
- export { default as mongoose } from 'mongoose';
7
- import 'express';
2
+ export { e as ContactUsFormData, f as CreateContactUsFormData, C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, d as CreateResetPasswordFormData, c as CreateValidateVerificationTokenFormData, L as LoginFormData, R as RegisterFormData, g as RequestPasswordResetFormData, h as ResetPasswordFormData, V as ValidateVerificationTokenFormData } from '../auth-BVGs-5Vm.mjs';
3
+ export { b as ChatMessageInput, c as ChatMessageType, C as ChatType, e as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, d as NotificationDataType, N as NotificationType, P as ParticipantType, f as ResourceActivityEntry, g as ResourceActivityInputType, R as ResourceActivityType } from '../resourceActivities-0CdofGJp.mjs';
4
+ export { s as BaseResourceType, B as BaseResourceTypeFormData, C as Category, k as CreateEventFormData, m as CreateEventInfoFormData, x as CreateFormData, g as CreateVendorFormData, i as CreateVendorInfoFormData, t as DateTimeType, y as DateTimeWithPriceType, D as DeviceInfo, j as EventFormData, l as EventInfoFormData, b as EventInfoType, E as EventType, a as FormDateField, F as FormField, G as GeocodeLocation, I as ImageObjectType, L as LocationType, M as MapMultiLocation, N as Nullable, O as OptionItem, q as OwnerType, P as PartnerType, z as PaymentInfoType, r as PosterUsageType, u as Region, A as RelationDate, c as RelationType, R as Requirement, d as ResourceConnectionsType, n as ResourceContactDetailsType, o as ResourceImageType, p as SocialMediaType, S as StallType, w as Subcategory, v as SubcategoryItems, T as TermsAgreement, K as VendorAttributes, f as VendorFormData, h as VendorInfoFormData, e as VendorInfoType, H as VendorLocation, J as VendorMenuType, V as VendorType } from '../global-BEqzo5Z2.mjs';
5
+ export { d as AdFormData, A as AdType, e as CreateAdFormData, c as CreateTestersFormData, C as CreateUserFormData, h as EnumAdShowOn, E as EnumAdStatus, j as EnumAdStyle, i as EnumAdType, T as TesterType, b as TestersFormData, g as UserActivity, f as UserActivityEvent, a as UserFormData, U as UserType } from '../ad-Bv5fLkN0.mjs';
8
6
  import 'react-hook-form';
9
7
 
10
8
  interface AdminUpdateResourceType {
@@ -1,10 +1,8 @@
1
1
  import { EnumResourceType } from '../enums/index.js';
2
- export { e as ContactUsFormData, f as CreateContactUsFormData, C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, d as CreateResetPasswordFormData, c as CreateValidateVerificationTokenFormData, L as LoginFormData, R as RegisterFormData, g as RequestPasswordResetFormData, h as ResetPasswordFormData, V as ValidateVerificationTokenFormData } from '../auth-Ch9Nt77g.js';
3
- export { a3 as AuthUser, U as BaseResourceType, B as BaseResourceTypeFormData, C as Category, K as ChatMessageInput, M as ChatMessageType, b as ChatType, a9 as CreateBulkNotificationInput, m as CreateEventFormData, o as CreateEventInfoFormData, a1 as CreateFormData, i as CreateVendorFormData, k as CreateVendorInfoFormData, W as DateTimeType, a6 as DateTimeWithPriceType, D as DeviceInfo, a2 as EnumPubSubEvents, l as EventFormData, n as EventInfoFormData, c as EventInfoType, E as EventType, a as FormDateField, F as FormField, Y as GeocodeLocation, a5 as GraphQLContext, a0 as ImageObjectType, L as LocationType, Z as MapMultiLocation, d as NotificationCount, a8 as NotificationDataType, N as NotificationType, Q as Nullable, q as ObjectId, O as OptionItem, p as OwnerType, J as ParticipantType, P as PartnerType, a7 as PaymentInfoType, u as PosterUsageType, X as Region, v as RelationDate, e as RelationType, R as Requirement, f as ResourceConnectionsType, t as ResourceContactDetailsType, s as ResourceImageType, r as SocialMediaType, S as StallType, $ as Subcategory, _ as SubcategoryItems, a4 as SubscriptionPayload, T as TermsAgreement, ac as VendorAttributes, h as VendorFormData, j as VendorInfoFormData, g as VendorInfoType, aa as VendorLocation, ab as VendorMenuType, V as VendorType } from '../global-DvxKMAQD.js';
4
- export { d as AdFormData, A as AdType, e as CreateAdFormData, c as CreateTestersFormData, C as CreateUserFormData, h as EnumAdShowOn, E as EnumAdStatus, j as EnumAdStyle, i as EnumAdType, T as TesterType, b as TestersFormData, g as UserActivity, f as UserActivityEvent, a as UserFormData, U as UserType } from '../ad-D60cy5L4.js';
5
- export { E as EnumActivity, a as ResourceActivityEntry, b as ResourceActivityInputType, R as ResourceActivityType } from '../resourceActivities-B4roVKtQ.js';
6
- export { default as mongoose } from 'mongoose';
7
- import 'express';
2
+ export { e as ContactUsFormData, f as CreateContactUsFormData, C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, d as CreateResetPasswordFormData, c as CreateValidateVerificationTokenFormData, L as LoginFormData, R as RegisterFormData, g as RequestPasswordResetFormData, h as ResetPasswordFormData, V as ValidateVerificationTokenFormData } from '../auth-BhUIvvZ2.js';
3
+ export { b as ChatMessageInput, c as ChatMessageType, C as ChatType, e as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, d as NotificationDataType, N as NotificationType, P as ParticipantType, f as ResourceActivityEntry, g as ResourceActivityInputType, R as ResourceActivityType } from '../resourceActivities-BjgH9TFc.js';
4
+ export { s as BaseResourceType, B as BaseResourceTypeFormData, C as Category, k as CreateEventFormData, m as CreateEventInfoFormData, x as CreateFormData, g as CreateVendorFormData, i as CreateVendorInfoFormData, t as DateTimeType, y as DateTimeWithPriceType, D as DeviceInfo, j as EventFormData, l as EventInfoFormData, b as EventInfoType, E as EventType, a as FormDateField, F as FormField, G as GeocodeLocation, I as ImageObjectType, L as LocationType, M as MapMultiLocation, N as Nullable, O as OptionItem, q as OwnerType, P as PartnerType, z as PaymentInfoType, r as PosterUsageType, u as Region, A as RelationDate, c as RelationType, R as Requirement, d as ResourceConnectionsType, n as ResourceContactDetailsType, o as ResourceImageType, p as SocialMediaType, S as StallType, w as Subcategory, v as SubcategoryItems, T as TermsAgreement, K as VendorAttributes, f as VendorFormData, h as VendorInfoFormData, e as VendorInfoType, H as VendorLocation, J as VendorMenuType, V as VendorType } from '../global-BA84KF8J.js';
5
+ export { d as AdFormData, A as AdType, e as CreateAdFormData, c as CreateTestersFormData, C as CreateUserFormData, h as EnumAdShowOn, E as EnumAdStatus, j as EnumAdStyle, i as EnumAdType, T as TesterType, b as TestersFormData, g as UserActivity, f as UserActivityEvent, a as UserFormData, U as UserType } from '../ad-DDPNpx02.js';
8
6
  import 'react-hook-form';
9
7
 
10
8
  interface AdminUpdateResourceType {
@@ -1,21 +1,24 @@
1
- import {
2
- EnumActivity,
3
- EnumPubSubEvents,
4
- mongoose
5
- } from "../chunk-4OLDTZXH.mjs";
6
1
  import {
7
2
  EnumAdShowOn,
8
3
  EnumAdStatus,
9
4
  EnumAdStyle,
10
5
  EnumAdType
11
6
  } from "../chunk-XXZPSRMS.mjs";
7
+
8
+ // src/types/resourceActivities.ts
9
+ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10
+ EnumActivity2["FAVORITE"] = "FAVORITE";
11
+ EnumActivity2["GOING"] = "GOING";
12
+ EnumActivity2["INTERESTED"] = "INTERESTED";
13
+ EnumActivity2["PRESENT"] = "PRESENT";
14
+ EnumActivity2["VIEW"] = "VIEW";
15
+ return EnumActivity2;
16
+ })(EnumActivity || {});
12
17
  export {
13
18
  EnumActivity,
14
19
  EnumAdShowOn,
15
20
  EnumAdStatus,
16
21
  EnumAdStyle,
17
- EnumAdType,
18
- EnumPubSubEvents,
19
- mongoose
22
+ EnumAdType
20
23
  };
21
24
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":["../../src/types/resourceActivities.ts"],"sourcesContent":["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":";;;;;;;;AAEO,IAAK,eAAL,kBAAKA,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":["EnumActivity"]}
@@ -1,7 +1,5 @@
1
1
  import { EnumInviteStatus, EnumRegions } from '../enums/index.mjs';
2
- import { X as Region, O as OptionItem } from '../global-j9FEfVZs.mjs';
3
- import 'express';
4
- import 'mongoose';
2
+ import { u as Region, O as OptionItem } from '../global-BEqzo5Z2.mjs';
5
3
  import 'react-hook-form';
6
4
 
7
5
  declare const dateFormat = "DD-MM-YYYY";
@@ -1,7 +1,5 @@
1
1
  import { EnumInviteStatus, EnumRegions } from '../enums/index.js';
2
- import { X as Region, O as OptionItem } from '../global-DvxKMAQD.js';
3
- import 'express';
4
- import 'mongoose';
2
+ import { u as Region, O as OptionItem } from '../global-BA84KF8J.js';
5
3
  import 'react-hook-form';
6
4
 
7
5
  declare const dateFormat = "DD-MM-YYYY";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timardex/cluemart-shared",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -96,6 +96,7 @@
96
96
  "@apollo/client": "^3.14.0",
97
97
  "@hookform/resolvers": "^4.1.1",
98
98
  "dayjs": "^1.11.13",
99
+ "expo-server-sdk": "^4.0.0",
99
100
  "express": "^5.1.0",
100
101
  "mongoose": "^8.19.3",
101
102
  "react": "^19.0.0",
@@ -1,26 +0,0 @@
1
- // src/types/global.ts
2
- import mongoose from "mongoose";
3
- var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
4
- EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
5
- EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
6
- EnumPubSubEvents2["GET_NOTIFICATIONS_COUNT"] = "GET_NOTIFICATIONS_COUNT";
7
- EnumPubSubEvents2["USER_TYPING"] = "USER_TYPING";
8
- return EnumPubSubEvents2;
9
- })(EnumPubSubEvents || {});
10
-
11
- // src/types/resourceActivities.ts
12
- var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
13
- EnumActivity2["FAVORITE"] = "FAVORITE";
14
- EnumActivity2["GOING"] = "GOING";
15
- EnumActivity2["INTERESTED"] = "INTERESTED";
16
- EnumActivity2["PRESENT"] = "PRESENT";
17
- EnumActivity2["VIEW"] = "VIEW";
18
- return EnumActivity2;
19
- })(EnumActivity || {});
20
-
21
- export {
22
- mongoose,
23
- EnumPubSubEvents,
24
- EnumActivity
25
- };
26
- //# sourceMappingURL=chunk-4OLDTZXH.mjs.map
@@ -1 +0,0 @@
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,44 +0,0 @@
1
- import {
2
- EnumNotificationResourceType,
3
- EnumNotificationType
4
- } from "./chunk-NNS747QT.mjs";
5
-
6
- // src/mongoose/Notification.ts
7
- import mongoose from "mongoose";
8
- var MongooseSchema = mongoose.Schema;
9
- var schema = new MongooseSchema(
10
- {
11
- data: {
12
- resourceId: { required: true, type: String },
13
- resourceName: { required: true, type: String },
14
- resourceType: {
15
- enum: Object.values(EnumNotificationResourceType),
16
- required: true,
17
- type: String
18
- }
19
- },
20
- isRead: { default: false, index: true, required: true, type: Boolean },
21
- message: { required: true, type: String },
22
- title: { required: true, type: String },
23
- type: {
24
- default: "system" /* SYSTEM */,
25
- enum: Object.values(EnumNotificationType),
26
- required: true,
27
- type: String
28
- },
29
- userId: {
30
- ref: "User",
31
- required: true,
32
- type: mongoose.Schema.Types.ObjectId
33
- }
34
- },
35
- { timestamps: true }
36
- );
37
- schema.index({ isRead: 1, userId: 1 });
38
- schema.index({ createdAt: -1, userId: 1 });
39
- var NotificationModel = mongoose.models.Notification || mongoose.model("Notification", schema);
40
-
41
- export {
42
- NotificationModel
43
- };
44
- //# sourceMappingURL=chunk-WWL2Q5DN.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/mongoose/Notification.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 =\n (mongoose.models.Notification as mongoose.Model<SchemaNotificationType>) ||\n mongoose.model<SchemaNotificationType>(\"Notification\", 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,oBACV,SAAS,OAAO,gBACjB,SAAS,MAA8B,gBAAgB,MAAM;","names":[]}