@timardex/cluemart-shared 1.5.824 → 1.5.827
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-BFGA6SrQ.d.ts → ad-CCm6QYXb.d.ts} +1 -1
- package/dist/{ad-BRC6KNgv.d.mts → ad-CZBOdoLr.d.mts} +1 -1
- package/dist/auth/index.cjs +202 -9
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +28 -3
- package/dist/auth/index.d.ts +28 -3
- package/dist/auth/index.mjs +49 -10
- package/dist/auth/index.mjs.map +1 -1
- package/dist/{chunk-N7KENXCS.mjs → chunk-4NGXTQWT.mjs} +3 -3
- package/dist/{chunk-IREUJYMR.mjs → chunk-AQR53ECY.mjs} +3 -3
- package/dist/chunk-GHW3ZGBY.mjs +168 -0
- package/dist/chunk-GHW3ZGBY.mjs.map +1 -0
- package/dist/{chunk-WZPKYUSX.mjs → chunk-MOB5R5BF.mjs} +2 -2
- package/dist/{chunk-MIDSLTUJ.mjs → chunk-UOFI3LKZ.mjs} +3 -2
- package/dist/chunk-UOFI3LKZ.mjs.map +1 -0
- package/dist/{chunk-UHDYJBIX.mjs → chunk-VNF22ITY.mjs} +2 -2
- package/dist/{chunk-D33VEY7Q.mjs → chunk-VR3TDBJL.mjs} +6 -6
- package/dist/chunk-VR3TDBJL.mjs.map +1 -0
- package/dist/{chunk-EUOLQ7SS.mjs → chunk-Y62E7JLT.mjs} +2 -2
- package/dist/enums/index.cjs +5 -5
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +6 -6
- package/dist/enums/index.d.ts +6 -6
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +4 -4
- package/dist/graphql/index.cjs +2 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/graphql/index.mjs +3 -3
- package/dist/hooks/index.cjs +52 -19
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.mjs +10 -15
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +182 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +39 -8
- package/dist/index.d.ts +39 -8
- package/dist/index.mjs +172 -6
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.mjs +3 -3
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/{user-CCN2IPDV.d.ts → user-IVhCYYTM.d.ts} +13 -3
- package/dist/{user-CadKvubI.d.mts → user-duZdr5Nn.d.mts} +13 -3
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-D33VEY7Q.mjs.map +0 -1
- package/dist/chunk-MIDSLTUJ.mjs.map +0 -1
- /package/dist/{chunk-N7KENXCS.mjs.map → chunk-4NGXTQWT.mjs.map} +0 -0
- /package/dist/{chunk-IREUJYMR.mjs.map → chunk-AQR53ECY.mjs.map} +0 -0
- /package/dist/{chunk-WZPKYUSX.mjs.map → chunk-MOB5R5BF.mjs.map} +0 -0
- /package/dist/{chunk-UHDYJBIX.mjs.map → chunk-VNF22ITY.mjs.map} +0 -0
- /package/dist/{chunk-EUOLQ7SS.mjs.map → chunk-Y62E7JLT.mjs.map} +0 -0
package/dist/graphql/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolReturnType, c as SchoolType, d as AffiliateType } from '../ad-
|
|
4
|
+
import { A as AuthPayloadType, R as RefreshTokenPayloadType, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolReturnType, c as SchoolType, d as AffiliateType } from '../ad-CZBOdoLr.mjs';
|
|
5
5
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-ZPT9JlfH.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-959zf6qy.mjs';
|
|
7
|
-
import { S as SafeUserType, R as RedeemRewardResponse,
|
|
7
|
+
import { S as SafeUserType, R as RedeemRewardResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-duZdr5Nn.mjs';
|
|
8
8
|
import '../images/index.mjs';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolReturnType, c as SchoolType, d as AffiliateType } from '../ad-
|
|
4
|
+
import { A as AuthPayloadType, R as RefreshTokenPayloadType, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolReturnType, c as SchoolType, d as AffiliateType } from '../ad-CCm6QYXb.js';
|
|
5
5
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-ChZcl5wJ.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-wVC9VaCx.js';
|
|
7
|
-
import { S as SafeUserType, R as RedeemRewardResponse,
|
|
7
|
+
import { S as SafeUserType, R as RedeemRewardResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-IVhCYYTM.js';
|
|
8
8
|
import '../images/index.js';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
|
package/dist/graphql/index.mjs
CHANGED
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
useUpdateUser,
|
|
135
135
|
useUpdateVendor,
|
|
136
136
|
useUpdateVendorInfo
|
|
137
|
-
} from "../chunk-
|
|
137
|
+
} from "../chunk-MOB5R5BF.mjs";
|
|
138
138
|
import {
|
|
139
139
|
GET_EVENT,
|
|
140
140
|
GET_EVENT_INFO,
|
|
@@ -155,8 +155,8 @@ import {
|
|
|
155
155
|
useRequestPasswordReset,
|
|
156
156
|
useResetPassword,
|
|
157
157
|
useValidateVerificationToken
|
|
158
|
-
} from "../chunk-
|
|
159
|
-
import "../chunk-
|
|
158
|
+
} from "../chunk-UOFI3LKZ.mjs";
|
|
159
|
+
import "../chunk-VR3TDBJL.mjs";
|
|
160
160
|
export {
|
|
161
161
|
GET_EVENT,
|
|
162
162
|
GET_EVENT_BY_SLUG,
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -255,17 +255,6 @@ var EnumUserLicence = /* @__PURE__ */ ((EnumUserLicence2) => {
|
|
|
255
255
|
EnumUserLicence2["STANDARD_SCHOOL"] = "standard_school";
|
|
256
256
|
return EnumUserLicence2;
|
|
257
257
|
})(EnumUserLicence || {});
|
|
258
|
-
var EnumUserRole = /* @__PURE__ */ ((EnumUserRole2) => {
|
|
259
|
-
EnumUserRole2["ADMIN"] = "admin";
|
|
260
|
-
EnumUserRole2["SUPER_ADMIN"] = "super_admin";
|
|
261
|
-
EnumUserRole2["CUSTOMER"] = "customer";
|
|
262
|
-
EnumUserRole2["MARKETING"] = "marketing";
|
|
263
|
-
EnumUserRole2["MODERATOR"] = "moderator";
|
|
264
|
-
EnumUserRole2["SUPPORT"] = "support";
|
|
265
|
-
EnumUserRole2["AFFILIATE"] = "affiliate";
|
|
266
|
-
EnumUserRole2["SCHOOL"] = "school";
|
|
267
|
-
return EnumUserRole2;
|
|
268
|
-
})(EnumUserRole || {});
|
|
269
258
|
var EnumSocialMedia = /* @__PURE__ */ ((EnumSocialMedia2) => {
|
|
270
259
|
EnumSocialMedia2["FACEBOOK"] = "facebook";
|
|
271
260
|
EnumSocialMedia2["INSTAGRAM"] = "instagram";
|
|
@@ -2087,8 +2076,7 @@ var userSchema = yup4.object().shape({
|
|
|
2087
2076
|
// only necessary if password typed
|
|
2088
2077
|
then: (schema) => schema.required("Confirm Password is required").oneOf([yup4.ref("password")], "Passwords must match"),
|
|
2089
2078
|
otherwise: (schema) => schema.notRequired()
|
|
2090
|
-
})
|
|
2091
|
-
role: yup4.mixed().oneOf(Object.values(EnumUserRole)).required("Role is required")
|
|
2079
|
+
})
|
|
2092
2080
|
});
|
|
2093
2081
|
|
|
2094
2082
|
// src/yupSchema/auth.ts
|
|
@@ -2656,8 +2644,9 @@ var USER_FIELDS_FRAGMENT = import_client.gql`
|
|
|
2656
2644
|
overallPoints
|
|
2657
2645
|
platform
|
|
2658
2646
|
preferredRegion
|
|
2647
|
+
permissions
|
|
2659
2648
|
promoCodes
|
|
2660
|
-
|
|
2649
|
+
roles
|
|
2661
2650
|
redeemedRewards {
|
|
2662
2651
|
...RedeemedRewardFields
|
|
2663
2652
|
}
|
|
@@ -5352,6 +5341,54 @@ var SHARE_TYPE_PATH_REGEX = [
|
|
|
5352
5341
|
RELATION_SHARE_INVITATION
|
|
5353
5342
|
].join("|");
|
|
5354
5343
|
|
|
5344
|
+
// src/auth/permissions/rolePermissions.ts
|
|
5345
|
+
var ADMIN_PERMISSIONS = [
|
|
5346
|
+
"dashboard.admin",
|
|
5347
|
+
"users.read",
|
|
5348
|
+
"users.update",
|
|
5349
|
+
"users.delete",
|
|
5350
|
+
"events.read",
|
|
5351
|
+
"events.create",
|
|
5352
|
+
"events.update",
|
|
5353
|
+
"events.delete",
|
|
5354
|
+
"vendors.read",
|
|
5355
|
+
"vendors.create",
|
|
5356
|
+
"vendors.update",
|
|
5357
|
+
"vendors.delete",
|
|
5358
|
+
"partners.read",
|
|
5359
|
+
"partners.create",
|
|
5360
|
+
"partners.update",
|
|
5361
|
+
"partners.delete",
|
|
5362
|
+
"schools.read",
|
|
5363
|
+
"schools.create",
|
|
5364
|
+
"schools.update",
|
|
5365
|
+
"schools.delete",
|
|
5366
|
+
"affiliates.read",
|
|
5367
|
+
"affiliates.create",
|
|
5368
|
+
"affiliates.update",
|
|
5369
|
+
"affiliates.delete",
|
|
5370
|
+
"ads.read",
|
|
5371
|
+
"ads.create",
|
|
5372
|
+
"ads.update",
|
|
5373
|
+
"ads.delete",
|
|
5374
|
+
"posts.read",
|
|
5375
|
+
"posts.create",
|
|
5376
|
+
"posts.update",
|
|
5377
|
+
"posts.delete",
|
|
5378
|
+
"settings.read",
|
|
5379
|
+
"settings.update"
|
|
5380
|
+
];
|
|
5381
|
+
var ROLE_PERMISSIONS = {
|
|
5382
|
+
["super_admin" /* SUPER_ADMIN */]: ["*"],
|
|
5383
|
+
["admin" /* ADMIN */]: ADMIN_PERMISSIONS,
|
|
5384
|
+
["customer" /* CUSTOMER */]: ["dashboard.customer"],
|
|
5385
|
+
["event" /* EVENT */]: ["dashboard.event", "events.manage_own"],
|
|
5386
|
+
["vendor" /* VENDOR */]: ["dashboard.vendor", "vendors.manage_own"],
|
|
5387
|
+
["partner" /* PARTNER */]: ["dashboard.partner", "partners.manage_own"],
|
|
5388
|
+
["school" /* SCHOOL */]: ["dashboard.school", "schools.manage_own"],
|
|
5389
|
+
["affiliate" /* AFFILIATE */]: ["dashboard.affiliate", "affiliates.manage_own"]
|
|
5390
|
+
};
|
|
5391
|
+
|
|
5355
5392
|
// src/yupSchema/post.ts
|
|
5356
5393
|
var postContentSchema = yup8.object().shape({
|
|
5357
5394
|
contentData: yup8.mixed().optional().nullable(),
|
|
@@ -5953,8 +5990,7 @@ var defaultValues = {
|
|
|
5953
5990
|
lastName: "",
|
|
5954
5991
|
location: null,
|
|
5955
5992
|
password: null,
|
|
5956
|
-
preferredRegion: ""
|
|
5957
|
-
role: "customer" /* CUSTOMER */
|
|
5993
|
+
preferredRegion: ""
|
|
5958
5994
|
};
|
|
5959
5995
|
function useUserForm(data) {
|
|
5960
5996
|
const {
|
|
@@ -5983,7 +6019,6 @@ function useUserForm(data) {
|
|
|
5983
6019
|
location: data.location,
|
|
5984
6020
|
password: data.password,
|
|
5985
6021
|
preferredRegion: data.preferredRegion,
|
|
5986
|
-
role: data.role,
|
|
5987
6022
|
termsAgreement: data.termsAgreement
|
|
5988
6023
|
});
|
|
5989
6024
|
} else {
|
|
@@ -6002,7 +6037,6 @@ function useUserForm(data) {
|
|
|
6002
6037
|
location,
|
|
6003
6038
|
password,
|
|
6004
6039
|
preferredRegion,
|
|
6005
|
-
role,
|
|
6006
6040
|
termsAgreement
|
|
6007
6041
|
} = getValues();
|
|
6008
6042
|
return {
|
|
@@ -6019,7 +6053,6 @@ function useUserForm(data) {
|
|
|
6019
6053
|
location,
|
|
6020
6054
|
password,
|
|
6021
6055
|
preferredRegion,
|
|
6022
|
-
role,
|
|
6023
6056
|
termsAgreement
|
|
6024
6057
|
},
|
|
6025
6058
|
formState,
|