@replyke/core 5.1.5-beta.7 → 5.1.5-beta.9

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 (185) hide show
  1. package/dist/cjs/context/index.d.ts +0 -1
  2. package/dist/cjs/context/index.js +1 -6
  3. package/dist/cjs/context/index.js.map +1 -1
  4. package/dist/cjs/helpers/addNotificationsMessages.js +7 -9
  5. package/dist/cjs/helpers/addNotificationsMessages.js.map +1 -1
  6. package/dist/cjs/hooks/app-notifications-redux/index.d.ts +1 -1
  7. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +1 -0
  8. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +67 -9
  9. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +1 -1
  10. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +15 -1
  11. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +25 -9
  12. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +1 -1
  13. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +1 -1
  14. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +12 -4
  15. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
  16. package/dist/cjs/index.d.ts +1 -2
  17. package/dist/cjs/index.js +2 -10
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/legacy/context/app-notifications-context.js.map +1 -0
  20. package/dist/cjs/{context → legacy/context}/auth-context.js +1 -1
  21. package/dist/cjs/legacy/context/auth-context.js.map +1 -0
  22. package/dist/cjs/legacy/hooks/app-notifications/index.js.map +1 -0
  23. package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js.map +1 -0
  24. package/dist/{esm → cjs/legacy}/hooks/app-notifications/useAppNotificationsData.d.ts +1 -1
  25. package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useAppNotificationsData.js +2 -2
  26. package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
  27. package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.js +3 -3
  28. package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
  29. package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
  30. package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.js +3 -3
  31. package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
  32. package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.js +3 -3
  33. package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
  34. package/dist/cjs/legacy/hooks/auth/index.js.map +1 -0
  35. package/dist/cjs/legacy/hooks/auth/useAuth.js.map +1 -0
  36. package/dist/cjs/{hooks → legacy/hooks}/auth/useAuthData.d.ts +1 -1
  37. package/dist/cjs/{hooks → legacy/hooks}/auth/useAuthData.js +2 -2
  38. package/dist/cjs/legacy/hooks/auth/useAuthData.js.map +1 -0
  39. package/dist/cjs/{hooks → legacy/hooks}/auth/useChangePassword.js +3 -3
  40. package/dist/cjs/legacy/hooks/auth/useChangePassword.js.map +1 -0
  41. package/dist/cjs/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.js +3 -3
  42. package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js.map +1 -0
  43. package/dist/cjs/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
  44. package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
  45. package/dist/cjs/{hooks → legacy/hooks}/auth/useSignOut.js +3 -3
  46. package/dist/cjs/legacy/hooks/auth/useSignOut.js.map +1 -0
  47. package/dist/cjs/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
  48. package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
  49. package/dist/cjs/{hooks → legacy/hooks}/auth/useVerifyExternalUser.js +2 -2
  50. package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js.map +1 -0
  51. package/dist/cjs/store/api/appNotificationsApi.d.ts +334 -0
  52. package/dist/cjs/store/api/appNotificationsApi.js +71 -12
  53. package/dist/cjs/store/api/appNotificationsApi.js.map +1 -1
  54. package/dist/cjs/store/slices/appNotificationsSlice.d.ts +2 -1
  55. package/dist/cjs/store/slices/appNotificationsSlice.js +10 -2
  56. package/dist/cjs/store/slices/appNotificationsSlice.js.map +1 -1
  57. package/dist/esm/context/index.d.ts +0 -1
  58. package/dist/esm/context/index.js +0 -4
  59. package/dist/esm/context/index.js.map +1 -1
  60. package/dist/esm/helpers/addNotificationsMessages.js +7 -9
  61. package/dist/esm/helpers/addNotificationsMessages.js.map +1 -1
  62. package/dist/esm/hooks/app-notifications-redux/index.d.ts +1 -1
  63. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +1 -0
  64. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +69 -11
  65. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +1 -1
  66. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +15 -1
  67. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +25 -9
  68. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +1 -1
  69. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +1 -1
  70. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +12 -4
  71. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
  72. package/dist/esm/index.d.ts +1 -2
  73. package/dist/esm/index.js +1 -3
  74. package/dist/esm/index.js.map +1 -1
  75. package/dist/esm/legacy/context/app-notifications-context.js.map +1 -0
  76. package/dist/esm/{context → legacy/context}/auth-context.js +1 -1
  77. package/dist/esm/legacy/context/auth-context.js.map +1 -0
  78. package/dist/esm/legacy/hooks/app-notifications/index.js.map +1 -0
  79. package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js.map +1 -0
  80. package/dist/{cjs → esm/legacy}/hooks/app-notifications/useAppNotificationsData.d.ts +1 -1
  81. package/dist/esm/{hooks → legacy/hooks}/app-notifications/useAppNotificationsData.js +2 -2
  82. package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
  83. package/dist/esm/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.js +3 -3
  84. package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
  85. package/dist/esm/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
  86. package/dist/esm/{hooks → legacy/hooks}/app-notifications/useFetchAppNotifications.js +3 -3
  87. package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
  88. package/dist/esm/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.js +3 -3
  89. package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
  90. package/dist/esm/legacy/hooks/auth/index.js.map +1 -0
  91. package/dist/esm/legacy/hooks/auth/useAuth.js.map +1 -0
  92. package/dist/esm/{hooks → legacy/hooks}/auth/useAuthData.d.ts +1 -1
  93. package/dist/esm/{hooks → legacy/hooks}/auth/useAuthData.js +2 -2
  94. package/dist/esm/legacy/hooks/auth/useAuthData.js.map +1 -0
  95. package/dist/esm/{hooks → legacy/hooks}/auth/useChangePassword.js +3 -3
  96. package/dist/esm/legacy/hooks/auth/useChangePassword.js.map +1 -0
  97. package/dist/esm/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.js +3 -3
  98. package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js.map +1 -0
  99. package/dist/esm/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
  100. package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
  101. package/dist/esm/{hooks → legacy/hooks}/auth/useSignOut.js +3 -3
  102. package/dist/esm/legacy/hooks/auth/useSignOut.js.map +1 -0
  103. package/dist/esm/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
  104. package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
  105. package/dist/esm/{hooks → legacy/hooks}/auth/useVerifyExternalUser.js +2 -2
  106. package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js.map +1 -0
  107. package/dist/esm/store/api/appNotificationsApi.d.ts +334 -0
  108. package/dist/esm/store/api/appNotificationsApi.js +70 -11
  109. package/dist/esm/store/api/appNotificationsApi.js.map +1 -1
  110. package/dist/esm/store/slices/appNotificationsSlice.d.ts +2 -1
  111. package/dist/esm/store/slices/appNotificationsSlice.js +9 -1
  112. package/dist/esm/store/slices/appNotificationsSlice.js.map +1 -1
  113. package/package.json +1 -1
  114. package/dist/cjs/context/app-notifications-context.js.map +0 -1
  115. package/dist/cjs/context/auth-context.js.map +0 -1
  116. package/dist/cjs/hooks/app-notifications/index.js.map +0 -1
  117. package/dist/cjs/hooks/app-notifications/useAppNotifications.js.map +0 -1
  118. package/dist/cjs/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  119. package/dist/cjs/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  120. package/dist/cjs/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  121. package/dist/cjs/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  122. package/dist/cjs/hooks/auth/index.js.map +0 -1
  123. package/dist/cjs/hooks/auth/useAuth.js.map +0 -1
  124. package/dist/cjs/hooks/auth/useAuthData.js.map +0 -1
  125. package/dist/cjs/hooks/auth/useChangePassword.js.map +0 -1
  126. package/dist/cjs/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  127. package/dist/cjs/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  128. package/dist/cjs/hooks/auth/useSignOut.js.map +0 -1
  129. package/dist/cjs/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  130. package/dist/cjs/hooks/auth/useVerifyExternalUser.js.map +0 -1
  131. package/dist/esm/context/app-notifications-context.js.map +0 -1
  132. package/dist/esm/context/auth-context.js.map +0 -1
  133. package/dist/esm/hooks/app-notifications/index.js.map +0 -1
  134. package/dist/esm/hooks/app-notifications/useAppNotifications.js.map +0 -1
  135. package/dist/esm/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  136. package/dist/esm/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  137. package/dist/esm/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  138. package/dist/esm/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  139. package/dist/esm/hooks/auth/index.js.map +0 -1
  140. package/dist/esm/hooks/auth/useAuth.js.map +0 -1
  141. package/dist/esm/hooks/auth/useAuthData.js.map +0 -1
  142. package/dist/esm/hooks/auth/useChangePassword.js.map +0 -1
  143. package/dist/esm/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  144. package/dist/esm/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  145. package/dist/esm/hooks/auth/useSignOut.js.map +0 -1
  146. package/dist/esm/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  147. package/dist/esm/hooks/auth/useVerifyExternalUser.js.map +0 -1
  148. /package/dist/cjs/{context → legacy/context}/app-notifications-context.d.ts +0 -0
  149. /package/dist/cjs/{context → legacy/context}/app-notifications-context.js +0 -0
  150. /package/dist/cjs/{context → legacy/context}/auth-context.d.ts +0 -0
  151. /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/index.d.ts +0 -0
  152. /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/index.js +0 -0
  153. /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useAppNotifications.d.ts +0 -0
  154. /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useAppNotifications.js +0 -0
  155. /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
  156. /package/dist/cjs/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
  157. /package/dist/cjs/{hooks → legacy/hooks}/auth/index.d.ts +0 -0
  158. /package/dist/cjs/{hooks → legacy/hooks}/auth/index.js +0 -0
  159. /package/dist/cjs/{hooks → legacy/hooks}/auth/useAuth.d.ts +0 -0
  160. /package/dist/cjs/{hooks → legacy/hooks}/auth/useAuth.js +0 -0
  161. /package/dist/cjs/{hooks → legacy/hooks}/auth/useChangePassword.d.ts +0 -0
  162. /package/dist/cjs/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
  163. /package/dist/cjs/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
  164. /package/dist/cjs/{hooks → legacy/hooks}/auth/useSignOut.d.ts +0 -0
  165. /package/dist/cjs/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
  166. /package/dist/cjs/{hooks → legacy/hooks}/auth/useVerifyExternalUser.d.ts +0 -0
  167. /package/dist/esm/{context → legacy/context}/app-notifications-context.d.ts +0 -0
  168. /package/dist/esm/{context → legacy/context}/app-notifications-context.js +0 -0
  169. /package/dist/esm/{context → legacy/context}/auth-context.d.ts +0 -0
  170. /package/dist/esm/{hooks → legacy/hooks}/app-notifications/index.d.ts +0 -0
  171. /package/dist/esm/{hooks → legacy/hooks}/app-notifications/index.js +0 -0
  172. /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useAppNotifications.d.ts +0 -0
  173. /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useAppNotifications.js +0 -0
  174. /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
  175. /package/dist/esm/{hooks → legacy/hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
  176. /package/dist/esm/{hooks → legacy/hooks}/auth/index.d.ts +0 -0
  177. /package/dist/esm/{hooks → legacy/hooks}/auth/index.js +0 -0
  178. /package/dist/esm/{hooks → legacy/hooks}/auth/useAuth.d.ts +0 -0
  179. /package/dist/esm/{hooks → legacy/hooks}/auth/useAuth.js +0 -0
  180. /package/dist/esm/{hooks → legacy/hooks}/auth/useChangePassword.d.ts +0 -0
  181. /package/dist/esm/{hooks → legacy/hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
  182. /package/dist/esm/{hooks → legacy/hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
  183. /package/dist/esm/{hooks → legacy/hooks}/auth/useSignOut.d.ts +0 -0
  184. /package/dist/esm/{hooks → legacy/hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
  185. /package/dist/esm/{hooks → legacy/hooks}/auth/useVerifyExternalUser.d.ts +0 -0
@@ -11,10 +11,14 @@ interface MarkNotificationAsReadParams {
11
11
  interface CountUnreadNotificationsParams {
12
12
  projectId: string;
13
13
  }
14
+ interface MarkAllNotificationsAsReadParams {
15
+ projectId: string;
16
+ }
14
17
  export declare const appNotificationsApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, {
15
18
  fetchAppNotifications: import("@reduxjs/toolkit/query").QueryDefinition<FetchAppNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", UnifiedAppNotification[], "api", unknown>;
16
19
  markNotificationAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkNotificationAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
17
20
  countUnreadNotifications: import("@reduxjs/toolkit/query").QueryDefinition<CountUnreadNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", number, "api", unknown>;
21
+ markAllNotificationsAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
18
22
  }, "api", "AppNotification", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
19
23
  export declare const useFetchAppNotificationsQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
20
24
  status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
@@ -439,6 +443,166 @@ export declare const useFetchAppNotificationsQuery: <R extends Record<string, an
439
443
  } | undefined) => readonly [(arg: MarkNotificationAsReadParams) => import("@reduxjs/toolkit/query").MutationActionCreatorResult<import("@reduxjs/toolkit/query").MutationDefinition<MarkNotificationAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>>, import("@reduxjs/toolkit/query").TSHelpersNoInfer<R> & {
440
444
  originalArgs?: MarkNotificationAsReadParams | undefined;
441
445
  reset: () => void;
446
+ }], useMarkAllNotificationsAsReadMutation: <R extends Record<string, any> = ({
447
+ requestId?: undefined;
448
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
449
+ data?: undefined;
450
+ error?: undefined;
451
+ endpointName?: string;
452
+ startedTimeStamp?: undefined;
453
+ fulfilledTimeStamp?: undefined;
454
+ } & {
455
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
456
+ isUninitialized: true;
457
+ isLoading: false;
458
+ isSuccess: false;
459
+ isError: false;
460
+ }) | ({
461
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
462
+ } & Omit<{
463
+ requestId: string;
464
+ data?: void | undefined;
465
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
466
+ endpointName: string;
467
+ startedTimeStamp: number;
468
+ fulfilledTimeStamp?: number;
469
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
470
+ requestId: string;
471
+ data?: void | undefined;
472
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
473
+ endpointName: string;
474
+ startedTimeStamp: number;
475
+ fulfilledTimeStamp?: number;
476
+ }, "data" | "fulfilledTimeStamp">> & {
477
+ error: undefined;
478
+ } & {
479
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
480
+ isUninitialized: false;
481
+ isLoading: false;
482
+ isSuccess: true;
483
+ isError: false;
484
+ }) | ({
485
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
486
+ } & {
487
+ requestId: string;
488
+ data?: void | undefined;
489
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
490
+ endpointName: string;
491
+ startedTimeStamp: number;
492
+ fulfilledTimeStamp?: number;
493
+ } & {
494
+ data?: undefined;
495
+ } & {
496
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
497
+ isUninitialized: false;
498
+ isLoading: true;
499
+ isSuccess: false;
500
+ isError: false;
501
+ }) | ({
502
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
503
+ } & Omit<{
504
+ requestId: string;
505
+ data?: void | undefined;
506
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
507
+ endpointName: string;
508
+ startedTimeStamp: number;
509
+ fulfilledTimeStamp?: number;
510
+ }, "error"> & Required<Pick<{
511
+ requestId: string;
512
+ data?: void | undefined;
513
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
514
+ endpointName: string;
515
+ startedTimeStamp: number;
516
+ fulfilledTimeStamp?: number;
517
+ }, "error">> & {
518
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
519
+ isUninitialized: false;
520
+ isLoading: false;
521
+ isSuccess: false;
522
+ isError: true;
523
+ })>(options?: {
524
+ selectFromResult?: ((state: ({
525
+ requestId?: undefined;
526
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
527
+ data?: undefined;
528
+ error?: undefined;
529
+ endpointName?: string;
530
+ startedTimeStamp?: undefined;
531
+ fulfilledTimeStamp?: undefined;
532
+ } & {
533
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
534
+ isUninitialized: true;
535
+ isLoading: false;
536
+ isSuccess: false;
537
+ isError: false;
538
+ }) | ({
539
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
540
+ } & Omit<{
541
+ requestId: string;
542
+ data?: void | undefined;
543
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
544
+ endpointName: string;
545
+ startedTimeStamp: number;
546
+ fulfilledTimeStamp?: number;
547
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
548
+ requestId: string;
549
+ data?: void | undefined;
550
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
551
+ endpointName: string;
552
+ startedTimeStamp: number;
553
+ fulfilledTimeStamp?: number;
554
+ }, "data" | "fulfilledTimeStamp">> & {
555
+ error: undefined;
556
+ } & {
557
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
558
+ isUninitialized: false;
559
+ isLoading: false;
560
+ isSuccess: true;
561
+ isError: false;
562
+ }) | ({
563
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
564
+ } & {
565
+ requestId: string;
566
+ data?: void | undefined;
567
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
568
+ endpointName: string;
569
+ startedTimeStamp: number;
570
+ fulfilledTimeStamp?: number;
571
+ } & {
572
+ data?: undefined;
573
+ } & {
574
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
575
+ isUninitialized: false;
576
+ isLoading: true;
577
+ isSuccess: false;
578
+ isError: false;
579
+ }) | ({
580
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
581
+ } & Omit<{
582
+ requestId: string;
583
+ data?: void | undefined;
584
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
585
+ endpointName: string;
586
+ startedTimeStamp: number;
587
+ fulfilledTimeStamp?: number;
588
+ }, "error"> & Required<Pick<{
589
+ requestId: string;
590
+ data?: void | undefined;
591
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
592
+ endpointName: string;
593
+ startedTimeStamp: number;
594
+ fulfilledTimeStamp?: number;
595
+ }, "error">> & {
596
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
597
+ isUninitialized: false;
598
+ isLoading: false;
599
+ isSuccess: false;
600
+ isError: true;
601
+ })) => R) | undefined;
602
+ fixedCacheKey?: string;
603
+ } | undefined) => readonly [(arg: MarkAllNotificationsAsReadParams) => import("@reduxjs/toolkit/query").MutationActionCreatorResult<import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>>, import("@reduxjs/toolkit/query").TSHelpersNoInfer<R> & {
604
+ originalArgs?: MarkAllNotificationsAsReadParams | undefined;
605
+ reset: () => void;
442
606
  }], useCountUnreadNotificationsQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
443
607
  status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
444
608
  originalArgs?: undefined | undefined;
@@ -707,6 +871,7 @@ export declare const fetchAppNotifications: import("@reduxjs/toolkit/query").Api
707
871
  fetchAppNotifications: import("@reduxjs/toolkit/query").QueryDefinition<FetchAppNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", UnifiedAppNotification[], "api", unknown>;
708
872
  markNotificationAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkNotificationAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
709
873
  countUnreadNotifications: import("@reduxjs/toolkit/query").QueryDefinition<CountUnreadNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", number, "api", unknown>;
874
+ markAllNotificationsAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
710
875
  }> & {
711
876
  useQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
712
877
  status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
@@ -1114,6 +1279,7 @@ export declare const fetchAppNotifications: import("@reduxjs/toolkit/query").Api
1114
1279
  fetchAppNotifications: import("@reduxjs/toolkit/query").QueryDefinition<FetchAppNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", UnifiedAppNotification[], "api", unknown>;
1115
1280
  markNotificationAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkNotificationAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
1116
1281
  countUnreadNotifications: import("@reduxjs/toolkit/query").QueryDefinition<CountUnreadNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", number, "api", unknown>;
1282
+ markAllNotificationsAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
1117
1283
  }> & {
1118
1284
  useMutation: <R extends Record<string, any> = ({
1119
1285
  requestId?: undefined;
@@ -1276,10 +1442,178 @@ export declare const fetchAppNotifications: import("@reduxjs/toolkit/query").Api
1276
1442
  originalArgs?: MarkNotificationAsReadParams | undefined;
1277
1443
  reset: () => void;
1278
1444
  }];
1445
+ }, markAllNotificationsAsRead: import("@reduxjs/toolkit/query").ApiEndpointMutation<import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>, {
1446
+ fetchAppNotifications: import("@reduxjs/toolkit/query").QueryDefinition<FetchAppNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", UnifiedAppNotification[], "api", unknown>;
1447
+ markNotificationAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkNotificationAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
1448
+ countUnreadNotifications: import("@reduxjs/toolkit/query").QueryDefinition<CountUnreadNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", number, "api", unknown>;
1449
+ markAllNotificationsAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
1450
+ }> & {
1451
+ useMutation: <R extends Record<string, any> = ({
1452
+ requestId?: undefined;
1453
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
1454
+ data?: undefined;
1455
+ error?: undefined;
1456
+ endpointName?: string;
1457
+ startedTimeStamp?: undefined;
1458
+ fulfilledTimeStamp?: undefined;
1459
+ } & {
1460
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
1461
+ isUninitialized: true;
1462
+ isLoading: false;
1463
+ isSuccess: false;
1464
+ isError: false;
1465
+ }) | ({
1466
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
1467
+ } & Omit<{
1468
+ requestId: string;
1469
+ data?: void | undefined;
1470
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1471
+ endpointName: string;
1472
+ startedTimeStamp: number;
1473
+ fulfilledTimeStamp?: number;
1474
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
1475
+ requestId: string;
1476
+ data?: void | undefined;
1477
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1478
+ endpointName: string;
1479
+ startedTimeStamp: number;
1480
+ fulfilledTimeStamp?: number;
1481
+ }, "data" | "fulfilledTimeStamp">> & {
1482
+ error: undefined;
1483
+ } & {
1484
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
1485
+ isUninitialized: false;
1486
+ isLoading: false;
1487
+ isSuccess: true;
1488
+ isError: false;
1489
+ }) | ({
1490
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
1491
+ } & {
1492
+ requestId: string;
1493
+ data?: void | undefined;
1494
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1495
+ endpointName: string;
1496
+ startedTimeStamp: number;
1497
+ fulfilledTimeStamp?: number;
1498
+ } & {
1499
+ data?: undefined;
1500
+ } & {
1501
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
1502
+ isUninitialized: false;
1503
+ isLoading: true;
1504
+ isSuccess: false;
1505
+ isError: false;
1506
+ }) | ({
1507
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
1508
+ } & Omit<{
1509
+ requestId: string;
1510
+ data?: void | undefined;
1511
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1512
+ endpointName: string;
1513
+ startedTimeStamp: number;
1514
+ fulfilledTimeStamp?: number;
1515
+ }, "error"> & Required<Pick<{
1516
+ requestId: string;
1517
+ data?: void | undefined;
1518
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1519
+ endpointName: string;
1520
+ startedTimeStamp: number;
1521
+ fulfilledTimeStamp?: number;
1522
+ }, "error">> & {
1523
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
1524
+ isUninitialized: false;
1525
+ isLoading: false;
1526
+ isSuccess: false;
1527
+ isError: true;
1528
+ })>(options?: {
1529
+ selectFromResult?: ((state: ({
1530
+ requestId?: undefined;
1531
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
1532
+ data?: undefined;
1533
+ error?: undefined;
1534
+ endpointName?: string;
1535
+ startedTimeStamp?: undefined;
1536
+ fulfilledTimeStamp?: undefined;
1537
+ } & {
1538
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
1539
+ isUninitialized: true;
1540
+ isLoading: false;
1541
+ isSuccess: false;
1542
+ isError: false;
1543
+ }) | ({
1544
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
1545
+ } & Omit<{
1546
+ requestId: string;
1547
+ data?: void | undefined;
1548
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1549
+ endpointName: string;
1550
+ startedTimeStamp: number;
1551
+ fulfilledTimeStamp?: number;
1552
+ }, "data" | "fulfilledTimeStamp"> & Required<Pick<{
1553
+ requestId: string;
1554
+ data?: void | undefined;
1555
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1556
+ endpointName: string;
1557
+ startedTimeStamp: number;
1558
+ fulfilledTimeStamp?: number;
1559
+ }, "data" | "fulfilledTimeStamp">> & {
1560
+ error: undefined;
1561
+ } & {
1562
+ status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
1563
+ isUninitialized: false;
1564
+ isLoading: false;
1565
+ isSuccess: true;
1566
+ isError: false;
1567
+ }) | ({
1568
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
1569
+ } & {
1570
+ requestId: string;
1571
+ data?: void | undefined;
1572
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1573
+ endpointName: string;
1574
+ startedTimeStamp: number;
1575
+ fulfilledTimeStamp?: number;
1576
+ } & {
1577
+ data?: undefined;
1578
+ } & {
1579
+ status: import("@reduxjs/toolkit/query").QueryStatus.pending;
1580
+ isUninitialized: false;
1581
+ isLoading: true;
1582
+ isSuccess: false;
1583
+ isError: false;
1584
+ }) | ({
1585
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
1586
+ } & Omit<{
1587
+ requestId: string;
1588
+ data?: void | undefined;
1589
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1590
+ endpointName: string;
1591
+ startedTimeStamp: number;
1592
+ fulfilledTimeStamp?: number;
1593
+ }, "error"> & Required<Pick<{
1594
+ requestId: string;
1595
+ data?: void | undefined;
1596
+ error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
1597
+ endpointName: string;
1598
+ startedTimeStamp: number;
1599
+ fulfilledTimeStamp?: number;
1600
+ }, "error">> & {
1601
+ status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
1602
+ isUninitialized: false;
1603
+ isLoading: false;
1604
+ isSuccess: false;
1605
+ isError: true;
1606
+ })) => R) | undefined;
1607
+ fixedCacheKey?: string;
1608
+ } | undefined) => readonly [(arg: MarkAllNotificationsAsReadParams) => import("@reduxjs/toolkit/query").MutationActionCreatorResult<import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>>, import("@reduxjs/toolkit/query").TSHelpersNoInfer<R> & {
1609
+ originalArgs?: MarkAllNotificationsAsReadParams | undefined;
1610
+ reset: () => void;
1611
+ }];
1279
1612
  }, countUnreadNotifications: import("@reduxjs/toolkit/query").ApiEndpointQuery<import("@reduxjs/toolkit/query").QueryDefinition<CountUnreadNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", number, "api", unknown>, {
1280
1613
  fetchAppNotifications: import("@reduxjs/toolkit/query").QueryDefinition<FetchAppNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", UnifiedAppNotification[], "api", unknown>;
1281
1614
  markNotificationAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkNotificationAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
1282
1615
  countUnreadNotifications: import("@reduxjs/toolkit/query").QueryDefinition<CountUnreadNotificationsParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", number, "api", unknown>;
1616
+ markAllNotificationsAsRead: import("@reduxjs/toolkit/query").MutationDefinition<MarkAllNotificationsAsReadParams, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "AppNotification", void, "api", unknown>;
1283
1617
  }> & {
1284
1618
  useQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
1285
1619
  status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
@@ -54,7 +54,7 @@ export var appNotificationsApi = baseApi.injectEndpoints({
54
54
  var projectId = _a.projectId, page = _a.page, limit = _a.limit;
55
55
  return ({
56
56
  url: "/".concat(projectId, "/app-notifications"),
57
- method: 'GET',
57
+ method: "GET",
58
58
  params: {
59
59
  page: page,
60
60
  limit: limit,
@@ -65,10 +65,13 @@ export var appNotificationsApi = baseApi.injectEndpoints({
65
65
  var _b;
66
66
  var projectId = _a.projectId;
67
67
  return __spreadArray([
68
- { type: 'AppNotification', id: "".concat(projectId, "-LIST") }
68
+ { type: "AppNotification", id: "".concat(projectId, "-LIST") }
69
69
  ], ((_b = result === null || result === void 0 ? void 0 : result.map(function (_a) {
70
70
  var id = _a.id;
71
- return ({ type: 'AppNotification', id: id });
71
+ return ({
72
+ type: "AppNotification",
73
+ id: id,
74
+ });
72
75
  })) !== null && _b !== void 0 ? _b : []), true);
73
76
  },
74
77
  }),
@@ -78,7 +81,7 @@ export var appNotificationsApi = baseApi.injectEndpoints({
78
81
  var projectId = _a.projectId, notificationId = _a.notificationId;
79
82
  return ({
80
83
  url: "/".concat(projectId, "/app-notifications/").concat(notificationId, "/mark-as-read"),
81
- method: 'PATCH',
84
+ method: "PATCH",
82
85
  body: {},
83
86
  });
84
87
  },
@@ -92,7 +95,7 @@ export var appNotificationsApi = baseApi.injectEndpoints({
92
95
  switch (_f.label) {
93
96
  case 0:
94
97
  patches = [];
95
- dispatch(appNotificationsApi.util.updateQueryData('fetchAppNotifications',
98
+ dispatch(appNotificationsApi.util.updateQueryData("fetchAppNotifications",
96
99
  // We need to find all queries for this projectId - this is a simplified approach
97
100
  { projectId: projectId, page: 1, limit: 10 }, // This should be more dynamic in practice
98
101
  function (draft) {
@@ -121,8 +124,8 @@ export var appNotificationsApi = baseApi.injectEndpoints({
121
124
  invalidatesTags: function (result, error, _a) {
122
125
  var projectId = _a.projectId, notificationId = _a.notificationId;
123
126
  return [
124
- { type: 'AppNotification', id: notificationId },
125
- { type: 'AppNotification', id: "".concat(projectId, "-LIST") },
127
+ { type: "AppNotification", id: notificationId },
128
+ { type: "AppNotification", id: "".concat(projectId, "-LIST") },
126
129
  ];
127
130
  },
128
131
  }),
@@ -132,20 +135,76 @@ export var appNotificationsApi = baseApi.injectEndpoints({
132
135
  var projectId = _a.projectId;
133
136
  return ({
134
137
  url: "/".concat(projectId, "/app-notifications/count"),
135
- method: 'GET',
138
+ method: "GET",
136
139
  });
137
140
  },
138
141
  providesTags: function (result, error, _a) {
139
142
  var projectId = _a.projectId;
140
143
  return [
141
- { type: 'AppNotification', id: "".concat(projectId, "-COUNT") },
144
+ { type: "AppNotification", id: "".concat(projectId, "-COUNT") },
145
+ ];
146
+ },
147
+ }),
148
+ // Mark all notifications as read
149
+ markAllNotificationsAsRead: builder.mutation({
150
+ query: function (_a) {
151
+ var projectId = _a.projectId;
152
+ return ({
153
+ url: "/".concat(projectId, "/app-notifications/mark-all-as-read"),
154
+ method: "PATCH",
155
+ body: {},
156
+ });
157
+ },
158
+ // Optimistically update the cache
159
+ onQueryStarted: function (_a, _b) {
160
+ return __awaiter(this, arguments, void 0, function (_c, _d) {
161
+ var patches, _e;
162
+ var projectId = _c.projectId;
163
+ var dispatch = _d.dispatch, queryFulfilled = _d.queryFulfilled;
164
+ return __generator(this, function (_f) {
165
+ switch (_f.label) {
166
+ case 0:
167
+ patches = [];
168
+ // Update all notifications to be marked as read
169
+ dispatch(appNotificationsApi.util.updateQueryData("fetchAppNotifications",
170
+ // We need to find all queries for this projectId - this is a simplified approach
171
+ { projectId: projectId, page: 1, limit: 10 }, // This should be more dynamic in practice
172
+ function (draft) {
173
+ draft.forEach(function (notification) {
174
+ notification.isRead = true;
175
+ });
176
+ }));
177
+ // Update unread count to 0
178
+ dispatch(appNotificationsApi.util.updateQueryData("countUnreadNotifications", { projectId: projectId }, function () { return 0; }));
179
+ _f.label = 1;
180
+ case 1:
181
+ _f.trys.push([1, 3, , 4]);
182
+ return [4 /*yield*/, queryFulfilled];
183
+ case 2:
184
+ _f.sent();
185
+ return [3 /*break*/, 4];
186
+ case 3:
187
+ _e = _f.sent();
188
+ // Revert optimistic update on failure
189
+ patches.forEach(function (patch) { return patch.undo(); });
190
+ return [3 /*break*/, 4];
191
+ case 4: return [2 /*return*/];
192
+ }
193
+ });
194
+ });
195
+ },
196
+ invalidatesTags: function (result, error, _a) {
197
+ var projectId = _a.projectId;
198
+ return [
199
+ { type: "AppNotification", id: "".concat(projectId, "-LIST") },
200
+ { type: "AppNotification", id: "".concat(projectId, "-COUNT") },
142
201
  ];
143
202
  },
144
203
  }),
145
204
  }); },
146
205
  });
147
206
  // Export hooks for use in components
148
- export var useFetchAppNotificationsQuery = appNotificationsApi.useFetchAppNotificationsQuery, useLazyFetchAppNotificationsQuery = appNotificationsApi.useLazyFetchAppNotificationsQuery, useMarkNotificationAsReadMutation = appNotificationsApi.useMarkNotificationAsReadMutation, useCountUnreadNotificationsQuery = appNotificationsApi.useCountUnreadNotificationsQuery, useLazyCountUnreadNotificationsQuery = appNotificationsApi.useLazyCountUnreadNotificationsQuery;
207
+ export var useFetchAppNotificationsQuery = appNotificationsApi.useFetchAppNotificationsQuery, useLazyFetchAppNotificationsQuery = appNotificationsApi.useLazyFetchAppNotificationsQuery, useMarkNotificationAsReadMutation = appNotificationsApi.useMarkNotificationAsReadMutation, useMarkAllNotificationsAsReadMutation = appNotificationsApi.useMarkAllNotificationsAsReadMutation, useCountUnreadNotificationsQuery = appNotificationsApi.useCountUnreadNotificationsQuery, useLazyCountUnreadNotificationsQuery = appNotificationsApi.useLazyCountUnreadNotificationsQuery;
149
208
  // Export for manual cache management
150
- export var fetchAppNotifications = (_a = appNotificationsApi.endpoints, _a.fetchAppNotifications), markNotificationAsRead = _a.markNotificationAsRead, countUnreadNotifications = _a.countUnreadNotifications;
209
+ export var fetchAppNotifications = (_a = appNotificationsApi.endpoints, _a.fetchAppNotifications), markNotificationAsRead = _a.markNotificationAsRead, markAllNotificationsAsRead = _a.markAllNotificationsAsRead, countUnreadNotifications = _a.countUnreadNotifications;
151
210
  //# sourceMappingURL=appNotificationsApi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"appNotificationsApi.js","sourceRoot":"","sources":["../../../../src/store/api/appNotificationsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,gDAAgD;AAChD,MAAM,CAAC,IAAM,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IACzD,SAAS,EAAE,UAAC,OAAO,IAAK,OAAA,CAAC;QACvB,oCAAoC;QACpC,qBAAqB,EAAE,OAAO,CAAC,KAAK,CAAwD;YAC1F,KAAK,EAAE,UAAC,EAA0B;oBAAxB,SAAS,eAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA;gBAA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BAAwB,8BAAA,CACQ"}
@@ -22,13 +22,14 @@ export declare const appNotificationsSlice: import("@reduxjs/toolkit").Slice<App
22
22
  isFirstPage?: boolean;
23
23
  }>) => void;
24
24
  markAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<string>) => void;
25
+ markAllAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
25
26
  setUnreadCount: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<number>) => void;
26
27
  handleError: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
27
28
  }, "appNotifications", "appNotifications", import("@reduxjs/toolkit").SliceSelectors<AppNotificationsState>>;
28
29
  export declare const setProjectContext: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/setProjectContext">, setLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setLimit">, setNotificationTemplates: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<NotificationTemplates>, "appNotifications/setNotificationTemplates">, resetNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/resetNotifications">, loadMore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/loadMore">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "appNotifications/setLoading">, addNotifications: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
29
30
  notifications: UnifiedAppNotification[];
30
31
  isFirstPage?: boolean;
31
- }, "appNotifications/addNotifications">, markAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/markAsReadLocally">, setUnreadCount: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setUnreadCount">, handleError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/handleError">;
32
+ }, "appNotifications/addNotifications">, markAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/markAsReadLocally">, markAllAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/markAllAsReadLocally">, setUnreadCount: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setUnreadCount">, handleError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/handleError">;
32
33
  declare const _default: import("@reduxjs/toolkit").Reducer<AppNotificationsState>;
33
34
  export default _default;
34
35
  export declare const selectAppNotifications: (state: {
@@ -74,6 +74,14 @@ export var appNotificationsSlice = createSlice({
74
74
  state.unreadCount = Math.max(state.unreadCount - 1, 0);
75
75
  }
76
76
  },
77
+ // Mark all notifications as read locally (optimistic update)
78
+ markAllAsReadLocally: function (state) {
79
+ state.notifications.forEach(function (notification) {
80
+ notification.isRead = true;
81
+ });
82
+ // Set unread count to 0
83
+ state.unreadCount = 0;
84
+ },
77
85
  // Set unread count
78
86
  setUnreadCount: function (state, action) {
79
87
  state.unreadCount = action.payload;
@@ -85,7 +93,7 @@ export var appNotificationsSlice = createSlice({
85
93
  },
86
94
  });
87
95
  // Export actions
88
- export var setProjectContext = (_a = appNotificationsSlice.actions, _a.setProjectContext), setLimit = _a.setLimit, setNotificationTemplates = _a.setNotificationTemplates, resetNotifications = _a.resetNotifications, loadMore = _a.loadMore, setLoading = _a.setLoading, addNotifications = _a.addNotifications, markAsReadLocally = _a.markAsReadLocally, setUnreadCount = _a.setUnreadCount, handleError = _a.handleError;
96
+ export var setProjectContext = (_a = appNotificationsSlice.actions, _a.setProjectContext), setLimit = _a.setLimit, setNotificationTemplates = _a.setNotificationTemplates, resetNotifications = _a.resetNotifications, loadMore = _a.loadMore, setLoading = _a.setLoading, addNotifications = _a.addNotifications, markAsReadLocally = _a.markAsReadLocally, markAllAsReadLocally = _a.markAllAsReadLocally, setUnreadCount = _a.setUnreadCount, handleError = _a.handleError;
89
97
  // Export reducer
90
98
  export default appNotificationsSlice.reducer;
91
99
  // Selectors
@@ -1 +1 @@
1
- {"version":3,"file":"appNotificationsSl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CAAC,gBAAgB,CAAC,KAAK;AAA5B,CAA4B,CAAC;AAE/B,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAAC,KAAkD;IAC5F,OAAA,KAAK,CAAC,gBAAgB,CAAC,qBAAqB;AAA5C,CAA4C,CAAC;AAE/C,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAAC,KAAkD;IACvF,OAAA,KAAK,CAAC,gBAAgB,CAAC,gBAAgB;AAAvC,CAAuC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replyke/core",
3
- "version": "5.1.5-beta.7",
3
+ "version": "5.1.5-beta.9",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "author": "Replyke, maintained by Yanay Tsabary",
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-notifications-context.js","sourceRoot":"","sources":["../../../src/context/app-notifications-context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAsC;AACtC,+GAG4D;AAU/C,QAAA,uBAAuB,GAAG,IAAA,qBAAa,EAElD,EAAE,CAAC,CAAC;AAEC,IAAM,wBAAwB,GAEjC,UAAC,EAA0D;IAAxD,IAAA,QAAQ,cAAA,EAAK,WAAW,cAA1B,YAA4B,CAAF;IAC7B,IAAM,IAAI,GAAG,IAAA,iCAAuB,EAAC,WAAW,CAAC,CAAC;IAClD,OAAO,CACL,uBAAC,+BAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAC1C,QAAQ,GACwB,CACpC,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,wBAAwB,4BASnC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-context.js","sourceRoot":"","sources":["../../../src/context/auth-context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAsC;AACtC,0EAGmC;AACnC,+CAA8C;AASjC,QAAA,WAAW,GAAG,IAAA,qBAAa,EAA6B,EAAE,CAAC,CAAC;AAElE,IAAM,YAAY,GAA+B,UAAC,EAGtC;IAFjB,IAAA,QAAQ,cAAA,EACL,WAAW,cAFyC,YAGxD,CADe;IAEd,IAAM,KAAqC,IAAA,qBAAW,EAAC,WAAW,CAAC,EAA3D,IAAI,UAAA,EAAE,OAAO,aAAA,EAAK,YAAY,cAAhC,mBAAkC,CAA2B,CAAC;IAEpE,OAAO,CACL,uBAAC,mBAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACvC,uBAAC,2BAAY,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,YACvC,QAAQ,GACI,GACM,CACxB,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,YAAY,gBAavB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/index.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAuE;AAA9D,2IAAA,OAAO,OAAuB;AACvC,qEAA+E;AAAtE,mJAAA,OAAO,OAA2B;AAC3C,6EAAuF;AAA9E,2JAAA,OAAO,OAA+B;AAC/C,uEAAiF;AAAxE,qJAAA,OAAO,OAA4B;AAC5C,yEAAmF;AAA1E,uJAAA,OAAO,OAA6B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAppNotifications.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotifications.tsx"],"names":[],"mappings":";;AAMA,sCAEC;AARD,+BAAmC;AACnC,qFAGiD;AAEjD,SAAwB,mBAAmB;IACzC,OAAO,IAAA,kBAAU,EAAC,mDAAuB,CAAC,CAAC;AAC7C,CAAC"}