@timardex/cluemart-shared 1.4.66 → 1.4.67
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/{chunk-N62G35WH.mjs → chunk-EQ4Y34P5.mjs} +1 -1
- package/dist/chunk-EQ4Y34P5.mjs.map +1 -0
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/hooks/index.cjs +21 -20
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +22 -21
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +21 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.mjs +21 -20
- package/dist/index.mjs.map +1 -1
- package/dist/{post-D6bduN9H.d.mts → post-Bs27AkGC.d.mts} +9 -9
- package/dist/{post-CKBw7-Mb.d.ts → post-CdeU5KyV.d.ts} +9 -9
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-N62G35WH.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/auth.ts","../src/types/ad.ts","../src/types/resourceActivities.ts","../src/types/post.ts"],"sourcesContent":["import { CreateFormData, EnumOSPlatform, TermsAgreement } from \"src\";\n\nexport enum EnumVerificationType {\n REGISTER = \"register\",\n RESET_PASSWORD = \"resetPassword\",\n}\n\nexport type LoginFormData = {\n email: string;\n isAdminPage?: boolean;\n password: string;\n platform?: EnumOSPlatform;\n};\n\nexport type CreateLoginFormData = CreateFormData<LoginFormData>;\n\nexport type RegisterFormData = {\n email: string;\n firstName: string;\n lastName: string;\n password: string;\n platform?: EnumOSPlatform;\n preferredRegion: string;\n termsAgreement?: TermsAgreement | null;\n};\n\nexport type CreateRegisterFormData = CreateFormData<RegisterFormData>;\n\nexport type RequestPasswordResetFormData = {\n email: string;\n};\n\nexport type CreateRequestPasswordResetFormData =\n CreateFormData<RequestPasswordResetFormData>;\n\nexport type ResetPasswordFormData = {\n confirmPassword: string;\n email: string;\n password: string;\n};\n\nexport type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;\n\nexport type ValidateVerificationTokenFormData = {\n email: string;\n verificationToken: string;\n verificationType?: EnumVerificationType;\n};\n\nexport type CreateValidateVerificationTokenFormData =\n CreateFormData<ValidateVerificationTokenFormData>;\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n PARTNERS_PAGE = \"Partners_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 type AdResource = {\n adDescription: string | null;\n adImage: string | null;\n adStyle: EnumAdStyle | null;\n adTitle: string | null;\n adType: EnumAdType | null;\n resourceId: string | null;\n resourceName: string | null;\n resourceRegion: string | null;\n resourceType: EnumResourceType | null;\n};\n\nexport interface AdFormData {\n active: boolean;\n end: Date; // ISO date string\n resource: AdResource;\n showOn: EnumAdShowOn[];\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion: string[];\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 | null;\n}\n","import {\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\n\nimport { LocationGeoType } from \"./global\";\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: LocationGeoType | null;\n dateStatus?: EnumEventDateStatus | 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: EnumResourceType;\n activity: Omit<ResourceActivityEntry, \"timestamp\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_POLL = \"daily_poll\",\n}\n\nexport enum EnumPostContentType {\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostFileInput = {\n source: File;\n title?: string;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: PostFileInput[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: {\n text: string;\n }[];\n };\n};\n\nexport type PostContentData =\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData?: PostContentData | null;\n contentOrder?: number | null;\n contentType?: EnumPostContentType | null;\n};\n\nexport interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: {\n resourceId: string;\n resourceType: EnumResourceType;\n } | null;\n tags?: string[] | null;\n title: string;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\">;\n};\n\nexport type PostType = Omit<PostFormData, \"content\" | \"coverUpload\"> & {\n _id: string;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n updatedAt: Date | null;\n};\n"],"mappings":";AAEO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACEL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;AAOL,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;;;ACdL,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;;;ACJL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,gBAAa;AAHH,SAAAA;AAAA,GAAA;AAML,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,WAAQ;AAJE,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity","EnumPostType","EnumPostContentType"]}
|
package/dist/graphql/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-sdIDFwub.mjs';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-GMlnFp7I.mjs';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-Bs27AkGC.mjs';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.js';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-Qpi5PTJD.js';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-Cdcu76UE.js';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-CdeU5KyV.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -822,6 +822,17 @@ var EnumAdStyle = /* @__PURE__ */ ((EnumAdStyle3) => {
|
|
|
822
822
|
})(EnumAdStyle || {});
|
|
823
823
|
|
|
824
824
|
// src/yupSchema/ad.ts
|
|
825
|
+
var adResourceSchema = yup6.object({
|
|
826
|
+
adDescription: yup6.string().nullable().trim().required("Ad description is required").max(100, "Ad description must be at most 100 characters"),
|
|
827
|
+
adImage: yup6.string().nullable().required("Ad image is required"),
|
|
828
|
+
adStyle: yup6.mixed().nullable().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
|
|
829
|
+
adTitle: yup6.string().nullable().trim().required("Ad title is required").max(50, "Ad title must be at most 50 characters"),
|
|
830
|
+
adType: yup6.mixed().nullable().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
|
|
831
|
+
resourceId: yup6.string().nullable().required("Resource ID is required"),
|
|
832
|
+
resourceName: yup6.string().nullable().required("Resource name is required"),
|
|
833
|
+
resourceRegion: yup6.string().nullable().required("Resource region is required"),
|
|
834
|
+
resourceType: yup6.mixed().nullable().oneOf(Object.values(EnumResourceType), "Please select Event or Vendor").required("Resource type is required")
|
|
835
|
+
});
|
|
825
836
|
var adSchema = yup6.object().shape({
|
|
826
837
|
active: yup6.boolean().required("Active status is required"),
|
|
827
838
|
end: yup6.date().required("End date is required").test("is-future-date", "End date must be in the future", (value) => {
|
|
@@ -841,17 +852,7 @@ var adSchema = yup6.object().shape({
|
|
|
841
852
|
}
|
|
842
853
|
)
|
|
843
854
|
}),
|
|
844
|
-
resource:
|
|
845
|
-
adDescription: yup6.string().trim().required("Ad description is required").max(100, "Ad description must be at most 100 characters"),
|
|
846
|
-
adImage: yup6.string().required("Ad image is required"),
|
|
847
|
-
adStyle: yup6.mixed().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
|
|
848
|
-
adTitle: yup6.string().trim().required("Ad title is required").max(50, "Ad title must be at most 50 characters"),
|
|
849
|
-
adType: yup6.mixed().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
|
|
850
|
-
resourceId: yup6.string().required("Resource ID is required"),
|
|
851
|
-
resourceName: yup6.string().required("Resource name is required"),
|
|
852
|
-
resourceRegion: yup6.string().required("Resource region is required"),
|
|
853
|
-
resourceType: yup6.mixed().oneOf(Object.values(EnumResourceType), "Please select Event or Vendor").required("Resource Type is required")
|
|
854
|
-
}).required("Resource information is required"),
|
|
855
|
+
resource: adResourceSchema.required("Resource information is required"),
|
|
855
856
|
showOn: yup6.array().of(yup6.mixed().oneOf(Object.values(EnumAdShowOn)).required()).min(1, "At least one display location is required").required("Display location is required"),
|
|
856
857
|
status: yup6.mixed().oneOf(Object.values(EnumAdStatus)).required("Ad status is required"),
|
|
857
858
|
start: yup6.date().when("status", {
|
|
@@ -5035,17 +5036,17 @@ var defaultValues8 = {
|
|
|
5035
5036
|
active: true,
|
|
5036
5037
|
end: /* @__PURE__ */ new Date(),
|
|
5037
5038
|
resource: {
|
|
5038
|
-
adDescription:
|
|
5039
|
-
adImage:
|
|
5040
|
-
adStyle:
|
|
5039
|
+
adDescription: null,
|
|
5040
|
+
adImage: null,
|
|
5041
|
+
adStyle: null,
|
|
5041
5042
|
// default to bloom
|
|
5042
|
-
adTitle:
|
|
5043
|
-
adType:
|
|
5043
|
+
adTitle: null,
|
|
5044
|
+
adType: null,
|
|
5044
5045
|
// default to sponsored
|
|
5045
|
-
resourceId:
|
|
5046
|
-
resourceName:
|
|
5047
|
-
resourceRegion:
|
|
5048
|
-
resourceType:
|
|
5046
|
+
resourceId: null,
|
|
5047
|
+
resourceName: null,
|
|
5048
|
+
resourceRegion: null,
|
|
5049
|
+
resourceType: null
|
|
5049
5050
|
// default to event
|
|
5050
5051
|
},
|
|
5051
5052
|
showOn: [""],
|