@timardex/cluemart-shared 1.2.26 → 1.2.28
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-Bv5fLkN0.d.mts → ad-C-0i99zR.d.mts} +1 -1
- package/dist/{ad-DDPNpx02.d.ts → ad-ZnPU3uan.d.ts} +1 -1
- package/dist/{auth-BhUIvvZ2.d.ts → auth-BRY-YJss.d.ts} +1 -1
- package/dist/{auth-BVGs-5Vm.d.mts → auth-Ddkaba1k.d.mts} +1 -1
- package/dist/formFields/index.d.mts +2 -1
- package/dist/formFields/index.d.ts +2 -1
- package/dist/{global-BEqzo5Z2.d.mts → global-DlaX2SCk.d.mts} +114 -2
- package/dist/{global-BA84KF8J.d.ts → global-IDogsFQv.d.ts} +114 -2
- package/dist/graphql/index.d.mts +4 -3
- package/dist/graphql/index.d.ts +4 -3
- package/dist/hooks/index.d.mts +4 -3
- package/dist/hooks/index.d.ts +4 -3
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +392 -342
- package/dist/index.d.ts +392 -342
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/dist/resourceActivities-B4roVKtQ.d.ts +34 -0
- package/dist/resourceActivities-BIjtlOGp.d.mts +34 -0
- package/dist/types/index.cjs +13 -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 +11 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/index.d.ts +2 -1
- package/package.json +13 -1
- package/dist/resourceActivities-DWC-Btmf.d.ts +0 -96
- package/dist/resourceActivities-DoLx4lPo.d.mts +0 -96
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EnumResourceType, EnumOSPlatform } from './enums/index.js';
|
|
2
|
+
|
|
3
|
+
declare enum EnumActivity {
|
|
4
|
+
FAVORITE = "FAVORITE",
|
|
5
|
+
GOING = "GOING",
|
|
6
|
+
INTERESTED = "INTERESTED",
|
|
7
|
+
PRESENT = "PRESENT",
|
|
8
|
+
VIEW = "VIEW"
|
|
9
|
+
}
|
|
10
|
+
type ResourceActivityEntry = {
|
|
11
|
+
activityType: EnumActivity;
|
|
12
|
+
location: {
|
|
13
|
+
type: "Point";
|
|
14
|
+
coordinates: number[];
|
|
15
|
+
} | null;
|
|
16
|
+
startDate?: string | null;
|
|
17
|
+
startTime?: string | null;
|
|
18
|
+
timestamp: Date;
|
|
19
|
+
userAgent: EnumOSPlatform;
|
|
20
|
+
userId?: string | null;
|
|
21
|
+
};
|
|
22
|
+
type ResourceActivityType = {
|
|
23
|
+
_id: string;
|
|
24
|
+
resourceType: EnumResourceType;
|
|
25
|
+
resourceId: string;
|
|
26
|
+
activity: ResourceActivityEntry[];
|
|
27
|
+
};
|
|
28
|
+
type ResourceActivityInputType = {
|
|
29
|
+
resourceId: string;
|
|
30
|
+
resourceType: string;
|
|
31
|
+
activity: Omit<ResourceActivityEntry, "timestamp">;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { EnumActivity as E, type ResourceActivityType as R, type ResourceActivityEntry as a, type ResourceActivityInputType as b };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EnumResourceType, EnumOSPlatform } from './enums/index.mjs';
|
|
2
|
+
|
|
3
|
+
declare enum EnumActivity {
|
|
4
|
+
FAVORITE = "FAVORITE",
|
|
5
|
+
GOING = "GOING",
|
|
6
|
+
INTERESTED = "INTERESTED",
|
|
7
|
+
PRESENT = "PRESENT",
|
|
8
|
+
VIEW = "VIEW"
|
|
9
|
+
}
|
|
10
|
+
type ResourceActivityEntry = {
|
|
11
|
+
activityType: EnumActivity;
|
|
12
|
+
location: {
|
|
13
|
+
type: "Point";
|
|
14
|
+
coordinates: number[];
|
|
15
|
+
} | null;
|
|
16
|
+
startDate?: string | null;
|
|
17
|
+
startTime?: string | null;
|
|
18
|
+
timestamp: Date;
|
|
19
|
+
userAgent: EnumOSPlatform;
|
|
20
|
+
userId?: string | null;
|
|
21
|
+
};
|
|
22
|
+
type ResourceActivityType = {
|
|
23
|
+
_id: string;
|
|
24
|
+
resourceType: EnumResourceType;
|
|
25
|
+
resourceId: string;
|
|
26
|
+
activity: ResourceActivityEntry[];
|
|
27
|
+
};
|
|
28
|
+
type ResourceActivityInputType = {
|
|
29
|
+
resourceId: string;
|
|
30
|
+
resourceType: string;
|
|
31
|
+
activity: Omit<ResourceActivityEntry, "timestamp">;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { EnumActivity as E, type ResourceActivityType as R, type ResourceActivityEntry as a, type ResourceActivityInputType as b };
|
package/dist/types/index.cjs
CHANGED
|
@@ -24,10 +24,20 @@ __export(types_exports, {
|
|
|
24
24
|
EnumAdShowOn: () => EnumAdShowOn,
|
|
25
25
|
EnumAdStatus: () => EnumAdStatus,
|
|
26
26
|
EnumAdStyle: () => EnumAdStyle,
|
|
27
|
-
EnumAdType: () => EnumAdType
|
|
27
|
+
EnumAdType: () => EnumAdType,
|
|
28
|
+
EnumPubSubEvents: () => EnumPubSubEvents
|
|
28
29
|
});
|
|
29
30
|
module.exports = __toCommonJS(types_exports);
|
|
30
31
|
|
|
32
|
+
// src/types/global.ts
|
|
33
|
+
var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
34
|
+
EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
|
|
35
|
+
EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
|
|
36
|
+
EnumPubSubEvents2["GET_NOTIFICATIONS_COUNT"] = "GET_NOTIFICATIONS_COUNT";
|
|
37
|
+
EnumPubSubEvents2["USER_TYPING"] = "USER_TYPING";
|
|
38
|
+
return EnumPubSubEvents2;
|
|
39
|
+
})(EnumPubSubEvents || {});
|
|
40
|
+
|
|
31
41
|
// src/types/ad.ts
|
|
32
42
|
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
|
|
33
43
|
EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
|
|
@@ -67,6 +77,7 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
67
77
|
EnumAdShowOn,
|
|
68
78
|
EnumAdStatus,
|
|
69
79
|
EnumAdStyle,
|
|
70
|
-
EnumAdType
|
|
80
|
+
EnumAdType,
|
|
81
|
+
EnumPubSubEvents
|
|
71
82
|
});
|
|
72
83
|
//# sourceMappingURL=index.cjs.map
|
package/dist/types/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;;;
|
|
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 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","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;AAAA;;;AC6NO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;;;ACzNL,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":["EnumPubSubEvents","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity"]}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
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-Ddkaba1k.mjs';
|
|
3
|
+
export { W as AuthUser, y as BaseResourceType, B as BaseResourceTypeFormData, C as Category, p as ChatMessageInput, q as ChatMessageType, b as ChatType, a0 as CreateBulkNotificationInput, m as CreateEventFormData, o as CreateEventInfoFormData, K as CreateFormData, i as CreateVendorFormData, k as CreateVendorInfoFormData, z as DateTimeType, Z as DateTimeWithPriceType, D as DeviceInfo, U as EnumPubSubEvents, l as EventFormData, n as EventInfoFormData, c as EventInfoType, E as EventType, a as FormDateField, F as FormField, G as GeocodeLocation, Y as GraphQLContext, J as ImageObjectType, L as LocationType, M as MapMultiLocation, d as NotificationCount, $ as NotificationDataType, N as NotificationType, r as Nullable, Q as ObjectId, O as OptionItem, w as OwnerType, P as ParticipantType, v as PartnerType, _ as PaymentInfoType, x as PosterUsageType, A as Region, a1 as RelationDate, e as RelationType, R as Requirement, f as ResourceConnectionsType, s as ResourceContactDetailsType, t as ResourceImageType, u as SocialMediaType, S as StallType, I as Subcategory, H as SubcategoryItems, X as SubscriptionPayload, T as TermsAgreement, a4 as VendorAttributes, h as VendorFormData, j as VendorInfoFormData, g as VendorInfoType, a2 as VendorLocation, a3 as VendorMenuType, V as VendorType } from '../global-DlaX2SCk.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-C-0i99zR.mjs';
|
|
5
|
+
export { E as EnumActivity, a as ResourceActivityEntry, b as ResourceActivityInputType, R as ResourceActivityType } from '../resourceActivities-BIjtlOGp.mjs';
|
|
6
|
+
import 'mongoose';
|
|
6
7
|
import 'react-hook-form';
|
|
7
8
|
|
|
8
9
|
interface AdminUpdateResourceType {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
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-BRY-YJss.js';
|
|
3
|
+
export { W as AuthUser, y as BaseResourceType, B as BaseResourceTypeFormData, C as Category, p as ChatMessageInput, q as ChatMessageType, b as ChatType, a0 as CreateBulkNotificationInput, m as CreateEventFormData, o as CreateEventInfoFormData, K as CreateFormData, i as CreateVendorFormData, k as CreateVendorInfoFormData, z as DateTimeType, Z as DateTimeWithPriceType, D as DeviceInfo, U as EnumPubSubEvents, l as EventFormData, n as EventInfoFormData, c as EventInfoType, E as EventType, a as FormDateField, F as FormField, G as GeocodeLocation, Y as GraphQLContext, J as ImageObjectType, L as LocationType, M as MapMultiLocation, d as NotificationCount, $ as NotificationDataType, N as NotificationType, r as Nullable, Q as ObjectId, O as OptionItem, w as OwnerType, P as ParticipantType, v as PartnerType, _ as PaymentInfoType, x as PosterUsageType, A as Region, a1 as RelationDate, e as RelationType, R as Requirement, f as ResourceConnectionsType, s as ResourceContactDetailsType, t as ResourceImageType, u as SocialMediaType, S as StallType, I as Subcategory, H as SubcategoryItems, X as SubscriptionPayload, T as TermsAgreement, a4 as VendorAttributes, h as VendorFormData, j as VendorInfoFormData, g as VendorInfoType, a2 as VendorLocation, a3 as VendorMenuType, V as VendorType } from '../global-IDogsFQv.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-ZnPU3uan.js';
|
|
5
|
+
export { E as EnumActivity, a as ResourceActivityEntry, b as ResourceActivityInputType, R as ResourceActivityType } from '../resourceActivities-B4roVKtQ.js';
|
|
6
|
+
import 'mongoose';
|
|
6
7
|
import 'react-hook-form';
|
|
7
8
|
|
|
8
9
|
interface AdminUpdateResourceType {
|
package/dist/types/index.mjs
CHANGED
|
@@ -5,6 +5,15 @@ import {
|
|
|
5
5
|
EnumAdType
|
|
6
6
|
} from "../chunk-XXZPSRMS.mjs";
|
|
7
7
|
|
|
8
|
+
// src/types/global.ts
|
|
9
|
+
var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
10
|
+
EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
|
|
11
|
+
EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
|
|
12
|
+
EnumPubSubEvents2["GET_NOTIFICATIONS_COUNT"] = "GET_NOTIFICATIONS_COUNT";
|
|
13
|
+
EnumPubSubEvents2["USER_TYPING"] = "USER_TYPING";
|
|
14
|
+
return EnumPubSubEvents2;
|
|
15
|
+
})(EnumPubSubEvents || {});
|
|
16
|
+
|
|
8
17
|
// src/types/resourceActivities.ts
|
|
9
18
|
var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
10
19
|
EnumActivity2["FAVORITE"] = "FAVORITE";
|
|
@@ -19,6 +28,7 @@ export {
|
|
|
19
28
|
EnumAdShowOn,
|
|
20
29
|
EnumAdStatus,
|
|
21
30
|
EnumAdStyle,
|
|
22
|
-
EnumAdType
|
|
31
|
+
EnumAdType,
|
|
32
|
+
EnumPubSubEvents
|
|
23
33
|
};
|
|
24
34
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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":";;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/types/global.ts","../../src/types/resourceActivities.ts"],"sourcesContent":["import 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","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":";;;;;;;;AA6NO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;;;AC3NL,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"]}
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EnumInviteStatus, EnumRegions } from '../enums/index.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { A as Region, O as OptionItem } from '../global-DlaX2SCk.mjs';
|
|
3
|
+
import 'mongoose';
|
|
3
4
|
import 'react-hook-form';
|
|
4
5
|
|
|
5
6
|
declare const dateFormat = "DD-MM-YYYY";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EnumInviteStatus, EnumRegions } from '../enums/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { A as Region, O as OptionItem } from '../global-IDogsFQv.js';
|
|
3
|
+
import 'mongoose';
|
|
3
4
|
import 'react-hook-form';
|
|
4
5
|
|
|
5
6
|
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.
|
|
3
|
+
"version": "1.2.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -50,6 +50,16 @@
|
|
|
50
50
|
"types": "./dist/theme/index.d.ts",
|
|
51
51
|
"import": "./dist/theme/index.mjs",
|
|
52
52
|
"require": "./dist/theme/index.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./mongoose": {
|
|
55
|
+
"types": "./dist/mongoose/index.d.ts",
|
|
56
|
+
"import": "./dist/mongoose/index.mjs",
|
|
57
|
+
"require": "./dist/mongoose/index.cjs"
|
|
58
|
+
},
|
|
59
|
+
"./service": {
|
|
60
|
+
"types": "./dist/service/index.d.ts",
|
|
61
|
+
"import": "./dist/service/index.mjs",
|
|
62
|
+
"require": "./dist/service/index.cjs"
|
|
53
63
|
}
|
|
54
64
|
},
|
|
55
65
|
"scripts": {
|
|
@@ -85,6 +95,8 @@
|
|
|
85
95
|
"@apollo/client": "^3.14.0",
|
|
86
96
|
"@hookform/resolvers": "^4.1.1",
|
|
87
97
|
"dayjs": "^1.11.13",
|
|
98
|
+
"expo-server-sdk": "^4.0.0",
|
|
99
|
+
"mongoose": "^8.19.3",
|
|
88
100
|
"react": "^19.0.0",
|
|
89
101
|
"react-hook-form": "^7.54.2",
|
|
90
102
|
"yup": "^1.6.1"
|
|
@@ -1,96 +0,0 @@
|
|
|
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
|
-
userIds: string[];
|
|
59
|
-
title: string;
|
|
60
|
-
message: string;
|
|
61
|
-
type: EnumNotificationType;
|
|
62
|
-
data: NotificationDataType | null;
|
|
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,96 +0,0 @@
|
|
|
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
|
-
userIds: string[];
|
|
59
|
-
title: string;
|
|
60
|
-
message: string;
|
|
61
|
-
type: EnumNotificationType;
|
|
62
|
-
data: NotificationDataType | null;
|
|
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 };
|