@timardex/cluemart-shared 1.5.825 → 1.5.828

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.
Files changed (66) hide show
  1. package/dist/{ad-CoAxqdwK.d.ts → ad-CCm6QYXb.d.ts} +1 -1
  2. package/dist/{ad-Ds-PlS5A.d.mts → ad-CZBOdoLr.d.mts} +1 -1
  3. package/dist/apollo/index.cjs +4 -1
  4. package/dist/apollo/index.cjs.map +1 -1
  5. package/dist/apollo/index.d.mts +1 -0
  6. package/dist/apollo/index.d.ts +1 -0
  7. package/dist/apollo/index.mjs +4 -1
  8. package/dist/apollo/index.mjs.map +1 -1
  9. package/dist/auth/index.cjs +202 -9
  10. package/dist/auth/index.cjs.map +1 -1
  11. package/dist/auth/index.d.mts +28 -3
  12. package/dist/auth/index.d.ts +28 -3
  13. package/dist/auth/index.mjs +49 -10
  14. package/dist/auth/index.mjs.map +1 -1
  15. package/dist/{chunk-N7KENXCS.mjs → chunk-4NGXTQWT.mjs} +3 -3
  16. package/dist/{chunk-IREUJYMR.mjs → chunk-AQR53ECY.mjs} +3 -3
  17. package/dist/chunk-GHW3ZGBY.mjs +168 -0
  18. package/dist/chunk-GHW3ZGBY.mjs.map +1 -0
  19. package/dist/{chunk-WZPKYUSX.mjs → chunk-MOB5R5BF.mjs} +2 -2
  20. package/dist/{chunk-MIDSLTUJ.mjs → chunk-UOFI3LKZ.mjs} +3 -2
  21. package/dist/chunk-UOFI3LKZ.mjs.map +1 -0
  22. package/dist/{chunk-UHDYJBIX.mjs → chunk-VNF22ITY.mjs} +2 -2
  23. package/dist/{chunk-D33VEY7Q.mjs → chunk-VR3TDBJL.mjs} +6 -6
  24. package/dist/chunk-VR3TDBJL.mjs.map +1 -0
  25. package/dist/{chunk-EUOLQ7SS.mjs → chunk-Y62E7JLT.mjs} +2 -2
  26. package/dist/enums/index.cjs +5 -5
  27. package/dist/enums/index.cjs.map +1 -1
  28. package/dist/enums/index.d.mts +6 -6
  29. package/dist/enums/index.d.ts +6 -6
  30. package/dist/enums/index.mjs +1 -1
  31. package/dist/formFields/index.cjs.map +1 -1
  32. package/dist/formFields/index.mjs +4 -4
  33. package/dist/graphql/index.cjs +2 -1
  34. package/dist/graphql/index.cjs.map +1 -1
  35. package/dist/graphql/index.d.mts +2 -2
  36. package/dist/graphql/index.d.ts +2 -2
  37. package/dist/graphql/index.mjs +3 -3
  38. package/dist/hooks/index.cjs +50 -1
  39. package/dist/hooks/index.cjs.map +1 -1
  40. package/dist/hooks/index.d.mts +2 -2
  41. package/dist/hooks/index.d.ts +2 -2
  42. package/dist/hooks/index.mjs +8 -7
  43. package/dist/hooks/index.mjs.map +1 -1
  44. package/dist/index.cjs +182 -6
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.d.mts +39 -8
  47. package/dist/index.d.ts +39 -8
  48. package/dist/index.mjs +172 -6
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/sharing/index.cjs.map +1 -1
  51. package/dist/sharing/index.mjs +3 -3
  52. package/dist/types/index.d.mts +2 -2
  53. package/dist/types/index.d.ts +2 -2
  54. package/dist/types/index.mjs +1 -1
  55. package/dist/{user-D27cEk4K.d.ts → user-IVhCYYTM.d.ts} +12 -2
  56. package/dist/{user-CRJN9GQF.d.mts → user-duZdr5Nn.d.mts} +12 -2
  57. package/dist/utils/index.cjs.map +1 -1
  58. package/dist/utils/index.mjs +3 -3
  59. package/package.json +1 -1
  60. package/dist/chunk-D33VEY7Q.mjs.map +0 -1
  61. package/dist/chunk-MIDSLTUJ.mjs.map +0 -1
  62. /package/dist/{chunk-N7KENXCS.mjs.map → chunk-4NGXTQWT.mjs.map} +0 -0
  63. /package/dist/{chunk-IREUJYMR.mjs.map → chunk-AQR53ECY.mjs.map} +0 -0
  64. /package/dist/{chunk-WZPKYUSX.mjs.map → chunk-MOB5R5BF.mjs.map} +0 -0
  65. /package/dist/{chunk-UHDYJBIX.mjs.map → chunk-VNF22ITY.mjs.map} +0 -0
  66. /package/dist/{chunk-EUOLQ7SS.mjs.map → chunk-Y62E7JLT.mjs.map} +0 -0
@@ -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-Ds-PlS5A.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-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, a as ResourceByUser, b as SubscriptionPlansResponse, c as SubscriptionStatusData } from '../user-CRJN9GQF.mjs';
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
 
@@ -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-CoAxqdwK.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-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, a as ResourceByUser, b as SubscriptionPlansResponse, c as SubscriptionStatusData } from '../user-D27cEk4K.js';
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
 
@@ -134,7 +134,7 @@ import {
134
134
  useUpdateUser,
135
135
  useUpdateVendor,
136
136
  useUpdateVendorInfo
137
- } from "../chunk-WZPKYUSX.mjs";
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-MIDSLTUJ.mjs";
159
- import "../chunk-D33VEY7Q.mjs";
158
+ } from "../chunk-UOFI3LKZ.mjs";
159
+ import "../chunk-VR3TDBJL.mjs";
160
160
  export {
161
161
  GET_EVENT,
162
162
  GET_EVENT_BY_SLUG,
@@ -2644,8 +2644,9 @@ var USER_FIELDS_FRAGMENT = import_client.gql`
2644
2644
  overallPoints
2645
2645
  platform
2646
2646
  preferredRegion
2647
+ permissions
2647
2648
  promoCodes
2648
- role
2649
+ roles
2649
2650
  redeemedRewards {
2650
2651
  ...RedeemedRewardFields
2651
2652
  }
@@ -5340,6 +5341,54 @@ var SHARE_TYPE_PATH_REGEX = [
5340
5341
  RELATION_SHARE_INVITATION
5341
5342
  ].join("|");
5342
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
+
5343
5392
  // src/yupSchema/post.ts
5344
5393
  var postContentSchema = yup8.object().shape({
5345
5394
  contentData: yup8.mixed().optional().nullable(),