@timardex/cluemart-shared 1.7.24 → 1.7.26
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-DChdPAkx.d.mts → ad-BNumAVY7.d.mts} +2 -2
- package/dist/{ad-BZcVngc3.d.ts → ad-xMotoDzt.d.ts} +2 -2
- package/dist/auth/index.d.mts +3 -3
- package/dist/auth/index.d.ts +3 -3
- package/dist/auth/index.mjs +1 -1
- package/dist/{chunk-LZQG3BQM.mjs → chunk-336EZBSA.mjs} +159 -6
- package/dist/chunk-336EZBSA.mjs.map +1 -0
- package/dist/{chunk-3VDFBRRK.mjs → chunk-WPBHYGXW.mjs} +2 -1
- package/dist/{contactUs-KVN1Iw60.d.mts → contactUs-5t9rb3U4.d.mts} +1 -1
- package/dist/{contactUs-l3ciX1_d.d.ts → contactUs-BJiiMuGX.d.ts} +1 -1
- package/dist/{affiliate-BM1h7pwc.d.ts → coupon-CqCTYMW1.d.ts} +47 -3
- package/dist/{affiliate-C1EG9HbN.d.mts → coupon-O__x-VRW.d.mts} +47 -3
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-D8aPAI5b.d.ts → global-B6VyEshc.d.ts} +1 -1
- package/dist/{global-BrnExI9t.d.mts → global-BKGlrm75.d.mts} +1 -1
- package/dist/graphql/index.cjs +158 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +52 -7
- package/dist/graphql/index.d.ts +52 -7
- package/dist/graphql/index.mjs +12 -2
- package/dist/hooks/index.cjs +117 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +5 -6
- package/dist/hooks/index.d.ts +5 -6
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +158 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.mjs +153 -1
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/{resourceActivities-DIXjrgOD.d.ts → resourceActivities-HkorPbJU.d.ts} +1 -1
- package/dist/{resourceActivities-DuftR4Ts.d.mts → resourceActivities-l4Q014eT.d.mts} +1 -1
- package/dist/sharing/index.d.mts +1 -1
- package/dist/sharing/index.d.ts +1 -1
- package/dist/types/index.d.mts +7 -8
- package/dist/types/index.d.ts +7 -8
- package/dist/{user-BY5AtgYc.d.ts → user-Cg80mIww.d.ts} +1 -1
- package/dist/{user-CjYZ7tJ4.d.mts → user-go-eqanx.d.mts} +1 -1
- package/dist/utils/index.d.mts +3 -4
- package/dist/utils/index.d.ts +3 -4
- package/package.json +1 -1
- package/dist/chunk-LZQG3BQM.mjs.map +0 -1
- package/dist/coupon-CYL-fG6W.d.ts +0 -47
- package/dist/coupon-DE-6YTb6.d.mts +0 -47
- /package/dist/{chunk-3VDFBRRK.mjs.map → chunk-WPBHYGXW.mjs.map} +0 -0
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { L as LocationType, o as VendorFormData, p as CreateVendorFormData, q as VendorInfoFormData, r as CreateVendorInfoFormData, s as UnregisteredVendorFormData, t as CreateUnregisteredVendorFormData, u as EventFormData, v as CreateEventFormData, w as EventInfoFormData, x as CreateEventInfoFormData, B as BaseResourceTypeFormData, y as PostFormData, z as CreatePostFormData } from '../global-
|
|
2
|
-
import { U as UserFormData, C as CreateUserFormData } from '../user-
|
|
3
|
-
import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-
|
|
4
|
-
import { a as AffiliateFormData, A as AffiliateType,
|
|
5
|
-
import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-
|
|
6
|
-
import { P as ProductCouponFormData, C as CreateProductCouponFormData } from '../coupon-DE-6YTb6.mjs';
|
|
1
|
+
import { L as LocationType, o as VendorFormData, p as CreateVendorFormData, q as VendorInfoFormData, r as CreateVendorInfoFormData, s as UnregisteredVendorFormData, t as CreateUnregisteredVendorFormData, u as EventFormData, v as CreateEventFormData, w as EventInfoFormData, x as CreateEventInfoFormData, B as BaseResourceTypeFormData, y as PostFormData, z as CreatePostFormData } from '../global-BKGlrm75.mjs';
|
|
2
|
+
import { U as UserFormData, C as CreateUserFormData } from '../user-go-eqanx.mjs';
|
|
3
|
+
import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-BNumAVY7.mjs';
|
|
4
|
+
import { a as AffiliateFormData, A as AffiliateType, b as CreateAffiliateFormData, P as ProductCouponFormData, c as CreateProductCouponFormData } from '../coupon-O__x-VRW.mjs';
|
|
5
|
+
import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-5t9rb3U4.mjs';
|
|
7
6
|
import 'react-hook-form';
|
|
8
7
|
import '../enums/index.mjs';
|
|
9
8
|
import '../images/index.mjs';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { L as LocationType, o as VendorFormData, p as CreateVendorFormData, q as VendorInfoFormData, r as CreateVendorInfoFormData, s as UnregisteredVendorFormData, t as CreateUnregisteredVendorFormData, u as EventFormData, v as CreateEventFormData, w as EventInfoFormData, x as CreateEventInfoFormData, B as BaseResourceTypeFormData, y as PostFormData, z as CreatePostFormData } from '../global-
|
|
2
|
-
import { U as UserFormData, C as CreateUserFormData } from '../user-
|
|
3
|
-
import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-
|
|
4
|
-
import { a as AffiliateFormData, A as AffiliateType,
|
|
5
|
-
import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-
|
|
6
|
-
import { P as ProductCouponFormData, C as CreateProductCouponFormData } from '../coupon-CYL-fG6W.js';
|
|
1
|
+
import { L as LocationType, o as VendorFormData, p as CreateVendorFormData, q as VendorInfoFormData, r as CreateVendorInfoFormData, s as UnregisteredVendorFormData, t as CreateUnregisteredVendorFormData, u as EventFormData, v as CreateEventFormData, w as EventInfoFormData, x as CreateEventInfoFormData, B as BaseResourceTypeFormData, y as PostFormData, z as CreatePostFormData } from '../global-B6VyEshc.js';
|
|
2
|
+
import { U as UserFormData, C as CreateUserFormData } from '../user-Cg80mIww.js';
|
|
3
|
+
import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-xMotoDzt.js';
|
|
4
|
+
import { a as AffiliateFormData, A as AffiliateType, b as CreateAffiliateFormData, P as ProductCouponFormData, c as CreateProductCouponFormData } from '../coupon-CqCTYMW1.js';
|
|
5
|
+
import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-BJiiMuGX.js';
|
|
7
6
|
import 'react-hook-form';
|
|
8
7
|
import '../enums/index.js';
|
|
9
8
|
import '../images/index.js';
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -23,8 +23,8 @@ import {
|
|
|
23
23
|
} from "../chunk-7TL4ZSUO.mjs";
|
|
24
24
|
import "../chunk-RAYUJODN.mjs";
|
|
25
25
|
import "../chunk-DQ7ZHIXW.mjs";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-336EZBSA.mjs";
|
|
27
|
+
import "../chunk-WPBHYGXW.mjs";
|
|
28
28
|
import {
|
|
29
29
|
EnumEventDateStatus,
|
|
30
30
|
EnumEventType,
|
package/dist/index.cjs
CHANGED
|
@@ -334,6 +334,7 @@ __export(index_exports, {
|
|
|
334
334
|
useCreateAd: () => useCreateAd,
|
|
335
335
|
useCreateBulkNotifications: () => useCreateBulkNotifications,
|
|
336
336
|
useCreateCheckoutSession: () => useCreateCheckoutSession,
|
|
337
|
+
useCreateCoupon: () => useCreateCoupon,
|
|
337
338
|
useCreateCustomerPortal: () => useCreateCustomerPortal,
|
|
338
339
|
useCreateEvent: () => useCreateEvent,
|
|
339
340
|
useCreateEventInfo: () => useCreateEventInfo,
|
|
@@ -353,6 +354,7 @@ __export(index_exports, {
|
|
|
353
354
|
useDeleteAffiliate: () => useDeleteAffiliate,
|
|
354
355
|
useDeleteAllNotifications: () => useDeleteAllNotifications,
|
|
355
356
|
useDeleteChat: () => useDeleteChat,
|
|
357
|
+
useDeleteCoupon: () => useDeleteCoupon,
|
|
356
358
|
useDeleteEvent: () => useDeleteEvent,
|
|
357
359
|
useDeleteNotification: () => useDeleteNotification,
|
|
358
360
|
useDeletePartner: () => useDeletePartner,
|
|
@@ -371,6 +373,8 @@ __export(index_exports, {
|
|
|
371
373
|
useGetChat: () => useGetChat,
|
|
372
374
|
useGetChatSubscription: () => useGetChatSubscription,
|
|
373
375
|
useGetChatsByRegion: () => useGetChatsByRegion,
|
|
376
|
+
useGetCoupon: () => useGetCoupon,
|
|
377
|
+
useGetCoupons: () => useGetCoupons,
|
|
374
378
|
useGetEvent: () => useGetEvent,
|
|
375
379
|
useGetEventByPlaceId: () => useGetEventByPlaceId,
|
|
376
380
|
useGetEventInfo: () => useGetEventInfo,
|
|
@@ -449,6 +453,7 @@ __export(index_exports, {
|
|
|
449
453
|
useUpdateAd: () => useUpdateAd,
|
|
450
454
|
useUpdateAffiliateDetails: () => useUpdateAffiliateDetails,
|
|
451
455
|
useUpdateAppSettings: () => useUpdateAppSettings,
|
|
456
|
+
useUpdateCoupon: () => useUpdateCoupon,
|
|
452
457
|
useUpdateDailyClueGame: () => useUpdateDailyClueGame,
|
|
453
458
|
useUpdateEvent: () => useUpdateEvent,
|
|
454
459
|
useUpdateEventInfo: () => useUpdateEventInfo,
|
|
@@ -6562,7 +6567,7 @@ var useGetVendor = (_id) => {
|
|
|
6562
6567
|
variables: { _id }
|
|
6563
6568
|
}
|
|
6564
6569
|
);
|
|
6565
|
-
const vendor = data?.vendor;
|
|
6570
|
+
const vendor = data?.vendor || null;
|
|
6566
6571
|
return { error, loading, refetch, vendor };
|
|
6567
6572
|
};
|
|
6568
6573
|
var useGetVendorsByRegion = (region, options) => {
|
|
@@ -8424,6 +8429,153 @@ var useAssignAffiliateBonusReward = () => {
|
|
|
8424
8429
|
return { assignAffiliateBonusReward, error, loading };
|
|
8425
8430
|
};
|
|
8426
8431
|
|
|
8432
|
+
// src/graphql/hooks/coupon/hooksMutation.ts
|
|
8433
|
+
var import_client80 = require("@apollo/client");
|
|
8434
|
+
|
|
8435
|
+
// src/graphql/mutations/coupon.ts
|
|
8436
|
+
var import_client79 = require("@apollo/client");
|
|
8437
|
+
|
|
8438
|
+
// src/graphql/queries/coupon.ts
|
|
8439
|
+
var import_client78 = require("@apollo/client");
|
|
8440
|
+
var COUPON_CODE_FIELDS_FRAGMENT = import_client78.gql`
|
|
8441
|
+
fragment CouponCodeFields on CouponCodeType {
|
|
8442
|
+
code
|
|
8443
|
+
qrCode {
|
|
8444
|
+
...ResourceImageFields
|
|
8445
|
+
}
|
|
8446
|
+
}
|
|
8447
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
8448
|
+
`;
|
|
8449
|
+
var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = import_client78.gql`
|
|
8450
|
+
fragment CouponParticipantUserFields on CouponParticipantUserType {
|
|
8451
|
+
couponCount
|
|
8452
|
+
couponRedeemedAt
|
|
8453
|
+
createdAt
|
|
8454
|
+
updatedAt
|
|
8455
|
+
userId
|
|
8456
|
+
}
|
|
8457
|
+
`;
|
|
8458
|
+
var PRODUCT_COUPON_FIELDS_FRAGMENT = import_client78.gql`
|
|
8459
|
+
fragment ProductCouponFields on ProductCouponType {
|
|
8460
|
+
_id
|
|
8461
|
+
active
|
|
8462
|
+
couponCode {
|
|
8463
|
+
...CouponCodeFields
|
|
8464
|
+
}
|
|
8465
|
+
couponDescription
|
|
8466
|
+
couponOption
|
|
8467
|
+
createdAt
|
|
8468
|
+
endDate
|
|
8469
|
+
participantProduct {
|
|
8470
|
+
...VendorProductListFields
|
|
8471
|
+
}
|
|
8472
|
+
participantUsers {
|
|
8473
|
+
...CouponParticipantUserFields
|
|
8474
|
+
}
|
|
8475
|
+
startDate
|
|
8476
|
+
updatedAt
|
|
8477
|
+
}
|
|
8478
|
+
${COUPON_CODE_FIELDS_FRAGMENT}
|
|
8479
|
+
${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
|
|
8480
|
+
${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
|
|
8481
|
+
`;
|
|
8482
|
+
var COUPON = import_client78.gql`
|
|
8483
|
+
fragment CouponFields on CouponType {
|
|
8484
|
+
_id
|
|
8485
|
+
active
|
|
8486
|
+
productCoupons {
|
|
8487
|
+
...ProductCouponFields
|
|
8488
|
+
}
|
|
8489
|
+
createdAt
|
|
8490
|
+
deletedAt
|
|
8491
|
+
updatedAt
|
|
8492
|
+
}
|
|
8493
|
+
${PRODUCT_COUPON_FIELDS_FRAGMENT}
|
|
8494
|
+
${COUPON_CODE_FIELDS_FRAGMENT}
|
|
8495
|
+
${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
|
|
8496
|
+
`;
|
|
8497
|
+
var GET_COUPONS = import_client78.gql`
|
|
8498
|
+
query getCoupons {
|
|
8499
|
+
coupons {
|
|
8500
|
+
...CouponFields
|
|
8501
|
+
}
|
|
8502
|
+
}
|
|
8503
|
+
${COUPON}
|
|
8504
|
+
`;
|
|
8505
|
+
var GET_COUPON = import_client78.gql`
|
|
8506
|
+
query getCoupon($_id: ID!) {
|
|
8507
|
+
coupon(_id: $_id) {
|
|
8508
|
+
...CouponFields
|
|
8509
|
+
}
|
|
8510
|
+
}
|
|
8511
|
+
${COUPON}
|
|
8512
|
+
`;
|
|
8513
|
+
|
|
8514
|
+
// src/graphql/mutations/coupon.ts
|
|
8515
|
+
var CREATE_COUPON_MUTATION = import_client79.gql`
|
|
8516
|
+
mutation createCoupon($input: CouponInputType!) {
|
|
8517
|
+
createCoupon(input: $input) {
|
|
8518
|
+
data {
|
|
8519
|
+
...CouponFields
|
|
8520
|
+
}
|
|
8521
|
+
message
|
|
8522
|
+
}
|
|
8523
|
+
}
|
|
8524
|
+
${COUPON}
|
|
8525
|
+
`;
|
|
8526
|
+
var UPDATE_COUPON_MUTATION = import_client79.gql`
|
|
8527
|
+
mutation updateCoupon($_id: ID!, $input: CouponInputType!) {
|
|
8528
|
+
updateCoupon(_id: $_id, input: $input) {
|
|
8529
|
+
data {
|
|
8530
|
+
...CouponFields
|
|
8531
|
+
}
|
|
8532
|
+
message
|
|
8533
|
+
}
|
|
8534
|
+
}
|
|
8535
|
+
${COUPON}
|
|
8536
|
+
`;
|
|
8537
|
+
var DELETE_COUPON_MUTATION = import_client79.gql`
|
|
8538
|
+
mutation deleteCoupon($_id: ID!) {
|
|
8539
|
+
deleteCoupon(_id: $_id) {
|
|
8540
|
+
data
|
|
8541
|
+
message
|
|
8542
|
+
}
|
|
8543
|
+
}
|
|
8544
|
+
`;
|
|
8545
|
+
|
|
8546
|
+
// src/graphql/hooks/coupon/hooksMutation.ts
|
|
8547
|
+
var useCreateCoupon = () => {
|
|
8548
|
+
const [createCoupon, { loading, error }] = (0, import_client80.useMutation)(CREATE_COUPON_MUTATION);
|
|
8549
|
+
return { createCoupon, error, loading };
|
|
8550
|
+
};
|
|
8551
|
+
var useUpdateCoupon = () => {
|
|
8552
|
+
const [updateCoupon, { loading, error }] = (0, import_client80.useMutation)(UPDATE_COUPON_MUTATION);
|
|
8553
|
+
return { error, loading, updateCoupon };
|
|
8554
|
+
};
|
|
8555
|
+
var useDeleteCoupon = () => {
|
|
8556
|
+
const [deleteCoupon, { loading, error }] = (0, import_client80.useMutation)(DELETE_COUPON_MUTATION);
|
|
8557
|
+
return { deleteCoupon, error, loading };
|
|
8558
|
+
};
|
|
8559
|
+
|
|
8560
|
+
// src/graphql/hooks/coupon/hooksQuery.ts
|
|
8561
|
+
var import_client81 = require("@apollo/client");
|
|
8562
|
+
var useGetCoupons = () => {
|
|
8563
|
+
const { loading, error, data, refetch } = (0, import_client81.useQuery)(GET_COUPONS, {
|
|
8564
|
+
fetchPolicy: "network-only"
|
|
8565
|
+
});
|
|
8566
|
+
const coupons = data?.coupons || [];
|
|
8567
|
+
return { coupons, error, loading, refetch };
|
|
8568
|
+
};
|
|
8569
|
+
var useGetCoupon = (_id) => {
|
|
8570
|
+
const { loading, error, data, refetch } = (0, import_client81.useQuery)(GET_COUPON, {
|
|
8571
|
+
fetchPolicy: "network-only",
|
|
8572
|
+
skip: !_id || _id === "",
|
|
8573
|
+
variables: { _id }
|
|
8574
|
+
});
|
|
8575
|
+
const coupon = data?.coupon || null;
|
|
8576
|
+
return { coupon, error, loading, refetch };
|
|
8577
|
+
};
|
|
8578
|
+
|
|
8427
8579
|
// src/images/index.ts
|
|
8428
8580
|
var PKG = "@timardex/cluemart-shared";
|
|
8429
8581
|
var IMAGE_EXTENSION = ".webp";
|
|
@@ -9283,6 +9435,7 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
9283
9435
|
useCreateAd,
|
|
9284
9436
|
useCreateBulkNotifications,
|
|
9285
9437
|
useCreateCheckoutSession,
|
|
9438
|
+
useCreateCoupon,
|
|
9286
9439
|
useCreateCustomerPortal,
|
|
9287
9440
|
useCreateEvent,
|
|
9288
9441
|
useCreateEventInfo,
|
|
@@ -9302,6 +9455,7 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
9302
9455
|
useDeleteAffiliate,
|
|
9303
9456
|
useDeleteAllNotifications,
|
|
9304
9457
|
useDeleteChat,
|
|
9458
|
+
useDeleteCoupon,
|
|
9305
9459
|
useDeleteEvent,
|
|
9306
9460
|
useDeleteNotification,
|
|
9307
9461
|
useDeletePartner,
|
|
@@ -9320,6 +9474,8 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
9320
9474
|
useGetChat,
|
|
9321
9475
|
useGetChatSubscription,
|
|
9322
9476
|
useGetChatsByRegion,
|
|
9477
|
+
useGetCoupon,
|
|
9478
|
+
useGetCoupons,
|
|
9323
9479
|
useGetEvent,
|
|
9324
9480
|
useGetEventByPlaceId,
|
|
9325
9481
|
useGetEventInfo,
|
|
@@ -9398,6 +9554,7 @@ function canAccessAdminPath(roles, pathname) {
|
|
|
9398
9554
|
useUpdateAd,
|
|
9399
9555
|
useUpdateAffiliateDetails,
|
|
9400
9556
|
useUpdateAppSettings,
|
|
9557
|
+
useUpdateCoupon,
|
|
9401
9558
|
useUpdateDailyClueGame,
|
|
9402
9559
|
useUpdateEvent,
|
|
9403
9560
|
useUpdateEventInfo,
|