@timardex/cluemart-shared 1.1.34 → 1.1.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.
@@ -71,11 +71,16 @@ declare enum EnumAdType {
71
71
  PREMIUM = "Premium",
72
72
  FREE = "Free"
73
73
  }
74
+ declare enum EnumAdStyle {
75
+ BLOOM = "Bloom",
76
+ RISE = "Rise"
77
+ }
74
78
  interface AdFormData {
75
79
  _id?: string;
80
+ adStyle: EnumAdStyle;
76
81
  adType: EnumAdType;
77
82
  clui?: string | null;
78
- end: string;
83
+ end: Date;
79
84
  resourceCover: string;
80
85
  resourceDescription: string;
81
86
  resourceId: string;
@@ -84,13 +89,14 @@ interface AdFormData {
84
89
  resourceRegion: string;
85
90
  resourceType: EnumResourceType;
86
91
  socialMedia?: SocialMediaType[] | null;
87
- start: string;
92
+ start: Date;
88
93
  status: EnumAdStatus;
89
94
  targetRegion?: string | null;
90
95
  }
91
96
  type CreateAdFormData = CreateFormData<AdFormData>;
92
97
  interface AdType {
93
- _id?: string;
98
+ _id: string;
99
+ adStyle: EnumAdStyle;
94
100
  adType: EnumAdType;
95
101
  clicks?: number;
96
102
  clui?: string;
@@ -111,4 +117,4 @@ interface AdType {
111
117
  updatedAt: Date;
112
118
  }
113
119
 
114
- export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdType as f };
120
+ export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdType as f, EnumAdStyle as g };
@@ -71,11 +71,16 @@ declare enum EnumAdType {
71
71
  PREMIUM = "Premium",
72
72
  FREE = "Free"
73
73
  }
74
+ declare enum EnumAdStyle {
75
+ BLOOM = "Bloom",
76
+ RISE = "Rise"
77
+ }
74
78
  interface AdFormData {
75
79
  _id?: string;
80
+ adStyle: EnumAdStyle;
76
81
  adType: EnumAdType;
77
82
  clui?: string | null;
78
- end: string;
83
+ end: Date;
79
84
  resourceCover: string;
80
85
  resourceDescription: string;
81
86
  resourceId: string;
@@ -84,13 +89,14 @@ interface AdFormData {
84
89
  resourceRegion: string;
85
90
  resourceType: EnumResourceType;
86
91
  socialMedia?: SocialMediaType[] | null;
87
- start: string;
92
+ start: Date;
88
93
  status: EnumAdStatus;
89
94
  targetRegion?: string | null;
90
95
  }
91
96
  type CreateAdFormData = CreateFormData<AdFormData>;
92
97
  interface AdType {
93
- _id?: string;
98
+ _id: string;
99
+ adStyle: EnumAdStyle;
94
100
  adType: EnumAdType;
95
101
  clicks?: number;
96
102
  clui?: string;
@@ -111,4 +117,4 @@ interface AdType {
111
117
  updatedAt: Date;
112
118
  }
113
119
 
114
- export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdType as f };
120
+ export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdType as f, EnumAdStyle as g };
@@ -11,9 +11,15 @@ var EnumAdType = /* @__PURE__ */ ((EnumAdType2) => {
11
11
  EnumAdType2["FREE"] = "Free";
12
12
  return EnumAdType2;
13
13
  })(EnumAdType || {});
14
+ var EnumAdStyle = /* @__PURE__ */ ((EnumAdStyle2) => {
15
+ EnumAdStyle2["BLOOM"] = "Bloom";
16
+ EnumAdStyle2["RISE"] = "Rise";
17
+ return EnumAdStyle2;
18
+ })(EnumAdStyle || {});
14
19
 
15
20
  export {
16
21
  EnumAdStatus,
17
- EnumAdType
22
+ EnumAdType,
23
+ EnumAdStyle
18
24
  };
19
- //# sourceMappingURL=chunk-SE5LK2MM.mjs.map
25
+ //# sourceMappingURL=chunk-OWLRA2IR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/ad.ts"],"sourcesContent":["import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n STANDARD = \"Standard\",\n PREMIUM = \"Premium\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport interface AdFormData {\n _id?: string;\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 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 {\n _id: string;\n adStyle: EnumAdStyle;\n adType: EnumAdType;\n clicks?: number; // How many times the ad was clicked\n clui?: string;\n createdAt: Date;\n end: Date;\n impressions?: number; // How often the ad was seen\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n socialMedia: SocialMediaType[];\n start: Date;\n status: EnumAdStatus;\n targetRegion?: string; // same format as resourceRegion\n updatedAt: Date;\n}\n"],"mappings":";AAIO,IAAK,eAAL,kBAAKA,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,cAAW;AACX,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,UAAO;AAHG,SAAAA;AAAA,GAAA;AAML,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;","names":["EnumAdStatus","EnumAdType","EnumAdStyle"]}
@@ -20,11 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/graphql/index.ts
21
21
  var graphql_exports = {};
22
22
  __export(graphql_exports, {
23
- useAdMutations: () => useAdMutations,
24
23
  useAddParticipantToChat: () => useAddParticipantToChat,
25
24
  useAddUserFavouriteResource: () => useAddUserFavouriteResource,
26
25
  useAdminUpdateResourceType: () => useAdminUpdateResourceType,
27
26
  useContactUs: () => useContactUs,
27
+ useCreateAd: () => useCreateAd,
28
28
  useCreateBulkNotifications: () => useCreateBulkNotifications,
29
29
  useCreateMarket: () => useCreateMarket,
30
30
  useCreateMarketInfo: () => useCreateMarketInfo,
@@ -2198,6 +2198,8 @@ var import_client43 = require("@apollo/client");
2198
2198
  var AD_FIELDS_FRAGMENT = import_client43.gql`
2199
2199
  fragment AdFields on AdType {
2200
2200
  _id
2201
+ adStyle
2202
+ adType
2201
2203
  clicks
2202
2204
  createdAt
2203
2205
  end
@@ -2268,7 +2270,7 @@ var DELETE_AD_MUTATION = import_client44.gql`
2268
2270
  `;
2269
2271
 
2270
2272
  // src/graphql/hooks/ad/hooksMutation.ts
2271
- var useAdMutations = () => {
2273
+ var useCreateAd = () => {
2272
2274
  const [createAd, { loading, error }] = (0, import_client45.useMutation)(CREATE_AD_MUTATION, {
2273
2275
  awaitRefetchQueries: true,
2274
2276
  refetchQueries: [{ fetchPolicy: "no-cache", query: GET_ADS }]
@@ -2346,11 +2348,11 @@ var useGetAdsByRegion = (region) => {
2346
2348
  };
2347
2349
  // Annotate the CommonJS export names for ESM import in node:
2348
2350
  0 && (module.exports = {
2349
- useAdMutations,
2350
2351
  useAddParticipantToChat,
2351
2352
  useAddUserFavouriteResource,
2352
2353
  useAdminUpdateResourceType,
2353
2354
  useContactUs,
2355
+ useCreateAd,
2354
2356
  useCreateBulkNotifications,
2355
2357
  useCreateMarket,
2356
2358
  useCreateMarketInfo,