@timardex/cluemart-shared 1.5.805 → 1.5.806
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-G_cQ00n4.d.mts → ad-DYgChtJf.d.mts} +11 -4
- package/dist/{ad--z7UC1FB.d.ts → ad-bRnaibiB.d.ts} +11 -4
- package/dist/{chunk-RITKFYRI.mjs → chunk-5K4VC3B5.mjs} +11 -3
- package/dist/chunk-5K4VC3B5.mjs.map +1 -0
- package/dist/{chunk-YVIZ4AWF.mjs → chunk-HW6UDF6S.mjs} +8 -1
- package/dist/{chunk-YVIZ4AWF.mjs.map → chunk-HW6UDF6S.mjs.map} +1 -1
- package/dist/{chunk-G76ILLVZ.mjs → chunk-XBUBH7OF.mjs} +10 -1
- package/dist/{chunk-G76ILLVZ.mjs.map → chunk-XBUBH7OF.mjs.map} +1 -1
- package/dist/formFields/index.cjs +7 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/graphql/index.cjs +9 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +63 -0
- 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 +43 -3
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +8 -0
- 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 +3 -1
- package/dist/utils/index.cjs +9 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +7 -1
- package/dist/utils/index.d.ts +7 -1
- package/dist/utils/index.mjs +4 -2
- package/package.json +1 -1
- package/dist/chunk-RITKFYRI.mjs.map +0 -1
package/dist/graphql/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
2
|
import { DocumentNode } from 'graphql';
|
|
3
3
|
import { EnumResourceType, EnumEventDateStatus } from '../enums/index.mjs';
|
|
4
|
-
import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType, i as AffiliateType } from '../ad-
|
|
4
|
+
import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType, i as AffiliateType } from '../ad-DYgChtJf.mjs';
|
|
5
5
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-lFB7B-Y9.mjs';
|
|
6
6
|
import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global-C8npu_7P.mjs';
|
|
7
7
|
import '../images/index.mjs';
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
2
|
import { DocumentNode } from 'graphql';
|
|
3
3
|
import { EnumResourceType, EnumEventDateStatus } from '../enums/index.js';
|
|
4
|
-
import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType, i as AffiliateType } from '../ad
|
|
4
|
+
import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType, i as AffiliateType } from '../ad-bRnaibiB.js';
|
|
5
5
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CJrM2qDC.js';
|
|
6
6
|
import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global-BeBuHWbg.js';
|
|
7
7
|
import '../images/index.js';
|
package/dist/graphql/index.mjs
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -522,6 +522,14 @@ var TIER_FROM_LICENCE = {
|
|
|
522
522
|
["standard_school" /* STANDARD_SCHOOL */]: "standard"
|
|
523
523
|
};
|
|
524
524
|
|
|
525
|
+
// src/types/affiliate.ts
|
|
526
|
+
var EnumAffiliateParticipantType = /* @__PURE__ */ ((EnumAffiliateParticipantType2) => {
|
|
527
|
+
EnumAffiliateParticipantType2["INDIVIDUAL"] = "INDIVIDUAL";
|
|
528
|
+
EnumAffiliateParticipantType2["SOLE_TRADER"] = "SOLE_TRADER";
|
|
529
|
+
EnumAffiliateParticipantType2["COMPANY"] = "COMPANY";
|
|
530
|
+
return EnumAffiliateParticipantType2;
|
|
531
|
+
})(EnumAffiliateParticipantType || {});
|
|
532
|
+
|
|
525
533
|
// src/utils/utils.ts
|
|
526
534
|
var statusOptions = [
|
|
527
535
|
...Object.values(EnumInviteStatus).map((status) => ({
|
|
@@ -1612,6 +1620,13 @@ var availableCategories = assignColorToCategories([
|
|
|
1612
1620
|
...serviceAndExperience
|
|
1613
1621
|
]);
|
|
1614
1622
|
|
|
1623
|
+
// src/utils/affiliate.ts
|
|
1624
|
+
var AFFILIATE_PARTICIPANT_TYPE_LABELS = {
|
|
1625
|
+
["INDIVIDUAL" /* INDIVIDUAL */]: "Individual",
|
|
1626
|
+
["SOLE_TRADER" /* SOLE_TRADER */]: "Sole Trader",
|
|
1627
|
+
["COMPANY" /* COMPANY */]: "Company"
|
|
1628
|
+
};
|
|
1629
|
+
|
|
1615
1630
|
// src/yupSchema/global.ts
|
|
1616
1631
|
var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
1617
1632
|
var nzbnRegex = /^94\d{11}$/;
|
|
@@ -5090,6 +5105,14 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
|
|
|
5090
5105
|
contactDetails {
|
|
5091
5106
|
mobilePhone
|
|
5092
5107
|
}
|
|
5108
|
+
irdNumber
|
|
5109
|
+
participantType
|
|
5110
|
+
email
|
|
5111
|
+
firstName
|
|
5112
|
+
lastName
|
|
5113
|
+
location {
|
|
5114
|
+
...LocationFields
|
|
5115
|
+
}
|
|
5093
5116
|
region
|
|
5094
5117
|
socialMedia {
|
|
5095
5118
|
...SocialMediaFields
|
|
@@ -5099,6 +5122,7 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
|
|
|
5099
5122
|
}
|
|
5100
5123
|
}
|
|
5101
5124
|
${AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT}
|
|
5125
|
+
${LOCATION_FIELDS_FRAGMENT}
|
|
5102
5126
|
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
5103
5127
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
5104
5128
|
`;
|
|
@@ -5430,6 +5454,12 @@ var defaultAffiliateFormValues = {
|
|
|
5430
5454
|
contactDetails: {
|
|
5431
5455
|
mobilePhone: ""
|
|
5432
5456
|
},
|
|
5457
|
+
email: "",
|
|
5458
|
+
firstName: "",
|
|
5459
|
+
irdNumber: "",
|
|
5460
|
+
lastName: "",
|
|
5461
|
+
location: defaultLocation,
|
|
5462
|
+
participantType: "",
|
|
5433
5463
|
region: "",
|
|
5434
5464
|
socialMedia: null,
|
|
5435
5465
|
termsAgreement: null
|
|
@@ -5444,6 +5474,12 @@ function mapAffiliateToFormData(affiliate) {
|
|
|
5444
5474
|
contactDetails: affiliate.affiliateDetails?.contactDetails ?? {
|
|
5445
5475
|
mobilePhone: ""
|
|
5446
5476
|
},
|
|
5477
|
+
email: affiliate.affiliateDetails?.email ?? "",
|
|
5478
|
+
firstName: affiliate.affiliateDetails?.firstName ?? "",
|
|
5479
|
+
irdNumber: affiliate.affiliateDetails?.irdNumber ?? "",
|
|
5480
|
+
lastName: affiliate.affiliateDetails?.lastName ?? "",
|
|
5481
|
+
location: affiliate.affiliateDetails?.location ?? defaultLocation,
|
|
5482
|
+
participantType: affiliate.affiliateDetails?.participantType ?? "",
|
|
5447
5483
|
region: affiliate.affiliateDetails?.region ?? "",
|
|
5448
5484
|
socialMedia: affiliate.affiliateDetails?.socialMedia ?? null,
|
|
5449
5485
|
termsAgreement: affiliate.affiliateDetails?.termsAgreement ?? null
|
|
@@ -6622,6 +6658,15 @@ var affiliateSchema = yup12.object().shape({
|
|
|
6622
6658
|
contactDetails: affiliateContactDetailsSchema.required(
|
|
6623
6659
|
"Contact details are required"
|
|
6624
6660
|
),
|
|
6661
|
+
email: yup12.string().trim().required("Email is required"),
|
|
6662
|
+
firstName: yup12.string().trim().required("First name is required"),
|
|
6663
|
+
irdNumber: yup12.string().trim().required("IRD number is required"),
|
|
6664
|
+
lastName: yup12.string().trim().required("Last name is required"),
|
|
6665
|
+
location: locationSchema.required("Location is required"),
|
|
6666
|
+
participantType: yup12.mixed().oneOf(
|
|
6667
|
+
Object.values(EnumAffiliateParticipantType),
|
|
6668
|
+
"Please select a valid participant type"
|
|
6669
|
+
).required("Participant type is required"),
|
|
6625
6670
|
region: yup12.string().trim().required("Region is required"),
|
|
6626
6671
|
socialMedia: yup12.array().of(socialMediaSchema).nullable().default(null)
|
|
6627
6672
|
});
|
|
@@ -6645,6 +6690,12 @@ function useAffiliateForm(data) {
|
|
|
6645
6690
|
_id: data._id,
|
|
6646
6691
|
bankAccountDetails: data.bankAccountDetails,
|
|
6647
6692
|
contactDetails: data.contactDetails,
|
|
6693
|
+
email: data.email,
|
|
6694
|
+
firstName: data.firstName,
|
|
6695
|
+
irdNumber: data.irdNumber,
|
|
6696
|
+
lastName: data.lastName,
|
|
6697
|
+
location: data.location,
|
|
6698
|
+
participantType: data.participantType,
|
|
6648
6699
|
region: data.region,
|
|
6649
6700
|
socialMedia: data.socialMedia,
|
|
6650
6701
|
termsAgreement: data.termsAgreement
|
|
@@ -6654,6 +6705,12 @@ function useAffiliateForm(data) {
|
|
|
6654
6705
|
_id,
|
|
6655
6706
|
bankAccountDetails,
|
|
6656
6707
|
contactDetails,
|
|
6708
|
+
email,
|
|
6709
|
+
firstName,
|
|
6710
|
+
irdNumber,
|
|
6711
|
+
lastName,
|
|
6712
|
+
location,
|
|
6713
|
+
participantType,
|
|
6657
6714
|
region,
|
|
6658
6715
|
socialMedia: socialMedia2,
|
|
6659
6716
|
termsAgreement
|
|
@@ -6664,6 +6721,12 @@ function useAffiliateForm(data) {
|
|
|
6664
6721
|
_id,
|
|
6665
6722
|
bankAccountDetails,
|
|
6666
6723
|
contactDetails,
|
|
6724
|
+
email,
|
|
6725
|
+
firstName,
|
|
6726
|
+
irdNumber,
|
|
6727
|
+
lastName,
|
|
6728
|
+
location,
|
|
6729
|
+
participantType,
|
|
6667
6730
|
region,
|
|
6668
6731
|
socialMedia: socialMedia2,
|
|
6669
6732
|
termsAgreement
|