@timardex/cluemart-shared 1.5.801 → 1.5.803
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-BzphUvUS.d.ts → ad--z7UC1FB.d.ts} +6 -5
- package/dist/{ad-2RNm0qc-.d.mts → ad-G_cQ00n4.d.mts} +6 -5
- package/dist/{chunk-AM4MMUVW.mjs → chunk-6633VMDB.mjs} +2 -2
- package/dist/{chunk-EAL3VN4V.mjs → chunk-G76ILLVZ.mjs} +26 -3
- package/dist/{chunk-EAL3VN4V.mjs.map → chunk-G76ILLVZ.mjs.map} +1 -1
- package/dist/{chunk-2PFUE6DY.mjs → chunk-YVIZ4AWF.mjs} +1 -1
- package/dist/{chunk-2PFUE6DY.mjs.map → chunk-YVIZ4AWF.mjs.map} +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/graphql/index.cjs +25 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +7 -2
- package/dist/graphql/index.d.ts +7 -2
- package/dist/graphql/index.mjs +3 -1
- package/dist/hooks/index.cjs +9 -1
- 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 +3 -3
- package/dist/index.cjs +25 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.mjs +24 -1
- package/dist/index.mjs.map +1 -1
- 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/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-AM4MMUVW.mjs.map → chunk-6633VMDB.mjs.map} +0 -0
|
@@ -230,6 +230,10 @@ type AffiliateResourceType = {
|
|
|
230
230
|
resourceType: EnumResourceType;
|
|
231
231
|
rewards: AffiliateRewardType[];
|
|
232
232
|
};
|
|
233
|
+
type RedeemHistoryType = {
|
|
234
|
+
redeemedAt: Date;
|
|
235
|
+
rewardValue: number;
|
|
236
|
+
};
|
|
233
237
|
interface AffiliateType {
|
|
234
238
|
_id: string;
|
|
235
239
|
active: boolean;
|
|
@@ -239,12 +243,9 @@ interface AffiliateType {
|
|
|
239
243
|
affiliateResources: AffiliateResourceType[];
|
|
240
244
|
createdAt: Date;
|
|
241
245
|
deletedAt: Date | null;
|
|
242
|
-
lastRewardRedemptions: {
|
|
243
|
-
redeemedAt: Date;
|
|
244
|
-
rewardValue: number;
|
|
245
|
-
}[];
|
|
246
246
|
overallPoints: number;
|
|
247
247
|
owner: OwnerType;
|
|
248
|
+
redeemHistory?: RedeemHistoryType[] | null;
|
|
248
249
|
updatedAt: Date | null;
|
|
249
250
|
}
|
|
250
251
|
type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
|
|
@@ -351,4 +352,4 @@ interface AdType extends AdFormData {
|
|
|
351
352
|
updatedAt: Date | null;
|
|
352
353
|
}
|
|
353
354
|
|
|
354
|
-
export { type
|
|
355
|
+
export { type SchoolCampaignType as $, type AuthPayloadType as A, type AffiliateBankAccountDetailsType as B, type CreateUserFormData as C, type AffiliateContactDetails as D, EnumAdStatus as E, type AffiliateDetailsType as F, type AffiliateResourceType as G, type AffiliateRewardType as H, type CreateAdFormData as I, EnumAdShowOn as J, EnumAdStyle as K, EnumAdType as L, EnumAffiliateRewardType as M, EnumVerificationType as N, type LoginFormData as O, type PartnerType as P, type MarketingMaterialRequestInputType as Q, type RefreshTokenPayloadType as R, type SafeUserType as S, type PosterInputType as T, type UserFormData as U, type RedeemHistoryType as V, type RedeemRewardInput as W, type RedeemedReward as X, type RegisterFormData as Y, type RequestPasswordResetFormData as Z, type ResetPasswordFormData as _, type RedeemRewardResponse as a, type SchoolRegisteredUserType as a0, type StripeSubscription as a1, type SubscriptionPlanData as a2, type SubscriptionPricingData as a3, type UserActivity as a4, type UserActivityEvent as a5, type UserType as a6, type ValidateVerificationTokenFormData as a7, type ResourceByUser as b, type AdType as c, type SubscriptionPlansResponse as d, type SubscriptionStatusData as e, type AppSettingsType as f, type SchoolReturnType as g, type SchoolType as h, type AffiliateType as i, type CreateLoginFormData as j, type CreateRegisterFormData as k, type CreateRequestPasswordResetFormData as l, type CreateValidateVerificationTokenFormData as m, type CreateResetPasswordFormData as n, type AffiliateFormData as o, type PartnerFormData as p, type AdFormData as q, type CreateAdFormState as r, type CreatePartnerFormData as s, type AppSettingsFormData as t, type CreateAppSettingsFormData as u, type SchoolFormData as v, type CreateSchoolFormData as w, type CreateAffiliateFormData as x, type AdFormState as y, type AdResource as z };
|
|
@@ -230,6 +230,10 @@ type AffiliateResourceType = {
|
|
|
230
230
|
resourceType: EnumResourceType;
|
|
231
231
|
rewards: AffiliateRewardType[];
|
|
232
232
|
};
|
|
233
|
+
type RedeemHistoryType = {
|
|
234
|
+
redeemedAt: Date;
|
|
235
|
+
rewardValue: number;
|
|
236
|
+
};
|
|
233
237
|
interface AffiliateType {
|
|
234
238
|
_id: string;
|
|
235
239
|
active: boolean;
|
|
@@ -239,12 +243,9 @@ interface AffiliateType {
|
|
|
239
243
|
affiliateResources: AffiliateResourceType[];
|
|
240
244
|
createdAt: Date;
|
|
241
245
|
deletedAt: Date | null;
|
|
242
|
-
lastRewardRedemptions: {
|
|
243
|
-
redeemedAt: Date;
|
|
244
|
-
rewardValue: number;
|
|
245
|
-
}[];
|
|
246
246
|
overallPoints: number;
|
|
247
247
|
owner: OwnerType;
|
|
248
|
+
redeemHistory?: RedeemHistoryType[] | null;
|
|
248
249
|
updatedAt: Date | null;
|
|
249
250
|
}
|
|
250
251
|
type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
|
|
@@ -351,4 +352,4 @@ interface AdType extends AdFormData {
|
|
|
351
352
|
updatedAt: Date | null;
|
|
352
353
|
}
|
|
353
354
|
|
|
354
|
-
export { type
|
|
355
|
+
export { type SchoolCampaignType as $, type AuthPayloadType as A, type AffiliateBankAccountDetailsType as B, type CreateUserFormData as C, type AffiliateContactDetails as D, EnumAdStatus as E, type AffiliateDetailsType as F, type AffiliateResourceType as G, type AffiliateRewardType as H, type CreateAdFormData as I, EnumAdShowOn as J, EnumAdStyle as K, EnumAdType as L, EnumAffiliateRewardType as M, EnumVerificationType as N, type LoginFormData as O, type PartnerType as P, type MarketingMaterialRequestInputType as Q, type RefreshTokenPayloadType as R, type SafeUserType as S, type PosterInputType as T, type UserFormData as U, type RedeemHistoryType as V, type RedeemRewardInput as W, type RedeemedReward as X, type RegisterFormData as Y, type RequestPasswordResetFormData as Z, type ResetPasswordFormData as _, type RedeemRewardResponse as a, type SchoolRegisteredUserType as a0, type StripeSubscription as a1, type SubscriptionPlanData as a2, type SubscriptionPricingData as a3, type UserActivity as a4, type UserActivityEvent as a5, type UserType as a6, type ValidateVerificationTokenFormData as a7, type ResourceByUser as b, type AdType as c, type SubscriptionPlansResponse as d, type SubscriptionStatusData as e, type AppSettingsType as f, type SchoolReturnType as g, type SchoolType as h, type AffiliateType as i, type CreateLoginFormData as j, type CreateRegisterFormData as k, type CreateRequestPasswordResetFormData as l, type CreateValidateVerificationTokenFormData as m, type CreateResetPasswordFormData as n, type AffiliateFormData as o, type PartnerFormData as p, type AdFormData as q, type CreateAdFormState as r, type CreatePartnerFormData as s, type AppSettingsFormData as t, type CreateAppSettingsFormData as u, type SchoolFormData as v, type CreateSchoolFormData as w, type CreateAffiliateFormData as x, type AdFormState as y, type AdResource as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PROMO_CODE_PREFIX,
|
|
3
3
|
gameScreenIdentifierList
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YVIZ4AWF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
dateFormat,
|
|
7
7
|
formatDate,
|
|
@@ -1554,4 +1554,4 @@ export {
|
|
|
1554
1554
|
getVendorEventRelationDateOptions,
|
|
1555
1555
|
getVendorEventsEmptyMessage
|
|
1556
1556
|
};
|
|
1557
|
-
//# sourceMappingURL=chunk-
|
|
1557
|
+
//# sourceMappingURL=chunk-6633VMDB.mjs.map
|
|
@@ -5136,7 +5136,7 @@ var AFFILIATE_FIELDS_FRAGMENT = gql40`
|
|
|
5136
5136
|
}
|
|
5137
5137
|
createdAt
|
|
5138
5138
|
deletedAt
|
|
5139
|
-
|
|
5139
|
+
redeemHistory {
|
|
5140
5140
|
redeemedAt
|
|
5141
5141
|
rewardValue
|
|
5142
5142
|
}
|
|
@@ -5216,6 +5216,14 @@ var DELETE_AFFILIATE_MUTATION = gql41`
|
|
|
5216
5216
|
deleteAffiliate(_id: $_id)
|
|
5217
5217
|
}
|
|
5218
5218
|
`;
|
|
5219
|
+
var REDEEM_AFFILIATE_REWARD_MUTATION = gql41`
|
|
5220
|
+
mutation redeemAffiliateReward($affiliateId: ID!) {
|
|
5221
|
+
redeemAffiliateReward(affiliateId: $affiliateId) {
|
|
5222
|
+
...AffiliateFields
|
|
5223
|
+
}
|
|
5224
|
+
}
|
|
5225
|
+
${AFFILIATE_FIELDS_FRAGMENT}
|
|
5226
|
+
`;
|
|
5219
5227
|
|
|
5220
5228
|
// src/graphql/hooks/affiliate/hooksMutation.ts
|
|
5221
5229
|
var useUpdateAffiliateDetails = () => {
|
|
@@ -5242,6 +5250,20 @@ var useDeleteAffiliate = () => {
|
|
|
5242
5250
|
);
|
|
5243
5251
|
return { deleteAffiliate, error, loading };
|
|
5244
5252
|
};
|
|
5253
|
+
var useRedeemAffiliateReward = () => {
|
|
5254
|
+
const [redeemAffiliateReward, { loading, error }] = useMutation20(
|
|
5255
|
+
REDEEM_AFFILIATE_REWARD_MUTATION,
|
|
5256
|
+
{
|
|
5257
|
+
awaitRefetchQueries: true,
|
|
5258
|
+
refetchQueries: (mutationResult) => {
|
|
5259
|
+
const affiliateId = mutationResult?.data?.redeemAffiliateReward?._id;
|
|
5260
|
+
if (!affiliateId) return [];
|
|
5261
|
+
return [{ query: GET_AFFILIATE, variables: { _id: affiliateId } }];
|
|
5262
|
+
}
|
|
5263
|
+
}
|
|
5264
|
+
);
|
|
5265
|
+
return { error, loading, redeemAffiliateReward };
|
|
5266
|
+
};
|
|
5245
5267
|
|
|
5246
5268
|
export {
|
|
5247
5269
|
GET_EVENT,
|
|
@@ -5396,6 +5418,7 @@ export {
|
|
|
5396
5418
|
useGetAffiliate,
|
|
5397
5419
|
useGetAffiliates,
|
|
5398
5420
|
useUpdateAffiliateDetails,
|
|
5399
|
-
useDeleteAffiliate
|
|
5421
|
+
useDeleteAffiliate,
|
|
5422
|
+
useRedeemAffiliateReward
|
|
5400
5423
|
};
|
|
5401
|
-
//# sourceMappingURL=chunk-
|
|
5424
|
+
//# sourceMappingURL=chunk-G76ILLVZ.mjs.map
|