@timardex/cluemart-shared 1.1.30 → 1.1.32
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-p-iMUyA7.d.ts → ad-BKBAgZLe.d.ts} +2 -1
- package/dist/{ad-CJzmTWSn.d.mts → ad-DoA7_MpI.d.mts} +2 -1
- package/dist/{auth-BWdfPzae.d.ts → auth-BMZfmSqq.d.ts} +1 -1
- package/dist/{auth-BiazhMfX.d.mts → auth-DBF8374G.d.mts} +1 -1
- package/dist/{chunk-RNCMM53N.mjs → chunk-LNWCKRNS.mjs} +1 -1
- package/dist/chunk-LNWCKRNS.mjs.map +1 -0
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-DPGWQCsT.d.mts → global-MqK60w-m.d.mts} +1 -1
- package/dist/{global-3BBlxnva.d.ts → global-bIy-rR1z.d.ts} +1 -1
- package/dist/graphql/index.cjs +12 -15
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +6 -6
- package/dist/graphql/index.d.ts +6 -6
- package/dist/graphql/index.mjs +12 -15
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +4 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.mjs +5 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +16 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +16 -15
- package/dist/index.mjs.map +1 -1
- package/dist/{notification-BCTdNYCc.d.mts → notification-BvS6e_Jp.d.mts} +1 -1
- package/dist/{notification-Bg5iTdb5.d.ts → notification-CmDVYz-z.d.ts} +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-RNCMM53N.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.js';
|
|
2
|
-
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-bIy-rR1z.js';
|
|
3
3
|
|
|
4
4
|
type TestersFormData = {
|
|
5
5
|
email: string;
|
|
@@ -72,6 +72,7 @@ declare enum EnumAdMediaType {
|
|
|
72
72
|
}
|
|
73
73
|
interface AdFormData {
|
|
74
74
|
_id?: string;
|
|
75
|
+
clui?: string | null;
|
|
75
76
|
ctaText?: string | null;
|
|
76
77
|
ctaUrl?: string | null;
|
|
77
78
|
end: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.mjs';
|
|
2
|
-
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-MqK60w-m.mjs';
|
|
3
3
|
|
|
4
4
|
type TestersFormData = {
|
|
5
5
|
email: string;
|
|
@@ -72,6 +72,7 @@ declare enum EnumAdMediaType {
|
|
|
72
72
|
}
|
|
73
73
|
interface AdFormData {
|
|
74
74
|
_id?: string;
|
|
75
|
+
clui?: string | null;
|
|
75
76
|
ctaText?: string | null;
|
|
76
77
|
ctaUrl?: string | null;
|
|
77
78
|
end: string;
|
|
@@ -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 EnumAdMediaType {\n IMAGE = \"image\",\n VIDEO = \"video\",\n}\n\nexport interface AdFormData {\n _id?: string;\n clui?: string | null;\n ctaText?: string | null;\n ctaUrl?: string | null;\n end: string; // ISO date string\n media?: { type: EnumAdMediaType; url: string }[] | null;\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: string; // ISO date string\n status: EnumAdStatus;\n targetRegion: string; // same format as resourceRegion\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType {\n _id?: string;\n clicks?: number; // How many times the ad was clicked\n clui?: string;\n createdAt?: Date;\n ctaText?: string; // e.g., \"Visit Stall\"\n ctaUrl?: string; // link the ad directs to\n end: Date;\n impressions?: number; // How often the ad was seen\n media?: { type: EnumAdMediaType; url: string }[] | null;\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 targetInterests?: string[]; // e.g., [\"organic food\", \"crafts\"]\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,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,WAAQ;AACR,EAAAA,iBAAA,WAAQ;AAFE,SAAAA;AAAA,GAAA;","names":["EnumAdStatus","EnumAdMediaType"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-MqK60w-m.mjs';
|
|
2
2
|
import 'react-hook-form';
|
|
3
3
|
import '../enums/index.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-bIy-rR1z.js';
|
|
2
2
|
import 'react-hook-form';
|
|
3
3
|
import '../enums/index.js';
|
|
4
4
|
|
|
@@ -169,7 +169,7 @@ type OwnerType = {
|
|
|
169
169
|
};
|
|
170
170
|
type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
|
|
171
171
|
_id: string;
|
|
172
|
-
|
|
172
|
+
adIds?: string[] | null;
|
|
173
173
|
createdAt: string;
|
|
174
174
|
owner: OwnerType;
|
|
175
175
|
relationIds: string[] | null;
|
|
@@ -169,7 +169,7 @@ type OwnerType = {
|
|
|
169
169
|
};
|
|
170
170
|
type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
|
|
171
171
|
_id: string;
|
|
172
|
-
|
|
172
|
+
adIds?: string[] | null;
|
|
173
173
|
createdAt: string;
|
|
174
174
|
owner: OwnerType;
|
|
175
175
|
relationIds: string[] | null;
|
package/dist/graphql/index.cjs
CHANGED
|
@@ -246,7 +246,7 @@ var MARKET = import_client3.gql`
|
|
|
246
246
|
fragment MarketFields on MarketType {
|
|
247
247
|
_id
|
|
248
248
|
active
|
|
249
|
-
|
|
249
|
+
adIds
|
|
250
250
|
cover {
|
|
251
251
|
...ResourceImageFields
|
|
252
252
|
}
|
|
@@ -361,7 +361,7 @@ var STALLHOLDER = import_client4.gql`
|
|
|
361
361
|
fragment StallholderFields on StallholderType {
|
|
362
362
|
_id
|
|
363
363
|
active
|
|
364
|
-
|
|
364
|
+
adIds
|
|
365
365
|
stallholderInfoId
|
|
366
366
|
categories {
|
|
367
367
|
...CategoryFields
|
|
@@ -1419,7 +1419,7 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
|
|
|
1419
1419
|
markets {
|
|
1420
1420
|
_id
|
|
1421
1421
|
active
|
|
1422
|
-
|
|
1422
|
+
adIds
|
|
1423
1423
|
cover {
|
|
1424
1424
|
...ResourceImageFields
|
|
1425
1425
|
}
|
|
@@ -1459,7 +1459,7 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
|
|
|
1459
1459
|
stallholders {
|
|
1460
1460
|
_id
|
|
1461
1461
|
active
|
|
1462
|
-
|
|
1462
|
+
adIds
|
|
1463
1463
|
stallholderInfoId
|
|
1464
1464
|
categories {
|
|
1465
1465
|
...CategoryFields
|
|
@@ -2319,23 +2319,20 @@ var useGetAds = () => {
|
|
|
2319
2319
|
}
|
|
2320
2320
|
);
|
|
2321
2321
|
return {
|
|
2322
|
-
ads: data?.
|
|
2322
|
+
ads: data?.ads || [],
|
|
2323
2323
|
error,
|
|
2324
2324
|
loading,
|
|
2325
2325
|
refetch
|
|
2326
2326
|
};
|
|
2327
2327
|
};
|
|
2328
2328
|
var useGetAd = (_id) => {
|
|
2329
|
-
const { data, loading, error, refetch } = (0, import_client46.useQuery)(
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
variables: { _id }
|
|
2335
|
-
}
|
|
2336
|
-
);
|
|
2329
|
+
const { data, loading, error, refetch } = (0, import_client46.useQuery)(GET_AD, {
|
|
2330
|
+
fetchPolicy: "no-cache",
|
|
2331
|
+
skip: !_id,
|
|
2332
|
+
variables: { _id }
|
|
2333
|
+
});
|
|
2337
2334
|
return {
|
|
2338
|
-
ad: data?.
|
|
2335
|
+
ad: data?.ad,
|
|
2339
2336
|
error,
|
|
2340
2337
|
loading,
|
|
2341
2338
|
refetch
|
|
@@ -2348,7 +2345,7 @@ var useGetAdsByRegion = (region) => {
|
|
|
2348
2345
|
variables: { region }
|
|
2349
2346
|
});
|
|
2350
2347
|
return {
|
|
2351
|
-
adsByRegion: data?.
|
|
2348
|
+
adsByRegion: data?.adsByRegion || [],
|
|
2352
2349
|
error,
|
|
2353
2350
|
loading,
|
|
2354
2351
|
refetch
|